generated-configure.sh revision 1223:67395f7ca2db
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCR_DLL
649LIBCXX
650LLVM_LIBS
651LLVM_LDFLAGS
652LLVM_CFLAGS
653LLVM_CONFIG
654LIBFFI_LIBS
655LIBFFI_CFLAGS
656STATIC_CXX_SETTING
657LIBDL
658LIBM
659LIBZIP_CAN_USE_MMAP
660USE_EXTERNAL_LIBZ
661USE_EXTERNAL_LIBPNG
662PNG_LIBS
663PNG_CFLAGS
664USE_EXTERNAL_LCMS
665LCMS_LIBS
666LCMS_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669ALSA_LIBS
670ALSA_CFLAGS
671FREETYPE_BUNDLE_LIB_PATH
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674CUPS_CFLAGS
675X_EXTRA_LIBS
676X_LIBS
677X_PRE_LIBS
678X_CFLAGS
679XMKMF
680FIXPATH
681ZIP_DEBUGINFO_FILES
682ENABLE_DEBUG_SYMBOLS
683CFLAGS_WARNINGS_ARE_ERRORS
684COMPILER_SUPPORTS_TARGET_BITS_FLAG
685ZERO_ARCHFLAG
686LDFLAGS_CXX_JDK
687LDFLAGS_JDKEXE_SUFFIX
688LDFLAGS_JDKLIB_SUFFIX
689LDFLAGS_JDKEXE
690LDFLAGS_JDKLIB
691CXXFLAGS_JDKEXE
692CXXFLAGS_JDKLIB
693CFLAGS_JDKEXE
694CFLAGS_JDKLIB
695MACOSX_VERSION_MIN
696LEGACY_EXTRA_LDFLAGS
697LEGACY_EXTRA_CXXFLAGS
698LEGACY_EXTRA_CFLAGS
699CXX_O_FLAG_NONE
700CXX_O_FLAG_DEBUG
701CXX_O_FLAG_NORM
702CXX_O_FLAG_HI
703CXX_O_FLAG_HIGHEST
704C_O_FLAG_NONE
705C_O_FLAG_DEBUG
706C_O_FLAG_NORM
707C_O_FLAG_HI
708C_O_FLAG_HIGHEST
709CXXFLAGS_DEBUG_OPTIONS
710CFLAGS_DEBUG_OPTIONS
711CXXFLAGS_DEBUG_SYMBOLS
712CFLAGS_DEBUG_SYMBOLS
713CXX_FLAG_DEPS
714C_FLAG_DEPS
715SET_SHARED_LIBRARY_MAPFILE
716SET_SHARED_LIBRARY_NAME
717SET_SHARED_LIBRARY_ORIGIN
718SET_EXECUTABLE_ORIGIN
719SHARED_LIBRARY_FLAGS
720CXX_FLAG_REORDER
721C_FLAG_REORDER
722SYSROOT_LDFLAGS
723SYSROOT_CFLAGS
724RC_FLAGS
725AR_OUT_OPTION
726LD_OUT_OPTION
727EXE_OUT_OPTION
728CC_OUT_OPTION
729POST_MCS_CMD
730POST_STRIP_CMD
731ARFLAGS
732COMPILER_TARGET_BITS_FLAG
733JT_HOME
734JTREGEXE
735USING_BROKEN_SUSE_LD
736PACKAGE_PATH
737LDEXECXX
738LDEXE
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747ac_ct_OBJDUMP
748OBJDUMP
749ac_ct_OBJCOPY
750OBJCOPY
751ac_ct_NM
752ac_ct_STRIP
753MCS
754GNM
755NM
756STRIP
757MSBUILD
758DUMPBIN
759RC
760MT
761LIPO
762ac_ct_OBJC
763OBJCFLAGS
764OBJC
765ac_ct_AR
766AR
767AS
768LDCXX
769LD
770CXXCPP
771CPP
772ac_ct_CXX
773CXXFLAGS
774CXX
775ac_ct_PROPER_COMPILER_CXX
776PROPER_COMPILER_CXX
777TOOLCHAIN_PATH_CXX
778POTENTIAL_CXX
779OBJEXT
780EXEEXT
781ac_ct_CC
782CPPFLAGS
783LDFLAGS
784CFLAGS
785CC
786ac_ct_PROPER_COMPILER_CC
787PROPER_COMPILER_CC
788TOOLCHAIN_PATH_CC
789POTENTIAL_CC
790VS_LIB
791VS_INCLUDE
792VS_PATH
793CYGWIN_LINK
794EXE_SUFFIX
795OBJ_SUFFIX
796STATIC_LIBRARY
797SHARED_LIBRARY
798STATIC_LIBRARY_SUFFIX
799SHARED_LIBRARY_SUFFIX
800LIBRARY_PREFIX
801TOOLCHAIN_TYPE
802BUILD_HOTSPOT
803HOTSPOT_DIST
804BUILD_OUTPUT
805OVERRIDE_SRC_ROOT
806ADD_SRC_ROOT
807JDK_TOPDIR
808NASHORN_TOPDIR
809HOTSPOT_TOPDIR
810JAXWS_TOPDIR
811JAXP_TOPDIR
812CORBA_TOPDIR
813LANGTOOLS_TOPDIR
814JAVAC_FLAGS
815BOOT_JDK_SOURCETARGET
816JARSIGNER
817NATIVE2ASCII
818JAR
819JAVAH
820JAVAC
821JAVA
822BOOT_JDK
823JAVA_CHECK
824JAVAC_CHECK
825COOKED_BUILD_NUMBER
826JDK_VERSION
827COPYRIGHT_YEAR
828MACOSX_BUNDLE_ID_BASE
829MACOSX_BUNDLE_NAME_BASE
830COMPANY_NAME
831JDK_RC_PLATFORM_NAME
832PRODUCT_SUFFIX
833PRODUCT_NAME
834LAUNCHER_NAME
835MILESTONE
836JDK_BUILD_NUMBER
837JDK_UPDATE_VERSION
838JDK_MICRO_VERSION
839JDK_MINOR_VERSION
840JDK_MAJOR_VERSION
841USER_RELEASE_SUFFIX
842COMPRESS_JARS
843RMICONNECTOR_IIOP
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856CODESIGN
857XATTR
858DSYMUTIL
859IS_GNU_TIME
860TIME
861STAT
862HG
863READELF
864OTOOL
865LDD
866ZIP
867UNZIP
868FIND_DELETE
869OUTPUT_SYNC
870OUTPUT_SYNC_SUPPORTED
871MAKE
872CHECK_TOOLSDIR_MAKE
873CHECK_TOOLSDIR_GMAKE
874CHECK_MAKE
875CHECK_GMAKE
876PKGHANDLER
877OUTPUT_ROOT
878CONF_NAME
879SPEC
880SDKROOT
881XCODEBUILD
882BUILD_VARIANT_RELEASE
883DEBUG_CLASSFILES
884FASTDEBUG
885VARIANT
886DEBUG_LEVEL
887MACOSX_UNIVERSAL
888INCLUDE_SA
889JVM_VARIANT_CORE
890JVM_VARIANT_ZEROSHARK
891JVM_VARIANT_ZERO
892JVM_VARIANT_KERNEL
893JVM_VARIANT_MINIMAL1
894JVM_VARIANT_CLIENT
895JVM_VARIANT_SERVER
896JVM_VARIANTS
897JVM_INTERPRETER
898JDK_VARIANT
899SET_OPENJDK
900BUILD_LOG_WRAPPER
901BUILD_LOG_PREVIOUS
902BUILD_LOG
903TOPDIR
904PATH_SEP
905ZERO_ARCHDEF
906DEFINE_CROSS_COMPILE_ARCH
907LP64
908OPENJDK_TARGET_OS_EXPORT_DIR
909OPENJDK_TARGET_OS_API_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_API
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_API
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_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_jtreg
1080with_extra_cflags
1081with_extra_cxxflags
1082with_extra_ldflags
1083enable_debug_symbols
1084enable_zip_debug_info
1085with_x
1086with_cups
1087with_cups_include
1088with_freetype
1089with_freetype_include
1090with_freetype_lib
1091with_freetype_src
1092enable_freetype_bundling
1093with_alsa
1094with_alsa_include
1095with_alsa_lib
1096with_libjpeg
1097with_giflib
1098with_lcms
1099with_libpng
1100with_zlib
1101with_stdc__lib
1102with_msvcr_dll
1103with_dxsdk
1104with_dxsdk_lib
1105with_dxsdk_include
1106with_num_cores
1107with_memory_size
1108with_jobs
1109with_boot_jdk_jvmargs
1110with_sjavac_server_java
1111enable_sjavac
1112enable_precompiled_headers
1113enable_ccache
1114with_ccache_dir
1115'
1116      ac_precious_vars='build_alias
1117host_alias
1118target_alias
1119BASENAME
1120BASH
1121CAT
1122CHMOD
1123CMP
1124COMM
1125CP
1126CUT
1127DATE
1128DIFF
1129DIRNAME
1130ECHO
1131EXPR
1132FILE
1133FIND
1134HEAD
1135LN
1136LS
1137MKDIR
1138MKTEMP
1139MV
1140NAWK
1141PRINTF
1142RM
1143SH
1144SORT
1145TAIL
1146TAR
1147TEE
1148TOUCH
1149TR
1150UNAME
1151UNIQ
1152WC
1153WHICH
1154XARGS
1155AWK
1156GREP
1157EGREP
1158FGREP
1159SED
1160CYGPATH
1161READLINK
1162DF
1163SETFILE
1164CPIO
1165UNZIP
1166ZIP
1167LDD
1168OTOOL
1169READELF
1170HG
1171STAT
1172TIME
1173DSYMUTIL
1174XATTR
1175CODESIGN
1176PKG_CONFIG
1177JAVA
1178JAVAC
1179JAVAH
1180JAR
1181NATIVE2ASCII
1182JARSIGNER
1183CC
1184CFLAGS
1185LDFLAGS
1186LIBS
1187CPPFLAGS
1188CXX
1189CXXFLAGS
1190CCC
1191CPP
1192CXXCPP
1193AS
1194AR
1195OBJC
1196OBJCFLAGS
1197LIPO
1198STRIP
1199NM
1200GNM
1201MCS
1202OBJCOPY
1203OBJDUMP
1204BUILD_CC
1205BUILD_CXX
1206BUILD_LD
1207JTREGEXE
1208XMKMF
1209FREETYPE_CFLAGS
1210FREETYPE_LIBS
1211ALSA_CFLAGS
1212ALSA_LIBS
1213LCMS_CFLAGS
1214LCMS_LIBS
1215PNG_CFLAGS
1216PNG_LIBS
1217LIBFFI_CFLAGS
1218LIBFFI_LIBS
1219CCACHE'
1220
1221
1222# Initialize some variables set by options.
1223ac_init_help=
1224ac_init_version=false
1225ac_unrecognized_opts=
1226ac_unrecognized_sep=
1227# The variables have the same names as the options, with
1228# dashes changed to underlines.
1229cache_file=/dev/null
1230exec_prefix=NONE
1231no_create=
1232no_recursion=
1233prefix=NONE
1234program_prefix=NONE
1235program_suffix=NONE
1236program_transform_name=s,x,x,
1237silent=
1238site=
1239srcdir=
1240verbose=
1241x_includes=NONE
1242x_libraries=NONE
1243
1244# Installation directory options.
1245# These are left unexpanded so users can "make install exec_prefix=/foo"
1246# and all the variables that are supposed to be based on exec_prefix
1247# by default will actually change.
1248# Use braces instead of parens because sh, perl, etc. also accept them.
1249# (The list follows the same order as the GNU Coding Standards.)
1250bindir='${exec_prefix}/bin'
1251sbindir='${exec_prefix}/sbin'
1252libexecdir='${exec_prefix}/libexec'
1253datarootdir='${prefix}/share'
1254datadir='${datarootdir}'
1255sysconfdir='${prefix}/etc'
1256sharedstatedir='${prefix}/com'
1257localstatedir='${prefix}/var'
1258includedir='${prefix}/include'
1259oldincludedir='/usr/include'
1260docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1261infodir='${datarootdir}/info'
1262htmldir='${docdir}'
1263dvidir='${docdir}'
1264pdfdir='${docdir}'
1265psdir='${docdir}'
1266libdir='${exec_prefix}/lib'
1267localedir='${datarootdir}/locale'
1268mandir='${datarootdir}/man'
1269
1270ac_prev=
1271ac_dashdash=
1272for ac_option
1273do
1274  # If the previous option needs an argument, assign it.
1275  if test -n "$ac_prev"; then
1276    eval $ac_prev=\$ac_option
1277    ac_prev=
1278    continue
1279  fi
1280
1281  case $ac_option in
1282  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1283  *=)   ac_optarg= ;;
1284  *)    ac_optarg=yes ;;
1285  esac
1286
1287  # Accept the important Cygnus configure options, so we can diagnose typos.
1288
1289  case $ac_dashdash$ac_option in
1290  --)
1291    ac_dashdash=yes ;;
1292
1293  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1294    ac_prev=bindir ;;
1295  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1296    bindir=$ac_optarg ;;
1297
1298  -build | --build | --buil | --bui | --bu)
1299    ac_prev=build_alias ;;
1300  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1301    build_alias=$ac_optarg ;;
1302
1303  -cache-file | --cache-file | --cache-fil | --cache-fi \
1304  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1305    ac_prev=cache_file ;;
1306  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1307  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1308    cache_file=$ac_optarg ;;
1309
1310  --config-cache | -C)
1311    cache_file=config.cache ;;
1312
1313  -datadir | --datadir | --datadi | --datad)
1314    ac_prev=datadir ;;
1315  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1316    datadir=$ac_optarg ;;
1317
1318  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1319  | --dataroo | --dataro | --datar)
1320    ac_prev=datarootdir ;;
1321  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1322  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1323    datarootdir=$ac_optarg ;;
1324
1325  -disable-* | --disable-*)
1326    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1327    # Reject names that are not valid shell variable names.
1328    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1329      as_fn_error $? "invalid feature name: $ac_useropt"
1330    ac_useropt_orig=$ac_useropt
1331    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1332    case $ac_user_opts in
1333      *"
1334"enable_$ac_useropt"
1335"*) ;;
1336      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1337	 ac_unrecognized_sep=', ';;
1338    esac
1339    eval enable_$ac_useropt=no ;;
1340
1341  -docdir | --docdir | --docdi | --doc | --do)
1342    ac_prev=docdir ;;
1343  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1344    docdir=$ac_optarg ;;
1345
1346  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1347    ac_prev=dvidir ;;
1348  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1349    dvidir=$ac_optarg ;;
1350
1351  -enable-* | --enable-*)
1352    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1353    # Reject names that are not valid shell variable names.
1354    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1355      as_fn_error $? "invalid feature name: $ac_useropt"
1356    ac_useropt_orig=$ac_useropt
1357    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1358    case $ac_user_opts in
1359      *"
1360"enable_$ac_useropt"
1361"*) ;;
1362      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1363	 ac_unrecognized_sep=', ';;
1364    esac
1365    eval enable_$ac_useropt=\$ac_optarg ;;
1366
1367  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1368  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1369  | --exec | --exe | --ex)
1370    ac_prev=exec_prefix ;;
1371  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1372  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1373  | --exec=* | --exe=* | --ex=*)
1374    exec_prefix=$ac_optarg ;;
1375
1376  -gas | --gas | --ga | --g)
1377    # Obsolete; use --with-gas.
1378    with_gas=yes ;;
1379
1380  -help | --help | --hel | --he | -h)
1381    ac_init_help=long ;;
1382  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1383    ac_init_help=recursive ;;
1384  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1385    ac_init_help=short ;;
1386
1387  -host | --host | --hos | --ho)
1388    ac_prev=host_alias ;;
1389  -host=* | --host=* | --hos=* | --ho=*)
1390    host_alias=$ac_optarg ;;
1391
1392  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1393    ac_prev=htmldir ;;
1394  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1395  | --ht=*)
1396    htmldir=$ac_optarg ;;
1397
1398  -includedir | --includedir | --includedi | --included | --include \
1399  | --includ | --inclu | --incl | --inc)
1400    ac_prev=includedir ;;
1401  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1402  | --includ=* | --inclu=* | --incl=* | --inc=*)
1403    includedir=$ac_optarg ;;
1404
1405  -infodir | --infodir | --infodi | --infod | --info | --inf)
1406    ac_prev=infodir ;;
1407  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1408    infodir=$ac_optarg ;;
1409
1410  -libdir | --libdir | --libdi | --libd)
1411    ac_prev=libdir ;;
1412  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1413    libdir=$ac_optarg ;;
1414
1415  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1416  | --libexe | --libex | --libe)
1417    ac_prev=libexecdir ;;
1418  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1419  | --libexe=* | --libex=* | --libe=*)
1420    libexecdir=$ac_optarg ;;
1421
1422  -localedir | --localedir | --localedi | --localed | --locale)
1423    ac_prev=localedir ;;
1424  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1425    localedir=$ac_optarg ;;
1426
1427  -localstatedir | --localstatedir | --localstatedi | --localstated \
1428  | --localstate | --localstat | --localsta | --localst | --locals)
1429    ac_prev=localstatedir ;;
1430  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1431  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1432    localstatedir=$ac_optarg ;;
1433
1434  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1435    ac_prev=mandir ;;
1436  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1437    mandir=$ac_optarg ;;
1438
1439  -nfp | --nfp | --nf)
1440    # Obsolete; use --without-fp.
1441    with_fp=no ;;
1442
1443  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1444  | --no-cr | --no-c | -n)
1445    no_create=yes ;;
1446
1447  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1448  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1449    no_recursion=yes ;;
1450
1451  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1452  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1453  | --oldin | --oldi | --old | --ol | --o)
1454    ac_prev=oldincludedir ;;
1455  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1456  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1457  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1458    oldincludedir=$ac_optarg ;;
1459
1460  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1461    ac_prev=prefix ;;
1462  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1463    prefix=$ac_optarg ;;
1464
1465  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1466  | --program-pre | --program-pr | --program-p)
1467    ac_prev=program_prefix ;;
1468  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1469  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1470    program_prefix=$ac_optarg ;;
1471
1472  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1473  | --program-suf | --program-su | --program-s)
1474    ac_prev=program_suffix ;;
1475  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1476  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1477    program_suffix=$ac_optarg ;;
1478
1479  -program-transform-name | --program-transform-name \
1480  | --program-transform-nam | --program-transform-na \
1481  | --program-transform-n | --program-transform- \
1482  | --program-transform | --program-transfor \
1483  | --program-transfo | --program-transf \
1484  | --program-trans | --program-tran \
1485  | --progr-tra | --program-tr | --program-t)
1486    ac_prev=program_transform_name ;;
1487  -program-transform-name=* | --program-transform-name=* \
1488  | --program-transform-nam=* | --program-transform-na=* \
1489  | --program-transform-n=* | --program-transform-=* \
1490  | --program-transform=* | --program-transfor=* \
1491  | --program-transfo=* | --program-transf=* \
1492  | --program-trans=* | --program-tran=* \
1493  | --progr-tra=* | --program-tr=* | --program-t=*)
1494    program_transform_name=$ac_optarg ;;
1495
1496  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1497    ac_prev=pdfdir ;;
1498  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1499    pdfdir=$ac_optarg ;;
1500
1501  -psdir | --psdir | --psdi | --psd | --ps)
1502    ac_prev=psdir ;;
1503  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1504    psdir=$ac_optarg ;;
1505
1506  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1507  | -silent | --silent | --silen | --sile | --sil)
1508    silent=yes ;;
1509
1510  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1511    ac_prev=sbindir ;;
1512  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1513  | --sbi=* | --sb=*)
1514    sbindir=$ac_optarg ;;
1515
1516  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1517  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1518  | --sharedst | --shareds | --shared | --share | --shar \
1519  | --sha | --sh)
1520    ac_prev=sharedstatedir ;;
1521  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1522  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1523  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1524  | --sha=* | --sh=*)
1525    sharedstatedir=$ac_optarg ;;
1526
1527  -site | --site | --sit)
1528    ac_prev=site ;;
1529  -site=* | --site=* | --sit=*)
1530    site=$ac_optarg ;;
1531
1532  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1533    ac_prev=srcdir ;;
1534  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1535    srcdir=$ac_optarg ;;
1536
1537  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1538  | --syscon | --sysco | --sysc | --sys | --sy)
1539    ac_prev=sysconfdir ;;
1540  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1541  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1542    sysconfdir=$ac_optarg ;;
1543
1544  -target | --target | --targe | --targ | --tar | --ta | --t)
1545    ac_prev=target_alias ;;
1546  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1547    target_alias=$ac_optarg ;;
1548
1549  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1550    verbose=yes ;;
1551
1552  -version | --version | --versio | --versi | --vers | -V)
1553    ac_init_version=: ;;
1554
1555  -with-* | --with-*)
1556    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1557    # Reject names that are not valid shell variable names.
1558    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1559      as_fn_error $? "invalid package name: $ac_useropt"
1560    ac_useropt_orig=$ac_useropt
1561    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1562    case $ac_user_opts in
1563      *"
1564"with_$ac_useropt"
1565"*) ;;
1566      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1567	 ac_unrecognized_sep=', ';;
1568    esac
1569    eval with_$ac_useropt=\$ac_optarg ;;
1570
1571  -without-* | --without-*)
1572    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1573    # Reject names that are not valid shell variable names.
1574    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1575      as_fn_error $? "invalid package name: $ac_useropt"
1576    ac_useropt_orig=$ac_useropt
1577    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1578    case $ac_user_opts in
1579      *"
1580"with_$ac_useropt"
1581"*) ;;
1582      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1583	 ac_unrecognized_sep=', ';;
1584    esac
1585    eval with_$ac_useropt=no ;;
1586
1587  --x)
1588    # Obsolete; use --with-x.
1589    with_x=yes ;;
1590
1591  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1592  | --x-incl | --x-inc | --x-in | --x-i)
1593    ac_prev=x_includes ;;
1594  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1595  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1596    x_includes=$ac_optarg ;;
1597
1598  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1599  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1600    ac_prev=x_libraries ;;
1601  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1602  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1603    x_libraries=$ac_optarg ;;
1604
1605  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1606Try \`$0 --help' for more information"
1607    ;;
1608
1609  *=*)
1610    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1611    # Reject names that are not valid shell variable names.
1612    case $ac_envvar in #(
1613      '' | [0-9]* | *[!_$as_cr_alnum]* )
1614      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1615    esac
1616    eval $ac_envvar=\$ac_optarg
1617    export $ac_envvar ;;
1618
1619  *)
1620    # FIXME: should be removed in autoconf 3.0.
1621    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1622    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1623      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1624    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1625    ;;
1626
1627  esac
1628done
1629
1630if test -n "$ac_prev"; then
1631  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1632  as_fn_error $? "missing argument to $ac_option"
1633fi
1634
1635if test -n "$ac_unrecognized_opts"; then
1636  case $enable_option_checking in
1637    no) ;;
1638    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1639    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1640  esac
1641fi
1642
1643# Check all directory arguments for consistency.
1644for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1645		datadir sysconfdir sharedstatedir localstatedir includedir \
1646		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1647		libdir localedir mandir
1648do
1649  eval ac_val=\$$ac_var
1650  # Remove trailing slashes.
1651  case $ac_val in
1652    */ )
1653      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1654      eval $ac_var=\$ac_val;;
1655  esac
1656  # Be sure to have absolute directory names.
1657  case $ac_val in
1658    [\\/$]* | ?:[\\/]* )  continue;;
1659    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1660  esac
1661  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1662done
1663
1664# There might be people who depend on the old broken behavior: `$host'
1665# used to hold the argument of --host etc.
1666# FIXME: To remove some day.
1667build=$build_alias
1668host=$host_alias
1669target=$target_alias
1670
1671# FIXME: To remove some day.
1672if test "x$host_alias" != x; then
1673  if test "x$build_alias" = x; then
1674    cross_compiling=maybe
1675  elif test "x$build_alias" != "x$host_alias"; then
1676    cross_compiling=yes
1677  fi
1678fi
1679
1680ac_tool_prefix=
1681test -n "$host_alias" && ac_tool_prefix=$host_alias-
1682
1683test "$silent" = yes && exec 6>/dev/null
1684
1685
1686ac_pwd=`pwd` && test -n "$ac_pwd" &&
1687ac_ls_di=`ls -di .` &&
1688ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1689  as_fn_error $? "working directory cannot be determined"
1690test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1691  as_fn_error $? "pwd does not report name of working directory"
1692
1693
1694# Find the source files, if location was not specified.
1695if test -z "$srcdir"; then
1696  ac_srcdir_defaulted=yes
1697  # Try the directory containing this script, then the parent directory.
1698  ac_confdir=`$as_dirname -- "$as_myself" ||
1699$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1700	 X"$as_myself" : 'X\(//\)[^/]' \| \
1701	 X"$as_myself" : 'X\(//\)$' \| \
1702	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1703$as_echo X"$as_myself" |
1704    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1705	    s//\1/
1706	    q
1707	  }
1708	  /^X\(\/\/\)[^/].*/{
1709	    s//\1/
1710	    q
1711	  }
1712	  /^X\(\/\/\)$/{
1713	    s//\1/
1714	    q
1715	  }
1716	  /^X\(\/\).*/{
1717	    s//\1/
1718	    q
1719	  }
1720	  s/.*/./; q'`
1721  srcdir=$ac_confdir
1722  if test ! -r "$srcdir/$ac_unique_file"; then
1723    srcdir=..
1724  fi
1725else
1726  ac_srcdir_defaulted=no
1727fi
1728if test ! -r "$srcdir/$ac_unique_file"; then
1729  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1730  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1731fi
1732ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1733ac_abs_confdir=`(
1734	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1735	pwd)`
1736# When building in place, set srcdir=.
1737if test "$ac_abs_confdir" = "$ac_pwd"; then
1738  srcdir=.
1739fi
1740# Remove unnecessary trailing slashes from srcdir.
1741# Double slashes in file names in object file debugging info
1742# mess up M-x gdb in Emacs.
1743case $srcdir in
1744*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1745esac
1746for ac_var in $ac_precious_vars; do
1747  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1748  eval ac_env_${ac_var}_value=\$${ac_var}
1749  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1750  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1751done
1752
1753#
1754# Report the --help message.
1755#
1756if test "$ac_init_help" = "long"; then
1757  # Omit some internal or obsolete options to make the list less imposing.
1758  # This message is too long to be a string in the A/UX 3.1 sh.
1759  cat <<_ACEOF
1760\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1761
1762Usage: $0 [OPTION]... [VAR=VALUE]...
1763
1764To assign environment variables (e.g., CC, CFLAGS...), specify them as
1765VAR=VALUE.  See below for descriptions of some of the useful variables.
1766
1767Defaults for the options are specified in brackets.
1768
1769Configuration:
1770  -h, --help              display this help and exit
1771      --help=short        display options specific to this package
1772      --help=recursive    display the short help of all the included packages
1773  -V, --version           display version information and exit
1774  -q, --quiet, --silent   do not print \`checking ...' messages
1775      --cache-file=FILE   cache test results in FILE [disabled]
1776  -C, --config-cache      alias for \`--cache-file=config.cache'
1777  -n, --no-create         do not create output files
1778      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1779
1780Installation directories:
1781  --prefix=PREFIX         install architecture-independent files in PREFIX
1782                          [$ac_default_prefix]
1783  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1784                          [PREFIX]
1785
1786By default, \`make install' will install all the files in
1787\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1788an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1789for instance \`--prefix=\$HOME'.
1790
1791For better control, use the options below.
1792
1793Fine tuning of the installation directories:
1794  --bindir=DIR            user executables [EPREFIX/bin]
1795  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1796  --libexecdir=DIR        program executables [EPREFIX/libexec]
1797  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1798  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1799  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1800  --libdir=DIR            object code libraries [EPREFIX/lib]
1801  --includedir=DIR        C header files [PREFIX/include]
1802  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1803  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1804  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1805  --infodir=DIR           info documentation [DATAROOTDIR/info]
1806  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1807  --mandir=DIR            man documentation [DATAROOTDIR/man]
1808  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1809  --htmldir=DIR           html documentation [DOCDIR]
1810  --dvidir=DIR            dvi documentation [DOCDIR]
1811  --pdfdir=DIR            pdf documentation [DOCDIR]
1812  --psdir=DIR             ps documentation [DOCDIR]
1813_ACEOF
1814
1815  cat <<\_ACEOF
1816
1817X features:
1818  --x-includes=DIR    X include files are in DIR
1819  --x-libraries=DIR   X library files are in DIR
1820
1821System types:
1822  --build=BUILD     configure for building on BUILD [guessed]
1823  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1824  --target=TARGET   configure for building compilers for TARGET [HOST]
1825_ACEOF
1826fi
1827
1828if test -n "$ac_init_help"; then
1829  case $ac_init_help in
1830     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1831   esac
1832  cat <<\_ACEOF
1833
1834Optional Features:
1835  --disable-option-checking  ignore unrecognized --enable/--with options
1836  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1837  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1838  --enable-openjdk-only   suppress building custom source even if present
1839                          [disabled]
1840  --enable-debug          set the debug level to fastdebug (shorthand for
1841                          --with-debug-level=fastdebug) [disabled]
1842  --disable-headful       disable building headful support (graphical UI
1843                          support) [enabled]
1844  --enable-hotspot-test-in-build
1845                          run the Queens test after Hotspot build [disabled]
1846  --enable-unlimited-crypto
1847                          Enable unlimited crypto policy [disabled]
1848  --enable-rmiconnector-iiop
1849                          enable the JMX RMIConnector iiop transport
1850                          [disabled]
1851  --disable-debug-symbols disable generation of debug symbols [enabled]
1852  --disable-zip-debug-info
1853                          disable zipping of debug-info files [enabled]
1854  --disable-freetype-bundling
1855                          disable bundling of the freetype library with the
1856                          build result [enabled on Windows or when using
1857                          --with-freetype, disabled otherwise]
1858  --enable-sjavac         use sjavac to do fast incremental compiles
1859                          [disabled]
1860  --disable-precompiled-headers
1861                          disable using precompiled headers when compiling C++
1862                          [enabled]
1863  --enable-ccache         enable using ccache to speed up recompilations
1864                          [disabled]
1865
1866Optional Packages:
1867  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1868  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1869  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1870                          support it), e.g. --with-target-bits=32 [guessed]
1871  --with-custom-make-dir  Deprecated. Option is kept for backwards
1872                          compatibility and is ignored
1873  --with-jdk-variant      JDK variant to build (normal) [normal]
1874  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1875  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1876                          client, minimal1, kernel, zero, zeroshark, core)
1877                          [server]
1878  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1879                          optimized (HotSpot build only)) [release]
1880  --with-devkit           use this devkit for compilers, tools and resources
1881  --with-sys-root         alias for --with-sysroot for backwards compatability
1882  --with-sysroot          use this directory as sysroot
1883  --with-tools-dir        alias for --with-toolchain-path for backwards
1884                          compatibility
1885  --with-toolchain-path   prepend these directories when searching for
1886                          toolchain binaries (compilers etc)
1887  --with-extra-path       prepend these directories to the default path
1888  --with-sdk-name         use the platform SDK of the given name. [macosx]
1889  --with-conf-name        use this as the name of the configuration [generated
1890                          from important configuration options]
1891  --with-output-sync      set make output sync type if supported by make.
1892                          [recurse]
1893  --with-builddeps-conf   use this configuration file for the builddeps
1894  --with-builddeps-server download and use build dependencies from this server
1895                          url
1896  --with-builddeps-dir    store downloaded build dependencies here
1897                          [/localhome/builddeps]
1898  --with-builddeps-group  chgrp the downloaded build dependencies to this
1899                          group
1900  --with-cacerts-file     specify alternative cacerts file
1901  --with-milestone        Set milestone value for build [internal]
1902  --with-update-version   Set update version value for build [b00]
1903  --with-user-release-suffix
1904                          Add a custom string to the version string if build
1905                          number is not set.[username_builddateb00]
1906  --with-build-number     Set build number value for build [b00]
1907  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1908  --with-add-source-root  for each and every source directory, look in this
1909                          additional source root for the same directory; if it
1910                          exists and have files in it, include it in the build
1911  --with-override-source-root
1912                          for each and every source directory, look in this
1913                          override source root for the same directory; if it
1914                          exists, use that directory instead and ignore the
1915                          directory in the original source root
1916  --with-adds-and-overrides
1917                          use the subdirs 'adds' and 'overrides' in the
1918                          specified directory as add-source-root and
1919                          override-source-root
1920  --with-override-langtools
1921                          use this langtools dir for the build
1922  --with-override-corba   use this corba dir for the build
1923  --with-override-jaxp    use this jaxp dir for the build
1924  --with-override-jaxws   use this jaxws dir for the build
1925  --with-override-hotspot use this hotspot dir for the build
1926  --with-override-nashorn use this nashorn dir for the build
1927  --with-override-jdk     use this jdk dir for the build
1928  --with-import-hotspot   import hotspot binaries from this jdk image or
1929                          hotspot build dist dir instead of building from
1930                          source
1931  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1932                          to show possible values [platform dependent]
1933  --with-jtreg            Regression Test Harness [probed]
1934  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1935  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1936  --with-extra-ldflags    extra flags to be used when linking jdk
1937  --with-x                use the X Window System
1938  --with-cups             specify prefix directory for the cups package
1939                          (expecting the headers under PATH/include)
1940  --with-cups-include     specify directory for the cups include files
1941  --with-freetype         specify prefix directory for the freetype package
1942                          (expecting the libraries under PATH/lib and the
1943                          headers under PATH/include)
1944  --with-freetype-include specify directory for the freetype include files
1945  --with-freetype-lib     specify directory for the freetype library
1946  --with-freetype-src     specify directory with freetype sources to
1947                          automatically build the library (experimental,
1948                          Windows-only)
1949  --with-alsa             specify prefix directory for the alsa package
1950                          (expecting the libraries under PATH/lib and the
1951                          headers under PATH/include)
1952  --with-alsa-include     specify directory for the alsa include files
1953  --with-alsa-lib         specify directory for the alsa library
1954  --with-libjpeg          use libjpeg from build system or OpenJDK source
1955                          (system, bundled) [bundled]
1956  --with-giflib           use giflib from build system or OpenJDK source
1957                          (system, bundled) [bundled]
1958  --with-lcms             use lcms2 from build system or OpenJDK source
1959                          (system, bundled) [bundled]
1960  --with-libpng           use libpng from build system or OpenJDK source
1961                          (system, bundled) [bundled]
1962  --with-zlib             use zlib from build system or OpenJDK source
1963                          (system, bundled) [bundled]
1964  --with-stdc++lib=<static>,<dynamic>,<default>
1965                          force linking of the C++ runtime on Linux to either
1966                          static or dynamic, default is static with dynamic as
1967                          fallback
1968  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1969                          only) [probed]
1970  --with-dxsdk            Deprecated. Option is kept for backwards
1971                          compatibility and is ignored
1972  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-dxsdk-include    Deprecated. Option is kept for backwards
1975                          compatibility and is ignored
1976  --with-num-cores        number of cores in the build system, e.g.
1977                          --with-num-cores=8 [probed]
1978  --with-memory-size      memory (in MB) available in the build system, e.g.
1979                          --with-memory-size=1024 [probed]
1980  --with-jobs             number of parallel jobs to let make run [calculated
1981                          based on cores and memory]
1982  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1983                          invocations of boot JDK, overriding the default
1984                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1985                          -enableassertions"
1986  --with-sjavac-server-java
1987                          use this java binary for running the sjavac
1988                          background server [Boot JDK java]
1989  --with-ccache-dir       where to store ccache files [~/.ccache]
1990
1991Some influential environment variables:
1992  BASENAME    Override default value for BASENAME
1993  BASH        Override default value for BASH
1994  CAT         Override default value for CAT
1995  CHMOD       Override default value for CHMOD
1996  CMP         Override default value for CMP
1997  COMM        Override default value for COMM
1998  CP          Override default value for CP
1999  CUT         Override default value for CUT
2000  DATE        Override default value for DATE
2001  DIFF        Override default value for DIFF
2002  DIRNAME     Override default value for DIRNAME
2003  ECHO        Override default value for ECHO
2004  EXPR        Override default value for EXPR
2005  FILE        Override default value for FILE
2006  FIND        Override default value for FIND
2007  HEAD        Override default value for HEAD
2008  LN          Override default value for LN
2009  LS          Override default value for LS
2010  MKDIR       Override default value for MKDIR
2011  MKTEMP      Override default value for MKTEMP
2012  MV          Override default value for MV
2013  NAWK        Override default value for NAWK
2014  PRINTF      Override default value for PRINTF
2015  RM          Override default value for RM
2016  SH          Override default value for SH
2017  SORT        Override default value for SORT
2018  TAIL        Override default value for TAIL
2019  TAR         Override default value for TAR
2020  TEE         Override default value for TEE
2021  TOUCH       Override default value for TOUCH
2022  TR          Override default value for TR
2023  UNAME       Override default value for UNAME
2024  UNIQ        Override default value for UNIQ
2025  WC          Override default value for WC
2026  WHICH       Override default value for WHICH
2027  XARGS       Override default value for XARGS
2028  AWK         Override default value for AWK
2029  GREP        Override default value for GREP
2030  EGREP       Override default value for EGREP
2031  FGREP       Override default value for FGREP
2032  SED         Override default value for SED
2033  CYGPATH     Override default value for CYGPATH
2034  READLINK    Override default value for READLINK
2035  DF          Override default value for DF
2036  SETFILE     Override default value for SETFILE
2037  CPIO        Override default value for CPIO
2038  UNZIP       Override default value for UNZIP
2039  ZIP         Override default value for ZIP
2040  LDD         Override default value for LDD
2041  OTOOL       Override default value for OTOOL
2042  READELF     Override default value for READELF
2043  HG          Override default value for HG
2044  STAT        Override default value for STAT
2045  TIME        Override default value for TIME
2046  DSYMUTIL    Override default value for DSYMUTIL
2047  XATTR       Override default value for XATTR
2048  CODESIGN    Override default value for CODESIGN
2049  PKG_CONFIG  path to pkg-config utility
2050  JAVA        Override default value for JAVA
2051  JAVAC       Override default value for JAVAC
2052  JAVAH       Override default value for JAVAH
2053  JAR         Override default value for JAR
2054  NATIVE2ASCII
2055              Override default value for NATIVE2ASCII
2056  JARSIGNER   Override default value for JARSIGNER
2057  CC          C compiler command
2058  CFLAGS      C compiler flags
2059  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2060              nonstandard directory <lib dir>
2061  LIBS        libraries to pass to the linker, e.g. -l<library>
2062  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2063              you have headers in a nonstandard directory <include dir>
2064  CXX         C++ compiler command
2065  CXXFLAGS    C++ compiler flags
2066  CPP         C preprocessor
2067  CXXCPP      C++ preprocessor
2068  AS          Override default value for AS
2069  AR          Override default value for AR
2070  OBJC        Objective C compiler command
2071  OBJCFLAGS   Objective C compiler flags
2072  LIPO        Override default value for LIPO
2073  STRIP       Override default value for STRIP
2074  NM          Override default value for NM
2075  GNM         Override default value for GNM
2076  MCS         Override default value for MCS
2077  OBJCOPY     Override default value for OBJCOPY
2078  OBJDUMP     Override default value for OBJDUMP
2079  BUILD_CC    Override default value for BUILD_CC
2080  BUILD_CXX   Override default value for BUILD_CXX
2081  BUILD_LD    Override default value for BUILD_LD
2082  JTREGEXE    Override default value for JTREGEXE
2083  XMKMF       Path to xmkmf, Makefile generator for X Window System
2084  FREETYPE_CFLAGS
2085              C compiler flags for FREETYPE, overriding pkg-config
2086  FREETYPE_LIBS
2087              linker flags for FREETYPE, overriding pkg-config
2088  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2089  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2090  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2091  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2092  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2093  PNG_LIBS    linker flags for PNG, overriding pkg-config
2094  LIBFFI_CFLAGS
2095              C compiler flags for LIBFFI, overriding pkg-config
2096  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2097  CCACHE      Override default value for CCACHE
2098
2099Use these variables to override the choices made by `configure' or to help
2100it to find libraries and programs with nonstandard names/locations.
2101
2102Report bugs to <build-dev@openjdk.java.net>.
2103OpenJDK home page: <http://openjdk.java.net>.
2104_ACEOF
2105ac_status=$?
2106fi
2107
2108if test "$ac_init_help" = "recursive"; then
2109  # If there are subdirs, report their specific --help.
2110  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2111    test -d "$ac_dir" ||
2112      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2113      continue
2114    ac_builddir=.
2115
2116case "$ac_dir" in
2117.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2118*)
2119  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2120  # A ".." for each directory in $ac_dir_suffix.
2121  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2122  case $ac_top_builddir_sub in
2123  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2124  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2125  esac ;;
2126esac
2127ac_abs_top_builddir=$ac_pwd
2128ac_abs_builddir=$ac_pwd$ac_dir_suffix
2129# for backward compatibility:
2130ac_top_builddir=$ac_top_build_prefix
2131
2132case $srcdir in
2133  .)  # We are building in place.
2134    ac_srcdir=.
2135    ac_top_srcdir=$ac_top_builddir_sub
2136    ac_abs_top_srcdir=$ac_pwd ;;
2137  [\\/]* | ?:[\\/]* )  # Absolute name.
2138    ac_srcdir=$srcdir$ac_dir_suffix;
2139    ac_top_srcdir=$srcdir
2140    ac_abs_top_srcdir=$srcdir ;;
2141  *) # Relative name.
2142    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2143    ac_top_srcdir=$ac_top_build_prefix$srcdir
2144    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2145esac
2146ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2147
2148    cd "$ac_dir" || { ac_status=$?; continue; }
2149    # Check for guested configure.
2150    if test -f "$ac_srcdir/configure.gnu"; then
2151      echo &&
2152      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2153    elif test -f "$ac_srcdir/configure"; then
2154      echo &&
2155      $SHELL "$ac_srcdir/configure" --help=recursive
2156    else
2157      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2158    fi || ac_status=$?
2159    cd "$ac_pwd" || { ac_status=$?; break; }
2160  done
2161fi
2162
2163test -n "$ac_init_help" && exit $ac_status
2164if $ac_init_version; then
2165  cat <<\_ACEOF
2166OpenJDK configure jdk9
2167generated by GNU Autoconf 2.69
2168
2169Copyright (C) 2012 Free Software Foundation, Inc.
2170This configure script is free software; the Free Software Foundation
2171gives unlimited permission to copy, distribute and modify it.
2172_ACEOF
2173  exit
2174fi
2175
2176## ------------------------ ##
2177## Autoconf initialization. ##
2178## ------------------------ ##
2179
2180# ac_fn_c_try_compile LINENO
2181# --------------------------
2182# Try to compile conftest.$ac_ext, and return whether this succeeded.
2183ac_fn_c_try_compile ()
2184{
2185  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186  rm -f conftest.$ac_objext
2187  if { { ac_try="$ac_compile"
2188case "(($ac_try" in
2189  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2190  *) ac_try_echo=$ac_try;;
2191esac
2192eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2193$as_echo "$ac_try_echo"; } >&5
2194  (eval "$ac_compile") 2>conftest.err
2195  ac_status=$?
2196  if test -s conftest.err; then
2197    grep -v '^ *+' conftest.err >conftest.er1
2198    cat conftest.er1 >&5
2199    mv -f conftest.er1 conftest.err
2200  fi
2201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2202  test $ac_status = 0; } && {
2203	 test -z "$ac_c_werror_flag" ||
2204	 test ! -s conftest.err
2205       } && test -s conftest.$ac_objext; then :
2206  ac_retval=0
2207else
2208  $as_echo "$as_me: failed program was:" >&5
2209sed 's/^/| /' conftest.$ac_ext >&5
2210
2211	ac_retval=1
2212fi
2213  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2214  as_fn_set_status $ac_retval
2215
2216} # ac_fn_c_try_compile
2217
2218# ac_fn_cxx_try_compile LINENO
2219# ----------------------------
2220# Try to compile conftest.$ac_ext, and return whether this succeeded.
2221ac_fn_cxx_try_compile ()
2222{
2223  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224  rm -f conftest.$ac_objext
2225  if { { ac_try="$ac_compile"
2226case "(($ac_try" in
2227  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2228  *) ac_try_echo=$ac_try;;
2229esac
2230eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2231$as_echo "$ac_try_echo"; } >&5
2232  (eval "$ac_compile") 2>conftest.err
2233  ac_status=$?
2234  if test -s conftest.err; then
2235    grep -v '^ *+' conftest.err >conftest.er1
2236    cat conftest.er1 >&5
2237    mv -f conftest.er1 conftest.err
2238  fi
2239  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2240  test $ac_status = 0; } && {
2241	 test -z "$ac_cxx_werror_flag" ||
2242	 test ! -s conftest.err
2243       } && test -s conftest.$ac_objext; then :
2244  ac_retval=0
2245else
2246  $as_echo "$as_me: failed program was:" >&5
2247sed 's/^/| /' conftest.$ac_ext >&5
2248
2249	ac_retval=1
2250fi
2251  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2252  as_fn_set_status $ac_retval
2253
2254} # ac_fn_cxx_try_compile
2255
2256# ac_fn_c_try_cpp LINENO
2257# ----------------------
2258# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2259ac_fn_c_try_cpp ()
2260{
2261  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2262  if { { ac_try="$ac_cpp conftest.$ac_ext"
2263case "(($ac_try" in
2264  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2265  *) ac_try_echo=$ac_try;;
2266esac
2267eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2268$as_echo "$ac_try_echo"; } >&5
2269  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2270  ac_status=$?
2271  if test -s conftest.err; then
2272    grep -v '^ *+' conftest.err >conftest.er1
2273    cat conftest.er1 >&5
2274    mv -f conftest.er1 conftest.err
2275  fi
2276  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2277  test $ac_status = 0; } > conftest.i && {
2278	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2279	 test ! -s conftest.err
2280       }; then :
2281  ac_retval=0
2282else
2283  $as_echo "$as_me: failed program was:" >&5
2284sed 's/^/| /' conftest.$ac_ext >&5
2285
2286    ac_retval=1
2287fi
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289  as_fn_set_status $ac_retval
2290
2291} # ac_fn_c_try_cpp
2292
2293# ac_fn_cxx_try_cpp LINENO
2294# ------------------------
2295# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2296ac_fn_cxx_try_cpp ()
2297{
2298  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2299  if { { ac_try="$ac_cpp conftest.$ac_ext"
2300case "(($ac_try" in
2301  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2302  *) ac_try_echo=$ac_try;;
2303esac
2304eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2305$as_echo "$ac_try_echo"; } >&5
2306  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2307  ac_status=$?
2308  if test -s conftest.err; then
2309    grep -v '^ *+' conftest.err >conftest.er1
2310    cat conftest.er1 >&5
2311    mv -f conftest.er1 conftest.err
2312  fi
2313  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2314  test $ac_status = 0; } > conftest.i && {
2315	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2316	 test ! -s conftest.err
2317       }; then :
2318  ac_retval=0
2319else
2320  $as_echo "$as_me: failed program was:" >&5
2321sed 's/^/| /' conftest.$ac_ext >&5
2322
2323    ac_retval=1
2324fi
2325  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2326  as_fn_set_status $ac_retval
2327
2328} # ac_fn_cxx_try_cpp
2329
2330# ac_fn_objc_try_compile LINENO
2331# -----------------------------
2332# Try to compile conftest.$ac_ext, and return whether this succeeded.
2333ac_fn_objc_try_compile ()
2334{
2335  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2336  rm -f conftest.$ac_objext
2337  if { { ac_try="$ac_compile"
2338case "(($ac_try" in
2339  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2340  *) ac_try_echo=$ac_try;;
2341esac
2342eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2343$as_echo "$ac_try_echo"; } >&5
2344  (eval "$ac_compile") 2>conftest.err
2345  ac_status=$?
2346  if test -s conftest.err; then
2347    grep -v '^ *+' conftest.err >conftest.er1
2348    cat conftest.er1 >&5
2349    mv -f conftest.er1 conftest.err
2350  fi
2351  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2352  test $ac_status = 0; } && {
2353	 test -z "$ac_objc_werror_flag" ||
2354	 test ! -s conftest.err
2355       } && test -s conftest.$ac_objext; then :
2356  ac_retval=0
2357else
2358  $as_echo "$as_me: failed program was:" >&5
2359sed 's/^/| /' conftest.$ac_ext >&5
2360
2361	ac_retval=1
2362fi
2363  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364  as_fn_set_status $ac_retval
2365
2366} # ac_fn_objc_try_compile
2367
2368# ac_fn_c_try_link LINENO
2369# -----------------------
2370# Try to link conftest.$ac_ext, and return whether this succeeded.
2371ac_fn_c_try_link ()
2372{
2373  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374  rm -f conftest.$ac_objext conftest$ac_exeext
2375  if { { ac_try="$ac_link"
2376case "(($ac_try" in
2377  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2378  *) ac_try_echo=$ac_try;;
2379esac
2380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2381$as_echo "$ac_try_echo"; } >&5
2382  (eval "$ac_link") 2>conftest.err
2383  ac_status=$?
2384  if test -s conftest.err; then
2385    grep -v '^ *+' conftest.err >conftest.er1
2386    cat conftest.er1 >&5
2387    mv -f conftest.er1 conftest.err
2388  fi
2389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2390  test $ac_status = 0; } && {
2391	 test -z "$ac_c_werror_flag" ||
2392	 test ! -s conftest.err
2393       } && test -s conftest$ac_exeext && {
2394	 test "$cross_compiling" = yes ||
2395	 test -x conftest$ac_exeext
2396       }; then :
2397  ac_retval=0
2398else
2399  $as_echo "$as_me: failed program was:" >&5
2400sed 's/^/| /' conftest.$ac_ext >&5
2401
2402	ac_retval=1
2403fi
2404  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2405  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2406  # interfere with the next link command; also delete a directory that is
2407  # left behind by Apple's compiler.  We do this before executing the actions.
2408  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2409  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2410  as_fn_set_status $ac_retval
2411
2412} # ac_fn_c_try_link
2413
2414# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2415# ---------------------------------------------------------
2416# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2417# the include files in INCLUDES and setting the cache variable VAR
2418# accordingly.
2419ac_fn_cxx_check_header_mongrel ()
2420{
2421  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422  if eval \${$3+:} false; then :
2423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2424$as_echo_n "checking for $2... " >&6; }
2425if eval \${$3+:} false; then :
2426  $as_echo_n "(cached) " >&6
2427fi
2428eval ac_res=\$$3
2429	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2430$as_echo "$ac_res" >&6; }
2431else
2432  # Is the header compilable?
2433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2434$as_echo_n "checking $2 usability... " >&6; }
2435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2436/* end confdefs.h.  */
2437$4
2438#include <$2>
2439_ACEOF
2440if ac_fn_cxx_try_compile "$LINENO"; then :
2441  ac_header_compiler=yes
2442else
2443  ac_header_compiler=no
2444fi
2445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2447$as_echo "$ac_header_compiler" >&6; }
2448
2449# Is the header present?
2450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2451$as_echo_n "checking $2 presence... " >&6; }
2452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2453/* end confdefs.h.  */
2454#include <$2>
2455_ACEOF
2456if ac_fn_cxx_try_cpp "$LINENO"; then :
2457  ac_header_preproc=yes
2458else
2459  ac_header_preproc=no
2460fi
2461rm -f conftest.err conftest.i conftest.$ac_ext
2462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2463$as_echo "$ac_header_preproc" >&6; }
2464
2465# So?  What about this header?
2466case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2467  yes:no: )
2468    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2469$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2471$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2472    ;;
2473  no:yes:* )
2474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2475$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2477$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2479$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2481$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2483$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2484( $as_echo "## ----------------------------------------- ##
2485## Report this to build-dev@openjdk.java.net ##
2486## ----------------------------------------- ##"
2487     ) | sed "s/^/$as_me: WARNING:     /" >&2
2488    ;;
2489esac
2490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2491$as_echo_n "checking for $2... " >&6; }
2492if eval \${$3+:} false; then :
2493  $as_echo_n "(cached) " >&6
2494else
2495  eval "$3=\$ac_header_compiler"
2496fi
2497eval ac_res=\$$3
2498	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2499$as_echo "$ac_res" >&6; }
2500fi
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502
2503} # ac_fn_cxx_check_header_mongrel
2504
2505# ac_fn_cxx_try_run LINENO
2506# ------------------------
2507# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2508# that executables *can* be run.
2509ac_fn_cxx_try_run ()
2510{
2511  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2512  if { { ac_try="$ac_link"
2513case "(($ac_try" in
2514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2515  *) ac_try_echo=$ac_try;;
2516esac
2517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2518$as_echo "$ac_try_echo"; } >&5
2519  (eval "$ac_link") 2>&5
2520  ac_status=$?
2521  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2522  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2523  { { case "(($ac_try" in
2524  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2525  *) ac_try_echo=$ac_try;;
2526esac
2527eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2528$as_echo "$ac_try_echo"; } >&5
2529  (eval "$ac_try") 2>&5
2530  ac_status=$?
2531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2532  test $ac_status = 0; }; }; then :
2533  ac_retval=0
2534else
2535  $as_echo "$as_me: program exited with status $ac_status" >&5
2536       $as_echo "$as_me: failed program was:" >&5
2537sed 's/^/| /' conftest.$ac_ext >&5
2538
2539       ac_retval=$ac_status
2540fi
2541  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2542  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2543  as_fn_set_status $ac_retval
2544
2545} # ac_fn_cxx_try_run
2546
2547# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2548# ---------------------------------------------------------
2549# Tests whether HEADER exists and can be compiled using the include files in
2550# INCLUDES, setting the cache variable VAR accordingly.
2551ac_fn_cxx_check_header_compile ()
2552{
2553  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2555$as_echo_n "checking for $2... " >&6; }
2556if eval \${$3+:} false; then :
2557  $as_echo_n "(cached) " >&6
2558else
2559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560/* end confdefs.h.  */
2561$4
2562#include <$2>
2563_ACEOF
2564if ac_fn_cxx_try_compile "$LINENO"; then :
2565  eval "$3=yes"
2566else
2567  eval "$3=no"
2568fi
2569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2570fi
2571eval ac_res=\$$3
2572	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2573$as_echo "$ac_res" >&6; }
2574  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2575
2576} # ac_fn_cxx_check_header_compile
2577
2578# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2579# ----------------------------------------------
2580# Tries to find the compile-time value of EXPR in a program that includes
2581# INCLUDES, setting VAR accordingly. Returns whether the value could be
2582# computed
2583ac_fn_cxx_compute_int ()
2584{
2585  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586  if test "$cross_compiling" = yes; then
2587    # Depending upon the size, compute the lo and hi bounds.
2588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2589/* end confdefs.h.  */
2590$4
2591int
2592main ()
2593{
2594static int test_array [1 - 2 * !(($2) >= 0)];
2595test_array [0] = 0;
2596return test_array [0];
2597
2598  ;
2599  return 0;
2600}
2601_ACEOF
2602if ac_fn_cxx_try_compile "$LINENO"; then :
2603  ac_lo=0 ac_mid=0
2604  while :; do
2605    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608int
2609main ()
2610{
2611static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2612test_array [0] = 0;
2613return test_array [0];
2614
2615  ;
2616  return 0;
2617}
2618_ACEOF
2619if ac_fn_cxx_try_compile "$LINENO"; then :
2620  ac_hi=$ac_mid; break
2621else
2622  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2623			if test $ac_lo -le $ac_mid; then
2624			  ac_lo= ac_hi=
2625			  break
2626			fi
2627			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2628fi
2629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2630  done
2631else
2632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2633/* end confdefs.h.  */
2634$4
2635int
2636main ()
2637{
2638static int test_array [1 - 2 * !(($2) < 0)];
2639test_array [0] = 0;
2640return test_array [0];
2641
2642  ;
2643  return 0;
2644}
2645_ACEOF
2646if ac_fn_cxx_try_compile "$LINENO"; then :
2647  ac_hi=-1 ac_mid=-1
2648  while :; do
2649    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2650/* end confdefs.h.  */
2651$4
2652int
2653main ()
2654{
2655static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2656test_array [0] = 0;
2657return test_array [0];
2658
2659  ;
2660  return 0;
2661}
2662_ACEOF
2663if ac_fn_cxx_try_compile "$LINENO"; then :
2664  ac_lo=$ac_mid; break
2665else
2666  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2667			if test $ac_mid -le $ac_hi; then
2668			  ac_lo= ac_hi=
2669			  break
2670			fi
2671			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2672fi
2673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2674  done
2675else
2676  ac_lo= ac_hi=
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681# Binary search between lo and hi bounds.
2682while test "x$ac_lo" != "x$ac_hi"; do
2683  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2685/* end confdefs.h.  */
2686$4
2687int
2688main ()
2689{
2690static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2691test_array [0] = 0;
2692return test_array [0];
2693
2694  ;
2695  return 0;
2696}
2697_ACEOF
2698if ac_fn_cxx_try_compile "$LINENO"; then :
2699  ac_hi=$ac_mid
2700else
2701  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2702fi
2703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2704done
2705case $ac_lo in #((
2706?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2707'') ac_retval=1 ;;
2708esac
2709  else
2710    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2711/* end confdefs.h.  */
2712$4
2713static long int longval () { return $2; }
2714static unsigned long int ulongval () { return $2; }
2715#include <stdio.h>
2716#include <stdlib.h>
2717int
2718main ()
2719{
2720
2721  FILE *f = fopen ("conftest.val", "w");
2722  if (! f)
2723    return 1;
2724  if (($2) < 0)
2725    {
2726      long int i = longval ();
2727      if (i != ($2))
2728	return 1;
2729      fprintf (f, "%ld", i);
2730    }
2731  else
2732    {
2733      unsigned long int i = ulongval ();
2734      if (i != ($2))
2735	return 1;
2736      fprintf (f, "%lu", i);
2737    }
2738  /* Do not output a trailing newline, as this causes \r\n confusion
2739     on some platforms.  */
2740  return ferror (f) || fclose (f) != 0;
2741
2742  ;
2743  return 0;
2744}
2745_ACEOF
2746if ac_fn_cxx_try_run "$LINENO"; then :
2747  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2748else
2749  ac_retval=1
2750fi
2751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2752  conftest.$ac_objext conftest.beam conftest.$ac_ext
2753rm -f conftest.val
2754
2755  fi
2756  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2757  as_fn_set_status $ac_retval
2758
2759} # ac_fn_cxx_compute_int
2760
2761# ac_fn_cxx_try_link LINENO
2762# -------------------------
2763# Try to link conftest.$ac_ext, and return whether this succeeded.
2764ac_fn_cxx_try_link ()
2765{
2766  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2767  rm -f conftest.$ac_objext conftest$ac_exeext
2768  if { { ac_try="$ac_link"
2769case "(($ac_try" in
2770  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2771  *) ac_try_echo=$ac_try;;
2772esac
2773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2774$as_echo "$ac_try_echo"; } >&5
2775  (eval "$ac_link") 2>conftest.err
2776  ac_status=$?
2777  if test -s conftest.err; then
2778    grep -v '^ *+' conftest.err >conftest.er1
2779    cat conftest.er1 >&5
2780    mv -f conftest.er1 conftest.err
2781  fi
2782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2783  test $ac_status = 0; } && {
2784	 test -z "$ac_cxx_werror_flag" ||
2785	 test ! -s conftest.err
2786       } && test -s conftest$ac_exeext && {
2787	 test "$cross_compiling" = yes ||
2788	 test -x conftest$ac_exeext
2789       }; then :
2790  ac_retval=0
2791else
2792  $as_echo "$as_me: failed program was:" >&5
2793sed 's/^/| /' conftest.$ac_ext >&5
2794
2795	ac_retval=1
2796fi
2797  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2798  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2799  # interfere with the next link command; also delete a directory that is
2800  # left behind by Apple's compiler.  We do this before executing the actions.
2801  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2802  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2803  as_fn_set_status $ac_retval
2804
2805} # ac_fn_cxx_try_link
2806
2807# ac_fn_cxx_check_func LINENO FUNC VAR
2808# ------------------------------------
2809# Tests whether FUNC exists, setting the cache variable VAR accordingly
2810ac_fn_cxx_check_func ()
2811{
2812  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2814$as_echo_n "checking for $2... " >&6; }
2815if eval \${$3+:} false; then :
2816  $as_echo_n "(cached) " >&6
2817else
2818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h.  */
2820/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2821   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2822#define $2 innocuous_$2
2823
2824/* System header to define __stub macros and hopefully few prototypes,
2825    which can conflict with char $2 (); below.
2826    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2827    <limits.h> exists even on freestanding compilers.  */
2828
2829#ifdef __STDC__
2830# include <limits.h>
2831#else
2832# include <assert.h>
2833#endif
2834
2835#undef $2
2836
2837/* Override any GCC internal prototype to avoid an error.
2838   Use char because int might match the return type of a GCC
2839   builtin and then its argument prototype would still apply.  */
2840#ifdef __cplusplus
2841extern "C"
2842#endif
2843char $2 ();
2844/* The GNU C library defines this for functions which it implements
2845    to always fail with ENOSYS.  Some functions are actually named
2846    something starting with __ and the normal name is an alias.  */
2847#if defined __stub_$2 || defined __stub___$2
2848choke me
2849#endif
2850
2851int
2852main ()
2853{
2854return $2 ();
2855  ;
2856  return 0;
2857}
2858_ACEOF
2859if ac_fn_cxx_try_link "$LINENO"; then :
2860  eval "$3=yes"
2861else
2862  eval "$3=no"
2863fi
2864rm -f core conftest.err conftest.$ac_objext \
2865    conftest$ac_exeext conftest.$ac_ext
2866fi
2867eval ac_res=\$$3
2868	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2869$as_echo "$ac_res" >&6; }
2870  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2871
2872} # ac_fn_cxx_check_func
2873
2874# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2875# -------------------------------------------------------
2876# Tests whether HEADER exists and can be compiled using the include files in
2877# INCLUDES, setting the cache variable VAR accordingly.
2878ac_fn_c_check_header_compile ()
2879{
2880  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2882$as_echo_n "checking for $2... " >&6; }
2883if eval \${$3+:} false; then :
2884  $as_echo_n "(cached) " >&6
2885else
2886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2887/* end confdefs.h.  */
2888$4
2889#include <$2>
2890_ACEOF
2891if ac_fn_c_try_compile "$LINENO"; then :
2892  eval "$3=yes"
2893else
2894  eval "$3=no"
2895fi
2896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2897fi
2898eval ac_res=\$$3
2899	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2900$as_echo "$ac_res" >&6; }
2901  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2902
2903} # ac_fn_c_check_header_compile
2904cat >config.log <<_ACEOF
2905This file contains any messages produced by compilers while
2906running configure, to aid debugging if configure makes a mistake.
2907
2908It was created by OpenJDK $as_me jdk9, which was
2909generated by GNU Autoconf 2.69.  Invocation command line was
2910
2911  $ $0 $@
2912
2913_ACEOF
2914exec 5>>config.log
2915{
2916cat <<_ASUNAME
2917## --------- ##
2918## Platform. ##
2919## --------- ##
2920
2921hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2922uname -m = `(uname -m) 2>/dev/null || echo unknown`
2923uname -r = `(uname -r) 2>/dev/null || echo unknown`
2924uname -s = `(uname -s) 2>/dev/null || echo unknown`
2925uname -v = `(uname -v) 2>/dev/null || echo unknown`
2926
2927/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2928/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2929
2930/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2931/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2932/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2933/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2934/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2935/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2936/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2937
2938_ASUNAME
2939
2940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2941for as_dir in $PATH
2942do
2943  IFS=$as_save_IFS
2944  test -z "$as_dir" && as_dir=.
2945    $as_echo "PATH: $as_dir"
2946  done
2947IFS=$as_save_IFS
2948
2949} >&5
2950
2951cat >&5 <<_ACEOF
2952
2953
2954## ----------- ##
2955## Core tests. ##
2956## ----------- ##
2957
2958_ACEOF
2959
2960
2961# Keep a trace of the command line.
2962# Strip out --no-create and --no-recursion so they do not pile up.
2963# Strip out --silent because we don't want to record it for future runs.
2964# Also quote any args containing shell meta-characters.
2965# Make two passes to allow for proper duplicate-argument suppression.
2966ac_configure_args=
2967ac_configure_args0=
2968ac_configure_args1=
2969ac_must_keep_next=false
2970for ac_pass in 1 2
2971do
2972  for ac_arg
2973  do
2974    case $ac_arg in
2975    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2976    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2977    | -silent | --silent | --silen | --sile | --sil)
2978      continue ;;
2979    *\'*)
2980      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2981    esac
2982    case $ac_pass in
2983    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2984    2)
2985      as_fn_append ac_configure_args1 " '$ac_arg'"
2986      if test $ac_must_keep_next = true; then
2987	ac_must_keep_next=false # Got value, back to normal.
2988      else
2989	case $ac_arg in
2990	  *=* | --config-cache | -C | -disable-* | --disable-* \
2991	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2992	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2993	  | -with-* | --with-* | -without-* | --without-* | --x)
2994	    case "$ac_configure_args0 " in
2995	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2996	    esac
2997	    ;;
2998	  -* ) ac_must_keep_next=true ;;
2999	esac
3000      fi
3001      as_fn_append ac_configure_args " '$ac_arg'"
3002      ;;
3003    esac
3004  done
3005done
3006{ ac_configure_args0=; unset ac_configure_args0;}
3007{ ac_configure_args1=; unset ac_configure_args1;}
3008
3009# When interrupted or exit'd, cleanup temporary files, and complete
3010# config.log.  We remove comments because anyway the quotes in there
3011# would cause problems or look ugly.
3012# WARNING: Use '\'' to represent an apostrophe within the trap.
3013# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3014trap 'exit_status=$?
3015  # Save into config.log some information that might help in debugging.
3016  {
3017    echo
3018
3019    $as_echo "## ---------------- ##
3020## Cache variables. ##
3021## ---------------- ##"
3022    echo
3023    # The following way of writing the cache mishandles newlines in values,
3024(
3025  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3026    eval ac_val=\$$ac_var
3027    case $ac_val in #(
3028    *${as_nl}*)
3029      case $ac_var in #(
3030      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3031$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3032      esac
3033      case $ac_var in #(
3034      _ | IFS | as_nl) ;; #(
3035      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3036      *) { eval $ac_var=; unset $ac_var;} ;;
3037      esac ;;
3038    esac
3039  done
3040  (set) 2>&1 |
3041    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3042    *${as_nl}ac_space=\ *)
3043      sed -n \
3044	"s/'\''/'\''\\\\'\'''\''/g;
3045	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3046      ;; #(
3047    *)
3048      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3049      ;;
3050    esac |
3051    sort
3052)
3053    echo
3054
3055    $as_echo "## ----------------- ##
3056## Output variables. ##
3057## ----------------- ##"
3058    echo
3059    for ac_var in $ac_subst_vars
3060    do
3061      eval ac_val=\$$ac_var
3062      case $ac_val in
3063      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3064      esac
3065      $as_echo "$ac_var='\''$ac_val'\''"
3066    done | sort
3067    echo
3068
3069    if test -n "$ac_subst_files"; then
3070      $as_echo "## ------------------- ##
3071## File substitutions. ##
3072## ------------------- ##"
3073      echo
3074      for ac_var in $ac_subst_files
3075      do
3076	eval ac_val=\$$ac_var
3077	case $ac_val in
3078	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3079	esac
3080	$as_echo "$ac_var='\''$ac_val'\''"
3081      done | sort
3082      echo
3083    fi
3084
3085    if test -s confdefs.h; then
3086      $as_echo "## ----------- ##
3087## confdefs.h. ##
3088## ----------- ##"
3089      echo
3090      cat confdefs.h
3091      echo
3092    fi
3093    test "$ac_signal" != 0 &&
3094      $as_echo "$as_me: caught signal $ac_signal"
3095    $as_echo "$as_me: exit $exit_status"
3096  } >&5
3097  rm -f core *.core core.conftest.* &&
3098    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3099    exit $exit_status
3100' 0
3101for ac_signal in 1 2 13 15; do
3102  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3103done
3104ac_signal=0
3105
3106# confdefs.h avoids OS command line length limits that DEFS can exceed.
3107rm -f -r conftest* confdefs.h
3108
3109$as_echo "/* confdefs.h */" > confdefs.h
3110
3111# Predefined preprocessor variables.
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_NAME "$PACKAGE_NAME"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_VERSION "$PACKAGE_VERSION"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_STRING "$PACKAGE_STRING"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3131_ACEOF
3132
3133cat >>confdefs.h <<_ACEOF
3134#define PACKAGE_URL "$PACKAGE_URL"
3135_ACEOF
3136
3137
3138# Let the site file select an alternate cache file if it wants to.
3139# Prefer an explicitly selected file to automatically selected ones.
3140ac_site_file1=NONE
3141ac_site_file2=NONE
3142if test -n "$CONFIG_SITE"; then
3143  # We do not want a PATH search for config.site.
3144  case $CONFIG_SITE in #((
3145    -*)  ac_site_file1=./$CONFIG_SITE;;
3146    */*) ac_site_file1=$CONFIG_SITE;;
3147    *)   ac_site_file1=./$CONFIG_SITE;;
3148  esac
3149elif test "x$prefix" != xNONE; then
3150  ac_site_file1=$prefix/share/config.site
3151  ac_site_file2=$prefix/etc/config.site
3152else
3153  ac_site_file1=$ac_default_prefix/share/config.site
3154  ac_site_file2=$ac_default_prefix/etc/config.site
3155fi
3156for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3157do
3158  test "x$ac_site_file" = xNONE && continue
3159  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3160    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3161$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3162    sed 's/^/| /' "$ac_site_file" >&5
3163    . "$ac_site_file" \
3164      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3166as_fn_error $? "failed to load site script $ac_site_file
3167See \`config.log' for more details" "$LINENO" 5; }
3168  fi
3169done
3170
3171if test -r "$cache_file"; then
3172  # Some versions of bash will fail to source /dev/null (special files
3173  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3174  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3175    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3176$as_echo "$as_me: loading cache $cache_file" >&6;}
3177    case $cache_file in
3178      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3179      *)                      . "./$cache_file";;
3180    esac
3181  fi
3182else
3183  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3184$as_echo "$as_me: creating cache $cache_file" >&6;}
3185  >$cache_file
3186fi
3187
3188# Check that the precious variables saved in the cache have kept the same
3189# value.
3190ac_cache_corrupted=false
3191for ac_var in $ac_precious_vars; do
3192  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3193  eval ac_new_set=\$ac_env_${ac_var}_set
3194  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3195  eval ac_new_val=\$ac_env_${ac_var}_value
3196  case $ac_old_set,$ac_new_set in
3197    set,)
3198      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3199$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3200      ac_cache_corrupted=: ;;
3201    ,set)
3202      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3203$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3204      ac_cache_corrupted=: ;;
3205    ,);;
3206    *)
3207      if test "x$ac_old_val" != "x$ac_new_val"; then
3208	# differences in whitespace do not lead to failure.
3209	ac_old_val_w=`echo x $ac_old_val`
3210	ac_new_val_w=`echo x $ac_new_val`
3211	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3212	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3213$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3214	  ac_cache_corrupted=:
3215	else
3216	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3217$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3218	  eval $ac_var=\$ac_old_val
3219	fi
3220	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3221$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3222	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3223$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3224      fi;;
3225  esac
3226  # Pass precious variables to config.status.
3227  if test "$ac_new_set" = set; then
3228    case $ac_new_val in
3229    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3230    *) ac_arg=$ac_var=$ac_new_val ;;
3231    esac
3232    case " $ac_configure_args " in
3233      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3234      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3235    esac
3236  fi
3237done
3238if $ac_cache_corrupted; then
3239  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3241  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3242$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3243  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3244fi
3245## -------------------- ##
3246## Main body of script. ##
3247## -------------------- ##
3248
3249ac_ext=c
3250ac_cpp='$CPP $CPPFLAGS'
3251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3253ac_compiler_gnu=$ac_cv_c_compiler_gnu
3254
3255
3256
3257ac_aux_dir=
3258for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3259  if test -f "$ac_dir/install-sh"; then
3260    ac_aux_dir=$ac_dir
3261    ac_install_sh="$ac_aux_dir/install-sh -c"
3262    break
3263  elif test -f "$ac_dir/install.sh"; then
3264    ac_aux_dir=$ac_dir
3265    ac_install_sh="$ac_aux_dir/install.sh -c"
3266    break
3267  elif test -f "$ac_dir/shtool"; then
3268    ac_aux_dir=$ac_dir
3269    ac_install_sh="$ac_aux_dir/shtool install -c"
3270    break
3271  fi
3272done
3273if test -z "$ac_aux_dir"; then
3274  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
3275fi
3276
3277# These three variables are undocumented and unsupported,
3278# and are intended to be withdrawn in a future Autoconf release.
3279# They can cause serious problems if a builder's source tree is in a directory
3280# whose full name contains unusual characters.
3281ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3282ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3283ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3284
3285
3286# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3287
3288#
3289# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3290# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3291#
3292# This code is free software; you can redistribute it and/or modify it
3293# under the terms of the GNU General Public License version 2 only, as
3294# published by the Free Software Foundation.  Oracle designates this
3295# particular file as subject to the "Classpath" exception as provided
3296# by Oracle in the LICENSE file that accompanied this code.
3297#
3298# This code is distributed in the hope that it will be useful, but WITHOUT
3299# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3300# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3301# version 2 for more details (a copy is included in the LICENSE file that
3302# accompanied this code).
3303#
3304# You should have received a copy of the GNU General Public License version
3305# 2 along with this work; if not, write to the Free Software Foundation,
3306# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3307#
3308# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3309# or visit www.oracle.com if you need additional information or have any
3310# questions.
3311#
3312
3313#
3314# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3315#
3316# This program is free software; you can redistribute it and/or modify
3317# it under the terms of the GNU General Public License as published by
3318# the Free Software Foundation; either version 2 of the License, or
3319# (at your option) any later version.
3320#
3321# This program is distributed in the hope that it will be useful, but
3322# WITHOUT ANY WARRANTY; without even the implied warranty of
3323# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3324# General Public License for more details.
3325#
3326# You should have received a copy of the GNU General Public License
3327# along with this program; if not, write to the Free Software
3328# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3329#
3330# As a special exception to the GNU General Public License, if you
3331# distribute this file as part of a program that contains a
3332# configuration script generated by Autoconf, you may include it under
3333# the same distribution terms that you use for the rest of that program.
3334
3335# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3336# ----------------------------------
3337# PKG_PROG_PKG_CONFIG
3338
3339# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3340#
3341# Check to see whether a particular set of modules exists.  Similar
3342# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3343#
3344#
3345# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3346# this or PKG_CHECK_MODULES is called, or make sure to call
3347# PKG_CHECK_EXISTS manually
3348# --------------------------------------------------------------
3349
3350
3351
3352# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3353# ---------------------------------------------
3354# _PKG_CONFIG
3355
3356# _PKG_SHORT_ERRORS_SUPPORTED
3357# -----------------------------
3358# _PKG_SHORT_ERRORS_SUPPORTED
3359
3360
3361# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3362# [ACTION-IF-NOT-FOUND])
3363#
3364#
3365# Note that if there is a possibility the first call to
3366# PKG_CHECK_MODULES might not happen, you should be sure to include an
3367# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3368#
3369#
3370# --------------------------------------------------------------
3371# PKG_CHECK_MODULES
3372
3373
3374# Include these first...
3375#
3376# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3377# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3378#
3379# This code is free software; you can redistribute it and/or modify it
3380# under the terms of the GNU General Public License version 2 only, as
3381# published by the Free Software Foundation.  Oracle designates this
3382# particular file as subject to the "Classpath" exception as provided
3383# by Oracle in the LICENSE file that accompanied this code.
3384#
3385# This code is distributed in the hope that it will be useful, but WITHOUT
3386# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3387# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3388# version 2 for more details (a copy is included in the LICENSE file that
3389# accompanied this code).
3390#
3391# You should have received a copy of the GNU General Public License version
3392# 2 along with this work; if not, write to the Free Software Foundation,
3393# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3394#
3395# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3396# or visit www.oracle.com if you need additional information or have any
3397# questions.
3398#
3399
3400# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3401# If so, then append $1 to $2 \
3402# Also set JVM_ARG_OK to true/false depending on outcome.
3403
3404
3405# Appends a string to a path variable, only adding the : when needed.
3406
3407
3408# Prepends a string to a path variable, only adding the : when needed.
3409
3410
3411# This will make sure the given variable points to a full and proper
3412# path. This means:
3413# 1) There will be no spaces in the path. On posix platforms,
3414#    spaces in the path will result in an error. On Windows,
3415#    the path will be rewritten using short-style to be space-free.
3416# 2) The path will be absolute, and it will be in unix-style (on
3417#     cygwin).
3418# $1: The name of the variable to fix
3419
3420
3421# This will make sure the given variable points to a executable
3422# with a full and proper path. This means:
3423# 1) There will be no spaces in the path. On posix platforms,
3424#    spaces in the path will result in an error. On Windows,
3425#    the path will be rewritten using short-style to be space-free.
3426# 2) The path will be absolute, and it will be in unix-style (on
3427#     cygwin).
3428# Any arguments given to the executable is preserved.
3429# If the input variable does not have a directory specification, then
3430# it need to be in the PATH.
3431# $1: The name of the variable to fix
3432
3433
3434
3435
3436# Register a --with argument but mark it as deprecated
3437# $1: The name of the with argument to deprecate, not including --with-
3438
3439
3440# Register a --enable argument but mark it as deprecated
3441# $1: The name of the with argument to deprecate, not including --enable-
3442# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3443
3444
3445
3446
3447# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3448# $1: variable to check
3449
3450
3451# Check that there are no unprocessed overridden variables left.
3452# If so, they are an incorrect argument and we will exit with an error.
3453
3454
3455# Setup a tool for the given variable. If correctly specified by the user,
3456# use that value, otherwise search for the tool using the supplied code snippet.
3457# $1: variable to set
3458# $2: code snippet to call to look for the tool
3459
3460
3461# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3462# $1: variable to set
3463# $2: executable name (or list of names) to look for
3464
3465
3466# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3467# $1: variable to set
3468# $2: executable name (or list of names) to look for
3469
3470
3471# Like BASIC_PATH_PROGS but fails if no tool was found.
3472# $1: variable to set
3473# $2: executable name (or list of names) to look for
3474
3475
3476# Like BASIC_SETUP_TOOL but fails if no tool was found.
3477# $1: variable to set
3478# $2: autoconf macro to call to look for the special tool
3479
3480
3481# Setup the most fundamental tools that relies on not much else to set up,
3482# but is used by much of the early bootstrap code.
3483
3484
3485# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495#%%% Simple tools %%%
3496
3497# Check if we have found a usable version of make
3498# $1: the path to a potential make binary (or empty)
3499# $2: the description on how we found this
3500
3501
3502
3503
3504# Goes looking for a usable version of GNU make.
3505
3506
3507
3508
3509
3510
3511# Check if build directory is on local disk. If not possible to determine,
3512# we prefer to claim it's local.
3513# Argument 1: directory to test
3514# Argument 2: what to do if it is on local disk
3515# Argument 3: what to do otherwise (remote disk or failure)
3516
3517
3518# Check that source files have basic read permissions set. This might
3519# not be the case in cygwin in certain conditions.
3520
3521
3522
3523
3524#
3525# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3526# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3527#
3528# This code is free software; you can redistribute it and/or modify it
3529# under the terms of the GNU General Public License version 2 only, as
3530# published by the Free Software Foundation.  Oracle designates this
3531# particular file as subject to the "Classpath" exception as provided
3532# by Oracle in the LICENSE file that accompanied this code.
3533#
3534# This code is distributed in the hope that it will be useful, but WITHOUT
3535# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3536# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3537# version 2 for more details (a copy is included in the LICENSE file that
3538# accompanied this code).
3539#
3540# You should have received a copy of the GNU General Public License version
3541# 2 along with this work; if not, write to the Free Software Foundation,
3542# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3543#
3544# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3545# or visit www.oracle.com if you need additional information or have any
3546# questions.
3547#
3548
3549
3550
3551
3552
3553# Helper function which possibly converts a path using DOS-style short mode.
3554# If so, the updated path is stored in $new_path.
3555# $1: The path to check
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# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3564# and could probably be heavily simplified. However, all changes in this
3565# area tend to need lot of testing in different scenarios, and in lack of
3566# proper unit testing, cleaning this up has not been deemed worth the effort
3567# at the moment.
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3578
3579
3580
3581
3582#
3583# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3584# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3585#
3586# This code is free software; you can redistribute it and/or modify it
3587# under the terms of the GNU General Public License version 2 only, as
3588# published by the Free Software Foundation.  Oracle designates this
3589# particular file as subject to the "Classpath" exception as provided
3590# by Oracle in the LICENSE file that accompanied this code.
3591#
3592# This code is distributed in the hope that it will be useful, but WITHOUT
3593# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3594# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3595# version 2 for more details (a copy is included in the LICENSE file that
3596# accompanied this code).
3597#
3598# You should have received a copy of the GNU General Public License version
3599# 2 along with this work; if not, write to the Free Software Foundation,
3600# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3601#
3602# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3603# or visit www.oracle.com if you need additional information or have any
3604# questions.
3605#
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617# ... then the rest
3618#
3619# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643########################################################################
3644# This file handles detection of the Boot JDK. The Boot JDK detection
3645# process has been developed as a response to solve a complex real-world
3646# problem. Initially, it was simple, but it has grown as platform after
3647# platform, idiosyncracy after idiosyncracy has been supported.
3648#
3649# The basic idea is this:
3650# 1) You need an acceptable *) JDK to use as a Boot JDK
3651# 2) There are several ways to locate a JDK, that are mostly platform
3652#    dependent **)
3653# 3) You can have multiple JDKs installed
3654# 4) If possible, configure should try to dig out an acceptable JDK
3655#    automatically, without having to resort to command-line options
3656#
3657# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3658#     javac) and not a JRE, etc.
3659#
3660# **) On Windows we typically use a well-known path.
3661#     On MacOSX we typically use the tool java_home.
3662#     On Linux we typically find javac in the $PATH, and then follow a
3663#     chain of symlinks that often ends up in a real JDK.
3664#
3665# This leads to the code where we check in different ways to locate a
3666# JDK, and if one is found, check if it is acceptable. If not, we print
3667# our reasons for rejecting it (useful when debugging non-working
3668# configure situations) and continue checking the next one.
3669########################################################################
3670
3671# Execute the check given as argument, and verify the result
3672# If the Boot JDK was previously found, do nothing
3673# $1 A command line (typically autoconf macro) to execute
3674
3675
3676# Test: Is bootjdk explicitely set by command line arguments?
3677
3678
3679# Test: Is bootjdk available from builddeps?
3680
3681
3682# Test: Is $JAVA_HOME set?
3683
3684
3685# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3686
3687
3688# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3689# $1: Argument to the java_home binary (optional)
3690
3691
3692# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3693
3694
3695# Look for a jdk in the given path. If there are multiple, try to select the newest.
3696# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3697# $1 = Path to directory containing jdk installations.
3698# $2 = String to append to the found JDK directory to get the proper JDK home
3699
3700
3701# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3702# environmental variable as base for where to look.
3703# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3704
3705
3706# Test: Is there a JDK installed in default, well-known locations?
3707
3708
3709# Check that a command-line tool in the Boot JDK is correct
3710# $1 = name of variable to assign
3711# $2 = name of binary
3712
3713
3714###############################################################################
3715#
3716# We need a Boot JDK to bootstrap the build.
3717#
3718
3719
3720
3721
3722
3723#
3724# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3725# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3726#
3727# This code is free software; you can redistribute it and/or modify it
3728# under the terms of the GNU General Public License version 2 only, as
3729# published by the Free Software Foundation.  Oracle designates this
3730# particular file as subject to the "Classpath" exception as provided
3731# by Oracle in the LICENSE file that accompanied this code.
3732#
3733# This code is distributed in the hope that it will be useful, but WITHOUT
3734# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3735# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3736# version 2 for more details (a copy is included in the LICENSE file that
3737# accompanied this code).
3738#
3739# You should have received a copy of the GNU General Public License version
3740# 2 along with this work; if not, write to the Free Software Foundation,
3741# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3742#
3743# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3744# or visit www.oracle.com if you need additional information or have any
3745# questions.
3746#
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767#
3768# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3769# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3770#
3771# This code is free software; you can redistribute it and/or modify it
3772# under the terms of the GNU General Public License version 2 only, as
3773# published by the Free Software Foundation.  Oracle designates this
3774# particular file as subject to the "Classpath" exception as provided
3775# by Oracle in the LICENSE file that accompanied this code.
3776#
3777# This code is distributed in the hope that it will be useful, but WITHOUT
3778# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3779# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3780# version 2 for more details (a copy is included in the LICENSE file that
3781# accompanied this code).
3782#
3783# You should have received a copy of the GNU General Public License version
3784# 2 along with this work; if not, write to the Free Software Foundation,
3785# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3786#
3787# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3788# or visit www.oracle.com if you need additional information or have any
3789# questions.
3790#
3791
3792
3793
3794
3795
3796# Documentation on common flags used for solstudio in HIGHEST.
3797#
3798# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3799#          done with care, there are some assumptions below that need to
3800#          be understood about the use of pointers, and IEEE behavior.
3801#
3802# -fns: Use non-standard floating point mode (not IEEE 754)
3803# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3804# -fsingle: Use single precision floating point with 'float'
3805# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3806#   (Source with excessing pointer casting and data access with mixed
3807#    pointer types are not recommended)
3808# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3809#   (If you expect perfect errno behavior, do not use this)
3810# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3811# -xrestrict: Pointer parameters to functions do not overlap
3812#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3813#    If you pass in multiple pointers to the same data, do not use this)
3814# -xlibmil: Inline some library routines
3815#   (If you expect perfect errno behavior, do not use this)
3816# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3817#   (If you expect perfect errno behavior, do not use this)
3818#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3819
3820    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3821    # Bug?
3822    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3823    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3824    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3825    #fi
3826
3827
3828
3829
3830
3831# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3832#                                   [RUN-IF-FALSE])
3833# ------------------------------------------------------------
3834# Check that the c and c++ compilers support an argument
3835
3836
3837# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3838#                                    [RUN-IF-FALSE])
3839# ------------------------------------------------------------
3840# Check that the linker support an argument
3841
3842
3843
3844
3845#
3846# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3847# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3848#
3849# This code is free software; you can redistribute it and/or modify it
3850# under the terms of the GNU General Public License version 2 only, as
3851# published by the Free Software Foundation.  Oracle designates this
3852# particular file as subject to the "Classpath" exception as provided
3853# by Oracle in the LICENSE file that accompanied this code.
3854#
3855# This code is distributed in the hope that it will be useful, but WITHOUT
3856# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3857# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3858# version 2 for more details (a copy is included in the LICENSE file that
3859# accompanied this code).
3860#
3861# You should have received a copy of the GNU General Public License version
3862# 2 along with this work; if not, write to the Free Software Foundation,
3863# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3864#
3865# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3866# or visit www.oracle.com if you need additional information or have any
3867# questions.
3868#
3869
3870
3871
3872
3873
3874cygwin_help() {
3875  case $1 in
3876    unzip)
3877      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3878      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3879      ;;
3880    zip)
3881      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3883      ;;
3884    make)
3885      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3886      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3887      ;;
3888    freetype)
3889      HELP_MSG="
3890The freetype library can now be build during the configure process.
3891Download the freetype sources and unpack them into an arbitrary directory:
3892
3893wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3894tar -xzf freetype-2.5.3.tar.gz
3895
3896Then run configure with '--with-freetype-src=<freetype_src>'. This will
3897automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3898builds or into '<freetype_src>/lib32' for 32-bit builds.
3899Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3900and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3901      ;;
3902  esac
3903}
3904
3905msys_help() {
3906  PKGHANDLER_COMMAND=""
3907}
3908
3909apt_help() {
3910  case $1 in
3911    devkit)
3912      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3913    openjdk)
3914      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3915    alsa)
3916      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3917    cups)
3918      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3919    freetype)
3920      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3921    pulse)
3922      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3923    x11)
3924      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3925    ccache)
3926      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3927  esac
3928}
3929
3930yum_help() {
3931  case $1 in
3932    devkit)
3933      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3934    openjdk)
3935      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3936    alsa)
3937      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3938    cups)
3939      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3940    freetype)
3941      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3942    pulse)
3943      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3944    x11)
3945      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3946    ccache)
3947      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3948  esac
3949}
3950
3951port_help() {
3952  PKGHANDLER_COMMAND=""
3953}
3954
3955pkgutil_help() {
3956  PKGHANDLER_COMMAND=""
3957}
3958
3959pkgadd_help() {
3960  PKGHANDLER_COMMAND=""
3961}
3962
3963# This function will check if we're called from the "configure" wrapper while
3964# printing --help. If so, we will print out additional information that can
3965# only be extracted within the autoconf script, and then exit. This must be
3966# called at the very beginning in configure.ac.
3967
3968
3969
3970
3971#
3972# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3973# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3974#
3975# This code is free software; you can redistribute it and/or modify it
3976# under the terms of the GNU General Public License version 2 only, as
3977# published by the Free Software Foundation.  Oracle designates this
3978# particular file as subject to the "Classpath" exception as provided
3979# by Oracle in the LICENSE file that accompanied this code.
3980#
3981# This code is distributed in the hope that it will be useful, but WITHOUT
3982# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3983# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3984# version 2 for more details (a copy is included in the LICENSE file that
3985# accompanied this code).
3986#
3987# You should have received a copy of the GNU General Public License version
3988# 2 along with this work; if not, write to the Free Software Foundation,
3989# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3990#
3991# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3992# or visit www.oracle.com if you need additional information or have any
3993# questions.
3994#
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005###############################################################################
4006#
4007# Should we build only OpenJDK even if closed sources are present?
4008#
4009
4010
4011
4012
4013###############################################################################
4014#
4015# Setup version numbers
4016#
4017
4018
4019
4020
4021
4022
4023#
4024# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4025# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4026#
4027# This code is free software; you can redistribute it and/or modify it
4028# under the terms of the GNU General Public License version 2 only, as
4029# published by the Free Software Foundation.  Oracle designates this
4030# particular file as subject to the "Classpath" exception as provided
4031# by Oracle in the LICENSE file that accompanied this code.
4032#
4033# This code is distributed in the hope that it will be useful, but WITHOUT
4034# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4035# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4036# version 2 for more details (a copy is included in the LICENSE file that
4037# accompanied this code).
4038#
4039# You should have received a copy of the GNU General Public License version
4040# 2 along with this work; if not, write to the Free Software Foundation,
4041# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4042#
4043# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4044# or visit www.oracle.com if you need additional information or have any
4045# questions.
4046#
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068#
4069# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4070# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4071#
4072# This code is free software; you can redistribute it and/or modify it
4073# under the terms of the GNU General Public License version 2 only, as
4074# published by the Free Software Foundation.  Oracle designates this
4075# particular file as subject to the "Classpath" exception as provided
4076# by Oracle in the LICENSE file that accompanied this code.
4077#
4078# This code is distributed in the hope that it will be useful, but WITHOUT
4079# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4080# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4081# version 2 for more details (a copy is included in the LICENSE file that
4082# accompanied this code).
4083#
4084# You should have received a copy of the GNU General Public License version
4085# 2 along with this work; if not, write to the Free Software Foundation,
4086# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4087#
4088# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4089# or visit www.oracle.com if you need additional information or have any
4090# questions.
4091#
4092
4093# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4094# Converts autoconf style CPU name to OpenJDK style, into
4095# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4096
4097
4098# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4099# Converts autoconf style OS name to OpenJDK style, into
4100# VAR_OS and VAR_OS_API.
4101
4102
4103# Expects $host_os $host_cpu $build_os and $build_cpu
4104# and $with_target_bits to have been setup!
4105#
4106# Translate the standard triplet(quadruplet) definition
4107# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4108# OPENJDK_BUILD_OS, etc.
4109
4110
4111# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4112# accordingly. Must be done after setting up build and target system, but before
4113# doing anything else with these values.
4114
4115
4116# Setup the legacy variables, for controlling the old makefiles.
4117#
4118
4119
4120
4121
4122#%%% Build and target systems %%%
4123
4124
4125
4126
4127# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4128# Add -mX to various FLAGS variables.
4129
4130
4131
4132
4133
4134
4135#
4136# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4137# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4138#
4139# This code is free software; you can redistribute it and/or modify it
4140# under the terms of the GNU General Public License version 2 only, as
4141# published by the Free Software Foundation.  Oracle designates this
4142# particular file as subject to the "Classpath" exception as provided
4143# by Oracle in the LICENSE file that accompanied this code.
4144#
4145# This code is distributed in the hope that it will be useful, but WITHOUT
4146# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4147# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4148# version 2 for more details (a copy is included in the LICENSE file that
4149# accompanied this code).
4150#
4151# You should have received a copy of the GNU General Public License version
4152# 2 along with this work; if not, write to the Free Software Foundation,
4153# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4154#
4155# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4156# or visit www.oracle.com if you need additional information or have any
4157# questions.
4158#
4159
4160
4161
4162
4163
4164
4165
4166
4167#
4168# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4169# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4170#
4171# This code is free software; you can redistribute it and/or modify it
4172# under the terms of the GNU General Public License version 2 only, as
4173# published by the Free Software Foundation.  Oracle designates this
4174# particular file as subject to the "Classpath" exception as provided
4175# by Oracle in the LICENSE file that accompanied this code.
4176#
4177# This code is distributed in the hope that it will be useful, but WITHOUT
4178# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4179# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4180# version 2 for more details (a copy is included in the LICENSE file that
4181# accompanied this code).
4182#
4183# You should have received a copy of the GNU General Public License version
4184# 2 along with this work; if not, write to the Free Software Foundation,
4185# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4186#
4187# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4188# or visit www.oracle.com if you need additional information or have any
4189# questions.
4190#
4191
4192########################################################################
4193# This file is responsible for detecting, verifying and setting up the
4194# toolchain, i.e. the compiler, linker and related utilities. It will setup
4195# proper paths to the binaries, but it will not setup any flags.
4196#
4197# The binaries used is determined by the toolchain type, which is the family of
4198# compilers and related tools that are used.
4199########################################################################
4200
4201
4202# All valid toolchains, regardless of platform (used by help.m4)
4203VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4204
4205# These toolchains are valid on different platforms
4206VALID_TOOLCHAINS_linux="gcc clang"
4207VALID_TOOLCHAINS_solaris="solstudio"
4208VALID_TOOLCHAINS_macosx="gcc clang"
4209VALID_TOOLCHAINS_aix="xlc"
4210VALID_TOOLCHAINS_windows="microsoft"
4211
4212# Toolchain descriptions
4213TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4214TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4215TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4216TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4217TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4218
4219# Setup a number of variables describing how native output files are
4220# named on this platform/toolchain.
4221
4222
4223# Determine which toolchain type to use, and make sure it is valid for this
4224# platform. Setup various information about the selected toolchain.
4225
4226
4227# Before we start detecting the toolchain executables, we might need some
4228# special setup, e.g. additional paths etc.
4229
4230
4231# Restore path, etc
4232
4233
4234# Check if a compiler is of the toolchain type we expect, and save the version
4235# information from it. If the compiler does not match the expected type,
4236# this function will abort using AC_MSG_ERROR. If it matches, the version will
4237# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4238# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4239#
4240# $1 = compiler to test (CC or CXX)
4241# $2 = human readable name of compiler (C or C++)
4242
4243
4244# Try to locate the given C or C++ compiler in the path, or otherwise.
4245#
4246# $1 = compiler to test (CC or CXX)
4247# $2 = human readable name of compiler (C or C++)
4248# $3 = list of compiler names to search for
4249
4250
4251# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4252# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4253# archiver (AR). Verify that the compilers are correct according to the
4254# toolchain type.
4255
4256
4257# Setup additional tools that is considered a part of the toolchain, but not the
4258# core part. Many of these are highly platform-specific and do not exist,
4259# and/or are not needed on all platforms.
4260
4261
4262# Setup the build tools (i.e, the compiler and linker used to build programs
4263# that should be run on the build platform, not the target platform, as a build
4264# helper). Since the non-cross-compile case uses the normal, target compilers
4265# for this, we can only do this after these have been setup.
4266
4267
4268# Setup legacy variables that are still needed as alternative ways to refer to
4269# parts of the toolchain.
4270
4271
4272# Do some additional checks on the detected tools.
4273
4274
4275# Setup the JTReg Regression Test Harness.
4276
4277
4278#
4279# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4280# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4281#
4282# This code is free software; you can redistribute it and/or modify it
4283# under the terms of the GNU General Public License version 2 only, as
4284# published by the Free Software Foundation.  Oracle designates this
4285# particular file as subject to the "Classpath" exception as provided
4286# by Oracle in the LICENSE file that accompanied this code.
4287#
4288# This code is distributed in the hope that it will be useful, but WITHOUT
4289# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4290# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4291# version 2 for more details (a copy is included in the LICENSE file that
4292# accompanied this code).
4293#
4294# You should have received a copy of the GNU General Public License version
4295# 2 along with this work; if not, write to the Free Software Foundation,
4296# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4297#
4298# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4299# or visit www.oracle.com if you need additional information or have any
4300# questions.
4301#
4302
4303
4304
4305
4306
4307
4308
4309# Check if the VS env variables were setup prior to running configure.
4310# If not, then find vcvarsall.bat and run it automatically, and integrate
4311# the set env variables into the spec file.
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323# This line needs to be here, verbatim, after all includes and the dummy hook
4324# definitions. It is replaced with custom functionality when building
4325# custom sources.
4326#CUSTOM_AUTOCONF_INCLUDE
4327
4328# Do not change or remove the following line, it is needed for consistency checks:
4329DATE_WHEN_GENERATED=1416999037
4330
4331###############################################################################
4332#
4333# Initialization / Boot-strapping
4334#
4335# The bootstrapping process needs to solve the "chicken or the egg" problem,
4336# thus it jumps back and forth, each time gaining something needed later on.
4337#
4338###############################################################################
4339
4340# If we are requested to print additional help, do that and then exit.
4341# This must be the very first call.
4342
4343  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4344    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4345    $PRINTF "Which are valid to use depends on the build platform.\n"
4346    for toolchain in $VALID_TOOLCHAINS_all; do
4347      # Use indirect variable referencing
4348      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4349      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4350      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4351    done
4352
4353    # And now exit directly
4354    exit 0
4355  fi
4356
4357
4358# Basic initialization that must happen first of all in the normal process.
4359
4360  # Save the original command line. This is passed to us by the wrapper configure script.
4361
4362  DATE_WHEN_CONFIGURED=`LANG=C date`
4363
4364  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4365$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4366  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4367$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4368
4369
4370  # Start with tools that do not need have cross compilation support
4371  # and can be expected to be found in the default PATH. These tools are
4372  # used by configure. Nor are these tools expected to be found in the
4373  # devkit from the builddeps server either, since they are
4374  # needed to download the devkit.
4375
4376  # First are all the simple required tools.
4377
4378
4379
4380  # Publish this variable in the help.
4381
4382
4383  if test "x$BASENAME" = x; then
4384    # The variable is not set by user, try to locate tool using the code snippet
4385    for ac_prog in basename
4386do
4387  # Extract the first word of "$ac_prog", so it can be a program name with args.
4388set dummy $ac_prog; ac_word=$2
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4390$as_echo_n "checking for $ac_word... " >&6; }
4391if ${ac_cv_path_BASENAME+:} false; then :
4392  $as_echo_n "(cached) " >&6
4393else
4394  case $BASENAME in
4395  [\\/]* | ?:[\\/]*)
4396  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4397  ;;
4398  *)
4399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in $PATH
4401do
4402  IFS=$as_save_IFS
4403  test -z "$as_dir" && as_dir=.
4404    for ac_exec_ext in '' $ac_executable_extensions; do
4405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4406    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4408    break 2
4409  fi
4410done
4411  done
4412IFS=$as_save_IFS
4413
4414  ;;
4415esac
4416fi
4417BASENAME=$ac_cv_path_BASENAME
4418if test -n "$BASENAME"; then
4419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4420$as_echo "$BASENAME" >&6; }
4421else
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4423$as_echo "no" >&6; }
4424fi
4425
4426
4427  test -n "$BASENAME" && break
4428done
4429
4430  else
4431    # The variable is set, but is it from the command line or the environment?
4432
4433    # Try to remove the string !BASENAME! from our list.
4434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4436      # If it failed, the variable was not from the command line. Ignore it,
4437      # but warn the user (except for BASH, which is always set by the calling BASH).
4438      if test "xBASENAME" != xBASH; then
4439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4440$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4441      fi
4442      # Try to locate tool using the code snippet
4443      for ac_prog in basename
4444do
4445  # Extract the first word of "$ac_prog", so it can be a program name with args.
4446set dummy $ac_prog; ac_word=$2
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448$as_echo_n "checking for $ac_word... " >&6; }
4449if ${ac_cv_path_BASENAME+:} false; then :
4450  $as_echo_n "(cached) " >&6
4451else
4452  case $BASENAME in
4453  [\\/]* | ?:[\\/]*)
4454  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4455  ;;
4456  *)
4457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in $PATH
4459do
4460  IFS=$as_save_IFS
4461  test -z "$as_dir" && as_dir=.
4462    for ac_exec_ext in '' $ac_executable_extensions; do
4463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4464    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4466    break 2
4467  fi
4468done
4469  done
4470IFS=$as_save_IFS
4471
4472  ;;
4473esac
4474fi
4475BASENAME=$ac_cv_path_BASENAME
4476if test -n "$BASENAME"; then
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4478$as_echo "$BASENAME" >&6; }
4479else
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481$as_echo "no" >&6; }
4482fi
4483
4484
4485  test -n "$BASENAME" && break
4486done
4487
4488    else
4489      # If it succeeded, then it was overridden by the user. We will use it
4490      # for the tool.
4491
4492      # First remove it from the list of overridden variables, so we can test
4493      # for unknown variables in the end.
4494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4495
4496      # Check if the provided tool contains a complete path.
4497      tool_specified="$BASENAME"
4498      tool_basename="${tool_specified##*/}"
4499      if test "x$tool_basename" = "x$tool_specified"; then
4500        # A command without a complete path is provided, search $PATH.
4501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4502$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4503        # Extract the first word of "$tool_basename", so it can be a program name with args.
4504set dummy $tool_basename; ac_word=$2
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4506$as_echo_n "checking for $ac_word... " >&6; }
4507if ${ac_cv_path_BASENAME+:} false; then :
4508  $as_echo_n "(cached) " >&6
4509else
4510  case $BASENAME in
4511  [\\/]* | ?:[\\/]*)
4512  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4513  ;;
4514  *)
4515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4516for as_dir in $PATH
4517do
4518  IFS=$as_save_IFS
4519  test -z "$as_dir" && as_dir=.
4520    for ac_exec_ext in '' $ac_executable_extensions; do
4521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4522    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4524    break 2
4525  fi
4526done
4527  done
4528IFS=$as_save_IFS
4529
4530  ;;
4531esac
4532fi
4533BASENAME=$ac_cv_path_BASENAME
4534if test -n "$BASENAME"; then
4535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4536$as_echo "$BASENAME" >&6; }
4537else
4538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4539$as_echo "no" >&6; }
4540fi
4541
4542
4543        if test "x$BASENAME" = x; then
4544          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4545        fi
4546      else
4547        # Otherwise we believe it is a complete path. Use it as it is.
4548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4549$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4551$as_echo_n "checking for BASENAME... " >&6; }
4552        if test ! -x "$tool_specified"; then
4553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4554$as_echo "not found" >&6; }
4555          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4556        fi
4557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4558$as_echo "$tool_specified" >&6; }
4559      fi
4560    fi
4561  fi
4562
4563
4564
4565  if test "x$BASENAME" = x; then
4566    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4567  fi
4568
4569
4570
4571
4572
4573  # Publish this variable in the help.
4574
4575
4576  if test "x$BASH" = x; then
4577    # The variable is not set by user, try to locate tool using the code snippet
4578    for ac_prog in bash
4579do
4580  # Extract the first word of "$ac_prog", so it can be a program name with args.
4581set dummy $ac_prog; ac_word=$2
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4583$as_echo_n "checking for $ac_word... " >&6; }
4584if ${ac_cv_path_BASH+:} false; then :
4585  $as_echo_n "(cached) " >&6
4586else
4587  case $BASH in
4588  [\\/]* | ?:[\\/]*)
4589  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4590  ;;
4591  *)
4592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4593for as_dir in $PATH
4594do
4595  IFS=$as_save_IFS
4596  test -z "$as_dir" && as_dir=.
4597    for ac_exec_ext in '' $ac_executable_extensions; do
4598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4599    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4601    break 2
4602  fi
4603done
4604  done
4605IFS=$as_save_IFS
4606
4607  ;;
4608esac
4609fi
4610BASH=$ac_cv_path_BASH
4611if test -n "$BASH"; then
4612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4613$as_echo "$BASH" >&6; }
4614else
4615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616$as_echo "no" >&6; }
4617fi
4618
4619
4620  test -n "$BASH" && break
4621done
4622
4623  else
4624    # The variable is set, but is it from the command line or the environment?
4625
4626    # Try to remove the string !BASH! from our list.
4627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4629      # If it failed, the variable was not from the command line. Ignore it,
4630      # but warn the user (except for BASH, which is always set by the calling BASH).
4631      if test "xBASH" != xBASH; then
4632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4633$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4634      fi
4635      # Try to locate tool using the code snippet
4636      for ac_prog in bash
4637do
4638  # Extract the first word of "$ac_prog", so it can be a program name with args.
4639set dummy $ac_prog; ac_word=$2
4640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641$as_echo_n "checking for $ac_word... " >&6; }
4642if ${ac_cv_path_BASH+:} false; then :
4643  $as_echo_n "(cached) " >&6
4644else
4645  case $BASH in
4646  [\\/]* | ?:[\\/]*)
4647  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4648  ;;
4649  *)
4650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4651for as_dir in $PATH
4652do
4653  IFS=$as_save_IFS
4654  test -z "$as_dir" && as_dir=.
4655    for ac_exec_ext in '' $ac_executable_extensions; do
4656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4657    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4659    break 2
4660  fi
4661done
4662  done
4663IFS=$as_save_IFS
4664
4665  ;;
4666esac
4667fi
4668BASH=$ac_cv_path_BASH
4669if test -n "$BASH"; then
4670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4671$as_echo "$BASH" >&6; }
4672else
4673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4674$as_echo "no" >&6; }
4675fi
4676
4677
4678  test -n "$BASH" && break
4679done
4680
4681    else
4682      # If it succeeded, then it was overridden by the user. We will use it
4683      # for the tool.
4684
4685      # First remove it from the list of overridden variables, so we can test
4686      # for unknown variables in the end.
4687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4688
4689      # Check if the provided tool contains a complete path.
4690      tool_specified="$BASH"
4691      tool_basename="${tool_specified##*/}"
4692      if test "x$tool_basename" = "x$tool_specified"; then
4693        # A command without a complete path is provided, search $PATH.
4694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4695$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4696        # Extract the first word of "$tool_basename", so it can be a program name with args.
4697set dummy $tool_basename; ac_word=$2
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4699$as_echo_n "checking for $ac_word... " >&6; }
4700if ${ac_cv_path_BASH+:} false; then :
4701  $as_echo_n "(cached) " >&6
4702else
4703  case $BASH in
4704  [\\/]* | ?:[\\/]*)
4705  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4706  ;;
4707  *)
4708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4709for as_dir in $PATH
4710do
4711  IFS=$as_save_IFS
4712  test -z "$as_dir" && as_dir=.
4713    for ac_exec_ext in '' $ac_executable_extensions; do
4714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4715    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4717    break 2
4718  fi
4719done
4720  done
4721IFS=$as_save_IFS
4722
4723  ;;
4724esac
4725fi
4726BASH=$ac_cv_path_BASH
4727if test -n "$BASH"; then
4728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4729$as_echo "$BASH" >&6; }
4730else
4731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4732$as_echo "no" >&6; }
4733fi
4734
4735
4736        if test "x$BASH" = x; then
4737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4738        fi
4739      else
4740        # Otherwise we believe it is a complete path. Use it as it is.
4741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4742$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4744$as_echo_n "checking for BASH... " >&6; }
4745        if test ! -x "$tool_specified"; then
4746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4747$as_echo "not found" >&6; }
4748          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4749        fi
4750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4751$as_echo "$tool_specified" >&6; }
4752      fi
4753    fi
4754  fi
4755
4756
4757
4758  if test "x$BASH" = x; then
4759    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4760  fi
4761
4762
4763
4764
4765
4766  # Publish this variable in the help.
4767
4768
4769  if test "x$CAT" = x; then
4770    # The variable is not set by user, try to locate tool using the code snippet
4771    for ac_prog in cat
4772do
4773  # Extract the first word of "$ac_prog", so it can be a program name with args.
4774set dummy $ac_prog; ac_word=$2
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
4777if ${ac_cv_path_CAT+:} false; then :
4778  $as_echo_n "(cached) " >&6
4779else
4780  case $CAT in
4781  [\\/]* | ?:[\\/]*)
4782  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4783  ;;
4784  *)
4785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in $PATH
4787do
4788  IFS=$as_save_IFS
4789  test -z "$as_dir" && as_dir=.
4790    for ac_exec_ext in '' $ac_executable_extensions; do
4791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4792    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4794    break 2
4795  fi
4796done
4797  done
4798IFS=$as_save_IFS
4799
4800  ;;
4801esac
4802fi
4803CAT=$ac_cv_path_CAT
4804if test -n "$CAT"; then
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4806$as_echo "$CAT" >&6; }
4807else
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809$as_echo "no" >&6; }
4810fi
4811
4812
4813  test -n "$CAT" && break
4814done
4815
4816  else
4817    # The variable is set, but is it from the command line or the environment?
4818
4819    # Try to remove the string !CAT! from our list.
4820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4822      # If it failed, the variable was not from the command line. Ignore it,
4823      # but warn the user (except for BASH, which is always set by the calling BASH).
4824      if test "xCAT" != xBASH; then
4825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4826$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4827      fi
4828      # Try to locate tool using the code snippet
4829      for ac_prog in cat
4830do
4831  # Extract the first word of "$ac_prog", so it can be a program name with args.
4832set dummy $ac_prog; ac_word=$2
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4834$as_echo_n "checking for $ac_word... " >&6; }
4835if ${ac_cv_path_CAT+:} false; then :
4836  $as_echo_n "(cached) " >&6
4837else
4838  case $CAT in
4839  [\\/]* | ?:[\\/]*)
4840  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4841  ;;
4842  *)
4843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4844for as_dir in $PATH
4845do
4846  IFS=$as_save_IFS
4847  test -z "$as_dir" && as_dir=.
4848    for ac_exec_ext in '' $ac_executable_extensions; do
4849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4850    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4852    break 2
4853  fi
4854done
4855  done
4856IFS=$as_save_IFS
4857
4858  ;;
4859esac
4860fi
4861CAT=$ac_cv_path_CAT
4862if test -n "$CAT"; then
4863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4864$as_echo "$CAT" >&6; }
4865else
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4867$as_echo "no" >&6; }
4868fi
4869
4870
4871  test -n "$CAT" && break
4872done
4873
4874    else
4875      # If it succeeded, then it was overridden by the user. We will use it
4876      # for the tool.
4877
4878      # First remove it from the list of overridden variables, so we can test
4879      # for unknown variables in the end.
4880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4881
4882      # Check if the provided tool contains a complete path.
4883      tool_specified="$CAT"
4884      tool_basename="${tool_specified##*/}"
4885      if test "x$tool_basename" = "x$tool_specified"; then
4886        # A command without a complete path is provided, search $PATH.
4887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4888$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4889        # Extract the first word of "$tool_basename", so it can be a program name with args.
4890set dummy $tool_basename; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
4893if ${ac_cv_path_CAT+:} false; then :
4894  $as_echo_n "(cached) " >&6
4895else
4896  case $CAT in
4897  [\\/]* | ?:[\\/]*)
4898  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4899  ;;
4900  *)
4901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in $PATH
4903do
4904  IFS=$as_save_IFS
4905  test -z "$as_dir" && as_dir=.
4906    for ac_exec_ext in '' $ac_executable_extensions; do
4907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4908    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910    break 2
4911  fi
4912done
4913  done
4914IFS=$as_save_IFS
4915
4916  ;;
4917esac
4918fi
4919CAT=$ac_cv_path_CAT
4920if test -n "$CAT"; then
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4922$as_echo "$CAT" >&6; }
4923else
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925$as_echo "no" >&6; }
4926fi
4927
4928
4929        if test "x$CAT" = x; then
4930          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4931        fi
4932      else
4933        # Otherwise we believe it is a complete path. Use it as it is.
4934        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4935$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4937$as_echo_n "checking for CAT... " >&6; }
4938        if test ! -x "$tool_specified"; then
4939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4940$as_echo "not found" >&6; }
4941          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4942        fi
4943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4944$as_echo "$tool_specified" >&6; }
4945      fi
4946    fi
4947  fi
4948
4949
4950
4951  if test "x$CAT" = x; then
4952    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4953  fi
4954
4955
4956
4957
4958
4959  # Publish this variable in the help.
4960
4961
4962  if test "x$CHMOD" = x; then
4963    # The variable is not set by user, try to locate tool using the code snippet
4964    for ac_prog in chmod
4965do
4966  # Extract the first word of "$ac_prog", so it can be a program name with args.
4967set dummy $ac_prog; ac_word=$2
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969$as_echo_n "checking for $ac_word... " >&6; }
4970if ${ac_cv_path_CHMOD+:} false; then :
4971  $as_echo_n "(cached) " >&6
4972else
4973  case $CHMOD in
4974  [\\/]* | ?:[\\/]*)
4975  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4976  ;;
4977  *)
4978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4979for as_dir in $PATH
4980do
4981  IFS=$as_save_IFS
4982  test -z "$as_dir" && as_dir=.
4983    for ac_exec_ext in '' $ac_executable_extensions; do
4984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4985    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4987    break 2
4988  fi
4989done
4990  done
4991IFS=$as_save_IFS
4992
4993  ;;
4994esac
4995fi
4996CHMOD=$ac_cv_path_CHMOD
4997if test -n "$CHMOD"; then
4998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4999$as_echo "$CHMOD" >&6; }
5000else
5001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5002$as_echo "no" >&6; }
5003fi
5004
5005
5006  test -n "$CHMOD" && break
5007done
5008
5009  else
5010    # The variable is set, but is it from the command line or the environment?
5011
5012    # Try to remove the string !CHMOD! from our list.
5013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5015      # If it failed, the variable was not from the command line. Ignore it,
5016      # but warn the user (except for BASH, which is always set by the calling BASH).
5017      if test "xCHMOD" != xBASH; then
5018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5019$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5020      fi
5021      # Try to locate tool using the code snippet
5022      for ac_prog in chmod
5023do
5024  # Extract the first word of "$ac_prog", so it can be a program name with args.
5025set dummy $ac_prog; ac_word=$2
5026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
5028if ${ac_cv_path_CHMOD+:} false; then :
5029  $as_echo_n "(cached) " >&6
5030else
5031  case $CHMOD in
5032  [\\/]* | ?:[\\/]*)
5033  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5034  ;;
5035  *)
5036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in $PATH
5038do
5039  IFS=$as_save_IFS
5040  test -z "$as_dir" && as_dir=.
5041    for ac_exec_ext in '' $ac_executable_extensions; do
5042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5043    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5045    break 2
5046  fi
5047done
5048  done
5049IFS=$as_save_IFS
5050
5051  ;;
5052esac
5053fi
5054CHMOD=$ac_cv_path_CHMOD
5055if test -n "$CHMOD"; then
5056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5057$as_echo "$CHMOD" >&6; }
5058else
5059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
5062
5063
5064  test -n "$CHMOD" && break
5065done
5066
5067    else
5068      # If it succeeded, then it was overridden by the user. We will use it
5069      # for the tool.
5070
5071      # First remove it from the list of overridden variables, so we can test
5072      # for unknown variables in the end.
5073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5074
5075      # Check if the provided tool contains a complete path.
5076      tool_specified="$CHMOD"
5077      tool_basename="${tool_specified##*/}"
5078      if test "x$tool_basename" = "x$tool_specified"; then
5079        # A command without a complete path is provided, search $PATH.
5080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5081$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5082        # Extract the first word of "$tool_basename", so it can be a program name with args.
5083set dummy $tool_basename; ac_word=$2
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
5086if ${ac_cv_path_CHMOD+:} false; then :
5087  $as_echo_n "(cached) " >&6
5088else
5089  case $CHMOD in
5090  [\\/]* | ?:[\\/]*)
5091  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5092  ;;
5093  *)
5094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097  IFS=$as_save_IFS
5098  test -z "$as_dir" && as_dir=.
5099    for ac_exec_ext in '' $ac_executable_extensions; do
5100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103    break 2
5104  fi
5105done
5106  done
5107IFS=$as_save_IFS
5108
5109  ;;
5110esac
5111fi
5112CHMOD=$ac_cv_path_CHMOD
5113if test -n "$CHMOD"; then
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5115$as_echo "$CHMOD" >&6; }
5116else
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121
5122        if test "x$CHMOD" = x; then
5123          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5124        fi
5125      else
5126        # Otherwise we believe it is a complete path. Use it as it is.
5127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5128$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5130$as_echo_n "checking for CHMOD... " >&6; }
5131        if test ! -x "$tool_specified"; then
5132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5133$as_echo "not found" >&6; }
5134          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5135        fi
5136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5137$as_echo "$tool_specified" >&6; }
5138      fi
5139    fi
5140  fi
5141
5142
5143
5144  if test "x$CHMOD" = x; then
5145    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5146  fi
5147
5148
5149
5150
5151
5152  # Publish this variable in the help.
5153
5154
5155  if test "x$CMP" = x; then
5156    # The variable is not set by user, try to locate tool using the code snippet
5157    for ac_prog in cmp
5158do
5159  # Extract the first word of "$ac_prog", so it can be a program name with args.
5160set dummy $ac_prog; ac_word=$2
5161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5162$as_echo_n "checking for $ac_word... " >&6; }
5163if ${ac_cv_path_CMP+:} false; then :
5164  $as_echo_n "(cached) " >&6
5165else
5166  case $CMP in
5167  [\\/]* | ?:[\\/]*)
5168  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5169  ;;
5170  *)
5171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174  IFS=$as_save_IFS
5175  test -z "$as_dir" && as_dir=.
5176    for ac_exec_ext in '' $ac_executable_extensions; do
5177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5178    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5180    break 2
5181  fi
5182done
5183  done
5184IFS=$as_save_IFS
5185
5186  ;;
5187esac
5188fi
5189CMP=$ac_cv_path_CMP
5190if test -n "$CMP"; then
5191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5192$as_echo "$CMP" >&6; }
5193else
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
5196fi
5197
5198
5199  test -n "$CMP" && break
5200done
5201
5202  else
5203    # The variable is set, but is it from the command line or the environment?
5204
5205    # Try to remove the string !CMP! from our list.
5206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5208      # If it failed, the variable was not from the command line. Ignore it,
5209      # but warn the user (except for BASH, which is always set by the calling BASH).
5210      if test "xCMP" != xBASH; then
5211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5212$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5213      fi
5214      # Try to locate tool using the code snippet
5215      for ac_prog in cmp
5216do
5217  # Extract the first word of "$ac_prog", so it can be a program name with args.
5218set dummy $ac_prog; ac_word=$2
5219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5220$as_echo_n "checking for $ac_word... " >&6; }
5221if ${ac_cv_path_CMP+:} false; then :
5222  $as_echo_n "(cached) " >&6
5223else
5224  case $CMP in
5225  [\\/]* | ?:[\\/]*)
5226  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5227  ;;
5228  *)
5229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5230for as_dir in $PATH
5231do
5232  IFS=$as_save_IFS
5233  test -z "$as_dir" && as_dir=.
5234    for ac_exec_ext in '' $ac_executable_extensions; do
5235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5236    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5238    break 2
5239  fi
5240done
5241  done
5242IFS=$as_save_IFS
5243
5244  ;;
5245esac
5246fi
5247CMP=$ac_cv_path_CMP
5248if test -n "$CMP"; then
5249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5250$as_echo "$CMP" >&6; }
5251else
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5253$as_echo "no" >&6; }
5254fi
5255
5256
5257  test -n "$CMP" && break
5258done
5259
5260    else
5261      # If it succeeded, then it was overridden by the user. We will use it
5262      # for the tool.
5263
5264      # First remove it from the list of overridden variables, so we can test
5265      # for unknown variables in the end.
5266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5267
5268      # Check if the provided tool contains a complete path.
5269      tool_specified="$CMP"
5270      tool_basename="${tool_specified##*/}"
5271      if test "x$tool_basename" = "x$tool_specified"; then
5272        # A command without a complete path is provided, search $PATH.
5273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5274$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5275        # Extract the first word of "$tool_basename", so it can be a program name with args.
5276set dummy $tool_basename; ac_word=$2
5277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5278$as_echo_n "checking for $ac_word... " >&6; }
5279if ${ac_cv_path_CMP+:} false; then :
5280  $as_echo_n "(cached) " >&6
5281else
5282  case $CMP in
5283  [\\/]* | ?:[\\/]*)
5284  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5285  ;;
5286  *)
5287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288for as_dir in $PATH
5289do
5290  IFS=$as_save_IFS
5291  test -z "$as_dir" && as_dir=.
5292    for ac_exec_ext in '' $ac_executable_extensions; do
5293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5294    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5296    break 2
5297  fi
5298done
5299  done
5300IFS=$as_save_IFS
5301
5302  ;;
5303esac
5304fi
5305CMP=$ac_cv_path_CMP
5306if test -n "$CMP"; then
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5308$as_echo "$CMP" >&6; }
5309else
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5311$as_echo "no" >&6; }
5312fi
5313
5314
5315        if test "x$CMP" = x; then
5316          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5317        fi
5318      else
5319        # Otherwise we believe it is a complete path. Use it as it is.
5320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5321$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5323$as_echo_n "checking for CMP... " >&6; }
5324        if test ! -x "$tool_specified"; then
5325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5326$as_echo "not found" >&6; }
5327          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5328        fi
5329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5330$as_echo "$tool_specified" >&6; }
5331      fi
5332    fi
5333  fi
5334
5335
5336
5337  if test "x$CMP" = x; then
5338    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5339  fi
5340
5341
5342
5343
5344
5345  # Publish this variable in the help.
5346
5347
5348  if test "x$COMM" = x; then
5349    # The variable is not set by user, try to locate tool using the code snippet
5350    for ac_prog in comm
5351do
5352  # Extract the first word of "$ac_prog", so it can be a program name with args.
5353set dummy $ac_prog; ac_word=$2
5354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5355$as_echo_n "checking for $ac_word... " >&6; }
5356if ${ac_cv_path_COMM+:} false; then :
5357  $as_echo_n "(cached) " >&6
5358else
5359  case $COMM in
5360  [\\/]* | ?:[\\/]*)
5361  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5362  ;;
5363  *)
5364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5365for as_dir in $PATH
5366do
5367  IFS=$as_save_IFS
5368  test -z "$as_dir" && as_dir=.
5369    for ac_exec_ext in '' $ac_executable_extensions; do
5370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5371    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5373    break 2
5374  fi
5375done
5376  done
5377IFS=$as_save_IFS
5378
5379  ;;
5380esac
5381fi
5382COMM=$ac_cv_path_COMM
5383if test -n "$COMM"; then
5384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5385$as_echo "$COMM" >&6; }
5386else
5387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5388$as_echo "no" >&6; }
5389fi
5390
5391
5392  test -n "$COMM" && break
5393done
5394
5395  else
5396    # The variable is set, but is it from the command line or the environment?
5397
5398    # Try to remove the string !COMM! from our list.
5399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5401      # If it failed, the variable was not from the command line. Ignore it,
5402      # but warn the user (except for BASH, which is always set by the calling BASH).
5403      if test "xCOMM" != xBASH; then
5404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5405$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5406      fi
5407      # Try to locate tool using the code snippet
5408      for ac_prog in comm
5409do
5410  # Extract the first word of "$ac_prog", so it can be a program name with args.
5411set dummy $ac_prog; ac_word=$2
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5413$as_echo_n "checking for $ac_word... " >&6; }
5414if ${ac_cv_path_COMM+:} false; then :
5415  $as_echo_n "(cached) " >&6
5416else
5417  case $COMM in
5418  [\\/]* | ?:[\\/]*)
5419  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5420  ;;
5421  *)
5422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5423for as_dir in $PATH
5424do
5425  IFS=$as_save_IFS
5426  test -z "$as_dir" && as_dir=.
5427    for ac_exec_ext in '' $ac_executable_extensions; do
5428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5429    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5431    break 2
5432  fi
5433done
5434  done
5435IFS=$as_save_IFS
5436
5437  ;;
5438esac
5439fi
5440COMM=$ac_cv_path_COMM
5441if test -n "$COMM"; then
5442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5443$as_echo "$COMM" >&6; }
5444else
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5446$as_echo "no" >&6; }
5447fi
5448
5449
5450  test -n "$COMM" && break
5451done
5452
5453    else
5454      # If it succeeded, then it was overridden by the user. We will use it
5455      # for the tool.
5456
5457      # First remove it from the list of overridden variables, so we can test
5458      # for unknown variables in the end.
5459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5460
5461      # Check if the provided tool contains a complete path.
5462      tool_specified="$COMM"
5463      tool_basename="${tool_specified##*/}"
5464      if test "x$tool_basename" = "x$tool_specified"; then
5465        # A command without a complete path is provided, search $PATH.
5466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5467$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5468        # Extract the first word of "$tool_basename", so it can be a program name with args.
5469set dummy $tool_basename; ac_word=$2
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5471$as_echo_n "checking for $ac_word... " >&6; }
5472if ${ac_cv_path_COMM+:} false; then :
5473  $as_echo_n "(cached) " >&6
5474else
5475  case $COMM in
5476  [\\/]* | ?:[\\/]*)
5477  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5478  ;;
5479  *)
5480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5481for as_dir in $PATH
5482do
5483  IFS=$as_save_IFS
5484  test -z "$as_dir" && as_dir=.
5485    for ac_exec_ext in '' $ac_executable_extensions; do
5486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5487    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5489    break 2
5490  fi
5491done
5492  done
5493IFS=$as_save_IFS
5494
5495  ;;
5496esac
5497fi
5498COMM=$ac_cv_path_COMM
5499if test -n "$COMM"; then
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5501$as_echo "$COMM" >&6; }
5502else
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5504$as_echo "no" >&6; }
5505fi
5506
5507
5508        if test "x$COMM" = x; then
5509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5510        fi
5511      else
5512        # Otherwise we believe it is a complete path. Use it as it is.
5513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5514$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5516$as_echo_n "checking for COMM... " >&6; }
5517        if test ! -x "$tool_specified"; then
5518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5519$as_echo "not found" >&6; }
5520          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5521        fi
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5523$as_echo "$tool_specified" >&6; }
5524      fi
5525    fi
5526  fi
5527
5528
5529
5530  if test "x$COMM" = x; then
5531    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5532  fi
5533
5534
5535
5536
5537
5538  # Publish this variable in the help.
5539
5540
5541  if test "x$CP" = x; then
5542    # The variable is not set by user, try to locate tool using the code snippet
5543    for ac_prog in cp
5544do
5545  # Extract the first word of "$ac_prog", so it can be a program name with args.
5546set dummy $ac_prog; ac_word=$2
5547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
5549if ${ac_cv_path_CP+:} false; then :
5550  $as_echo_n "(cached) " >&6
5551else
5552  case $CP in
5553  [\\/]* | ?:[\\/]*)
5554  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5555  ;;
5556  *)
5557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558for as_dir in $PATH
5559do
5560  IFS=$as_save_IFS
5561  test -z "$as_dir" && as_dir=.
5562    for ac_exec_ext in '' $ac_executable_extensions; do
5563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5564    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5566    break 2
5567  fi
5568done
5569  done
5570IFS=$as_save_IFS
5571
5572  ;;
5573esac
5574fi
5575CP=$ac_cv_path_CP
5576if test -n "$CP"; then
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5578$as_echo "$CP" >&6; }
5579else
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5581$as_echo "no" >&6; }
5582fi
5583
5584
5585  test -n "$CP" && break
5586done
5587
5588  else
5589    # The variable is set, but is it from the command line or the environment?
5590
5591    # Try to remove the string !CP! from our list.
5592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5594      # If it failed, the variable was not from the command line. Ignore it,
5595      # but warn the user (except for BASH, which is always set by the calling BASH).
5596      if test "xCP" != xBASH; then
5597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5598$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5599      fi
5600      # Try to locate tool using the code snippet
5601      for ac_prog in cp
5602do
5603  # Extract the first word of "$ac_prog", so it can be a program name with args.
5604set dummy $ac_prog; ac_word=$2
5605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5606$as_echo_n "checking for $ac_word... " >&6; }
5607if ${ac_cv_path_CP+:} false; then :
5608  $as_echo_n "(cached) " >&6
5609else
5610  case $CP in
5611  [\\/]* | ?:[\\/]*)
5612  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5613  ;;
5614  *)
5615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5616for as_dir in $PATH
5617do
5618  IFS=$as_save_IFS
5619  test -z "$as_dir" && as_dir=.
5620    for ac_exec_ext in '' $ac_executable_extensions; do
5621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5622    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5624    break 2
5625  fi
5626done
5627  done
5628IFS=$as_save_IFS
5629
5630  ;;
5631esac
5632fi
5633CP=$ac_cv_path_CP
5634if test -n "$CP"; then
5635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5636$as_echo "$CP" >&6; }
5637else
5638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5639$as_echo "no" >&6; }
5640fi
5641
5642
5643  test -n "$CP" && break
5644done
5645
5646    else
5647      # If it succeeded, then it was overridden by the user. We will use it
5648      # for the tool.
5649
5650      # First remove it from the list of overridden variables, so we can test
5651      # for unknown variables in the end.
5652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5653
5654      # Check if the provided tool contains a complete path.
5655      tool_specified="$CP"
5656      tool_basename="${tool_specified##*/}"
5657      if test "x$tool_basename" = "x$tool_specified"; then
5658        # A command without a complete path is provided, search $PATH.
5659        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5660$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5661        # Extract the first word of "$tool_basename", so it can be a program name with args.
5662set dummy $tool_basename; ac_word=$2
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5664$as_echo_n "checking for $ac_word... " >&6; }
5665if ${ac_cv_path_CP+:} false; then :
5666  $as_echo_n "(cached) " >&6
5667else
5668  case $CP in
5669  [\\/]* | ?:[\\/]*)
5670  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5671  ;;
5672  *)
5673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5674for as_dir in $PATH
5675do
5676  IFS=$as_save_IFS
5677  test -z "$as_dir" && as_dir=.
5678    for ac_exec_ext in '' $ac_executable_extensions; do
5679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5680    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5682    break 2
5683  fi
5684done
5685  done
5686IFS=$as_save_IFS
5687
5688  ;;
5689esac
5690fi
5691CP=$ac_cv_path_CP
5692if test -n "$CP"; then
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5694$as_echo "$CP" >&6; }
5695else
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
5698fi
5699
5700
5701        if test "x$CP" = x; then
5702          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5703        fi
5704      else
5705        # Otherwise we believe it is a complete path. Use it as it is.
5706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5707$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5709$as_echo_n "checking for CP... " >&6; }
5710        if test ! -x "$tool_specified"; then
5711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5712$as_echo "not found" >&6; }
5713          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5714        fi
5715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5716$as_echo "$tool_specified" >&6; }
5717      fi
5718    fi
5719  fi
5720
5721
5722
5723  if test "x$CP" = x; then
5724    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5725  fi
5726
5727
5728
5729
5730
5731  # Publish this variable in the help.
5732
5733
5734  if test "x$CUT" = x; then
5735    # The variable is not set by user, try to locate tool using the code snippet
5736    for ac_prog in cut
5737do
5738  # Extract the first word of "$ac_prog", so it can be a program name with args.
5739set dummy $ac_prog; ac_word=$2
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741$as_echo_n "checking for $ac_word... " >&6; }
5742if ${ac_cv_path_CUT+:} false; then :
5743  $as_echo_n "(cached) " >&6
5744else
5745  case $CUT in
5746  [\\/]* | ?:[\\/]*)
5747  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5748  ;;
5749  *)
5750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751for as_dir in $PATH
5752do
5753  IFS=$as_save_IFS
5754  test -z "$as_dir" && as_dir=.
5755    for ac_exec_ext in '' $ac_executable_extensions; do
5756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5757    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5759    break 2
5760  fi
5761done
5762  done
5763IFS=$as_save_IFS
5764
5765  ;;
5766esac
5767fi
5768CUT=$ac_cv_path_CUT
5769if test -n "$CUT"; then
5770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5771$as_echo "$CUT" >&6; }
5772else
5773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5774$as_echo "no" >&6; }
5775fi
5776
5777
5778  test -n "$CUT" && break
5779done
5780
5781  else
5782    # The variable is set, but is it from the command line or the environment?
5783
5784    # Try to remove the string !CUT! from our list.
5785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5787      # If it failed, the variable was not from the command line. Ignore it,
5788      # but warn the user (except for BASH, which is always set by the calling BASH).
5789      if test "xCUT" != xBASH; then
5790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5791$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5792      fi
5793      # Try to locate tool using the code snippet
5794      for ac_prog in cut
5795do
5796  # Extract the first word of "$ac_prog", so it can be a program name with args.
5797set dummy $ac_prog; ac_word=$2
5798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5799$as_echo_n "checking for $ac_word... " >&6; }
5800if ${ac_cv_path_CUT+:} false; then :
5801  $as_echo_n "(cached) " >&6
5802else
5803  case $CUT in
5804  [\\/]* | ?:[\\/]*)
5805  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5806  ;;
5807  *)
5808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5809for as_dir in $PATH
5810do
5811  IFS=$as_save_IFS
5812  test -z "$as_dir" && as_dir=.
5813    for ac_exec_ext in '' $ac_executable_extensions; do
5814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5815    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5817    break 2
5818  fi
5819done
5820  done
5821IFS=$as_save_IFS
5822
5823  ;;
5824esac
5825fi
5826CUT=$ac_cv_path_CUT
5827if test -n "$CUT"; then
5828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5829$as_echo "$CUT" >&6; }
5830else
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832$as_echo "no" >&6; }
5833fi
5834
5835
5836  test -n "$CUT" && break
5837done
5838
5839    else
5840      # If it succeeded, then it was overridden by the user. We will use it
5841      # for the tool.
5842
5843      # First remove it from the list of overridden variables, so we can test
5844      # for unknown variables in the end.
5845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5846
5847      # Check if the provided tool contains a complete path.
5848      tool_specified="$CUT"
5849      tool_basename="${tool_specified##*/}"
5850      if test "x$tool_basename" = "x$tool_specified"; then
5851        # A command without a complete path is provided, search $PATH.
5852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5853$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5854        # Extract the first word of "$tool_basename", so it can be a program name with args.
5855set dummy $tool_basename; ac_word=$2
5856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5857$as_echo_n "checking for $ac_word... " >&6; }
5858if ${ac_cv_path_CUT+:} false; then :
5859  $as_echo_n "(cached) " >&6
5860else
5861  case $CUT in
5862  [\\/]* | ?:[\\/]*)
5863  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5864  ;;
5865  *)
5866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5867for as_dir in $PATH
5868do
5869  IFS=$as_save_IFS
5870  test -z "$as_dir" && as_dir=.
5871    for ac_exec_ext in '' $ac_executable_extensions; do
5872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5873    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5875    break 2
5876  fi
5877done
5878  done
5879IFS=$as_save_IFS
5880
5881  ;;
5882esac
5883fi
5884CUT=$ac_cv_path_CUT
5885if test -n "$CUT"; then
5886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5887$as_echo "$CUT" >&6; }
5888else
5889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890$as_echo "no" >&6; }
5891fi
5892
5893
5894        if test "x$CUT" = x; then
5895          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5896        fi
5897      else
5898        # Otherwise we believe it is a complete path. Use it as it is.
5899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5900$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5902$as_echo_n "checking for CUT... " >&6; }
5903        if test ! -x "$tool_specified"; then
5904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5905$as_echo "not found" >&6; }
5906          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5907        fi
5908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5909$as_echo "$tool_specified" >&6; }
5910      fi
5911    fi
5912  fi
5913
5914
5915
5916  if test "x$CUT" = x; then
5917    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5918  fi
5919
5920
5921
5922
5923
5924  # Publish this variable in the help.
5925
5926
5927  if test "x$DATE" = x; then
5928    # The variable is not set by user, try to locate tool using the code snippet
5929    for ac_prog in date
5930do
5931  # Extract the first word of "$ac_prog", so it can be a program name with args.
5932set dummy $ac_prog; ac_word=$2
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5934$as_echo_n "checking for $ac_word... " >&6; }
5935if ${ac_cv_path_DATE+:} false; then :
5936  $as_echo_n "(cached) " >&6
5937else
5938  case $DATE in
5939  [\\/]* | ?:[\\/]*)
5940  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5941  ;;
5942  *)
5943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5944for as_dir in $PATH
5945do
5946  IFS=$as_save_IFS
5947  test -z "$as_dir" && as_dir=.
5948    for ac_exec_ext in '' $ac_executable_extensions; do
5949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5950    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5952    break 2
5953  fi
5954done
5955  done
5956IFS=$as_save_IFS
5957
5958  ;;
5959esac
5960fi
5961DATE=$ac_cv_path_DATE
5962if test -n "$DATE"; then
5963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5964$as_echo "$DATE" >&6; }
5965else
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5967$as_echo "no" >&6; }
5968fi
5969
5970
5971  test -n "$DATE" && break
5972done
5973
5974  else
5975    # The variable is set, but is it from the command line or the environment?
5976
5977    # Try to remove the string !DATE! from our list.
5978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5980      # If it failed, the variable was not from the command line. Ignore it,
5981      # but warn the user (except for BASH, which is always set by the calling BASH).
5982      if test "xDATE" != xBASH; then
5983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5984$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5985      fi
5986      # Try to locate tool using the code snippet
5987      for ac_prog in date
5988do
5989  # Extract the first word of "$ac_prog", so it can be a program name with args.
5990set dummy $ac_prog; ac_word=$2
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5992$as_echo_n "checking for $ac_word... " >&6; }
5993if ${ac_cv_path_DATE+:} false; then :
5994  $as_echo_n "(cached) " >&6
5995else
5996  case $DATE in
5997  [\\/]* | ?:[\\/]*)
5998  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5999  ;;
6000  *)
6001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6002for as_dir in $PATH
6003do
6004  IFS=$as_save_IFS
6005  test -z "$as_dir" && as_dir=.
6006    for ac_exec_ext in '' $ac_executable_extensions; do
6007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6008    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6010    break 2
6011  fi
6012done
6013  done
6014IFS=$as_save_IFS
6015
6016  ;;
6017esac
6018fi
6019DATE=$ac_cv_path_DATE
6020if test -n "$DATE"; then
6021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6022$as_echo "$DATE" >&6; }
6023else
6024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6025$as_echo "no" >&6; }
6026fi
6027
6028
6029  test -n "$DATE" && break
6030done
6031
6032    else
6033      # If it succeeded, then it was overridden by the user. We will use it
6034      # for the tool.
6035
6036      # First remove it from the list of overridden variables, so we can test
6037      # for unknown variables in the end.
6038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6039
6040      # Check if the provided tool contains a complete path.
6041      tool_specified="$DATE"
6042      tool_basename="${tool_specified##*/}"
6043      if test "x$tool_basename" = "x$tool_specified"; then
6044        # A command without a complete path is provided, search $PATH.
6045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6046$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6047        # Extract the first word of "$tool_basename", so it can be a program name with args.
6048set dummy $tool_basename; ac_word=$2
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
6051if ${ac_cv_path_DATE+:} false; then :
6052  $as_echo_n "(cached) " >&6
6053else
6054  case $DATE in
6055  [\\/]* | ?:[\\/]*)
6056  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6057  ;;
6058  *)
6059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060for as_dir in $PATH
6061do
6062  IFS=$as_save_IFS
6063  test -z "$as_dir" && as_dir=.
6064    for ac_exec_ext in '' $ac_executable_extensions; do
6065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6066    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6068    break 2
6069  fi
6070done
6071  done
6072IFS=$as_save_IFS
6073
6074  ;;
6075esac
6076fi
6077DATE=$ac_cv_path_DATE
6078if test -n "$DATE"; then
6079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6080$as_echo "$DATE" >&6; }
6081else
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
6084fi
6085
6086
6087        if test "x$DATE" = x; then
6088          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6089        fi
6090      else
6091        # Otherwise we believe it is a complete path. Use it as it is.
6092        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6093$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6095$as_echo_n "checking for DATE... " >&6; }
6096        if test ! -x "$tool_specified"; then
6097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6098$as_echo "not found" >&6; }
6099          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6100        fi
6101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6102$as_echo "$tool_specified" >&6; }
6103      fi
6104    fi
6105  fi
6106
6107
6108
6109  if test "x$DATE" = x; then
6110    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6111  fi
6112
6113
6114
6115
6116
6117  # Publish this variable in the help.
6118
6119
6120  if test "x$DIFF" = x; then
6121    # The variable is not set by user, try to locate tool using the code snippet
6122    for ac_prog in gdiff diff
6123do
6124  # Extract the first word of "$ac_prog", so it can be a program name with args.
6125set dummy $ac_prog; ac_word=$2
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6127$as_echo_n "checking for $ac_word... " >&6; }
6128if ${ac_cv_path_DIFF+:} false; then :
6129  $as_echo_n "(cached) " >&6
6130else
6131  case $DIFF in
6132  [\\/]* | ?:[\\/]*)
6133  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6134  ;;
6135  *)
6136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH
6138do
6139  IFS=$as_save_IFS
6140  test -z "$as_dir" && as_dir=.
6141    for ac_exec_ext in '' $ac_executable_extensions; do
6142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6143    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6145    break 2
6146  fi
6147done
6148  done
6149IFS=$as_save_IFS
6150
6151  ;;
6152esac
6153fi
6154DIFF=$ac_cv_path_DIFF
6155if test -n "$DIFF"; then
6156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6157$as_echo "$DIFF" >&6; }
6158else
6159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
6161fi
6162
6163
6164  test -n "$DIFF" && break
6165done
6166
6167  else
6168    # The variable is set, but is it from the command line or the environment?
6169
6170    # Try to remove the string !DIFF! from our list.
6171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6173      # If it failed, the variable was not from the command line. Ignore it,
6174      # but warn the user (except for BASH, which is always set by the calling BASH).
6175      if test "xDIFF" != xBASH; then
6176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6177$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6178      fi
6179      # Try to locate tool using the code snippet
6180      for ac_prog in gdiff diff
6181do
6182  # Extract the first word of "$ac_prog", so it can be a program name with args.
6183set dummy $ac_prog; ac_word=$2
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
6186if ${ac_cv_path_DIFF+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  case $DIFF in
6190  [\\/]* | ?:[\\/]*)
6191  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6192  ;;
6193  *)
6194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH
6196do
6197  IFS=$as_save_IFS
6198  test -z "$as_dir" && as_dir=.
6199    for ac_exec_ext in '' $ac_executable_extensions; do
6200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6201    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6203    break 2
6204  fi
6205done
6206  done
6207IFS=$as_save_IFS
6208
6209  ;;
6210esac
6211fi
6212DIFF=$ac_cv_path_DIFF
6213if test -n "$DIFF"; then
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6215$as_echo "$DIFF" >&6; }
6216else
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218$as_echo "no" >&6; }
6219fi
6220
6221
6222  test -n "$DIFF" && break
6223done
6224
6225    else
6226      # If it succeeded, then it was overridden by the user. We will use it
6227      # for the tool.
6228
6229      # First remove it from the list of overridden variables, so we can test
6230      # for unknown variables in the end.
6231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6232
6233      # Check if the provided tool contains a complete path.
6234      tool_specified="$DIFF"
6235      tool_basename="${tool_specified##*/}"
6236      if test "x$tool_basename" = "x$tool_specified"; then
6237        # A command without a complete path is provided, search $PATH.
6238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6239$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6240        # Extract the first word of "$tool_basename", so it can be a program name with args.
6241set dummy $tool_basename; ac_word=$2
6242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6243$as_echo_n "checking for $ac_word... " >&6; }
6244if ${ac_cv_path_DIFF+:} false; then :
6245  $as_echo_n "(cached) " >&6
6246else
6247  case $DIFF in
6248  [\\/]* | ?:[\\/]*)
6249  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6250  ;;
6251  *)
6252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253for as_dir in $PATH
6254do
6255  IFS=$as_save_IFS
6256  test -z "$as_dir" && as_dir=.
6257    for ac_exec_ext in '' $ac_executable_extensions; do
6258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6259    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6261    break 2
6262  fi
6263done
6264  done
6265IFS=$as_save_IFS
6266
6267  ;;
6268esac
6269fi
6270DIFF=$ac_cv_path_DIFF
6271if test -n "$DIFF"; then
6272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6273$as_echo "$DIFF" >&6; }
6274else
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6276$as_echo "no" >&6; }
6277fi
6278
6279
6280        if test "x$DIFF" = x; then
6281          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6282        fi
6283      else
6284        # Otherwise we believe it is a complete path. Use it as it is.
6285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6286$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6288$as_echo_n "checking for DIFF... " >&6; }
6289        if test ! -x "$tool_specified"; then
6290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6291$as_echo "not found" >&6; }
6292          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6293        fi
6294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6295$as_echo "$tool_specified" >&6; }
6296      fi
6297    fi
6298  fi
6299
6300
6301
6302  if test "x$DIFF" = x; then
6303    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6304  fi
6305
6306
6307
6308
6309
6310  # Publish this variable in the help.
6311
6312
6313  if test "x$DIRNAME" = x; then
6314    # The variable is not set by user, try to locate tool using the code snippet
6315    for ac_prog in dirname
6316do
6317  # Extract the first word of "$ac_prog", so it can be a program name with args.
6318set dummy $ac_prog; ac_word=$2
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320$as_echo_n "checking for $ac_word... " >&6; }
6321if ${ac_cv_path_DIRNAME+:} false; then :
6322  $as_echo_n "(cached) " >&6
6323else
6324  case $DIRNAME in
6325  [\\/]* | ?:[\\/]*)
6326  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6327  ;;
6328  *)
6329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332  IFS=$as_save_IFS
6333  test -z "$as_dir" && as_dir=.
6334    for ac_exec_ext in '' $ac_executable_extensions; do
6335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6336    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6338    break 2
6339  fi
6340done
6341  done
6342IFS=$as_save_IFS
6343
6344  ;;
6345esac
6346fi
6347DIRNAME=$ac_cv_path_DIRNAME
6348if test -n "$DIRNAME"; then
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6350$as_echo "$DIRNAME" >&6; }
6351else
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; }
6354fi
6355
6356
6357  test -n "$DIRNAME" && break
6358done
6359
6360  else
6361    # The variable is set, but is it from the command line or the environment?
6362
6363    # Try to remove the string !DIRNAME! from our list.
6364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6366      # If it failed, the variable was not from the command line. Ignore it,
6367      # but warn the user (except for BASH, which is always set by the calling BASH).
6368      if test "xDIRNAME" != xBASH; then
6369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6370$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6371      fi
6372      # Try to locate tool using the code snippet
6373      for ac_prog in dirname
6374do
6375  # Extract the first word of "$ac_prog", so it can be a program name with args.
6376set dummy $ac_prog; ac_word=$2
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6378$as_echo_n "checking for $ac_word... " >&6; }
6379if ${ac_cv_path_DIRNAME+:} false; then :
6380  $as_echo_n "(cached) " >&6
6381else
6382  case $DIRNAME in
6383  [\\/]* | ?:[\\/]*)
6384  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6385  ;;
6386  *)
6387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6388for as_dir in $PATH
6389do
6390  IFS=$as_save_IFS
6391  test -z "$as_dir" && as_dir=.
6392    for ac_exec_ext in '' $ac_executable_extensions; do
6393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6394    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6396    break 2
6397  fi
6398done
6399  done
6400IFS=$as_save_IFS
6401
6402  ;;
6403esac
6404fi
6405DIRNAME=$ac_cv_path_DIRNAME
6406if test -n "$DIRNAME"; then
6407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6408$as_echo "$DIRNAME" >&6; }
6409else
6410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414
6415  test -n "$DIRNAME" && break
6416done
6417
6418    else
6419      # If it succeeded, then it was overridden by the user. We will use it
6420      # for the tool.
6421
6422      # First remove it from the list of overridden variables, so we can test
6423      # for unknown variables in the end.
6424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6425
6426      # Check if the provided tool contains a complete path.
6427      tool_specified="$DIRNAME"
6428      tool_basename="${tool_specified##*/}"
6429      if test "x$tool_basename" = "x$tool_specified"; then
6430        # A command without a complete path is provided, search $PATH.
6431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6432$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6433        # Extract the first word of "$tool_basename", so it can be a program name with args.
6434set dummy $tool_basename; ac_word=$2
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6436$as_echo_n "checking for $ac_word... " >&6; }
6437if ${ac_cv_path_DIRNAME+:} false; then :
6438  $as_echo_n "(cached) " >&6
6439else
6440  case $DIRNAME in
6441  [\\/]* | ?:[\\/]*)
6442  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6443  ;;
6444  *)
6445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6446for as_dir in $PATH
6447do
6448  IFS=$as_save_IFS
6449  test -z "$as_dir" && as_dir=.
6450    for ac_exec_ext in '' $ac_executable_extensions; do
6451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6452    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6454    break 2
6455  fi
6456done
6457  done
6458IFS=$as_save_IFS
6459
6460  ;;
6461esac
6462fi
6463DIRNAME=$ac_cv_path_DIRNAME
6464if test -n "$DIRNAME"; then
6465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6466$as_echo "$DIRNAME" >&6; }
6467else
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469$as_echo "no" >&6; }
6470fi
6471
6472
6473        if test "x$DIRNAME" = x; then
6474          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6475        fi
6476      else
6477        # Otherwise we believe it is a complete path. Use it as it is.
6478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6479$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6481$as_echo_n "checking for DIRNAME... " >&6; }
6482        if test ! -x "$tool_specified"; then
6483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6484$as_echo "not found" >&6; }
6485          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6486        fi
6487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6488$as_echo "$tool_specified" >&6; }
6489      fi
6490    fi
6491  fi
6492
6493
6494
6495  if test "x$DIRNAME" = x; then
6496    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6497  fi
6498
6499
6500
6501
6502
6503  # Publish this variable in the help.
6504
6505
6506  if test "x$ECHO" = x; then
6507    # The variable is not set by user, try to locate tool using the code snippet
6508    for ac_prog in echo
6509do
6510  # Extract the first word of "$ac_prog", so it can be a program name with args.
6511set dummy $ac_prog; ac_word=$2
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513$as_echo_n "checking for $ac_word... " >&6; }
6514if ${ac_cv_path_ECHO+:} false; then :
6515  $as_echo_n "(cached) " >&6
6516else
6517  case $ECHO in
6518  [\\/]* | ?:[\\/]*)
6519  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6520  ;;
6521  *)
6522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6523for as_dir in $PATH
6524do
6525  IFS=$as_save_IFS
6526  test -z "$as_dir" && as_dir=.
6527    for ac_exec_ext in '' $ac_executable_extensions; do
6528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6529    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6531    break 2
6532  fi
6533done
6534  done
6535IFS=$as_save_IFS
6536
6537  ;;
6538esac
6539fi
6540ECHO=$ac_cv_path_ECHO
6541if test -n "$ECHO"; then
6542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6543$as_echo "$ECHO" >&6; }
6544else
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; }
6547fi
6548
6549
6550  test -n "$ECHO" && break
6551done
6552
6553  else
6554    # The variable is set, but is it from the command line or the environment?
6555
6556    # Try to remove the string !ECHO! from our list.
6557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6559      # If it failed, the variable was not from the command line. Ignore it,
6560      # but warn the user (except for BASH, which is always set by the calling BASH).
6561      if test "xECHO" != xBASH; then
6562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6563$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6564      fi
6565      # Try to locate tool using the code snippet
6566      for ac_prog in echo
6567do
6568  # Extract the first word of "$ac_prog", so it can be a program name with args.
6569set dummy $ac_prog; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_path_ECHO+:} false; then :
6573  $as_echo_n "(cached) " >&6
6574else
6575  case $ECHO in
6576  [\\/]* | ?:[\\/]*)
6577  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6578  ;;
6579  *)
6580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581for as_dir in $PATH
6582do
6583  IFS=$as_save_IFS
6584  test -z "$as_dir" && as_dir=.
6585    for ac_exec_ext in '' $ac_executable_extensions; do
6586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589    break 2
6590  fi
6591done
6592  done
6593IFS=$as_save_IFS
6594
6595  ;;
6596esac
6597fi
6598ECHO=$ac_cv_path_ECHO
6599if test -n "$ECHO"; then
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6601$as_echo "$ECHO" >&6; }
6602else
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607
6608  test -n "$ECHO" && break
6609done
6610
6611    else
6612      # If it succeeded, then it was overridden by the user. We will use it
6613      # for the tool.
6614
6615      # First remove it from the list of overridden variables, so we can test
6616      # for unknown variables in the end.
6617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6618
6619      # Check if the provided tool contains a complete path.
6620      tool_specified="$ECHO"
6621      tool_basename="${tool_specified##*/}"
6622      if test "x$tool_basename" = "x$tool_specified"; then
6623        # A command without a complete path is provided, search $PATH.
6624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6625$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6626        # Extract the first word of "$tool_basename", so it can be a program name with args.
6627set dummy $tool_basename; ac_word=$2
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6629$as_echo_n "checking for $ac_word... " >&6; }
6630if ${ac_cv_path_ECHO+:} false; then :
6631  $as_echo_n "(cached) " >&6
6632else
6633  case $ECHO in
6634  [\\/]* | ?:[\\/]*)
6635  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6636  ;;
6637  *)
6638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6639for as_dir in $PATH
6640do
6641  IFS=$as_save_IFS
6642  test -z "$as_dir" && as_dir=.
6643    for ac_exec_ext in '' $ac_executable_extensions; do
6644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6645    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6647    break 2
6648  fi
6649done
6650  done
6651IFS=$as_save_IFS
6652
6653  ;;
6654esac
6655fi
6656ECHO=$ac_cv_path_ECHO
6657if test -n "$ECHO"; then
6658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6659$as_echo "$ECHO" >&6; }
6660else
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6662$as_echo "no" >&6; }
6663fi
6664
6665
6666        if test "x$ECHO" = x; then
6667          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6668        fi
6669      else
6670        # Otherwise we believe it is a complete path. Use it as it is.
6671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6672$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6674$as_echo_n "checking for ECHO... " >&6; }
6675        if test ! -x "$tool_specified"; then
6676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6677$as_echo "not found" >&6; }
6678          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6679        fi
6680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6681$as_echo "$tool_specified" >&6; }
6682      fi
6683    fi
6684  fi
6685
6686
6687
6688  if test "x$ECHO" = x; then
6689    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6690  fi
6691
6692
6693
6694
6695
6696  # Publish this variable in the help.
6697
6698
6699  if test "x$EXPR" = x; then
6700    # The variable is not set by user, try to locate tool using the code snippet
6701    for ac_prog in expr
6702do
6703  # Extract the first word of "$ac_prog", so it can be a program name with args.
6704set dummy $ac_prog; ac_word=$2
6705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6706$as_echo_n "checking for $ac_word... " >&6; }
6707if ${ac_cv_path_EXPR+:} false; then :
6708  $as_echo_n "(cached) " >&6
6709else
6710  case $EXPR in
6711  [\\/]* | ?:[\\/]*)
6712  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6713  ;;
6714  *)
6715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6716for as_dir in $PATH
6717do
6718  IFS=$as_save_IFS
6719  test -z "$as_dir" && as_dir=.
6720    for ac_exec_ext in '' $ac_executable_extensions; do
6721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6722    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6724    break 2
6725  fi
6726done
6727  done
6728IFS=$as_save_IFS
6729
6730  ;;
6731esac
6732fi
6733EXPR=$ac_cv_path_EXPR
6734if test -n "$EXPR"; then
6735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6736$as_echo "$EXPR" >&6; }
6737else
6738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6739$as_echo "no" >&6; }
6740fi
6741
6742
6743  test -n "$EXPR" && break
6744done
6745
6746  else
6747    # The variable is set, but is it from the command line or the environment?
6748
6749    # Try to remove the string !EXPR! from our list.
6750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6752      # If it failed, the variable was not from the command line. Ignore it,
6753      # but warn the user (except for BASH, which is always set by the calling BASH).
6754      if test "xEXPR" != xBASH; then
6755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6756$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6757      fi
6758      # Try to locate tool using the code snippet
6759      for ac_prog in expr
6760do
6761  # Extract the first word of "$ac_prog", so it can be a program name with args.
6762set dummy $ac_prog; ac_word=$2
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6764$as_echo_n "checking for $ac_word... " >&6; }
6765if ${ac_cv_path_EXPR+:} false; then :
6766  $as_echo_n "(cached) " >&6
6767else
6768  case $EXPR in
6769  [\\/]* | ?:[\\/]*)
6770  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6771  ;;
6772  *)
6773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6774for as_dir in $PATH
6775do
6776  IFS=$as_save_IFS
6777  test -z "$as_dir" && as_dir=.
6778    for ac_exec_ext in '' $ac_executable_extensions; do
6779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6780    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6782    break 2
6783  fi
6784done
6785  done
6786IFS=$as_save_IFS
6787
6788  ;;
6789esac
6790fi
6791EXPR=$ac_cv_path_EXPR
6792if test -n "$EXPR"; then
6793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6794$as_echo "$EXPR" >&6; }
6795else
6796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6797$as_echo "no" >&6; }
6798fi
6799
6800
6801  test -n "$EXPR" && break
6802done
6803
6804    else
6805      # If it succeeded, then it was overridden by the user. We will use it
6806      # for the tool.
6807
6808      # First remove it from the list of overridden variables, so we can test
6809      # for unknown variables in the end.
6810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6811
6812      # Check if the provided tool contains a complete path.
6813      tool_specified="$EXPR"
6814      tool_basename="${tool_specified##*/}"
6815      if test "x$tool_basename" = "x$tool_specified"; then
6816        # A command without a complete path is provided, search $PATH.
6817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6818$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6819        # Extract the first word of "$tool_basename", so it can be a program name with args.
6820set dummy $tool_basename; ac_word=$2
6821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6822$as_echo_n "checking for $ac_word... " >&6; }
6823if ${ac_cv_path_EXPR+:} false; then :
6824  $as_echo_n "(cached) " >&6
6825else
6826  case $EXPR in
6827  [\\/]* | ?:[\\/]*)
6828  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6829  ;;
6830  *)
6831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6832for as_dir in $PATH
6833do
6834  IFS=$as_save_IFS
6835  test -z "$as_dir" && as_dir=.
6836    for ac_exec_ext in '' $ac_executable_extensions; do
6837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6838    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6840    break 2
6841  fi
6842done
6843  done
6844IFS=$as_save_IFS
6845
6846  ;;
6847esac
6848fi
6849EXPR=$ac_cv_path_EXPR
6850if test -n "$EXPR"; then
6851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6852$as_echo "$EXPR" >&6; }
6853else
6854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6855$as_echo "no" >&6; }
6856fi
6857
6858
6859        if test "x$EXPR" = x; then
6860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6861        fi
6862      else
6863        # Otherwise we believe it is a complete path. Use it as it is.
6864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6865$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6867$as_echo_n "checking for EXPR... " >&6; }
6868        if test ! -x "$tool_specified"; then
6869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6870$as_echo "not found" >&6; }
6871          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6872        fi
6873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6874$as_echo "$tool_specified" >&6; }
6875      fi
6876    fi
6877  fi
6878
6879
6880
6881  if test "x$EXPR" = x; then
6882    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6883  fi
6884
6885
6886
6887
6888
6889  # Publish this variable in the help.
6890
6891
6892  if test "x$FILE" = x; then
6893    # The variable is not set by user, try to locate tool using the code snippet
6894    for ac_prog in file
6895do
6896  # Extract the first word of "$ac_prog", so it can be a program name with args.
6897set dummy $ac_prog; ac_word=$2
6898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6899$as_echo_n "checking for $ac_word... " >&6; }
6900if ${ac_cv_path_FILE+:} false; then :
6901  $as_echo_n "(cached) " >&6
6902else
6903  case $FILE in
6904  [\\/]* | ?:[\\/]*)
6905  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6906  ;;
6907  *)
6908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6909for as_dir in $PATH
6910do
6911  IFS=$as_save_IFS
6912  test -z "$as_dir" && as_dir=.
6913    for ac_exec_ext in '' $ac_executable_extensions; do
6914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6915    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6917    break 2
6918  fi
6919done
6920  done
6921IFS=$as_save_IFS
6922
6923  ;;
6924esac
6925fi
6926FILE=$ac_cv_path_FILE
6927if test -n "$FILE"; then
6928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6929$as_echo "$FILE" >&6; }
6930else
6931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6932$as_echo "no" >&6; }
6933fi
6934
6935
6936  test -n "$FILE" && break
6937done
6938
6939  else
6940    # The variable is set, but is it from the command line or the environment?
6941
6942    # Try to remove the string !FILE! from our list.
6943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6945      # If it failed, the variable was not from the command line. Ignore it,
6946      # but warn the user (except for BASH, which is always set by the calling BASH).
6947      if test "xFILE" != xBASH; then
6948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6949$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6950      fi
6951      # Try to locate tool using the code snippet
6952      for ac_prog in file
6953do
6954  # Extract the first word of "$ac_prog", so it can be a program name with args.
6955set dummy $ac_prog; ac_word=$2
6956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6957$as_echo_n "checking for $ac_word... " >&6; }
6958if ${ac_cv_path_FILE+:} false; then :
6959  $as_echo_n "(cached) " >&6
6960else
6961  case $FILE in
6962  [\\/]* | ?:[\\/]*)
6963  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6964  ;;
6965  *)
6966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6967for as_dir in $PATH
6968do
6969  IFS=$as_save_IFS
6970  test -z "$as_dir" && as_dir=.
6971    for ac_exec_ext in '' $ac_executable_extensions; do
6972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6973    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6975    break 2
6976  fi
6977done
6978  done
6979IFS=$as_save_IFS
6980
6981  ;;
6982esac
6983fi
6984FILE=$ac_cv_path_FILE
6985if test -n "$FILE"; then
6986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6987$as_echo "$FILE" >&6; }
6988else
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6990$as_echo "no" >&6; }
6991fi
6992
6993
6994  test -n "$FILE" && break
6995done
6996
6997    else
6998      # If it succeeded, then it was overridden by the user. We will use it
6999      # for the tool.
7000
7001      # First remove it from the list of overridden variables, so we can test
7002      # for unknown variables in the end.
7003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7004
7005      # Check if the provided tool contains a complete path.
7006      tool_specified="$FILE"
7007      tool_basename="${tool_specified##*/}"
7008      if test "x$tool_basename" = "x$tool_specified"; then
7009        # A command without a complete path is provided, search $PATH.
7010        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7011$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7012        # Extract the first word of "$tool_basename", so it can be a program name with args.
7013set dummy $tool_basename; ac_word=$2
7014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7015$as_echo_n "checking for $ac_word... " >&6; }
7016if ${ac_cv_path_FILE+:} false; then :
7017  $as_echo_n "(cached) " >&6
7018else
7019  case $FILE in
7020  [\\/]* | ?:[\\/]*)
7021  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7022  ;;
7023  *)
7024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7025for as_dir in $PATH
7026do
7027  IFS=$as_save_IFS
7028  test -z "$as_dir" && as_dir=.
7029    for ac_exec_ext in '' $ac_executable_extensions; do
7030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7031    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7033    break 2
7034  fi
7035done
7036  done
7037IFS=$as_save_IFS
7038
7039  ;;
7040esac
7041fi
7042FILE=$ac_cv_path_FILE
7043if test -n "$FILE"; then
7044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7045$as_echo "$FILE" >&6; }
7046else
7047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7048$as_echo "no" >&6; }
7049fi
7050
7051
7052        if test "x$FILE" = x; then
7053          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7054        fi
7055      else
7056        # Otherwise we believe it is a complete path. Use it as it is.
7057        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7058$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7060$as_echo_n "checking for FILE... " >&6; }
7061        if test ! -x "$tool_specified"; then
7062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7063$as_echo "not found" >&6; }
7064          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7065        fi
7066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7067$as_echo "$tool_specified" >&6; }
7068      fi
7069    fi
7070  fi
7071
7072
7073
7074  if test "x$FILE" = x; then
7075    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7076  fi
7077
7078
7079
7080
7081
7082  # Publish this variable in the help.
7083
7084
7085  if test "x$FIND" = x; then
7086    # The variable is not set by user, try to locate tool using the code snippet
7087    for ac_prog in find
7088do
7089  # Extract the first word of "$ac_prog", so it can be a program name with args.
7090set dummy $ac_prog; ac_word=$2
7091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7092$as_echo_n "checking for $ac_word... " >&6; }
7093if ${ac_cv_path_FIND+:} false; then :
7094  $as_echo_n "(cached) " >&6
7095else
7096  case $FIND in
7097  [\\/]* | ?:[\\/]*)
7098  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7099  ;;
7100  *)
7101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7102for as_dir in $PATH
7103do
7104  IFS=$as_save_IFS
7105  test -z "$as_dir" && as_dir=.
7106    for ac_exec_ext in '' $ac_executable_extensions; do
7107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7108    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7110    break 2
7111  fi
7112done
7113  done
7114IFS=$as_save_IFS
7115
7116  ;;
7117esac
7118fi
7119FIND=$ac_cv_path_FIND
7120if test -n "$FIND"; then
7121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7122$as_echo "$FIND" >&6; }
7123else
7124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7125$as_echo "no" >&6; }
7126fi
7127
7128
7129  test -n "$FIND" && break
7130done
7131
7132  else
7133    # The variable is set, but is it from the command line or the environment?
7134
7135    # Try to remove the string !FIND! from our list.
7136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7138      # If it failed, the variable was not from the command line. Ignore it,
7139      # but warn the user (except for BASH, which is always set by the calling BASH).
7140      if test "xFIND" != xBASH; then
7141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7142$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7143      fi
7144      # Try to locate tool using the code snippet
7145      for ac_prog in find
7146do
7147  # Extract the first word of "$ac_prog", so it can be a program name with args.
7148set dummy $ac_prog; ac_word=$2
7149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7150$as_echo_n "checking for $ac_word... " >&6; }
7151if ${ac_cv_path_FIND+:} false; then :
7152  $as_echo_n "(cached) " >&6
7153else
7154  case $FIND in
7155  [\\/]* | ?:[\\/]*)
7156  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7157  ;;
7158  *)
7159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7160for as_dir in $PATH
7161do
7162  IFS=$as_save_IFS
7163  test -z "$as_dir" && as_dir=.
7164    for ac_exec_ext in '' $ac_executable_extensions; do
7165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7166    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7168    break 2
7169  fi
7170done
7171  done
7172IFS=$as_save_IFS
7173
7174  ;;
7175esac
7176fi
7177FIND=$ac_cv_path_FIND
7178if test -n "$FIND"; then
7179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7180$as_echo "$FIND" >&6; }
7181else
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7183$as_echo "no" >&6; }
7184fi
7185
7186
7187  test -n "$FIND" && break
7188done
7189
7190    else
7191      # If it succeeded, then it was overridden by the user. We will use it
7192      # for the tool.
7193
7194      # First remove it from the list of overridden variables, so we can test
7195      # for unknown variables in the end.
7196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7197
7198      # Check if the provided tool contains a complete path.
7199      tool_specified="$FIND"
7200      tool_basename="${tool_specified##*/}"
7201      if test "x$tool_basename" = "x$tool_specified"; then
7202        # A command without a complete path is provided, search $PATH.
7203        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7204$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7205        # Extract the first word of "$tool_basename", so it can be a program name with args.
7206set dummy $tool_basename; ac_word=$2
7207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7208$as_echo_n "checking for $ac_word... " >&6; }
7209if ${ac_cv_path_FIND+:} false; then :
7210  $as_echo_n "(cached) " >&6
7211else
7212  case $FIND in
7213  [\\/]* | ?:[\\/]*)
7214  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7215  ;;
7216  *)
7217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218for as_dir in $PATH
7219do
7220  IFS=$as_save_IFS
7221  test -z "$as_dir" && as_dir=.
7222    for ac_exec_ext in '' $ac_executable_extensions; do
7223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226    break 2
7227  fi
7228done
7229  done
7230IFS=$as_save_IFS
7231
7232  ;;
7233esac
7234fi
7235FIND=$ac_cv_path_FIND
7236if test -n "$FIND"; then
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7238$as_echo "$FIND" >&6; }
7239else
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
7242fi
7243
7244
7245        if test "x$FIND" = x; then
7246          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7247        fi
7248      else
7249        # Otherwise we believe it is a complete path. Use it as it is.
7250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7251$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7253$as_echo_n "checking for FIND... " >&6; }
7254        if test ! -x "$tool_specified"; then
7255          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7256$as_echo "not found" >&6; }
7257          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7258        fi
7259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7260$as_echo "$tool_specified" >&6; }
7261      fi
7262    fi
7263  fi
7264
7265
7266
7267  if test "x$FIND" = x; then
7268    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7269  fi
7270
7271
7272
7273
7274
7275  # Publish this variable in the help.
7276
7277
7278  if test "x$HEAD" = x; then
7279    # The variable is not set by user, try to locate tool using the code snippet
7280    for ac_prog in head
7281do
7282  # Extract the first word of "$ac_prog", so it can be a program name with args.
7283set dummy $ac_prog; ac_word=$2
7284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7285$as_echo_n "checking for $ac_word... " >&6; }
7286if ${ac_cv_path_HEAD+:} false; then :
7287  $as_echo_n "(cached) " >&6
7288else
7289  case $HEAD in
7290  [\\/]* | ?:[\\/]*)
7291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7292  ;;
7293  *)
7294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7295for as_dir in $PATH
7296do
7297  IFS=$as_save_IFS
7298  test -z "$as_dir" && as_dir=.
7299    for ac_exec_ext in '' $ac_executable_extensions; do
7300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7303    break 2
7304  fi
7305done
7306  done
7307IFS=$as_save_IFS
7308
7309  ;;
7310esac
7311fi
7312HEAD=$ac_cv_path_HEAD
7313if test -n "$HEAD"; then
7314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7315$as_echo "$HEAD" >&6; }
7316else
7317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7318$as_echo "no" >&6; }
7319fi
7320
7321
7322  test -n "$HEAD" && break
7323done
7324
7325  else
7326    # The variable is set, but is it from the command line or the environment?
7327
7328    # Try to remove the string !HEAD! from our list.
7329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7331      # If it failed, the variable was not from the command line. Ignore it,
7332      # but warn the user (except for BASH, which is always set by the calling BASH).
7333      if test "xHEAD" != xBASH; then
7334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7335$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7336      fi
7337      # Try to locate tool using the code snippet
7338      for ac_prog in head
7339do
7340  # Extract the first word of "$ac_prog", so it can be a program name with args.
7341set dummy $ac_prog; ac_word=$2
7342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7343$as_echo_n "checking for $ac_word... " >&6; }
7344if ${ac_cv_path_HEAD+:} false; then :
7345  $as_echo_n "(cached) " >&6
7346else
7347  case $HEAD in
7348  [\\/]* | ?:[\\/]*)
7349  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7350  ;;
7351  *)
7352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7353for as_dir in $PATH
7354do
7355  IFS=$as_save_IFS
7356  test -z "$as_dir" && as_dir=.
7357    for ac_exec_ext in '' $ac_executable_extensions; do
7358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7359    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7361    break 2
7362  fi
7363done
7364  done
7365IFS=$as_save_IFS
7366
7367  ;;
7368esac
7369fi
7370HEAD=$ac_cv_path_HEAD
7371if test -n "$HEAD"; then
7372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7373$as_echo "$HEAD" >&6; }
7374else
7375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7376$as_echo "no" >&6; }
7377fi
7378
7379
7380  test -n "$HEAD" && break
7381done
7382
7383    else
7384      # If it succeeded, then it was overridden by the user. We will use it
7385      # for the tool.
7386
7387      # First remove it from the list of overridden variables, so we can test
7388      # for unknown variables in the end.
7389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7390
7391      # Check if the provided tool contains a complete path.
7392      tool_specified="$HEAD"
7393      tool_basename="${tool_specified##*/}"
7394      if test "x$tool_basename" = "x$tool_specified"; then
7395        # A command without a complete path is provided, search $PATH.
7396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7397$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7398        # Extract the first word of "$tool_basename", so it can be a program name with args.
7399set dummy $tool_basename; ac_word=$2
7400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7401$as_echo_n "checking for $ac_word... " >&6; }
7402if ${ac_cv_path_HEAD+:} false; then :
7403  $as_echo_n "(cached) " >&6
7404else
7405  case $HEAD in
7406  [\\/]* | ?:[\\/]*)
7407  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7408  ;;
7409  *)
7410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7411for as_dir in $PATH
7412do
7413  IFS=$as_save_IFS
7414  test -z "$as_dir" && as_dir=.
7415    for ac_exec_ext in '' $ac_executable_extensions; do
7416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7417    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7419    break 2
7420  fi
7421done
7422  done
7423IFS=$as_save_IFS
7424
7425  ;;
7426esac
7427fi
7428HEAD=$ac_cv_path_HEAD
7429if test -n "$HEAD"; then
7430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7431$as_echo "$HEAD" >&6; }
7432else
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7434$as_echo "no" >&6; }
7435fi
7436
7437
7438        if test "x$HEAD" = x; then
7439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7440        fi
7441      else
7442        # Otherwise we believe it is a complete path. Use it as it is.
7443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7444$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7446$as_echo_n "checking for HEAD... " >&6; }
7447        if test ! -x "$tool_specified"; then
7448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7449$as_echo "not found" >&6; }
7450          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7451        fi
7452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7453$as_echo "$tool_specified" >&6; }
7454      fi
7455    fi
7456  fi
7457
7458
7459
7460  if test "x$HEAD" = x; then
7461    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7462  fi
7463
7464
7465
7466
7467
7468  # Publish this variable in the help.
7469
7470
7471  if test "x$LN" = x; then
7472    # The variable is not set by user, try to locate tool using the code snippet
7473    for ac_prog in ln
7474do
7475  # Extract the first word of "$ac_prog", so it can be a program name with args.
7476set dummy $ac_prog; ac_word=$2
7477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7478$as_echo_n "checking for $ac_word... " >&6; }
7479if ${ac_cv_path_LN+:} false; then :
7480  $as_echo_n "(cached) " >&6
7481else
7482  case $LN in
7483  [\\/]* | ?:[\\/]*)
7484  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7485  ;;
7486  *)
7487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7488for as_dir in $PATH
7489do
7490  IFS=$as_save_IFS
7491  test -z "$as_dir" && as_dir=.
7492    for ac_exec_ext in '' $ac_executable_extensions; do
7493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7494    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7496    break 2
7497  fi
7498done
7499  done
7500IFS=$as_save_IFS
7501
7502  ;;
7503esac
7504fi
7505LN=$ac_cv_path_LN
7506if test -n "$LN"; then
7507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7508$as_echo "$LN" >&6; }
7509else
7510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7511$as_echo "no" >&6; }
7512fi
7513
7514
7515  test -n "$LN" && break
7516done
7517
7518  else
7519    # The variable is set, but is it from the command line or the environment?
7520
7521    # Try to remove the string !LN! from our list.
7522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7524      # If it failed, the variable was not from the command line. Ignore it,
7525      # but warn the user (except for BASH, which is always set by the calling BASH).
7526      if test "xLN" != xBASH; then
7527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7528$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7529      fi
7530      # Try to locate tool using the code snippet
7531      for ac_prog in ln
7532do
7533  # Extract the first word of "$ac_prog", so it can be a program name with args.
7534set dummy $ac_prog; ac_word=$2
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536$as_echo_n "checking for $ac_word... " >&6; }
7537if ${ac_cv_path_LN+:} false; then :
7538  $as_echo_n "(cached) " >&6
7539else
7540  case $LN in
7541  [\\/]* | ?:[\\/]*)
7542  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7543  ;;
7544  *)
7545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546for as_dir in $PATH
7547do
7548  IFS=$as_save_IFS
7549  test -z "$as_dir" && as_dir=.
7550    for ac_exec_ext in '' $ac_executable_extensions; do
7551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7552    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7554    break 2
7555  fi
7556done
7557  done
7558IFS=$as_save_IFS
7559
7560  ;;
7561esac
7562fi
7563LN=$ac_cv_path_LN
7564if test -n "$LN"; then
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7566$as_echo "$LN" >&6; }
7567else
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
7570fi
7571
7572
7573  test -n "$LN" && break
7574done
7575
7576    else
7577      # If it succeeded, then it was overridden by the user. We will use it
7578      # for the tool.
7579
7580      # First remove it from the list of overridden variables, so we can test
7581      # for unknown variables in the end.
7582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7583
7584      # Check if the provided tool contains a complete path.
7585      tool_specified="$LN"
7586      tool_basename="${tool_specified##*/}"
7587      if test "x$tool_basename" = "x$tool_specified"; then
7588        # A command without a complete path is provided, search $PATH.
7589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7590$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7591        # Extract the first word of "$tool_basename", so it can be a program name with args.
7592set dummy $tool_basename; ac_word=$2
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7594$as_echo_n "checking for $ac_word... " >&6; }
7595if ${ac_cv_path_LN+:} false; then :
7596  $as_echo_n "(cached) " >&6
7597else
7598  case $LN in
7599  [\\/]* | ?:[\\/]*)
7600  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7601  ;;
7602  *)
7603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7604for as_dir in $PATH
7605do
7606  IFS=$as_save_IFS
7607  test -z "$as_dir" && as_dir=.
7608    for ac_exec_ext in '' $ac_executable_extensions; do
7609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7610    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7612    break 2
7613  fi
7614done
7615  done
7616IFS=$as_save_IFS
7617
7618  ;;
7619esac
7620fi
7621LN=$ac_cv_path_LN
7622if test -n "$LN"; then
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7624$as_echo "$LN" >&6; }
7625else
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7627$as_echo "no" >&6; }
7628fi
7629
7630
7631        if test "x$LN" = x; then
7632          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7633        fi
7634      else
7635        # Otherwise we believe it is a complete path. Use it as it is.
7636        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7637$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7639$as_echo_n "checking for LN... " >&6; }
7640        if test ! -x "$tool_specified"; then
7641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7642$as_echo "not found" >&6; }
7643          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7644        fi
7645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7646$as_echo "$tool_specified" >&6; }
7647      fi
7648    fi
7649  fi
7650
7651
7652
7653  if test "x$LN" = x; then
7654    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7655  fi
7656
7657
7658
7659
7660
7661  # Publish this variable in the help.
7662
7663
7664  if test "x$LS" = x; then
7665    # The variable is not set by user, try to locate tool using the code snippet
7666    for ac_prog in ls
7667do
7668  # Extract the first word of "$ac_prog", so it can be a program name with args.
7669set dummy $ac_prog; ac_word=$2
7670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7671$as_echo_n "checking for $ac_word... " >&6; }
7672if ${ac_cv_path_LS+:} false; then :
7673  $as_echo_n "(cached) " >&6
7674else
7675  case $LS in
7676  [\\/]* | ?:[\\/]*)
7677  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7678  ;;
7679  *)
7680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681for as_dir in $PATH
7682do
7683  IFS=$as_save_IFS
7684  test -z "$as_dir" && as_dir=.
7685    for ac_exec_ext in '' $ac_executable_extensions; do
7686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7687    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7689    break 2
7690  fi
7691done
7692  done
7693IFS=$as_save_IFS
7694
7695  ;;
7696esac
7697fi
7698LS=$ac_cv_path_LS
7699if test -n "$LS"; then
7700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7701$as_echo "$LS" >&6; }
7702else
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704$as_echo "no" >&6; }
7705fi
7706
7707
7708  test -n "$LS" && break
7709done
7710
7711  else
7712    # The variable is set, but is it from the command line or the environment?
7713
7714    # Try to remove the string !LS! from our list.
7715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7717      # If it failed, the variable was not from the command line. Ignore it,
7718      # but warn the user (except for BASH, which is always set by the calling BASH).
7719      if test "xLS" != xBASH; then
7720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7721$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7722      fi
7723      # Try to locate tool using the code snippet
7724      for ac_prog in ls
7725do
7726  # Extract the first word of "$ac_prog", so it can be a program name with args.
7727set dummy $ac_prog; ac_word=$2
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7729$as_echo_n "checking for $ac_word... " >&6; }
7730if ${ac_cv_path_LS+:} false; then :
7731  $as_echo_n "(cached) " >&6
7732else
7733  case $LS in
7734  [\\/]* | ?:[\\/]*)
7735  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7736  ;;
7737  *)
7738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7739for as_dir in $PATH
7740do
7741  IFS=$as_save_IFS
7742  test -z "$as_dir" && as_dir=.
7743    for ac_exec_ext in '' $ac_executable_extensions; do
7744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7745    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7747    break 2
7748  fi
7749done
7750  done
7751IFS=$as_save_IFS
7752
7753  ;;
7754esac
7755fi
7756LS=$ac_cv_path_LS
7757if test -n "$LS"; then
7758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7759$as_echo "$LS" >&6; }
7760else
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7762$as_echo "no" >&6; }
7763fi
7764
7765
7766  test -n "$LS" && break
7767done
7768
7769    else
7770      # If it succeeded, then it was overridden by the user. We will use it
7771      # for the tool.
7772
7773      # First remove it from the list of overridden variables, so we can test
7774      # for unknown variables in the end.
7775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7776
7777      # Check if the provided tool contains a complete path.
7778      tool_specified="$LS"
7779      tool_basename="${tool_specified##*/}"
7780      if test "x$tool_basename" = "x$tool_specified"; then
7781        # A command without a complete path is provided, search $PATH.
7782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7783$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7784        # Extract the first word of "$tool_basename", so it can be a program name with args.
7785set dummy $tool_basename; ac_word=$2
7786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7787$as_echo_n "checking for $ac_word... " >&6; }
7788if ${ac_cv_path_LS+:} false; then :
7789  $as_echo_n "(cached) " >&6
7790else
7791  case $LS in
7792  [\\/]* | ?:[\\/]*)
7793  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7794  ;;
7795  *)
7796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7797for as_dir in $PATH
7798do
7799  IFS=$as_save_IFS
7800  test -z "$as_dir" && as_dir=.
7801    for ac_exec_ext in '' $ac_executable_extensions; do
7802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7803    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7805    break 2
7806  fi
7807done
7808  done
7809IFS=$as_save_IFS
7810
7811  ;;
7812esac
7813fi
7814LS=$ac_cv_path_LS
7815if test -n "$LS"; then
7816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7817$as_echo "$LS" >&6; }
7818else
7819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7820$as_echo "no" >&6; }
7821fi
7822
7823
7824        if test "x$LS" = x; then
7825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7826        fi
7827      else
7828        # Otherwise we believe it is a complete path. Use it as it is.
7829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7830$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7832$as_echo_n "checking for LS... " >&6; }
7833        if test ! -x "$tool_specified"; then
7834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7835$as_echo "not found" >&6; }
7836          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7837        fi
7838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7839$as_echo "$tool_specified" >&6; }
7840      fi
7841    fi
7842  fi
7843
7844
7845
7846  if test "x$LS" = x; then
7847    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7848  fi
7849
7850
7851
7852
7853
7854  # Publish this variable in the help.
7855
7856
7857  if test "x$MKDIR" = x; then
7858    # The variable is not set by user, try to locate tool using the code snippet
7859    for ac_prog in mkdir
7860do
7861  # Extract the first word of "$ac_prog", so it can be a program name with args.
7862set dummy $ac_prog; ac_word=$2
7863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7864$as_echo_n "checking for $ac_word... " >&6; }
7865if ${ac_cv_path_MKDIR+:} false; then :
7866  $as_echo_n "(cached) " >&6
7867else
7868  case $MKDIR in
7869  [\\/]* | ?:[\\/]*)
7870  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7871  ;;
7872  *)
7873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7874for as_dir in $PATH
7875do
7876  IFS=$as_save_IFS
7877  test -z "$as_dir" && as_dir=.
7878    for ac_exec_ext in '' $ac_executable_extensions; do
7879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7880    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7882    break 2
7883  fi
7884done
7885  done
7886IFS=$as_save_IFS
7887
7888  ;;
7889esac
7890fi
7891MKDIR=$ac_cv_path_MKDIR
7892if test -n "$MKDIR"; then
7893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7894$as_echo "$MKDIR" >&6; }
7895else
7896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7897$as_echo "no" >&6; }
7898fi
7899
7900
7901  test -n "$MKDIR" && break
7902done
7903
7904  else
7905    # The variable is set, but is it from the command line or the environment?
7906
7907    # Try to remove the string !MKDIR! from our list.
7908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7910      # If it failed, the variable was not from the command line. Ignore it,
7911      # but warn the user (except for BASH, which is always set by the calling BASH).
7912      if test "xMKDIR" != xBASH; then
7913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7914$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7915      fi
7916      # Try to locate tool using the code snippet
7917      for ac_prog in mkdir
7918do
7919  # Extract the first word of "$ac_prog", so it can be a program name with args.
7920set dummy $ac_prog; ac_word=$2
7921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7922$as_echo_n "checking for $ac_word... " >&6; }
7923if ${ac_cv_path_MKDIR+:} false; then :
7924  $as_echo_n "(cached) " >&6
7925else
7926  case $MKDIR in
7927  [\\/]* | ?:[\\/]*)
7928  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7929  ;;
7930  *)
7931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7932for as_dir in $PATH
7933do
7934  IFS=$as_save_IFS
7935  test -z "$as_dir" && as_dir=.
7936    for ac_exec_ext in '' $ac_executable_extensions; do
7937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7938    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7940    break 2
7941  fi
7942done
7943  done
7944IFS=$as_save_IFS
7945
7946  ;;
7947esac
7948fi
7949MKDIR=$ac_cv_path_MKDIR
7950if test -n "$MKDIR"; then
7951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7952$as_echo "$MKDIR" >&6; }
7953else
7954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7955$as_echo "no" >&6; }
7956fi
7957
7958
7959  test -n "$MKDIR" && break
7960done
7961
7962    else
7963      # If it succeeded, then it was overridden by the user. We will use it
7964      # for the tool.
7965
7966      # First remove it from the list of overridden variables, so we can test
7967      # for unknown variables in the end.
7968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7969
7970      # Check if the provided tool contains a complete path.
7971      tool_specified="$MKDIR"
7972      tool_basename="${tool_specified##*/}"
7973      if test "x$tool_basename" = "x$tool_specified"; then
7974        # A command without a complete path is provided, search $PATH.
7975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7976$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7977        # Extract the first word of "$tool_basename", so it can be a program name with args.
7978set dummy $tool_basename; ac_word=$2
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7980$as_echo_n "checking for $ac_word... " >&6; }
7981if ${ac_cv_path_MKDIR+:} false; then :
7982  $as_echo_n "(cached) " >&6
7983else
7984  case $MKDIR in
7985  [\\/]* | ?:[\\/]*)
7986  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7987  ;;
7988  *)
7989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7990for as_dir in $PATH
7991do
7992  IFS=$as_save_IFS
7993  test -z "$as_dir" && as_dir=.
7994    for ac_exec_ext in '' $ac_executable_extensions; do
7995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7996    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7998    break 2
7999  fi
8000done
8001  done
8002IFS=$as_save_IFS
8003
8004  ;;
8005esac
8006fi
8007MKDIR=$ac_cv_path_MKDIR
8008if test -n "$MKDIR"; then
8009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8010$as_echo "$MKDIR" >&6; }
8011else
8012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8013$as_echo "no" >&6; }
8014fi
8015
8016
8017        if test "x$MKDIR" = x; then
8018          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8019        fi
8020      else
8021        # Otherwise we believe it is a complete path. Use it as it is.
8022        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8023$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8025$as_echo_n "checking for MKDIR... " >&6; }
8026        if test ! -x "$tool_specified"; then
8027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8028$as_echo "not found" >&6; }
8029          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8030        fi
8031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8032$as_echo "$tool_specified" >&6; }
8033      fi
8034    fi
8035  fi
8036
8037
8038
8039  if test "x$MKDIR" = x; then
8040    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8041  fi
8042
8043
8044
8045
8046
8047  # Publish this variable in the help.
8048
8049
8050  if test "x$MKTEMP" = x; then
8051    # The variable is not set by user, try to locate tool using the code snippet
8052    for ac_prog in mktemp
8053do
8054  # Extract the first word of "$ac_prog", so it can be a program name with args.
8055set dummy $ac_prog; ac_word=$2
8056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8057$as_echo_n "checking for $ac_word... " >&6; }
8058if ${ac_cv_path_MKTEMP+:} false; then :
8059  $as_echo_n "(cached) " >&6
8060else
8061  case $MKTEMP in
8062  [\\/]* | ?:[\\/]*)
8063  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8064  ;;
8065  *)
8066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8067for as_dir in $PATH
8068do
8069  IFS=$as_save_IFS
8070  test -z "$as_dir" && as_dir=.
8071    for ac_exec_ext in '' $ac_executable_extensions; do
8072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8073    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8075    break 2
8076  fi
8077done
8078  done
8079IFS=$as_save_IFS
8080
8081  ;;
8082esac
8083fi
8084MKTEMP=$ac_cv_path_MKTEMP
8085if test -n "$MKTEMP"; then
8086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8087$as_echo "$MKTEMP" >&6; }
8088else
8089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8090$as_echo "no" >&6; }
8091fi
8092
8093
8094  test -n "$MKTEMP" && break
8095done
8096
8097  else
8098    # The variable is set, but is it from the command line or the environment?
8099
8100    # Try to remove the string !MKTEMP! from our list.
8101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8103      # If it failed, the variable was not from the command line. Ignore it,
8104      # but warn the user (except for BASH, which is always set by the calling BASH).
8105      if test "xMKTEMP" != xBASH; then
8106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8107$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8108      fi
8109      # Try to locate tool using the code snippet
8110      for ac_prog in mktemp
8111do
8112  # Extract the first word of "$ac_prog", so it can be a program name with args.
8113set dummy $ac_prog; ac_word=$2
8114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8115$as_echo_n "checking for $ac_word... " >&6; }
8116if ${ac_cv_path_MKTEMP+:} false; then :
8117  $as_echo_n "(cached) " >&6
8118else
8119  case $MKTEMP in
8120  [\\/]* | ?:[\\/]*)
8121  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8122  ;;
8123  *)
8124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8125for as_dir in $PATH
8126do
8127  IFS=$as_save_IFS
8128  test -z "$as_dir" && as_dir=.
8129    for ac_exec_ext in '' $ac_executable_extensions; do
8130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8131    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8133    break 2
8134  fi
8135done
8136  done
8137IFS=$as_save_IFS
8138
8139  ;;
8140esac
8141fi
8142MKTEMP=$ac_cv_path_MKTEMP
8143if test -n "$MKTEMP"; then
8144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8145$as_echo "$MKTEMP" >&6; }
8146else
8147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8148$as_echo "no" >&6; }
8149fi
8150
8151
8152  test -n "$MKTEMP" && break
8153done
8154
8155    else
8156      # If it succeeded, then it was overridden by the user. We will use it
8157      # for the tool.
8158
8159      # First remove it from the list of overridden variables, so we can test
8160      # for unknown variables in the end.
8161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8162
8163      # Check if the provided tool contains a complete path.
8164      tool_specified="$MKTEMP"
8165      tool_basename="${tool_specified##*/}"
8166      if test "x$tool_basename" = "x$tool_specified"; then
8167        # A command without a complete path is provided, search $PATH.
8168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8169$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8170        # Extract the first word of "$tool_basename", so it can be a program name with args.
8171set dummy $tool_basename; ac_word=$2
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8173$as_echo_n "checking for $ac_word... " >&6; }
8174if ${ac_cv_path_MKTEMP+:} false; then :
8175  $as_echo_n "(cached) " >&6
8176else
8177  case $MKTEMP in
8178  [\\/]* | ?:[\\/]*)
8179  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8180  ;;
8181  *)
8182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8183for as_dir in $PATH
8184do
8185  IFS=$as_save_IFS
8186  test -z "$as_dir" && as_dir=.
8187    for ac_exec_ext in '' $ac_executable_extensions; do
8188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8189    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8191    break 2
8192  fi
8193done
8194  done
8195IFS=$as_save_IFS
8196
8197  ;;
8198esac
8199fi
8200MKTEMP=$ac_cv_path_MKTEMP
8201if test -n "$MKTEMP"; then
8202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8203$as_echo "$MKTEMP" >&6; }
8204else
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
8207fi
8208
8209
8210        if test "x$MKTEMP" = x; then
8211          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8212        fi
8213      else
8214        # Otherwise we believe it is a complete path. Use it as it is.
8215        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8216$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8218$as_echo_n "checking for MKTEMP... " >&6; }
8219        if test ! -x "$tool_specified"; then
8220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8221$as_echo "not found" >&6; }
8222          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8223        fi
8224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8225$as_echo "$tool_specified" >&6; }
8226      fi
8227    fi
8228  fi
8229
8230
8231
8232  if test "x$MKTEMP" = x; then
8233    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8234  fi
8235
8236
8237
8238
8239
8240  # Publish this variable in the help.
8241
8242
8243  if test "x$MV" = x; then
8244    # The variable is not set by user, try to locate tool using the code snippet
8245    for ac_prog in mv
8246do
8247  # Extract the first word of "$ac_prog", so it can be a program name with args.
8248set dummy $ac_prog; ac_word=$2
8249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8250$as_echo_n "checking for $ac_word... " >&6; }
8251if ${ac_cv_path_MV+:} false; then :
8252  $as_echo_n "(cached) " >&6
8253else
8254  case $MV in
8255  [\\/]* | ?:[\\/]*)
8256  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8257  ;;
8258  *)
8259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8260for as_dir in $PATH
8261do
8262  IFS=$as_save_IFS
8263  test -z "$as_dir" && as_dir=.
8264    for ac_exec_ext in '' $ac_executable_extensions; do
8265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8266    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8268    break 2
8269  fi
8270done
8271  done
8272IFS=$as_save_IFS
8273
8274  ;;
8275esac
8276fi
8277MV=$ac_cv_path_MV
8278if test -n "$MV"; then
8279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8280$as_echo "$MV" >&6; }
8281else
8282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283$as_echo "no" >&6; }
8284fi
8285
8286
8287  test -n "$MV" && break
8288done
8289
8290  else
8291    # The variable is set, but is it from the command line or the environment?
8292
8293    # Try to remove the string !MV! from our list.
8294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8296      # If it failed, the variable was not from the command line. Ignore it,
8297      # but warn the user (except for BASH, which is always set by the calling BASH).
8298      if test "xMV" != xBASH; then
8299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8300$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8301      fi
8302      # Try to locate tool using the code snippet
8303      for ac_prog in mv
8304do
8305  # Extract the first word of "$ac_prog", so it can be a program name with args.
8306set dummy $ac_prog; ac_word=$2
8307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8308$as_echo_n "checking for $ac_word... " >&6; }
8309if ${ac_cv_path_MV+:} false; then :
8310  $as_echo_n "(cached) " >&6
8311else
8312  case $MV in
8313  [\\/]* | ?:[\\/]*)
8314  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8315  ;;
8316  *)
8317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8318for as_dir in $PATH
8319do
8320  IFS=$as_save_IFS
8321  test -z "$as_dir" && as_dir=.
8322    for ac_exec_ext in '' $ac_executable_extensions; do
8323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8324    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8326    break 2
8327  fi
8328done
8329  done
8330IFS=$as_save_IFS
8331
8332  ;;
8333esac
8334fi
8335MV=$ac_cv_path_MV
8336if test -n "$MV"; then
8337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8338$as_echo "$MV" >&6; }
8339else
8340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8341$as_echo "no" >&6; }
8342fi
8343
8344
8345  test -n "$MV" && break
8346done
8347
8348    else
8349      # If it succeeded, then it was overridden by the user. We will use it
8350      # for the tool.
8351
8352      # First remove it from the list of overridden variables, so we can test
8353      # for unknown variables in the end.
8354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8355
8356      # Check if the provided tool contains a complete path.
8357      tool_specified="$MV"
8358      tool_basename="${tool_specified##*/}"
8359      if test "x$tool_basename" = "x$tool_specified"; then
8360        # A command without a complete path is provided, search $PATH.
8361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8362$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8363        # Extract the first word of "$tool_basename", so it can be a program name with args.
8364set dummy $tool_basename; ac_word=$2
8365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8366$as_echo_n "checking for $ac_word... " >&6; }
8367if ${ac_cv_path_MV+:} false; then :
8368  $as_echo_n "(cached) " >&6
8369else
8370  case $MV in
8371  [\\/]* | ?:[\\/]*)
8372  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8373  ;;
8374  *)
8375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8376for as_dir in $PATH
8377do
8378  IFS=$as_save_IFS
8379  test -z "$as_dir" && as_dir=.
8380    for ac_exec_ext in '' $ac_executable_extensions; do
8381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8382    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8384    break 2
8385  fi
8386done
8387  done
8388IFS=$as_save_IFS
8389
8390  ;;
8391esac
8392fi
8393MV=$ac_cv_path_MV
8394if test -n "$MV"; then
8395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8396$as_echo "$MV" >&6; }
8397else
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8399$as_echo "no" >&6; }
8400fi
8401
8402
8403        if test "x$MV" = x; then
8404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8405        fi
8406      else
8407        # Otherwise we believe it is a complete path. Use it as it is.
8408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8409$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8411$as_echo_n "checking for MV... " >&6; }
8412        if test ! -x "$tool_specified"; then
8413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8414$as_echo "not found" >&6; }
8415          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8416        fi
8417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8418$as_echo "$tool_specified" >&6; }
8419      fi
8420    fi
8421  fi
8422
8423
8424
8425  if test "x$MV" = x; then
8426    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8427  fi
8428
8429
8430
8431
8432
8433  # Publish this variable in the help.
8434
8435
8436  if test "x$NAWK" = x; then
8437    # The variable is not set by user, try to locate tool using the code snippet
8438    for ac_prog in nawk gawk awk
8439do
8440  # Extract the first word of "$ac_prog", so it can be a program name with args.
8441set dummy $ac_prog; ac_word=$2
8442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8443$as_echo_n "checking for $ac_word... " >&6; }
8444if ${ac_cv_path_NAWK+:} false; then :
8445  $as_echo_n "(cached) " >&6
8446else
8447  case $NAWK in
8448  [\\/]* | ?:[\\/]*)
8449  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8450  ;;
8451  *)
8452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8453for as_dir in $PATH
8454do
8455  IFS=$as_save_IFS
8456  test -z "$as_dir" && as_dir=.
8457    for ac_exec_ext in '' $ac_executable_extensions; do
8458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8459    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8461    break 2
8462  fi
8463done
8464  done
8465IFS=$as_save_IFS
8466
8467  ;;
8468esac
8469fi
8470NAWK=$ac_cv_path_NAWK
8471if test -n "$NAWK"; then
8472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8473$as_echo "$NAWK" >&6; }
8474else
8475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8476$as_echo "no" >&6; }
8477fi
8478
8479
8480  test -n "$NAWK" && break
8481done
8482
8483  else
8484    # The variable is set, but is it from the command line or the environment?
8485
8486    # Try to remove the string !NAWK! from our list.
8487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8489      # If it failed, the variable was not from the command line. Ignore it,
8490      # but warn the user (except for BASH, which is always set by the calling BASH).
8491      if test "xNAWK" != xBASH; then
8492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8493$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8494      fi
8495      # Try to locate tool using the code snippet
8496      for ac_prog in nawk gawk awk
8497do
8498  # Extract the first word of "$ac_prog", so it can be a program name with args.
8499set dummy $ac_prog; ac_word=$2
8500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8501$as_echo_n "checking for $ac_word... " >&6; }
8502if ${ac_cv_path_NAWK+:} false; then :
8503  $as_echo_n "(cached) " >&6
8504else
8505  case $NAWK in
8506  [\\/]* | ?:[\\/]*)
8507  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8508  ;;
8509  *)
8510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8511for as_dir in $PATH
8512do
8513  IFS=$as_save_IFS
8514  test -z "$as_dir" && as_dir=.
8515    for ac_exec_ext in '' $ac_executable_extensions; do
8516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8517    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8519    break 2
8520  fi
8521done
8522  done
8523IFS=$as_save_IFS
8524
8525  ;;
8526esac
8527fi
8528NAWK=$ac_cv_path_NAWK
8529if test -n "$NAWK"; then
8530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8531$as_echo "$NAWK" >&6; }
8532else
8533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8534$as_echo "no" >&6; }
8535fi
8536
8537
8538  test -n "$NAWK" && break
8539done
8540
8541    else
8542      # If it succeeded, then it was overridden by the user. We will use it
8543      # for the tool.
8544
8545      # First remove it from the list of overridden variables, so we can test
8546      # for unknown variables in the end.
8547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8548
8549      # Check if the provided tool contains a complete path.
8550      tool_specified="$NAWK"
8551      tool_basename="${tool_specified##*/}"
8552      if test "x$tool_basename" = "x$tool_specified"; then
8553        # A command without a complete path is provided, search $PATH.
8554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8555$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8556        # Extract the first word of "$tool_basename", so it can be a program name with args.
8557set dummy $tool_basename; ac_word=$2
8558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8559$as_echo_n "checking for $ac_word... " >&6; }
8560if ${ac_cv_path_NAWK+:} false; then :
8561  $as_echo_n "(cached) " >&6
8562else
8563  case $NAWK in
8564  [\\/]* | ?:[\\/]*)
8565  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8566  ;;
8567  *)
8568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8569for as_dir in $PATH
8570do
8571  IFS=$as_save_IFS
8572  test -z "$as_dir" && as_dir=.
8573    for ac_exec_ext in '' $ac_executable_extensions; do
8574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8575    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8577    break 2
8578  fi
8579done
8580  done
8581IFS=$as_save_IFS
8582
8583  ;;
8584esac
8585fi
8586NAWK=$ac_cv_path_NAWK
8587if test -n "$NAWK"; then
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8589$as_echo "$NAWK" >&6; }
8590else
8591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8592$as_echo "no" >&6; }
8593fi
8594
8595
8596        if test "x$NAWK" = x; then
8597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8598        fi
8599      else
8600        # Otherwise we believe it is a complete path. Use it as it is.
8601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8602$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8604$as_echo_n "checking for NAWK... " >&6; }
8605        if test ! -x "$tool_specified"; then
8606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8607$as_echo "not found" >&6; }
8608          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8609        fi
8610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8611$as_echo "$tool_specified" >&6; }
8612      fi
8613    fi
8614  fi
8615
8616
8617
8618  if test "x$NAWK" = x; then
8619    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8620  fi
8621
8622
8623
8624
8625
8626  # Publish this variable in the help.
8627
8628
8629  if test "x$PRINTF" = x; then
8630    # The variable is not set by user, try to locate tool using the code snippet
8631    for ac_prog in printf
8632do
8633  # Extract the first word of "$ac_prog", so it can be a program name with args.
8634set dummy $ac_prog; ac_word=$2
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8636$as_echo_n "checking for $ac_word... " >&6; }
8637if ${ac_cv_path_PRINTF+:} false; then :
8638  $as_echo_n "(cached) " >&6
8639else
8640  case $PRINTF in
8641  [\\/]* | ?:[\\/]*)
8642  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8643  ;;
8644  *)
8645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8646for as_dir in $PATH
8647do
8648  IFS=$as_save_IFS
8649  test -z "$as_dir" && as_dir=.
8650    for ac_exec_ext in '' $ac_executable_extensions; do
8651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8652    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8654    break 2
8655  fi
8656done
8657  done
8658IFS=$as_save_IFS
8659
8660  ;;
8661esac
8662fi
8663PRINTF=$ac_cv_path_PRINTF
8664if test -n "$PRINTF"; then
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8666$as_echo "$PRINTF" >&6; }
8667else
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8669$as_echo "no" >&6; }
8670fi
8671
8672
8673  test -n "$PRINTF" && break
8674done
8675
8676  else
8677    # The variable is set, but is it from the command line or the environment?
8678
8679    # Try to remove the string !PRINTF! from our list.
8680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8682      # If it failed, the variable was not from the command line. Ignore it,
8683      # but warn the user (except for BASH, which is always set by the calling BASH).
8684      if test "xPRINTF" != xBASH; then
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8686$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8687      fi
8688      # Try to locate tool using the code snippet
8689      for ac_prog in printf
8690do
8691  # Extract the first word of "$ac_prog", so it can be a program name with args.
8692set dummy $ac_prog; ac_word=$2
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8694$as_echo_n "checking for $ac_word... " >&6; }
8695if ${ac_cv_path_PRINTF+:} false; then :
8696  $as_echo_n "(cached) " >&6
8697else
8698  case $PRINTF in
8699  [\\/]* | ?:[\\/]*)
8700  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8701  ;;
8702  *)
8703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704for as_dir in $PATH
8705do
8706  IFS=$as_save_IFS
8707  test -z "$as_dir" && as_dir=.
8708    for ac_exec_ext in '' $ac_executable_extensions; do
8709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8710    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8712    break 2
8713  fi
8714done
8715  done
8716IFS=$as_save_IFS
8717
8718  ;;
8719esac
8720fi
8721PRINTF=$ac_cv_path_PRINTF
8722if test -n "$PRINTF"; then
8723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8724$as_echo "$PRINTF" >&6; }
8725else
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8727$as_echo "no" >&6; }
8728fi
8729
8730
8731  test -n "$PRINTF" && break
8732done
8733
8734    else
8735      # If it succeeded, then it was overridden by the user. We will use it
8736      # for the tool.
8737
8738      # First remove it from the list of overridden variables, so we can test
8739      # for unknown variables in the end.
8740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8741
8742      # Check if the provided tool contains a complete path.
8743      tool_specified="$PRINTF"
8744      tool_basename="${tool_specified##*/}"
8745      if test "x$tool_basename" = "x$tool_specified"; then
8746        # A command without a complete path is provided, search $PATH.
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8748$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8749        # Extract the first word of "$tool_basename", so it can be a program name with args.
8750set dummy $tool_basename; ac_word=$2
8751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8752$as_echo_n "checking for $ac_word... " >&6; }
8753if ${ac_cv_path_PRINTF+:} false; then :
8754  $as_echo_n "(cached) " >&6
8755else
8756  case $PRINTF in
8757  [\\/]* | ?:[\\/]*)
8758  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8759  ;;
8760  *)
8761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8762for as_dir in $PATH
8763do
8764  IFS=$as_save_IFS
8765  test -z "$as_dir" && as_dir=.
8766    for ac_exec_ext in '' $ac_executable_extensions; do
8767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8768    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8770    break 2
8771  fi
8772done
8773  done
8774IFS=$as_save_IFS
8775
8776  ;;
8777esac
8778fi
8779PRINTF=$ac_cv_path_PRINTF
8780if test -n "$PRINTF"; then
8781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8782$as_echo "$PRINTF" >&6; }
8783else
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8785$as_echo "no" >&6; }
8786fi
8787
8788
8789        if test "x$PRINTF" = x; then
8790          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8791        fi
8792      else
8793        # Otherwise we believe it is a complete path. Use it as it is.
8794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8795$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8797$as_echo_n "checking for PRINTF... " >&6; }
8798        if test ! -x "$tool_specified"; then
8799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8800$as_echo "not found" >&6; }
8801          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8802        fi
8803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8804$as_echo "$tool_specified" >&6; }
8805      fi
8806    fi
8807  fi
8808
8809
8810
8811  if test "x$PRINTF" = x; then
8812    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8813  fi
8814
8815
8816
8817
8818
8819  # Publish this variable in the help.
8820
8821
8822  if test "x$RM" = x; then
8823    # The variable is not set by user, try to locate tool using the code snippet
8824    for ac_prog in rm
8825do
8826  # Extract the first word of "$ac_prog", so it can be a program name with args.
8827set dummy $ac_prog; ac_word=$2
8828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8829$as_echo_n "checking for $ac_word... " >&6; }
8830if ${ac_cv_path_RM+:} false; then :
8831  $as_echo_n "(cached) " >&6
8832else
8833  case $RM in
8834  [\\/]* | ?:[\\/]*)
8835  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8836  ;;
8837  *)
8838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8839for as_dir in $PATH
8840do
8841  IFS=$as_save_IFS
8842  test -z "$as_dir" && as_dir=.
8843    for ac_exec_ext in '' $ac_executable_extensions; do
8844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8845    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8847    break 2
8848  fi
8849done
8850  done
8851IFS=$as_save_IFS
8852
8853  ;;
8854esac
8855fi
8856RM=$ac_cv_path_RM
8857if test -n "$RM"; then
8858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8859$as_echo "$RM" >&6; }
8860else
8861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8862$as_echo "no" >&6; }
8863fi
8864
8865
8866  test -n "$RM" && break
8867done
8868
8869  else
8870    # The variable is set, but is it from the command line or the environment?
8871
8872    # Try to remove the string !RM! from our list.
8873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8875      # If it failed, the variable was not from the command line. Ignore it,
8876      # but warn the user (except for BASH, which is always set by the calling BASH).
8877      if test "xRM" != xBASH; then
8878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8879$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8880      fi
8881      # Try to locate tool using the code snippet
8882      for ac_prog in rm
8883do
8884  # Extract the first word of "$ac_prog", so it can be a program name with args.
8885set dummy $ac_prog; ac_word=$2
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8887$as_echo_n "checking for $ac_word... " >&6; }
8888if ${ac_cv_path_RM+:} false; then :
8889  $as_echo_n "(cached) " >&6
8890else
8891  case $RM in
8892  [\\/]* | ?:[\\/]*)
8893  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8894  ;;
8895  *)
8896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8897for as_dir in $PATH
8898do
8899  IFS=$as_save_IFS
8900  test -z "$as_dir" && as_dir=.
8901    for ac_exec_ext in '' $ac_executable_extensions; do
8902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8903    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8905    break 2
8906  fi
8907done
8908  done
8909IFS=$as_save_IFS
8910
8911  ;;
8912esac
8913fi
8914RM=$ac_cv_path_RM
8915if test -n "$RM"; then
8916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8917$as_echo "$RM" >&6; }
8918else
8919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8920$as_echo "no" >&6; }
8921fi
8922
8923
8924  test -n "$RM" && break
8925done
8926
8927    else
8928      # If it succeeded, then it was overridden by the user. We will use it
8929      # for the tool.
8930
8931      # First remove it from the list of overridden variables, so we can test
8932      # for unknown variables in the end.
8933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8934
8935      # Check if the provided tool contains a complete path.
8936      tool_specified="$RM"
8937      tool_basename="${tool_specified##*/}"
8938      if test "x$tool_basename" = "x$tool_specified"; then
8939        # A command without a complete path is provided, search $PATH.
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8941$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8942        # Extract the first word of "$tool_basename", so it can be a program name with args.
8943set dummy $tool_basename; ac_word=$2
8944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8945$as_echo_n "checking for $ac_word... " >&6; }
8946if ${ac_cv_path_RM+:} false; then :
8947  $as_echo_n "(cached) " >&6
8948else
8949  case $RM in
8950  [\\/]* | ?:[\\/]*)
8951  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8952  ;;
8953  *)
8954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8955for as_dir in $PATH
8956do
8957  IFS=$as_save_IFS
8958  test -z "$as_dir" && as_dir=.
8959    for ac_exec_ext in '' $ac_executable_extensions; do
8960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8961    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8963    break 2
8964  fi
8965done
8966  done
8967IFS=$as_save_IFS
8968
8969  ;;
8970esac
8971fi
8972RM=$ac_cv_path_RM
8973if test -n "$RM"; then
8974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8975$as_echo "$RM" >&6; }
8976else
8977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8978$as_echo "no" >&6; }
8979fi
8980
8981
8982        if test "x$RM" = x; then
8983          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8984        fi
8985      else
8986        # Otherwise we believe it is a complete path. Use it as it is.
8987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8988$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8990$as_echo_n "checking for RM... " >&6; }
8991        if test ! -x "$tool_specified"; then
8992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8993$as_echo "not found" >&6; }
8994          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8995        fi
8996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8997$as_echo "$tool_specified" >&6; }
8998      fi
8999    fi
9000  fi
9001
9002
9003
9004  if test "x$RM" = x; then
9005    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9006  fi
9007
9008
9009
9010
9011
9012  # Publish this variable in the help.
9013
9014
9015  if test "x$SH" = x; then
9016    # The variable is not set by user, try to locate tool using the code snippet
9017    for ac_prog in sh
9018do
9019  # Extract the first word of "$ac_prog", so it can be a program name with args.
9020set dummy $ac_prog; ac_word=$2
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9022$as_echo_n "checking for $ac_word... " >&6; }
9023if ${ac_cv_path_SH+:} false; then :
9024  $as_echo_n "(cached) " >&6
9025else
9026  case $SH in
9027  [\\/]* | ?:[\\/]*)
9028  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9029  ;;
9030  *)
9031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9032for as_dir in $PATH
9033do
9034  IFS=$as_save_IFS
9035  test -z "$as_dir" && as_dir=.
9036    for ac_exec_ext in '' $ac_executable_extensions; do
9037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9038    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9040    break 2
9041  fi
9042done
9043  done
9044IFS=$as_save_IFS
9045
9046  ;;
9047esac
9048fi
9049SH=$ac_cv_path_SH
9050if test -n "$SH"; then
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9052$as_echo "$SH" >&6; }
9053else
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055$as_echo "no" >&6; }
9056fi
9057
9058
9059  test -n "$SH" && break
9060done
9061
9062  else
9063    # The variable is set, but is it from the command line or the environment?
9064
9065    # Try to remove the string !SH! from our list.
9066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9068      # If it failed, the variable was not from the command line. Ignore it,
9069      # but warn the user (except for BASH, which is always set by the calling BASH).
9070      if test "xSH" != xBASH; then
9071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9072$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9073      fi
9074      # Try to locate tool using the code snippet
9075      for ac_prog in sh
9076do
9077  # Extract the first word of "$ac_prog", so it can be a program name with args.
9078set dummy $ac_prog; ac_word=$2
9079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9080$as_echo_n "checking for $ac_word... " >&6; }
9081if ${ac_cv_path_SH+:} false; then :
9082  $as_echo_n "(cached) " >&6
9083else
9084  case $SH in
9085  [\\/]* | ?:[\\/]*)
9086  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9087  ;;
9088  *)
9089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9090for as_dir in $PATH
9091do
9092  IFS=$as_save_IFS
9093  test -z "$as_dir" && as_dir=.
9094    for ac_exec_ext in '' $ac_executable_extensions; do
9095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9096    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9098    break 2
9099  fi
9100done
9101  done
9102IFS=$as_save_IFS
9103
9104  ;;
9105esac
9106fi
9107SH=$ac_cv_path_SH
9108if test -n "$SH"; then
9109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9110$as_echo "$SH" >&6; }
9111else
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9113$as_echo "no" >&6; }
9114fi
9115
9116
9117  test -n "$SH" && break
9118done
9119
9120    else
9121      # If it succeeded, then it was overridden by the user. We will use it
9122      # for the tool.
9123
9124      # First remove it from the list of overridden variables, so we can test
9125      # for unknown variables in the end.
9126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9127
9128      # Check if the provided tool contains a complete path.
9129      tool_specified="$SH"
9130      tool_basename="${tool_specified##*/}"
9131      if test "x$tool_basename" = "x$tool_specified"; then
9132        # A command without a complete path is provided, search $PATH.
9133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9134$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9135        # Extract the first word of "$tool_basename", so it can be a program name with args.
9136set dummy $tool_basename; ac_word=$2
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9138$as_echo_n "checking for $ac_word... " >&6; }
9139if ${ac_cv_path_SH+:} false; then :
9140  $as_echo_n "(cached) " >&6
9141else
9142  case $SH in
9143  [\\/]* | ?:[\\/]*)
9144  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9145  ;;
9146  *)
9147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9148for as_dir in $PATH
9149do
9150  IFS=$as_save_IFS
9151  test -z "$as_dir" && as_dir=.
9152    for ac_exec_ext in '' $ac_executable_extensions; do
9153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9154    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9156    break 2
9157  fi
9158done
9159  done
9160IFS=$as_save_IFS
9161
9162  ;;
9163esac
9164fi
9165SH=$ac_cv_path_SH
9166if test -n "$SH"; then
9167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9168$as_echo "$SH" >&6; }
9169else
9170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9171$as_echo "no" >&6; }
9172fi
9173
9174
9175        if test "x$SH" = x; then
9176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9177        fi
9178      else
9179        # Otherwise we believe it is a complete path. Use it as it is.
9180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9181$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9183$as_echo_n "checking for SH... " >&6; }
9184        if test ! -x "$tool_specified"; then
9185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9186$as_echo "not found" >&6; }
9187          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9188        fi
9189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9190$as_echo "$tool_specified" >&6; }
9191      fi
9192    fi
9193  fi
9194
9195
9196
9197  if test "x$SH" = x; then
9198    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9199  fi
9200
9201
9202
9203
9204
9205  # Publish this variable in the help.
9206
9207
9208  if test "x$SORT" = x; then
9209    # The variable is not set by user, try to locate tool using the code snippet
9210    for ac_prog in sort
9211do
9212  # Extract the first word of "$ac_prog", so it can be a program name with args.
9213set dummy $ac_prog; ac_word=$2
9214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9215$as_echo_n "checking for $ac_word... " >&6; }
9216if ${ac_cv_path_SORT+:} false; then :
9217  $as_echo_n "(cached) " >&6
9218else
9219  case $SORT in
9220  [\\/]* | ?:[\\/]*)
9221  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9222  ;;
9223  *)
9224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9225for as_dir in $PATH
9226do
9227  IFS=$as_save_IFS
9228  test -z "$as_dir" && as_dir=.
9229    for ac_exec_ext in '' $ac_executable_extensions; do
9230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9231    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9233    break 2
9234  fi
9235done
9236  done
9237IFS=$as_save_IFS
9238
9239  ;;
9240esac
9241fi
9242SORT=$ac_cv_path_SORT
9243if test -n "$SORT"; then
9244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9245$as_echo "$SORT" >&6; }
9246else
9247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9248$as_echo "no" >&6; }
9249fi
9250
9251
9252  test -n "$SORT" && break
9253done
9254
9255  else
9256    # The variable is set, but is it from the command line or the environment?
9257
9258    # Try to remove the string !SORT! from our list.
9259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9261      # If it failed, the variable was not from the command line. Ignore it,
9262      # but warn the user (except for BASH, which is always set by the calling BASH).
9263      if test "xSORT" != xBASH; then
9264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9265$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9266      fi
9267      # Try to locate tool using the code snippet
9268      for ac_prog in sort
9269do
9270  # Extract the first word of "$ac_prog", so it can be a program name with args.
9271set dummy $ac_prog; ac_word=$2
9272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9273$as_echo_n "checking for $ac_word... " >&6; }
9274if ${ac_cv_path_SORT+:} false; then :
9275  $as_echo_n "(cached) " >&6
9276else
9277  case $SORT in
9278  [\\/]* | ?:[\\/]*)
9279  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9280  ;;
9281  *)
9282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9283for as_dir in $PATH
9284do
9285  IFS=$as_save_IFS
9286  test -z "$as_dir" && as_dir=.
9287    for ac_exec_ext in '' $ac_executable_extensions; do
9288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9289    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9291    break 2
9292  fi
9293done
9294  done
9295IFS=$as_save_IFS
9296
9297  ;;
9298esac
9299fi
9300SORT=$ac_cv_path_SORT
9301if test -n "$SORT"; then
9302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9303$as_echo "$SORT" >&6; }
9304else
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9306$as_echo "no" >&6; }
9307fi
9308
9309
9310  test -n "$SORT" && break
9311done
9312
9313    else
9314      # If it succeeded, then it was overridden by the user. We will use it
9315      # for the tool.
9316
9317      # First remove it from the list of overridden variables, so we can test
9318      # for unknown variables in the end.
9319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9320
9321      # Check if the provided tool contains a complete path.
9322      tool_specified="$SORT"
9323      tool_basename="${tool_specified##*/}"
9324      if test "x$tool_basename" = "x$tool_specified"; then
9325        # A command without a complete path is provided, search $PATH.
9326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9327$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9328        # Extract the first word of "$tool_basename", so it can be a program name with args.
9329set dummy $tool_basename; ac_word=$2
9330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9331$as_echo_n "checking for $ac_word... " >&6; }
9332if ${ac_cv_path_SORT+:} false; then :
9333  $as_echo_n "(cached) " >&6
9334else
9335  case $SORT in
9336  [\\/]* | ?:[\\/]*)
9337  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9338  ;;
9339  *)
9340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9341for as_dir in $PATH
9342do
9343  IFS=$as_save_IFS
9344  test -z "$as_dir" && as_dir=.
9345    for ac_exec_ext in '' $ac_executable_extensions; do
9346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9347    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9349    break 2
9350  fi
9351done
9352  done
9353IFS=$as_save_IFS
9354
9355  ;;
9356esac
9357fi
9358SORT=$ac_cv_path_SORT
9359if test -n "$SORT"; then
9360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9361$as_echo "$SORT" >&6; }
9362else
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
9365fi
9366
9367
9368        if test "x$SORT" = x; then
9369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9370        fi
9371      else
9372        # Otherwise we believe it is a complete path. Use it as it is.
9373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9374$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9376$as_echo_n "checking for SORT... " >&6; }
9377        if test ! -x "$tool_specified"; then
9378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9379$as_echo "not found" >&6; }
9380          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9381        fi
9382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9383$as_echo "$tool_specified" >&6; }
9384      fi
9385    fi
9386  fi
9387
9388
9389
9390  if test "x$SORT" = x; then
9391    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9392  fi
9393
9394
9395
9396
9397
9398  # Publish this variable in the help.
9399
9400
9401  if test "x$TAIL" = x; then
9402    # The variable is not set by user, try to locate tool using the code snippet
9403    for ac_prog in tail
9404do
9405  # Extract the first word of "$ac_prog", so it can be a program name with args.
9406set dummy $ac_prog; ac_word=$2
9407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9408$as_echo_n "checking for $ac_word... " >&6; }
9409if ${ac_cv_path_TAIL+:} false; then :
9410  $as_echo_n "(cached) " >&6
9411else
9412  case $TAIL in
9413  [\\/]* | ?:[\\/]*)
9414  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9415  ;;
9416  *)
9417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9418for as_dir in $PATH
9419do
9420  IFS=$as_save_IFS
9421  test -z "$as_dir" && as_dir=.
9422    for ac_exec_ext in '' $ac_executable_extensions; do
9423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9424    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9426    break 2
9427  fi
9428done
9429  done
9430IFS=$as_save_IFS
9431
9432  ;;
9433esac
9434fi
9435TAIL=$ac_cv_path_TAIL
9436if test -n "$TAIL"; then
9437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9438$as_echo "$TAIL" >&6; }
9439else
9440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9441$as_echo "no" >&6; }
9442fi
9443
9444
9445  test -n "$TAIL" && break
9446done
9447
9448  else
9449    # The variable is set, but is it from the command line or the environment?
9450
9451    # Try to remove the string !TAIL! from our list.
9452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9454      # If it failed, the variable was not from the command line. Ignore it,
9455      # but warn the user (except for BASH, which is always set by the calling BASH).
9456      if test "xTAIL" != xBASH; then
9457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9458$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9459      fi
9460      # Try to locate tool using the code snippet
9461      for ac_prog in tail
9462do
9463  # Extract the first word of "$ac_prog", so it can be a program name with args.
9464set dummy $ac_prog; ac_word=$2
9465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9466$as_echo_n "checking for $ac_word... " >&6; }
9467if ${ac_cv_path_TAIL+:} false; then :
9468  $as_echo_n "(cached) " >&6
9469else
9470  case $TAIL in
9471  [\\/]* | ?:[\\/]*)
9472  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9473  ;;
9474  *)
9475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9476for as_dir in $PATH
9477do
9478  IFS=$as_save_IFS
9479  test -z "$as_dir" && as_dir=.
9480    for ac_exec_ext in '' $ac_executable_extensions; do
9481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9482    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9484    break 2
9485  fi
9486done
9487  done
9488IFS=$as_save_IFS
9489
9490  ;;
9491esac
9492fi
9493TAIL=$ac_cv_path_TAIL
9494if test -n "$TAIL"; then
9495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9496$as_echo "$TAIL" >&6; }
9497else
9498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499$as_echo "no" >&6; }
9500fi
9501
9502
9503  test -n "$TAIL" && break
9504done
9505
9506    else
9507      # If it succeeded, then it was overridden by the user. We will use it
9508      # for the tool.
9509
9510      # First remove it from the list of overridden variables, so we can test
9511      # for unknown variables in the end.
9512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9513
9514      # Check if the provided tool contains a complete path.
9515      tool_specified="$TAIL"
9516      tool_basename="${tool_specified##*/}"
9517      if test "x$tool_basename" = "x$tool_specified"; then
9518        # A command without a complete path is provided, search $PATH.
9519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9520$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9521        # Extract the first word of "$tool_basename", so it can be a program name with args.
9522set dummy $tool_basename; ac_word=$2
9523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9524$as_echo_n "checking for $ac_word... " >&6; }
9525if ${ac_cv_path_TAIL+:} false; then :
9526  $as_echo_n "(cached) " >&6
9527else
9528  case $TAIL in
9529  [\\/]* | ?:[\\/]*)
9530  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9531  ;;
9532  *)
9533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9534for as_dir in $PATH
9535do
9536  IFS=$as_save_IFS
9537  test -z "$as_dir" && as_dir=.
9538    for ac_exec_ext in '' $ac_executable_extensions; do
9539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9540    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9542    break 2
9543  fi
9544done
9545  done
9546IFS=$as_save_IFS
9547
9548  ;;
9549esac
9550fi
9551TAIL=$ac_cv_path_TAIL
9552if test -n "$TAIL"; then
9553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9554$as_echo "$TAIL" >&6; }
9555else
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9557$as_echo "no" >&6; }
9558fi
9559
9560
9561        if test "x$TAIL" = x; then
9562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9563        fi
9564      else
9565        # Otherwise we believe it is a complete path. Use it as it is.
9566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9567$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9569$as_echo_n "checking for TAIL... " >&6; }
9570        if test ! -x "$tool_specified"; then
9571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9572$as_echo "not found" >&6; }
9573          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9574        fi
9575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9576$as_echo "$tool_specified" >&6; }
9577      fi
9578    fi
9579  fi
9580
9581
9582
9583  if test "x$TAIL" = x; then
9584    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9585  fi
9586
9587
9588
9589
9590
9591  # Publish this variable in the help.
9592
9593
9594  if test "x$TAR" = x; then
9595    # The variable is not set by user, try to locate tool using the code snippet
9596    for ac_prog in tar
9597do
9598  # Extract the first word of "$ac_prog", so it can be a program name with args.
9599set dummy $ac_prog; ac_word=$2
9600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9601$as_echo_n "checking for $ac_word... " >&6; }
9602if ${ac_cv_path_TAR+:} false; then :
9603  $as_echo_n "(cached) " >&6
9604else
9605  case $TAR in
9606  [\\/]* | ?:[\\/]*)
9607  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9608  ;;
9609  *)
9610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9611for as_dir in $PATH
9612do
9613  IFS=$as_save_IFS
9614  test -z "$as_dir" && as_dir=.
9615    for ac_exec_ext in '' $ac_executable_extensions; do
9616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9617    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9619    break 2
9620  fi
9621done
9622  done
9623IFS=$as_save_IFS
9624
9625  ;;
9626esac
9627fi
9628TAR=$ac_cv_path_TAR
9629if test -n "$TAR"; then
9630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9631$as_echo "$TAR" >&6; }
9632else
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
9635fi
9636
9637
9638  test -n "$TAR" && break
9639done
9640
9641  else
9642    # The variable is set, but is it from the command line or the environment?
9643
9644    # Try to remove the string !TAR! from our list.
9645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9647      # If it failed, the variable was not from the command line. Ignore it,
9648      # but warn the user (except for BASH, which is always set by the calling BASH).
9649      if test "xTAR" != xBASH; then
9650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9651$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9652      fi
9653      # Try to locate tool using the code snippet
9654      for ac_prog in tar
9655do
9656  # Extract the first word of "$ac_prog", so it can be a program name with args.
9657set dummy $ac_prog; ac_word=$2
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9659$as_echo_n "checking for $ac_word... " >&6; }
9660if ${ac_cv_path_TAR+:} false; then :
9661  $as_echo_n "(cached) " >&6
9662else
9663  case $TAR in
9664  [\\/]* | ?:[\\/]*)
9665  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9666  ;;
9667  *)
9668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9669for as_dir in $PATH
9670do
9671  IFS=$as_save_IFS
9672  test -z "$as_dir" && as_dir=.
9673    for ac_exec_ext in '' $ac_executable_extensions; do
9674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9675    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9677    break 2
9678  fi
9679done
9680  done
9681IFS=$as_save_IFS
9682
9683  ;;
9684esac
9685fi
9686TAR=$ac_cv_path_TAR
9687if test -n "$TAR"; then
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9689$as_echo "$TAR" >&6; }
9690else
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692$as_echo "no" >&6; }
9693fi
9694
9695
9696  test -n "$TAR" && break
9697done
9698
9699    else
9700      # If it succeeded, then it was overridden by the user. We will use it
9701      # for the tool.
9702
9703      # First remove it from the list of overridden variables, so we can test
9704      # for unknown variables in the end.
9705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9706
9707      # Check if the provided tool contains a complete path.
9708      tool_specified="$TAR"
9709      tool_basename="${tool_specified##*/}"
9710      if test "x$tool_basename" = "x$tool_specified"; then
9711        # A command without a complete path is provided, search $PATH.
9712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9713$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9714        # Extract the first word of "$tool_basename", so it can be a program name with args.
9715set dummy $tool_basename; ac_word=$2
9716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9717$as_echo_n "checking for $ac_word... " >&6; }
9718if ${ac_cv_path_TAR+:} false; then :
9719  $as_echo_n "(cached) " >&6
9720else
9721  case $TAR in
9722  [\\/]* | ?:[\\/]*)
9723  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9724  ;;
9725  *)
9726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9727for as_dir in $PATH
9728do
9729  IFS=$as_save_IFS
9730  test -z "$as_dir" && as_dir=.
9731    for ac_exec_ext in '' $ac_executable_extensions; do
9732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9733    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9735    break 2
9736  fi
9737done
9738  done
9739IFS=$as_save_IFS
9740
9741  ;;
9742esac
9743fi
9744TAR=$ac_cv_path_TAR
9745if test -n "$TAR"; then
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9747$as_echo "$TAR" >&6; }
9748else
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750$as_echo "no" >&6; }
9751fi
9752
9753
9754        if test "x$TAR" = x; then
9755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9756        fi
9757      else
9758        # Otherwise we believe it is a complete path. Use it as it is.
9759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9760$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9762$as_echo_n "checking for TAR... " >&6; }
9763        if test ! -x "$tool_specified"; then
9764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9765$as_echo "not found" >&6; }
9766          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9767        fi
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9769$as_echo "$tool_specified" >&6; }
9770      fi
9771    fi
9772  fi
9773
9774
9775
9776  if test "x$TAR" = x; then
9777    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9778  fi
9779
9780
9781
9782
9783
9784  # Publish this variable in the help.
9785
9786
9787  if test "x$TEE" = x; then
9788    # The variable is not set by user, try to locate tool using the code snippet
9789    for ac_prog in tee
9790do
9791  # Extract the first word of "$ac_prog", so it can be a program name with args.
9792set dummy $ac_prog; ac_word=$2
9793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9794$as_echo_n "checking for $ac_word... " >&6; }
9795if ${ac_cv_path_TEE+:} false; then :
9796  $as_echo_n "(cached) " >&6
9797else
9798  case $TEE in
9799  [\\/]* | ?:[\\/]*)
9800  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9801  ;;
9802  *)
9803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9804for as_dir in $PATH
9805do
9806  IFS=$as_save_IFS
9807  test -z "$as_dir" && as_dir=.
9808    for ac_exec_ext in '' $ac_executable_extensions; do
9809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9810    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9812    break 2
9813  fi
9814done
9815  done
9816IFS=$as_save_IFS
9817
9818  ;;
9819esac
9820fi
9821TEE=$ac_cv_path_TEE
9822if test -n "$TEE"; then
9823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9824$as_echo "$TEE" >&6; }
9825else
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9827$as_echo "no" >&6; }
9828fi
9829
9830
9831  test -n "$TEE" && break
9832done
9833
9834  else
9835    # The variable is set, but is it from the command line or the environment?
9836
9837    # Try to remove the string !TEE! from our list.
9838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9840      # If it failed, the variable was not from the command line. Ignore it,
9841      # but warn the user (except for BASH, which is always set by the calling BASH).
9842      if test "xTEE" != xBASH; then
9843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9844$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9845      fi
9846      # Try to locate tool using the code snippet
9847      for ac_prog in tee
9848do
9849  # Extract the first word of "$ac_prog", so it can be a program name with args.
9850set dummy $ac_prog; ac_word=$2
9851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852$as_echo_n "checking for $ac_word... " >&6; }
9853if ${ac_cv_path_TEE+:} false; then :
9854  $as_echo_n "(cached) " >&6
9855else
9856  case $TEE in
9857  [\\/]* | ?:[\\/]*)
9858  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9859  ;;
9860  *)
9861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9862for as_dir in $PATH
9863do
9864  IFS=$as_save_IFS
9865  test -z "$as_dir" && as_dir=.
9866    for ac_exec_ext in '' $ac_executable_extensions; do
9867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9868    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9870    break 2
9871  fi
9872done
9873  done
9874IFS=$as_save_IFS
9875
9876  ;;
9877esac
9878fi
9879TEE=$ac_cv_path_TEE
9880if test -n "$TEE"; then
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9882$as_echo "$TEE" >&6; }
9883else
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9885$as_echo "no" >&6; }
9886fi
9887
9888
9889  test -n "$TEE" && break
9890done
9891
9892    else
9893      # If it succeeded, then it was overridden by the user. We will use it
9894      # for the tool.
9895
9896      # First remove it from the list of overridden variables, so we can test
9897      # for unknown variables in the end.
9898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9899
9900      # Check if the provided tool contains a complete path.
9901      tool_specified="$TEE"
9902      tool_basename="${tool_specified##*/}"
9903      if test "x$tool_basename" = "x$tool_specified"; then
9904        # A command without a complete path is provided, search $PATH.
9905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9906$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9907        # Extract the first word of "$tool_basename", so it can be a program name with args.
9908set dummy $tool_basename; ac_word=$2
9909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9910$as_echo_n "checking for $ac_word... " >&6; }
9911if ${ac_cv_path_TEE+:} false; then :
9912  $as_echo_n "(cached) " >&6
9913else
9914  case $TEE in
9915  [\\/]* | ?:[\\/]*)
9916  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9917  ;;
9918  *)
9919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9920for as_dir in $PATH
9921do
9922  IFS=$as_save_IFS
9923  test -z "$as_dir" && as_dir=.
9924    for ac_exec_ext in '' $ac_executable_extensions; do
9925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9926    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9928    break 2
9929  fi
9930done
9931  done
9932IFS=$as_save_IFS
9933
9934  ;;
9935esac
9936fi
9937TEE=$ac_cv_path_TEE
9938if test -n "$TEE"; then
9939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9940$as_echo "$TEE" >&6; }
9941else
9942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943$as_echo "no" >&6; }
9944fi
9945
9946
9947        if test "x$TEE" = x; then
9948          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9949        fi
9950      else
9951        # Otherwise we believe it is a complete path. Use it as it is.
9952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9953$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9954        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9955$as_echo_n "checking for TEE... " >&6; }
9956        if test ! -x "$tool_specified"; then
9957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9958$as_echo "not found" >&6; }
9959          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9960        fi
9961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9962$as_echo "$tool_specified" >&6; }
9963      fi
9964    fi
9965  fi
9966
9967
9968
9969  if test "x$TEE" = x; then
9970    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9971  fi
9972
9973
9974
9975
9976
9977  # Publish this variable in the help.
9978
9979
9980  if test "x$TOUCH" = x; then
9981    # The variable is not set by user, try to locate tool using the code snippet
9982    for ac_prog in touch
9983do
9984  # Extract the first word of "$ac_prog", so it can be a program name with args.
9985set dummy $ac_prog; ac_word=$2
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9987$as_echo_n "checking for $ac_word... " >&6; }
9988if ${ac_cv_path_TOUCH+:} false; then :
9989  $as_echo_n "(cached) " >&6
9990else
9991  case $TOUCH in
9992  [\\/]* | ?:[\\/]*)
9993  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9994  ;;
9995  *)
9996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9997for as_dir in $PATH
9998do
9999  IFS=$as_save_IFS
10000  test -z "$as_dir" && as_dir=.
10001    for ac_exec_ext in '' $ac_executable_extensions; do
10002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10003    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10005    break 2
10006  fi
10007done
10008  done
10009IFS=$as_save_IFS
10010
10011  ;;
10012esac
10013fi
10014TOUCH=$ac_cv_path_TOUCH
10015if test -n "$TOUCH"; then
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10017$as_echo "$TOUCH" >&6; }
10018else
10019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020$as_echo "no" >&6; }
10021fi
10022
10023
10024  test -n "$TOUCH" && break
10025done
10026
10027  else
10028    # The variable is set, but is it from the command line or the environment?
10029
10030    # Try to remove the string !TOUCH! from our list.
10031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10033      # If it failed, the variable was not from the command line. Ignore it,
10034      # but warn the user (except for BASH, which is always set by the calling BASH).
10035      if test "xTOUCH" != xBASH; then
10036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10037$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10038      fi
10039      # Try to locate tool using the code snippet
10040      for ac_prog in touch
10041do
10042  # Extract the first word of "$ac_prog", so it can be a program name with args.
10043set dummy $ac_prog; ac_word=$2
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10045$as_echo_n "checking for $ac_word... " >&6; }
10046if ${ac_cv_path_TOUCH+:} false; then :
10047  $as_echo_n "(cached) " >&6
10048else
10049  case $TOUCH in
10050  [\\/]* | ?:[\\/]*)
10051  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10052  ;;
10053  *)
10054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10055for as_dir in $PATH
10056do
10057  IFS=$as_save_IFS
10058  test -z "$as_dir" && as_dir=.
10059    for ac_exec_ext in '' $ac_executable_extensions; do
10060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10061    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10063    break 2
10064  fi
10065done
10066  done
10067IFS=$as_save_IFS
10068
10069  ;;
10070esac
10071fi
10072TOUCH=$ac_cv_path_TOUCH
10073if test -n "$TOUCH"; then
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10075$as_echo "$TOUCH" >&6; }
10076else
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078$as_echo "no" >&6; }
10079fi
10080
10081
10082  test -n "$TOUCH" && break
10083done
10084
10085    else
10086      # If it succeeded, then it was overridden by the user. We will use it
10087      # for the tool.
10088
10089      # First remove it from the list of overridden variables, so we can test
10090      # for unknown variables in the end.
10091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10092
10093      # Check if the provided tool contains a complete path.
10094      tool_specified="$TOUCH"
10095      tool_basename="${tool_specified##*/}"
10096      if test "x$tool_basename" = "x$tool_specified"; then
10097        # A command without a complete path is provided, search $PATH.
10098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10099$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10100        # Extract the first word of "$tool_basename", so it can be a program name with args.
10101set dummy $tool_basename; ac_word=$2
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10103$as_echo_n "checking for $ac_word... " >&6; }
10104if ${ac_cv_path_TOUCH+:} false; then :
10105  $as_echo_n "(cached) " >&6
10106else
10107  case $TOUCH in
10108  [\\/]* | ?:[\\/]*)
10109  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10110  ;;
10111  *)
10112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10113for as_dir in $PATH
10114do
10115  IFS=$as_save_IFS
10116  test -z "$as_dir" && as_dir=.
10117    for ac_exec_ext in '' $ac_executable_extensions; do
10118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10119    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10121    break 2
10122  fi
10123done
10124  done
10125IFS=$as_save_IFS
10126
10127  ;;
10128esac
10129fi
10130TOUCH=$ac_cv_path_TOUCH
10131if test -n "$TOUCH"; then
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10133$as_echo "$TOUCH" >&6; }
10134else
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10136$as_echo "no" >&6; }
10137fi
10138
10139
10140        if test "x$TOUCH" = x; then
10141          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10142        fi
10143      else
10144        # Otherwise we believe it is a complete path. Use it as it is.
10145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10146$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10148$as_echo_n "checking for TOUCH... " >&6; }
10149        if test ! -x "$tool_specified"; then
10150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10151$as_echo "not found" >&6; }
10152          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10153        fi
10154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10155$as_echo "$tool_specified" >&6; }
10156      fi
10157    fi
10158  fi
10159
10160
10161
10162  if test "x$TOUCH" = x; then
10163    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10164  fi
10165
10166
10167
10168
10169
10170  # Publish this variable in the help.
10171
10172
10173  if test "x$TR" = x; then
10174    # The variable is not set by user, try to locate tool using the code snippet
10175    for ac_prog in tr
10176do
10177  # Extract the first word of "$ac_prog", so it can be a program name with args.
10178set dummy $ac_prog; ac_word=$2
10179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10180$as_echo_n "checking for $ac_word... " >&6; }
10181if ${ac_cv_path_TR+:} false; then :
10182  $as_echo_n "(cached) " >&6
10183else
10184  case $TR in
10185  [\\/]* | ?:[\\/]*)
10186  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10187  ;;
10188  *)
10189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10190for as_dir in $PATH
10191do
10192  IFS=$as_save_IFS
10193  test -z "$as_dir" && as_dir=.
10194    for ac_exec_ext in '' $ac_executable_extensions; do
10195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10196    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10198    break 2
10199  fi
10200done
10201  done
10202IFS=$as_save_IFS
10203
10204  ;;
10205esac
10206fi
10207TR=$ac_cv_path_TR
10208if test -n "$TR"; then
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10210$as_echo "$TR" >&6; }
10211else
10212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10213$as_echo "no" >&6; }
10214fi
10215
10216
10217  test -n "$TR" && break
10218done
10219
10220  else
10221    # The variable is set, but is it from the command line or the environment?
10222
10223    # Try to remove the string !TR! from our list.
10224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10226      # If it failed, the variable was not from the command line. Ignore it,
10227      # but warn the user (except for BASH, which is always set by the calling BASH).
10228      if test "xTR" != xBASH; then
10229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10230$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10231      fi
10232      # Try to locate tool using the code snippet
10233      for ac_prog in tr
10234do
10235  # Extract the first word of "$ac_prog", so it can be a program name with args.
10236set dummy $ac_prog; ac_word=$2
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10238$as_echo_n "checking for $ac_word... " >&6; }
10239if ${ac_cv_path_TR+:} false; then :
10240  $as_echo_n "(cached) " >&6
10241else
10242  case $TR in
10243  [\\/]* | ?:[\\/]*)
10244  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10245  ;;
10246  *)
10247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248for as_dir in $PATH
10249do
10250  IFS=$as_save_IFS
10251  test -z "$as_dir" && as_dir=.
10252    for ac_exec_ext in '' $ac_executable_extensions; do
10253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10254    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10256    break 2
10257  fi
10258done
10259  done
10260IFS=$as_save_IFS
10261
10262  ;;
10263esac
10264fi
10265TR=$ac_cv_path_TR
10266if test -n "$TR"; then
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10268$as_echo "$TR" >&6; }
10269else
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271$as_echo "no" >&6; }
10272fi
10273
10274
10275  test -n "$TR" && break
10276done
10277
10278    else
10279      # If it succeeded, then it was overridden by the user. We will use it
10280      # for the tool.
10281
10282      # First remove it from the list of overridden variables, so we can test
10283      # for unknown variables in the end.
10284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10285
10286      # Check if the provided tool contains a complete path.
10287      tool_specified="$TR"
10288      tool_basename="${tool_specified##*/}"
10289      if test "x$tool_basename" = "x$tool_specified"; then
10290        # A command without a complete path is provided, search $PATH.
10291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10292$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10293        # Extract the first word of "$tool_basename", so it can be a program name with args.
10294set dummy $tool_basename; ac_word=$2
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10296$as_echo_n "checking for $ac_word... " >&6; }
10297if ${ac_cv_path_TR+:} false; then :
10298  $as_echo_n "(cached) " >&6
10299else
10300  case $TR in
10301  [\\/]* | ?:[\\/]*)
10302  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10303  ;;
10304  *)
10305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10306for as_dir in $PATH
10307do
10308  IFS=$as_save_IFS
10309  test -z "$as_dir" && as_dir=.
10310    for ac_exec_ext in '' $ac_executable_extensions; do
10311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10312    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10314    break 2
10315  fi
10316done
10317  done
10318IFS=$as_save_IFS
10319
10320  ;;
10321esac
10322fi
10323TR=$ac_cv_path_TR
10324if test -n "$TR"; then
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10326$as_echo "$TR" >&6; }
10327else
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
10330fi
10331
10332
10333        if test "x$TR" = x; then
10334          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10335        fi
10336      else
10337        # Otherwise we believe it is a complete path. Use it as it is.
10338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10339$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10341$as_echo_n "checking for TR... " >&6; }
10342        if test ! -x "$tool_specified"; then
10343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10344$as_echo "not found" >&6; }
10345          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10346        fi
10347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10348$as_echo "$tool_specified" >&6; }
10349      fi
10350    fi
10351  fi
10352
10353
10354
10355  if test "x$TR" = x; then
10356    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10357  fi
10358
10359
10360
10361
10362
10363  # Publish this variable in the help.
10364
10365
10366  if test "x$UNAME" = x; then
10367    # The variable is not set by user, try to locate tool using the code snippet
10368    for ac_prog in uname
10369do
10370  # Extract the first word of "$ac_prog", so it can be a program name with args.
10371set dummy $ac_prog; ac_word=$2
10372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10373$as_echo_n "checking for $ac_word... " >&6; }
10374if ${ac_cv_path_UNAME+:} false; then :
10375  $as_echo_n "(cached) " >&6
10376else
10377  case $UNAME in
10378  [\\/]* | ?:[\\/]*)
10379  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10380  ;;
10381  *)
10382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10383for as_dir in $PATH
10384do
10385  IFS=$as_save_IFS
10386  test -z "$as_dir" && as_dir=.
10387    for ac_exec_ext in '' $ac_executable_extensions; do
10388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10389    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10391    break 2
10392  fi
10393done
10394  done
10395IFS=$as_save_IFS
10396
10397  ;;
10398esac
10399fi
10400UNAME=$ac_cv_path_UNAME
10401if test -n "$UNAME"; then
10402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10403$as_echo "$UNAME" >&6; }
10404else
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
10407fi
10408
10409
10410  test -n "$UNAME" && break
10411done
10412
10413  else
10414    # The variable is set, but is it from the command line or the environment?
10415
10416    # Try to remove the string !UNAME! from our list.
10417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10419      # If it failed, the variable was not from the command line. Ignore it,
10420      # but warn the user (except for BASH, which is always set by the calling BASH).
10421      if test "xUNAME" != xBASH; then
10422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10423$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10424      fi
10425      # Try to locate tool using the code snippet
10426      for ac_prog in uname
10427do
10428  # Extract the first word of "$ac_prog", so it can be a program name with args.
10429set dummy $ac_prog; ac_word=$2
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10431$as_echo_n "checking for $ac_word... " >&6; }
10432if ${ac_cv_path_UNAME+:} false; then :
10433  $as_echo_n "(cached) " >&6
10434else
10435  case $UNAME in
10436  [\\/]* | ?:[\\/]*)
10437  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10438  ;;
10439  *)
10440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10441for as_dir in $PATH
10442do
10443  IFS=$as_save_IFS
10444  test -z "$as_dir" && as_dir=.
10445    for ac_exec_ext in '' $ac_executable_extensions; do
10446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10447    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10449    break 2
10450  fi
10451done
10452  done
10453IFS=$as_save_IFS
10454
10455  ;;
10456esac
10457fi
10458UNAME=$ac_cv_path_UNAME
10459if test -n "$UNAME"; then
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10461$as_echo "$UNAME" >&6; }
10462else
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10464$as_echo "no" >&6; }
10465fi
10466
10467
10468  test -n "$UNAME" && break
10469done
10470
10471    else
10472      # If it succeeded, then it was overridden by the user. We will use it
10473      # for the tool.
10474
10475      # First remove it from the list of overridden variables, so we can test
10476      # for unknown variables in the end.
10477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10478
10479      # Check if the provided tool contains a complete path.
10480      tool_specified="$UNAME"
10481      tool_basename="${tool_specified##*/}"
10482      if test "x$tool_basename" = "x$tool_specified"; then
10483        # A command without a complete path is provided, search $PATH.
10484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10485$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10486        # Extract the first word of "$tool_basename", so it can be a program name with args.
10487set dummy $tool_basename; ac_word=$2
10488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10489$as_echo_n "checking for $ac_word... " >&6; }
10490if ${ac_cv_path_UNAME+:} false; then :
10491  $as_echo_n "(cached) " >&6
10492else
10493  case $UNAME in
10494  [\\/]* | ?:[\\/]*)
10495  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10496  ;;
10497  *)
10498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10499for as_dir in $PATH
10500do
10501  IFS=$as_save_IFS
10502  test -z "$as_dir" && as_dir=.
10503    for ac_exec_ext in '' $ac_executable_extensions; do
10504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10505    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10507    break 2
10508  fi
10509done
10510  done
10511IFS=$as_save_IFS
10512
10513  ;;
10514esac
10515fi
10516UNAME=$ac_cv_path_UNAME
10517if test -n "$UNAME"; then
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10519$as_echo "$UNAME" >&6; }
10520else
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
10523fi
10524
10525
10526        if test "x$UNAME" = x; then
10527          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10528        fi
10529      else
10530        # Otherwise we believe it is a complete path. Use it as it is.
10531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10532$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10534$as_echo_n "checking for UNAME... " >&6; }
10535        if test ! -x "$tool_specified"; then
10536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10537$as_echo "not found" >&6; }
10538          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10539        fi
10540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10541$as_echo "$tool_specified" >&6; }
10542      fi
10543    fi
10544  fi
10545
10546
10547
10548  if test "x$UNAME" = x; then
10549    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10550  fi
10551
10552
10553
10554
10555
10556  # Publish this variable in the help.
10557
10558
10559  if test "x$UNIQ" = x; then
10560    # The variable is not set by user, try to locate tool using the code snippet
10561    for ac_prog in uniq
10562do
10563  # Extract the first word of "$ac_prog", so it can be a program name with args.
10564set dummy $ac_prog; ac_word=$2
10565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10566$as_echo_n "checking for $ac_word... " >&6; }
10567if ${ac_cv_path_UNIQ+:} false; then :
10568  $as_echo_n "(cached) " >&6
10569else
10570  case $UNIQ in
10571  [\\/]* | ?:[\\/]*)
10572  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10573  ;;
10574  *)
10575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10576for as_dir in $PATH
10577do
10578  IFS=$as_save_IFS
10579  test -z "$as_dir" && as_dir=.
10580    for ac_exec_ext in '' $ac_executable_extensions; do
10581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10582    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10584    break 2
10585  fi
10586done
10587  done
10588IFS=$as_save_IFS
10589
10590  ;;
10591esac
10592fi
10593UNIQ=$ac_cv_path_UNIQ
10594if test -n "$UNIQ"; then
10595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10596$as_echo "$UNIQ" >&6; }
10597else
10598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10599$as_echo "no" >&6; }
10600fi
10601
10602
10603  test -n "$UNIQ" && break
10604done
10605
10606  else
10607    # The variable is set, but is it from the command line or the environment?
10608
10609    # Try to remove the string !UNIQ! from our list.
10610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10612      # If it failed, the variable was not from the command line. Ignore it,
10613      # but warn the user (except for BASH, which is always set by the calling BASH).
10614      if test "xUNIQ" != xBASH; then
10615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10616$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10617      fi
10618      # Try to locate tool using the code snippet
10619      for ac_prog in uniq
10620do
10621  # Extract the first word of "$ac_prog", so it can be a program name with args.
10622set dummy $ac_prog; ac_word=$2
10623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10624$as_echo_n "checking for $ac_word... " >&6; }
10625if ${ac_cv_path_UNIQ+:} false; then :
10626  $as_echo_n "(cached) " >&6
10627else
10628  case $UNIQ in
10629  [\\/]* | ?:[\\/]*)
10630  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10631  ;;
10632  *)
10633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10634for as_dir in $PATH
10635do
10636  IFS=$as_save_IFS
10637  test -z "$as_dir" && as_dir=.
10638    for ac_exec_ext in '' $ac_executable_extensions; do
10639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10640    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10642    break 2
10643  fi
10644done
10645  done
10646IFS=$as_save_IFS
10647
10648  ;;
10649esac
10650fi
10651UNIQ=$ac_cv_path_UNIQ
10652if test -n "$UNIQ"; then
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10654$as_echo "$UNIQ" >&6; }
10655else
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658fi
10659
10660
10661  test -n "$UNIQ" && break
10662done
10663
10664    else
10665      # If it succeeded, then it was overridden by the user. We will use it
10666      # for the tool.
10667
10668      # First remove it from the list of overridden variables, so we can test
10669      # for unknown variables in the end.
10670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10671
10672      # Check if the provided tool contains a complete path.
10673      tool_specified="$UNIQ"
10674      tool_basename="${tool_specified##*/}"
10675      if test "x$tool_basename" = "x$tool_specified"; then
10676        # A command without a complete path is provided, search $PATH.
10677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10678$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10679        # Extract the first word of "$tool_basename", so it can be a program name with args.
10680set dummy $tool_basename; ac_word=$2
10681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10682$as_echo_n "checking for $ac_word... " >&6; }
10683if ${ac_cv_path_UNIQ+:} false; then :
10684  $as_echo_n "(cached) " >&6
10685else
10686  case $UNIQ in
10687  [\\/]* | ?:[\\/]*)
10688  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10689  ;;
10690  *)
10691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10692for as_dir in $PATH
10693do
10694  IFS=$as_save_IFS
10695  test -z "$as_dir" && as_dir=.
10696    for ac_exec_ext in '' $ac_executable_extensions; do
10697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10698    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10700    break 2
10701  fi
10702done
10703  done
10704IFS=$as_save_IFS
10705
10706  ;;
10707esac
10708fi
10709UNIQ=$ac_cv_path_UNIQ
10710if test -n "$UNIQ"; then
10711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10712$as_echo "$UNIQ" >&6; }
10713else
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
10716fi
10717
10718
10719        if test "x$UNIQ" = x; then
10720          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10721        fi
10722      else
10723        # Otherwise we believe it is a complete path. Use it as it is.
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10725$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10727$as_echo_n "checking for UNIQ... " >&6; }
10728        if test ! -x "$tool_specified"; then
10729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10730$as_echo "not found" >&6; }
10731          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10732        fi
10733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10734$as_echo "$tool_specified" >&6; }
10735      fi
10736    fi
10737  fi
10738
10739
10740
10741  if test "x$UNIQ" = x; then
10742    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10743  fi
10744
10745
10746
10747
10748
10749  # Publish this variable in the help.
10750
10751
10752  if test "x$WC" = x; then
10753    # The variable is not set by user, try to locate tool using the code snippet
10754    for ac_prog in wc
10755do
10756  # Extract the first word of "$ac_prog", so it can be a program name with args.
10757set dummy $ac_prog; ac_word=$2
10758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10759$as_echo_n "checking for $ac_word... " >&6; }
10760if ${ac_cv_path_WC+:} false; then :
10761  $as_echo_n "(cached) " >&6
10762else
10763  case $WC in
10764  [\\/]* | ?:[\\/]*)
10765  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10766  ;;
10767  *)
10768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10769for as_dir in $PATH
10770do
10771  IFS=$as_save_IFS
10772  test -z "$as_dir" && as_dir=.
10773    for ac_exec_ext in '' $ac_executable_extensions; do
10774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10775    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10777    break 2
10778  fi
10779done
10780  done
10781IFS=$as_save_IFS
10782
10783  ;;
10784esac
10785fi
10786WC=$ac_cv_path_WC
10787if test -n "$WC"; then
10788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10789$as_echo "$WC" >&6; }
10790else
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792$as_echo "no" >&6; }
10793fi
10794
10795
10796  test -n "$WC" && break
10797done
10798
10799  else
10800    # The variable is set, but is it from the command line or the environment?
10801
10802    # Try to remove the string !WC! from our list.
10803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10805      # If it failed, the variable was not from the command line. Ignore it,
10806      # but warn the user (except for BASH, which is always set by the calling BASH).
10807      if test "xWC" != xBASH; then
10808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10809$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10810      fi
10811      # Try to locate tool using the code snippet
10812      for ac_prog in wc
10813do
10814  # Extract the first word of "$ac_prog", so it can be a program name with args.
10815set dummy $ac_prog; ac_word=$2
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10817$as_echo_n "checking for $ac_word... " >&6; }
10818if ${ac_cv_path_WC+:} false; then :
10819  $as_echo_n "(cached) " >&6
10820else
10821  case $WC in
10822  [\\/]* | ?:[\\/]*)
10823  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10824  ;;
10825  *)
10826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10827for as_dir in $PATH
10828do
10829  IFS=$as_save_IFS
10830  test -z "$as_dir" && as_dir=.
10831    for ac_exec_ext in '' $ac_executable_extensions; do
10832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10833    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10835    break 2
10836  fi
10837done
10838  done
10839IFS=$as_save_IFS
10840
10841  ;;
10842esac
10843fi
10844WC=$ac_cv_path_WC
10845if test -n "$WC"; then
10846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10847$as_echo "$WC" >&6; }
10848else
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10850$as_echo "no" >&6; }
10851fi
10852
10853
10854  test -n "$WC" && break
10855done
10856
10857    else
10858      # If it succeeded, then it was overridden by the user. We will use it
10859      # for the tool.
10860
10861      # First remove it from the list of overridden variables, so we can test
10862      # for unknown variables in the end.
10863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10864
10865      # Check if the provided tool contains a complete path.
10866      tool_specified="$WC"
10867      tool_basename="${tool_specified##*/}"
10868      if test "x$tool_basename" = "x$tool_specified"; then
10869        # A command without a complete path is provided, search $PATH.
10870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10871$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10872        # Extract the first word of "$tool_basename", so it can be a program name with args.
10873set dummy $tool_basename; ac_word=$2
10874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10875$as_echo_n "checking for $ac_word... " >&6; }
10876if ${ac_cv_path_WC+:} false; then :
10877  $as_echo_n "(cached) " >&6
10878else
10879  case $WC in
10880  [\\/]* | ?:[\\/]*)
10881  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10882  ;;
10883  *)
10884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10885for as_dir in $PATH
10886do
10887  IFS=$as_save_IFS
10888  test -z "$as_dir" && as_dir=.
10889    for ac_exec_ext in '' $ac_executable_extensions; do
10890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10891    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10893    break 2
10894  fi
10895done
10896  done
10897IFS=$as_save_IFS
10898
10899  ;;
10900esac
10901fi
10902WC=$ac_cv_path_WC
10903if test -n "$WC"; then
10904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10905$as_echo "$WC" >&6; }
10906else
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10908$as_echo "no" >&6; }
10909fi
10910
10911
10912        if test "x$WC" = x; then
10913          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10914        fi
10915      else
10916        # Otherwise we believe it is a complete path. Use it as it is.
10917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10918$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10920$as_echo_n "checking for WC... " >&6; }
10921        if test ! -x "$tool_specified"; then
10922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10923$as_echo "not found" >&6; }
10924          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10925        fi
10926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10927$as_echo "$tool_specified" >&6; }
10928      fi
10929    fi
10930  fi
10931
10932
10933
10934  if test "x$WC" = x; then
10935    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10936  fi
10937
10938
10939
10940
10941
10942  # Publish this variable in the help.
10943
10944
10945  if test "x$WHICH" = x; then
10946    # The variable is not set by user, try to locate tool using the code snippet
10947    for ac_prog in which
10948do
10949  # Extract the first word of "$ac_prog", so it can be a program name with args.
10950set dummy $ac_prog; ac_word=$2
10951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10952$as_echo_n "checking for $ac_word... " >&6; }
10953if ${ac_cv_path_WHICH+:} false; then :
10954  $as_echo_n "(cached) " >&6
10955else
10956  case $WHICH in
10957  [\\/]* | ?:[\\/]*)
10958  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10959  ;;
10960  *)
10961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10962for as_dir in $PATH
10963do
10964  IFS=$as_save_IFS
10965  test -z "$as_dir" && as_dir=.
10966    for ac_exec_ext in '' $ac_executable_extensions; do
10967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10968    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10970    break 2
10971  fi
10972done
10973  done
10974IFS=$as_save_IFS
10975
10976  ;;
10977esac
10978fi
10979WHICH=$ac_cv_path_WHICH
10980if test -n "$WHICH"; then
10981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10982$as_echo "$WHICH" >&6; }
10983else
10984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985$as_echo "no" >&6; }
10986fi
10987
10988
10989  test -n "$WHICH" && break
10990done
10991
10992  else
10993    # The variable is set, but is it from the command line or the environment?
10994
10995    # Try to remove the string !WHICH! from our list.
10996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10998      # If it failed, the variable was not from the command line. Ignore it,
10999      # but warn the user (except for BASH, which is always set by the calling BASH).
11000      if test "xWHICH" != xBASH; then
11001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11002$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11003      fi
11004      # Try to locate tool using the code snippet
11005      for ac_prog in which
11006do
11007  # Extract the first word of "$ac_prog", so it can be a program name with args.
11008set dummy $ac_prog; ac_word=$2
11009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11010$as_echo_n "checking for $ac_word... " >&6; }
11011if ${ac_cv_path_WHICH+:} false; then :
11012  $as_echo_n "(cached) " >&6
11013else
11014  case $WHICH in
11015  [\\/]* | ?:[\\/]*)
11016  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11017  ;;
11018  *)
11019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11020for as_dir in $PATH
11021do
11022  IFS=$as_save_IFS
11023  test -z "$as_dir" && as_dir=.
11024    for ac_exec_ext in '' $ac_executable_extensions; do
11025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11026    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11028    break 2
11029  fi
11030done
11031  done
11032IFS=$as_save_IFS
11033
11034  ;;
11035esac
11036fi
11037WHICH=$ac_cv_path_WHICH
11038if test -n "$WHICH"; then
11039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11040$as_echo "$WHICH" >&6; }
11041else
11042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11043$as_echo "no" >&6; }
11044fi
11045
11046
11047  test -n "$WHICH" && break
11048done
11049
11050    else
11051      # If it succeeded, then it was overridden by the user. We will use it
11052      # for the tool.
11053
11054      # First remove it from the list of overridden variables, so we can test
11055      # for unknown variables in the end.
11056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11057
11058      # Check if the provided tool contains a complete path.
11059      tool_specified="$WHICH"
11060      tool_basename="${tool_specified##*/}"
11061      if test "x$tool_basename" = "x$tool_specified"; then
11062        # A command without a complete path is provided, search $PATH.
11063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11064$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11065        # Extract the first word of "$tool_basename", so it can be a program name with args.
11066set dummy $tool_basename; ac_word=$2
11067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11068$as_echo_n "checking for $ac_word... " >&6; }
11069if ${ac_cv_path_WHICH+:} false; then :
11070  $as_echo_n "(cached) " >&6
11071else
11072  case $WHICH in
11073  [\\/]* | ?:[\\/]*)
11074  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11075  ;;
11076  *)
11077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11078for as_dir in $PATH
11079do
11080  IFS=$as_save_IFS
11081  test -z "$as_dir" && as_dir=.
11082    for ac_exec_ext in '' $ac_executable_extensions; do
11083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11084    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11086    break 2
11087  fi
11088done
11089  done
11090IFS=$as_save_IFS
11091
11092  ;;
11093esac
11094fi
11095WHICH=$ac_cv_path_WHICH
11096if test -n "$WHICH"; then
11097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11098$as_echo "$WHICH" >&6; }
11099else
11100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11101$as_echo "no" >&6; }
11102fi
11103
11104
11105        if test "x$WHICH" = x; then
11106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11107        fi
11108      else
11109        # Otherwise we believe it is a complete path. Use it as it is.
11110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11111$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11113$as_echo_n "checking for WHICH... " >&6; }
11114        if test ! -x "$tool_specified"; then
11115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11116$as_echo "not found" >&6; }
11117          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11118        fi
11119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11120$as_echo "$tool_specified" >&6; }
11121      fi
11122    fi
11123  fi
11124
11125
11126
11127  if test "x$WHICH" = x; then
11128    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11129  fi
11130
11131
11132
11133
11134
11135  # Publish this variable in the help.
11136
11137
11138  if test "x$XARGS" = x; then
11139    # The variable is not set by user, try to locate tool using the code snippet
11140    for ac_prog in xargs
11141do
11142  # Extract the first word of "$ac_prog", so it can be a program name with args.
11143set dummy $ac_prog; ac_word=$2
11144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11145$as_echo_n "checking for $ac_word... " >&6; }
11146if ${ac_cv_path_XARGS+:} false; then :
11147  $as_echo_n "(cached) " >&6
11148else
11149  case $XARGS in
11150  [\\/]* | ?:[\\/]*)
11151  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11152  ;;
11153  *)
11154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11155for as_dir in $PATH
11156do
11157  IFS=$as_save_IFS
11158  test -z "$as_dir" && as_dir=.
11159    for ac_exec_ext in '' $ac_executable_extensions; do
11160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11161    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11163    break 2
11164  fi
11165done
11166  done
11167IFS=$as_save_IFS
11168
11169  ;;
11170esac
11171fi
11172XARGS=$ac_cv_path_XARGS
11173if test -n "$XARGS"; then
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11175$as_echo "$XARGS" >&6; }
11176else
11177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11178$as_echo "no" >&6; }
11179fi
11180
11181
11182  test -n "$XARGS" && break
11183done
11184
11185  else
11186    # The variable is set, but is it from the command line or the environment?
11187
11188    # Try to remove the string !XARGS! from our list.
11189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11191      # If it failed, the variable was not from the command line. Ignore it,
11192      # but warn the user (except for BASH, which is always set by the calling BASH).
11193      if test "xXARGS" != xBASH; then
11194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11195$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11196      fi
11197      # Try to locate tool using the code snippet
11198      for ac_prog in xargs
11199do
11200  # Extract the first word of "$ac_prog", so it can be a program name with args.
11201set dummy $ac_prog; ac_word=$2
11202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11203$as_echo_n "checking for $ac_word... " >&6; }
11204if ${ac_cv_path_XARGS+:} false; then :
11205  $as_echo_n "(cached) " >&6
11206else
11207  case $XARGS in
11208  [\\/]* | ?:[\\/]*)
11209  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11210  ;;
11211  *)
11212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11213for as_dir in $PATH
11214do
11215  IFS=$as_save_IFS
11216  test -z "$as_dir" && as_dir=.
11217    for ac_exec_ext in '' $ac_executable_extensions; do
11218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11219    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11221    break 2
11222  fi
11223done
11224  done
11225IFS=$as_save_IFS
11226
11227  ;;
11228esac
11229fi
11230XARGS=$ac_cv_path_XARGS
11231if test -n "$XARGS"; then
11232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11233$as_echo "$XARGS" >&6; }
11234else
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236$as_echo "no" >&6; }
11237fi
11238
11239
11240  test -n "$XARGS" && break
11241done
11242
11243    else
11244      # If it succeeded, then it was overridden by the user. We will use it
11245      # for the tool.
11246
11247      # First remove it from the list of overridden variables, so we can test
11248      # for unknown variables in the end.
11249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11250
11251      # Check if the provided tool contains a complete path.
11252      tool_specified="$XARGS"
11253      tool_basename="${tool_specified##*/}"
11254      if test "x$tool_basename" = "x$tool_specified"; then
11255        # A command without a complete path is provided, search $PATH.
11256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11257$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11258        # Extract the first word of "$tool_basename", so it can be a program name with args.
11259set dummy $tool_basename; ac_word=$2
11260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11261$as_echo_n "checking for $ac_word... " >&6; }
11262if ${ac_cv_path_XARGS+:} false; then :
11263  $as_echo_n "(cached) " >&6
11264else
11265  case $XARGS in
11266  [\\/]* | ?:[\\/]*)
11267  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11268  ;;
11269  *)
11270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11271for as_dir in $PATH
11272do
11273  IFS=$as_save_IFS
11274  test -z "$as_dir" && as_dir=.
11275    for ac_exec_ext in '' $ac_executable_extensions; do
11276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11277    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11279    break 2
11280  fi
11281done
11282  done
11283IFS=$as_save_IFS
11284
11285  ;;
11286esac
11287fi
11288XARGS=$ac_cv_path_XARGS
11289if test -n "$XARGS"; then
11290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11291$as_echo "$XARGS" >&6; }
11292else
11293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11294$as_echo "no" >&6; }
11295fi
11296
11297
11298        if test "x$XARGS" = x; then
11299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11300        fi
11301      else
11302        # Otherwise we believe it is a complete path. Use it as it is.
11303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11304$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11306$as_echo_n "checking for XARGS... " >&6; }
11307        if test ! -x "$tool_specified"; then
11308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11309$as_echo "not found" >&6; }
11310          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11311        fi
11312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11313$as_echo "$tool_specified" >&6; }
11314      fi
11315    fi
11316  fi
11317
11318
11319
11320  if test "x$XARGS" = x; then
11321    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11322  fi
11323
11324
11325
11326  # Then required tools that require some special treatment.
11327
11328
11329  # Publish this variable in the help.
11330
11331
11332  if test "x$AWK" = x; then
11333    # The variable is not set by user, try to locate tool using the code snippet
11334    for ac_prog in gawk mawk nawk awk
11335do
11336  # Extract the first word of "$ac_prog", so it can be a program name with args.
11337set dummy $ac_prog; ac_word=$2
11338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11339$as_echo_n "checking for $ac_word... " >&6; }
11340if ${ac_cv_prog_AWK+:} false; then :
11341  $as_echo_n "(cached) " >&6
11342else
11343  if test -n "$AWK"; then
11344  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11345else
11346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11347for as_dir in $PATH
11348do
11349  IFS=$as_save_IFS
11350  test -z "$as_dir" && as_dir=.
11351    for ac_exec_ext in '' $ac_executable_extensions; do
11352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11353    ac_cv_prog_AWK="$ac_prog"
11354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11355    break 2
11356  fi
11357done
11358  done
11359IFS=$as_save_IFS
11360
11361fi
11362fi
11363AWK=$ac_cv_prog_AWK
11364if test -n "$AWK"; then
11365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11366$as_echo "$AWK" >&6; }
11367else
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
11370fi
11371
11372
11373  test -n "$AWK" && break
11374done
11375
11376  else
11377    # The variable is set, but is it from the command line or the environment?
11378
11379    # Try to remove the string !AWK! from our list.
11380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11382      # If it failed, the variable was not from the command line. Ignore it,
11383      # but warn the user (except for BASH, which is always set by the calling BASH).
11384      if test "xAWK" != xBASH; then
11385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11386$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11387      fi
11388      # Try to locate tool using the code snippet
11389      for ac_prog in gawk mawk nawk awk
11390do
11391  # Extract the first word of "$ac_prog", so it can be a program name with args.
11392set dummy $ac_prog; ac_word=$2
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11394$as_echo_n "checking for $ac_word... " >&6; }
11395if ${ac_cv_prog_AWK+:} false; then :
11396  $as_echo_n "(cached) " >&6
11397else
11398  if test -n "$AWK"; then
11399  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11400else
11401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11402for as_dir in $PATH
11403do
11404  IFS=$as_save_IFS
11405  test -z "$as_dir" && as_dir=.
11406    for ac_exec_ext in '' $ac_executable_extensions; do
11407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11408    ac_cv_prog_AWK="$ac_prog"
11409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11410    break 2
11411  fi
11412done
11413  done
11414IFS=$as_save_IFS
11415
11416fi
11417fi
11418AWK=$ac_cv_prog_AWK
11419if test -n "$AWK"; then
11420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11421$as_echo "$AWK" >&6; }
11422else
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11424$as_echo "no" >&6; }
11425fi
11426
11427
11428  test -n "$AWK" && break
11429done
11430
11431    else
11432      # If it succeeded, then it was overridden by the user. We will use it
11433      # for the tool.
11434
11435      # First remove it from the list of overridden variables, so we can test
11436      # for unknown variables in the end.
11437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11438
11439      # Check if the provided tool contains a complete path.
11440      tool_specified="$AWK"
11441      tool_basename="${tool_specified##*/}"
11442      if test "x$tool_basename" = "x$tool_specified"; then
11443        # A command without a complete path is provided, search $PATH.
11444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11445$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11446        # Extract the first word of "$tool_basename", so it can be a program name with args.
11447set dummy $tool_basename; ac_word=$2
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11449$as_echo_n "checking for $ac_word... " >&6; }
11450if ${ac_cv_path_AWK+:} false; then :
11451  $as_echo_n "(cached) " >&6
11452else
11453  case $AWK in
11454  [\\/]* | ?:[\\/]*)
11455  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11456  ;;
11457  *)
11458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11459for as_dir in $PATH
11460do
11461  IFS=$as_save_IFS
11462  test -z "$as_dir" && as_dir=.
11463    for ac_exec_ext in '' $ac_executable_extensions; do
11464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11465    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11467    break 2
11468  fi
11469done
11470  done
11471IFS=$as_save_IFS
11472
11473  ;;
11474esac
11475fi
11476AWK=$ac_cv_path_AWK
11477if test -n "$AWK"; then
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11479$as_echo "$AWK" >&6; }
11480else
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
11483fi
11484
11485
11486        if test "x$AWK" = x; then
11487          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11488        fi
11489      else
11490        # Otherwise we believe it is a complete path. Use it as it is.
11491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11492$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11494$as_echo_n "checking for AWK... " >&6; }
11495        if test ! -x "$tool_specified"; then
11496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11497$as_echo "not found" >&6; }
11498          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11499        fi
11500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11501$as_echo "$tool_specified" >&6; }
11502      fi
11503    fi
11504  fi
11505
11506
11507  if test "x$AWK" = x; then
11508    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11509  fi
11510
11511
11512
11513
11514  # Publish this variable in the help.
11515
11516
11517  if test "x$GREP" = x; then
11518    # The variable is not set by user, try to locate tool using the code snippet
11519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11520$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11521if ${ac_cv_path_GREP+:} false; then :
11522  $as_echo_n "(cached) " >&6
11523else
11524  if test -z "$GREP"; then
11525  ac_path_GREP_found=false
11526  # Loop through the user's path and test for each of PROGNAME-LIST
11527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11528for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11529do
11530  IFS=$as_save_IFS
11531  test -z "$as_dir" && as_dir=.
11532    for ac_prog in grep ggrep; do
11533    for ac_exec_ext in '' $ac_executable_extensions; do
11534      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11535      as_fn_executable_p "$ac_path_GREP" || continue
11536# Check for GNU ac_path_GREP and select it if it is found.
11537  # Check for GNU $ac_path_GREP
11538case `"$ac_path_GREP" --version 2>&1` in
11539*GNU*)
11540  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11541*)
11542  ac_count=0
11543  $as_echo_n 0123456789 >"conftest.in"
11544  while :
11545  do
11546    cat "conftest.in" "conftest.in" >"conftest.tmp"
11547    mv "conftest.tmp" "conftest.in"
11548    cp "conftest.in" "conftest.nl"
11549    $as_echo 'GREP' >> "conftest.nl"
11550    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11551    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11552    as_fn_arith $ac_count + 1 && ac_count=$as_val
11553    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11554      # Best one so far, save it but keep looking for a better one
11555      ac_cv_path_GREP="$ac_path_GREP"
11556      ac_path_GREP_max=$ac_count
11557    fi
11558    # 10*(2^10) chars as input seems more than enough
11559    test $ac_count -gt 10 && break
11560  done
11561  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11562esac
11563
11564      $ac_path_GREP_found && break 3
11565    done
11566  done
11567  done
11568IFS=$as_save_IFS
11569  if test -z "$ac_cv_path_GREP"; then
11570    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11571  fi
11572else
11573  ac_cv_path_GREP=$GREP
11574fi
11575
11576fi
11577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11578$as_echo "$ac_cv_path_GREP" >&6; }
11579 GREP="$ac_cv_path_GREP"
11580
11581
11582  else
11583    # The variable is set, but is it from the command line or the environment?
11584
11585    # Try to remove the string !GREP! from our list.
11586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11588      # If it failed, the variable was not from the command line. Ignore it,
11589      # but warn the user (except for BASH, which is always set by the calling BASH).
11590      if test "xGREP" != xBASH; then
11591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11592$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11593      fi
11594      # Try to locate tool using the code snippet
11595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11596$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11597if ${ac_cv_path_GREP+:} false; then :
11598  $as_echo_n "(cached) " >&6
11599else
11600  if test -z "$GREP"; then
11601  ac_path_GREP_found=false
11602  # Loop through the user's path and test for each of PROGNAME-LIST
11603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11604for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11605do
11606  IFS=$as_save_IFS
11607  test -z "$as_dir" && as_dir=.
11608    for ac_prog in grep ggrep; do
11609    for ac_exec_ext in '' $ac_executable_extensions; do
11610      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11611      as_fn_executable_p "$ac_path_GREP" || continue
11612# Check for GNU ac_path_GREP and select it if it is found.
11613  # Check for GNU $ac_path_GREP
11614case `"$ac_path_GREP" --version 2>&1` in
11615*GNU*)
11616  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11617*)
11618  ac_count=0
11619  $as_echo_n 0123456789 >"conftest.in"
11620  while :
11621  do
11622    cat "conftest.in" "conftest.in" >"conftest.tmp"
11623    mv "conftest.tmp" "conftest.in"
11624    cp "conftest.in" "conftest.nl"
11625    $as_echo 'GREP' >> "conftest.nl"
11626    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11627    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11628    as_fn_arith $ac_count + 1 && ac_count=$as_val
11629    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11630      # Best one so far, save it but keep looking for a better one
11631      ac_cv_path_GREP="$ac_path_GREP"
11632      ac_path_GREP_max=$ac_count
11633    fi
11634    # 10*(2^10) chars as input seems more than enough
11635    test $ac_count -gt 10 && break
11636  done
11637  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11638esac
11639
11640      $ac_path_GREP_found && break 3
11641    done
11642  done
11643  done
11644IFS=$as_save_IFS
11645  if test -z "$ac_cv_path_GREP"; then
11646    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11647  fi
11648else
11649  ac_cv_path_GREP=$GREP
11650fi
11651
11652fi
11653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11654$as_echo "$ac_cv_path_GREP" >&6; }
11655 GREP="$ac_cv_path_GREP"
11656
11657
11658    else
11659      # If it succeeded, then it was overridden by the user. We will use it
11660      # for the tool.
11661
11662      # First remove it from the list of overridden variables, so we can test
11663      # for unknown variables in the end.
11664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11665
11666      # Check if the provided tool contains a complete path.
11667      tool_specified="$GREP"
11668      tool_basename="${tool_specified##*/}"
11669      if test "x$tool_basename" = "x$tool_specified"; then
11670        # A command without a complete path is provided, search $PATH.
11671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11672$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11673        # Extract the first word of "$tool_basename", so it can be a program name with args.
11674set dummy $tool_basename; ac_word=$2
11675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11676$as_echo_n "checking for $ac_word... " >&6; }
11677if ${ac_cv_path_GREP+:} false; then :
11678  $as_echo_n "(cached) " >&6
11679else
11680  case $GREP in
11681  [\\/]* | ?:[\\/]*)
11682  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11683  ;;
11684  *)
11685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11686for as_dir in $PATH
11687do
11688  IFS=$as_save_IFS
11689  test -z "$as_dir" && as_dir=.
11690    for ac_exec_ext in '' $ac_executable_extensions; do
11691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11692    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11694    break 2
11695  fi
11696done
11697  done
11698IFS=$as_save_IFS
11699
11700  ;;
11701esac
11702fi
11703GREP=$ac_cv_path_GREP
11704if test -n "$GREP"; then
11705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11706$as_echo "$GREP" >&6; }
11707else
11708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11709$as_echo "no" >&6; }
11710fi
11711
11712
11713        if test "x$GREP" = x; then
11714          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11715        fi
11716      else
11717        # Otherwise we believe it is a complete path. Use it as it is.
11718        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11719$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11721$as_echo_n "checking for GREP... " >&6; }
11722        if test ! -x "$tool_specified"; then
11723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11724$as_echo "not found" >&6; }
11725          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11726        fi
11727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11728$as_echo "$tool_specified" >&6; }
11729      fi
11730    fi
11731  fi
11732
11733
11734  if test "x$GREP" = x; then
11735    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11736  fi
11737
11738
11739
11740
11741  # Publish this variable in the help.
11742
11743
11744  if test "x$EGREP" = x; then
11745    # The variable is not set by user, try to locate tool using the code snippet
11746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11747$as_echo_n "checking for egrep... " >&6; }
11748if ${ac_cv_path_EGREP+:} false; then :
11749  $as_echo_n "(cached) " >&6
11750else
11751  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11752   then ac_cv_path_EGREP="$GREP -E"
11753   else
11754     if test -z "$EGREP"; then
11755  ac_path_EGREP_found=false
11756  # Loop through the user's path and test for each of PROGNAME-LIST
11757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11758for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11759do
11760  IFS=$as_save_IFS
11761  test -z "$as_dir" && as_dir=.
11762    for ac_prog in egrep; do
11763    for ac_exec_ext in '' $ac_executable_extensions; do
11764      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11765      as_fn_executable_p "$ac_path_EGREP" || continue
11766# Check for GNU ac_path_EGREP and select it if it is found.
11767  # Check for GNU $ac_path_EGREP
11768case `"$ac_path_EGREP" --version 2>&1` in
11769*GNU*)
11770  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11771*)
11772  ac_count=0
11773  $as_echo_n 0123456789 >"conftest.in"
11774  while :
11775  do
11776    cat "conftest.in" "conftest.in" >"conftest.tmp"
11777    mv "conftest.tmp" "conftest.in"
11778    cp "conftest.in" "conftest.nl"
11779    $as_echo 'EGREP' >> "conftest.nl"
11780    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11781    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11782    as_fn_arith $ac_count + 1 && ac_count=$as_val
11783    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11784      # Best one so far, save it but keep looking for a better one
11785      ac_cv_path_EGREP="$ac_path_EGREP"
11786      ac_path_EGREP_max=$ac_count
11787    fi
11788    # 10*(2^10) chars as input seems more than enough
11789    test $ac_count -gt 10 && break
11790  done
11791  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11792esac
11793
11794      $ac_path_EGREP_found && break 3
11795    done
11796  done
11797  done
11798IFS=$as_save_IFS
11799  if test -z "$ac_cv_path_EGREP"; then
11800    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11801  fi
11802else
11803  ac_cv_path_EGREP=$EGREP
11804fi
11805
11806   fi
11807fi
11808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11809$as_echo "$ac_cv_path_EGREP" >&6; }
11810 EGREP="$ac_cv_path_EGREP"
11811
11812
11813  else
11814    # The variable is set, but is it from the command line or the environment?
11815
11816    # Try to remove the string !EGREP! from our list.
11817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11819      # If it failed, the variable was not from the command line. Ignore it,
11820      # but warn the user (except for BASH, which is always set by the calling BASH).
11821      if test "xEGREP" != xBASH; then
11822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11823$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11824      fi
11825      # Try to locate tool using the code snippet
11826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11827$as_echo_n "checking for egrep... " >&6; }
11828if ${ac_cv_path_EGREP+:} false; then :
11829  $as_echo_n "(cached) " >&6
11830else
11831  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11832   then ac_cv_path_EGREP="$GREP -E"
11833   else
11834     if test -z "$EGREP"; then
11835  ac_path_EGREP_found=false
11836  # Loop through the user's path and test for each of PROGNAME-LIST
11837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11838for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11839do
11840  IFS=$as_save_IFS
11841  test -z "$as_dir" && as_dir=.
11842    for ac_prog in egrep; do
11843    for ac_exec_ext in '' $ac_executable_extensions; do
11844      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11845      as_fn_executable_p "$ac_path_EGREP" || continue
11846# Check for GNU ac_path_EGREP and select it if it is found.
11847  # Check for GNU $ac_path_EGREP
11848case `"$ac_path_EGREP" --version 2>&1` in
11849*GNU*)
11850  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11851*)
11852  ac_count=0
11853  $as_echo_n 0123456789 >"conftest.in"
11854  while :
11855  do
11856    cat "conftest.in" "conftest.in" >"conftest.tmp"
11857    mv "conftest.tmp" "conftest.in"
11858    cp "conftest.in" "conftest.nl"
11859    $as_echo 'EGREP' >> "conftest.nl"
11860    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11861    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11862    as_fn_arith $ac_count + 1 && ac_count=$as_val
11863    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11864      # Best one so far, save it but keep looking for a better one
11865      ac_cv_path_EGREP="$ac_path_EGREP"
11866      ac_path_EGREP_max=$ac_count
11867    fi
11868    # 10*(2^10) chars as input seems more than enough
11869    test $ac_count -gt 10 && break
11870  done
11871  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11872esac
11873
11874      $ac_path_EGREP_found && break 3
11875    done
11876  done
11877  done
11878IFS=$as_save_IFS
11879  if test -z "$ac_cv_path_EGREP"; then
11880    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11881  fi
11882else
11883  ac_cv_path_EGREP=$EGREP
11884fi
11885
11886   fi
11887fi
11888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11889$as_echo "$ac_cv_path_EGREP" >&6; }
11890 EGREP="$ac_cv_path_EGREP"
11891
11892
11893    else
11894      # If it succeeded, then it was overridden by the user. We will use it
11895      # for the tool.
11896
11897      # First remove it from the list of overridden variables, so we can test
11898      # for unknown variables in the end.
11899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11900
11901      # Check if the provided tool contains a complete path.
11902      tool_specified="$EGREP"
11903      tool_basename="${tool_specified##*/}"
11904      if test "x$tool_basename" = "x$tool_specified"; then
11905        # A command without a complete path is provided, search $PATH.
11906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11907$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11908        # Extract the first word of "$tool_basename", so it can be a program name with args.
11909set dummy $tool_basename; ac_word=$2
11910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11911$as_echo_n "checking for $ac_word... " >&6; }
11912if ${ac_cv_path_EGREP+:} false; then :
11913  $as_echo_n "(cached) " >&6
11914else
11915  case $EGREP in
11916  [\\/]* | ?:[\\/]*)
11917  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11918  ;;
11919  *)
11920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11921for as_dir in $PATH
11922do
11923  IFS=$as_save_IFS
11924  test -z "$as_dir" && as_dir=.
11925    for ac_exec_ext in '' $ac_executable_extensions; do
11926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11927    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11929    break 2
11930  fi
11931done
11932  done
11933IFS=$as_save_IFS
11934
11935  ;;
11936esac
11937fi
11938EGREP=$ac_cv_path_EGREP
11939if test -n "$EGREP"; then
11940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11941$as_echo "$EGREP" >&6; }
11942else
11943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11944$as_echo "no" >&6; }
11945fi
11946
11947
11948        if test "x$EGREP" = x; then
11949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11950        fi
11951      else
11952        # Otherwise we believe it is a complete path. Use it as it is.
11953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11954$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11956$as_echo_n "checking for EGREP... " >&6; }
11957        if test ! -x "$tool_specified"; then
11958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11959$as_echo "not found" >&6; }
11960          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11961        fi
11962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11963$as_echo "$tool_specified" >&6; }
11964      fi
11965    fi
11966  fi
11967
11968
11969  if test "x$EGREP" = x; then
11970    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11971  fi
11972
11973
11974
11975
11976  # Publish this variable in the help.
11977
11978
11979  if test "x$FGREP" = x; then
11980    # The variable is not set by user, try to locate tool using the code snippet
11981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11982$as_echo_n "checking for fgrep... " >&6; }
11983if ${ac_cv_path_FGREP+:} false; then :
11984  $as_echo_n "(cached) " >&6
11985else
11986  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11987   then ac_cv_path_FGREP="$GREP -F"
11988   else
11989     if test -z "$FGREP"; then
11990  ac_path_FGREP_found=false
11991  # Loop through the user's path and test for each of PROGNAME-LIST
11992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11993for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11994do
11995  IFS=$as_save_IFS
11996  test -z "$as_dir" && as_dir=.
11997    for ac_prog in fgrep; do
11998    for ac_exec_ext in '' $ac_executable_extensions; do
11999      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12000      as_fn_executable_p "$ac_path_FGREP" || continue
12001# Check for GNU ac_path_FGREP and select it if it is found.
12002  # Check for GNU $ac_path_FGREP
12003case `"$ac_path_FGREP" --version 2>&1` in
12004*GNU*)
12005  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12006*)
12007  ac_count=0
12008  $as_echo_n 0123456789 >"conftest.in"
12009  while :
12010  do
12011    cat "conftest.in" "conftest.in" >"conftest.tmp"
12012    mv "conftest.tmp" "conftest.in"
12013    cp "conftest.in" "conftest.nl"
12014    $as_echo 'FGREP' >> "conftest.nl"
12015    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12016    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12017    as_fn_arith $ac_count + 1 && ac_count=$as_val
12018    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12019      # Best one so far, save it but keep looking for a better one
12020      ac_cv_path_FGREP="$ac_path_FGREP"
12021      ac_path_FGREP_max=$ac_count
12022    fi
12023    # 10*(2^10) chars as input seems more than enough
12024    test $ac_count -gt 10 && break
12025  done
12026  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12027esac
12028
12029      $ac_path_FGREP_found && break 3
12030    done
12031  done
12032  done
12033IFS=$as_save_IFS
12034  if test -z "$ac_cv_path_FGREP"; then
12035    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12036  fi
12037else
12038  ac_cv_path_FGREP=$FGREP
12039fi
12040
12041   fi
12042fi
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12044$as_echo "$ac_cv_path_FGREP" >&6; }
12045 FGREP="$ac_cv_path_FGREP"
12046
12047
12048  else
12049    # The variable is set, but is it from the command line or the environment?
12050
12051    # Try to remove the string !FGREP! from our list.
12052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12054      # If it failed, the variable was not from the command line. Ignore it,
12055      # but warn the user (except for BASH, which is always set by the calling BASH).
12056      if test "xFGREP" != xBASH; then
12057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12058$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12059      fi
12060      # Try to locate tool using the code snippet
12061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12062$as_echo_n "checking for fgrep... " >&6; }
12063if ${ac_cv_path_FGREP+:} false; then :
12064  $as_echo_n "(cached) " >&6
12065else
12066  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12067   then ac_cv_path_FGREP="$GREP -F"
12068   else
12069     if test -z "$FGREP"; then
12070  ac_path_FGREP_found=false
12071  # Loop through the user's path and test for each of PROGNAME-LIST
12072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12073for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12074do
12075  IFS=$as_save_IFS
12076  test -z "$as_dir" && as_dir=.
12077    for ac_prog in fgrep; do
12078    for ac_exec_ext in '' $ac_executable_extensions; do
12079      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12080      as_fn_executable_p "$ac_path_FGREP" || continue
12081# Check for GNU ac_path_FGREP and select it if it is found.
12082  # Check for GNU $ac_path_FGREP
12083case `"$ac_path_FGREP" --version 2>&1` in
12084*GNU*)
12085  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12086*)
12087  ac_count=0
12088  $as_echo_n 0123456789 >"conftest.in"
12089  while :
12090  do
12091    cat "conftest.in" "conftest.in" >"conftest.tmp"
12092    mv "conftest.tmp" "conftest.in"
12093    cp "conftest.in" "conftest.nl"
12094    $as_echo 'FGREP' >> "conftest.nl"
12095    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12096    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12097    as_fn_arith $ac_count + 1 && ac_count=$as_val
12098    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12099      # Best one so far, save it but keep looking for a better one
12100      ac_cv_path_FGREP="$ac_path_FGREP"
12101      ac_path_FGREP_max=$ac_count
12102    fi
12103    # 10*(2^10) chars as input seems more than enough
12104    test $ac_count -gt 10 && break
12105  done
12106  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12107esac
12108
12109      $ac_path_FGREP_found && break 3
12110    done
12111  done
12112  done
12113IFS=$as_save_IFS
12114  if test -z "$ac_cv_path_FGREP"; then
12115    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12116  fi
12117else
12118  ac_cv_path_FGREP=$FGREP
12119fi
12120
12121   fi
12122fi
12123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12124$as_echo "$ac_cv_path_FGREP" >&6; }
12125 FGREP="$ac_cv_path_FGREP"
12126
12127
12128    else
12129      # If it succeeded, then it was overridden by the user. We will use it
12130      # for the tool.
12131
12132      # First remove it from the list of overridden variables, so we can test
12133      # for unknown variables in the end.
12134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12135
12136      # Check if the provided tool contains a complete path.
12137      tool_specified="$FGREP"
12138      tool_basename="${tool_specified##*/}"
12139      if test "x$tool_basename" = "x$tool_specified"; then
12140        # A command without a complete path is provided, search $PATH.
12141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12142$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12143        # Extract the first word of "$tool_basename", so it can be a program name with args.
12144set dummy $tool_basename; ac_word=$2
12145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12146$as_echo_n "checking for $ac_word... " >&6; }
12147if ${ac_cv_path_FGREP+:} false; then :
12148  $as_echo_n "(cached) " >&6
12149else
12150  case $FGREP in
12151  [\\/]* | ?:[\\/]*)
12152  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12153  ;;
12154  *)
12155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12156for as_dir in $PATH
12157do
12158  IFS=$as_save_IFS
12159  test -z "$as_dir" && as_dir=.
12160    for ac_exec_ext in '' $ac_executable_extensions; do
12161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12162    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12164    break 2
12165  fi
12166done
12167  done
12168IFS=$as_save_IFS
12169
12170  ;;
12171esac
12172fi
12173FGREP=$ac_cv_path_FGREP
12174if test -n "$FGREP"; then
12175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12176$as_echo "$FGREP" >&6; }
12177else
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179$as_echo "no" >&6; }
12180fi
12181
12182
12183        if test "x$FGREP" = x; then
12184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12185        fi
12186      else
12187        # Otherwise we believe it is a complete path. Use it as it is.
12188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12189$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12191$as_echo_n "checking for FGREP... " >&6; }
12192        if test ! -x "$tool_specified"; then
12193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12194$as_echo "not found" >&6; }
12195          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12196        fi
12197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12198$as_echo "$tool_specified" >&6; }
12199      fi
12200    fi
12201  fi
12202
12203
12204  if test "x$FGREP" = x; then
12205    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12206  fi
12207
12208
12209
12210
12211  # Publish this variable in the help.
12212
12213
12214  if test "x$SED" = x; then
12215    # The variable is not set by user, try to locate tool using the code snippet
12216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12217$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12218if ${ac_cv_path_SED+:} false; then :
12219  $as_echo_n "(cached) " >&6
12220else
12221            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12222     for ac_i in 1 2 3 4 5 6 7; do
12223       ac_script="$ac_script$as_nl$ac_script"
12224     done
12225     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12226     { ac_script=; unset ac_script;}
12227     if test -z "$SED"; then
12228  ac_path_SED_found=false
12229  # Loop through the user's path and test for each of PROGNAME-LIST
12230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12231for as_dir in $PATH
12232do
12233  IFS=$as_save_IFS
12234  test -z "$as_dir" && as_dir=.
12235    for ac_prog in sed gsed; do
12236    for ac_exec_ext in '' $ac_executable_extensions; do
12237      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12238      as_fn_executable_p "$ac_path_SED" || continue
12239# Check for GNU ac_path_SED and select it if it is found.
12240  # Check for GNU $ac_path_SED
12241case `"$ac_path_SED" --version 2>&1` in
12242*GNU*)
12243  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12244*)
12245  ac_count=0
12246  $as_echo_n 0123456789 >"conftest.in"
12247  while :
12248  do
12249    cat "conftest.in" "conftest.in" >"conftest.tmp"
12250    mv "conftest.tmp" "conftest.in"
12251    cp "conftest.in" "conftest.nl"
12252    $as_echo '' >> "conftest.nl"
12253    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12254    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12255    as_fn_arith $ac_count + 1 && ac_count=$as_val
12256    if test $ac_count -gt ${ac_path_SED_max-0}; then
12257      # Best one so far, save it but keep looking for a better one
12258      ac_cv_path_SED="$ac_path_SED"
12259      ac_path_SED_max=$ac_count
12260    fi
12261    # 10*(2^10) chars as input seems more than enough
12262    test $ac_count -gt 10 && break
12263  done
12264  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12265esac
12266
12267      $ac_path_SED_found && break 3
12268    done
12269  done
12270  done
12271IFS=$as_save_IFS
12272  if test -z "$ac_cv_path_SED"; then
12273    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12274  fi
12275else
12276  ac_cv_path_SED=$SED
12277fi
12278
12279fi
12280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12281$as_echo "$ac_cv_path_SED" >&6; }
12282 SED="$ac_cv_path_SED"
12283  rm -f conftest.sed
12284
12285  else
12286    # The variable is set, but is it from the command line or the environment?
12287
12288    # Try to remove the string !SED! from our list.
12289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12291      # If it failed, the variable was not from the command line. Ignore it,
12292      # but warn the user (except for BASH, which is always set by the calling BASH).
12293      if test "xSED" != xBASH; then
12294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12295$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12296      fi
12297      # Try to locate tool using the code snippet
12298      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12299$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12300if ${ac_cv_path_SED+:} false; then :
12301  $as_echo_n "(cached) " >&6
12302else
12303            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12304     for ac_i in 1 2 3 4 5 6 7; do
12305       ac_script="$ac_script$as_nl$ac_script"
12306     done
12307     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12308     { ac_script=; unset ac_script;}
12309     if test -z "$SED"; then
12310  ac_path_SED_found=false
12311  # Loop through the user's path and test for each of PROGNAME-LIST
12312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12313for as_dir in $PATH
12314do
12315  IFS=$as_save_IFS
12316  test -z "$as_dir" && as_dir=.
12317    for ac_prog in sed gsed; do
12318    for ac_exec_ext in '' $ac_executable_extensions; do
12319      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12320      as_fn_executable_p "$ac_path_SED" || continue
12321# Check for GNU ac_path_SED and select it if it is found.
12322  # Check for GNU $ac_path_SED
12323case `"$ac_path_SED" --version 2>&1` in
12324*GNU*)
12325  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12326*)
12327  ac_count=0
12328  $as_echo_n 0123456789 >"conftest.in"
12329  while :
12330  do
12331    cat "conftest.in" "conftest.in" >"conftest.tmp"
12332    mv "conftest.tmp" "conftest.in"
12333    cp "conftest.in" "conftest.nl"
12334    $as_echo '' >> "conftest.nl"
12335    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12336    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12337    as_fn_arith $ac_count + 1 && ac_count=$as_val
12338    if test $ac_count -gt ${ac_path_SED_max-0}; then
12339      # Best one so far, save it but keep looking for a better one
12340      ac_cv_path_SED="$ac_path_SED"
12341      ac_path_SED_max=$ac_count
12342    fi
12343    # 10*(2^10) chars as input seems more than enough
12344    test $ac_count -gt 10 && break
12345  done
12346  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12347esac
12348
12349      $ac_path_SED_found && break 3
12350    done
12351  done
12352  done
12353IFS=$as_save_IFS
12354  if test -z "$ac_cv_path_SED"; then
12355    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12356  fi
12357else
12358  ac_cv_path_SED=$SED
12359fi
12360
12361fi
12362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12363$as_echo "$ac_cv_path_SED" >&6; }
12364 SED="$ac_cv_path_SED"
12365  rm -f conftest.sed
12366
12367    else
12368      # If it succeeded, then it was overridden by the user. We will use it
12369      # for the tool.
12370
12371      # First remove it from the list of overridden variables, so we can test
12372      # for unknown variables in the end.
12373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12374
12375      # Check if the provided tool contains a complete path.
12376      tool_specified="$SED"
12377      tool_basename="${tool_specified##*/}"
12378      if test "x$tool_basename" = "x$tool_specified"; then
12379        # A command without a complete path is provided, search $PATH.
12380        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12381$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12382        # Extract the first word of "$tool_basename", so it can be a program name with args.
12383set dummy $tool_basename; ac_word=$2
12384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12385$as_echo_n "checking for $ac_word... " >&6; }
12386if ${ac_cv_path_SED+:} false; then :
12387  $as_echo_n "(cached) " >&6
12388else
12389  case $SED in
12390  [\\/]* | ?:[\\/]*)
12391  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12392  ;;
12393  *)
12394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12395for as_dir in $PATH
12396do
12397  IFS=$as_save_IFS
12398  test -z "$as_dir" && as_dir=.
12399    for ac_exec_ext in '' $ac_executable_extensions; do
12400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12401    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12403    break 2
12404  fi
12405done
12406  done
12407IFS=$as_save_IFS
12408
12409  ;;
12410esac
12411fi
12412SED=$ac_cv_path_SED
12413if test -n "$SED"; then
12414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12415$as_echo "$SED" >&6; }
12416else
12417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12418$as_echo "no" >&6; }
12419fi
12420
12421
12422        if test "x$SED" = x; then
12423          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12424        fi
12425      else
12426        # Otherwise we believe it is a complete path. Use it as it is.
12427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12428$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12429        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12430$as_echo_n "checking for SED... " >&6; }
12431        if test ! -x "$tool_specified"; then
12432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12433$as_echo "not found" >&6; }
12434          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12435        fi
12436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12437$as_echo "$tool_specified" >&6; }
12438      fi
12439    fi
12440  fi
12441
12442
12443  if test "x$SED" = x; then
12444    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12445  fi
12446
12447
12448
12449  # Always force rm.
12450  RM="$RM -f"
12451
12452  # pwd behaves differently on various platforms and some don't support the -L flag.
12453  # Always use the bash builtin pwd to get uniform behavior.
12454  THEPWDCMD=pwd
12455
12456  # These are not required on all platforms
12457
12458
12459  # Publish this variable in the help.
12460
12461
12462  if test "x$CYGPATH" = x; then
12463    # The variable is not set by user, try to locate tool using the code snippet
12464    for ac_prog in cygpath
12465do
12466  # Extract the first word of "$ac_prog", so it can be a program name with args.
12467set dummy $ac_prog; ac_word=$2
12468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12469$as_echo_n "checking for $ac_word... " >&6; }
12470if ${ac_cv_path_CYGPATH+:} false; then :
12471  $as_echo_n "(cached) " >&6
12472else
12473  case $CYGPATH in
12474  [\\/]* | ?:[\\/]*)
12475  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12476  ;;
12477  *)
12478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12479for as_dir in $PATH
12480do
12481  IFS=$as_save_IFS
12482  test -z "$as_dir" && as_dir=.
12483    for ac_exec_ext in '' $ac_executable_extensions; do
12484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12485    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12487    break 2
12488  fi
12489done
12490  done
12491IFS=$as_save_IFS
12492
12493  ;;
12494esac
12495fi
12496CYGPATH=$ac_cv_path_CYGPATH
12497if test -n "$CYGPATH"; then
12498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12499$as_echo "$CYGPATH" >&6; }
12500else
12501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12502$as_echo "no" >&6; }
12503fi
12504
12505
12506  test -n "$CYGPATH" && break
12507done
12508
12509  else
12510    # The variable is set, but is it from the command line or the environment?
12511
12512    # Try to remove the string !CYGPATH! from our list.
12513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12515      # If it failed, the variable was not from the command line. Ignore it,
12516      # but warn the user (except for BASH, which is always set by the calling BASH).
12517      if test "xCYGPATH" != xBASH; then
12518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12519$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12520      fi
12521      # Try to locate tool using the code snippet
12522      for ac_prog in cygpath
12523do
12524  # Extract the first word of "$ac_prog", so it can be a program name with args.
12525set dummy $ac_prog; ac_word=$2
12526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12527$as_echo_n "checking for $ac_word... " >&6; }
12528if ${ac_cv_path_CYGPATH+:} false; then :
12529  $as_echo_n "(cached) " >&6
12530else
12531  case $CYGPATH in
12532  [\\/]* | ?:[\\/]*)
12533  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12534  ;;
12535  *)
12536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12537for as_dir in $PATH
12538do
12539  IFS=$as_save_IFS
12540  test -z "$as_dir" && as_dir=.
12541    for ac_exec_ext in '' $ac_executable_extensions; do
12542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12543    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12545    break 2
12546  fi
12547done
12548  done
12549IFS=$as_save_IFS
12550
12551  ;;
12552esac
12553fi
12554CYGPATH=$ac_cv_path_CYGPATH
12555if test -n "$CYGPATH"; then
12556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12557$as_echo "$CYGPATH" >&6; }
12558else
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12560$as_echo "no" >&6; }
12561fi
12562
12563
12564  test -n "$CYGPATH" && break
12565done
12566
12567    else
12568      # If it succeeded, then it was overridden by the user. We will use it
12569      # for the tool.
12570
12571      # First remove it from the list of overridden variables, so we can test
12572      # for unknown variables in the end.
12573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12574
12575      # Check if the provided tool contains a complete path.
12576      tool_specified="$CYGPATH"
12577      tool_basename="${tool_specified##*/}"
12578      if test "x$tool_basename" = "x$tool_specified"; then
12579        # A command without a complete path is provided, search $PATH.
12580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12581$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12582        # Extract the first word of "$tool_basename", so it can be a program name with args.
12583set dummy $tool_basename; ac_word=$2
12584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12585$as_echo_n "checking for $ac_word... " >&6; }
12586if ${ac_cv_path_CYGPATH+:} false; then :
12587  $as_echo_n "(cached) " >&6
12588else
12589  case $CYGPATH in
12590  [\\/]* | ?:[\\/]*)
12591  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12592  ;;
12593  *)
12594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12595for as_dir in $PATH
12596do
12597  IFS=$as_save_IFS
12598  test -z "$as_dir" && as_dir=.
12599    for ac_exec_ext in '' $ac_executable_extensions; do
12600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12601    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12603    break 2
12604  fi
12605done
12606  done
12607IFS=$as_save_IFS
12608
12609  ;;
12610esac
12611fi
12612CYGPATH=$ac_cv_path_CYGPATH
12613if test -n "$CYGPATH"; then
12614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12615$as_echo "$CYGPATH" >&6; }
12616else
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12618$as_echo "no" >&6; }
12619fi
12620
12621
12622        if test "x$CYGPATH" = x; then
12623          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12624        fi
12625      else
12626        # Otherwise we believe it is a complete path. Use it as it is.
12627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12628$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12630$as_echo_n "checking for CYGPATH... " >&6; }
12631        if test ! -x "$tool_specified"; then
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12633$as_echo "not found" >&6; }
12634          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12635        fi
12636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12637$as_echo "$tool_specified" >&6; }
12638      fi
12639    fi
12640  fi
12641
12642
12643
12644
12645  # Publish this variable in the help.
12646
12647
12648  if test "x$READLINK" = x; then
12649    # The variable is not set by user, try to locate tool using the code snippet
12650    for ac_prog in greadlink readlink
12651do
12652  # Extract the first word of "$ac_prog", so it can be a program name with args.
12653set dummy $ac_prog; ac_word=$2
12654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12655$as_echo_n "checking for $ac_word... " >&6; }
12656if ${ac_cv_path_READLINK+:} false; then :
12657  $as_echo_n "(cached) " >&6
12658else
12659  case $READLINK in
12660  [\\/]* | ?:[\\/]*)
12661  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12662  ;;
12663  *)
12664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12665for as_dir in $PATH
12666do
12667  IFS=$as_save_IFS
12668  test -z "$as_dir" && as_dir=.
12669    for ac_exec_ext in '' $ac_executable_extensions; do
12670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12671    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12673    break 2
12674  fi
12675done
12676  done
12677IFS=$as_save_IFS
12678
12679  ;;
12680esac
12681fi
12682READLINK=$ac_cv_path_READLINK
12683if test -n "$READLINK"; then
12684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12685$as_echo "$READLINK" >&6; }
12686else
12687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688$as_echo "no" >&6; }
12689fi
12690
12691
12692  test -n "$READLINK" && break
12693done
12694
12695  else
12696    # The variable is set, but is it from the command line or the environment?
12697
12698    # Try to remove the string !READLINK! from our list.
12699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12701      # If it failed, the variable was not from the command line. Ignore it,
12702      # but warn the user (except for BASH, which is always set by the calling BASH).
12703      if test "xREADLINK" != xBASH; then
12704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12705$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12706      fi
12707      # Try to locate tool using the code snippet
12708      for ac_prog in greadlink readlink
12709do
12710  # Extract the first word of "$ac_prog", so it can be a program name with args.
12711set dummy $ac_prog; ac_word=$2
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713$as_echo_n "checking for $ac_word... " >&6; }
12714if ${ac_cv_path_READLINK+:} false; then :
12715  $as_echo_n "(cached) " >&6
12716else
12717  case $READLINK in
12718  [\\/]* | ?:[\\/]*)
12719  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12720  ;;
12721  *)
12722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723for as_dir in $PATH
12724do
12725  IFS=$as_save_IFS
12726  test -z "$as_dir" && as_dir=.
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731    break 2
12732  fi
12733done
12734  done
12735IFS=$as_save_IFS
12736
12737  ;;
12738esac
12739fi
12740READLINK=$ac_cv_path_READLINK
12741if test -n "$READLINK"; then
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12743$as_echo "$READLINK" >&6; }
12744else
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
12747fi
12748
12749
12750  test -n "$READLINK" && break
12751done
12752
12753    else
12754      # If it succeeded, then it was overridden by the user. We will use it
12755      # for the tool.
12756
12757      # First remove it from the list of overridden variables, so we can test
12758      # for unknown variables in the end.
12759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12760
12761      # Check if the provided tool contains a complete path.
12762      tool_specified="$READLINK"
12763      tool_basename="${tool_specified##*/}"
12764      if test "x$tool_basename" = "x$tool_specified"; then
12765        # A command without a complete path is provided, search $PATH.
12766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12767$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12768        # Extract the first word of "$tool_basename", so it can be a program name with args.
12769set dummy $tool_basename; ac_word=$2
12770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12771$as_echo_n "checking for $ac_word... " >&6; }
12772if ${ac_cv_path_READLINK+:} false; then :
12773  $as_echo_n "(cached) " >&6
12774else
12775  case $READLINK in
12776  [\\/]* | ?:[\\/]*)
12777  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12778  ;;
12779  *)
12780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12781for as_dir in $PATH
12782do
12783  IFS=$as_save_IFS
12784  test -z "$as_dir" && as_dir=.
12785    for ac_exec_ext in '' $ac_executable_extensions; do
12786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12787    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12789    break 2
12790  fi
12791done
12792  done
12793IFS=$as_save_IFS
12794
12795  ;;
12796esac
12797fi
12798READLINK=$ac_cv_path_READLINK
12799if test -n "$READLINK"; then
12800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12801$as_echo "$READLINK" >&6; }
12802else
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12804$as_echo "no" >&6; }
12805fi
12806
12807
12808        if test "x$READLINK" = x; then
12809          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12810        fi
12811      else
12812        # Otherwise we believe it is a complete path. Use it as it is.
12813        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12814$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12816$as_echo_n "checking for READLINK... " >&6; }
12817        if test ! -x "$tool_specified"; then
12818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12819$as_echo "not found" >&6; }
12820          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12821        fi
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12823$as_echo "$tool_specified" >&6; }
12824      fi
12825    fi
12826  fi
12827
12828
12829
12830
12831  # Publish this variable in the help.
12832
12833
12834  if test "x$DF" = x; then
12835    # The variable is not set by user, try to locate tool using the code snippet
12836    for ac_prog in df
12837do
12838  # Extract the first word of "$ac_prog", so it can be a program name with args.
12839set dummy $ac_prog; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_DF+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $DF in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868DF=$ac_cv_path_DF
12869if test -n "$DF"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12871$as_echo "$DF" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878  test -n "$DF" && break
12879done
12880
12881  else
12882    # The variable is set, but is it from the command line or the environment?
12883
12884    # Try to remove the string !DF! from our list.
12885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12887      # If it failed, the variable was not from the command line. Ignore it,
12888      # but warn the user (except for BASH, which is always set by the calling BASH).
12889      if test "xDF" != xBASH; then
12890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12891$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12892      fi
12893      # Try to locate tool using the code snippet
12894      for ac_prog in df
12895do
12896  # Extract the first word of "$ac_prog", so it can be a program name with args.
12897set dummy $ac_prog; ac_word=$2
12898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12899$as_echo_n "checking for $ac_word... " >&6; }
12900if ${ac_cv_path_DF+:} false; then :
12901  $as_echo_n "(cached) " >&6
12902else
12903  case $DF in
12904  [\\/]* | ?:[\\/]*)
12905  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12906  ;;
12907  *)
12908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12909for as_dir in $PATH
12910do
12911  IFS=$as_save_IFS
12912  test -z "$as_dir" && as_dir=.
12913    for ac_exec_ext in '' $ac_executable_extensions; do
12914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12915    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12917    break 2
12918  fi
12919done
12920  done
12921IFS=$as_save_IFS
12922
12923  ;;
12924esac
12925fi
12926DF=$ac_cv_path_DF
12927if test -n "$DF"; then
12928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12929$as_echo "$DF" >&6; }
12930else
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12932$as_echo "no" >&6; }
12933fi
12934
12935
12936  test -n "$DF" && break
12937done
12938
12939    else
12940      # If it succeeded, then it was overridden by the user. We will use it
12941      # for the tool.
12942
12943      # First remove it from the list of overridden variables, so we can test
12944      # for unknown variables in the end.
12945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12946
12947      # Check if the provided tool contains a complete path.
12948      tool_specified="$DF"
12949      tool_basename="${tool_specified##*/}"
12950      if test "x$tool_basename" = "x$tool_specified"; then
12951        # A command without a complete path is provided, search $PATH.
12952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12953$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12954        # Extract the first word of "$tool_basename", so it can be a program name with args.
12955set dummy $tool_basename; ac_word=$2
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12957$as_echo_n "checking for $ac_word... " >&6; }
12958if ${ac_cv_path_DF+:} false; then :
12959  $as_echo_n "(cached) " >&6
12960else
12961  case $DF in
12962  [\\/]* | ?:[\\/]*)
12963  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12964  ;;
12965  *)
12966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12967for as_dir in $PATH
12968do
12969  IFS=$as_save_IFS
12970  test -z "$as_dir" && as_dir=.
12971    for ac_exec_ext in '' $ac_executable_extensions; do
12972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12973    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12975    break 2
12976  fi
12977done
12978  done
12979IFS=$as_save_IFS
12980
12981  ;;
12982esac
12983fi
12984DF=$ac_cv_path_DF
12985if test -n "$DF"; then
12986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12987$as_echo "$DF" >&6; }
12988else
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12990$as_echo "no" >&6; }
12991fi
12992
12993
12994        if test "x$DF" = x; then
12995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12996        fi
12997      else
12998        # Otherwise we believe it is a complete path. Use it as it is.
12999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13000$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13002$as_echo_n "checking for DF... " >&6; }
13003        if test ! -x "$tool_specified"; then
13004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13005$as_echo "not found" >&6; }
13006          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13007        fi
13008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13009$as_echo "$tool_specified" >&6; }
13010      fi
13011    fi
13012  fi
13013
13014
13015
13016
13017  # Publish this variable in the help.
13018
13019
13020  if test "x$SETFILE" = x; then
13021    # The variable is not set by user, try to locate tool using the code snippet
13022    for ac_prog in SetFile
13023do
13024  # Extract the first word of "$ac_prog", so it can be a program name with args.
13025set dummy $ac_prog; ac_word=$2
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13027$as_echo_n "checking for $ac_word... " >&6; }
13028if ${ac_cv_path_SETFILE+:} false; then :
13029  $as_echo_n "(cached) " >&6
13030else
13031  case $SETFILE in
13032  [\\/]* | ?:[\\/]*)
13033  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13034  ;;
13035  *)
13036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13037for as_dir in $PATH
13038do
13039  IFS=$as_save_IFS
13040  test -z "$as_dir" && as_dir=.
13041    for ac_exec_ext in '' $ac_executable_extensions; do
13042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13043    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13045    break 2
13046  fi
13047done
13048  done
13049IFS=$as_save_IFS
13050
13051  ;;
13052esac
13053fi
13054SETFILE=$ac_cv_path_SETFILE
13055if test -n "$SETFILE"; then
13056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13057$as_echo "$SETFILE" >&6; }
13058else
13059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13060$as_echo "no" >&6; }
13061fi
13062
13063
13064  test -n "$SETFILE" && break
13065done
13066
13067  else
13068    # The variable is set, but is it from the command line or the environment?
13069
13070    # Try to remove the string !SETFILE! from our list.
13071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13073      # If it failed, the variable was not from the command line. Ignore it,
13074      # but warn the user (except for BASH, which is always set by the calling BASH).
13075      if test "xSETFILE" != xBASH; then
13076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13077$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13078      fi
13079      # Try to locate tool using the code snippet
13080      for ac_prog in SetFile
13081do
13082  # Extract the first word of "$ac_prog", so it can be a program name with args.
13083set dummy $ac_prog; ac_word=$2
13084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13085$as_echo_n "checking for $ac_word... " >&6; }
13086if ${ac_cv_path_SETFILE+:} false; then :
13087  $as_echo_n "(cached) " >&6
13088else
13089  case $SETFILE in
13090  [\\/]* | ?:[\\/]*)
13091  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13092  ;;
13093  *)
13094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13095for as_dir in $PATH
13096do
13097  IFS=$as_save_IFS
13098  test -z "$as_dir" && as_dir=.
13099    for ac_exec_ext in '' $ac_executable_extensions; do
13100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13101    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13103    break 2
13104  fi
13105done
13106  done
13107IFS=$as_save_IFS
13108
13109  ;;
13110esac
13111fi
13112SETFILE=$ac_cv_path_SETFILE
13113if test -n "$SETFILE"; then
13114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13115$as_echo "$SETFILE" >&6; }
13116else
13117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13118$as_echo "no" >&6; }
13119fi
13120
13121
13122  test -n "$SETFILE" && break
13123done
13124
13125    else
13126      # If it succeeded, then it was overridden by the user. We will use it
13127      # for the tool.
13128
13129      # First remove it from the list of overridden variables, so we can test
13130      # for unknown variables in the end.
13131      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13132
13133      # Check if the provided tool contains a complete path.
13134      tool_specified="$SETFILE"
13135      tool_basename="${tool_specified##*/}"
13136      if test "x$tool_basename" = "x$tool_specified"; then
13137        # A command without a complete path is provided, search $PATH.
13138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13139$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13140        # Extract the first word of "$tool_basename", so it can be a program name with args.
13141set dummy $tool_basename; ac_word=$2
13142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13143$as_echo_n "checking for $ac_word... " >&6; }
13144if ${ac_cv_path_SETFILE+:} false; then :
13145  $as_echo_n "(cached) " >&6
13146else
13147  case $SETFILE in
13148  [\\/]* | ?:[\\/]*)
13149  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13150  ;;
13151  *)
13152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13153for as_dir in $PATH
13154do
13155  IFS=$as_save_IFS
13156  test -z "$as_dir" && as_dir=.
13157    for ac_exec_ext in '' $ac_executable_extensions; do
13158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13159    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13161    break 2
13162  fi
13163done
13164  done
13165IFS=$as_save_IFS
13166
13167  ;;
13168esac
13169fi
13170SETFILE=$ac_cv_path_SETFILE
13171if test -n "$SETFILE"; then
13172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13173$as_echo "$SETFILE" >&6; }
13174else
13175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13176$as_echo "no" >&6; }
13177fi
13178
13179
13180        if test "x$SETFILE" = x; then
13181          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13182        fi
13183      else
13184        # Otherwise we believe it is a complete path. Use it as it is.
13185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13186$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13188$as_echo_n "checking for SETFILE... " >&6; }
13189        if test ! -x "$tool_specified"; then
13190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13191$as_echo "not found" >&6; }
13192          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13193        fi
13194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13195$as_echo "$tool_specified" >&6; }
13196      fi
13197    fi
13198  fi
13199
13200
13201
13202
13203  # Publish this variable in the help.
13204
13205
13206  if test "x$CPIO" = x; then
13207    # The variable is not set by user, try to locate tool using the code snippet
13208    for ac_prog in cpio bsdcpio
13209do
13210  # Extract the first word of "$ac_prog", so it can be a program name with args.
13211set dummy $ac_prog; ac_word=$2
13212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13213$as_echo_n "checking for $ac_word... " >&6; }
13214if ${ac_cv_path_CPIO+:} false; then :
13215  $as_echo_n "(cached) " >&6
13216else
13217  case $CPIO in
13218  [\\/]* | ?:[\\/]*)
13219  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13220  ;;
13221  *)
13222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13223for as_dir in $PATH
13224do
13225  IFS=$as_save_IFS
13226  test -z "$as_dir" && as_dir=.
13227    for ac_exec_ext in '' $ac_executable_extensions; do
13228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13229    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13231    break 2
13232  fi
13233done
13234  done
13235IFS=$as_save_IFS
13236
13237  ;;
13238esac
13239fi
13240CPIO=$ac_cv_path_CPIO
13241if test -n "$CPIO"; then
13242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13243$as_echo "$CPIO" >&6; }
13244else
13245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13246$as_echo "no" >&6; }
13247fi
13248
13249
13250  test -n "$CPIO" && break
13251done
13252
13253  else
13254    # The variable is set, but is it from the command line or the environment?
13255
13256    # Try to remove the string !CPIO! from our list.
13257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13259      # If it failed, the variable was not from the command line. Ignore it,
13260      # but warn the user (except for BASH, which is always set by the calling BASH).
13261      if test "xCPIO" != xBASH; then
13262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13263$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13264      fi
13265      # Try to locate tool using the code snippet
13266      for ac_prog in cpio bsdcpio
13267do
13268  # Extract the first word of "$ac_prog", so it can be a program name with args.
13269set dummy $ac_prog; ac_word=$2
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13271$as_echo_n "checking for $ac_word... " >&6; }
13272if ${ac_cv_path_CPIO+:} false; then :
13273  $as_echo_n "(cached) " >&6
13274else
13275  case $CPIO in
13276  [\\/]* | ?:[\\/]*)
13277  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13278  ;;
13279  *)
13280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13281for as_dir in $PATH
13282do
13283  IFS=$as_save_IFS
13284  test -z "$as_dir" && as_dir=.
13285    for ac_exec_ext in '' $ac_executable_extensions; do
13286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13287    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13289    break 2
13290  fi
13291done
13292  done
13293IFS=$as_save_IFS
13294
13295  ;;
13296esac
13297fi
13298CPIO=$ac_cv_path_CPIO
13299if test -n "$CPIO"; then
13300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13301$as_echo "$CPIO" >&6; }
13302else
13303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13304$as_echo "no" >&6; }
13305fi
13306
13307
13308  test -n "$CPIO" && break
13309done
13310
13311    else
13312      # If it succeeded, then it was overridden by the user. We will use it
13313      # for the tool.
13314
13315      # First remove it from the list of overridden variables, so we can test
13316      # for unknown variables in the end.
13317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13318
13319      # Check if the provided tool contains a complete path.
13320      tool_specified="$CPIO"
13321      tool_basename="${tool_specified##*/}"
13322      if test "x$tool_basename" = "x$tool_specified"; then
13323        # A command without a complete path is provided, search $PATH.
13324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13325$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13326        # Extract the first word of "$tool_basename", so it can be a program name with args.
13327set dummy $tool_basename; ac_word=$2
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13329$as_echo_n "checking for $ac_word... " >&6; }
13330if ${ac_cv_path_CPIO+:} false; then :
13331  $as_echo_n "(cached) " >&6
13332else
13333  case $CPIO in
13334  [\\/]* | ?:[\\/]*)
13335  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13336  ;;
13337  *)
13338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13339for as_dir in $PATH
13340do
13341  IFS=$as_save_IFS
13342  test -z "$as_dir" && as_dir=.
13343    for ac_exec_ext in '' $ac_executable_extensions; do
13344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13345    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13347    break 2
13348  fi
13349done
13350  done
13351IFS=$as_save_IFS
13352
13353  ;;
13354esac
13355fi
13356CPIO=$ac_cv_path_CPIO
13357if test -n "$CPIO"; then
13358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13359$as_echo "$CPIO" >&6; }
13360else
13361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13362$as_echo "no" >&6; }
13363fi
13364
13365
13366        if test "x$CPIO" = x; then
13367          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13368        fi
13369      else
13370        # Otherwise we believe it is a complete path. Use it as it is.
13371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13372$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13374$as_echo_n "checking for CPIO... " >&6; }
13375        if test ! -x "$tool_specified"; then
13376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13377$as_echo "not found" >&6; }
13378          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13379        fi
13380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13381$as_echo "$tool_specified" >&6; }
13382      fi
13383    fi
13384  fi
13385
13386
13387
13388
13389# Now we can determine OpenJDK build and target platforms. This is required to
13390# have early on.
13391# Make sure we can run config.sub.
13392$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13393  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13394
13395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13396$as_echo_n "checking build system type... " >&6; }
13397if ${ac_cv_build+:} false; then :
13398  $as_echo_n "(cached) " >&6
13399else
13400  ac_build_alias=$build_alias
13401test "x$ac_build_alias" = x &&
13402  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13403test "x$ac_build_alias" = x &&
13404  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13405ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13406  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13407
13408fi
13409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13410$as_echo "$ac_cv_build" >&6; }
13411case $ac_cv_build in
13412*-*-*) ;;
13413*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13414esac
13415build=$ac_cv_build
13416ac_save_IFS=$IFS; IFS='-'
13417set x $ac_cv_build
13418shift
13419build_cpu=$1
13420build_vendor=$2
13421shift; shift
13422# Remember, the first character of IFS is used to create $*,
13423# except with old shells:
13424build_os=$*
13425IFS=$ac_save_IFS
13426case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13427
13428
13429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13430$as_echo_n "checking host system type... " >&6; }
13431if ${ac_cv_host+:} false; then :
13432  $as_echo_n "(cached) " >&6
13433else
13434  if test "x$host_alias" = x; then
13435  ac_cv_host=$ac_cv_build
13436else
13437  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13438    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13439fi
13440
13441fi
13442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13443$as_echo "$ac_cv_host" >&6; }
13444case $ac_cv_host in
13445*-*-*) ;;
13446*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13447esac
13448host=$ac_cv_host
13449ac_save_IFS=$IFS; IFS='-'
13450set x $ac_cv_host
13451shift
13452host_cpu=$1
13453host_vendor=$2
13454shift; shift
13455# Remember, the first character of IFS is used to create $*,
13456# except with old shells:
13457host_os=$*
13458IFS=$ac_save_IFS
13459case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13460
13461
13462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13463$as_echo_n "checking target system type... " >&6; }
13464if ${ac_cv_target+:} false; then :
13465  $as_echo_n "(cached) " >&6
13466else
13467  if test "x$target_alias" = x; then
13468  ac_cv_target=$ac_cv_host
13469else
13470  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13471    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13472fi
13473
13474fi
13475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13476$as_echo "$ac_cv_target" >&6; }
13477case $ac_cv_target in
13478*-*-*) ;;
13479*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13480esac
13481target=$ac_cv_target
13482ac_save_IFS=$IFS; IFS='-'
13483set x $ac_cv_target
13484shift
13485target_cpu=$1
13486target_vendor=$2
13487shift; shift
13488# Remember, the first character of IFS is used to create $*,
13489# except with old shells:
13490target_os=$*
13491IFS=$ac_save_IFS
13492case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13493
13494
13495# The aliases save the names the user supplied, while $host etc.
13496# will get canonicalized.
13497test -n "$target_alias" &&
13498  test "$program_prefix$program_suffix$program_transform_name" = \
13499    NONENONEs,x,x, &&
13500  program_prefix=${target_alias}-
13501
13502  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13503  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13504  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13505  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13506  # to use the configure naming style.
13507
13508
13509
13510
13511
13512  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13513  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13514  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13515  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13516  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13517  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13518
13519
13520
13521  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13522
13523  case "$build_os" in
13524    *linux*)
13525      VAR_OS=linux
13526      VAR_OS_API=posix
13527      VAR_OS_ENV=linux
13528      ;;
13529    *solaris*)
13530      VAR_OS=solaris
13531      VAR_OS_API=posix
13532      VAR_OS_ENV=solaris
13533      ;;
13534    *darwin*)
13535      VAR_OS=macosx
13536      VAR_OS_API=posix
13537      VAR_OS_ENV=macosx
13538      ;;
13539    *bsd*)
13540      VAR_OS=bsd
13541      VAR_OS_API=posix
13542      VAR_OS_ENV=bsd
13543      ;;
13544    *cygwin*)
13545      VAR_OS=windows
13546      VAR_OS_API=winapi
13547      VAR_OS_ENV=windows.cygwin
13548      ;;
13549    *mingw*)
13550      VAR_OS=windows
13551      VAR_OS_API=winapi
13552      VAR_OS_ENV=windows.msys
13553      ;;
13554    *aix*)
13555      VAR_OS=aix
13556      VAR_OS_API=posix
13557      VAR_OS_ENV=aix
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  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13635  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13636  OPENJDK_BUILD_CPU="$VAR_CPU"
13637  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13638  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13639  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13640
13641
13642
13643
13644
13645
13646
13647
13648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13649$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13651$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13652
13653  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13654
13655  case "$host_os" in
13656    *linux*)
13657      VAR_OS=linux
13658      VAR_OS_API=posix
13659      VAR_OS_ENV=linux
13660      ;;
13661    *solaris*)
13662      VAR_OS=solaris
13663      VAR_OS_API=posix
13664      VAR_OS_ENV=solaris
13665      ;;
13666    *darwin*)
13667      VAR_OS=macosx
13668      VAR_OS_API=posix
13669      VAR_OS_ENV=macosx
13670      ;;
13671    *bsd*)
13672      VAR_OS=bsd
13673      VAR_OS_API=posix
13674      VAR_OS_ENV=bsd
13675      ;;
13676    *cygwin*)
13677      VAR_OS=windows
13678      VAR_OS_API=winapi
13679      VAR_OS_ENV=windows.cygwin
13680      ;;
13681    *mingw*)
13682      VAR_OS=windows
13683      VAR_OS_API=winapi
13684      VAR_OS_ENV=windows.msys
13685      ;;
13686    *aix*)
13687      VAR_OS=aix
13688      VAR_OS_API=posix
13689      VAR_OS_ENV=aix
13690      ;;
13691    *)
13692      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13693      ;;
13694  esac
13695
13696
13697  # First argument is the cpu name from the trip/quad
13698  case "$host_cpu" in
13699    x86_64)
13700      VAR_CPU=x86_64
13701      VAR_CPU_ARCH=x86
13702      VAR_CPU_BITS=64
13703      VAR_CPU_ENDIAN=little
13704      ;;
13705    i?86)
13706      VAR_CPU=x86
13707      VAR_CPU_ARCH=x86
13708      VAR_CPU_BITS=32
13709      VAR_CPU_ENDIAN=little
13710      ;;
13711    arm*)
13712      VAR_CPU=arm
13713      VAR_CPU_ARCH=arm
13714      VAR_CPU_BITS=32
13715      VAR_CPU_ENDIAN=little
13716      ;;
13717    powerpc)
13718      VAR_CPU=ppc
13719      VAR_CPU_ARCH=ppc
13720      VAR_CPU_BITS=32
13721      VAR_CPU_ENDIAN=big
13722      ;;
13723    powerpc64)
13724      VAR_CPU=ppc64
13725      VAR_CPU_ARCH=ppc
13726      VAR_CPU_BITS=64
13727      VAR_CPU_ENDIAN=big
13728      ;;
13729    powerpc64le)
13730      VAR_CPU=ppc64
13731      VAR_CPU_ARCH=ppc
13732      VAR_CPU_BITS=64
13733      VAR_CPU_ENDIAN=little
13734      ;;
13735    s390)
13736      VAR_CPU=s390
13737      VAR_CPU_ARCH=s390
13738      VAR_CPU_BITS=32
13739      VAR_CPU_ENDIAN=big
13740      ;;
13741    s390x)
13742      VAR_CPU=s390x
13743      VAR_CPU_ARCH=s390
13744      VAR_CPU_BITS=64
13745      VAR_CPU_ENDIAN=big
13746      ;;
13747    sparc)
13748      VAR_CPU=sparc
13749      VAR_CPU_ARCH=sparc
13750      VAR_CPU_BITS=32
13751      VAR_CPU_ENDIAN=big
13752      ;;
13753    sparcv9|sparc64)
13754      VAR_CPU=sparcv9
13755      VAR_CPU_ARCH=sparc
13756      VAR_CPU_BITS=64
13757      VAR_CPU_ENDIAN=big
13758      ;;
13759    *)
13760      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13761      ;;
13762  esac
13763
13764  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13765  OPENJDK_TARGET_OS="$VAR_OS"
13766  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13767  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13768  OPENJDK_TARGET_CPU="$VAR_CPU"
13769  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13770  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13771  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13772
13773
13774
13775
13776
13777
13778
13779
13780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13781$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13783$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13784
13785
13786
13787# Check whether --with-target-bits was given.
13788if test "${with_target_bits+set}" = set; then :
13789  withval=$with_target_bits;
13790fi
13791
13792
13793  # We have three types of compiles:
13794  # native  == normal compilation, target system == build system
13795  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13796  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13797  #
13798  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13799    # We're doing a proper cross-compilation
13800    COMPILE_TYPE="cross"
13801  else
13802    COMPILE_TYPE="native"
13803  fi
13804
13805  if test "x$with_target_bits" != x; then
13806    if test "x$COMPILE_TYPE" = "xcross"; then
13807      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13808    fi
13809
13810    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13811      # A reduced build is requested
13812      COMPILE_TYPE="reduced"
13813      OPENJDK_TARGET_CPU_BITS=32
13814      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13815        OPENJDK_TARGET_CPU=x86
13816      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13817        OPENJDK_TARGET_CPU=sparc
13818      else
13819        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13820      fi
13821    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13822      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
13823    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13824      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13825$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13826    else
13827      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13828    fi
13829  fi
13830
13831
13832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13833$as_echo_n "checking compilation type... " >&6; }
13834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13835$as_echo "$COMPILE_TYPE" >&6; }
13836
13837
13838  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13839    REQUIRED_OS_NAME=SunOS
13840    REQUIRED_OS_VERSION=5.10
13841  fi
13842  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13843    REQUIRED_OS_NAME=Linux
13844    REQUIRED_OS_VERSION=2.6
13845  fi
13846  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13847    REQUIRED_OS_NAME=Windows
13848    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13849      REQUIRED_OS_VERSION=5.2
13850    else
13851      REQUIRED_OS_VERSION=5.1
13852    fi
13853  fi
13854  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13855    REQUIRED_OS_NAME=Darwin
13856    REQUIRED_OS_VERSION=11.2
13857  fi
13858
13859
13860
13861
13862
13863  # Also store the legacy naming of the cpu.
13864  # Ie i586 and amd64 instead of x86 and x86_64
13865  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13866  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13867    OPENJDK_TARGET_CPU_LEGACY="i586"
13868  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13869    # On all platforms except MacOSX replace x86_64 with amd64.
13870    OPENJDK_TARGET_CPU_LEGACY="amd64"
13871  fi
13872
13873
13874  # And the second legacy naming of the cpu.
13875  # Ie i386 and amd64 instead of x86 and x86_64.
13876  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13877  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13878    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13879  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13880    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13881  fi
13882
13883
13884  # This is the name of the cpu (but using i386 and amd64 instead of
13885  # x86 and x86_64, respectively), preceeded by a /, to be used when
13886  # locating libraries. On macosx, it's empty, though.
13887  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13888  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13889    OPENJDK_TARGET_CPU_LIBDIR=""
13890  fi
13891
13892
13893  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13894  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13895  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13896  OPENJDK_TARGET_CPU_ISADIR=""
13897  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13898    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13899      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13900    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13901      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13902    fi
13903  fi
13904
13905
13906  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13907  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13908  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13909    # On linux only, we replace x86 with i386.
13910    OPENJDK_TARGET_CPU_OSARCH="i386"
13911  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13912    # On all platforms except macosx, we replace x86_64 with amd64.
13913    OPENJDK_TARGET_CPU_OSARCH="amd64"
13914  fi
13915
13916
13917  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13918  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13919    OPENJDK_TARGET_CPU_JLI="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_JLI="amd64"
13923  fi
13924  # Now setup the -D flags for building libjli.
13925  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13926  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13927    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13928      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13929    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13930      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13931    fi
13932  fi
13933
13934
13935  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13936  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13937    OPENJDK_TARGET_OS_API_DIR="unix"
13938  fi
13939  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13940    OPENJDK_TARGET_OS_API_DIR="windows"
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_API_DIR}
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=PPC   ;;
13973    s390*)   ZERO_ARCHDEF=S390  ;;
13974    sparc*)  ZERO_ARCHDEF=SPARC ;;
13975    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13976    x86)     ZERO_ARCHDEF=IA32  ;;
13977    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13978  esac
13979
13980
13981
13982
13983# Continue setting up basic stuff. Most remaining code require fundamental tools.
13984
13985  # Save the current directory this script was started from
13986  CURDIR="$PWD"
13987
13988  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13989    PATH_SEP=";"
13990
13991  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13992  if test $SRC_ROOT_LENGTH -gt 100; then
13993    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13994  fi
13995
13996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13998$as_echo_n "checking cygwin release... " >&6; }
13999    CYGWIN_VERSION=`$UNAME -r`
14000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14001$as_echo "$CYGWIN_VERSION" >&6; }
14002    WINDOWS_ENV_VENDOR='cygwin'
14003    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14004
14005    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14006    if test "x$CYGWIN_VERSION_OK" = x; then
14007      { $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
14008$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;}
14009      as_fn_error $? "Cannot continue" "$LINENO" 5
14010    fi
14011    if test "x$CYGPATH" = x; then
14012      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14013    fi
14014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14015$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14016    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14017    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14018    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14019    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14021$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14022    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14023    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14024    if test "x$test_cygdrive_prefix" = x; then
14025      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14026    fi
14027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14029$as_echo_n "checking msys release... " >&6; }
14030    MSYS_VERSION=`$UNAME -r`
14031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14032$as_echo "$MSYS_VERSION" >&6; }
14033
14034    WINDOWS_ENV_VENDOR='msys'
14035    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14036
14037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14038$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14039    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14040    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14041
14042  windows_path="$MSYS_ROOT_PATH"
14043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14044    unix_path=`$CYGPATH -u "$windows_path"`
14045    MSYS_ROOT_PATH="$unix_path"
14046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14048    MSYS_ROOT_PATH="$unix_path"
14049  fi
14050
14051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14052$as_echo "$MSYS_ROOT_PATH" >&6; }
14053    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14054  else
14055    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14056  fi
14057
14058  # Test if windows or unix (cygwin/msys) find is first in path.
14059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14060$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14061  FIND_BINARY_OUTPUT=`find --version 2>&1`
14062  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14064$as_echo "unix style" >&6; }
14065  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14067$as_echo "Windows" >&6; }
14068    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14069$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14070    { $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
14071$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14072    as_fn_error $? "Cannot continue" "$LINENO" 5
14073  else
14074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14075$as_echo "unknown" >&6; }
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14077$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14078  fi
14079
14080  else
14081    PATH_SEP=":"
14082  fi
14083
14084
14085  # We get the top-level directory from the supporting wrappers.
14086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14087$as_echo_n "checking for top-level directory... " >&6; }
14088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14089$as_echo "$TOPDIR" >&6; }
14090
14091
14092  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14093
14094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14095
14096  # Input might be given as Windows format, start by converting to
14097  # unix format.
14098  path="$CURDIR"
14099  new_path=`$CYGPATH -u "$path"`
14100
14101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14104  # "foo.exe" is OK but "foo" is an error.
14105  #
14106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14107  # It is also a way to make sure we got the proper file name for the real test later on.
14108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14109  if test "x$test_shortpath" = x; then
14110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14111$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14112    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14113  fi
14114
14115  # Call helper function which possibly converts this using DOS-style short mode.
14116  # If so, the updated path is stored in $new_path.
14117
14118  input_path="$new_path"
14119  # Check if we need to convert this using DOS-style short mode. If the path
14120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14121  # take no chances and rewrite it.
14122  # Note: m4 eats our [], so we need to use [ and ] instead.
14123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14124  if test "x$has_forbidden_chars" != x; then
14125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14129      # Going to short mode and back again did indeed matter. Since short mode is
14130      # case insensitive, let's make it lowercase to improve readability.
14131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14132      # Now convert it back to Unix-stile (cygpath)
14133      input_path=`$CYGPATH -u "$shortmode_path"`
14134      new_path="$input_path"
14135    fi
14136  fi
14137
14138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14139  if test "x$test_cygdrive_prefix" = x; then
14140    # As a simple fix, exclude /usr/bin since it's not a real path.
14141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14143      # a path prefixed by /cygdrive for fixpath to work.
14144      new_path="$CYGWIN_ROOT_PATH$input_path"
14145    fi
14146  fi
14147
14148
14149  if test "x$path" != "x$new_path"; then
14150    CURDIR="$new_path"
14151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14152$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14153  fi
14154
14155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14156
14157  path="$CURDIR"
14158  has_colon=`$ECHO $path | $GREP ^.:`
14159  new_path="$path"
14160  if test "x$has_colon" = x; then
14161    # Not in mixed or Windows style, start by that.
14162    new_path=`cmd //c echo $path`
14163  fi
14164
14165
14166  input_path="$new_path"
14167  # Check if we need to convert this using DOS-style short mode. If the path
14168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14169  # take no chances and rewrite it.
14170  # Note: m4 eats our [], so we need to use [ and ] instead.
14171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14172  if test "x$has_forbidden_chars" != x; then
14173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14175  fi
14176
14177
14178  windows_path="$new_path"
14179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14180    unix_path=`$CYGPATH -u "$windows_path"`
14181    new_path="$unix_path"
14182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14184    new_path="$unix_path"
14185  fi
14186
14187  if test "x$path" != "x$new_path"; then
14188    CURDIR="$new_path"
14189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14190$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14191  fi
14192
14193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14195
14196  else
14197    # We're on a posix platform. Hooray! :)
14198    path="$CURDIR"
14199    has_space=`$ECHO "$path" | $GREP " "`
14200    if test "x$has_space" != x; then
14201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14202$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14203      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14204    fi
14205
14206    # Use eval to expand a potential ~
14207    eval path="$path"
14208    if test ! -f "$path" && test ! -d "$path"; then
14209      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14210    fi
14211
14212    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14213  fi
14214
14215
14216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14217
14218  # Input might be given as Windows format, start by converting to
14219  # unix format.
14220  path="$TOPDIR"
14221  new_path=`$CYGPATH -u "$path"`
14222
14223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14226  # "foo.exe" is OK but "foo" is an error.
14227  #
14228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14229  # It is also a way to make sure we got the proper file name for the real test later on.
14230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14231  if test "x$test_shortpath" = x; then
14232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14233$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14234    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14235  fi
14236
14237  # Call helper function which possibly converts this using DOS-style short mode.
14238  # If so, the updated path is stored in $new_path.
14239
14240  input_path="$new_path"
14241  # Check if we need to convert this using DOS-style short mode. If the path
14242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14243  # take no chances and rewrite it.
14244  # Note: m4 eats our [], so we need to use [ and ] instead.
14245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14246  if test "x$has_forbidden_chars" != x; then
14247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14251      # Going to short mode and back again did indeed matter. Since short mode is
14252      # case insensitive, let's make it lowercase to improve readability.
14253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14254      # Now convert it back to Unix-stile (cygpath)
14255      input_path=`$CYGPATH -u "$shortmode_path"`
14256      new_path="$input_path"
14257    fi
14258  fi
14259
14260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14261  if test "x$test_cygdrive_prefix" = x; then
14262    # As a simple fix, exclude /usr/bin since it's not a real path.
14263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14265      # a path prefixed by /cygdrive for fixpath to work.
14266      new_path="$CYGWIN_ROOT_PATH$input_path"
14267    fi
14268  fi
14269
14270
14271  if test "x$path" != "x$new_path"; then
14272    TOPDIR="$new_path"
14273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14274$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14275  fi
14276
14277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14278
14279  path="$TOPDIR"
14280  has_colon=`$ECHO $path | $GREP ^.:`
14281  new_path="$path"
14282  if test "x$has_colon" = x; then
14283    # Not in mixed or Windows style, start by that.
14284    new_path=`cmd //c echo $path`
14285  fi
14286
14287
14288  input_path="$new_path"
14289  # Check if we need to convert this using DOS-style short mode. If the path
14290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14291  # take no chances and rewrite it.
14292  # Note: m4 eats our [], so we need to use [ and ] instead.
14293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14294  if test "x$has_forbidden_chars" != x; then
14295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14297  fi
14298
14299
14300  windows_path="$new_path"
14301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14302    unix_path=`$CYGPATH -u "$windows_path"`
14303    new_path="$unix_path"
14304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14306    new_path="$unix_path"
14307  fi
14308
14309  if test "x$path" != "x$new_path"; then
14310    TOPDIR="$new_path"
14311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14312$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14313  fi
14314
14315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14317
14318  else
14319    # We're on a posix platform. Hooray! :)
14320    path="$TOPDIR"
14321    has_space=`$ECHO "$path" | $GREP " "`
14322    if test "x$has_space" != x; then
14323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14324$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14325      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14326    fi
14327
14328    # Use eval to expand a potential ~
14329    eval path="$path"
14330    if test ! -f "$path" && test ! -d "$path"; then
14331      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14332    fi
14333
14334    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14335  fi
14336
14337  # SRC_ROOT is a traditional alias for TOPDIR.
14338  SRC_ROOT=$TOPDIR
14339
14340  # Locate the directory of this script.
14341  AUTOCONF_DIR=$TOPDIR/common/autoconf
14342
14343
14344  # Setup default logging of stdout and stderr to build.log in the output root.
14345  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14346  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14347  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14348
14349
14350
14351
14352
14353# Check if it's a pure open build or if custom sources are to be used.
14354
14355  # Check whether --enable-openjdk-only was given.
14356if test "${enable_openjdk_only+set}" = set; then :
14357  enableval=$enable_openjdk_only;
14358else
14359  enable_openjdk_only="no"
14360fi
14361
14362
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14364$as_echo_n "checking for presence of closed sources... " >&6; }
14365  if test -d "$SRC_ROOT/jdk/src/closed"; then
14366    CLOSED_SOURCE_PRESENT=yes
14367  else
14368    CLOSED_SOURCE_PRESENT=no
14369  fi
14370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14371$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14372
14373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14374$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14375  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14377$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14378
14379  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14380    OPENJDK=true
14381    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14382      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14383$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14384    fi
14385  else
14386    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14387      OPENJDK=true
14388    else
14389      OPENJDK=false
14390    fi
14391  fi
14392
14393  if test "x$OPENJDK" = "xtrue"; then
14394    SET_OPENJDK="OPENJDK=true"
14395  fi
14396
14397
14398
14399  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14400  # the IncludeCustomExtension macro.
14401
14402
14403# Check whether --with-custom-make-dir was given.
14404if test "${with_custom_make_dir+set}" = set; then :
14405  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
14406$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14407fi
14408
14409
14410
14411
14412# These are needed to be able to create a configuration name (and thus the output directory)
14413
14414  ###############################################################################
14415  #
14416  # Check which variant of the JDK that we want to build.
14417  # Currently we have:
14418  #    normal:   standard edition
14419  # but the custom make system may add other variants
14420  #
14421  # Effectively the JDK variant gives a name to a specific set of
14422  # modules to compile into the JDK. In the future, these modules
14423  # might even be Jigsaw modules.
14424  #
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14426$as_echo_n "checking which variant of the JDK to build... " >&6; }
14427
14428# Check whether --with-jdk-variant was given.
14429if test "${with_jdk_variant+set}" = set; then :
14430  withval=$with_jdk_variant;
14431fi
14432
14433
14434  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14435    JDK_VARIANT="normal"
14436  else
14437    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14438  fi
14439
14440
14441
14442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14443$as_echo "$JDK_VARIANT" >&6; }
14444
14445
14446###############################################################################
14447#
14448# Check which interpreter of the JVM we want to build.
14449# Currently we have:
14450#    template: Template interpreter (the default)
14451#    cpp     : C++ interpreter
14452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14453$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14454
14455# Check whether --with-jvm-interpreter was given.
14456if test "${with_jvm_interpreter+set}" = set; then :
14457  withval=$with_jvm_interpreter;
14458fi
14459
14460
14461if test "x$with_jvm_interpreter" = x; then
14462     with_jvm_interpreter="template"
14463fi
14464
14465JVM_INTERPRETER="$with_jvm_interpreter"
14466
14467if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14468   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14469fi
14470
14471
14472
14473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14474$as_echo "$with_jvm_interpreter" >&6; }
14475
14476
14477
14478  ###############################################################################
14479  #
14480  # Check which variants of the JVM that we want to build.
14481  # Currently we have:
14482  #    server: normal interpreter and a tiered C1/C2 compiler
14483  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14484  #    minimal1: reduced form of client with optional VM services and features stripped out
14485  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14486  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14487  #    zero: no machine code interpreter, no compiler
14488  #    zeroshark: zero interpreter and shark/llvm compiler backend
14489#    core: interpreter only, no compiler (only works on some platforms)
14490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14491$as_echo_n "checking which variants of the JVM to build... " >&6; }
14492
14493# Check whether --with-jvm-variants was given.
14494if test "${with_jvm_variants+set}" = set; then :
14495  withval=$with_jvm_variants;
14496fi
14497
14498
14499  if test "x$with_jvm_variants" = x; then
14500    with_jvm_variants="server"
14501  fi
14502
14503  JVM_VARIANTS=",$with_jvm_variants,"
14504  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,//'`
14505
14506  if test "x$TEST_VARIANTS" != "x,"; then
14507     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14508  fi
14509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14510$as_echo "$with_jvm_variants" >&6; }
14511
14512  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14513  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14514  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14515  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14516  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14517  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14518  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14519
14520  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14521    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14522      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14523    fi
14524  fi
14525  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14526    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14527      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14528    fi
14529  fi
14530  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14531    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14532      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14533    fi
14534  fi
14535
14536  # Replace the commas with AND for use in the build directory name.
14537  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14538  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/'`
14539  if test "x$COUNT_VARIANTS" != "x,1"; then
14540    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14541  else
14542    BUILDING_MULTIPLE_JVM_VARIANTS=no
14543  fi
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554  INCLUDE_SA=true
14555  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14556    INCLUDE_SA=false
14557  fi
14558  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14559    INCLUDE_SA=false
14560  fi
14561  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14562    INCLUDE_SA=false
14563  fi
14564
14565
14566  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14567    MACOSX_UNIVERSAL="true"
14568  fi
14569
14570
14571
14572
14573  ###############################################################################
14574  #
14575  # Set the debug level
14576  #    release: no debug information, all optimizations, no asserts.
14577  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14578  #    fastdebug: debug information (-g), all optimizations, all asserts
14579  #    slowdebug: debug information (-g), no optimizations, all asserts
14580  #
14581  DEBUG_LEVEL="release"
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14583$as_echo_n "checking which debug level to use... " >&6; }
14584  # Check whether --enable-debug was given.
14585if test "${enable_debug+set}" = set; then :
14586  enableval=$enable_debug;
14587        ENABLE_DEBUG="${enableval}"
14588        DEBUG_LEVEL="fastdebug"
14589
14590else
14591  ENABLE_DEBUG="no"
14592fi
14593
14594
14595
14596# Check whether --with-debug-level was given.
14597if test "${with_debug_level+set}" = set; then :
14598  withval=$with_debug_level;
14599        DEBUG_LEVEL="${withval}"
14600        if test "x$ENABLE_DEBUG" = xyes; then
14601          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14602        fi
14603
14604fi
14605
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14607$as_echo "$DEBUG_LEVEL" >&6; }
14608
14609  if test "x$DEBUG_LEVEL" != xrelease && \
14610      test "x$DEBUG_LEVEL" != xoptimized && \
14611      test "x$DEBUG_LEVEL" != xfastdebug && \
14612      test "x$DEBUG_LEVEL" != xslowdebug; then
14613    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14614  fi
14615
14616
14617  ###############################################################################
14618  #
14619  # Setup legacy vars/targets and new vars to deal with different debug levels.
14620  #
14621
14622  case $DEBUG_LEVEL in
14623    release )
14624      VARIANT="OPT"
14625      FASTDEBUG="false"
14626      DEBUG_CLASSFILES="false"
14627      BUILD_VARIANT_RELEASE=""
14628      HOTSPOT_DEBUG_LEVEL="product"
14629      HOTSPOT_EXPORT="product"
14630      ;;
14631    fastdebug )
14632      VARIANT="DBG"
14633      FASTDEBUG="true"
14634      DEBUG_CLASSFILES="true"
14635      BUILD_VARIANT_RELEASE="-fastdebug"
14636      HOTSPOT_DEBUG_LEVEL="fastdebug"
14637      HOTSPOT_EXPORT="fastdebug"
14638      ;;
14639    slowdebug )
14640      VARIANT="DBG"
14641      FASTDEBUG="false"
14642      DEBUG_CLASSFILES="true"
14643      BUILD_VARIANT_RELEASE="-debug"
14644      HOTSPOT_DEBUG_LEVEL="debug"
14645      HOTSPOT_EXPORT="debug"
14646      ;;
14647    optimized )
14648      VARIANT="OPT"
14649      FASTDEBUG="false"
14650      DEBUG_CLASSFILES="false"
14651      BUILD_VARIANT_RELEASE="-optimized"
14652      HOTSPOT_DEBUG_LEVEL="optimized"
14653      HOTSPOT_EXPORT="optimized"
14654      ;;
14655  esac
14656
14657  # The debug level 'optimized' is a little special because it is currently only
14658  # applicable to the HotSpot build where it means to build a completely
14659  # optimized version of the VM without any debugging code (like for the
14660  # 'release' debug level which is called 'product' in the HotSpot build) but
14661  # with the exception that it can contain additional code which is otherwise
14662  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14663  # test new and/or experimental features which are not intended for customer
14664  # shipment. Because these new features need to be tested and benchmarked in
14665  # real world scenarios, we want to build the containing JDK at the 'release'
14666  # debug level.
14667  if test "x$DEBUG_LEVEL" = xoptimized; then
14668    DEBUG_LEVEL="release"
14669  fi
14670
14671  #####
14672  # Generate the legacy makefile targets for hotspot.
14673  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14674  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14675  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14676  # But until then ...
14677  HOTSPOT_TARGET=""
14678
14679  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14680    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14681  fi
14682
14683  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14684    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14685  fi
14686
14687  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14688    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14689  fi
14690
14691  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14692    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14693  fi
14694
14695  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14696    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14697  fi
14698
14699  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14700    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14701  fi
14702
14703  if test "x$JVM_VARIANT_CORE" = xtrue; then
14704    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14705  fi
14706
14707  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14708
14709  # On Macosx universal binaries are produced, but they only contain
14710  # 64 bit intel. This invalidates control of which jvms are built
14711  # from configure, but only server is valid anyway. Fix this
14712  # when hotspot makefiles are rewritten.
14713  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14714    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14715  fi
14716
14717  #####
14718
14719
14720
14721
14722
14723
14724
14725
14726# With basic setup done, call the custom early hook.
14727
14728
14729# Check if we have devkits, extra paths or sysroot set.
14730
14731
14732# Check whether --with-devkit was given.
14733if test "${with_devkit+set}" = set; then :
14734  withval=$with_devkit;
14735
14736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14737
14738  # Input might be given as Windows format, start by converting to
14739  # unix format.
14740  path="$with_devkit"
14741  new_path=`$CYGPATH -u "$path"`
14742
14743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14746  # "foo.exe" is OK but "foo" is an error.
14747  #
14748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14749  # It is also a way to make sure we got the proper file name for the real test later on.
14750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14751  if test "x$test_shortpath" = x; then
14752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14753$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14754    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14755  fi
14756
14757  # Call helper function which possibly converts this using DOS-style short mode.
14758  # If so, the updated path is stored in $new_path.
14759
14760  input_path="$new_path"
14761  # Check if we need to convert this using DOS-style short mode. If the path
14762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14763  # take no chances and rewrite it.
14764  # Note: m4 eats our [], so we need to use [ and ] instead.
14765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14766  if test "x$has_forbidden_chars" != x; then
14767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14771      # Going to short mode and back again did indeed matter. Since short mode is
14772      # case insensitive, let's make it lowercase to improve readability.
14773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14774      # Now convert it back to Unix-stile (cygpath)
14775      input_path=`$CYGPATH -u "$shortmode_path"`
14776      new_path="$input_path"
14777    fi
14778  fi
14779
14780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14781  if test "x$test_cygdrive_prefix" = x; then
14782    # As a simple fix, exclude /usr/bin since it's not a real path.
14783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14785      # a path prefixed by /cygdrive for fixpath to work.
14786      new_path="$CYGWIN_ROOT_PATH$input_path"
14787    fi
14788  fi
14789
14790
14791  if test "x$path" != "x$new_path"; then
14792    with_devkit="$new_path"
14793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14794$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14795  fi
14796
14797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14798
14799  path="$with_devkit"
14800  has_colon=`$ECHO $path | $GREP ^.:`
14801  new_path="$path"
14802  if test "x$has_colon" = x; then
14803    # Not in mixed or Windows style, start by that.
14804    new_path=`cmd //c echo $path`
14805  fi
14806
14807
14808  input_path="$new_path"
14809  # Check if we need to convert this using DOS-style short mode. If the path
14810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14811  # take no chances and rewrite it.
14812  # Note: m4 eats our [], so we need to use [ and ] instead.
14813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14814  if test "x$has_forbidden_chars" != x; then
14815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14817  fi
14818
14819
14820  windows_path="$new_path"
14821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14822    unix_path=`$CYGPATH -u "$windows_path"`
14823    new_path="$unix_path"
14824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14826    new_path="$unix_path"
14827  fi
14828
14829  if test "x$path" != "x$new_path"; then
14830    with_devkit="$new_path"
14831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14832$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14833  fi
14834
14835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14837
14838  else
14839    # We're on a posix platform. Hooray! :)
14840    path="$with_devkit"
14841    has_space=`$ECHO "$path" | $GREP " "`
14842    if test "x$has_space" != x; then
14843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14844$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14845      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14846    fi
14847
14848    # Use eval to expand a potential ~
14849    eval path="$path"
14850    if test ! -f "$path" && test ! -d "$path"; then
14851      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14852    fi
14853
14854    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14855  fi
14856
14857        DEVKIT_ROOT="$with_devkit"
14858        # Check for a meta data info file in the root of the devkit
14859        if test -f "$DEVKIT_ROOT/devkit.info"; then
14860          # This potentially sets the following:
14861          # DEVKIT_NAME: A descriptive name of the devkit
14862          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14863          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14864          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14865          . $DEVKIT_ROOT/devkit.info
14866        fi
14867
14868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14869$as_echo_n "checking for devkit... " >&6; }
14870        if test "x$DEVKIT_NAME" != x; then
14871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14872$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14873        else
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14875$as_echo "$DEVKIT_ROOT" >&6; }
14876        fi
14877
14878        if test "x$DEVKIT_EXTRA_PATH" != x; then
14879
14880  if test "x$DEVKIT_EXTRA_PATH" != x; then
14881    if test "x$EXTRA_PATH" = x; then
14882      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14883    else
14884      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14885    fi
14886  fi
14887
14888        fi
14889
14890        # Fallback default of just /bin if DEVKIT_PATH is not defined
14891        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14892          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14893        fi
14894
14895  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14896    if test "x$TOOLCHAIN_PATH" = x; then
14897      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14898    else
14899      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14900    fi
14901  fi
14902
14903
14904        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14905        # places for backwards compatiblity.
14906        if test "x$DEVKIT_SYSROOT" != x; then
14907          SYSROOT="$DEVKIT_SYSROOT"
14908        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14909          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14910        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14911          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14912        fi
14913
14914
14915fi
14916
14917
14918  # You can force the sysroot if the sysroot encoded into the compiler tools
14919  # is not correct.
14920
14921# Check whether --with-sys-root was given.
14922if test "${with_sys_root+set}" = set; then :
14923  withval=$with_sys_root; SYSROOT=$with_sys_root
14924
14925fi
14926
14927
14928
14929# Check whether --with-sysroot was given.
14930if test "${with_sysroot+set}" = set; then :
14931  withval=$with_sysroot; SYSROOT=$with_sysroot
14932
14933fi
14934
14935
14936
14937# Check whether --with-tools-dir was given.
14938if test "${with_tools_dir+set}" = set; then :
14939  withval=$with_tools_dir;
14940  if test "x$with_tools_dir" != x; then
14941    if test "x$TOOLCHAIN_PATH" = x; then
14942      TOOLCHAIN_PATH="$with_tools_dir"
14943    else
14944      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14945    fi
14946  fi
14947
14948
14949fi
14950
14951
14952
14953# Check whether --with-toolchain-path was given.
14954if test "${with_toolchain_path+set}" = set; then :
14955  withval=$with_toolchain_path;
14956  if test "x$with_toolchain_path" != x; then
14957    if test "x$TOOLCHAIN_PATH" = x; then
14958      TOOLCHAIN_PATH="$with_toolchain_path"
14959    else
14960      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14961    fi
14962  fi
14963
14964
14965fi
14966
14967
14968
14969# Check whether --with-extra-path was given.
14970if test "${with_extra_path+set}" = set; then :
14971  withval=$with_extra_path;
14972  if test "x$with_extra_path" != x; then
14973    if test "x$EXTRA_PATH" = x; then
14974      EXTRA_PATH="$with_extra_path"
14975    else
14976      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14977    fi
14978  fi
14979
14980
14981fi
14982
14983
14984  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14985    # detect if Xcode is installed by running xcodebuild -version
14986    # if no Xcode installed, xcodebuild exits with 1
14987    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14988    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14989      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14990      # fall back on the stub binary in /usr/bin/xcodebuild
14991      # Extract the first word of "xcodebuild", so it can be a program name with args.
14992set dummy xcodebuild; ac_word=$2
14993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14994$as_echo_n "checking for $ac_word... " >&6; }
14995if ${ac_cv_path_XCODEBUILD+:} false; then :
14996  $as_echo_n "(cached) " >&6
14997else
14998  case $XCODEBUILD in
14999  [\\/]* | ?:[\\/]*)
15000  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15001  ;;
15002  *)
15003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15004for as_dir in $TOOLCHAIN_PATH
15005do
15006  IFS=$as_save_IFS
15007  test -z "$as_dir" && as_dir=.
15008    for ac_exec_ext in '' $ac_executable_extensions; do
15009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15010    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15012    break 2
15013  fi
15014done
15015  done
15016IFS=$as_save_IFS
15017
15018  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15019  ;;
15020esac
15021fi
15022XCODEBUILD=$ac_cv_path_XCODEBUILD
15023if test -n "$XCODEBUILD"; then
15024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15025$as_echo "$XCODEBUILD" >&6; }
15026else
15027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15028$as_echo "no" >&6; }
15029fi
15030
15031
15032    else
15033      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15034      # when only the command line tools are installed there are no SDKs, so headers
15035      # are copied into the system frameworks
15036      XCODEBUILD=
15037
15038    fi
15039
15040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15041$as_echo_n "checking for sdk name... " >&6; }
15042
15043# Check whether --with-sdk-name was given.
15044if test "${with_sdk_name+set}" = set; then :
15045  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15046
15047fi
15048
15049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15050$as_echo "$SDKNAME" >&6; }
15051
15052    # if toolchain path is specified then don't rely on system headers, they may not compile
15053    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15054    test -z "$TOOLCHAIN_PATH" && \
15055      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15056
15057    if test -z "$SYSROOT"; then
15058      if test -n "$XCODEBUILD"; then
15059        # if we don't have system headers, use default SDK name (last resort)
15060        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15061          SDKNAME=${SDKNAME:-macosx}
15062        fi
15063
15064        if test -n "$SDKNAME"; then
15065          # Call xcodebuild to determine SYSROOT
15066          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15067        fi
15068      else
15069        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15070          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
15071        fi
15072      fi
15073    else
15074      # warn user if --with-sdk-name was also set
15075      if test -n "$with_sdk_name"; then
15076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15077$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15078      fi
15079    fi
15080
15081    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15082      # If no system framework headers, then SYSROOT must be set, or we won't build
15083      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
15084    fi
15085
15086    # Perform a basic sanity test
15087    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15088      if test -z "$SYSROOT"; then
15089        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
15090      else
15091        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15092      fi
15093    fi
15094
15095    # set SDKROOT too, Xcode tools will pick it up
15096    SDKROOT=$SYSROOT
15097
15098  fi
15099
15100  # Prepend the extra path to the global path
15101
15102  if test "x$EXTRA_PATH" != x; then
15103    if test "x$PATH" = x; then
15104      PATH="$EXTRA_PATH"
15105    else
15106      PATH="$EXTRA_PATH:$PATH"
15107    fi
15108  fi
15109
15110
15111  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15112    # Add extra search paths on solaris for utilities like ar and as etc...
15113    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15114  fi
15115
15116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15117$as_echo_n "checking for sysroot... " >&6; }
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15119$as_echo "$SYSROOT" >&6; }
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15121$as_echo_n "checking for toolchain path... " >&6; }
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15123$as_echo "$TOOLCHAIN_PATH" >&6; }
15124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15125$as_echo_n "checking for extra path... " >&6; }
15126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15127$as_echo "$EXTRA_PATH" >&6; }
15128
15129
15130# To properly create a configuration name, we need to have the OpenJDK target
15131# and options (variants and debug level) parsed.
15132
15133
15134
15135# Check whether --with-conf-name was given.
15136if test "${with_conf_name+set}" = set; then :
15137  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15138fi
15139
15140
15141  # Test from where we are running configure, in or outside of src root.
15142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15143$as_echo_n "checking where to store configuration... " >&6; }
15144  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15145      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15146      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15147    # We are running configure from the src root.
15148    # Create a default ./build/target-variant-debuglevel output root.
15149    if test "x${CONF_NAME}" = x; then
15150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15151$as_echo "in default location" >&6; }
15152      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15153    else
15154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15155$as_echo "in build directory with custom name" >&6; }
15156    fi
15157    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15158    $MKDIR -p "$OUTPUT_ROOT"
15159    if test ! -d "$OUTPUT_ROOT"; then
15160      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15161    fi
15162  else
15163    # We are running configure from outside of the src dir.
15164    # Then use the current directory as output dir!
15165    # If configuration is situated in normal build directory, just use the build
15166    # directory name as configuration name, otherwise use the complete path.
15167    if test "x${CONF_NAME}" = x; then
15168      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15169    fi
15170    OUTPUT_ROOT="$CURDIR"
15171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15172$as_echo "in current directory" >&6; }
15173
15174    # WARNING: This might be a bad thing to do. You need to be sure you want to
15175    # have a configuration in this directory. Do some sanity checks!
15176
15177    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15178      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15179      # other files
15180      files_present=`$LS $OUTPUT_ROOT`
15181      # Configure has already touched config.log and confdefs.h in the current dir when this check
15182      # is performed.
15183      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15184      | $TR -d '\n'`
15185      if test "x$filtered_files" != x; then
15186        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15187$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15189$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15190        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15191$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15192        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15193$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15195$as_echo "$as_me: seriously mess up just about everything." >&6;}
15196        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15197$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15199$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15200        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15201      fi
15202    fi
15203  fi
15204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15205$as_echo_n "checking what configuration name to use... " >&6; }
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15207$as_echo "$CONF_NAME" >&6; }
15208
15209
15210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15211
15212  # Input might be given as Windows format, start by converting to
15213  # unix format.
15214  path="$OUTPUT_ROOT"
15215  new_path=`$CYGPATH -u "$path"`
15216
15217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15220  # "foo.exe" is OK but "foo" is an error.
15221  #
15222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15223  # It is also a way to make sure we got the proper file name for the real test later on.
15224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15225  if test "x$test_shortpath" = x; then
15226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15227$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15228    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15229  fi
15230
15231  # Call helper function which possibly converts this using DOS-style short mode.
15232  # If so, the updated path is stored in $new_path.
15233
15234  input_path="$new_path"
15235  # Check if we need to convert this using DOS-style short mode. If the path
15236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15237  # take no chances and rewrite it.
15238  # Note: m4 eats our [], so we need to use [ and ] instead.
15239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15240  if test "x$has_forbidden_chars" != x; then
15241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15245      # Going to short mode and back again did indeed matter. Since short mode is
15246      # case insensitive, let's make it lowercase to improve readability.
15247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15248      # Now convert it back to Unix-stile (cygpath)
15249      input_path=`$CYGPATH -u "$shortmode_path"`
15250      new_path="$input_path"
15251    fi
15252  fi
15253
15254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15255  if test "x$test_cygdrive_prefix" = x; then
15256    # As a simple fix, exclude /usr/bin since it's not a real path.
15257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15259      # a path prefixed by /cygdrive for fixpath to work.
15260      new_path="$CYGWIN_ROOT_PATH$input_path"
15261    fi
15262  fi
15263
15264
15265  if test "x$path" != "x$new_path"; then
15266    OUTPUT_ROOT="$new_path"
15267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15268$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15269  fi
15270
15271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15272
15273  path="$OUTPUT_ROOT"
15274  has_colon=`$ECHO $path | $GREP ^.:`
15275  new_path="$path"
15276  if test "x$has_colon" = x; then
15277    # Not in mixed or Windows style, start by that.
15278    new_path=`cmd //c echo $path`
15279  fi
15280
15281
15282  input_path="$new_path"
15283  # Check if we need to convert this using DOS-style short mode. If the path
15284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15285  # take no chances and rewrite it.
15286  # Note: m4 eats our [], so we need to use [ and ] instead.
15287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15288  if test "x$has_forbidden_chars" != x; then
15289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15291  fi
15292
15293
15294  windows_path="$new_path"
15295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15296    unix_path=`$CYGPATH -u "$windows_path"`
15297    new_path="$unix_path"
15298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15300    new_path="$unix_path"
15301  fi
15302
15303  if test "x$path" != "x$new_path"; then
15304    OUTPUT_ROOT="$new_path"
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15306$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15307  fi
15308
15309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15311
15312  else
15313    # We're on a posix platform. Hooray! :)
15314    path="$OUTPUT_ROOT"
15315    has_space=`$ECHO "$path" | $GREP " "`
15316    if test "x$has_space" != x; then
15317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15318$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15319      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15320    fi
15321
15322    # Use eval to expand a potential ~
15323    eval path="$path"
15324    if test ! -f "$path" && test ! -d "$path"; then
15325      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15326    fi
15327
15328    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15329  fi
15330
15331
15332  SPEC=$OUTPUT_ROOT/spec.gmk
15333
15334  CONF_NAME=$CONF_NAME
15335
15336  OUTPUT_ROOT=$OUTPUT_ROOT
15337
15338
15339  # The spec.gmk file contains all variables for the make system.
15340  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15341
15342  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15343  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15344
15345  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15346  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15347
15348  # The compare.sh is used to compare the build output to other builds.
15349  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15350
15351  # The generated Makefile knows where the spec.gmk is and where the source is.
15352  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15353  # which will look for generated configurations
15354  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15355
15356
15357
15358# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15359
15360  for ac_prog in apt-get yum port pkgutil pkgadd
15361do
15362  # Extract the first word of "$ac_prog", so it can be a program name with args.
15363set dummy $ac_prog; ac_word=$2
15364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15365$as_echo_n "checking for $ac_word... " >&6; }
15366if ${ac_cv_prog_PKGHANDLER+:} false; then :
15367  $as_echo_n "(cached) " >&6
15368else
15369  if test -n "$PKGHANDLER"; then
15370  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15371else
15372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15373for as_dir in $PATH
15374do
15375  IFS=$as_save_IFS
15376  test -z "$as_dir" && as_dir=.
15377    for ac_exec_ext in '' $ac_executable_extensions; do
15378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15379    ac_cv_prog_PKGHANDLER="$ac_prog"
15380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15381    break 2
15382  fi
15383done
15384  done
15385IFS=$as_save_IFS
15386
15387fi
15388fi
15389PKGHANDLER=$ac_cv_prog_PKGHANDLER
15390if test -n "$PKGHANDLER"; then
15391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15392$as_echo "$PKGHANDLER" >&6; }
15393else
15394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15395$as_echo "no" >&6; }
15396fi
15397
15398
15399  test -n "$PKGHANDLER" && break
15400done
15401
15402
15403
15404# Setup tools that requires more complex handling, or that is not needed by the configure script.
15405
15406
15407  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15408  if test "x$MAKE" != x; then
15409    # User has supplied a make, test it.
15410    if test ! -f "$MAKE"; then
15411      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15412    fi
15413
15414  MAKE_CANDIDATE=""$MAKE""
15415  DESCRIPTION="user supplied MAKE=$MAKE"
15416  if test "x$MAKE_CANDIDATE" != x; then
15417    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15418$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15419    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15420    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15421    if test "x$IS_GNU_MAKE" = x; then
15422      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15423$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15424    else
15425      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15426      if test "x$IS_MODERN_MAKE" = x; then
15427        { $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
15428$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;}
15429      else
15430        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15431          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15432            MAKE_EXPECTED_ENV='cygwin'
15433          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15434            MAKE_EXPECTED_ENV='msys'
15435          else
15436            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15437          fi
15438          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15439          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15440        else
15441          # Not relevant for non-Windows
15442          IS_MAKE_CORRECT_ENV=true
15443        fi
15444        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15445          { $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
15446$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;}
15447        else
15448          FOUND_MAKE=$MAKE_CANDIDATE
15449
15450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15451
15452  # First separate the path from the arguments. This will split at the first
15453  # space.
15454  complete="$FOUND_MAKE"
15455  path="${complete%% *}"
15456  tmp="$complete EOL"
15457  arguments="${tmp#* }"
15458
15459  # Input might be given as Windows format, start by converting to
15460  # unix format.
15461  new_path=`$CYGPATH -u "$path"`
15462
15463  # Now try to locate executable using which
15464  new_path=`$WHICH "$new_path" 2> /dev/null`
15465  # bat and cmd files are not always considered executable in cygwin causing which
15466  # to not find them
15467  if test "x$new_path" = x \
15468      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15469      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15470    new_path=`$CYGPATH -u "$path"`
15471  fi
15472  if test "x$new_path" = x; then
15473    # Oops. Which didn't find the executable.
15474    # The splitting of arguments from the executable at a space might have been incorrect,
15475    # since paths with space are more likely in Windows. Give it another try with the whole
15476    # argument.
15477    path="$complete"
15478    arguments="EOL"
15479    new_path=`$CYGPATH -u "$path"`
15480    new_path=`$WHICH "$new_path" 2> /dev/null`
15481    # bat and cmd files are not always considered executable in cygwin causing which
15482    # to not find them
15483    if test "x$new_path" = x \
15484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15486      new_path=`$CYGPATH -u "$path"`
15487    fi
15488    if test "x$new_path" = x; then
15489      # It's still not found. Now this is an unrecoverable error.
15490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15492      has_space=`$ECHO "$complete" | $GREP " "`
15493      if test "x$has_space" != x; then
15494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15496      fi
15497      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15498    fi
15499  fi
15500
15501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15504  # "foo.exe" is OK but "foo" is an error.
15505  #
15506  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15507  # It is also a way to make sure we got the proper file name for the real test later on.
15508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15509  if test "x$test_shortpath" = x; then
15510    # Short path failed, file does not exist as specified.
15511    # Try adding .exe or .cmd
15512    if test -f "${new_path}.exe"; then
15513      input_to_shortpath="${new_path}.exe"
15514    elif test -f "${new_path}.cmd"; then
15515      input_to_shortpath="${new_path}.cmd"
15516    else
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15518$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15519      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15520$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15521      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15522    fi
15523  else
15524    input_to_shortpath="$new_path"
15525  fi
15526
15527  # Call helper function which possibly converts this using DOS-style short mode.
15528  # If so, the updated path is stored in $new_path.
15529  new_path="$input_to_shortpath"
15530
15531  input_path="$input_to_shortpath"
15532  # Check if we need to convert this using DOS-style short mode. If the path
15533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15534  # take no chances and rewrite it.
15535  # Note: m4 eats our [], so we need to use [ and ] instead.
15536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15537  if test "x$has_forbidden_chars" != x; then
15538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15542      # Going to short mode and back again did indeed matter. Since short mode is
15543      # case insensitive, let's make it lowercase to improve readability.
15544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15545      # Now convert it back to Unix-stile (cygpath)
15546      input_path=`$CYGPATH -u "$shortmode_path"`
15547      new_path="$input_path"
15548    fi
15549  fi
15550
15551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15552  if test "x$test_cygdrive_prefix" = x; then
15553    # As a simple fix, exclude /usr/bin since it's not a real path.
15554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15556      # a path prefixed by /cygdrive for fixpath to work.
15557      new_path="$CYGWIN_ROOT_PATH$input_path"
15558    fi
15559  fi
15560
15561  # remove trailing .exe if any
15562  new_path="${new_path/%.exe/}"
15563
15564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15565
15566  # First separate the path from the arguments. This will split at the first
15567  # space.
15568  complete="$FOUND_MAKE"
15569  path="${complete%% *}"
15570  tmp="$complete EOL"
15571  arguments="${tmp#* }"
15572
15573  # Input might be given as Windows format, start by converting to
15574  # unix format.
15575  new_path="$path"
15576
15577  windows_path="$new_path"
15578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15579    unix_path=`$CYGPATH -u "$windows_path"`
15580    new_path="$unix_path"
15581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15583    new_path="$unix_path"
15584  fi
15585
15586
15587  # Now try to locate executable using which
15588  new_path=`$WHICH "$new_path" 2> /dev/null`
15589
15590  if test "x$new_path" = x; then
15591    # Oops. Which didn't find the executable.
15592    # The splitting of arguments from the executable at a space might have been incorrect,
15593    # since paths with space are more likely in Windows. Give it another try with the whole
15594    # argument.
15595    path="$complete"
15596    arguments="EOL"
15597    new_path="$path"
15598
15599  windows_path="$new_path"
15600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15601    unix_path=`$CYGPATH -u "$windows_path"`
15602    new_path="$unix_path"
15603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15605    new_path="$unix_path"
15606  fi
15607
15608
15609    new_path=`$WHICH "$new_path" 2> /dev/null`
15610    # bat and cmd files are not always considered executable in MSYS causing which
15611    # to not find them
15612    if test "x$new_path" = x \
15613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15615      new_path="$path"
15616
15617  windows_path="$new_path"
15618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15619    unix_path=`$CYGPATH -u "$windows_path"`
15620    new_path="$unix_path"
15621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15623    new_path="$unix_path"
15624  fi
15625
15626    fi
15627
15628    if test "x$new_path" = x; then
15629      # It's still not found. Now this is an unrecoverable error.
15630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15631$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15632      has_space=`$ECHO "$complete" | $GREP " "`
15633      if test "x$has_space" != x; then
15634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15636      fi
15637      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15638    fi
15639  fi
15640
15641  # Now new_path has a complete unix path to the binary
15642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15643    # Keep paths in /bin as-is, but remove trailing .exe if any
15644    new_path="${new_path/%.exe/}"
15645    # Do not save /bin paths to all_fixpath_prefixes!
15646  else
15647    # Not in mixed or Windows style, start by that.
15648    new_path=`cmd //c echo $new_path`
15649
15650  input_path="$new_path"
15651  # Check if we need to convert this using DOS-style short mode. If the path
15652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15653  # take no chances and rewrite it.
15654  # Note: m4 eats our [], so we need to use [ and ] instead.
15655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15656  if test "x$has_forbidden_chars" != x; then
15657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15659  fi
15660
15661    # Output is in $new_path
15662
15663  windows_path="$new_path"
15664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15665    unix_path=`$CYGPATH -u "$windows_path"`
15666    new_path="$unix_path"
15667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15669    new_path="$unix_path"
15670  fi
15671
15672    # remove trailing .exe if any
15673    new_path="${new_path/%.exe/}"
15674
15675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15677  fi
15678
15679  else
15680    # We're on a posix platform. Hooray! :)
15681    # First separate the path from the arguments. This will split at the first
15682    # space.
15683    complete="$FOUND_MAKE"
15684    path="${complete%% *}"
15685    tmp="$complete EOL"
15686    arguments="${tmp#* }"
15687
15688    # Cannot rely on the command "which" here since it doesn't always work.
15689    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15690    if test -z "$is_absolute_path"; then
15691      # Path to executable is not absolute. Find it.
15692      IFS_save="$IFS"
15693      IFS=:
15694      for p in $PATH; do
15695        if test -f "$p/$path" && test -x "$p/$path"; then
15696          new_path="$p/$path"
15697          break
15698        fi
15699      done
15700      IFS="$IFS_save"
15701    else
15702      # This is an absolute path, we can use it without further modifications.
15703      new_path="$path"
15704    fi
15705
15706    if test "x$new_path" = x; then
15707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15708$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15709      has_space=`$ECHO "$complete" | $GREP " "`
15710      if test "x$has_space" != x; then
15711        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15712$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15713      fi
15714      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15715    fi
15716  fi
15717
15718  # Now join together the path and the arguments once again
15719  if test "x$arguments" != xEOL; then
15720    new_complete="$new_path ${arguments% *}"
15721  else
15722    new_complete="$new_path"
15723  fi
15724
15725  if test "x$complete" != "x$new_complete"; then
15726    FOUND_MAKE="$new_complete"
15727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15728$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15729  fi
15730
15731        fi
15732      fi
15733    fi
15734  fi
15735
15736    if test "x$FOUND_MAKE" = x; then
15737      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15738    fi
15739  else
15740    # Try our hardest to locate a correct version of GNU make
15741    for ac_prog in gmake
15742do
15743  # Extract the first word of "$ac_prog", so it can be a program name with args.
15744set dummy $ac_prog; ac_word=$2
15745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15746$as_echo_n "checking for $ac_word... " >&6; }
15747if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15748  $as_echo_n "(cached) " >&6
15749else
15750  case $CHECK_GMAKE in
15751  [\\/]* | ?:[\\/]*)
15752  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15753  ;;
15754  *)
15755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15756for as_dir in $PATH
15757do
15758  IFS=$as_save_IFS
15759  test -z "$as_dir" && as_dir=.
15760    for ac_exec_ext in '' $ac_executable_extensions; do
15761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15762    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15764    break 2
15765  fi
15766done
15767  done
15768IFS=$as_save_IFS
15769
15770  ;;
15771esac
15772fi
15773CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15774if test -n "$CHECK_GMAKE"; then
15775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15776$as_echo "$CHECK_GMAKE" >&6; }
15777else
15778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15779$as_echo "no" >&6; }
15780fi
15781
15782
15783  test -n "$CHECK_GMAKE" && break
15784done
15785
15786
15787  MAKE_CANDIDATE=""$CHECK_GMAKE""
15788  DESCRIPTION="gmake in PATH"
15789  if test "x$MAKE_CANDIDATE" != x; then
15790    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15791$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15792    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15793    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15794    if test "x$IS_GNU_MAKE" = x; then
15795      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15796$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15797    else
15798      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15799      if test "x$IS_MODERN_MAKE" = x; then
15800        { $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
15801$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;}
15802      else
15803        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15804          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15805            MAKE_EXPECTED_ENV='cygwin'
15806          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15807            MAKE_EXPECTED_ENV='msys'
15808          else
15809            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15810          fi
15811          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15812          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15813        else
15814          # Not relevant for non-Windows
15815          IS_MAKE_CORRECT_ENV=true
15816        fi
15817        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15818          { $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
15819$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;}
15820        else
15821          FOUND_MAKE=$MAKE_CANDIDATE
15822
15823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15824
15825  # First separate the path from the arguments. This will split at the first
15826  # space.
15827  complete="$FOUND_MAKE"
15828  path="${complete%% *}"
15829  tmp="$complete EOL"
15830  arguments="${tmp#* }"
15831
15832  # Input might be given as Windows format, start by converting to
15833  # unix format.
15834  new_path=`$CYGPATH -u "$path"`
15835
15836  # Now try to locate executable using which
15837  new_path=`$WHICH "$new_path" 2> /dev/null`
15838  # bat and cmd files are not always considered executable in cygwin causing which
15839  # to not find them
15840  if test "x$new_path" = x \
15841      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15842      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15843    new_path=`$CYGPATH -u "$path"`
15844  fi
15845  if test "x$new_path" = x; then
15846    # Oops. Which didn't find the executable.
15847    # The splitting of arguments from the executable at a space might have been incorrect,
15848    # since paths with space are more likely in Windows. Give it another try with the whole
15849    # argument.
15850    path="$complete"
15851    arguments="EOL"
15852    new_path=`$CYGPATH -u "$path"`
15853    new_path=`$WHICH "$new_path" 2> /dev/null`
15854    # bat and cmd files are not always considered executable in cygwin causing which
15855    # to not find them
15856    if test "x$new_path" = x \
15857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15859      new_path=`$CYGPATH -u "$path"`
15860    fi
15861    if test "x$new_path" = x; then
15862      # It's still not found. Now this is an unrecoverable error.
15863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15864$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15865      has_space=`$ECHO "$complete" | $GREP " "`
15866      if test "x$has_space" != x; then
15867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15869      fi
15870      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15871    fi
15872  fi
15873
15874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15877  # "foo.exe" is OK but "foo" is an error.
15878  #
15879  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15880  # It is also a way to make sure we got the proper file name for the real test later on.
15881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15882  if test "x$test_shortpath" = x; then
15883    # Short path failed, file does not exist as specified.
15884    # Try adding .exe or .cmd
15885    if test -f "${new_path}.exe"; then
15886      input_to_shortpath="${new_path}.exe"
15887    elif test -f "${new_path}.cmd"; then
15888      input_to_shortpath="${new_path}.cmd"
15889    else
15890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15892      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15893$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15894      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15895    fi
15896  else
15897    input_to_shortpath="$new_path"
15898  fi
15899
15900  # Call helper function which possibly converts this using DOS-style short mode.
15901  # If so, the updated path is stored in $new_path.
15902  new_path="$input_to_shortpath"
15903
15904  input_path="$input_to_shortpath"
15905  # Check if we need to convert this using DOS-style short mode. If the path
15906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15907  # take no chances and rewrite it.
15908  # Note: m4 eats our [], so we need to use [ and ] instead.
15909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15910  if test "x$has_forbidden_chars" != x; then
15911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15915      # Going to short mode and back again did indeed matter. Since short mode is
15916      # case insensitive, let's make it lowercase to improve readability.
15917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15918      # Now convert it back to Unix-stile (cygpath)
15919      input_path=`$CYGPATH -u "$shortmode_path"`
15920      new_path="$input_path"
15921    fi
15922  fi
15923
15924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15925  if test "x$test_cygdrive_prefix" = x; then
15926    # As a simple fix, exclude /usr/bin since it's not a real path.
15927    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15929      # a path prefixed by /cygdrive for fixpath to work.
15930      new_path="$CYGWIN_ROOT_PATH$input_path"
15931    fi
15932  fi
15933
15934  # remove trailing .exe if any
15935  new_path="${new_path/%.exe/}"
15936
15937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15938
15939  # First separate the path from the arguments. This will split at the first
15940  # space.
15941  complete="$FOUND_MAKE"
15942  path="${complete%% *}"
15943  tmp="$complete EOL"
15944  arguments="${tmp#* }"
15945
15946  # Input might be given as Windows format, start by converting to
15947  # unix format.
15948  new_path="$path"
15949
15950  windows_path="$new_path"
15951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15952    unix_path=`$CYGPATH -u "$windows_path"`
15953    new_path="$unix_path"
15954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15956    new_path="$unix_path"
15957  fi
15958
15959
15960  # Now try to locate executable using which
15961  new_path=`$WHICH "$new_path" 2> /dev/null`
15962
15963  if test "x$new_path" = x; then
15964    # Oops. Which didn't find the executable.
15965    # The splitting of arguments from the executable at a space might have been incorrect,
15966    # since paths with space are more likely in Windows. Give it another try with the whole
15967    # argument.
15968    path="$complete"
15969    arguments="EOL"
15970    new_path="$path"
15971
15972  windows_path="$new_path"
15973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15974    unix_path=`$CYGPATH -u "$windows_path"`
15975    new_path="$unix_path"
15976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15978    new_path="$unix_path"
15979  fi
15980
15981
15982    new_path=`$WHICH "$new_path" 2> /dev/null`
15983    # bat and cmd files are not always considered executable in MSYS causing which
15984    # to not find them
15985    if test "x$new_path" = x \
15986        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15987        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15988      new_path="$path"
15989
15990  windows_path="$new_path"
15991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15992    unix_path=`$CYGPATH -u "$windows_path"`
15993    new_path="$unix_path"
15994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15996    new_path="$unix_path"
15997  fi
15998
15999    fi
16000
16001    if test "x$new_path" = x; then
16002      # It's still not found. Now this is an unrecoverable error.
16003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16005      has_space=`$ECHO "$complete" | $GREP " "`
16006      if test "x$has_space" != x; then
16007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16009      fi
16010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16011    fi
16012  fi
16013
16014  # Now new_path has a complete unix path to the binary
16015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16016    # Keep paths in /bin as-is, but remove trailing .exe if any
16017    new_path="${new_path/%.exe/}"
16018    # Do not save /bin paths to all_fixpath_prefixes!
16019  else
16020    # Not in mixed or Windows style, start by that.
16021    new_path=`cmd //c echo $new_path`
16022
16023  input_path="$new_path"
16024  # Check if we need to convert this using DOS-style short mode. If the path
16025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16026  # take no chances and rewrite it.
16027  # Note: m4 eats our [], so we need to use [ and ] instead.
16028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16029  if test "x$has_forbidden_chars" != x; then
16030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16032  fi
16033
16034    # Output is in $new_path
16035
16036  windows_path="$new_path"
16037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16038    unix_path=`$CYGPATH -u "$windows_path"`
16039    new_path="$unix_path"
16040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16042    new_path="$unix_path"
16043  fi
16044
16045    # remove trailing .exe if any
16046    new_path="${new_path/%.exe/}"
16047
16048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16050  fi
16051
16052  else
16053    # We're on a posix platform. Hooray! :)
16054    # First separate the path from the arguments. This will split at the first
16055    # space.
16056    complete="$FOUND_MAKE"
16057    path="${complete%% *}"
16058    tmp="$complete EOL"
16059    arguments="${tmp#* }"
16060
16061    # Cannot rely on the command "which" here since it doesn't always work.
16062    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16063    if test -z "$is_absolute_path"; then
16064      # Path to executable is not absolute. Find it.
16065      IFS_save="$IFS"
16066      IFS=:
16067      for p in $PATH; do
16068        if test -f "$p/$path" && test -x "$p/$path"; then
16069          new_path="$p/$path"
16070          break
16071        fi
16072      done
16073      IFS="$IFS_save"
16074    else
16075      # This is an absolute path, we can use it without further modifications.
16076      new_path="$path"
16077    fi
16078
16079    if test "x$new_path" = x; then
16080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16081$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16082      has_space=`$ECHO "$complete" | $GREP " "`
16083      if test "x$has_space" != x; then
16084        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16086      fi
16087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16088    fi
16089  fi
16090
16091  # Now join together the path and the arguments once again
16092  if test "x$arguments" != xEOL; then
16093    new_complete="$new_path ${arguments% *}"
16094  else
16095    new_complete="$new_path"
16096  fi
16097
16098  if test "x$complete" != "x$new_complete"; then
16099    FOUND_MAKE="$new_complete"
16100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16101$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16102  fi
16103
16104        fi
16105      fi
16106    fi
16107  fi
16108
16109
16110    if test "x$FOUND_MAKE" = x; then
16111      for ac_prog in make
16112do
16113  # Extract the first word of "$ac_prog", so it can be a program name with args.
16114set dummy $ac_prog; ac_word=$2
16115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16116$as_echo_n "checking for $ac_word... " >&6; }
16117if ${ac_cv_path_CHECK_MAKE+:} false; then :
16118  $as_echo_n "(cached) " >&6
16119else
16120  case $CHECK_MAKE in
16121  [\\/]* | ?:[\\/]*)
16122  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16123  ;;
16124  *)
16125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16126for as_dir in $PATH
16127do
16128  IFS=$as_save_IFS
16129  test -z "$as_dir" && as_dir=.
16130    for ac_exec_ext in '' $ac_executable_extensions; do
16131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16132    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16134    break 2
16135  fi
16136done
16137  done
16138IFS=$as_save_IFS
16139
16140  ;;
16141esac
16142fi
16143CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16144if test -n "$CHECK_MAKE"; then
16145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16146$as_echo "$CHECK_MAKE" >&6; }
16147else
16148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16149$as_echo "no" >&6; }
16150fi
16151
16152
16153  test -n "$CHECK_MAKE" && break
16154done
16155
16156
16157  MAKE_CANDIDATE=""$CHECK_MAKE""
16158  DESCRIPTION="make in PATH"
16159  if test "x$MAKE_CANDIDATE" != x; then
16160    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16161$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16162    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16163    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16164    if test "x$IS_GNU_MAKE" = x; then
16165      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16166$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16167    else
16168      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16169      if test "x$IS_MODERN_MAKE" = x; then
16170        { $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
16171$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;}
16172      else
16173        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16174          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16175            MAKE_EXPECTED_ENV='cygwin'
16176          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16177            MAKE_EXPECTED_ENV='msys'
16178          else
16179            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16180          fi
16181          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16182          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16183        else
16184          # Not relevant for non-Windows
16185          IS_MAKE_CORRECT_ENV=true
16186        fi
16187        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16188          { $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
16189$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;}
16190        else
16191          FOUND_MAKE=$MAKE_CANDIDATE
16192
16193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16194
16195  # First separate the path from the arguments. This will split at the first
16196  # space.
16197  complete="$FOUND_MAKE"
16198  path="${complete%% *}"
16199  tmp="$complete EOL"
16200  arguments="${tmp#* }"
16201
16202  # Input might be given as Windows format, start by converting to
16203  # unix format.
16204  new_path=`$CYGPATH -u "$path"`
16205
16206  # Now try to locate executable using which
16207  new_path=`$WHICH "$new_path" 2> /dev/null`
16208  # bat and cmd files are not always considered executable in cygwin causing which
16209  # to not find them
16210  if test "x$new_path" = x \
16211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16213    new_path=`$CYGPATH -u "$path"`
16214  fi
16215  if test "x$new_path" = x; then
16216    # Oops. Which didn't find the executable.
16217    # The splitting of arguments from the executable at a space might have been incorrect,
16218    # since paths with space are more likely in Windows. Give it another try with the whole
16219    # argument.
16220    path="$complete"
16221    arguments="EOL"
16222    new_path=`$CYGPATH -u "$path"`
16223    new_path=`$WHICH "$new_path" 2> /dev/null`
16224    # bat and cmd files are not always considered executable in cygwin causing which
16225    # to not find them
16226    if test "x$new_path" = x \
16227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16229      new_path=`$CYGPATH -u "$path"`
16230    fi
16231    if test "x$new_path" = x; then
16232      # It's still not found. Now this is an unrecoverable error.
16233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16234$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16235      has_space=`$ECHO "$complete" | $GREP " "`
16236      if test "x$has_space" != x; then
16237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16239      fi
16240      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16241    fi
16242  fi
16243
16244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16247  # "foo.exe" is OK but "foo" is an error.
16248  #
16249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16250  # It is also a way to make sure we got the proper file name for the real test later on.
16251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16252  if test "x$test_shortpath" = x; then
16253    # Short path failed, file does not exist as specified.
16254    # Try adding .exe or .cmd
16255    if test -f "${new_path}.exe"; then
16256      input_to_shortpath="${new_path}.exe"
16257    elif test -f "${new_path}.cmd"; then
16258      input_to_shortpath="${new_path}.cmd"
16259    else
16260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16261$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16264      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16265    fi
16266  else
16267    input_to_shortpath="$new_path"
16268  fi
16269
16270  # Call helper function which possibly converts this using DOS-style short mode.
16271  # If so, the updated path is stored in $new_path.
16272  new_path="$input_to_shortpath"
16273
16274  input_path="$input_to_shortpath"
16275  # Check if we need to convert this using DOS-style short mode. If the path
16276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16277  # take no chances and rewrite it.
16278  # Note: m4 eats our [], so we need to use [ and ] instead.
16279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16280  if test "x$has_forbidden_chars" != x; then
16281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16285      # Going to short mode and back again did indeed matter. Since short mode is
16286      # case insensitive, let's make it lowercase to improve readability.
16287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16288      # Now convert it back to Unix-stile (cygpath)
16289      input_path=`$CYGPATH -u "$shortmode_path"`
16290      new_path="$input_path"
16291    fi
16292  fi
16293
16294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16295  if test "x$test_cygdrive_prefix" = x; then
16296    # As a simple fix, exclude /usr/bin since it's not a real path.
16297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16299      # a path prefixed by /cygdrive for fixpath to work.
16300      new_path="$CYGWIN_ROOT_PATH$input_path"
16301    fi
16302  fi
16303
16304  # remove trailing .exe if any
16305  new_path="${new_path/%.exe/}"
16306
16307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16308
16309  # First separate the path from the arguments. This will split at the first
16310  # space.
16311  complete="$FOUND_MAKE"
16312  path="${complete%% *}"
16313  tmp="$complete EOL"
16314  arguments="${tmp#* }"
16315
16316  # Input might be given as Windows format, start by converting to
16317  # unix format.
16318  new_path="$path"
16319
16320  windows_path="$new_path"
16321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16322    unix_path=`$CYGPATH -u "$windows_path"`
16323    new_path="$unix_path"
16324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16326    new_path="$unix_path"
16327  fi
16328
16329
16330  # Now try to locate executable using which
16331  new_path=`$WHICH "$new_path" 2> /dev/null`
16332
16333  if test "x$new_path" = x; then
16334    # Oops. Which didn't find the executable.
16335    # The splitting of arguments from the executable at a space might have been incorrect,
16336    # since paths with space are more likely in Windows. Give it another try with the whole
16337    # argument.
16338    path="$complete"
16339    arguments="EOL"
16340    new_path="$path"
16341
16342  windows_path="$new_path"
16343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16344    unix_path=`$CYGPATH -u "$windows_path"`
16345    new_path="$unix_path"
16346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16348    new_path="$unix_path"
16349  fi
16350
16351
16352    new_path=`$WHICH "$new_path" 2> /dev/null`
16353    # bat and cmd files are not always considered executable in MSYS causing which
16354    # to not find them
16355    if test "x$new_path" = x \
16356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16358      new_path="$path"
16359
16360  windows_path="$new_path"
16361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16362    unix_path=`$CYGPATH -u "$windows_path"`
16363    new_path="$unix_path"
16364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16366    new_path="$unix_path"
16367  fi
16368
16369    fi
16370
16371    if test "x$new_path" = x; then
16372      # It's still not found. Now this is an unrecoverable error.
16373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16375      has_space=`$ECHO "$complete" | $GREP " "`
16376      if test "x$has_space" != x; then
16377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16379      fi
16380      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16381    fi
16382  fi
16383
16384  # Now new_path has a complete unix path to the binary
16385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16386    # Keep paths in /bin as-is, but remove trailing .exe if any
16387    new_path="${new_path/%.exe/}"
16388    # Do not save /bin paths to all_fixpath_prefixes!
16389  else
16390    # Not in mixed or Windows style, start by that.
16391    new_path=`cmd //c echo $new_path`
16392
16393  input_path="$new_path"
16394  # Check if we need to convert this using DOS-style short mode. If the path
16395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16396  # take no chances and rewrite it.
16397  # Note: m4 eats our [], so we need to use [ and ] instead.
16398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16399  if test "x$has_forbidden_chars" != x; then
16400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16402  fi
16403
16404    # Output is in $new_path
16405
16406  windows_path="$new_path"
16407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16408    unix_path=`$CYGPATH -u "$windows_path"`
16409    new_path="$unix_path"
16410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16412    new_path="$unix_path"
16413  fi
16414
16415    # remove trailing .exe if any
16416    new_path="${new_path/%.exe/}"
16417
16418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16420  fi
16421
16422  else
16423    # We're on a posix platform. Hooray! :)
16424    # First separate the path from the arguments. This will split at the first
16425    # space.
16426    complete="$FOUND_MAKE"
16427    path="${complete%% *}"
16428    tmp="$complete EOL"
16429    arguments="${tmp#* }"
16430
16431    # Cannot rely on the command "which" here since it doesn't always work.
16432    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16433    if test -z "$is_absolute_path"; then
16434      # Path to executable is not absolute. Find it.
16435      IFS_save="$IFS"
16436      IFS=:
16437      for p in $PATH; do
16438        if test -f "$p/$path" && test -x "$p/$path"; then
16439          new_path="$p/$path"
16440          break
16441        fi
16442      done
16443      IFS="$IFS_save"
16444    else
16445      # This is an absolute path, we can use it without further modifications.
16446      new_path="$path"
16447    fi
16448
16449    if test "x$new_path" = x; then
16450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16451$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16452      has_space=`$ECHO "$complete" | $GREP " "`
16453      if test "x$has_space" != x; then
16454        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16456      fi
16457      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16458    fi
16459  fi
16460
16461  # Now join together the path and the arguments once again
16462  if test "x$arguments" != xEOL; then
16463    new_complete="$new_path ${arguments% *}"
16464  else
16465    new_complete="$new_path"
16466  fi
16467
16468  if test "x$complete" != "x$new_complete"; then
16469    FOUND_MAKE="$new_complete"
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16471$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16472  fi
16473
16474        fi
16475      fi
16476    fi
16477  fi
16478
16479    fi
16480
16481    if test "x$FOUND_MAKE" = x; then
16482      if test "x$TOOLCHAIN_PATH" != x; then
16483        # We have a toolchain path, check that as well before giving up.
16484        OLD_PATH=$PATH
16485        PATH=$TOOLCHAIN_PATH:$PATH
16486        for ac_prog in gmake
16487do
16488  # Extract the first word of "$ac_prog", so it can be a program name with args.
16489set dummy $ac_prog; ac_word=$2
16490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16491$as_echo_n "checking for $ac_word... " >&6; }
16492if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16493  $as_echo_n "(cached) " >&6
16494else
16495  case $CHECK_TOOLSDIR_GMAKE in
16496  [\\/]* | ?:[\\/]*)
16497  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16498  ;;
16499  *)
16500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16501for as_dir in $PATH
16502do
16503  IFS=$as_save_IFS
16504  test -z "$as_dir" && as_dir=.
16505    for ac_exec_ext in '' $ac_executable_extensions; do
16506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16507    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16509    break 2
16510  fi
16511done
16512  done
16513IFS=$as_save_IFS
16514
16515  ;;
16516esac
16517fi
16518CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16519if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16521$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16522else
16523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16524$as_echo "no" >&6; }
16525fi
16526
16527
16528  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16529done
16530
16531
16532  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16533  DESCRIPTION="gmake in tools-dir"
16534  if test "x$MAKE_CANDIDATE" != x; then
16535    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16536$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16537    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16538    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16539    if test "x$IS_GNU_MAKE" = x; then
16540      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16541$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16542    else
16543      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16544      if test "x$IS_MODERN_MAKE" = x; then
16545        { $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
16546$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;}
16547      else
16548        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16549          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16550            MAKE_EXPECTED_ENV='cygwin'
16551          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16552            MAKE_EXPECTED_ENV='msys'
16553          else
16554            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16555          fi
16556          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16557          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16558        else
16559          # Not relevant for non-Windows
16560          IS_MAKE_CORRECT_ENV=true
16561        fi
16562        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16563          { $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
16564$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;}
16565        else
16566          FOUND_MAKE=$MAKE_CANDIDATE
16567
16568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16569
16570  # First separate the path from the arguments. This will split at the first
16571  # space.
16572  complete="$FOUND_MAKE"
16573  path="${complete%% *}"
16574  tmp="$complete EOL"
16575  arguments="${tmp#* }"
16576
16577  # Input might be given as Windows format, start by converting to
16578  # unix format.
16579  new_path=`$CYGPATH -u "$path"`
16580
16581  # Now try to locate executable using which
16582  new_path=`$WHICH "$new_path" 2> /dev/null`
16583  # bat and cmd files are not always considered executable in cygwin causing which
16584  # to not find them
16585  if test "x$new_path" = x \
16586      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16587      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16588    new_path=`$CYGPATH -u "$path"`
16589  fi
16590  if test "x$new_path" = x; then
16591    # Oops. Which didn't find the executable.
16592    # The splitting of arguments from the executable at a space might have been incorrect,
16593    # since paths with space are more likely in Windows. Give it another try with the whole
16594    # argument.
16595    path="$complete"
16596    arguments="EOL"
16597    new_path=`$CYGPATH -u "$path"`
16598    new_path=`$WHICH "$new_path" 2> /dev/null`
16599    # bat and cmd files are not always considered executable in cygwin causing which
16600    # to not find them
16601    if test "x$new_path" = x \
16602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16604      new_path=`$CYGPATH -u "$path"`
16605    fi
16606    if test "x$new_path" = x; then
16607      # It's still not found. Now this is an unrecoverable error.
16608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16610      has_space=`$ECHO "$complete" | $GREP " "`
16611      if test "x$has_space" != x; then
16612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16614      fi
16615      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16616    fi
16617  fi
16618
16619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16622  # "foo.exe" is OK but "foo" is an error.
16623  #
16624  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16625  # It is also a way to make sure we got the proper file name for the real test later on.
16626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16627  if test "x$test_shortpath" = x; then
16628    # Short path failed, file does not exist as specified.
16629    # Try adding .exe or .cmd
16630    if test -f "${new_path}.exe"; then
16631      input_to_shortpath="${new_path}.exe"
16632    elif test -f "${new_path}.cmd"; then
16633      input_to_shortpath="${new_path}.cmd"
16634    else
16635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16636$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16637      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16638$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16639      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16640    fi
16641  else
16642    input_to_shortpath="$new_path"
16643  fi
16644
16645  # Call helper function which possibly converts this using DOS-style short mode.
16646  # If so, the updated path is stored in $new_path.
16647  new_path="$input_to_shortpath"
16648
16649  input_path="$input_to_shortpath"
16650  # Check if we need to convert this using DOS-style short mode. If the path
16651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16652  # take no chances and rewrite it.
16653  # Note: m4 eats our [], so we need to use [ and ] instead.
16654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16655  if test "x$has_forbidden_chars" != x; then
16656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16660      # Going to short mode and back again did indeed matter. Since short mode is
16661      # case insensitive, let's make it lowercase to improve readability.
16662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16663      # Now convert it back to Unix-stile (cygpath)
16664      input_path=`$CYGPATH -u "$shortmode_path"`
16665      new_path="$input_path"
16666    fi
16667  fi
16668
16669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16670  if test "x$test_cygdrive_prefix" = x; then
16671    # As a simple fix, exclude /usr/bin since it's not a real path.
16672    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16674      # a path prefixed by /cygdrive for fixpath to work.
16675      new_path="$CYGWIN_ROOT_PATH$input_path"
16676    fi
16677  fi
16678
16679  # remove trailing .exe if any
16680  new_path="${new_path/%.exe/}"
16681
16682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16683
16684  # First separate the path from the arguments. This will split at the first
16685  # space.
16686  complete="$FOUND_MAKE"
16687  path="${complete%% *}"
16688  tmp="$complete EOL"
16689  arguments="${tmp#* }"
16690
16691  # Input might be given as Windows format, start by converting to
16692  # unix format.
16693  new_path="$path"
16694
16695  windows_path="$new_path"
16696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16697    unix_path=`$CYGPATH -u "$windows_path"`
16698    new_path="$unix_path"
16699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16701    new_path="$unix_path"
16702  fi
16703
16704
16705  # Now try to locate executable using which
16706  new_path=`$WHICH "$new_path" 2> /dev/null`
16707
16708  if test "x$new_path" = x; then
16709    # Oops. Which didn't find the executable.
16710    # The splitting of arguments from the executable at a space might have been incorrect,
16711    # since paths with space are more likely in Windows. Give it another try with the whole
16712    # argument.
16713    path="$complete"
16714    arguments="EOL"
16715    new_path="$path"
16716
16717  windows_path="$new_path"
16718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16719    unix_path=`$CYGPATH -u "$windows_path"`
16720    new_path="$unix_path"
16721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16723    new_path="$unix_path"
16724  fi
16725
16726
16727    new_path=`$WHICH "$new_path" 2> /dev/null`
16728    # bat and cmd files are not always considered executable in MSYS causing which
16729    # to not find them
16730    if test "x$new_path" = x \
16731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16733      new_path="$path"
16734
16735  windows_path="$new_path"
16736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16737    unix_path=`$CYGPATH -u "$windows_path"`
16738    new_path="$unix_path"
16739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16741    new_path="$unix_path"
16742  fi
16743
16744    fi
16745
16746    if test "x$new_path" = x; then
16747      # It's still not found. Now this is an unrecoverable error.
16748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16750      has_space=`$ECHO "$complete" | $GREP " "`
16751      if test "x$has_space" != x; then
16752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16754      fi
16755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16756    fi
16757  fi
16758
16759  # Now new_path has a complete unix path to the binary
16760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16761    # Keep paths in /bin as-is, but remove trailing .exe if any
16762    new_path="${new_path/%.exe/}"
16763    # Do not save /bin paths to all_fixpath_prefixes!
16764  else
16765    # Not in mixed or Windows style, start by that.
16766    new_path=`cmd //c echo $new_path`
16767
16768  input_path="$new_path"
16769  # Check if we need to convert this using DOS-style short mode. If the path
16770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16771  # take no chances and rewrite it.
16772  # Note: m4 eats our [], so we need to use [ and ] instead.
16773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16774  if test "x$has_forbidden_chars" != x; then
16775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16777  fi
16778
16779    # Output is in $new_path
16780
16781  windows_path="$new_path"
16782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783    unix_path=`$CYGPATH -u "$windows_path"`
16784    new_path="$unix_path"
16785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16787    new_path="$unix_path"
16788  fi
16789
16790    # remove trailing .exe if any
16791    new_path="${new_path/%.exe/}"
16792
16793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16795  fi
16796
16797  else
16798    # We're on a posix platform. Hooray! :)
16799    # First separate the path from the arguments. This will split at the first
16800    # space.
16801    complete="$FOUND_MAKE"
16802    path="${complete%% *}"
16803    tmp="$complete EOL"
16804    arguments="${tmp#* }"
16805
16806    # Cannot rely on the command "which" here since it doesn't always work.
16807    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16808    if test -z "$is_absolute_path"; then
16809      # Path to executable is not absolute. Find it.
16810      IFS_save="$IFS"
16811      IFS=:
16812      for p in $PATH; do
16813        if test -f "$p/$path" && test -x "$p/$path"; then
16814          new_path="$p/$path"
16815          break
16816        fi
16817      done
16818      IFS="$IFS_save"
16819    else
16820      # This is an absolute path, we can use it without further modifications.
16821      new_path="$path"
16822    fi
16823
16824    if test "x$new_path" = x; then
16825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16826$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16827      has_space=`$ECHO "$complete" | $GREP " "`
16828      if test "x$has_space" != x; then
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16831      fi
16832      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16833    fi
16834  fi
16835
16836  # Now join together the path and the arguments once again
16837  if test "x$arguments" != xEOL; then
16838    new_complete="$new_path ${arguments% *}"
16839  else
16840    new_complete="$new_path"
16841  fi
16842
16843  if test "x$complete" != "x$new_complete"; then
16844    FOUND_MAKE="$new_complete"
16845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16846$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16847  fi
16848
16849        fi
16850      fi
16851    fi
16852  fi
16853
16854        if test "x$FOUND_MAKE" = x; then
16855          for ac_prog in make
16856do
16857  # Extract the first word of "$ac_prog", so it can be a program name with args.
16858set dummy $ac_prog; ac_word=$2
16859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16860$as_echo_n "checking for $ac_word... " >&6; }
16861if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16862  $as_echo_n "(cached) " >&6
16863else
16864  case $CHECK_TOOLSDIR_MAKE in
16865  [\\/]* | ?:[\\/]*)
16866  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16867  ;;
16868  *)
16869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16870for as_dir in $PATH
16871do
16872  IFS=$as_save_IFS
16873  test -z "$as_dir" && as_dir=.
16874    for ac_exec_ext in '' $ac_executable_extensions; do
16875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16876    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16878    break 2
16879  fi
16880done
16881  done
16882IFS=$as_save_IFS
16883
16884  ;;
16885esac
16886fi
16887CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16888if test -n "$CHECK_TOOLSDIR_MAKE"; then
16889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16890$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16891else
16892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16893$as_echo "no" >&6; }
16894fi
16895
16896
16897  test -n "$CHECK_TOOLSDIR_MAKE" && break
16898done
16899
16900
16901  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16902  DESCRIPTION="make in tools-dir"
16903  if test "x$MAKE_CANDIDATE" != x; then
16904    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16905$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16906    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16907    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16908    if test "x$IS_GNU_MAKE" = x; then
16909      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16910$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16911    else
16912      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16913      if test "x$IS_MODERN_MAKE" = x; then
16914        { $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
16915$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;}
16916      else
16917        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16918          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16919            MAKE_EXPECTED_ENV='cygwin'
16920          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16921            MAKE_EXPECTED_ENV='msys'
16922          else
16923            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16924          fi
16925          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16926          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16927        else
16928          # Not relevant for non-Windows
16929          IS_MAKE_CORRECT_ENV=true
16930        fi
16931        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16932          { $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
16933$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;}
16934        else
16935          FOUND_MAKE=$MAKE_CANDIDATE
16936
16937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16938
16939  # First separate the path from the arguments. This will split at the first
16940  # space.
16941  complete="$FOUND_MAKE"
16942  path="${complete%% *}"
16943  tmp="$complete EOL"
16944  arguments="${tmp#* }"
16945
16946  # Input might be given as Windows format, start by converting to
16947  # unix format.
16948  new_path=`$CYGPATH -u "$path"`
16949
16950  # Now try to locate executable using which
16951  new_path=`$WHICH "$new_path" 2> /dev/null`
16952  # bat and cmd files are not always considered executable in cygwin causing which
16953  # to not find them
16954  if test "x$new_path" = x \
16955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16957    new_path=`$CYGPATH -u "$path"`
16958  fi
16959  if test "x$new_path" = x; then
16960    # Oops. Which didn't find the executable.
16961    # The splitting of arguments from the executable at a space might have been incorrect,
16962    # since paths with space are more likely in Windows. Give it another try with the whole
16963    # argument.
16964    path="$complete"
16965    arguments="EOL"
16966    new_path=`$CYGPATH -u "$path"`
16967    new_path=`$WHICH "$new_path" 2> /dev/null`
16968    # bat and cmd files are not always considered executable in cygwin causing which
16969    # to not find them
16970    if test "x$new_path" = x \
16971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16973      new_path=`$CYGPATH -u "$path"`
16974    fi
16975    if test "x$new_path" = x; then
16976      # It's still not found. Now this is an unrecoverable error.
16977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16978$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16979      has_space=`$ECHO "$complete" | $GREP " "`
16980      if test "x$has_space" != x; then
16981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16983      fi
16984      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16985    fi
16986  fi
16987
16988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16991  # "foo.exe" is OK but "foo" is an error.
16992  #
16993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16994  # It is also a way to make sure we got the proper file name for the real test later on.
16995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16996  if test "x$test_shortpath" = x; then
16997    # Short path failed, file does not exist as specified.
16998    # Try adding .exe or .cmd
16999    if test -f "${new_path}.exe"; then
17000      input_to_shortpath="${new_path}.exe"
17001    elif test -f "${new_path}.cmd"; then
17002      input_to_shortpath="${new_path}.cmd"
17003    else
17004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17009    fi
17010  else
17011    input_to_shortpath="$new_path"
17012  fi
17013
17014  # Call helper function which possibly converts this using DOS-style short mode.
17015  # If so, the updated path is stored in $new_path.
17016  new_path="$input_to_shortpath"
17017
17018  input_path="$input_to_shortpath"
17019  # Check if we need to convert this using DOS-style short mode. If the path
17020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17021  # take no chances and rewrite it.
17022  # Note: m4 eats our [], so we need to use [ and ] instead.
17023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17024  if test "x$has_forbidden_chars" != x; then
17025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17029      # Going to short mode and back again did indeed matter. Since short mode is
17030      # case insensitive, let's make it lowercase to improve readability.
17031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17032      # Now convert it back to Unix-stile (cygpath)
17033      input_path=`$CYGPATH -u "$shortmode_path"`
17034      new_path="$input_path"
17035    fi
17036  fi
17037
17038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17039  if test "x$test_cygdrive_prefix" = x; then
17040    # As a simple fix, exclude /usr/bin since it's not a real path.
17041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17043      # a path prefixed by /cygdrive for fixpath to work.
17044      new_path="$CYGWIN_ROOT_PATH$input_path"
17045    fi
17046  fi
17047
17048  # remove trailing .exe if any
17049  new_path="${new_path/%.exe/}"
17050
17051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17052
17053  # First separate the path from the arguments. This will split at the first
17054  # space.
17055  complete="$FOUND_MAKE"
17056  path="${complete%% *}"
17057  tmp="$complete EOL"
17058  arguments="${tmp#* }"
17059
17060  # Input might be given as Windows format, start by converting to
17061  # unix format.
17062  new_path="$path"
17063
17064  windows_path="$new_path"
17065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17066    unix_path=`$CYGPATH -u "$windows_path"`
17067    new_path="$unix_path"
17068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17070    new_path="$unix_path"
17071  fi
17072
17073
17074  # Now try to locate executable using which
17075  new_path=`$WHICH "$new_path" 2> /dev/null`
17076
17077  if test "x$new_path" = x; then
17078    # Oops. Which didn't find the executable.
17079    # The splitting of arguments from the executable at a space might have been incorrect,
17080    # since paths with space are more likely in Windows. Give it another try with the whole
17081    # argument.
17082    path="$complete"
17083    arguments="EOL"
17084    new_path="$path"
17085
17086  windows_path="$new_path"
17087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17088    unix_path=`$CYGPATH -u "$windows_path"`
17089    new_path="$unix_path"
17090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17092    new_path="$unix_path"
17093  fi
17094
17095
17096    new_path=`$WHICH "$new_path" 2> /dev/null`
17097    # bat and cmd files are not always considered executable in MSYS causing which
17098    # to not find them
17099    if test "x$new_path" = x \
17100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17102      new_path="$path"
17103
17104  windows_path="$new_path"
17105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17106    unix_path=`$CYGPATH -u "$windows_path"`
17107    new_path="$unix_path"
17108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17110    new_path="$unix_path"
17111  fi
17112
17113    fi
17114
17115    if test "x$new_path" = x; then
17116      # It's still not found. Now this is an unrecoverable error.
17117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17118$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17119      has_space=`$ECHO "$complete" | $GREP " "`
17120      if test "x$has_space" != x; then
17121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17123      fi
17124      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17125    fi
17126  fi
17127
17128  # Now new_path has a complete unix path to the binary
17129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17130    # Keep paths in /bin as-is, but remove trailing .exe if any
17131    new_path="${new_path/%.exe/}"
17132    # Do not save /bin paths to all_fixpath_prefixes!
17133  else
17134    # Not in mixed or Windows style, start by that.
17135    new_path=`cmd //c echo $new_path`
17136
17137  input_path="$new_path"
17138  # Check if we need to convert this using DOS-style short mode. If the path
17139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17140  # take no chances and rewrite it.
17141  # Note: m4 eats our [], so we need to use [ and ] instead.
17142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17143  if test "x$has_forbidden_chars" != x; then
17144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17146  fi
17147
17148    # Output is in $new_path
17149
17150  windows_path="$new_path"
17151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17152    unix_path=`$CYGPATH -u "$windows_path"`
17153    new_path="$unix_path"
17154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17156    new_path="$unix_path"
17157  fi
17158
17159    # remove trailing .exe if any
17160    new_path="${new_path/%.exe/}"
17161
17162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17164  fi
17165
17166  else
17167    # We're on a posix platform. Hooray! :)
17168    # First separate the path from the arguments. This will split at the first
17169    # space.
17170    complete="$FOUND_MAKE"
17171    path="${complete%% *}"
17172    tmp="$complete EOL"
17173    arguments="${tmp#* }"
17174
17175    # Cannot rely on the command "which" here since it doesn't always work.
17176    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17177    if test -z "$is_absolute_path"; then
17178      # Path to executable is not absolute. Find it.
17179      IFS_save="$IFS"
17180      IFS=:
17181      for p in $PATH; do
17182        if test -f "$p/$path" && test -x "$p/$path"; then
17183          new_path="$p/$path"
17184          break
17185        fi
17186      done
17187      IFS="$IFS_save"
17188    else
17189      # This is an absolute path, we can use it without further modifications.
17190      new_path="$path"
17191    fi
17192
17193    if test "x$new_path" = x; then
17194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17195$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17196      has_space=`$ECHO "$complete" | $GREP " "`
17197      if test "x$has_space" != x; then
17198        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17200      fi
17201      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17202    fi
17203  fi
17204
17205  # Now join together the path and the arguments once again
17206  if test "x$arguments" != xEOL; then
17207    new_complete="$new_path ${arguments% *}"
17208  else
17209    new_complete="$new_path"
17210  fi
17211
17212  if test "x$complete" != "x$new_complete"; then
17213    FOUND_MAKE="$new_complete"
17214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17215$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17216  fi
17217
17218        fi
17219      fi
17220    fi
17221  fi
17222
17223        fi
17224        PATH=$OLD_PATH
17225      fi
17226    fi
17227
17228    if test "x$FOUND_MAKE" = x; then
17229      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
17230    fi
17231  fi
17232
17233  MAKE=$FOUND_MAKE
17234
17235  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17236$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17237
17238
17239  # Check if make supports the output sync option and if so, setup using it.
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17241$as_echo_n "checking if make --output-sync is supported... " >&6; }
17242  if $MAKE --version -O > /dev/null 2>&1; then
17243    OUTPUT_SYNC_SUPPORTED=true
17244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17245$as_echo "yes" >&6; }
17246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17247$as_echo_n "checking for output-sync value... " >&6; }
17248
17249# Check whether --with-output-sync was given.
17250if test "${with_output_sync+set}" = set; then :
17251  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17252fi
17253
17254    if test "x$OUTPUT_SYNC" = "x"; then
17255      OUTPUT_SYNC=none
17256    fi
17257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17258$as_echo "$OUTPUT_SYNC" >&6; }
17259    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17260      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17261    fi
17262  else
17263    OUTPUT_SYNC_SUPPORTED=false
17264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17265$as_echo "no" >&6; }
17266  fi
17267
17268
17269
17270
17271
17272
17273  # Test if find supports -delete
17274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17275$as_echo_n "checking if find supports -delete... " >&6; }
17276  FIND_DELETE="-delete"
17277
17278  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17279
17280  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17281
17282  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17283  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17284    # No, it does not.
17285    rm $DELETEDIR/TestIfFindSupportsDelete
17286    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17287      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17288      FIND_DELETE="-print | xargs rm"
17289    else
17290      FIND_DELETE="-exec rm \{\} \+"
17291    fi
17292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17293$as_echo "no" >&6; }
17294  else
17295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17296$as_echo "yes" >&6; }
17297  fi
17298  rmdir $DELETEDIR
17299
17300
17301
17302  # These tools might not be installed by default,
17303  # need hint on how to install them.
17304
17305
17306
17307  # Publish this variable in the help.
17308
17309
17310  if test "x$UNZIP" = x; then
17311    # The variable is not set by user, try to locate tool using the code snippet
17312    for ac_prog in unzip
17313do
17314  # Extract the first word of "$ac_prog", so it can be a program name with args.
17315set dummy $ac_prog; ac_word=$2
17316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17317$as_echo_n "checking for $ac_word... " >&6; }
17318if ${ac_cv_path_UNZIP+:} false; then :
17319  $as_echo_n "(cached) " >&6
17320else
17321  case $UNZIP in
17322  [\\/]* | ?:[\\/]*)
17323  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17324  ;;
17325  *)
17326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17327for as_dir in $PATH
17328do
17329  IFS=$as_save_IFS
17330  test -z "$as_dir" && as_dir=.
17331    for ac_exec_ext in '' $ac_executable_extensions; do
17332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17333    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17335    break 2
17336  fi
17337done
17338  done
17339IFS=$as_save_IFS
17340
17341  ;;
17342esac
17343fi
17344UNZIP=$ac_cv_path_UNZIP
17345if test -n "$UNZIP"; then
17346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17347$as_echo "$UNZIP" >&6; }
17348else
17349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17350$as_echo "no" >&6; }
17351fi
17352
17353
17354  test -n "$UNZIP" && break
17355done
17356
17357  else
17358    # The variable is set, but is it from the command line or the environment?
17359
17360    # Try to remove the string !UNZIP! from our list.
17361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17363      # If it failed, the variable was not from the command line. Ignore it,
17364      # but warn the user (except for BASH, which is always set by the calling BASH).
17365      if test "xUNZIP" != xBASH; then
17366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17367$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17368      fi
17369      # Try to locate tool using the code snippet
17370      for ac_prog in unzip
17371do
17372  # Extract the first word of "$ac_prog", so it can be a program name with args.
17373set dummy $ac_prog; ac_word=$2
17374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17375$as_echo_n "checking for $ac_word... " >&6; }
17376if ${ac_cv_path_UNZIP+:} false; then :
17377  $as_echo_n "(cached) " >&6
17378else
17379  case $UNZIP in
17380  [\\/]* | ?:[\\/]*)
17381  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17382  ;;
17383  *)
17384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17385for as_dir in $PATH
17386do
17387  IFS=$as_save_IFS
17388  test -z "$as_dir" && as_dir=.
17389    for ac_exec_ext in '' $ac_executable_extensions; do
17390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17391    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17393    break 2
17394  fi
17395done
17396  done
17397IFS=$as_save_IFS
17398
17399  ;;
17400esac
17401fi
17402UNZIP=$ac_cv_path_UNZIP
17403if test -n "$UNZIP"; then
17404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17405$as_echo "$UNZIP" >&6; }
17406else
17407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17408$as_echo "no" >&6; }
17409fi
17410
17411
17412  test -n "$UNZIP" && break
17413done
17414
17415    else
17416      # If it succeeded, then it was overridden by the user. We will use it
17417      # for the tool.
17418
17419      # First remove it from the list of overridden variables, so we can test
17420      # for unknown variables in the end.
17421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17422
17423      # Check if the provided tool contains a complete path.
17424      tool_specified="$UNZIP"
17425      tool_basename="${tool_specified##*/}"
17426      if test "x$tool_basename" = "x$tool_specified"; then
17427        # A command without a complete path is provided, search $PATH.
17428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17429$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17430        # Extract the first word of "$tool_basename", so it can be a program name with args.
17431set dummy $tool_basename; ac_word=$2
17432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17433$as_echo_n "checking for $ac_word... " >&6; }
17434if ${ac_cv_path_UNZIP+:} false; then :
17435  $as_echo_n "(cached) " >&6
17436else
17437  case $UNZIP in
17438  [\\/]* | ?:[\\/]*)
17439  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17440  ;;
17441  *)
17442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17443for as_dir in $PATH
17444do
17445  IFS=$as_save_IFS
17446  test -z "$as_dir" && as_dir=.
17447    for ac_exec_ext in '' $ac_executable_extensions; do
17448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17449    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17451    break 2
17452  fi
17453done
17454  done
17455IFS=$as_save_IFS
17456
17457  ;;
17458esac
17459fi
17460UNZIP=$ac_cv_path_UNZIP
17461if test -n "$UNZIP"; then
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17463$as_echo "$UNZIP" >&6; }
17464else
17465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17466$as_echo "no" >&6; }
17467fi
17468
17469
17470        if test "x$UNZIP" = x; then
17471          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17472        fi
17473      else
17474        # Otherwise we believe it is a complete path. Use it as it is.
17475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17476$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17478$as_echo_n "checking for UNZIP... " >&6; }
17479        if test ! -x "$tool_specified"; then
17480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17481$as_echo "not found" >&6; }
17482          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17483        fi
17484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17485$as_echo "$tool_specified" >&6; }
17486      fi
17487    fi
17488  fi
17489
17490
17491
17492  if test "x$UNZIP" = x; then
17493    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17494  fi
17495
17496
17497
17498
17499
17500  # Publish this variable in the help.
17501
17502
17503  if test "x$ZIP" = x; then
17504    # The variable is not set by user, try to locate tool using the code snippet
17505    for ac_prog in zip
17506do
17507  # Extract the first word of "$ac_prog", so it can be a program name with args.
17508set dummy $ac_prog; ac_word=$2
17509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17510$as_echo_n "checking for $ac_word... " >&6; }
17511if ${ac_cv_path_ZIP+:} false; then :
17512  $as_echo_n "(cached) " >&6
17513else
17514  case $ZIP in
17515  [\\/]* | ?:[\\/]*)
17516  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17517  ;;
17518  *)
17519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17520for as_dir in $PATH
17521do
17522  IFS=$as_save_IFS
17523  test -z "$as_dir" && as_dir=.
17524    for ac_exec_ext in '' $ac_executable_extensions; do
17525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17526    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17528    break 2
17529  fi
17530done
17531  done
17532IFS=$as_save_IFS
17533
17534  ;;
17535esac
17536fi
17537ZIP=$ac_cv_path_ZIP
17538if test -n "$ZIP"; then
17539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17540$as_echo "$ZIP" >&6; }
17541else
17542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17543$as_echo "no" >&6; }
17544fi
17545
17546
17547  test -n "$ZIP" && break
17548done
17549
17550  else
17551    # The variable is set, but is it from the command line or the environment?
17552
17553    # Try to remove the string !ZIP! from our list.
17554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17556      # If it failed, the variable was not from the command line. Ignore it,
17557      # but warn the user (except for BASH, which is always set by the calling BASH).
17558      if test "xZIP" != xBASH; then
17559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17560$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17561      fi
17562      # Try to locate tool using the code snippet
17563      for ac_prog in zip
17564do
17565  # Extract the first word of "$ac_prog", so it can be a program name with args.
17566set dummy $ac_prog; ac_word=$2
17567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17568$as_echo_n "checking for $ac_word... " >&6; }
17569if ${ac_cv_path_ZIP+:} false; then :
17570  $as_echo_n "(cached) " >&6
17571else
17572  case $ZIP in
17573  [\\/]* | ?:[\\/]*)
17574  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17575  ;;
17576  *)
17577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17578for as_dir in $PATH
17579do
17580  IFS=$as_save_IFS
17581  test -z "$as_dir" && as_dir=.
17582    for ac_exec_ext in '' $ac_executable_extensions; do
17583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17584    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17586    break 2
17587  fi
17588done
17589  done
17590IFS=$as_save_IFS
17591
17592  ;;
17593esac
17594fi
17595ZIP=$ac_cv_path_ZIP
17596if test -n "$ZIP"; then
17597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17598$as_echo "$ZIP" >&6; }
17599else
17600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17601$as_echo "no" >&6; }
17602fi
17603
17604
17605  test -n "$ZIP" && break
17606done
17607
17608    else
17609      # If it succeeded, then it was overridden by the user. We will use it
17610      # for the tool.
17611
17612      # First remove it from the list of overridden variables, so we can test
17613      # for unknown variables in the end.
17614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17615
17616      # Check if the provided tool contains a complete path.
17617      tool_specified="$ZIP"
17618      tool_basename="${tool_specified##*/}"
17619      if test "x$tool_basename" = "x$tool_specified"; then
17620        # A command without a complete path is provided, search $PATH.
17621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17622$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17623        # Extract the first word of "$tool_basename", so it can be a program name with args.
17624set dummy $tool_basename; ac_word=$2
17625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17626$as_echo_n "checking for $ac_word... " >&6; }
17627if ${ac_cv_path_ZIP+:} false; then :
17628  $as_echo_n "(cached) " >&6
17629else
17630  case $ZIP in
17631  [\\/]* | ?:[\\/]*)
17632  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17633  ;;
17634  *)
17635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17636for as_dir in $PATH
17637do
17638  IFS=$as_save_IFS
17639  test -z "$as_dir" && as_dir=.
17640    for ac_exec_ext in '' $ac_executable_extensions; do
17641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17642    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17644    break 2
17645  fi
17646done
17647  done
17648IFS=$as_save_IFS
17649
17650  ;;
17651esac
17652fi
17653ZIP=$ac_cv_path_ZIP
17654if test -n "$ZIP"; then
17655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17656$as_echo "$ZIP" >&6; }
17657else
17658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17659$as_echo "no" >&6; }
17660fi
17661
17662
17663        if test "x$ZIP" = x; then
17664          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17665        fi
17666      else
17667        # Otherwise we believe it is a complete path. Use it as it is.
17668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17669$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17671$as_echo_n "checking for ZIP... " >&6; }
17672        if test ! -x "$tool_specified"; then
17673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17674$as_echo "not found" >&6; }
17675          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17676        fi
17677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17678$as_echo "$tool_specified" >&6; }
17679      fi
17680    fi
17681  fi
17682
17683
17684
17685  if test "x$ZIP" = x; then
17686    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17687  fi
17688
17689
17690
17691  # Non-required basic tools
17692
17693
17694
17695  # Publish this variable in the help.
17696
17697
17698  if test "x$LDD" = x; then
17699    # The variable is not set by user, try to locate tool using the code snippet
17700    for ac_prog in ldd
17701do
17702  # Extract the first word of "$ac_prog", so it can be a program name with args.
17703set dummy $ac_prog; ac_word=$2
17704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17705$as_echo_n "checking for $ac_word... " >&6; }
17706if ${ac_cv_path_LDD+:} false; then :
17707  $as_echo_n "(cached) " >&6
17708else
17709  case $LDD in
17710  [\\/]* | ?:[\\/]*)
17711  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17712  ;;
17713  *)
17714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17715for as_dir in $PATH
17716do
17717  IFS=$as_save_IFS
17718  test -z "$as_dir" && as_dir=.
17719    for ac_exec_ext in '' $ac_executable_extensions; do
17720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17721    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17723    break 2
17724  fi
17725done
17726  done
17727IFS=$as_save_IFS
17728
17729  ;;
17730esac
17731fi
17732LDD=$ac_cv_path_LDD
17733if test -n "$LDD"; then
17734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17735$as_echo "$LDD" >&6; }
17736else
17737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17738$as_echo "no" >&6; }
17739fi
17740
17741
17742  test -n "$LDD" && break
17743done
17744
17745  else
17746    # The variable is set, but is it from the command line or the environment?
17747
17748    # Try to remove the string !LDD! from our list.
17749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17751      # If it failed, the variable was not from the command line. Ignore it,
17752      # but warn the user (except for BASH, which is always set by the calling BASH).
17753      if test "xLDD" != xBASH; then
17754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17755$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17756      fi
17757      # Try to locate tool using the code snippet
17758      for ac_prog in ldd
17759do
17760  # Extract the first word of "$ac_prog", so it can be a program name with args.
17761set dummy $ac_prog; ac_word=$2
17762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17763$as_echo_n "checking for $ac_word... " >&6; }
17764if ${ac_cv_path_LDD+:} false; then :
17765  $as_echo_n "(cached) " >&6
17766else
17767  case $LDD in
17768  [\\/]* | ?:[\\/]*)
17769  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17770  ;;
17771  *)
17772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17773for as_dir in $PATH
17774do
17775  IFS=$as_save_IFS
17776  test -z "$as_dir" && as_dir=.
17777    for ac_exec_ext in '' $ac_executable_extensions; do
17778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17779    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17781    break 2
17782  fi
17783done
17784  done
17785IFS=$as_save_IFS
17786
17787  ;;
17788esac
17789fi
17790LDD=$ac_cv_path_LDD
17791if test -n "$LDD"; then
17792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17793$as_echo "$LDD" >&6; }
17794else
17795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17796$as_echo "no" >&6; }
17797fi
17798
17799
17800  test -n "$LDD" && break
17801done
17802
17803    else
17804      # If it succeeded, then it was overridden by the user. We will use it
17805      # for the tool.
17806
17807      # First remove it from the list of overridden variables, so we can test
17808      # for unknown variables in the end.
17809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17810
17811      # Check if the provided tool contains a complete path.
17812      tool_specified="$LDD"
17813      tool_basename="${tool_specified##*/}"
17814      if test "x$tool_basename" = "x$tool_specified"; then
17815        # A command without a complete path is provided, search $PATH.
17816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17817$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17818        # Extract the first word of "$tool_basename", so it can be a program name with args.
17819set dummy $tool_basename; ac_word=$2
17820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17821$as_echo_n "checking for $ac_word... " >&6; }
17822if ${ac_cv_path_LDD+:} false; then :
17823  $as_echo_n "(cached) " >&6
17824else
17825  case $LDD in
17826  [\\/]* | ?:[\\/]*)
17827  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17828  ;;
17829  *)
17830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17831for as_dir in $PATH
17832do
17833  IFS=$as_save_IFS
17834  test -z "$as_dir" && as_dir=.
17835    for ac_exec_ext in '' $ac_executable_extensions; do
17836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17837    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17839    break 2
17840  fi
17841done
17842  done
17843IFS=$as_save_IFS
17844
17845  ;;
17846esac
17847fi
17848LDD=$ac_cv_path_LDD
17849if test -n "$LDD"; then
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17851$as_echo "$LDD" >&6; }
17852else
17853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17854$as_echo "no" >&6; }
17855fi
17856
17857
17858        if test "x$LDD" = x; then
17859          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17860        fi
17861      else
17862        # Otherwise we believe it is a complete path. Use it as it is.
17863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17864$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17865        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17866$as_echo_n "checking for LDD... " >&6; }
17867        if test ! -x "$tool_specified"; then
17868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17869$as_echo "not found" >&6; }
17870          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17871        fi
17872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17873$as_echo "$tool_specified" >&6; }
17874      fi
17875    fi
17876  fi
17877
17878
17879  if test "x$LDD" = "x"; then
17880    # List shared lib dependencies is used for
17881    # debug output and checking for forbidden dependencies.
17882    # We can build without it.
17883    LDD="true"
17884  fi
17885
17886
17887  # Publish this variable in the help.
17888
17889
17890  if test "x$OTOOL" = x; then
17891    # The variable is not set by user, try to locate tool using the code snippet
17892    for ac_prog in otool
17893do
17894  # Extract the first word of "$ac_prog", so it can be a program name with args.
17895set dummy $ac_prog; ac_word=$2
17896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17897$as_echo_n "checking for $ac_word... " >&6; }
17898if ${ac_cv_path_OTOOL+:} false; then :
17899  $as_echo_n "(cached) " >&6
17900else
17901  case $OTOOL in
17902  [\\/]* | ?:[\\/]*)
17903  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17904  ;;
17905  *)
17906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17907for as_dir in $PATH
17908do
17909  IFS=$as_save_IFS
17910  test -z "$as_dir" && as_dir=.
17911    for ac_exec_ext in '' $ac_executable_extensions; do
17912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17913    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17915    break 2
17916  fi
17917done
17918  done
17919IFS=$as_save_IFS
17920
17921  ;;
17922esac
17923fi
17924OTOOL=$ac_cv_path_OTOOL
17925if test -n "$OTOOL"; then
17926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17927$as_echo "$OTOOL" >&6; }
17928else
17929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17930$as_echo "no" >&6; }
17931fi
17932
17933
17934  test -n "$OTOOL" && break
17935done
17936
17937  else
17938    # The variable is set, but is it from the command line or the environment?
17939
17940    # Try to remove the string !OTOOL! from our list.
17941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17943      # If it failed, the variable was not from the command line. Ignore it,
17944      # but warn the user (except for BASH, which is always set by the calling BASH).
17945      if test "xOTOOL" != xBASH; then
17946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17947$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17948      fi
17949      # Try to locate tool using the code snippet
17950      for ac_prog in otool
17951do
17952  # Extract the first word of "$ac_prog", so it can be a program name with args.
17953set dummy $ac_prog; ac_word=$2
17954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17955$as_echo_n "checking for $ac_word... " >&6; }
17956if ${ac_cv_path_OTOOL+:} false; then :
17957  $as_echo_n "(cached) " >&6
17958else
17959  case $OTOOL in
17960  [\\/]* | ?:[\\/]*)
17961  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17962  ;;
17963  *)
17964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17965for as_dir in $PATH
17966do
17967  IFS=$as_save_IFS
17968  test -z "$as_dir" && as_dir=.
17969    for ac_exec_ext in '' $ac_executable_extensions; do
17970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17971    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17973    break 2
17974  fi
17975done
17976  done
17977IFS=$as_save_IFS
17978
17979  ;;
17980esac
17981fi
17982OTOOL=$ac_cv_path_OTOOL
17983if test -n "$OTOOL"; then
17984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17985$as_echo "$OTOOL" >&6; }
17986else
17987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17988$as_echo "no" >&6; }
17989fi
17990
17991
17992  test -n "$OTOOL" && break
17993done
17994
17995    else
17996      # If it succeeded, then it was overridden by the user. We will use it
17997      # for the tool.
17998
17999      # First remove it from the list of overridden variables, so we can test
18000      # for unknown variables in the end.
18001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18002
18003      # Check if the provided tool contains a complete path.
18004      tool_specified="$OTOOL"
18005      tool_basename="${tool_specified##*/}"
18006      if test "x$tool_basename" = "x$tool_specified"; then
18007        # A command without a complete path is provided, search $PATH.
18008        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18009$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18010        # Extract the first word of "$tool_basename", so it can be a program name with args.
18011set dummy $tool_basename; ac_word=$2
18012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18013$as_echo_n "checking for $ac_word... " >&6; }
18014if ${ac_cv_path_OTOOL+:} false; then :
18015  $as_echo_n "(cached) " >&6
18016else
18017  case $OTOOL in
18018  [\\/]* | ?:[\\/]*)
18019  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18020  ;;
18021  *)
18022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18023for as_dir in $PATH
18024do
18025  IFS=$as_save_IFS
18026  test -z "$as_dir" && as_dir=.
18027    for ac_exec_ext in '' $ac_executable_extensions; do
18028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18029    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18031    break 2
18032  fi
18033done
18034  done
18035IFS=$as_save_IFS
18036
18037  ;;
18038esac
18039fi
18040OTOOL=$ac_cv_path_OTOOL
18041if test -n "$OTOOL"; then
18042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18043$as_echo "$OTOOL" >&6; }
18044else
18045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18046$as_echo "no" >&6; }
18047fi
18048
18049
18050        if test "x$OTOOL" = x; then
18051          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18052        fi
18053      else
18054        # Otherwise we believe it is a complete path. Use it as it is.
18055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18056$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18058$as_echo_n "checking for OTOOL... " >&6; }
18059        if test ! -x "$tool_specified"; then
18060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18061$as_echo "not found" >&6; }
18062          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18063        fi
18064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18065$as_echo "$tool_specified" >&6; }
18066      fi
18067    fi
18068  fi
18069
18070
18071  if test "x$OTOOL" = "x"; then
18072    OTOOL="true"
18073  fi
18074
18075
18076  # Publish this variable in the help.
18077
18078
18079  if test "x$READELF" = x; then
18080    # The variable is not set by user, try to locate tool using the code snippet
18081    for ac_prog in greadelf readelf
18082do
18083  # Extract the first word of "$ac_prog", so it can be a program name with args.
18084set dummy $ac_prog; ac_word=$2
18085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18086$as_echo_n "checking for $ac_word... " >&6; }
18087if ${ac_cv_path_READELF+:} false; then :
18088  $as_echo_n "(cached) " >&6
18089else
18090  case $READELF in
18091  [\\/]* | ?:[\\/]*)
18092  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18093  ;;
18094  *)
18095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18096for as_dir in $PATH
18097do
18098  IFS=$as_save_IFS
18099  test -z "$as_dir" && as_dir=.
18100    for ac_exec_ext in '' $ac_executable_extensions; do
18101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18102    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18104    break 2
18105  fi
18106done
18107  done
18108IFS=$as_save_IFS
18109
18110  ;;
18111esac
18112fi
18113READELF=$ac_cv_path_READELF
18114if test -n "$READELF"; then
18115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18116$as_echo "$READELF" >&6; }
18117else
18118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18119$as_echo "no" >&6; }
18120fi
18121
18122
18123  test -n "$READELF" && break
18124done
18125
18126  else
18127    # The variable is set, but is it from the command line or the environment?
18128
18129    # Try to remove the string !READELF! from our list.
18130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18132      # If it failed, the variable was not from the command line. Ignore it,
18133      # but warn the user (except for BASH, which is always set by the calling BASH).
18134      if test "xREADELF" != xBASH; then
18135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18136$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18137      fi
18138      # Try to locate tool using the code snippet
18139      for ac_prog in greadelf readelf
18140do
18141  # Extract the first word of "$ac_prog", so it can be a program name with args.
18142set dummy $ac_prog; ac_word=$2
18143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18144$as_echo_n "checking for $ac_word... " >&6; }
18145if ${ac_cv_path_READELF+:} false; then :
18146  $as_echo_n "(cached) " >&6
18147else
18148  case $READELF in
18149  [\\/]* | ?:[\\/]*)
18150  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18151  ;;
18152  *)
18153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18154for as_dir in $PATH
18155do
18156  IFS=$as_save_IFS
18157  test -z "$as_dir" && as_dir=.
18158    for ac_exec_ext in '' $ac_executable_extensions; do
18159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18160    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18162    break 2
18163  fi
18164done
18165  done
18166IFS=$as_save_IFS
18167
18168  ;;
18169esac
18170fi
18171READELF=$ac_cv_path_READELF
18172if test -n "$READELF"; then
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18174$as_echo "$READELF" >&6; }
18175else
18176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18177$as_echo "no" >&6; }
18178fi
18179
18180
18181  test -n "$READELF" && break
18182done
18183
18184    else
18185      # If it succeeded, then it was overridden by the user. We will use it
18186      # for the tool.
18187
18188      # First remove it from the list of overridden variables, so we can test
18189      # for unknown variables in the end.
18190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18191
18192      # Check if the provided tool contains a complete path.
18193      tool_specified="$READELF"
18194      tool_basename="${tool_specified##*/}"
18195      if test "x$tool_basename" = "x$tool_specified"; then
18196        # A command without a complete path is provided, search $PATH.
18197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18198$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18199        # Extract the first word of "$tool_basename", so it can be a program name with args.
18200set dummy $tool_basename; ac_word=$2
18201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18202$as_echo_n "checking for $ac_word... " >&6; }
18203if ${ac_cv_path_READELF+:} false; then :
18204  $as_echo_n "(cached) " >&6
18205else
18206  case $READELF in
18207  [\\/]* | ?:[\\/]*)
18208  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18209  ;;
18210  *)
18211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18212for as_dir in $PATH
18213do
18214  IFS=$as_save_IFS
18215  test -z "$as_dir" && as_dir=.
18216    for ac_exec_ext in '' $ac_executable_extensions; do
18217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18218    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18220    break 2
18221  fi
18222done
18223  done
18224IFS=$as_save_IFS
18225
18226  ;;
18227esac
18228fi
18229READELF=$ac_cv_path_READELF
18230if test -n "$READELF"; then
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18232$as_echo "$READELF" >&6; }
18233else
18234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18235$as_echo "no" >&6; }
18236fi
18237
18238
18239        if test "x$READELF" = x; then
18240          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18241        fi
18242      else
18243        # Otherwise we believe it is a complete path. Use it as it is.
18244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18245$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18247$as_echo_n "checking for READELF... " >&6; }
18248        if test ! -x "$tool_specified"; then
18249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18250$as_echo "not found" >&6; }
18251          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18252        fi
18253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18254$as_echo "$tool_specified" >&6; }
18255      fi
18256    fi
18257  fi
18258
18259
18260
18261
18262  # Publish this variable in the help.
18263
18264
18265  if test "x$HG" = x; then
18266    # The variable is not set by user, try to locate tool using the code snippet
18267    for ac_prog in hg
18268do
18269  # Extract the first word of "$ac_prog", so it can be a program name with args.
18270set dummy $ac_prog; ac_word=$2
18271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18272$as_echo_n "checking for $ac_word... " >&6; }
18273if ${ac_cv_path_HG+:} false; then :
18274  $as_echo_n "(cached) " >&6
18275else
18276  case $HG in
18277  [\\/]* | ?:[\\/]*)
18278  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18279  ;;
18280  *)
18281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18282for as_dir in $PATH
18283do
18284  IFS=$as_save_IFS
18285  test -z "$as_dir" && as_dir=.
18286    for ac_exec_ext in '' $ac_executable_extensions; do
18287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18288    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18290    break 2
18291  fi
18292done
18293  done
18294IFS=$as_save_IFS
18295
18296  ;;
18297esac
18298fi
18299HG=$ac_cv_path_HG
18300if test -n "$HG"; then
18301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18302$as_echo "$HG" >&6; }
18303else
18304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18305$as_echo "no" >&6; }
18306fi
18307
18308
18309  test -n "$HG" && break
18310done
18311
18312  else
18313    # The variable is set, but is it from the command line or the environment?
18314
18315    # Try to remove the string !HG! from our list.
18316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18318      # If it failed, the variable was not from the command line. Ignore it,
18319      # but warn the user (except for BASH, which is always set by the calling BASH).
18320      if test "xHG" != xBASH; then
18321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18322$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18323      fi
18324      # Try to locate tool using the code snippet
18325      for ac_prog in hg
18326do
18327  # Extract the first word of "$ac_prog", so it can be a program name with args.
18328set dummy $ac_prog; ac_word=$2
18329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18330$as_echo_n "checking for $ac_word... " >&6; }
18331if ${ac_cv_path_HG+:} false; then :
18332  $as_echo_n "(cached) " >&6
18333else
18334  case $HG in
18335  [\\/]* | ?:[\\/]*)
18336  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18337  ;;
18338  *)
18339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18340for as_dir in $PATH
18341do
18342  IFS=$as_save_IFS
18343  test -z "$as_dir" && as_dir=.
18344    for ac_exec_ext in '' $ac_executable_extensions; do
18345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18346    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18348    break 2
18349  fi
18350done
18351  done
18352IFS=$as_save_IFS
18353
18354  ;;
18355esac
18356fi
18357HG=$ac_cv_path_HG
18358if test -n "$HG"; then
18359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18360$as_echo "$HG" >&6; }
18361else
18362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18363$as_echo "no" >&6; }
18364fi
18365
18366
18367  test -n "$HG" && break
18368done
18369
18370    else
18371      # If it succeeded, then it was overridden by the user. We will use it
18372      # for the tool.
18373
18374      # First remove it from the list of overridden variables, so we can test
18375      # for unknown variables in the end.
18376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18377
18378      # Check if the provided tool contains a complete path.
18379      tool_specified="$HG"
18380      tool_basename="${tool_specified##*/}"
18381      if test "x$tool_basename" = "x$tool_specified"; then
18382        # A command without a complete path is provided, search $PATH.
18383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18384$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18385        # Extract the first word of "$tool_basename", so it can be a program name with args.
18386set dummy $tool_basename; ac_word=$2
18387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18388$as_echo_n "checking for $ac_word... " >&6; }
18389if ${ac_cv_path_HG+:} false; then :
18390  $as_echo_n "(cached) " >&6
18391else
18392  case $HG in
18393  [\\/]* | ?:[\\/]*)
18394  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18395  ;;
18396  *)
18397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18398for as_dir in $PATH
18399do
18400  IFS=$as_save_IFS
18401  test -z "$as_dir" && as_dir=.
18402    for ac_exec_ext in '' $ac_executable_extensions; do
18403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18404    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18406    break 2
18407  fi
18408done
18409  done
18410IFS=$as_save_IFS
18411
18412  ;;
18413esac
18414fi
18415HG=$ac_cv_path_HG
18416if test -n "$HG"; then
18417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18418$as_echo "$HG" >&6; }
18419else
18420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18421$as_echo "no" >&6; }
18422fi
18423
18424
18425        if test "x$HG" = x; then
18426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18427        fi
18428      else
18429        # Otherwise we believe it is a complete path. Use it as it is.
18430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18431$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18433$as_echo_n "checking for HG... " >&6; }
18434        if test ! -x "$tool_specified"; then
18435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18436$as_echo "not found" >&6; }
18437          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18438        fi
18439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18440$as_echo "$tool_specified" >&6; }
18441      fi
18442    fi
18443  fi
18444
18445
18446
18447
18448  # Publish this variable in the help.
18449
18450
18451  if test "x$STAT" = x; then
18452    # The variable is not set by user, try to locate tool using the code snippet
18453    for ac_prog in stat
18454do
18455  # Extract the first word of "$ac_prog", so it can be a program name with args.
18456set dummy $ac_prog; ac_word=$2
18457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18458$as_echo_n "checking for $ac_word... " >&6; }
18459if ${ac_cv_path_STAT+:} false; then :
18460  $as_echo_n "(cached) " >&6
18461else
18462  case $STAT in
18463  [\\/]* | ?:[\\/]*)
18464  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18465  ;;
18466  *)
18467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18468for as_dir in $PATH
18469do
18470  IFS=$as_save_IFS
18471  test -z "$as_dir" && as_dir=.
18472    for ac_exec_ext in '' $ac_executable_extensions; do
18473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18474    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18476    break 2
18477  fi
18478done
18479  done
18480IFS=$as_save_IFS
18481
18482  ;;
18483esac
18484fi
18485STAT=$ac_cv_path_STAT
18486if test -n "$STAT"; then
18487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18488$as_echo "$STAT" >&6; }
18489else
18490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18491$as_echo "no" >&6; }
18492fi
18493
18494
18495  test -n "$STAT" && break
18496done
18497
18498  else
18499    # The variable is set, but is it from the command line or the environment?
18500
18501    # Try to remove the string !STAT! from our list.
18502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18504      # If it failed, the variable was not from the command line. Ignore it,
18505      # but warn the user (except for BASH, which is always set by the calling BASH).
18506      if test "xSTAT" != xBASH; then
18507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18508$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18509      fi
18510      # Try to locate tool using the code snippet
18511      for ac_prog in stat
18512do
18513  # Extract the first word of "$ac_prog", so it can be a program name with args.
18514set dummy $ac_prog; ac_word=$2
18515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18516$as_echo_n "checking for $ac_word... " >&6; }
18517if ${ac_cv_path_STAT+:} false; then :
18518  $as_echo_n "(cached) " >&6
18519else
18520  case $STAT in
18521  [\\/]* | ?:[\\/]*)
18522  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18523  ;;
18524  *)
18525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18526for as_dir in $PATH
18527do
18528  IFS=$as_save_IFS
18529  test -z "$as_dir" && as_dir=.
18530    for ac_exec_ext in '' $ac_executable_extensions; do
18531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18532    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18534    break 2
18535  fi
18536done
18537  done
18538IFS=$as_save_IFS
18539
18540  ;;
18541esac
18542fi
18543STAT=$ac_cv_path_STAT
18544if test -n "$STAT"; then
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18546$as_echo "$STAT" >&6; }
18547else
18548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18549$as_echo "no" >&6; }
18550fi
18551
18552
18553  test -n "$STAT" && break
18554done
18555
18556    else
18557      # If it succeeded, then it was overridden by the user. We will use it
18558      # for the tool.
18559
18560      # First remove it from the list of overridden variables, so we can test
18561      # for unknown variables in the end.
18562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18563
18564      # Check if the provided tool contains a complete path.
18565      tool_specified="$STAT"
18566      tool_basename="${tool_specified##*/}"
18567      if test "x$tool_basename" = "x$tool_specified"; then
18568        # A command without a complete path is provided, search $PATH.
18569        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18570$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18571        # Extract the first word of "$tool_basename", so it can be a program name with args.
18572set dummy $tool_basename; ac_word=$2
18573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18574$as_echo_n "checking for $ac_word... " >&6; }
18575if ${ac_cv_path_STAT+:} false; then :
18576  $as_echo_n "(cached) " >&6
18577else
18578  case $STAT in
18579  [\\/]* | ?:[\\/]*)
18580  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18581  ;;
18582  *)
18583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18584for as_dir in $PATH
18585do
18586  IFS=$as_save_IFS
18587  test -z "$as_dir" && as_dir=.
18588    for ac_exec_ext in '' $ac_executable_extensions; do
18589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18590    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18592    break 2
18593  fi
18594done
18595  done
18596IFS=$as_save_IFS
18597
18598  ;;
18599esac
18600fi
18601STAT=$ac_cv_path_STAT
18602if test -n "$STAT"; then
18603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18604$as_echo "$STAT" >&6; }
18605else
18606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18607$as_echo "no" >&6; }
18608fi
18609
18610
18611        if test "x$STAT" = x; then
18612          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18613        fi
18614      else
18615        # Otherwise we believe it is a complete path. Use it as it is.
18616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18617$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18619$as_echo_n "checking for STAT... " >&6; }
18620        if test ! -x "$tool_specified"; then
18621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18622$as_echo "not found" >&6; }
18623          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18624        fi
18625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18626$as_echo "$tool_specified" >&6; }
18627      fi
18628    fi
18629  fi
18630
18631
18632
18633
18634  # Publish this variable in the help.
18635
18636
18637  if test "x$TIME" = x; then
18638    # The variable is not set by user, try to locate tool using the code snippet
18639    for ac_prog in time
18640do
18641  # Extract the first word of "$ac_prog", so it can be a program name with args.
18642set dummy $ac_prog; ac_word=$2
18643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18644$as_echo_n "checking for $ac_word... " >&6; }
18645if ${ac_cv_path_TIME+:} false; then :
18646  $as_echo_n "(cached) " >&6
18647else
18648  case $TIME in
18649  [\\/]* | ?:[\\/]*)
18650  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18651  ;;
18652  *)
18653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654for as_dir in $PATH
18655do
18656  IFS=$as_save_IFS
18657  test -z "$as_dir" && as_dir=.
18658    for ac_exec_ext in '' $ac_executable_extensions; do
18659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18660    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662    break 2
18663  fi
18664done
18665  done
18666IFS=$as_save_IFS
18667
18668  ;;
18669esac
18670fi
18671TIME=$ac_cv_path_TIME
18672if test -n "$TIME"; then
18673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18674$as_echo "$TIME" >&6; }
18675else
18676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677$as_echo "no" >&6; }
18678fi
18679
18680
18681  test -n "$TIME" && break
18682done
18683
18684  else
18685    # The variable is set, but is it from the command line or the environment?
18686
18687    # Try to remove the string !TIME! from our list.
18688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18690      # If it failed, the variable was not from the command line. Ignore it,
18691      # but warn the user (except for BASH, which is always set by the calling BASH).
18692      if test "xTIME" != xBASH; then
18693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18694$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18695      fi
18696      # Try to locate tool using the code snippet
18697      for ac_prog in time
18698do
18699  # Extract the first word of "$ac_prog", so it can be a program name with args.
18700set dummy $ac_prog; ac_word=$2
18701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18702$as_echo_n "checking for $ac_word... " >&6; }
18703if ${ac_cv_path_TIME+:} false; then :
18704  $as_echo_n "(cached) " >&6
18705else
18706  case $TIME in
18707  [\\/]* | ?:[\\/]*)
18708  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18709  ;;
18710  *)
18711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18712for as_dir in $PATH
18713do
18714  IFS=$as_save_IFS
18715  test -z "$as_dir" && as_dir=.
18716    for ac_exec_ext in '' $ac_executable_extensions; do
18717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18718    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18720    break 2
18721  fi
18722done
18723  done
18724IFS=$as_save_IFS
18725
18726  ;;
18727esac
18728fi
18729TIME=$ac_cv_path_TIME
18730if test -n "$TIME"; then
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18732$as_echo "$TIME" >&6; }
18733else
18734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735$as_echo "no" >&6; }
18736fi
18737
18738
18739  test -n "$TIME" && break
18740done
18741
18742    else
18743      # If it succeeded, then it was overridden by the user. We will use it
18744      # for the tool.
18745
18746      # First remove it from the list of overridden variables, so we can test
18747      # for unknown variables in the end.
18748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18749
18750      # Check if the provided tool contains a complete path.
18751      tool_specified="$TIME"
18752      tool_basename="${tool_specified##*/}"
18753      if test "x$tool_basename" = "x$tool_specified"; then
18754        # A command without a complete path is provided, search $PATH.
18755        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18756$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18757        # Extract the first word of "$tool_basename", so it can be a program name with args.
18758set dummy $tool_basename; ac_word=$2
18759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18760$as_echo_n "checking for $ac_word... " >&6; }
18761if ${ac_cv_path_TIME+:} false; then :
18762  $as_echo_n "(cached) " >&6
18763else
18764  case $TIME in
18765  [\\/]* | ?:[\\/]*)
18766  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18767  ;;
18768  *)
18769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18770for as_dir in $PATH
18771do
18772  IFS=$as_save_IFS
18773  test -z "$as_dir" && as_dir=.
18774    for ac_exec_ext in '' $ac_executable_extensions; do
18775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18776    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18778    break 2
18779  fi
18780done
18781  done
18782IFS=$as_save_IFS
18783
18784  ;;
18785esac
18786fi
18787TIME=$ac_cv_path_TIME
18788if test -n "$TIME"; then
18789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18790$as_echo "$TIME" >&6; }
18791else
18792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18793$as_echo "no" >&6; }
18794fi
18795
18796
18797        if test "x$TIME" = x; then
18798          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18799        fi
18800      else
18801        # Otherwise we believe it is a complete path. Use it as it is.
18802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18803$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18805$as_echo_n "checking for TIME... " >&6; }
18806        if test ! -x "$tool_specified"; then
18807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18808$as_echo "not found" >&6; }
18809          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18810        fi
18811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18812$as_echo "$tool_specified" >&6; }
18813      fi
18814    fi
18815  fi
18816
18817
18818  # Check if it's GNU time
18819  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18820  if test "x$IS_GNU_TIME" != x; then
18821    IS_GNU_TIME=yes
18822  else
18823    IS_GNU_TIME=no
18824  fi
18825
18826
18827  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18828
18829
18830
18831  # Publish this variable in the help.
18832
18833
18834  if test "x$COMM" = x; then
18835    # The variable is not set by user, try to locate tool using the code snippet
18836    for ac_prog in comm
18837do
18838  # Extract the first word of "$ac_prog", so it can be a program name with args.
18839set dummy $ac_prog; ac_word=$2
18840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18841$as_echo_n "checking for $ac_word... " >&6; }
18842if ${ac_cv_path_COMM+:} false; then :
18843  $as_echo_n "(cached) " >&6
18844else
18845  case $COMM in
18846  [\\/]* | ?:[\\/]*)
18847  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18848  ;;
18849  *)
18850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18851for as_dir in $PATH
18852do
18853  IFS=$as_save_IFS
18854  test -z "$as_dir" && as_dir=.
18855    for ac_exec_ext in '' $ac_executable_extensions; do
18856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18857    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18859    break 2
18860  fi
18861done
18862  done
18863IFS=$as_save_IFS
18864
18865  ;;
18866esac
18867fi
18868COMM=$ac_cv_path_COMM
18869if test -n "$COMM"; then
18870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18871$as_echo "$COMM" >&6; }
18872else
18873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18874$as_echo "no" >&6; }
18875fi
18876
18877
18878  test -n "$COMM" && break
18879done
18880
18881  else
18882    # The variable is set, but is it from the command line or the environment?
18883
18884    # Try to remove the string !COMM! from our list.
18885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18887      # If it failed, the variable was not from the command line. Ignore it,
18888      # but warn the user (except for BASH, which is always set by the calling BASH).
18889      if test "xCOMM" != xBASH; then
18890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18891$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18892      fi
18893      # Try to locate tool using the code snippet
18894      for ac_prog in comm
18895do
18896  # Extract the first word of "$ac_prog", so it can be a program name with args.
18897set dummy $ac_prog; ac_word=$2
18898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18899$as_echo_n "checking for $ac_word... " >&6; }
18900if ${ac_cv_path_COMM+:} false; then :
18901  $as_echo_n "(cached) " >&6
18902else
18903  case $COMM in
18904  [\\/]* | ?:[\\/]*)
18905  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18906  ;;
18907  *)
18908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18909for as_dir in $PATH
18910do
18911  IFS=$as_save_IFS
18912  test -z "$as_dir" && as_dir=.
18913    for ac_exec_ext in '' $ac_executable_extensions; do
18914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18915    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18917    break 2
18918  fi
18919done
18920  done
18921IFS=$as_save_IFS
18922
18923  ;;
18924esac
18925fi
18926COMM=$ac_cv_path_COMM
18927if test -n "$COMM"; then
18928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18929$as_echo "$COMM" >&6; }
18930else
18931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18932$as_echo "no" >&6; }
18933fi
18934
18935
18936  test -n "$COMM" && break
18937done
18938
18939    else
18940      # If it succeeded, then it was overridden by the user. We will use it
18941      # for the tool.
18942
18943      # First remove it from the list of overridden variables, so we can test
18944      # for unknown variables in the end.
18945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18946
18947      # Check if the provided tool contains a complete path.
18948      tool_specified="$COMM"
18949      tool_basename="${tool_specified##*/}"
18950      if test "x$tool_basename" = "x$tool_specified"; then
18951        # A command without a complete path is provided, search $PATH.
18952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18953$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18954        # Extract the first word of "$tool_basename", so it can be a program name with args.
18955set dummy $tool_basename; ac_word=$2
18956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18957$as_echo_n "checking for $ac_word... " >&6; }
18958if ${ac_cv_path_COMM+:} false; then :
18959  $as_echo_n "(cached) " >&6
18960else
18961  case $COMM in
18962  [\\/]* | ?:[\\/]*)
18963  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18964  ;;
18965  *)
18966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18967for as_dir in $PATH
18968do
18969  IFS=$as_save_IFS
18970  test -z "$as_dir" && as_dir=.
18971    for ac_exec_ext in '' $ac_executable_extensions; do
18972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18973    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18975    break 2
18976  fi
18977done
18978  done
18979IFS=$as_save_IFS
18980
18981  ;;
18982esac
18983fi
18984COMM=$ac_cv_path_COMM
18985if test -n "$COMM"; then
18986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18987$as_echo "$COMM" >&6; }
18988else
18989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18990$as_echo "no" >&6; }
18991fi
18992
18993
18994        if test "x$COMM" = x; then
18995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18996        fi
18997      else
18998        # Otherwise we believe it is a complete path. Use it as it is.
18999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19000$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19002$as_echo_n "checking for COMM... " >&6; }
19003        if test ! -x "$tool_specified"; then
19004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19005$as_echo "not found" >&6; }
19006          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19007        fi
19008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19009$as_echo "$tool_specified" >&6; }
19010      fi
19011    fi
19012  fi
19013
19014
19015
19016  if test "x$COMM" = x; then
19017    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19018  fi
19019
19020
19021  fi
19022
19023  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19024
19025
19026
19027  # Publish this variable in the help.
19028
19029
19030  if test "x$DSYMUTIL" = x; then
19031    # The variable is not set by user, try to locate tool using the code snippet
19032    for ac_prog in dsymutil
19033do
19034  # Extract the first word of "$ac_prog", so it can be a program name with args.
19035set dummy $ac_prog; ac_word=$2
19036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19037$as_echo_n "checking for $ac_word... " >&6; }
19038if ${ac_cv_path_DSYMUTIL+:} false; then :
19039  $as_echo_n "(cached) " >&6
19040else
19041  case $DSYMUTIL in
19042  [\\/]* | ?:[\\/]*)
19043  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19044  ;;
19045  *)
19046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19047for as_dir in $PATH
19048do
19049  IFS=$as_save_IFS
19050  test -z "$as_dir" && as_dir=.
19051    for ac_exec_ext in '' $ac_executable_extensions; do
19052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19053    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19055    break 2
19056  fi
19057done
19058  done
19059IFS=$as_save_IFS
19060
19061  ;;
19062esac
19063fi
19064DSYMUTIL=$ac_cv_path_DSYMUTIL
19065if test -n "$DSYMUTIL"; then
19066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19067$as_echo "$DSYMUTIL" >&6; }
19068else
19069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19070$as_echo "no" >&6; }
19071fi
19072
19073
19074  test -n "$DSYMUTIL" && break
19075done
19076
19077  else
19078    # The variable is set, but is it from the command line or the environment?
19079
19080    # Try to remove the string !DSYMUTIL! from our list.
19081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19083      # If it failed, the variable was not from the command line. Ignore it,
19084      # but warn the user (except for BASH, which is always set by the calling BASH).
19085      if test "xDSYMUTIL" != xBASH; then
19086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19087$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19088      fi
19089      # Try to locate tool using the code snippet
19090      for ac_prog in dsymutil
19091do
19092  # Extract the first word of "$ac_prog", so it can be a program name with args.
19093set dummy $ac_prog; ac_word=$2
19094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19095$as_echo_n "checking for $ac_word... " >&6; }
19096if ${ac_cv_path_DSYMUTIL+:} false; then :
19097  $as_echo_n "(cached) " >&6
19098else
19099  case $DSYMUTIL in
19100  [\\/]* | ?:[\\/]*)
19101  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19102  ;;
19103  *)
19104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19105for as_dir in $PATH
19106do
19107  IFS=$as_save_IFS
19108  test -z "$as_dir" && as_dir=.
19109    for ac_exec_ext in '' $ac_executable_extensions; do
19110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19111    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19113    break 2
19114  fi
19115done
19116  done
19117IFS=$as_save_IFS
19118
19119  ;;
19120esac
19121fi
19122DSYMUTIL=$ac_cv_path_DSYMUTIL
19123if test -n "$DSYMUTIL"; then
19124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19125$as_echo "$DSYMUTIL" >&6; }
19126else
19127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19128$as_echo "no" >&6; }
19129fi
19130
19131
19132  test -n "$DSYMUTIL" && break
19133done
19134
19135    else
19136      # If it succeeded, then it was overridden by the user. We will use it
19137      # for the tool.
19138
19139      # First remove it from the list of overridden variables, so we can test
19140      # for unknown variables in the end.
19141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19142
19143      # Check if the provided tool contains a complete path.
19144      tool_specified="$DSYMUTIL"
19145      tool_basename="${tool_specified##*/}"
19146      if test "x$tool_basename" = "x$tool_specified"; then
19147        # A command without a complete path is provided, search $PATH.
19148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19149$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19150        # Extract the first word of "$tool_basename", so it can be a program name with args.
19151set dummy $tool_basename; ac_word=$2
19152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19153$as_echo_n "checking for $ac_word... " >&6; }
19154if ${ac_cv_path_DSYMUTIL+:} false; then :
19155  $as_echo_n "(cached) " >&6
19156else
19157  case $DSYMUTIL in
19158  [\\/]* | ?:[\\/]*)
19159  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19160  ;;
19161  *)
19162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19163for as_dir in $PATH
19164do
19165  IFS=$as_save_IFS
19166  test -z "$as_dir" && as_dir=.
19167    for ac_exec_ext in '' $ac_executable_extensions; do
19168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19169    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19171    break 2
19172  fi
19173done
19174  done
19175IFS=$as_save_IFS
19176
19177  ;;
19178esac
19179fi
19180DSYMUTIL=$ac_cv_path_DSYMUTIL
19181if test -n "$DSYMUTIL"; then
19182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19183$as_echo "$DSYMUTIL" >&6; }
19184else
19185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19186$as_echo "no" >&6; }
19187fi
19188
19189
19190        if test "x$DSYMUTIL" = x; then
19191          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19192        fi
19193      else
19194        # Otherwise we believe it is a complete path. Use it as it is.
19195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19196$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19198$as_echo_n "checking for DSYMUTIL... " >&6; }
19199        if test ! -x "$tool_specified"; then
19200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19201$as_echo "not found" >&6; }
19202          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19203        fi
19204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19205$as_echo "$tool_specified" >&6; }
19206      fi
19207    fi
19208  fi
19209
19210
19211
19212  if test "x$DSYMUTIL" = x; then
19213    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19214  fi
19215
19216
19217
19218
19219
19220  # Publish this variable in the help.
19221
19222
19223  if test "x$XATTR" = x; then
19224    # The variable is not set by user, try to locate tool using the code snippet
19225    for ac_prog in xattr
19226do
19227  # Extract the first word of "$ac_prog", so it can be a program name with args.
19228set dummy $ac_prog; ac_word=$2
19229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19230$as_echo_n "checking for $ac_word... " >&6; }
19231if ${ac_cv_path_XATTR+:} false; then :
19232  $as_echo_n "(cached) " >&6
19233else
19234  case $XATTR in
19235  [\\/]* | ?:[\\/]*)
19236  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19237  ;;
19238  *)
19239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19240for as_dir in $PATH
19241do
19242  IFS=$as_save_IFS
19243  test -z "$as_dir" && as_dir=.
19244    for ac_exec_ext in '' $ac_executable_extensions; do
19245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19246    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19248    break 2
19249  fi
19250done
19251  done
19252IFS=$as_save_IFS
19253
19254  ;;
19255esac
19256fi
19257XATTR=$ac_cv_path_XATTR
19258if test -n "$XATTR"; then
19259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19260$as_echo "$XATTR" >&6; }
19261else
19262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19263$as_echo "no" >&6; }
19264fi
19265
19266
19267  test -n "$XATTR" && break
19268done
19269
19270  else
19271    # The variable is set, but is it from the command line or the environment?
19272
19273    # Try to remove the string !XATTR! from our list.
19274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19276      # If it failed, the variable was not from the command line. Ignore it,
19277      # but warn the user (except for BASH, which is always set by the calling BASH).
19278      if test "xXATTR" != xBASH; then
19279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19280$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19281      fi
19282      # Try to locate tool using the code snippet
19283      for ac_prog in xattr
19284do
19285  # Extract the first word of "$ac_prog", so it can be a program name with args.
19286set dummy $ac_prog; ac_word=$2
19287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19288$as_echo_n "checking for $ac_word... " >&6; }
19289if ${ac_cv_path_XATTR+:} false; then :
19290  $as_echo_n "(cached) " >&6
19291else
19292  case $XATTR in
19293  [\\/]* | ?:[\\/]*)
19294  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19295  ;;
19296  *)
19297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19298for as_dir in $PATH
19299do
19300  IFS=$as_save_IFS
19301  test -z "$as_dir" && as_dir=.
19302    for ac_exec_ext in '' $ac_executable_extensions; do
19303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19304    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19306    break 2
19307  fi
19308done
19309  done
19310IFS=$as_save_IFS
19311
19312  ;;
19313esac
19314fi
19315XATTR=$ac_cv_path_XATTR
19316if test -n "$XATTR"; then
19317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19318$as_echo "$XATTR" >&6; }
19319else
19320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19321$as_echo "no" >&6; }
19322fi
19323
19324
19325  test -n "$XATTR" && break
19326done
19327
19328    else
19329      # If it succeeded, then it was overridden by the user. We will use it
19330      # for the tool.
19331
19332      # First remove it from the list of overridden variables, so we can test
19333      # for unknown variables in the end.
19334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19335
19336      # Check if the provided tool contains a complete path.
19337      tool_specified="$XATTR"
19338      tool_basename="${tool_specified##*/}"
19339      if test "x$tool_basename" = "x$tool_specified"; then
19340        # A command without a complete path is provided, search $PATH.
19341        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19342$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19343        # Extract the first word of "$tool_basename", so it can be a program name with args.
19344set dummy $tool_basename; ac_word=$2
19345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19346$as_echo_n "checking for $ac_word... " >&6; }
19347if ${ac_cv_path_XATTR+:} false; then :
19348  $as_echo_n "(cached) " >&6
19349else
19350  case $XATTR in
19351  [\\/]* | ?:[\\/]*)
19352  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19353  ;;
19354  *)
19355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19356for as_dir in $PATH
19357do
19358  IFS=$as_save_IFS
19359  test -z "$as_dir" && as_dir=.
19360    for ac_exec_ext in '' $ac_executable_extensions; do
19361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19362    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19364    break 2
19365  fi
19366done
19367  done
19368IFS=$as_save_IFS
19369
19370  ;;
19371esac
19372fi
19373XATTR=$ac_cv_path_XATTR
19374if test -n "$XATTR"; then
19375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19376$as_echo "$XATTR" >&6; }
19377else
19378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19379$as_echo "no" >&6; }
19380fi
19381
19382
19383        if test "x$XATTR" = x; then
19384          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19385        fi
19386      else
19387        # Otherwise we believe it is a complete path. Use it as it is.
19388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19389$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19391$as_echo_n "checking for XATTR... " >&6; }
19392        if test ! -x "$tool_specified"; then
19393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19394$as_echo "not found" >&6; }
19395          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19396        fi
19397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19398$as_echo "$tool_specified" >&6; }
19399      fi
19400    fi
19401  fi
19402
19403
19404
19405  if test "x$XATTR" = x; then
19406    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19407  fi
19408
19409
19410
19411
19412  # Publish this variable in the help.
19413
19414
19415  if test "x$CODESIGN" = x; then
19416    # The variable is not set by user, try to locate tool using the code snippet
19417    for ac_prog in codesign
19418do
19419  # Extract the first word of "$ac_prog", so it can be a program name with args.
19420set dummy $ac_prog; ac_word=$2
19421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19422$as_echo_n "checking for $ac_word... " >&6; }
19423if ${ac_cv_path_CODESIGN+:} false; then :
19424  $as_echo_n "(cached) " >&6
19425else
19426  case $CODESIGN in
19427  [\\/]* | ?:[\\/]*)
19428  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19429  ;;
19430  *)
19431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19432for as_dir in $PATH
19433do
19434  IFS=$as_save_IFS
19435  test -z "$as_dir" && as_dir=.
19436    for ac_exec_ext in '' $ac_executable_extensions; do
19437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19438    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19440    break 2
19441  fi
19442done
19443  done
19444IFS=$as_save_IFS
19445
19446  ;;
19447esac
19448fi
19449CODESIGN=$ac_cv_path_CODESIGN
19450if test -n "$CODESIGN"; then
19451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19452$as_echo "$CODESIGN" >&6; }
19453else
19454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19455$as_echo "no" >&6; }
19456fi
19457
19458
19459  test -n "$CODESIGN" && break
19460done
19461
19462  else
19463    # The variable is set, but is it from the command line or the environment?
19464
19465    # Try to remove the string !CODESIGN! from our list.
19466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19468      # If it failed, the variable was not from the command line. Ignore it,
19469      # but warn the user (except for BASH, which is always set by the calling BASH).
19470      if test "xCODESIGN" != xBASH; then
19471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19472$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19473      fi
19474      # Try to locate tool using the code snippet
19475      for ac_prog in codesign
19476do
19477  # Extract the first word of "$ac_prog", so it can be a program name with args.
19478set dummy $ac_prog; ac_word=$2
19479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19480$as_echo_n "checking for $ac_word... " >&6; }
19481if ${ac_cv_path_CODESIGN+:} false; then :
19482  $as_echo_n "(cached) " >&6
19483else
19484  case $CODESIGN in
19485  [\\/]* | ?:[\\/]*)
19486  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19487  ;;
19488  *)
19489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19490for as_dir in $PATH
19491do
19492  IFS=$as_save_IFS
19493  test -z "$as_dir" && as_dir=.
19494    for ac_exec_ext in '' $ac_executable_extensions; do
19495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19496    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19498    break 2
19499  fi
19500done
19501  done
19502IFS=$as_save_IFS
19503
19504  ;;
19505esac
19506fi
19507CODESIGN=$ac_cv_path_CODESIGN
19508if test -n "$CODESIGN"; then
19509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19510$as_echo "$CODESIGN" >&6; }
19511else
19512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19513$as_echo "no" >&6; }
19514fi
19515
19516
19517  test -n "$CODESIGN" && break
19518done
19519
19520    else
19521      # If it succeeded, then it was overridden by the user. We will use it
19522      # for the tool.
19523
19524      # First remove it from the list of overridden variables, so we can test
19525      # for unknown variables in the end.
19526      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19527
19528      # Check if the provided tool contains a complete path.
19529      tool_specified="$CODESIGN"
19530      tool_basename="${tool_specified##*/}"
19531      if test "x$tool_basename" = "x$tool_specified"; then
19532        # A command without a complete path is provided, search $PATH.
19533        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19534$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19535        # Extract the first word of "$tool_basename", so it can be a program name with args.
19536set dummy $tool_basename; ac_word=$2
19537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19538$as_echo_n "checking for $ac_word... " >&6; }
19539if ${ac_cv_path_CODESIGN+:} false; then :
19540  $as_echo_n "(cached) " >&6
19541else
19542  case $CODESIGN in
19543  [\\/]* | ?:[\\/]*)
19544  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19545  ;;
19546  *)
19547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19548for as_dir in $PATH
19549do
19550  IFS=$as_save_IFS
19551  test -z "$as_dir" && as_dir=.
19552    for ac_exec_ext in '' $ac_executable_extensions; do
19553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19554    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19556    break 2
19557  fi
19558done
19559  done
19560IFS=$as_save_IFS
19561
19562  ;;
19563esac
19564fi
19565CODESIGN=$ac_cv_path_CODESIGN
19566if test -n "$CODESIGN"; then
19567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19568$as_echo "$CODESIGN" >&6; }
19569else
19570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19571$as_echo "no" >&6; }
19572fi
19573
19574
19575        if test "x$CODESIGN" = x; then
19576          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19577        fi
19578      else
19579        # Otherwise we believe it is a complete path. Use it as it is.
19580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19581$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19583$as_echo_n "checking for CODESIGN... " >&6; }
19584        if test ! -x "$tool_specified"; then
19585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19586$as_echo "not found" >&6; }
19587          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19588        fi
19589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19590$as_echo "$tool_specified" >&6; }
19591      fi
19592    fi
19593  fi
19594
19595
19596    if test "x$CODESIGN" != "x"; then
19597      # Verify that the openjdk_codesign certificate is present
19598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19599$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19600      rm -f codesign-testfile
19601      touch codesign-testfile
19602      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19603      rm -f codesign-testfile
19604      if test "x$CODESIGN" = x; then
19605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19606$as_echo "no" >&6; }
19607      else
19608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19609$as_echo "yes" >&6; }
19610      fi
19611    fi
19612  fi
19613
19614
19615# Check if pkg-config is available.
19616
19617
19618if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19619	if test -n "$ac_tool_prefix"; then
19620  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19621set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19623$as_echo_n "checking for $ac_word... " >&6; }
19624if ${ac_cv_path_PKG_CONFIG+:} false; then :
19625  $as_echo_n "(cached) " >&6
19626else
19627  case $PKG_CONFIG in
19628  [\\/]* | ?:[\\/]*)
19629  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19630  ;;
19631  *)
19632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19633for as_dir in $PATH
19634do
19635  IFS=$as_save_IFS
19636  test -z "$as_dir" && as_dir=.
19637    for ac_exec_ext in '' $ac_executable_extensions; do
19638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19639    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19641    break 2
19642  fi
19643done
19644  done
19645IFS=$as_save_IFS
19646
19647  ;;
19648esac
19649fi
19650PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19651if test -n "$PKG_CONFIG"; then
19652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19653$as_echo "$PKG_CONFIG" >&6; }
19654else
19655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19656$as_echo "no" >&6; }
19657fi
19658
19659
19660fi
19661if test -z "$ac_cv_path_PKG_CONFIG"; then
19662  ac_pt_PKG_CONFIG=$PKG_CONFIG
19663  # Extract the first word of "pkg-config", so it can be a program name with args.
19664set dummy pkg-config; ac_word=$2
19665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19666$as_echo_n "checking for $ac_word... " >&6; }
19667if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19668  $as_echo_n "(cached) " >&6
19669else
19670  case $ac_pt_PKG_CONFIG in
19671  [\\/]* | ?:[\\/]*)
19672  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19673  ;;
19674  *)
19675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19676for as_dir in $PATH
19677do
19678  IFS=$as_save_IFS
19679  test -z "$as_dir" && as_dir=.
19680    for ac_exec_ext in '' $ac_executable_extensions; do
19681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19682    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19684    break 2
19685  fi
19686done
19687  done
19688IFS=$as_save_IFS
19689
19690  ;;
19691esac
19692fi
19693ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19694if test -n "$ac_pt_PKG_CONFIG"; then
19695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19696$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19697else
19698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19699$as_echo "no" >&6; }
19700fi
19701
19702  if test "x$ac_pt_PKG_CONFIG" = x; then
19703    PKG_CONFIG=""
19704  else
19705    case $cross_compiling:$ac_tool_warned in
19706yes:)
19707{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19708$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19709ac_tool_warned=yes ;;
19710esac
19711    PKG_CONFIG=$ac_pt_PKG_CONFIG
19712  fi
19713else
19714  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19715fi
19716
19717fi
19718if test -n "$PKG_CONFIG"; then
19719	_pkg_min_version=0.9.0
19720	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19721$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19722	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19723		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19724$as_echo "yes" >&6; }
19725	else
19726		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19727$as_echo "no" >&6; }
19728		PKG_CONFIG=""
19729	fi
19730
19731fi
19732
19733# After basic tools have been setup, we can check build os specific details.
19734
19735  ###############################################################################
19736
19737  # Note that this is the build platform OS version!
19738
19739  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19740  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19741  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19742  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19743
19744
19745
19746
19747
19748# Setup builddeps, for automatic downloading of tools we need.
19749# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19750# boot-jdk setup, but we need to have basic tools setup first.
19751
19752
19753# Check whether --with-builddeps-conf was given.
19754if test "${with_builddeps_conf+set}" = set; then :
19755  withval=$with_builddeps_conf;
19756fi
19757
19758
19759
19760# Check whether --with-builddeps-server was given.
19761if test "${with_builddeps_server+set}" = set; then :
19762  withval=$with_builddeps_server;
19763fi
19764
19765
19766
19767# Check whether --with-builddeps-dir was given.
19768if test "${with_builddeps_dir+set}" = set; then :
19769  withval=$with_builddeps_dir;
19770else
19771  with_builddeps_dir=/localhome/builddeps
19772fi
19773
19774
19775
19776# Check whether --with-builddeps-group was given.
19777if test "${with_builddeps_group+set}" = set; then :
19778  withval=$with_builddeps_group;
19779fi
19780
19781
19782
19783
19784  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19785    if test "x$with_builddeps_conf" != x; then
19786      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19787$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19788      builddepsfile=$with_builddeps_conf
19789      if test -s $builddepsfile; then
19790        . $builddepsfile
19791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19792$as_echo "loaded!" >&6; }
19793      else
19794        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19795      fi
19796    else
19797      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19798$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19799      builddepsfile=`mktemp`
19800      touch $builddepsfile
19801      # Put all found confs into a single file.
19802      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19803      # Source the file to acquire the variables
19804      if test -s $builddepsfile; then
19805        . $builddepsfile
19806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19807$as_echo "found at least one!" >&6; }
19808      else
19809        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19810      fi
19811    fi
19812    # Create build and target names that use _ instead of "-" and ".".
19813    # This is necessary to use them in variable names.
19814    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19815    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19816    # Extract rewrite information for build and target
19817    eval rewritten_build=\${REWRITE_${build_var}}
19818    if test "x$rewritten_build" = x; then
19819      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19820      echo Build stays the same $rewritten_build
19821    else
19822      echo Rewriting build for builddeps into $rewritten_build
19823    fi
19824    eval rewritten_target=\${REWRITE_${target_var}}
19825    if test "x$rewritten_target" = x; then
19826      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19827      echo Target stays the same $rewritten_target
19828    else
19829      echo Rewriting target for builddeps into $rewritten_target
19830    fi
19831    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19832    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19833  fi
19834  for ac_prog in 7z unzip
19835do
19836  # Extract the first word of "$ac_prog", so it can be a program name with args.
19837set dummy $ac_prog; ac_word=$2
19838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19839$as_echo_n "checking for $ac_word... " >&6; }
19840if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19841  $as_echo_n "(cached) " >&6
19842else
19843  if test -n "$BDEPS_UNZIP"; then
19844  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19845else
19846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19847for as_dir in $PATH
19848do
19849  IFS=$as_save_IFS
19850  test -z "$as_dir" && as_dir=.
19851    for ac_exec_ext in '' $ac_executable_extensions; do
19852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19853    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19855    break 2
19856  fi
19857done
19858  done
19859IFS=$as_save_IFS
19860
19861fi
19862fi
19863BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19864if test -n "$BDEPS_UNZIP"; then
19865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19866$as_echo "$BDEPS_UNZIP" >&6; }
19867else
19868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19869$as_echo "no" >&6; }
19870fi
19871
19872
19873  test -n "$BDEPS_UNZIP" && break
19874done
19875
19876  if test "x$BDEPS_UNZIP" = x7z; then
19877    BDEPS_UNZIP="7z x"
19878  fi
19879
19880  for ac_prog in wget lftp ftp
19881do
19882  # Extract the first word of "$ac_prog", so it can be a program name with args.
19883set dummy $ac_prog; ac_word=$2
19884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19885$as_echo_n "checking for $ac_word... " >&6; }
19886if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19887  $as_echo_n "(cached) " >&6
19888else
19889  if test -n "$BDEPS_FTP"; then
19890  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19891else
19892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19893for as_dir in $PATH
19894do
19895  IFS=$as_save_IFS
19896  test -z "$as_dir" && as_dir=.
19897    for ac_exec_ext in '' $ac_executable_extensions; do
19898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19899    ac_cv_prog_BDEPS_FTP="$ac_prog"
19900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19901    break 2
19902  fi
19903done
19904  done
19905IFS=$as_save_IFS
19906
19907fi
19908fi
19909BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19910if test -n "$BDEPS_FTP"; then
19911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19912$as_echo "$BDEPS_FTP" >&6; }
19913else
19914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19915$as_echo "no" >&6; }
19916fi
19917
19918
19919  test -n "$BDEPS_FTP" && break
19920done
19921
19922
19923
19924###############################################################################
19925#
19926# Determine OpenJDK variants, options and version numbers.
19927#
19928###############################################################################
19929
19930# We need build & target for this.
19931
19932
19933  ###############################################################################
19934  #
19935  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19936  # We always build headless support.
19937  #
19938  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19939$as_echo_n "checking headful support... " >&6; }
19940  # Check whether --enable-headful was given.
19941if test "${enable_headful+set}" = set; then :
19942  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19943else
19944  SUPPORT_HEADFUL=yes
19945fi
19946
19947
19948  SUPPORT_HEADLESS=yes
19949  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19950
19951  if test "x$SUPPORT_HEADFUL" = xyes; then
19952    # We are building both headful and headless.
19953    headful_msg="include support for both headful and headless"
19954  fi
19955
19956  if test "x$SUPPORT_HEADFUL" = xno; then
19957    # Thus we are building headless only.
19958    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19959    headful_msg="headless only"
19960  fi
19961
19962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19963$as_echo "$headful_msg" >&6; }
19964
19965
19966
19967
19968
19969  # Control wether Hotspot runs Queens test after build.
19970  # Check whether --enable-hotspot-test-in-build was given.
19971if test "${enable_hotspot_test_in_build+set}" = set; then :
19972  enableval=$enable_hotspot_test_in_build;
19973else
19974  enable_hotspot_test_in_build=no
19975fi
19976
19977  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19978    TEST_IN_BUILD=true
19979  else
19980    TEST_IN_BUILD=false
19981  fi
19982
19983
19984  ###############################################################################
19985  #
19986  # Choose cacerts source file
19987  #
19988
19989# Check whether --with-cacerts-file was given.
19990if test "${with_cacerts_file+set}" = set; then :
19991  withval=$with_cacerts_file;
19992fi
19993
19994  if test "x$with_cacerts_file" != x; then
19995    CACERTS_FILE=$with_cacerts_file
19996  fi
19997
19998
19999  ###############################################################################
20000  #
20001  # Enable or disable unlimited crypto
20002  #
20003  # Check whether --enable-unlimited-crypto was given.
20004if test "${enable_unlimited_crypto+set}" = set; then :
20005  enableval=$enable_unlimited_crypto;
20006else
20007  enable_unlimited_crypto=no
20008fi
20009
20010  if test "x$enable_unlimited_crypto" = "xyes"; then
20011    UNLIMITED_CRYPTO=true
20012  else
20013    UNLIMITED_CRYPTO=false
20014  fi
20015
20016
20017  ###############################################################################
20018  #
20019  # Enable or disable the elliptic curve crypto implementation
20020  #
20021
20022
20023  ###############################################################################
20024  #
20025  # --enable-rmiconnector-iiop
20026  #
20027  # Check whether --enable-rmiconnector-iiop was given.
20028if test "${enable_rmiconnector_iiop+set}" = set; then :
20029  enableval=$enable_rmiconnector_iiop;
20030fi
20031
20032  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20033    RMICONNECTOR_IIOP=true
20034  else
20035    RMICONNECTOR_IIOP=false
20036  fi
20037
20038
20039  ###############################################################################
20040  #
20041  # Compress jars
20042  #
20043  COMPRESS_JARS=false
20044
20045
20046
20047
20048  # Source the version numbers
20049  . $AUTOCONF_DIR/version-numbers
20050
20051  # Get the settings from parameters
20052
20053# Check whether --with-milestone was given.
20054if test "${with_milestone+set}" = set; then :
20055  withval=$with_milestone;
20056fi
20057
20058  if test "x$with_milestone" = xyes; then
20059    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20060  elif test "x$with_milestone" != x; then
20061    MILESTONE="$with_milestone"
20062  fi
20063  if test "x$MILESTONE" = x; then
20064    MILESTONE=internal
20065  fi
20066
20067
20068# Check whether --with-update-version was given.
20069if test "${with_update_version+set}" = set; then :
20070  withval=$with_update_version;
20071fi
20072
20073  if test "x$with_update_version" = xyes; then
20074    as_fn_error $? "Update version must have a value" "$LINENO" 5
20075  elif test "x$with_update_version" != x; then
20076    JDK_UPDATE_VERSION="$with_update_version"
20077    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20078    # to a bug in expr (which reduces it to just X). To work around this, we
20079    # always add a 0 to one digit update versions.
20080    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20081      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20082    fi
20083  fi
20084
20085
20086# Check whether --with-user-release-suffix was given.
20087if test "${with_user_release_suffix+set}" = set; then :
20088  withval=$with_user_release_suffix;
20089fi
20090
20091  if test "x$with_user_release_suffix" = xyes; then
20092    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20093  elif test "x$with_user_release_suffix" != x; then
20094    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20095  fi
20096
20097
20098# Check whether --with-build-number was given.
20099if test "${with_build_number+set}" = set; then :
20100  withval=$with_build_number;
20101fi
20102
20103  if test "x$with_build_number" = xyes; then
20104    as_fn_error $? "Build number must have a value" "$LINENO" 5
20105  elif test "x$with_build_number" != x; then
20106    JDK_BUILD_NUMBER="$with_build_number"
20107  fi
20108  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20109  if test "x$JDK_BUILD_NUMBER" = x; then
20110    JDK_BUILD_NUMBER=b00
20111    if test "x$USER_RELEASE_SUFFIX" = x; then
20112      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20113      # Avoid [:alnum:] since it depends on the locale.
20114      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20115      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20116    fi
20117  fi
20118
20119  # Now set the JDK version, milestone, build number etc.
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135  COPYRIGHT_YEAR=`date +'%Y'`
20136
20137
20138  if test "x$JDK_UPDATE_VERSION" != x; then
20139    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20140  else
20141    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20142  fi
20143
20144
20145  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20146
20147
20148
20149###############################################################################
20150#
20151# Setup BootJDK, used to bootstrap the build.
20152#
20153###############################################################################
20154
20155
20156  BOOT_JDK_FOUND=no
20157
20158# Check whether --with-boot-jdk was given.
20159if test "${with_boot_jdk+set}" = set; then :
20160  withval=$with_boot_jdk;
20161fi
20162
20163
20164  # We look for the Boot JDK through various means, going from more certain to
20165  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20166  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20167  # must check if this is indeed valid; otherwise we'll continue looking.
20168
20169  # Test: Is bootjdk explicitely set by command line arguments?
20170
20171  if test "x$BOOT_JDK_FOUND" = xno; then
20172    # Now execute the test
20173
20174  if test "x$with_boot_jdk" != x; then
20175    BOOT_JDK=$with_boot_jdk
20176    BOOT_JDK_FOUND=maybe
20177    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20178$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20179  fi
20180
20181
20182    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20183    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20184      # Do we have a bin/java?
20185      if test ! -x "$BOOT_JDK/bin/java"; then
20186        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20188        BOOT_JDK_FOUND=no
20189      else
20190        # Do we have a bin/javac?
20191        if test ! -x "$BOOT_JDK/bin/javac"; then
20192          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20194          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20195$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20196          BOOT_JDK_FOUND=no
20197        else
20198          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20199          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20200            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20202            BOOT_JDK_FOUND=no
20203          else
20204            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20205            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20206
20207            # Extra M4 quote needed to protect [] in grep expression.
20208            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20209            if test "x$FOUND_CORRECT_VERSION" = x; then
20210              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20212              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20213$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20214              BOOT_JDK_FOUND=no
20215            else
20216              # We're done! :-)
20217              BOOT_JDK_FOUND=yes
20218
20219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20220
20221  # Input might be given as Windows format, start by converting to
20222  # unix format.
20223  path="$BOOT_JDK"
20224  new_path=`$CYGPATH -u "$path"`
20225
20226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20229  # "foo.exe" is OK but "foo" is an error.
20230  #
20231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20232  # It is also a way to make sure we got the proper file name for the real test later on.
20233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20234  if test "x$test_shortpath" = x; then
20235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20238  fi
20239
20240  # Call helper function which possibly converts this using DOS-style short mode.
20241  # If so, the updated path is stored in $new_path.
20242
20243  input_path="$new_path"
20244  # Check if we need to convert this using DOS-style short mode. If the path
20245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20246  # take no chances and rewrite it.
20247  # Note: m4 eats our [], so we need to use [ and ] instead.
20248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20249  if test "x$has_forbidden_chars" != x; then
20250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20254      # Going to short mode and back again did indeed matter. Since short mode is
20255      # case insensitive, let's make it lowercase to improve readability.
20256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20257      # Now convert it back to Unix-stile (cygpath)
20258      input_path=`$CYGPATH -u "$shortmode_path"`
20259      new_path="$input_path"
20260    fi
20261  fi
20262
20263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20264  if test "x$test_cygdrive_prefix" = x; then
20265    # As a simple fix, exclude /usr/bin since it's not a real path.
20266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20268      # a path prefixed by /cygdrive for fixpath to work.
20269      new_path="$CYGWIN_ROOT_PATH$input_path"
20270    fi
20271  fi
20272
20273
20274  if test "x$path" != "x$new_path"; then
20275    BOOT_JDK="$new_path"
20276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20278  fi
20279
20280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20281
20282  path="$BOOT_JDK"
20283  has_colon=`$ECHO $path | $GREP ^.:`
20284  new_path="$path"
20285  if test "x$has_colon" = x; then
20286    # Not in mixed or Windows style, start by that.
20287    new_path=`cmd //c echo $path`
20288  fi
20289
20290
20291  input_path="$new_path"
20292  # Check if we need to convert this using DOS-style short mode. If the path
20293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20294  # take no chances and rewrite it.
20295  # Note: m4 eats our [], so we need to use [ and ] instead.
20296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20297  if test "x$has_forbidden_chars" != x; then
20298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20300  fi
20301
20302
20303  windows_path="$new_path"
20304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20305    unix_path=`$CYGPATH -u "$windows_path"`
20306    new_path="$unix_path"
20307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20309    new_path="$unix_path"
20310  fi
20311
20312  if test "x$path" != "x$new_path"; then
20313    BOOT_JDK="$new_path"
20314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20316  fi
20317
20318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20320
20321  else
20322    # We're on a posix platform. Hooray! :)
20323    path="$BOOT_JDK"
20324    has_space=`$ECHO "$path" | $GREP " "`
20325    if test "x$has_space" != x; then
20326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20328      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20329    fi
20330
20331    # Use eval to expand a potential ~
20332    eval path="$path"
20333    if test ! -f "$path" && test ! -d "$path"; then
20334      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20335    fi
20336
20337    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20338  fi
20339
20340              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20341$as_echo_n "checking for Boot JDK... " >&6; }
20342              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20343$as_echo "$BOOT_JDK" >&6; }
20344              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20345$as_echo_n "checking Boot JDK version... " >&6; }
20346              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20347              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20348$as_echo "$BOOT_JDK_VERSION" >&6; }
20349            fi # end check jdk version
20350          fi # end check rt.jar
20351        fi # end check javac
20352      fi # end check java
20353    fi # end check boot jdk found
20354  fi
20355
20356  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20357    # Having specified an argument which is incorrect will produce an instant failure;
20358    # we should not go on looking
20359    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20360  fi
20361
20362  # Test: Is bootjdk available from builddeps?
20363
20364  if test "x$BOOT_JDK_FOUND" = xno; then
20365    # Now execute the test
20366
20367
20368
20369  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20370    # Source the builddeps file again, to make sure it uses the latest variables!
20371    . $builddepsfile
20372    # Look for a target and build machine specific resource!
20373    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20374    if test "x$resource" = x; then
20375      # Ok, lets instead look for a target specific resource
20376      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20377    fi
20378    if test "x$resource" = x; then
20379      # Ok, lets instead look for a build specific resource
20380      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20381    fi
20382    if test "x$resource" = x; then
20383      # Ok, lets instead look for a generic resource
20384      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20385      resource=${builddep_bootjdk}
20386    fi
20387    if test "x$resource" != x; then
20388      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20389$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20390      # If the resource in the builddeps.conf file is an existing directory,
20391      # for example /java/linux/cups
20392      if test -d ${resource}; then
20393        depdir=${resource}
20394      else
20395
20396  # bootjdk is for example mymodule
20397  # $resource is for example libs/general/libmymod_1_2_3.zip
20398  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20399  # $with_builddeps_dir is for example /localhome/builddeps
20400  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20401  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20402  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20403  filename=`basename $resource`
20404  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20405  filebase=${filename%%.*}
20406  extension=${filename#*.}
20407  installdir=$with_builddeps_dir/$filebase
20408  if test ! -f $installdir/$filename.unpacked; then
20409    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20410$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20411    if test ! -d $installdir; then
20412      mkdir -p $installdir
20413    fi
20414    if test ! -d $installdir; then
20415      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20416    fi
20417    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20418    touch $tmpfile
20419    if test ! -f $tmpfile; then
20420      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20421    fi
20422
20423  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20424  # $tmpfile is the local file name for the downloaded file.
20425  VALID_TOOL=no
20426  if test "x$BDEPS_FTP" = xwget; then
20427    VALID_TOOL=yes
20428    wget -O $tmpfile $with_builddeps_server/$resource
20429  fi
20430  if test "x$BDEPS_FTP" = xlftp; then
20431    VALID_TOOL=yes
20432    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20433  fi
20434  if test "x$BDEPS_FTP" = xftp; then
20435    VALID_TOOL=yes
20436    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20437    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20438    FTPUSERPWD=${FTPSERVER%%@*}
20439    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20440      FTPUSER=${userpwd%%:*}
20441      FTPPWD=${userpwd#*@}
20442      FTPSERVER=${FTPSERVER#*@}
20443    else
20444      FTPUSER=ftp
20445      FTPPWD=ftp
20446    fi
20447    # the "pass" command does not work on some
20448    # ftp clients (read ftp.exe) but if it works,
20449    # passive mode is better!
20450    ( \
20451        echo "user $FTPUSER $FTPPWD"        ; \
20452        echo "pass"                         ; \
20453        echo "bin"                          ; \
20454        echo "get $FTPPATH $tmpfile"              ; \
20455    ) | ftp -in $FTPSERVER
20456  fi
20457  if test "x$VALID_TOOL" != xyes; then
20458    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20459  fi
20460
20461    mv $tmpfile $installdir/$filename
20462    if test ! -s $installdir/$filename; then
20463      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20464    fi
20465    case "$extension" in
20466      zip)  echo "Unzipping $installdir/$filename..."
20467        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20468        ;;
20469      tar.gz) echo "Untaring $installdir/$filename..."
20470        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20471        ;;
20472      tgz) echo "Untaring $installdir/$filename..."
20473        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20474        ;;
20475      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20476        ;;
20477    esac
20478  fi
20479  if test -f $installdir/$filename.unpacked; then
20480    depdir=$installdir
20481  fi
20482
20483      fi
20484      # Source the builddeps file again, because in the previous command, the depdir
20485      # was updated to point at the current build dependency install directory.
20486      . $builddepsfile
20487      # Now extract variables from the builddeps.conf files.
20488      theroot=${builddep_bootjdk_ROOT}
20489      thecflags=${builddep_bootjdk_CFLAGS}
20490      thelibs=${builddep_bootjdk_LIBS}
20491      if test "x$depdir" = x; then
20492        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20493      fi
20494      BOOT_JDK=$depdir
20495      if test "x$theroot" != x; then
20496        BOOT_JDK="$theroot"
20497      fi
20498      if test "x$thecflags" != x; then
20499        BOOT_JDK_CFLAGS="$thecflags"
20500      fi
20501      if test "x$thelibs" != x; then
20502        BOOT_JDK_LIBS="$thelibs"
20503      fi
20504      BOOT_JDK_FOUND=maybe
20505      else BOOT_JDK_FOUND=no
20506
20507    fi
20508    else BOOT_JDK_FOUND=no
20509
20510  fi
20511
20512
20513
20514    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20515    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20516      # Do we have a bin/java?
20517      if test ! -x "$BOOT_JDK/bin/java"; then
20518        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20520        BOOT_JDK_FOUND=no
20521      else
20522        # Do we have a bin/javac?
20523        if test ! -x "$BOOT_JDK/bin/javac"; then
20524          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20526          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20527$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20528          BOOT_JDK_FOUND=no
20529        else
20530          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20531          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20534            BOOT_JDK_FOUND=no
20535          else
20536            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20537            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20538
20539            # Extra M4 quote needed to protect [] in grep expression.
20540            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20541            if test "x$FOUND_CORRECT_VERSION" = x; then
20542              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20544              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20546              BOOT_JDK_FOUND=no
20547            else
20548              # We're done! :-)
20549              BOOT_JDK_FOUND=yes
20550
20551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20552
20553  # Input might be given as Windows format, start by converting to
20554  # unix format.
20555  path="$BOOT_JDK"
20556  new_path=`$CYGPATH -u "$path"`
20557
20558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20561  # "foo.exe" is OK but "foo" is an error.
20562  #
20563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20564  # It is also a way to make sure we got the proper file name for the real test later on.
20565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20566  if test "x$test_shortpath" = x; then
20567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20570  fi
20571
20572  # Call helper function which possibly converts this using DOS-style short mode.
20573  # If so, the updated path is stored in $new_path.
20574
20575  input_path="$new_path"
20576  # Check if we need to convert this using DOS-style short mode. If the path
20577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20578  # take no chances and rewrite it.
20579  # Note: m4 eats our [], so we need to use [ and ] instead.
20580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20581  if test "x$has_forbidden_chars" != x; then
20582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20586      # Going to short mode and back again did indeed matter. Since short mode is
20587      # case insensitive, let's make it lowercase to improve readability.
20588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20589      # Now convert it back to Unix-stile (cygpath)
20590      input_path=`$CYGPATH -u "$shortmode_path"`
20591      new_path="$input_path"
20592    fi
20593  fi
20594
20595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20596  if test "x$test_cygdrive_prefix" = x; then
20597    # As a simple fix, exclude /usr/bin since it's not a real path.
20598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20600      # a path prefixed by /cygdrive for fixpath to work.
20601      new_path="$CYGWIN_ROOT_PATH$input_path"
20602    fi
20603  fi
20604
20605
20606  if test "x$path" != "x$new_path"; then
20607    BOOT_JDK="$new_path"
20608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20610  fi
20611
20612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20613
20614  path="$BOOT_JDK"
20615  has_colon=`$ECHO $path | $GREP ^.:`
20616  new_path="$path"
20617  if test "x$has_colon" = x; then
20618    # Not in mixed or Windows style, start by that.
20619    new_path=`cmd //c echo $path`
20620  fi
20621
20622
20623  input_path="$new_path"
20624  # Check if we need to convert this using DOS-style short mode. If the path
20625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20626  # take no chances and rewrite it.
20627  # Note: m4 eats our [], so we need to use [ and ] instead.
20628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20629  if test "x$has_forbidden_chars" != x; then
20630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20632  fi
20633
20634
20635  windows_path="$new_path"
20636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20637    unix_path=`$CYGPATH -u "$windows_path"`
20638    new_path="$unix_path"
20639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20641    new_path="$unix_path"
20642  fi
20643
20644  if test "x$path" != "x$new_path"; then
20645    BOOT_JDK="$new_path"
20646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20648  fi
20649
20650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20652
20653  else
20654    # We're on a posix platform. Hooray! :)
20655    path="$BOOT_JDK"
20656    has_space=`$ECHO "$path" | $GREP " "`
20657    if test "x$has_space" != x; then
20658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20660      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20661    fi
20662
20663    # Use eval to expand a potential ~
20664    eval path="$path"
20665    if test ! -f "$path" && test ! -d "$path"; then
20666      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20667    fi
20668
20669    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20670  fi
20671
20672              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20673$as_echo_n "checking for Boot JDK... " >&6; }
20674              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20675$as_echo "$BOOT_JDK" >&6; }
20676              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20677$as_echo_n "checking Boot JDK version... " >&6; }
20678              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20679              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20680$as_echo "$BOOT_JDK_VERSION" >&6; }
20681            fi # end check jdk version
20682          fi # end check rt.jar
20683        fi # end check javac
20684      fi # end check java
20685    fi # end check boot jdk found
20686  fi
20687
20688
20689  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20690
20691  if test "x$BOOT_JDK_FOUND" = xno; then
20692    # Now execute the test
20693
20694  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20695    # First check at user selected default
20696
20697  if test "x$BOOT_JDK_FOUND" = xno; then
20698    # Now execute the test
20699
20700  if test -x /usr/libexec/java_home; then
20701    BOOT_JDK=`/usr/libexec/java_home `
20702    BOOT_JDK_FOUND=maybe
20703    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20704$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20705  fi
20706
20707
20708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20710      # Do we have a bin/java?
20711      if test ! -x "$BOOT_JDK/bin/java"; then
20712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20714        BOOT_JDK_FOUND=no
20715      else
20716        # Do we have a bin/javac?
20717        if test ! -x "$BOOT_JDK/bin/javac"; then
20718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20722          BOOT_JDK_FOUND=no
20723        else
20724          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20725          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20728            BOOT_JDK_FOUND=no
20729          else
20730            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20731            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20732
20733            # Extra M4 quote needed to protect [] in grep expression.
20734            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20735            if test "x$FOUND_CORRECT_VERSION" = x; then
20736              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20738              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20739$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20740              BOOT_JDK_FOUND=no
20741            else
20742              # We're done! :-)
20743              BOOT_JDK_FOUND=yes
20744
20745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20746
20747  # Input might be given as Windows format, start by converting to
20748  # unix format.
20749  path="$BOOT_JDK"
20750  new_path=`$CYGPATH -u "$path"`
20751
20752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20755  # "foo.exe" is OK but "foo" is an error.
20756  #
20757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20758  # It is also a way to make sure we got the proper file name for the real test later on.
20759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20760  if test "x$test_shortpath" = x; then
20761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20764  fi
20765
20766  # Call helper function which possibly converts this using DOS-style short mode.
20767  # If so, the updated path is stored in $new_path.
20768
20769  input_path="$new_path"
20770  # Check if we need to convert this using DOS-style short mode. If the path
20771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20772  # take no chances and rewrite it.
20773  # Note: m4 eats our [], so we need to use [ and ] instead.
20774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20775  if test "x$has_forbidden_chars" != x; then
20776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20780      # Going to short mode and back again did indeed matter. Since short mode is
20781      # case insensitive, let's make it lowercase to improve readability.
20782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20783      # Now convert it back to Unix-stile (cygpath)
20784      input_path=`$CYGPATH -u "$shortmode_path"`
20785      new_path="$input_path"
20786    fi
20787  fi
20788
20789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20790  if test "x$test_cygdrive_prefix" = x; then
20791    # As a simple fix, exclude /usr/bin since it's not a real path.
20792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20794      # a path prefixed by /cygdrive for fixpath to work.
20795      new_path="$CYGWIN_ROOT_PATH$input_path"
20796    fi
20797  fi
20798
20799
20800  if test "x$path" != "x$new_path"; then
20801    BOOT_JDK="$new_path"
20802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20804  fi
20805
20806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20807
20808  path="$BOOT_JDK"
20809  has_colon=`$ECHO $path | $GREP ^.:`
20810  new_path="$path"
20811  if test "x$has_colon" = x; then
20812    # Not in mixed or Windows style, start by that.
20813    new_path=`cmd //c echo $path`
20814  fi
20815
20816
20817  input_path="$new_path"
20818  # Check if we need to convert this using DOS-style short mode. If the path
20819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20820  # take no chances and rewrite it.
20821  # Note: m4 eats our [], so we need to use [ and ] instead.
20822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20823  if test "x$has_forbidden_chars" != x; then
20824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20826  fi
20827
20828
20829  windows_path="$new_path"
20830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20831    unix_path=`$CYGPATH -u "$windows_path"`
20832    new_path="$unix_path"
20833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20835    new_path="$unix_path"
20836  fi
20837
20838  if test "x$path" != "x$new_path"; then
20839    BOOT_JDK="$new_path"
20840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20842  fi
20843
20844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20846
20847  else
20848    # We're on a posix platform. Hooray! :)
20849    path="$BOOT_JDK"
20850    has_space=`$ECHO "$path" | $GREP " "`
20851    if test "x$has_space" != x; then
20852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20854      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20855    fi
20856
20857    # Use eval to expand a potential ~
20858    eval path="$path"
20859    if test ! -f "$path" && test ! -d "$path"; then
20860      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20861    fi
20862
20863    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20864  fi
20865
20866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20867$as_echo_n "checking for Boot JDK... " >&6; }
20868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20869$as_echo "$BOOT_JDK" >&6; }
20870              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20871$as_echo_n "checking Boot JDK version... " >&6; }
20872              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20874$as_echo "$BOOT_JDK_VERSION" >&6; }
20875            fi # end check jdk version
20876          fi # end check rt.jar
20877        fi # end check javac
20878      fi # end check java
20879    fi # end check boot jdk found
20880  fi
20881
20882    # If that did not work out (e.g. too old), try explicit versions instead
20883
20884  if test "x$BOOT_JDK_FOUND" = xno; then
20885    # Now execute the test
20886
20887  if test -x /usr/libexec/java_home; then
20888    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20889    BOOT_JDK_FOUND=maybe
20890    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20891$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20892  fi
20893
20894
20895    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20896    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20897      # Do we have a bin/java?
20898      if test ! -x "$BOOT_JDK/bin/java"; then
20899        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20901        BOOT_JDK_FOUND=no
20902      else
20903        # Do we have a bin/javac?
20904        if test ! -x "$BOOT_JDK/bin/javac"; then
20905          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20907          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20908$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20909          BOOT_JDK_FOUND=no
20910        else
20911          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20912          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20913            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20915            BOOT_JDK_FOUND=no
20916          else
20917            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20918            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20919
20920            # Extra M4 quote needed to protect [] in grep expression.
20921            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20922            if test "x$FOUND_CORRECT_VERSION" = x; then
20923              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20925              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20926$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20927              BOOT_JDK_FOUND=no
20928            else
20929              # We're done! :-)
20930              BOOT_JDK_FOUND=yes
20931
20932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20933
20934  # Input might be given as Windows format, start by converting to
20935  # unix format.
20936  path="$BOOT_JDK"
20937  new_path=`$CYGPATH -u "$path"`
20938
20939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20942  # "foo.exe" is OK but "foo" is an error.
20943  #
20944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20945  # It is also a way to make sure we got the proper file name for the real test later on.
20946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20947  if test "x$test_shortpath" = x; then
20948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20949$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20950    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20951  fi
20952
20953  # Call helper function which possibly converts this using DOS-style short mode.
20954  # If so, the updated path is stored in $new_path.
20955
20956  input_path="$new_path"
20957  # Check if we need to convert this using DOS-style short mode. If the path
20958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20959  # take no chances and rewrite it.
20960  # Note: m4 eats our [], so we need to use [ and ] instead.
20961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20962  if test "x$has_forbidden_chars" != x; then
20963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20967      # Going to short mode and back again did indeed matter. Since short mode is
20968      # case insensitive, let's make it lowercase to improve readability.
20969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20970      # Now convert it back to Unix-stile (cygpath)
20971      input_path=`$CYGPATH -u "$shortmode_path"`
20972      new_path="$input_path"
20973    fi
20974  fi
20975
20976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20977  if test "x$test_cygdrive_prefix" = x; then
20978    # As a simple fix, exclude /usr/bin since it's not a real path.
20979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20981      # a path prefixed by /cygdrive for fixpath to work.
20982      new_path="$CYGWIN_ROOT_PATH$input_path"
20983    fi
20984  fi
20985
20986
20987  if test "x$path" != "x$new_path"; then
20988    BOOT_JDK="$new_path"
20989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20990$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20991  fi
20992
20993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20994
20995  path="$BOOT_JDK"
20996  has_colon=`$ECHO $path | $GREP ^.:`
20997  new_path="$path"
20998  if test "x$has_colon" = x; then
20999    # Not in mixed or Windows style, start by that.
21000    new_path=`cmd //c echo $path`
21001  fi
21002
21003
21004  input_path="$new_path"
21005  # Check if we need to convert this using DOS-style short mode. If the path
21006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21007  # take no chances and rewrite it.
21008  # Note: m4 eats our [], so we need to use [ and ] instead.
21009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21010  if test "x$has_forbidden_chars" != x; then
21011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21013  fi
21014
21015
21016  windows_path="$new_path"
21017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21018    unix_path=`$CYGPATH -u "$windows_path"`
21019    new_path="$unix_path"
21020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21022    new_path="$unix_path"
21023  fi
21024
21025  if test "x$path" != "x$new_path"; then
21026    BOOT_JDK="$new_path"
21027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21029  fi
21030
21031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21033
21034  else
21035    # We're on a posix platform. Hooray! :)
21036    path="$BOOT_JDK"
21037    has_space=`$ECHO "$path" | $GREP " "`
21038    if test "x$has_space" != x; then
21039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21041      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21042    fi
21043
21044    # Use eval to expand a potential ~
21045    eval path="$path"
21046    if test ! -f "$path" && test ! -d "$path"; then
21047      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21048    fi
21049
21050    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21051  fi
21052
21053              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21054$as_echo_n "checking for Boot JDK... " >&6; }
21055              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21056$as_echo "$BOOT_JDK" >&6; }
21057              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21058$as_echo_n "checking Boot JDK version... " >&6; }
21059              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21060              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21061$as_echo "$BOOT_JDK_VERSION" >&6; }
21062            fi # end check jdk version
21063          fi # end check rt.jar
21064        fi # end check javac
21065      fi # end check java
21066    fi # end check boot jdk found
21067  fi
21068
21069
21070  if test "x$BOOT_JDK_FOUND" = xno; then
21071    # Now execute the test
21072
21073  if test -x /usr/libexec/java_home; then
21074    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21075    BOOT_JDK_FOUND=maybe
21076    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21077$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21078  fi
21079
21080
21081    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21082    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21083      # Do we have a bin/java?
21084      if test ! -x "$BOOT_JDK/bin/java"; then
21085        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21087        BOOT_JDK_FOUND=no
21088      else
21089        # Do we have a bin/javac?
21090        if test ! -x "$BOOT_JDK/bin/javac"; then
21091          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21093          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21094$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21095          BOOT_JDK_FOUND=no
21096        else
21097          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21098          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21101            BOOT_JDK_FOUND=no
21102          else
21103            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21105
21106            # Extra M4 quote needed to protect [] in grep expression.
21107            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21108            if test "x$FOUND_CORRECT_VERSION" = x; then
21109              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21111              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21112$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21113              BOOT_JDK_FOUND=no
21114            else
21115              # We're done! :-)
21116              BOOT_JDK_FOUND=yes
21117
21118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21119
21120  # Input might be given as Windows format, start by converting to
21121  # unix format.
21122  path="$BOOT_JDK"
21123  new_path=`$CYGPATH -u "$path"`
21124
21125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21128  # "foo.exe" is OK but "foo" is an error.
21129  #
21130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21131  # It is also a way to make sure we got the proper file name for the real test later on.
21132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21133  if test "x$test_shortpath" = x; then
21134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21137  fi
21138
21139  # Call helper function which possibly converts this using DOS-style short mode.
21140  # If so, the updated path is stored in $new_path.
21141
21142  input_path="$new_path"
21143  # Check if we need to convert this using DOS-style short mode. If the path
21144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21145  # take no chances and rewrite it.
21146  # Note: m4 eats our [], so we need to use [ and ] instead.
21147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21148  if test "x$has_forbidden_chars" != x; then
21149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21153      # Going to short mode and back again did indeed matter. Since short mode is
21154      # case insensitive, let's make it lowercase to improve readability.
21155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21156      # Now convert it back to Unix-stile (cygpath)
21157      input_path=`$CYGPATH -u "$shortmode_path"`
21158      new_path="$input_path"
21159    fi
21160  fi
21161
21162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21163  if test "x$test_cygdrive_prefix" = x; then
21164    # As a simple fix, exclude /usr/bin since it's not a real path.
21165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21167      # a path prefixed by /cygdrive for fixpath to work.
21168      new_path="$CYGWIN_ROOT_PATH$input_path"
21169    fi
21170  fi
21171
21172
21173  if test "x$path" != "x$new_path"; then
21174    BOOT_JDK="$new_path"
21175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21177  fi
21178
21179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21180
21181  path="$BOOT_JDK"
21182  has_colon=`$ECHO $path | $GREP ^.:`
21183  new_path="$path"
21184  if test "x$has_colon" = x; then
21185    # Not in mixed or Windows style, start by that.
21186    new_path=`cmd //c echo $path`
21187  fi
21188
21189
21190  input_path="$new_path"
21191  # Check if we need to convert this using DOS-style short mode. If the path
21192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21193  # take no chances and rewrite it.
21194  # Note: m4 eats our [], so we need to use [ and ] instead.
21195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21196  if test "x$has_forbidden_chars" != x; then
21197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21199  fi
21200
21201
21202  windows_path="$new_path"
21203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21204    unix_path=`$CYGPATH -u "$windows_path"`
21205    new_path="$unix_path"
21206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21208    new_path="$unix_path"
21209  fi
21210
21211  if test "x$path" != "x$new_path"; then
21212    BOOT_JDK="$new_path"
21213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21215  fi
21216
21217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21219
21220  else
21221    # We're on a posix platform. Hooray! :)
21222    path="$BOOT_JDK"
21223    has_space=`$ECHO "$path" | $GREP " "`
21224    if test "x$has_space" != x; then
21225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21228    fi
21229
21230    # Use eval to expand a potential ~
21231    eval path="$path"
21232    if test ! -f "$path" && test ! -d "$path"; then
21233      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21234    fi
21235
21236    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21237  fi
21238
21239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21240$as_echo_n "checking for Boot JDK... " >&6; }
21241              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21242$as_echo "$BOOT_JDK" >&6; }
21243              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21244$as_echo_n "checking Boot JDK version... " >&6; }
21245              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21247$as_echo "$BOOT_JDK_VERSION" >&6; }
21248            fi # end check jdk version
21249          fi # end check rt.jar
21250        fi # end check javac
21251      fi # end check java
21252    fi # end check boot jdk found
21253  fi
21254
21255
21256  if test "x$BOOT_JDK_FOUND" = xno; then
21257    # Now execute the test
21258
21259  if test -x /usr/libexec/java_home; then
21260    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21261    BOOT_JDK_FOUND=maybe
21262    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21263$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21264  fi
21265
21266
21267    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21268    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21269      # Do we have a bin/java?
21270      if test ! -x "$BOOT_JDK/bin/java"; then
21271        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21273        BOOT_JDK_FOUND=no
21274      else
21275        # Do we have a bin/javac?
21276        if test ! -x "$BOOT_JDK/bin/javac"; then
21277          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21279          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21280$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21281          BOOT_JDK_FOUND=no
21282        else
21283          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21284          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21285            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21287            BOOT_JDK_FOUND=no
21288          else
21289            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21291
21292            # Extra M4 quote needed to protect [] in grep expression.
21293            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21294            if test "x$FOUND_CORRECT_VERSION" = x; then
21295              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21297              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21298$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21299              BOOT_JDK_FOUND=no
21300            else
21301              # We're done! :-)
21302              BOOT_JDK_FOUND=yes
21303
21304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21305
21306  # Input might be given as Windows format, start by converting to
21307  # unix format.
21308  path="$BOOT_JDK"
21309  new_path=`$CYGPATH -u "$path"`
21310
21311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21314  # "foo.exe" is OK but "foo" is an error.
21315  #
21316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21317  # It is also a way to make sure we got the proper file name for the real test later on.
21318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21319  if test "x$test_shortpath" = x; then
21320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21322    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21323  fi
21324
21325  # Call helper function which possibly converts this using DOS-style short mode.
21326  # If so, the updated path is stored in $new_path.
21327
21328  input_path="$new_path"
21329  # Check if we need to convert this using DOS-style short mode. If the path
21330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21331  # take no chances and rewrite it.
21332  # Note: m4 eats our [], so we need to use [ and ] instead.
21333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21334  if test "x$has_forbidden_chars" != x; then
21335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21339      # Going to short mode and back again did indeed matter. Since short mode is
21340      # case insensitive, let's make it lowercase to improve readability.
21341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21342      # Now convert it back to Unix-stile (cygpath)
21343      input_path=`$CYGPATH -u "$shortmode_path"`
21344      new_path="$input_path"
21345    fi
21346  fi
21347
21348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21349  if test "x$test_cygdrive_prefix" = x; then
21350    # As a simple fix, exclude /usr/bin since it's not a real path.
21351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21353      # a path prefixed by /cygdrive for fixpath to work.
21354      new_path="$CYGWIN_ROOT_PATH$input_path"
21355    fi
21356  fi
21357
21358
21359  if test "x$path" != "x$new_path"; then
21360    BOOT_JDK="$new_path"
21361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21363  fi
21364
21365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21366
21367  path="$BOOT_JDK"
21368  has_colon=`$ECHO $path | $GREP ^.:`
21369  new_path="$path"
21370  if test "x$has_colon" = x; then
21371    # Not in mixed or Windows style, start by that.
21372    new_path=`cmd //c echo $path`
21373  fi
21374
21375
21376  input_path="$new_path"
21377  # Check if we need to convert this using DOS-style short mode. If the path
21378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21379  # take no chances and rewrite it.
21380  # Note: m4 eats our [], so we need to use [ and ] instead.
21381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21382  if test "x$has_forbidden_chars" != x; then
21383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21385  fi
21386
21387
21388  windows_path="$new_path"
21389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21390    unix_path=`$CYGPATH -u "$windows_path"`
21391    new_path="$unix_path"
21392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21394    new_path="$unix_path"
21395  fi
21396
21397  if test "x$path" != "x$new_path"; then
21398    BOOT_JDK="$new_path"
21399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21401  fi
21402
21403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21405
21406  else
21407    # We're on a posix platform. Hooray! :)
21408    path="$BOOT_JDK"
21409    has_space=`$ECHO "$path" | $GREP " "`
21410    if test "x$has_space" != x; then
21411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21413      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21414    fi
21415
21416    # Use eval to expand a potential ~
21417    eval path="$path"
21418    if test ! -f "$path" && test ! -d "$path"; then
21419      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21420    fi
21421
21422    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21423  fi
21424
21425              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21426$as_echo_n "checking for Boot JDK... " >&6; }
21427              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21428$as_echo "$BOOT_JDK" >&6; }
21429              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21430$as_echo_n "checking Boot JDK version... " >&6; }
21431              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21432              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21433$as_echo "$BOOT_JDK_VERSION" >&6; }
21434            fi # end check jdk version
21435          fi # end check rt.jar
21436        fi # end check javac
21437      fi # end check java
21438    fi # end check boot jdk found
21439  fi
21440
21441  fi
21442
21443
21444    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21445    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21446      # Do we have a bin/java?
21447      if test ! -x "$BOOT_JDK/bin/java"; then
21448        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21450        BOOT_JDK_FOUND=no
21451      else
21452        # Do we have a bin/javac?
21453        if test ! -x "$BOOT_JDK/bin/javac"; then
21454          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21456          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21457$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21458          BOOT_JDK_FOUND=no
21459        else
21460          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21461          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21462            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21464            BOOT_JDK_FOUND=no
21465          else
21466            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21467            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21468
21469            # Extra M4 quote needed to protect [] in grep expression.
21470            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21471            if test "x$FOUND_CORRECT_VERSION" = x; then
21472              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21474              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21475$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21476              BOOT_JDK_FOUND=no
21477            else
21478              # We're done! :-)
21479              BOOT_JDK_FOUND=yes
21480
21481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21482
21483  # Input might be given as Windows format, start by converting to
21484  # unix format.
21485  path="$BOOT_JDK"
21486  new_path=`$CYGPATH -u "$path"`
21487
21488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21491  # "foo.exe" is OK but "foo" is an error.
21492  #
21493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21494  # It is also a way to make sure we got the proper file name for the real test later on.
21495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21496  if test "x$test_shortpath" = x; then
21497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21499    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21500  fi
21501
21502  # Call helper function which possibly converts this using DOS-style short mode.
21503  # If so, the updated path is stored in $new_path.
21504
21505  input_path="$new_path"
21506  # Check if we need to convert this using DOS-style short mode. If the path
21507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21508  # take no chances and rewrite it.
21509  # Note: m4 eats our [], so we need to use [ and ] instead.
21510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21511  if test "x$has_forbidden_chars" != x; then
21512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21516      # Going to short mode and back again did indeed matter. Since short mode is
21517      # case insensitive, let's make it lowercase to improve readability.
21518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21519      # Now convert it back to Unix-stile (cygpath)
21520      input_path=`$CYGPATH -u "$shortmode_path"`
21521      new_path="$input_path"
21522    fi
21523  fi
21524
21525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21526  if test "x$test_cygdrive_prefix" = x; then
21527    # As a simple fix, exclude /usr/bin since it's not a real path.
21528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21530      # a path prefixed by /cygdrive for fixpath to work.
21531      new_path="$CYGWIN_ROOT_PATH$input_path"
21532    fi
21533  fi
21534
21535
21536  if test "x$path" != "x$new_path"; then
21537    BOOT_JDK="$new_path"
21538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21540  fi
21541
21542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21543
21544  path="$BOOT_JDK"
21545  has_colon=`$ECHO $path | $GREP ^.:`
21546  new_path="$path"
21547  if test "x$has_colon" = x; then
21548    # Not in mixed or Windows style, start by that.
21549    new_path=`cmd //c echo $path`
21550  fi
21551
21552
21553  input_path="$new_path"
21554  # Check if we need to convert this using DOS-style short mode. If the path
21555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21556  # take no chances and rewrite it.
21557  # Note: m4 eats our [], so we need to use [ and ] instead.
21558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21559  if test "x$has_forbidden_chars" != x; then
21560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21562  fi
21563
21564
21565  windows_path="$new_path"
21566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21567    unix_path=`$CYGPATH -u "$windows_path"`
21568    new_path="$unix_path"
21569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21571    new_path="$unix_path"
21572  fi
21573
21574  if test "x$path" != "x$new_path"; then
21575    BOOT_JDK="$new_path"
21576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21578  fi
21579
21580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21582
21583  else
21584    # We're on a posix platform. Hooray! :)
21585    path="$BOOT_JDK"
21586    has_space=`$ECHO "$path" | $GREP " "`
21587    if test "x$has_space" != x; then
21588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21590      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21591    fi
21592
21593    # Use eval to expand a potential ~
21594    eval path="$path"
21595    if test ! -f "$path" && test ! -d "$path"; then
21596      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21597    fi
21598
21599    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21600  fi
21601
21602              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21603$as_echo_n "checking for Boot JDK... " >&6; }
21604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21605$as_echo "$BOOT_JDK" >&6; }
21606              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21607$as_echo_n "checking Boot JDK version... " >&6; }
21608              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21609              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21610$as_echo "$BOOT_JDK_VERSION" >&6; }
21611            fi # end check jdk version
21612          fi # end check rt.jar
21613        fi # end check javac
21614      fi # end check java
21615    fi # end check boot jdk found
21616  fi
21617
21618
21619  # Test: Is $JAVA_HOME set?
21620
21621  if test "x$BOOT_JDK_FOUND" = xno; then
21622    # Now execute the test
21623
21624  if test "x$JAVA_HOME" != x; then
21625    JAVA_HOME_PROCESSED="$JAVA_HOME"
21626
21627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21628
21629  # Input might be given as Windows format, start by converting to
21630  # unix format.
21631  path="$JAVA_HOME_PROCESSED"
21632  new_path=`$CYGPATH -u "$path"`
21633
21634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21637  # "foo.exe" is OK but "foo" is an error.
21638  #
21639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21640  # It is also a way to make sure we got the proper file name for the real test later on.
21641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21642  if test "x$test_shortpath" = x; then
21643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21644$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21645    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21646  fi
21647
21648  # Call helper function which possibly converts this using DOS-style short mode.
21649  # If so, the updated path is stored in $new_path.
21650
21651  input_path="$new_path"
21652  # Check if we need to convert this using DOS-style short mode. If the path
21653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21654  # take no chances and rewrite it.
21655  # Note: m4 eats our [], so we need to use [ and ] instead.
21656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21657  if test "x$has_forbidden_chars" != x; then
21658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21662      # Going to short mode and back again did indeed matter. Since short mode is
21663      # case insensitive, let's make it lowercase to improve readability.
21664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21665      # Now convert it back to Unix-stile (cygpath)
21666      input_path=`$CYGPATH -u "$shortmode_path"`
21667      new_path="$input_path"
21668    fi
21669  fi
21670
21671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21672  if test "x$test_cygdrive_prefix" = x; then
21673    # As a simple fix, exclude /usr/bin since it's not a real path.
21674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21676      # a path prefixed by /cygdrive for fixpath to work.
21677      new_path="$CYGWIN_ROOT_PATH$input_path"
21678    fi
21679  fi
21680
21681
21682  if test "x$path" != "x$new_path"; then
21683    JAVA_HOME_PROCESSED="$new_path"
21684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21685$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21686  fi
21687
21688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21689
21690  path="$JAVA_HOME_PROCESSED"
21691  has_colon=`$ECHO $path | $GREP ^.:`
21692  new_path="$path"
21693  if test "x$has_colon" = x; then
21694    # Not in mixed or Windows style, start by that.
21695    new_path=`cmd //c echo $path`
21696  fi
21697
21698
21699  input_path="$new_path"
21700  # Check if we need to convert this using DOS-style short mode. If the path
21701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21702  # take no chances and rewrite it.
21703  # Note: m4 eats our [], so we need to use [ and ] instead.
21704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21705  if test "x$has_forbidden_chars" != x; then
21706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21708  fi
21709
21710
21711  windows_path="$new_path"
21712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21713    unix_path=`$CYGPATH -u "$windows_path"`
21714    new_path="$unix_path"
21715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21717    new_path="$unix_path"
21718  fi
21719
21720  if test "x$path" != "x$new_path"; then
21721    JAVA_HOME_PROCESSED="$new_path"
21722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21723$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21724  fi
21725
21726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21728
21729  else
21730    # We're on a posix platform. Hooray! :)
21731    path="$JAVA_HOME_PROCESSED"
21732    has_space=`$ECHO "$path" | $GREP " "`
21733    if test "x$has_space" != x; then
21734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21735$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21736      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21737    fi
21738
21739    # Use eval to expand a potential ~
21740    eval path="$path"
21741    if test ! -f "$path" && test ! -d "$path"; then
21742      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21743    fi
21744
21745    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21746  fi
21747
21748    if test ! -d "$JAVA_HOME_PROCESSED"; then
21749      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21750$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21751    else
21752      # Aha, the user has set a JAVA_HOME
21753      # let us use that as the Boot JDK.
21754      BOOT_JDK="$JAVA_HOME_PROCESSED"
21755      BOOT_JDK_FOUND=maybe
21756      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21757$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21758    fi
21759  fi
21760
21761
21762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21764      # Do we have a bin/java?
21765      if test ! -x "$BOOT_JDK/bin/java"; then
21766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21768        BOOT_JDK_FOUND=no
21769      else
21770        # Do we have a bin/javac?
21771        if test ! -x "$BOOT_JDK/bin/javac"; then
21772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21776          BOOT_JDK_FOUND=no
21777        else
21778          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21779          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21780            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21782            BOOT_JDK_FOUND=no
21783          else
21784            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21786
21787            # Extra M4 quote needed to protect [] in grep expression.
21788            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21789            if test "x$FOUND_CORRECT_VERSION" = x; then
21790              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21792              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21793$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21794              BOOT_JDK_FOUND=no
21795            else
21796              # We're done! :-)
21797              BOOT_JDK_FOUND=yes
21798
21799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21800
21801  # Input might be given as Windows format, start by converting to
21802  # unix format.
21803  path="$BOOT_JDK"
21804  new_path=`$CYGPATH -u "$path"`
21805
21806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21809  # "foo.exe" is OK but "foo" is an error.
21810  #
21811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21812  # It is also a way to make sure we got the proper file name for the real test later on.
21813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21814  if test "x$test_shortpath" = x; then
21815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21818  fi
21819
21820  # Call helper function which possibly converts this using DOS-style short mode.
21821  # If so, the updated path is stored in $new_path.
21822
21823  input_path="$new_path"
21824  # Check if we need to convert this using DOS-style short mode. If the path
21825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21826  # take no chances and rewrite it.
21827  # Note: m4 eats our [], so we need to use [ and ] instead.
21828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21829  if test "x$has_forbidden_chars" != x; then
21830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21834      # Going to short mode and back again did indeed matter. Since short mode is
21835      # case insensitive, let's make it lowercase to improve readability.
21836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21837      # Now convert it back to Unix-stile (cygpath)
21838      input_path=`$CYGPATH -u "$shortmode_path"`
21839      new_path="$input_path"
21840    fi
21841  fi
21842
21843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21844  if test "x$test_cygdrive_prefix" = x; then
21845    # As a simple fix, exclude /usr/bin since it's not a real path.
21846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21848      # a path prefixed by /cygdrive for fixpath to work.
21849      new_path="$CYGWIN_ROOT_PATH$input_path"
21850    fi
21851  fi
21852
21853
21854  if test "x$path" != "x$new_path"; then
21855    BOOT_JDK="$new_path"
21856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21858  fi
21859
21860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21861
21862  path="$BOOT_JDK"
21863  has_colon=`$ECHO $path | $GREP ^.:`
21864  new_path="$path"
21865  if test "x$has_colon" = x; then
21866    # Not in mixed or Windows style, start by that.
21867    new_path=`cmd //c echo $path`
21868  fi
21869
21870
21871  input_path="$new_path"
21872  # Check if we need to convert this using DOS-style short mode. If the path
21873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21874  # take no chances and rewrite it.
21875  # Note: m4 eats our [], so we need to use [ and ] instead.
21876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21877  if test "x$has_forbidden_chars" != x; then
21878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21880  fi
21881
21882
21883  windows_path="$new_path"
21884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21885    unix_path=`$CYGPATH -u "$windows_path"`
21886    new_path="$unix_path"
21887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21889    new_path="$unix_path"
21890  fi
21891
21892  if test "x$path" != "x$new_path"; then
21893    BOOT_JDK="$new_path"
21894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21896  fi
21897
21898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21900
21901  else
21902    # We're on a posix platform. Hooray! :)
21903    path="$BOOT_JDK"
21904    has_space=`$ECHO "$path" | $GREP " "`
21905    if test "x$has_space" != x; then
21906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21908      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21909    fi
21910
21911    # Use eval to expand a potential ~
21912    eval path="$path"
21913    if test ! -f "$path" && test ! -d "$path"; then
21914      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21915    fi
21916
21917    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21918  fi
21919
21920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21921$as_echo_n "checking for Boot JDK... " >&6; }
21922              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21923$as_echo "$BOOT_JDK" >&6; }
21924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21925$as_echo_n "checking Boot JDK version... " >&6; }
21926              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21927              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21928$as_echo "$BOOT_JDK_VERSION" >&6; }
21929            fi # end check jdk version
21930          fi # end check rt.jar
21931        fi # end check javac
21932      fi # end check java
21933    fi # end check boot jdk found
21934  fi
21935
21936
21937  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21938
21939  if test "x$BOOT_JDK_FOUND" = xno; then
21940    # Now execute the test
21941
21942  # Extract the first word of "javac", so it can be a program name with args.
21943set dummy javac; ac_word=$2
21944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21945$as_echo_n "checking for $ac_word... " >&6; }
21946if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21947  $as_echo_n "(cached) " >&6
21948else
21949  case $JAVAC_CHECK in
21950  [\\/]* | ?:[\\/]*)
21951  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21952  ;;
21953  *)
21954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21955for as_dir in $PATH
21956do
21957  IFS=$as_save_IFS
21958  test -z "$as_dir" && as_dir=.
21959    for ac_exec_ext in '' $ac_executable_extensions; do
21960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21961    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21963    break 2
21964  fi
21965done
21966  done
21967IFS=$as_save_IFS
21968
21969  ;;
21970esac
21971fi
21972JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21973if test -n "$JAVAC_CHECK"; then
21974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21975$as_echo "$JAVAC_CHECK" >&6; }
21976else
21977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21978$as_echo "no" >&6; }
21979fi
21980
21981
21982  # Extract the first word of "java", so it can be a program name with args.
21983set dummy java; ac_word=$2
21984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21985$as_echo_n "checking for $ac_word... " >&6; }
21986if ${ac_cv_path_JAVA_CHECK+:} false; then :
21987  $as_echo_n "(cached) " >&6
21988else
21989  case $JAVA_CHECK in
21990  [\\/]* | ?:[\\/]*)
21991  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21992  ;;
21993  *)
21994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21995for as_dir in $PATH
21996do
21997  IFS=$as_save_IFS
21998  test -z "$as_dir" && as_dir=.
21999    for ac_exec_ext in '' $ac_executable_extensions; do
22000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22001    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22003    break 2
22004  fi
22005done
22006  done
22007IFS=$as_save_IFS
22008
22009  ;;
22010esac
22011fi
22012JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22013if test -n "$JAVA_CHECK"; then
22014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22015$as_echo "$JAVA_CHECK" >&6; }
22016else
22017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22018$as_echo "no" >&6; }
22019fi
22020
22021
22022  BINARY="$JAVAC_CHECK"
22023  if test "x$JAVAC_CHECK" = x; then
22024    BINARY="$JAVA_CHECK"
22025  fi
22026  if test "x$BINARY" != x; then
22027    # So there is a java(c) binary, it might be part of a JDK.
22028    # Lets find the JDK/JRE directory by following symbolic links.
22029    # Linux/GNU systems often have links from /usr/bin/java to
22030    # /etc/alternatives/java to the real JDK binary.
22031
22032  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22033    # Follow a chain of symbolic links. Use readlink
22034    # where it exists, else fall back to horribly
22035    # complicated shell code.
22036    if test "x$READLINK_TESTED" != yes; then
22037      # On MacOSX there is a readlink tool with a different
22038      # purpose than the GNU readlink tool. Check the found readlink.
22039      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22040      if test "x$ISGNU" = x; then
22041        # A readlink that we do not know how to use.
22042        # Are there other non-GNU readlinks out there?
22043        READLINK_TESTED=yes
22044        READLINK=
22045      fi
22046    fi
22047
22048    if test "x$READLINK" != x; then
22049      BINARY=`$READLINK -f $BINARY`
22050    else
22051      # Save the current directory for restoring afterwards
22052      STARTDIR=$PWD
22053      COUNTER=0
22054      sym_link_dir=`$DIRNAME $BINARY`
22055      sym_link_file=`$BASENAME $BINARY`
22056      cd $sym_link_dir
22057      # Use -P flag to resolve symlinks in directories.
22058      cd `$THEPWDCMD -P`
22059      sym_link_dir=`$THEPWDCMD -P`
22060      # Resolve file symlinks
22061      while test $COUNTER -lt 20; do
22062        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22063        if test "x$ISLINK" == x; then
22064          # This is not a symbolic link! We are done!
22065          break
22066        fi
22067        # Again resolve directory symlinks since the target of the just found
22068        # link could be in a different directory
22069        cd `$DIRNAME $ISLINK`
22070        sym_link_dir=`$THEPWDCMD -P`
22071        sym_link_file=`$BASENAME $ISLINK`
22072        let COUNTER=COUNTER+1
22073      done
22074      cd $STARTDIR
22075      BINARY=$sym_link_dir/$sym_link_file
22076    fi
22077  fi
22078
22079    BOOT_JDK=`dirname "$BINARY"`
22080    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22081    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22082      # Looks like we found ourselves an JDK
22083      BOOT_JDK_FOUND=maybe
22084      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22085$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22086    fi
22087  fi
22088
22089
22090    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22091    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22092      # Do we have a bin/java?
22093      if test ! -x "$BOOT_JDK/bin/java"; then
22094        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22096        BOOT_JDK_FOUND=no
22097      else
22098        # Do we have a bin/javac?
22099        if test ! -x "$BOOT_JDK/bin/javac"; then
22100          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22102          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22103$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22104          BOOT_JDK_FOUND=no
22105        else
22106          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22107          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22108            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22110            BOOT_JDK_FOUND=no
22111          else
22112            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22114
22115            # Extra M4 quote needed to protect [] in grep expression.
22116            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22117            if test "x$FOUND_CORRECT_VERSION" = x; then
22118              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22120              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22121$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22122              BOOT_JDK_FOUND=no
22123            else
22124              # We're done! :-)
22125              BOOT_JDK_FOUND=yes
22126
22127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22128
22129  # Input might be given as Windows format, start by converting to
22130  # unix format.
22131  path="$BOOT_JDK"
22132  new_path=`$CYGPATH -u "$path"`
22133
22134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22137  # "foo.exe" is OK but "foo" is an error.
22138  #
22139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22140  # It is also a way to make sure we got the proper file name for the real test later on.
22141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22142  if test "x$test_shortpath" = x; then
22143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22146  fi
22147
22148  # Call helper function which possibly converts this using DOS-style short mode.
22149  # If so, the updated path is stored in $new_path.
22150
22151  input_path="$new_path"
22152  # Check if we need to convert this using DOS-style short mode. If the path
22153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22154  # take no chances and rewrite it.
22155  # Note: m4 eats our [], so we need to use [ and ] instead.
22156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22157  if test "x$has_forbidden_chars" != x; then
22158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22162      # Going to short mode and back again did indeed matter. Since short mode is
22163      # case insensitive, let's make it lowercase to improve readability.
22164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22165      # Now convert it back to Unix-stile (cygpath)
22166      input_path=`$CYGPATH -u "$shortmode_path"`
22167      new_path="$input_path"
22168    fi
22169  fi
22170
22171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22172  if test "x$test_cygdrive_prefix" = x; then
22173    # As a simple fix, exclude /usr/bin since it's not a real path.
22174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22176      # a path prefixed by /cygdrive for fixpath to work.
22177      new_path="$CYGWIN_ROOT_PATH$input_path"
22178    fi
22179  fi
22180
22181
22182  if test "x$path" != "x$new_path"; then
22183    BOOT_JDK="$new_path"
22184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22186  fi
22187
22188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22189
22190  path="$BOOT_JDK"
22191  has_colon=`$ECHO $path | $GREP ^.:`
22192  new_path="$path"
22193  if test "x$has_colon" = x; then
22194    # Not in mixed or Windows style, start by that.
22195    new_path=`cmd //c echo $path`
22196  fi
22197
22198
22199  input_path="$new_path"
22200  # Check if we need to convert this using DOS-style short mode. If the path
22201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22202  # take no chances and rewrite it.
22203  # Note: m4 eats our [], so we need to use [ and ] instead.
22204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22205  if test "x$has_forbidden_chars" != x; then
22206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22208  fi
22209
22210
22211  windows_path="$new_path"
22212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22213    unix_path=`$CYGPATH -u "$windows_path"`
22214    new_path="$unix_path"
22215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22217    new_path="$unix_path"
22218  fi
22219
22220  if test "x$path" != "x$new_path"; then
22221    BOOT_JDK="$new_path"
22222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22224  fi
22225
22226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22228
22229  else
22230    # We're on a posix platform. Hooray! :)
22231    path="$BOOT_JDK"
22232    has_space=`$ECHO "$path" | $GREP " "`
22233    if test "x$has_space" != x; then
22234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22236      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22237    fi
22238
22239    # Use eval to expand a potential ~
22240    eval path="$path"
22241    if test ! -f "$path" && test ! -d "$path"; then
22242      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22243    fi
22244
22245    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22246  fi
22247
22248              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22249$as_echo_n "checking for Boot JDK... " >&6; }
22250              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22251$as_echo "$BOOT_JDK" >&6; }
22252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22253$as_echo_n "checking Boot JDK version... " >&6; }
22254              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22255              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22256$as_echo "$BOOT_JDK_VERSION" >&6; }
22257            fi # end check jdk version
22258          fi # end check rt.jar
22259        fi # end check javac
22260      fi # end check java
22261    fi # end check boot jdk found
22262  fi
22263
22264
22265  # Test: Is there a JDK installed in default, well-known locations?
22266
22267  if test "x$BOOT_JDK_FOUND" = xno; then
22268    # Now execute the test
22269
22270  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22271
22272  if test "x$BOOT_JDK_FOUND" = xno; then
22273    # Now execute the test
22274
22275  if test "x$ProgramW6432" != x; then
22276    VIRTUAL_DIR="$ProgramW6432/Java"
22277
22278  windows_path="$VIRTUAL_DIR"
22279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22280    unix_path=`$CYGPATH -u "$windows_path"`
22281    VIRTUAL_DIR="$unix_path"
22282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22284    VIRTUAL_DIR="$unix_path"
22285  fi
22286
22287
22288  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22289  BOOT_JDK_SUFFIX=""
22290  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22291  if test "x$ALL_JDKS_FOUND" != x; then
22292    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22293
22294  if test "x$BOOT_JDK_FOUND" = xno; then
22295    # Now execute the test
22296
22297        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22298        if test -d "$BOOT_JDK"; then
22299          BOOT_JDK_FOUND=maybe
22300          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22301$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22302        fi
22303
22304
22305    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22306    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22307      # Do we have a bin/java?
22308      if test ! -x "$BOOT_JDK/bin/java"; then
22309        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22311        BOOT_JDK_FOUND=no
22312      else
22313        # Do we have a bin/javac?
22314        if test ! -x "$BOOT_JDK/bin/javac"; then
22315          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22317          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22318$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22319          BOOT_JDK_FOUND=no
22320        else
22321          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22322          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22323            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22325            BOOT_JDK_FOUND=no
22326          else
22327            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22328            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22329
22330            # Extra M4 quote needed to protect [] in grep expression.
22331            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22332            if test "x$FOUND_CORRECT_VERSION" = x; then
22333              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22335              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22336$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22337              BOOT_JDK_FOUND=no
22338            else
22339              # We're done! :-)
22340              BOOT_JDK_FOUND=yes
22341
22342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22343
22344  # Input might be given as Windows format, start by converting to
22345  # unix format.
22346  path="$BOOT_JDK"
22347  new_path=`$CYGPATH -u "$path"`
22348
22349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22352  # "foo.exe" is OK but "foo" is an error.
22353  #
22354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22355  # It is also a way to make sure we got the proper file name for the real test later on.
22356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22357  if test "x$test_shortpath" = x; then
22358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22360    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22361  fi
22362
22363  # Call helper function which possibly converts this using DOS-style short mode.
22364  # If so, the updated path is stored in $new_path.
22365
22366  input_path="$new_path"
22367  # Check if we need to convert this using DOS-style short mode. If the path
22368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22369  # take no chances and rewrite it.
22370  # Note: m4 eats our [], so we need to use [ and ] instead.
22371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22372  if test "x$has_forbidden_chars" != x; then
22373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22377      # Going to short mode and back again did indeed matter. Since short mode is
22378      # case insensitive, let's make it lowercase to improve readability.
22379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22380      # Now convert it back to Unix-stile (cygpath)
22381      input_path=`$CYGPATH -u "$shortmode_path"`
22382      new_path="$input_path"
22383    fi
22384  fi
22385
22386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22387  if test "x$test_cygdrive_prefix" = x; then
22388    # As a simple fix, exclude /usr/bin since it's not a real path.
22389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22391      # a path prefixed by /cygdrive for fixpath to work.
22392      new_path="$CYGWIN_ROOT_PATH$input_path"
22393    fi
22394  fi
22395
22396
22397  if test "x$path" != "x$new_path"; then
22398    BOOT_JDK="$new_path"
22399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22401  fi
22402
22403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22404
22405  path="$BOOT_JDK"
22406  has_colon=`$ECHO $path | $GREP ^.:`
22407  new_path="$path"
22408  if test "x$has_colon" = x; then
22409    # Not in mixed or Windows style, start by that.
22410    new_path=`cmd //c echo $path`
22411  fi
22412
22413
22414  input_path="$new_path"
22415  # Check if we need to convert this using DOS-style short mode. If the path
22416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22417  # take no chances and rewrite it.
22418  # Note: m4 eats our [], so we need to use [ and ] instead.
22419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22420  if test "x$has_forbidden_chars" != x; then
22421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22423  fi
22424
22425
22426  windows_path="$new_path"
22427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22428    unix_path=`$CYGPATH -u "$windows_path"`
22429    new_path="$unix_path"
22430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22432    new_path="$unix_path"
22433  fi
22434
22435  if test "x$path" != "x$new_path"; then
22436    BOOT_JDK="$new_path"
22437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22439  fi
22440
22441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22443
22444  else
22445    # We're on a posix platform. Hooray! :)
22446    path="$BOOT_JDK"
22447    has_space=`$ECHO "$path" | $GREP " "`
22448    if test "x$has_space" != x; then
22449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22451      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22452    fi
22453
22454    # Use eval to expand a potential ~
22455    eval path="$path"
22456    if test ! -f "$path" && test ! -d "$path"; then
22457      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22458    fi
22459
22460    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22461  fi
22462
22463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22464$as_echo_n "checking for Boot JDK... " >&6; }
22465              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22466$as_echo "$BOOT_JDK" >&6; }
22467              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22468$as_echo_n "checking Boot JDK version... " >&6; }
22469              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22470              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22471$as_echo "$BOOT_JDK_VERSION" >&6; }
22472            fi # end check jdk version
22473          fi # end check rt.jar
22474        fi # end check javac
22475      fi # end check java
22476    fi # end check boot jdk found
22477  fi
22478
22479    done
22480  fi
22481
22482  fi
22483
22484
22485    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22486    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22487      # Do we have a bin/java?
22488      if test ! -x "$BOOT_JDK/bin/java"; then
22489        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22491        BOOT_JDK_FOUND=no
22492      else
22493        # Do we have a bin/javac?
22494        if test ! -x "$BOOT_JDK/bin/javac"; then
22495          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22497          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22498$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22499          BOOT_JDK_FOUND=no
22500        else
22501          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22502          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22503            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22505            BOOT_JDK_FOUND=no
22506          else
22507            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22508            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22509
22510            # Extra M4 quote needed to protect [] in grep expression.
22511            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22512            if test "x$FOUND_CORRECT_VERSION" = x; then
22513              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22515              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22516$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22517              BOOT_JDK_FOUND=no
22518            else
22519              # We're done! :-)
22520              BOOT_JDK_FOUND=yes
22521
22522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22523
22524  # Input might be given as Windows format, start by converting to
22525  # unix format.
22526  path="$BOOT_JDK"
22527  new_path=`$CYGPATH -u "$path"`
22528
22529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22532  # "foo.exe" is OK but "foo" is an error.
22533  #
22534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22535  # It is also a way to make sure we got the proper file name for the real test later on.
22536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22537  if test "x$test_shortpath" = x; then
22538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22540    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22541  fi
22542
22543  # Call helper function which possibly converts this using DOS-style short mode.
22544  # If so, the updated path is stored in $new_path.
22545
22546  input_path="$new_path"
22547  # Check if we need to convert this using DOS-style short mode. If the path
22548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22549  # take no chances and rewrite it.
22550  # Note: m4 eats our [], so we need to use [ and ] instead.
22551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22552  if test "x$has_forbidden_chars" != x; then
22553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22557      # Going to short mode and back again did indeed matter. Since short mode is
22558      # case insensitive, let's make it lowercase to improve readability.
22559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22560      # Now convert it back to Unix-stile (cygpath)
22561      input_path=`$CYGPATH -u "$shortmode_path"`
22562      new_path="$input_path"
22563    fi
22564  fi
22565
22566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22567  if test "x$test_cygdrive_prefix" = x; then
22568    # As a simple fix, exclude /usr/bin since it's not a real path.
22569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22571      # a path prefixed by /cygdrive for fixpath to work.
22572      new_path="$CYGWIN_ROOT_PATH$input_path"
22573    fi
22574  fi
22575
22576
22577  if test "x$path" != "x$new_path"; then
22578    BOOT_JDK="$new_path"
22579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22581  fi
22582
22583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22584
22585  path="$BOOT_JDK"
22586  has_colon=`$ECHO $path | $GREP ^.:`
22587  new_path="$path"
22588  if test "x$has_colon" = x; then
22589    # Not in mixed or Windows style, start by that.
22590    new_path=`cmd //c echo $path`
22591  fi
22592
22593
22594  input_path="$new_path"
22595  # Check if we need to convert this using DOS-style short mode. If the path
22596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22597  # take no chances and rewrite it.
22598  # Note: m4 eats our [], so we need to use [ and ] instead.
22599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22600  if test "x$has_forbidden_chars" != x; then
22601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22603  fi
22604
22605
22606  windows_path="$new_path"
22607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22608    unix_path=`$CYGPATH -u "$windows_path"`
22609    new_path="$unix_path"
22610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22612    new_path="$unix_path"
22613  fi
22614
22615  if test "x$path" != "x$new_path"; then
22616    BOOT_JDK="$new_path"
22617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22619  fi
22620
22621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22623
22624  else
22625    # We're on a posix platform. Hooray! :)
22626    path="$BOOT_JDK"
22627    has_space=`$ECHO "$path" | $GREP " "`
22628    if test "x$has_space" != x; then
22629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22631      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22632    fi
22633
22634    # Use eval to expand a potential ~
22635    eval path="$path"
22636    if test ! -f "$path" && test ! -d "$path"; then
22637      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22638    fi
22639
22640    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22641  fi
22642
22643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22644$as_echo_n "checking for Boot JDK... " >&6; }
22645              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22646$as_echo "$BOOT_JDK" >&6; }
22647              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22648$as_echo_n "checking Boot JDK version... " >&6; }
22649              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22650              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22651$as_echo "$BOOT_JDK_VERSION" >&6; }
22652            fi # end check jdk version
22653          fi # end check rt.jar
22654        fi # end check javac
22655      fi # end check java
22656    fi # end check boot jdk found
22657  fi
22658
22659
22660  if test "x$BOOT_JDK_FOUND" = xno; then
22661    # Now execute the test
22662
22663  if test "x$PROGRAMW6432" != x; then
22664    VIRTUAL_DIR="$PROGRAMW6432/Java"
22665
22666  windows_path="$VIRTUAL_DIR"
22667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22668    unix_path=`$CYGPATH -u "$windows_path"`
22669    VIRTUAL_DIR="$unix_path"
22670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22672    VIRTUAL_DIR="$unix_path"
22673  fi
22674
22675
22676  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22677  BOOT_JDK_SUFFIX=""
22678  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22679  if test "x$ALL_JDKS_FOUND" != x; then
22680    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22681
22682  if test "x$BOOT_JDK_FOUND" = xno; then
22683    # Now execute the test
22684
22685        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22686        if test -d "$BOOT_JDK"; then
22687          BOOT_JDK_FOUND=maybe
22688          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22689$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22690        fi
22691
22692
22693    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22694    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22695      # Do we have a bin/java?
22696      if test ! -x "$BOOT_JDK/bin/java"; then
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22699        BOOT_JDK_FOUND=no
22700      else
22701        # Do we have a bin/javac?
22702        if test ! -x "$BOOT_JDK/bin/javac"; then
22703          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22705          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22706$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22707          BOOT_JDK_FOUND=no
22708        else
22709          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22710          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22713            BOOT_JDK_FOUND=no
22714          else
22715            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22716            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22717
22718            # Extra M4 quote needed to protect [] in grep expression.
22719            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22720            if test "x$FOUND_CORRECT_VERSION" = x; then
22721              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22723              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22724$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22725              BOOT_JDK_FOUND=no
22726            else
22727              # We're done! :-)
22728              BOOT_JDK_FOUND=yes
22729
22730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22731
22732  # Input might be given as Windows format, start by converting to
22733  # unix format.
22734  path="$BOOT_JDK"
22735  new_path=`$CYGPATH -u "$path"`
22736
22737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22740  # "foo.exe" is OK but "foo" is an error.
22741  #
22742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22743  # It is also a way to make sure we got the proper file name for the real test later on.
22744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22745  if test "x$test_shortpath" = x; then
22746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22748    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22749  fi
22750
22751  # Call helper function which possibly converts this using DOS-style short mode.
22752  # If so, the updated path is stored in $new_path.
22753
22754  input_path="$new_path"
22755  # Check if we need to convert this using DOS-style short mode. If the path
22756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22757  # take no chances and rewrite it.
22758  # Note: m4 eats our [], so we need to use [ and ] instead.
22759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22760  if test "x$has_forbidden_chars" != x; then
22761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22765      # Going to short mode and back again did indeed matter. Since short mode is
22766      # case insensitive, let's make it lowercase to improve readability.
22767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22768      # Now convert it back to Unix-stile (cygpath)
22769      input_path=`$CYGPATH -u "$shortmode_path"`
22770      new_path="$input_path"
22771    fi
22772  fi
22773
22774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22775  if test "x$test_cygdrive_prefix" = x; then
22776    # As a simple fix, exclude /usr/bin since it's not a real path.
22777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22779      # a path prefixed by /cygdrive for fixpath to work.
22780      new_path="$CYGWIN_ROOT_PATH$input_path"
22781    fi
22782  fi
22783
22784
22785  if test "x$path" != "x$new_path"; then
22786    BOOT_JDK="$new_path"
22787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22789  fi
22790
22791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22792
22793  path="$BOOT_JDK"
22794  has_colon=`$ECHO $path | $GREP ^.:`
22795  new_path="$path"
22796  if test "x$has_colon" = x; then
22797    # Not in mixed or Windows style, start by that.
22798    new_path=`cmd //c echo $path`
22799  fi
22800
22801
22802  input_path="$new_path"
22803  # Check if we need to convert this using DOS-style short mode. If the path
22804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22805  # take no chances and rewrite it.
22806  # Note: m4 eats our [], so we need to use [ and ] instead.
22807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22808  if test "x$has_forbidden_chars" != x; then
22809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22811  fi
22812
22813
22814  windows_path="$new_path"
22815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22816    unix_path=`$CYGPATH -u "$windows_path"`
22817    new_path="$unix_path"
22818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22820    new_path="$unix_path"
22821  fi
22822
22823  if test "x$path" != "x$new_path"; then
22824    BOOT_JDK="$new_path"
22825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22827  fi
22828
22829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22831
22832  else
22833    # We're on a posix platform. Hooray! :)
22834    path="$BOOT_JDK"
22835    has_space=`$ECHO "$path" | $GREP " "`
22836    if test "x$has_space" != x; then
22837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22839      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22840    fi
22841
22842    # Use eval to expand a potential ~
22843    eval path="$path"
22844    if test ! -f "$path" && test ! -d "$path"; then
22845      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22846    fi
22847
22848    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22849  fi
22850
22851              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22852$as_echo_n "checking for Boot JDK... " >&6; }
22853              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22854$as_echo "$BOOT_JDK" >&6; }
22855              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22856$as_echo_n "checking Boot JDK version... " >&6; }
22857              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22858              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22859$as_echo "$BOOT_JDK_VERSION" >&6; }
22860            fi # end check jdk version
22861          fi # end check rt.jar
22862        fi # end check javac
22863      fi # end check java
22864    fi # end check boot jdk found
22865  fi
22866
22867    done
22868  fi
22869
22870  fi
22871
22872
22873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22875      # Do we have a bin/java?
22876      if test ! -x "$BOOT_JDK/bin/java"; then
22877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22879        BOOT_JDK_FOUND=no
22880      else
22881        # Do we have a bin/javac?
22882        if test ! -x "$BOOT_JDK/bin/javac"; then
22883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22887          BOOT_JDK_FOUND=no
22888        else
22889          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22890          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22891            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22893            BOOT_JDK_FOUND=no
22894          else
22895            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22897
22898            # Extra M4 quote needed to protect [] in grep expression.
22899            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22900            if test "x$FOUND_CORRECT_VERSION" = x; then
22901              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22903              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22904$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22905              BOOT_JDK_FOUND=no
22906            else
22907              # We're done! :-)
22908              BOOT_JDK_FOUND=yes
22909
22910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22911
22912  # Input might be given as Windows format, start by converting to
22913  # unix format.
22914  path="$BOOT_JDK"
22915  new_path=`$CYGPATH -u "$path"`
22916
22917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22920  # "foo.exe" is OK but "foo" is an error.
22921  #
22922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22923  # It is also a way to make sure we got the proper file name for the real test later on.
22924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22925  if test "x$test_shortpath" = x; then
22926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22928    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22929  fi
22930
22931  # Call helper function which possibly converts this using DOS-style short mode.
22932  # If so, the updated path is stored in $new_path.
22933
22934  input_path="$new_path"
22935  # Check if we need to convert this using DOS-style short mode. If the path
22936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22937  # take no chances and rewrite it.
22938  # Note: m4 eats our [], so we need to use [ and ] instead.
22939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22940  if test "x$has_forbidden_chars" != x; then
22941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22945      # Going to short mode and back again did indeed matter. Since short mode is
22946      # case insensitive, let's make it lowercase to improve readability.
22947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22948      # Now convert it back to Unix-stile (cygpath)
22949      input_path=`$CYGPATH -u "$shortmode_path"`
22950      new_path="$input_path"
22951    fi
22952  fi
22953
22954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22955  if test "x$test_cygdrive_prefix" = x; then
22956    # As a simple fix, exclude /usr/bin since it's not a real path.
22957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22959      # a path prefixed by /cygdrive for fixpath to work.
22960      new_path="$CYGWIN_ROOT_PATH$input_path"
22961    fi
22962  fi
22963
22964
22965  if test "x$path" != "x$new_path"; then
22966    BOOT_JDK="$new_path"
22967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22969  fi
22970
22971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22972
22973  path="$BOOT_JDK"
22974  has_colon=`$ECHO $path | $GREP ^.:`
22975  new_path="$path"
22976  if test "x$has_colon" = x; then
22977    # Not in mixed or Windows style, start by that.
22978    new_path=`cmd //c echo $path`
22979  fi
22980
22981
22982  input_path="$new_path"
22983  # Check if we need to convert this using DOS-style short mode. If the path
22984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22985  # take no chances and rewrite it.
22986  # Note: m4 eats our [], so we need to use [ and ] instead.
22987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22988  if test "x$has_forbidden_chars" != x; then
22989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22991  fi
22992
22993
22994  windows_path="$new_path"
22995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22996    unix_path=`$CYGPATH -u "$windows_path"`
22997    new_path="$unix_path"
22998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23000    new_path="$unix_path"
23001  fi
23002
23003  if test "x$path" != "x$new_path"; then
23004    BOOT_JDK="$new_path"
23005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23007  fi
23008
23009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23011
23012  else
23013    # We're on a posix platform. Hooray! :)
23014    path="$BOOT_JDK"
23015    has_space=`$ECHO "$path" | $GREP " "`
23016    if test "x$has_space" != x; then
23017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23019      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23020    fi
23021
23022    # Use eval to expand a potential ~
23023    eval path="$path"
23024    if test ! -f "$path" && test ! -d "$path"; then
23025      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23026    fi
23027
23028    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23029  fi
23030
23031              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23032$as_echo_n "checking for Boot JDK... " >&6; }
23033              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23034$as_echo "$BOOT_JDK" >&6; }
23035              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23036$as_echo_n "checking Boot JDK version... " >&6; }
23037              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23038              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23039$as_echo "$BOOT_JDK_VERSION" >&6; }
23040            fi # end check jdk version
23041          fi # end check rt.jar
23042        fi # end check javac
23043      fi # end check java
23044    fi # end check boot jdk found
23045  fi
23046
23047
23048  if test "x$BOOT_JDK_FOUND" = xno; then
23049    # Now execute the test
23050
23051  if test "x$PROGRAMFILES" != x; then
23052    VIRTUAL_DIR="$PROGRAMFILES/Java"
23053
23054  windows_path="$VIRTUAL_DIR"
23055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23056    unix_path=`$CYGPATH -u "$windows_path"`
23057    VIRTUAL_DIR="$unix_path"
23058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23060    VIRTUAL_DIR="$unix_path"
23061  fi
23062
23063
23064  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23065  BOOT_JDK_SUFFIX=""
23066  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23067  if test "x$ALL_JDKS_FOUND" != x; then
23068    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23069
23070  if test "x$BOOT_JDK_FOUND" = xno; then
23071    # Now execute the test
23072
23073        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23074        if test -d "$BOOT_JDK"; then
23075          BOOT_JDK_FOUND=maybe
23076          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23077$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23078        fi
23079
23080
23081    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23082    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23083      # Do we have a bin/java?
23084      if test ! -x "$BOOT_JDK/bin/java"; then
23085        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23087        BOOT_JDK_FOUND=no
23088      else
23089        # Do we have a bin/javac?
23090        if test ! -x "$BOOT_JDK/bin/javac"; then
23091          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23093          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23094$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23095          BOOT_JDK_FOUND=no
23096        else
23097          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23098          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23101            BOOT_JDK_FOUND=no
23102          else
23103            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23105
23106            # Extra M4 quote needed to protect [] in grep expression.
23107            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23108            if test "x$FOUND_CORRECT_VERSION" = x; then
23109              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23111              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23112$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23113              BOOT_JDK_FOUND=no
23114            else
23115              # We're done! :-)
23116              BOOT_JDK_FOUND=yes
23117
23118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23119
23120  # Input might be given as Windows format, start by converting to
23121  # unix format.
23122  path="$BOOT_JDK"
23123  new_path=`$CYGPATH -u "$path"`
23124
23125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23128  # "foo.exe" is OK but "foo" is an error.
23129  #
23130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23131  # It is also a way to make sure we got the proper file name for the real test later on.
23132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23133  if test "x$test_shortpath" = x; then
23134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23137  fi
23138
23139  # Call helper function which possibly converts this using DOS-style short mode.
23140  # If so, the updated path is stored in $new_path.
23141
23142  input_path="$new_path"
23143  # Check if we need to convert this using DOS-style short mode. If the path
23144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23145  # take no chances and rewrite it.
23146  # Note: m4 eats our [], so we need to use [ and ] instead.
23147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23148  if test "x$has_forbidden_chars" != x; then
23149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23153      # Going to short mode and back again did indeed matter. Since short mode is
23154      # case insensitive, let's make it lowercase to improve readability.
23155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23156      # Now convert it back to Unix-stile (cygpath)
23157      input_path=`$CYGPATH -u "$shortmode_path"`
23158      new_path="$input_path"
23159    fi
23160  fi
23161
23162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23163  if test "x$test_cygdrive_prefix" = x; then
23164    # As a simple fix, exclude /usr/bin since it's not a real path.
23165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23167      # a path prefixed by /cygdrive for fixpath to work.
23168      new_path="$CYGWIN_ROOT_PATH$input_path"
23169    fi
23170  fi
23171
23172
23173  if test "x$path" != "x$new_path"; then
23174    BOOT_JDK="$new_path"
23175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23177  fi
23178
23179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23180
23181  path="$BOOT_JDK"
23182  has_colon=`$ECHO $path | $GREP ^.:`
23183  new_path="$path"
23184  if test "x$has_colon" = x; then
23185    # Not in mixed or Windows style, start by that.
23186    new_path=`cmd //c echo $path`
23187  fi
23188
23189
23190  input_path="$new_path"
23191  # Check if we need to convert this using DOS-style short mode. If the path
23192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23193  # take no chances and rewrite it.
23194  # Note: m4 eats our [], so we need to use [ and ] instead.
23195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23196  if test "x$has_forbidden_chars" != x; then
23197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23199  fi
23200
23201
23202  windows_path="$new_path"
23203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23204    unix_path=`$CYGPATH -u "$windows_path"`
23205    new_path="$unix_path"
23206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23208    new_path="$unix_path"
23209  fi
23210
23211  if test "x$path" != "x$new_path"; then
23212    BOOT_JDK="$new_path"
23213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23215  fi
23216
23217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23219
23220  else
23221    # We're on a posix platform. Hooray! :)
23222    path="$BOOT_JDK"
23223    has_space=`$ECHO "$path" | $GREP " "`
23224    if test "x$has_space" != x; then
23225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23228    fi
23229
23230    # Use eval to expand a potential ~
23231    eval path="$path"
23232    if test ! -f "$path" && test ! -d "$path"; then
23233      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23234    fi
23235
23236    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23237  fi
23238
23239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23240$as_echo_n "checking for Boot JDK... " >&6; }
23241              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23242$as_echo "$BOOT_JDK" >&6; }
23243              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23244$as_echo_n "checking Boot JDK version... " >&6; }
23245              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23246              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23247$as_echo "$BOOT_JDK_VERSION" >&6; }
23248            fi # end check jdk version
23249          fi # end check rt.jar
23250        fi # end check javac
23251      fi # end check java
23252    fi # end check boot jdk found
23253  fi
23254
23255    done
23256  fi
23257
23258  fi
23259
23260
23261    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23262    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23263      # Do we have a bin/java?
23264      if test ! -x "$BOOT_JDK/bin/java"; then
23265        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23267        BOOT_JDK_FOUND=no
23268      else
23269        # Do we have a bin/javac?
23270        if test ! -x "$BOOT_JDK/bin/javac"; then
23271          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23273          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23274$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23275          BOOT_JDK_FOUND=no
23276        else
23277          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23278          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23279            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23281            BOOT_JDK_FOUND=no
23282          else
23283            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23284            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23285
23286            # Extra M4 quote needed to protect [] in grep expression.
23287            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23288            if test "x$FOUND_CORRECT_VERSION" = x; then
23289              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23291              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23292$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23293              BOOT_JDK_FOUND=no
23294            else
23295              # We're done! :-)
23296              BOOT_JDK_FOUND=yes
23297
23298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23299
23300  # Input might be given as Windows format, start by converting to
23301  # unix format.
23302  path="$BOOT_JDK"
23303  new_path=`$CYGPATH -u "$path"`
23304
23305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23308  # "foo.exe" is OK but "foo" is an error.
23309  #
23310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23311  # It is also a way to make sure we got the proper file name for the real test later on.
23312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23313  if test "x$test_shortpath" = x; then
23314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23316    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23317  fi
23318
23319  # Call helper function which possibly converts this using DOS-style short mode.
23320  # If so, the updated path is stored in $new_path.
23321
23322  input_path="$new_path"
23323  # Check if we need to convert this using DOS-style short mode. If the path
23324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23325  # take no chances and rewrite it.
23326  # Note: m4 eats our [], so we need to use [ and ] instead.
23327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23328  if test "x$has_forbidden_chars" != x; then
23329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23333      # Going to short mode and back again did indeed matter. Since short mode is
23334      # case insensitive, let's make it lowercase to improve readability.
23335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23336      # Now convert it back to Unix-stile (cygpath)
23337      input_path=`$CYGPATH -u "$shortmode_path"`
23338      new_path="$input_path"
23339    fi
23340  fi
23341
23342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23343  if test "x$test_cygdrive_prefix" = x; then
23344    # As a simple fix, exclude /usr/bin since it's not a real path.
23345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23347      # a path prefixed by /cygdrive for fixpath to work.
23348      new_path="$CYGWIN_ROOT_PATH$input_path"
23349    fi
23350  fi
23351
23352
23353  if test "x$path" != "x$new_path"; then
23354    BOOT_JDK="$new_path"
23355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23357  fi
23358
23359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23360
23361  path="$BOOT_JDK"
23362  has_colon=`$ECHO $path | $GREP ^.:`
23363  new_path="$path"
23364  if test "x$has_colon" = x; then
23365    # Not in mixed or Windows style, start by that.
23366    new_path=`cmd //c echo $path`
23367  fi
23368
23369
23370  input_path="$new_path"
23371  # Check if we need to convert this using DOS-style short mode. If the path
23372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23373  # take no chances and rewrite it.
23374  # Note: m4 eats our [], so we need to use [ and ] instead.
23375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23376  if test "x$has_forbidden_chars" != x; then
23377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23379  fi
23380
23381
23382  windows_path="$new_path"
23383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23384    unix_path=`$CYGPATH -u "$windows_path"`
23385    new_path="$unix_path"
23386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23388    new_path="$unix_path"
23389  fi
23390
23391  if test "x$path" != "x$new_path"; then
23392    BOOT_JDK="$new_path"
23393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23395  fi
23396
23397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23399
23400  else
23401    # We're on a posix platform. Hooray! :)
23402    path="$BOOT_JDK"
23403    has_space=`$ECHO "$path" | $GREP " "`
23404    if test "x$has_space" != x; then
23405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23407      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23408    fi
23409
23410    # Use eval to expand a potential ~
23411    eval path="$path"
23412    if test ! -f "$path" && test ! -d "$path"; then
23413      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23414    fi
23415
23416    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23417  fi
23418
23419              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23420$as_echo_n "checking for Boot JDK... " >&6; }
23421              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23422$as_echo "$BOOT_JDK" >&6; }
23423              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23424$as_echo_n "checking Boot JDK version... " >&6; }
23425              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23426              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23427$as_echo "$BOOT_JDK_VERSION" >&6; }
23428            fi # end check jdk version
23429          fi # end check rt.jar
23430        fi # end check javac
23431      fi # end check java
23432    fi # end check boot jdk found
23433  fi
23434
23435
23436  if test "x$BOOT_JDK_FOUND" = xno; then
23437    # Now execute the test
23438
23439  if test "x$ProgramFiles" != x; then
23440    VIRTUAL_DIR="$ProgramFiles/Java"
23441
23442  windows_path="$VIRTUAL_DIR"
23443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23444    unix_path=`$CYGPATH -u "$windows_path"`
23445    VIRTUAL_DIR="$unix_path"
23446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23448    VIRTUAL_DIR="$unix_path"
23449  fi
23450
23451
23452  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23453  BOOT_JDK_SUFFIX=""
23454  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23455  if test "x$ALL_JDKS_FOUND" != x; then
23456    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23457
23458  if test "x$BOOT_JDK_FOUND" = xno; then
23459    # Now execute the test
23460
23461        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23462        if test -d "$BOOT_JDK"; then
23463          BOOT_JDK_FOUND=maybe
23464          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23465$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23466        fi
23467
23468
23469    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23470    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23471      # Do we have a bin/java?
23472      if test ! -x "$BOOT_JDK/bin/java"; then
23473        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23475        BOOT_JDK_FOUND=no
23476      else
23477        # Do we have a bin/javac?
23478        if test ! -x "$BOOT_JDK/bin/javac"; then
23479          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23481          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23482$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23483          BOOT_JDK_FOUND=no
23484        else
23485          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23486          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23489            BOOT_JDK_FOUND=no
23490          else
23491            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23493
23494            # Extra M4 quote needed to protect [] in grep expression.
23495            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23496            if test "x$FOUND_CORRECT_VERSION" = x; then
23497              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23499              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23500$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23501              BOOT_JDK_FOUND=no
23502            else
23503              # We're done! :-)
23504              BOOT_JDK_FOUND=yes
23505
23506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23507
23508  # Input might be given as Windows format, start by converting to
23509  # unix format.
23510  path="$BOOT_JDK"
23511  new_path=`$CYGPATH -u "$path"`
23512
23513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23516  # "foo.exe" is OK but "foo" is an error.
23517  #
23518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23519  # It is also a way to make sure we got the proper file name for the real test later on.
23520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23521  if test "x$test_shortpath" = x; then
23522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23525  fi
23526
23527  # Call helper function which possibly converts this using DOS-style short mode.
23528  # If so, the updated path is stored in $new_path.
23529
23530  input_path="$new_path"
23531  # Check if we need to convert this using DOS-style short mode. If the path
23532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23533  # take no chances and rewrite it.
23534  # Note: m4 eats our [], so we need to use [ and ] instead.
23535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23536  if test "x$has_forbidden_chars" != x; then
23537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23541      # Going to short mode and back again did indeed matter. Since short mode is
23542      # case insensitive, let's make it lowercase to improve readability.
23543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23544      # Now convert it back to Unix-stile (cygpath)
23545      input_path=`$CYGPATH -u "$shortmode_path"`
23546      new_path="$input_path"
23547    fi
23548  fi
23549
23550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23551  if test "x$test_cygdrive_prefix" = x; then
23552    # As a simple fix, exclude /usr/bin since it's not a real path.
23553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23555      # a path prefixed by /cygdrive for fixpath to work.
23556      new_path="$CYGWIN_ROOT_PATH$input_path"
23557    fi
23558  fi
23559
23560
23561  if test "x$path" != "x$new_path"; then
23562    BOOT_JDK="$new_path"
23563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23565  fi
23566
23567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23568
23569  path="$BOOT_JDK"
23570  has_colon=`$ECHO $path | $GREP ^.:`
23571  new_path="$path"
23572  if test "x$has_colon" = x; then
23573    # Not in mixed or Windows style, start by that.
23574    new_path=`cmd //c echo $path`
23575  fi
23576
23577
23578  input_path="$new_path"
23579  # Check if we need to convert this using DOS-style short mode. If the path
23580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23581  # take no chances and rewrite it.
23582  # Note: m4 eats our [], so we need to use [ and ] instead.
23583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23584  if test "x$has_forbidden_chars" != x; then
23585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23587  fi
23588
23589
23590  windows_path="$new_path"
23591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23592    unix_path=`$CYGPATH -u "$windows_path"`
23593    new_path="$unix_path"
23594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23596    new_path="$unix_path"
23597  fi
23598
23599  if test "x$path" != "x$new_path"; then
23600    BOOT_JDK="$new_path"
23601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23603  fi
23604
23605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23607
23608  else
23609    # We're on a posix platform. Hooray! :)
23610    path="$BOOT_JDK"
23611    has_space=`$ECHO "$path" | $GREP " "`
23612    if test "x$has_space" != x; then
23613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23615      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23616    fi
23617
23618    # Use eval to expand a potential ~
23619    eval path="$path"
23620    if test ! -f "$path" && test ! -d "$path"; then
23621      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23622    fi
23623
23624    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23625  fi
23626
23627              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23628$as_echo_n "checking for Boot JDK... " >&6; }
23629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23630$as_echo "$BOOT_JDK" >&6; }
23631              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23632$as_echo_n "checking Boot JDK version... " >&6; }
23633              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23634              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23635$as_echo "$BOOT_JDK_VERSION" >&6; }
23636            fi # end check jdk version
23637          fi # end check rt.jar
23638        fi # end check javac
23639      fi # end check java
23640    fi # end check boot jdk found
23641  fi
23642
23643    done
23644  fi
23645
23646  fi
23647
23648
23649    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23650    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23651      # Do we have a bin/java?
23652      if test ! -x "$BOOT_JDK/bin/java"; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23655        BOOT_JDK_FOUND=no
23656      else
23657        # Do we have a bin/javac?
23658        if test ! -x "$BOOT_JDK/bin/javac"; then
23659          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23661          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23662$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23663          BOOT_JDK_FOUND=no
23664        else
23665          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23666          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23667            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23669            BOOT_JDK_FOUND=no
23670          else
23671            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23672            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23673
23674            # Extra M4 quote needed to protect [] in grep expression.
23675            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23676            if test "x$FOUND_CORRECT_VERSION" = x; then
23677              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23679              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23680$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23681              BOOT_JDK_FOUND=no
23682            else
23683              # We're done! :-)
23684              BOOT_JDK_FOUND=yes
23685
23686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23687
23688  # Input might be given as Windows format, start by converting to
23689  # unix format.
23690  path="$BOOT_JDK"
23691  new_path=`$CYGPATH -u "$path"`
23692
23693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23696  # "foo.exe" is OK but "foo" is an error.
23697  #
23698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23699  # It is also a way to make sure we got the proper file name for the real test later on.
23700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23701  if test "x$test_shortpath" = x; then
23702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23704    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23705  fi
23706
23707  # Call helper function which possibly converts this using DOS-style short mode.
23708  # If so, the updated path is stored in $new_path.
23709
23710  input_path="$new_path"
23711  # Check if we need to convert this using DOS-style short mode. If the path
23712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23713  # take no chances and rewrite it.
23714  # Note: m4 eats our [], so we need to use [ and ] instead.
23715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23716  if test "x$has_forbidden_chars" != x; then
23717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23721      # Going to short mode and back again did indeed matter. Since short mode is
23722      # case insensitive, let's make it lowercase to improve readability.
23723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23724      # Now convert it back to Unix-stile (cygpath)
23725      input_path=`$CYGPATH -u "$shortmode_path"`
23726      new_path="$input_path"
23727    fi
23728  fi
23729
23730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23731  if test "x$test_cygdrive_prefix" = x; then
23732    # As a simple fix, exclude /usr/bin since it's not a real path.
23733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23735      # a path prefixed by /cygdrive for fixpath to work.
23736      new_path="$CYGWIN_ROOT_PATH$input_path"
23737    fi
23738  fi
23739
23740
23741  if test "x$path" != "x$new_path"; then
23742    BOOT_JDK="$new_path"
23743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23744$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23745  fi
23746
23747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23748
23749  path="$BOOT_JDK"
23750  has_colon=`$ECHO $path | $GREP ^.:`
23751  new_path="$path"
23752  if test "x$has_colon" = x; then
23753    # Not in mixed or Windows style, start by that.
23754    new_path=`cmd //c echo $path`
23755  fi
23756
23757
23758  input_path="$new_path"
23759  # Check if we need to convert this using DOS-style short mode. If the path
23760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23761  # take no chances and rewrite it.
23762  # Note: m4 eats our [], so we need to use [ and ] instead.
23763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23764  if test "x$has_forbidden_chars" != x; then
23765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23767  fi
23768
23769
23770  windows_path="$new_path"
23771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23772    unix_path=`$CYGPATH -u "$windows_path"`
23773    new_path="$unix_path"
23774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23776    new_path="$unix_path"
23777  fi
23778
23779  if test "x$path" != "x$new_path"; then
23780    BOOT_JDK="$new_path"
23781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23782$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23783  fi
23784
23785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23787
23788  else
23789    # We're on a posix platform. Hooray! :)
23790    path="$BOOT_JDK"
23791    has_space=`$ECHO "$path" | $GREP " "`
23792    if test "x$has_space" != x; then
23793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23795      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23796    fi
23797
23798    # Use eval to expand a potential ~
23799    eval path="$path"
23800    if test ! -f "$path" && test ! -d "$path"; then
23801      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23802    fi
23803
23804    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23805  fi
23806
23807              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23808$as_echo_n "checking for Boot JDK... " >&6; }
23809              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23810$as_echo "$BOOT_JDK" >&6; }
23811              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23812$as_echo_n "checking Boot JDK version... " >&6; }
23813              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23814              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23815$as_echo "$BOOT_JDK_VERSION" >&6; }
23816            fi # end check jdk version
23817          fi # end check rt.jar
23818        fi # end check javac
23819      fi # end check java
23820    fi # end check boot jdk found
23821  fi
23822
23823
23824  if test "x$BOOT_JDK_FOUND" = xno; then
23825    # Now execute the test
23826
23827  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23828  BOOT_JDK_SUFFIX=""
23829  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23830  if test "x$ALL_JDKS_FOUND" != x; then
23831    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23832
23833  if test "x$BOOT_JDK_FOUND" = xno; then
23834    # Now execute the test
23835
23836        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23837        if test -d "$BOOT_JDK"; then
23838          BOOT_JDK_FOUND=maybe
23839          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23840$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23841        fi
23842
23843
23844    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23845    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23846      # Do we have a bin/java?
23847      if test ! -x "$BOOT_JDK/bin/java"; then
23848        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23850        BOOT_JDK_FOUND=no
23851      else
23852        # Do we have a bin/javac?
23853        if test ! -x "$BOOT_JDK/bin/javac"; then
23854          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23856          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23857$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23858          BOOT_JDK_FOUND=no
23859        else
23860          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23861          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23862            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23864            BOOT_JDK_FOUND=no
23865          else
23866            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23867            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23868
23869            # Extra M4 quote needed to protect [] in grep expression.
23870            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23871            if test "x$FOUND_CORRECT_VERSION" = x; then
23872              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23874              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23875$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23876              BOOT_JDK_FOUND=no
23877            else
23878              # We're done! :-)
23879              BOOT_JDK_FOUND=yes
23880
23881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23882
23883  # Input might be given as Windows format, start by converting to
23884  # unix format.
23885  path="$BOOT_JDK"
23886  new_path=`$CYGPATH -u "$path"`
23887
23888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23891  # "foo.exe" is OK but "foo" is an error.
23892  #
23893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23894  # It is also a way to make sure we got the proper file name for the real test later on.
23895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23896  if test "x$test_shortpath" = x; then
23897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23899    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23900  fi
23901
23902  # Call helper function which possibly converts this using DOS-style short mode.
23903  # If so, the updated path is stored in $new_path.
23904
23905  input_path="$new_path"
23906  # Check if we need to convert this using DOS-style short mode. If the path
23907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23908  # take no chances and rewrite it.
23909  # Note: m4 eats our [], so we need to use [ and ] instead.
23910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23911  if test "x$has_forbidden_chars" != x; then
23912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23916      # Going to short mode and back again did indeed matter. Since short mode is
23917      # case insensitive, let's make it lowercase to improve readability.
23918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23919      # Now convert it back to Unix-stile (cygpath)
23920      input_path=`$CYGPATH -u "$shortmode_path"`
23921      new_path="$input_path"
23922    fi
23923  fi
23924
23925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23926  if test "x$test_cygdrive_prefix" = x; then
23927    # As a simple fix, exclude /usr/bin since it's not a real path.
23928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23930      # a path prefixed by /cygdrive for fixpath to work.
23931      new_path="$CYGWIN_ROOT_PATH$input_path"
23932    fi
23933  fi
23934
23935
23936  if test "x$path" != "x$new_path"; then
23937    BOOT_JDK="$new_path"
23938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23940  fi
23941
23942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23943
23944  path="$BOOT_JDK"
23945  has_colon=`$ECHO $path | $GREP ^.:`
23946  new_path="$path"
23947  if test "x$has_colon" = x; then
23948    # Not in mixed or Windows style, start by that.
23949    new_path=`cmd //c echo $path`
23950  fi
23951
23952
23953  input_path="$new_path"
23954  # Check if we need to convert this using DOS-style short mode. If the path
23955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23956  # take no chances and rewrite it.
23957  # Note: m4 eats our [], so we need to use [ and ] instead.
23958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23959  if test "x$has_forbidden_chars" != x; then
23960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23962  fi
23963
23964
23965  windows_path="$new_path"
23966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23967    unix_path=`$CYGPATH -u "$windows_path"`
23968    new_path="$unix_path"
23969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23971    new_path="$unix_path"
23972  fi
23973
23974  if test "x$path" != "x$new_path"; then
23975    BOOT_JDK="$new_path"
23976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23978  fi
23979
23980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23982
23983  else
23984    # We're on a posix platform. Hooray! :)
23985    path="$BOOT_JDK"
23986    has_space=`$ECHO "$path" | $GREP " "`
23987    if test "x$has_space" != x; then
23988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23990      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23991    fi
23992
23993    # Use eval to expand a potential ~
23994    eval path="$path"
23995    if test ! -f "$path" && test ! -d "$path"; then
23996      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23997    fi
23998
23999    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24000  fi
24001
24002              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24003$as_echo_n "checking for Boot JDK... " >&6; }
24004              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24005$as_echo "$BOOT_JDK" >&6; }
24006              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24007$as_echo_n "checking Boot JDK version... " >&6; }
24008              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24009              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24010$as_echo "$BOOT_JDK_VERSION" >&6; }
24011            fi # end check jdk version
24012          fi # end check rt.jar
24013        fi # end check javac
24014      fi # end check java
24015    fi # end check boot jdk found
24016  fi
24017
24018    done
24019  fi
24020
24021
24022    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24023    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24024      # Do we have a bin/java?
24025      if test ! -x "$BOOT_JDK/bin/java"; then
24026        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24028        BOOT_JDK_FOUND=no
24029      else
24030        # Do we have a bin/javac?
24031        if test ! -x "$BOOT_JDK/bin/javac"; then
24032          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24034          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24035$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24036          BOOT_JDK_FOUND=no
24037        else
24038          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24039          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24040            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24042            BOOT_JDK_FOUND=no
24043          else
24044            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24045            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24046
24047            # Extra M4 quote needed to protect [] in grep expression.
24048            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24049            if test "x$FOUND_CORRECT_VERSION" = x; then
24050              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24052              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24053$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24054              BOOT_JDK_FOUND=no
24055            else
24056              # We're done! :-)
24057              BOOT_JDK_FOUND=yes
24058
24059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24060
24061  # Input might be given as Windows format, start by converting to
24062  # unix format.
24063  path="$BOOT_JDK"
24064  new_path=`$CYGPATH -u "$path"`
24065
24066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24069  # "foo.exe" is OK but "foo" is an error.
24070  #
24071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24072  # It is also a way to make sure we got the proper file name for the real test later on.
24073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24074  if test "x$test_shortpath" = x; then
24075    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24076$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24077    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24078  fi
24079
24080  # Call helper function which possibly converts this using DOS-style short mode.
24081  # If so, the updated path is stored in $new_path.
24082
24083  input_path="$new_path"
24084  # Check if we need to convert this using DOS-style short mode. If the path
24085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24086  # take no chances and rewrite it.
24087  # Note: m4 eats our [], so we need to use [ and ] instead.
24088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24089  if test "x$has_forbidden_chars" != x; then
24090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24094      # Going to short mode and back again did indeed matter. Since short mode is
24095      # case insensitive, let's make it lowercase to improve readability.
24096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24097      # Now convert it back to Unix-stile (cygpath)
24098      input_path=`$CYGPATH -u "$shortmode_path"`
24099      new_path="$input_path"
24100    fi
24101  fi
24102
24103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24104  if test "x$test_cygdrive_prefix" = x; then
24105    # As a simple fix, exclude /usr/bin since it's not a real path.
24106    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24108      # a path prefixed by /cygdrive for fixpath to work.
24109      new_path="$CYGWIN_ROOT_PATH$input_path"
24110    fi
24111  fi
24112
24113
24114  if test "x$path" != "x$new_path"; then
24115    BOOT_JDK="$new_path"
24116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24118  fi
24119
24120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24121
24122  path="$BOOT_JDK"
24123  has_colon=`$ECHO $path | $GREP ^.:`
24124  new_path="$path"
24125  if test "x$has_colon" = x; then
24126    # Not in mixed or Windows style, start by that.
24127    new_path=`cmd //c echo $path`
24128  fi
24129
24130
24131  input_path="$new_path"
24132  # Check if we need to convert this using DOS-style short mode. If the path
24133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24134  # take no chances and rewrite it.
24135  # Note: m4 eats our [], so we need to use [ and ] instead.
24136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24137  if test "x$has_forbidden_chars" != x; then
24138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24140  fi
24141
24142
24143  windows_path="$new_path"
24144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24145    unix_path=`$CYGPATH -u "$windows_path"`
24146    new_path="$unix_path"
24147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24149    new_path="$unix_path"
24150  fi
24151
24152  if test "x$path" != "x$new_path"; then
24153    BOOT_JDK="$new_path"
24154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24155$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24156  fi
24157
24158  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24159  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24160
24161  else
24162    # We're on a posix platform. Hooray! :)
24163    path="$BOOT_JDK"
24164    has_space=`$ECHO "$path" | $GREP " "`
24165    if test "x$has_space" != x; then
24166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24168      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24169    fi
24170
24171    # Use eval to expand a potential ~
24172    eval path="$path"
24173    if test ! -f "$path" && test ! -d "$path"; then
24174      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24175    fi
24176
24177    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24178  fi
24179
24180              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24181$as_echo_n "checking for Boot JDK... " >&6; }
24182              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24183$as_echo "$BOOT_JDK" >&6; }
24184              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24185$as_echo_n "checking Boot JDK version... " >&6; }
24186              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24187              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24188$as_echo "$BOOT_JDK_VERSION" >&6; }
24189            fi # end check jdk version
24190          fi # end check rt.jar
24191        fi # end check javac
24192      fi # end check java
24193    fi # end check boot jdk found
24194  fi
24195
24196  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24197
24198  if test "x$BOOT_JDK_FOUND" = xno; then
24199    # Now execute the test
24200
24201  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24202  BOOT_JDK_SUFFIX="/Contents/Home"
24203  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24204  if test "x$ALL_JDKS_FOUND" != x; then
24205    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24206
24207  if test "x$BOOT_JDK_FOUND" = xno; then
24208    # Now execute the test
24209
24210        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24211        if test -d "$BOOT_JDK"; then
24212          BOOT_JDK_FOUND=maybe
24213          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24214$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24215        fi
24216
24217
24218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24220      # Do we have a bin/java?
24221      if test ! -x "$BOOT_JDK/bin/java"; then
24222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24224        BOOT_JDK_FOUND=no
24225      else
24226        # Do we have a bin/javac?
24227        if test ! -x "$BOOT_JDK/bin/javac"; then
24228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24232          BOOT_JDK_FOUND=no
24233        else
24234          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24235          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24238            BOOT_JDK_FOUND=no
24239          else
24240            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24241            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24242
24243            # Extra M4 quote needed to protect [] in grep expression.
24244            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24245            if test "x$FOUND_CORRECT_VERSION" = x; then
24246              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24248              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24249$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24250              BOOT_JDK_FOUND=no
24251            else
24252              # We're done! :-)
24253              BOOT_JDK_FOUND=yes
24254
24255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24256
24257  # Input might be given as Windows format, start by converting to
24258  # unix format.
24259  path="$BOOT_JDK"
24260  new_path=`$CYGPATH -u "$path"`
24261
24262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24265  # "foo.exe" is OK but "foo" is an error.
24266  #
24267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24268  # It is also a way to make sure we got the proper file name for the real test later on.
24269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24270  if test "x$test_shortpath" = x; then
24271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24274  fi
24275
24276  # Call helper function which possibly converts this using DOS-style short mode.
24277  # If so, the updated path is stored in $new_path.
24278
24279  input_path="$new_path"
24280  # Check if we need to convert this using DOS-style short mode. If the path
24281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24282  # take no chances and rewrite it.
24283  # Note: m4 eats our [], so we need to use [ and ] instead.
24284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24285  if test "x$has_forbidden_chars" != x; then
24286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24290      # Going to short mode and back again did indeed matter. Since short mode is
24291      # case insensitive, let's make it lowercase to improve readability.
24292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24293      # Now convert it back to Unix-stile (cygpath)
24294      input_path=`$CYGPATH -u "$shortmode_path"`
24295      new_path="$input_path"
24296    fi
24297  fi
24298
24299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24300  if test "x$test_cygdrive_prefix" = x; then
24301    # As a simple fix, exclude /usr/bin since it's not a real path.
24302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24304      # a path prefixed by /cygdrive for fixpath to work.
24305      new_path="$CYGWIN_ROOT_PATH$input_path"
24306    fi
24307  fi
24308
24309
24310  if test "x$path" != "x$new_path"; then
24311    BOOT_JDK="$new_path"
24312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24314  fi
24315
24316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24317
24318  path="$BOOT_JDK"
24319  has_colon=`$ECHO $path | $GREP ^.:`
24320  new_path="$path"
24321  if test "x$has_colon" = x; then
24322    # Not in mixed or Windows style, start by that.
24323    new_path=`cmd //c echo $path`
24324  fi
24325
24326
24327  input_path="$new_path"
24328  # Check if we need to convert this using DOS-style short mode. If the path
24329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24330  # take no chances and rewrite it.
24331  # Note: m4 eats our [], so we need to use [ and ] instead.
24332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24333  if test "x$has_forbidden_chars" != x; then
24334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24336  fi
24337
24338
24339  windows_path="$new_path"
24340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24341    unix_path=`$CYGPATH -u "$windows_path"`
24342    new_path="$unix_path"
24343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24345    new_path="$unix_path"
24346  fi
24347
24348  if test "x$path" != "x$new_path"; then
24349    BOOT_JDK="$new_path"
24350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24352  fi
24353
24354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24356
24357  else
24358    # We're on a posix platform. Hooray! :)
24359    path="$BOOT_JDK"
24360    has_space=`$ECHO "$path" | $GREP " "`
24361    if test "x$has_space" != x; then
24362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24364      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24365    fi
24366
24367    # Use eval to expand a potential ~
24368    eval path="$path"
24369    if test ! -f "$path" && test ! -d "$path"; then
24370      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24371    fi
24372
24373    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24374  fi
24375
24376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24377$as_echo_n "checking for Boot JDK... " >&6; }
24378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24379$as_echo "$BOOT_JDK" >&6; }
24380              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24381$as_echo_n "checking Boot JDK version... " >&6; }
24382              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24383              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24384$as_echo "$BOOT_JDK_VERSION" >&6; }
24385            fi # end check jdk version
24386          fi # end check rt.jar
24387        fi # end check javac
24388      fi # end check java
24389    fi # end check boot jdk found
24390  fi
24391
24392    done
24393  fi
24394
24395
24396    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24397    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24398      # Do we have a bin/java?
24399      if test ! -x "$BOOT_JDK/bin/java"; then
24400        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24402        BOOT_JDK_FOUND=no
24403      else
24404        # Do we have a bin/javac?
24405        if test ! -x "$BOOT_JDK/bin/javac"; then
24406          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24408          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24409$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24410          BOOT_JDK_FOUND=no
24411        else
24412          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24413          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24416            BOOT_JDK_FOUND=no
24417          else
24418            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24419            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24420
24421            # Extra M4 quote needed to protect [] in grep expression.
24422            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24423            if test "x$FOUND_CORRECT_VERSION" = x; then
24424              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24426              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24427$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24428              BOOT_JDK_FOUND=no
24429            else
24430              # We're done! :-)
24431              BOOT_JDK_FOUND=yes
24432
24433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24434
24435  # Input might be given as Windows format, start by converting to
24436  # unix format.
24437  path="$BOOT_JDK"
24438  new_path=`$CYGPATH -u "$path"`
24439
24440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24443  # "foo.exe" is OK but "foo" is an error.
24444  #
24445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24446  # It is also a way to make sure we got the proper file name for the real test later on.
24447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24448  if test "x$test_shortpath" = x; then
24449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24452  fi
24453
24454  # Call helper function which possibly converts this using DOS-style short mode.
24455  # If so, the updated path is stored in $new_path.
24456
24457  input_path="$new_path"
24458  # Check if we need to convert this using DOS-style short mode. If the path
24459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24460  # take no chances and rewrite it.
24461  # Note: m4 eats our [], so we need to use [ and ] instead.
24462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24463  if test "x$has_forbidden_chars" != x; then
24464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24468      # Going to short mode and back again did indeed matter. Since short mode is
24469      # case insensitive, let's make it lowercase to improve readability.
24470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24471      # Now convert it back to Unix-stile (cygpath)
24472      input_path=`$CYGPATH -u "$shortmode_path"`
24473      new_path="$input_path"
24474    fi
24475  fi
24476
24477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24478  if test "x$test_cygdrive_prefix" = x; then
24479    # As a simple fix, exclude /usr/bin since it's not a real path.
24480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24482      # a path prefixed by /cygdrive for fixpath to work.
24483      new_path="$CYGWIN_ROOT_PATH$input_path"
24484    fi
24485  fi
24486
24487
24488  if test "x$path" != "x$new_path"; then
24489    BOOT_JDK="$new_path"
24490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24492  fi
24493
24494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24495
24496  path="$BOOT_JDK"
24497  has_colon=`$ECHO $path | $GREP ^.:`
24498  new_path="$path"
24499  if test "x$has_colon" = x; then
24500    # Not in mixed or Windows style, start by that.
24501    new_path=`cmd //c echo $path`
24502  fi
24503
24504
24505  input_path="$new_path"
24506  # Check if we need to convert this using DOS-style short mode. If the path
24507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24508  # take no chances and rewrite it.
24509  # Note: m4 eats our [], so we need to use [ and ] instead.
24510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24511  if test "x$has_forbidden_chars" != x; then
24512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24514  fi
24515
24516
24517  windows_path="$new_path"
24518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24519    unix_path=`$CYGPATH -u "$windows_path"`
24520    new_path="$unix_path"
24521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24523    new_path="$unix_path"
24524  fi
24525
24526  if test "x$path" != "x$new_path"; then
24527    BOOT_JDK="$new_path"
24528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24530  fi
24531
24532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24534
24535  else
24536    # We're on a posix platform. Hooray! :)
24537    path="$BOOT_JDK"
24538    has_space=`$ECHO "$path" | $GREP " "`
24539    if test "x$has_space" != x; then
24540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24542      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24543    fi
24544
24545    # Use eval to expand a potential ~
24546    eval path="$path"
24547    if test ! -f "$path" && test ! -d "$path"; then
24548      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24549    fi
24550
24551    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24552  fi
24553
24554              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24555$as_echo_n "checking for Boot JDK... " >&6; }
24556              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24557$as_echo "$BOOT_JDK" >&6; }
24558              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24559$as_echo_n "checking Boot JDK version... " >&6; }
24560              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24561              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24562$as_echo "$BOOT_JDK_VERSION" >&6; }
24563            fi # end check jdk version
24564          fi # end check rt.jar
24565        fi # end check javac
24566      fi # end check java
24567    fi # end check boot jdk found
24568  fi
24569
24570
24571  if test "x$BOOT_JDK_FOUND" = xno; then
24572    # Now execute the test
24573
24574  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24575  BOOT_JDK_SUFFIX="/Contents/Home"
24576  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24577  if test "x$ALL_JDKS_FOUND" != x; then
24578    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24579
24580  if test "x$BOOT_JDK_FOUND" = xno; then
24581    # Now execute the test
24582
24583        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24584        if test -d "$BOOT_JDK"; then
24585          BOOT_JDK_FOUND=maybe
24586          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24587$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24588        fi
24589
24590
24591    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24592    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24593      # Do we have a bin/java?
24594      if test ! -x "$BOOT_JDK/bin/java"; then
24595        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24597        BOOT_JDK_FOUND=no
24598      else
24599        # Do we have a bin/javac?
24600        if test ! -x "$BOOT_JDK/bin/javac"; then
24601          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24603          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24604$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24605          BOOT_JDK_FOUND=no
24606        else
24607          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24608          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24609            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24611            BOOT_JDK_FOUND=no
24612          else
24613            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24614            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24615
24616            # Extra M4 quote needed to protect [] in grep expression.
24617            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24618            if test "x$FOUND_CORRECT_VERSION" = x; then
24619              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24621              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24622$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24623              BOOT_JDK_FOUND=no
24624            else
24625              # We're done! :-)
24626              BOOT_JDK_FOUND=yes
24627
24628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24629
24630  # Input might be given as Windows format, start by converting to
24631  # unix format.
24632  path="$BOOT_JDK"
24633  new_path=`$CYGPATH -u "$path"`
24634
24635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24638  # "foo.exe" is OK but "foo" is an error.
24639  #
24640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24641  # It is also a way to make sure we got the proper file name for the real test later on.
24642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24643  if test "x$test_shortpath" = x; then
24644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24646    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24647  fi
24648
24649  # Call helper function which possibly converts this using DOS-style short mode.
24650  # If so, the updated path is stored in $new_path.
24651
24652  input_path="$new_path"
24653  # Check if we need to convert this using DOS-style short mode. If the path
24654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24655  # take no chances and rewrite it.
24656  # Note: m4 eats our [], so we need to use [ and ] instead.
24657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24658  if test "x$has_forbidden_chars" != x; then
24659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24663      # Going to short mode and back again did indeed matter. Since short mode is
24664      # case insensitive, let's make it lowercase to improve readability.
24665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24666      # Now convert it back to Unix-stile (cygpath)
24667      input_path=`$CYGPATH -u "$shortmode_path"`
24668      new_path="$input_path"
24669    fi
24670  fi
24671
24672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24673  if test "x$test_cygdrive_prefix" = x; then
24674    # As a simple fix, exclude /usr/bin since it's not a real path.
24675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24677      # a path prefixed by /cygdrive for fixpath to work.
24678      new_path="$CYGWIN_ROOT_PATH$input_path"
24679    fi
24680  fi
24681
24682
24683  if test "x$path" != "x$new_path"; then
24684    BOOT_JDK="$new_path"
24685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24687  fi
24688
24689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24690
24691  path="$BOOT_JDK"
24692  has_colon=`$ECHO $path | $GREP ^.:`
24693  new_path="$path"
24694  if test "x$has_colon" = x; then
24695    # Not in mixed or Windows style, start by that.
24696    new_path=`cmd //c echo $path`
24697  fi
24698
24699
24700  input_path="$new_path"
24701  # Check if we need to convert this using DOS-style short mode. If the path
24702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24703  # take no chances and rewrite it.
24704  # Note: m4 eats our [], so we need to use [ and ] instead.
24705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24706  if test "x$has_forbidden_chars" != x; then
24707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24709  fi
24710
24711
24712  windows_path="$new_path"
24713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24714    unix_path=`$CYGPATH -u "$windows_path"`
24715    new_path="$unix_path"
24716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24718    new_path="$unix_path"
24719  fi
24720
24721  if test "x$path" != "x$new_path"; then
24722    BOOT_JDK="$new_path"
24723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24725  fi
24726
24727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24729
24730  else
24731    # We're on a posix platform. Hooray! :)
24732    path="$BOOT_JDK"
24733    has_space=`$ECHO "$path" | $GREP " "`
24734    if test "x$has_space" != x; then
24735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24737      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24738    fi
24739
24740    # Use eval to expand a potential ~
24741    eval path="$path"
24742    if test ! -f "$path" && test ! -d "$path"; then
24743      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24744    fi
24745
24746    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24747  fi
24748
24749              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24750$as_echo_n "checking for Boot JDK... " >&6; }
24751              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24752$as_echo "$BOOT_JDK" >&6; }
24753              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24754$as_echo_n "checking Boot JDK version... " >&6; }
24755              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24756              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24757$as_echo "$BOOT_JDK_VERSION" >&6; }
24758            fi # end check jdk version
24759          fi # end check rt.jar
24760        fi # end check javac
24761      fi # end check java
24762    fi # end check boot jdk found
24763  fi
24764
24765    done
24766  fi
24767
24768
24769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24771      # Do we have a bin/java?
24772      if test ! -x "$BOOT_JDK/bin/java"; then
24773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24775        BOOT_JDK_FOUND=no
24776      else
24777        # Do we have a bin/javac?
24778        if test ! -x "$BOOT_JDK/bin/javac"; then
24779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24783          BOOT_JDK_FOUND=no
24784        else
24785          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24786          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24789            BOOT_JDK_FOUND=no
24790          else
24791            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24793
24794            # Extra M4 quote needed to protect [] in grep expression.
24795            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24796            if test "x$FOUND_CORRECT_VERSION" = x; then
24797              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24799              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24800$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24801              BOOT_JDK_FOUND=no
24802            else
24803              # We're done! :-)
24804              BOOT_JDK_FOUND=yes
24805
24806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24807
24808  # Input might be given as Windows format, start by converting to
24809  # unix format.
24810  path="$BOOT_JDK"
24811  new_path=`$CYGPATH -u "$path"`
24812
24813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24816  # "foo.exe" is OK but "foo" is an error.
24817  #
24818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24819  # It is also a way to make sure we got the proper file name for the real test later on.
24820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24821  if test "x$test_shortpath" = x; then
24822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24825  fi
24826
24827  # Call helper function which possibly converts this using DOS-style short mode.
24828  # If so, the updated path is stored in $new_path.
24829
24830  input_path="$new_path"
24831  # Check if we need to convert this using DOS-style short mode. If the path
24832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24833  # take no chances and rewrite it.
24834  # Note: m4 eats our [], so we need to use [ and ] instead.
24835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24836  if test "x$has_forbidden_chars" != x; then
24837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24841      # Going to short mode and back again did indeed matter. Since short mode is
24842      # case insensitive, let's make it lowercase to improve readability.
24843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24844      # Now convert it back to Unix-stile (cygpath)
24845      input_path=`$CYGPATH -u "$shortmode_path"`
24846      new_path="$input_path"
24847    fi
24848  fi
24849
24850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24851  if test "x$test_cygdrive_prefix" = x; then
24852    # As a simple fix, exclude /usr/bin since it's not a real path.
24853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24855      # a path prefixed by /cygdrive for fixpath to work.
24856      new_path="$CYGWIN_ROOT_PATH$input_path"
24857    fi
24858  fi
24859
24860
24861  if test "x$path" != "x$new_path"; then
24862    BOOT_JDK="$new_path"
24863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24865  fi
24866
24867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24868
24869  path="$BOOT_JDK"
24870  has_colon=`$ECHO $path | $GREP ^.:`
24871  new_path="$path"
24872  if test "x$has_colon" = x; then
24873    # Not in mixed or Windows style, start by that.
24874    new_path=`cmd //c echo $path`
24875  fi
24876
24877
24878  input_path="$new_path"
24879  # Check if we need to convert this using DOS-style short mode. If the path
24880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24881  # take no chances and rewrite it.
24882  # Note: m4 eats our [], so we need to use [ and ] instead.
24883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24884  if test "x$has_forbidden_chars" != x; then
24885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24887  fi
24888
24889
24890  windows_path="$new_path"
24891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24892    unix_path=`$CYGPATH -u "$windows_path"`
24893    new_path="$unix_path"
24894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24896    new_path="$unix_path"
24897  fi
24898
24899  if test "x$path" != "x$new_path"; then
24900    BOOT_JDK="$new_path"
24901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24903  fi
24904
24905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24907
24908  else
24909    # We're on a posix platform. Hooray! :)
24910    path="$BOOT_JDK"
24911    has_space=`$ECHO "$path" | $GREP " "`
24912    if test "x$has_space" != x; then
24913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24915      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24916    fi
24917
24918    # Use eval to expand a potential ~
24919    eval path="$path"
24920    if test ! -f "$path" && test ! -d "$path"; then
24921      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24922    fi
24923
24924    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24925  fi
24926
24927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24928$as_echo_n "checking for Boot JDK... " >&6; }
24929              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24930$as_echo "$BOOT_JDK" >&6; }
24931              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24932$as_echo_n "checking Boot JDK version... " >&6; }
24933              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24934              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24935$as_echo "$BOOT_JDK_VERSION" >&6; }
24936            fi # end check jdk version
24937          fi # end check rt.jar
24938        fi # end check javac
24939      fi # end check java
24940    fi # end check boot jdk found
24941  fi
24942
24943  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24944
24945  if test "x$BOOT_JDK_FOUND" = xno; then
24946    # Now execute the test
24947
24948  BOOT_JDK_PREFIX="/usr/lib/jvm"
24949  BOOT_JDK_SUFFIX=""
24950  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24951  if test "x$ALL_JDKS_FOUND" != x; then
24952    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24953
24954  if test "x$BOOT_JDK_FOUND" = xno; then
24955    # Now execute the test
24956
24957        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24958        if test -d "$BOOT_JDK"; then
24959          BOOT_JDK_FOUND=maybe
24960          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24961$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24962        fi
24963
24964
24965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24967      # Do we have a bin/java?
24968      if test ! -x "$BOOT_JDK/bin/java"; then
24969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24971        BOOT_JDK_FOUND=no
24972      else
24973        # Do we have a bin/javac?
24974        if test ! -x "$BOOT_JDK/bin/javac"; then
24975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24979          BOOT_JDK_FOUND=no
24980        else
24981          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24982          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24983            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24985            BOOT_JDK_FOUND=no
24986          else
24987            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24989
24990            # Extra M4 quote needed to protect [] in grep expression.
24991            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24992            if test "x$FOUND_CORRECT_VERSION" = x; then
24993              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24995              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24996$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24997              BOOT_JDK_FOUND=no
24998            else
24999              # We're done! :-)
25000              BOOT_JDK_FOUND=yes
25001
25002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25003
25004  # Input might be given as Windows format, start by converting to
25005  # unix format.
25006  path="$BOOT_JDK"
25007  new_path=`$CYGPATH -u "$path"`
25008
25009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25012  # "foo.exe" is OK but "foo" is an error.
25013  #
25014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25015  # It is also a way to make sure we got the proper file name for the real test later on.
25016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25017  if test "x$test_shortpath" = x; then
25018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25020    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25021  fi
25022
25023  # Call helper function which possibly converts this using DOS-style short mode.
25024  # If so, the updated path is stored in $new_path.
25025
25026  input_path="$new_path"
25027  # Check if we need to convert this using DOS-style short mode. If the path
25028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25029  # take no chances and rewrite it.
25030  # Note: m4 eats our [], so we need to use [ and ] instead.
25031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25032  if test "x$has_forbidden_chars" != x; then
25033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25037      # Going to short mode and back again did indeed matter. Since short mode is
25038      # case insensitive, let's make it lowercase to improve readability.
25039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25040      # Now convert it back to Unix-stile (cygpath)
25041      input_path=`$CYGPATH -u "$shortmode_path"`
25042      new_path="$input_path"
25043    fi
25044  fi
25045
25046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25047  if test "x$test_cygdrive_prefix" = x; then
25048    # As a simple fix, exclude /usr/bin since it's not a real path.
25049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25051      # a path prefixed by /cygdrive for fixpath to work.
25052      new_path="$CYGWIN_ROOT_PATH$input_path"
25053    fi
25054  fi
25055
25056
25057  if test "x$path" != "x$new_path"; then
25058    BOOT_JDK="$new_path"
25059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25061  fi
25062
25063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25064
25065  path="$BOOT_JDK"
25066  has_colon=`$ECHO $path | $GREP ^.:`
25067  new_path="$path"
25068  if test "x$has_colon" = x; then
25069    # Not in mixed or Windows style, start by that.
25070    new_path=`cmd //c echo $path`
25071  fi
25072
25073
25074  input_path="$new_path"
25075  # Check if we need to convert this using DOS-style short mode. If the path
25076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25077  # take no chances and rewrite it.
25078  # Note: m4 eats our [], so we need to use [ and ] instead.
25079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25080  if test "x$has_forbidden_chars" != x; then
25081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25083  fi
25084
25085
25086  windows_path="$new_path"
25087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25088    unix_path=`$CYGPATH -u "$windows_path"`
25089    new_path="$unix_path"
25090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25092    new_path="$unix_path"
25093  fi
25094
25095  if test "x$path" != "x$new_path"; then
25096    BOOT_JDK="$new_path"
25097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25099  fi
25100
25101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25103
25104  else
25105    # We're on a posix platform. Hooray! :)
25106    path="$BOOT_JDK"
25107    has_space=`$ECHO "$path" | $GREP " "`
25108    if test "x$has_space" != x; then
25109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25111      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25112    fi
25113
25114    # Use eval to expand a potential ~
25115    eval path="$path"
25116    if test ! -f "$path" && test ! -d "$path"; then
25117      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25118    fi
25119
25120    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25121  fi
25122
25123              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25124$as_echo_n "checking for Boot JDK... " >&6; }
25125              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25126$as_echo "$BOOT_JDK" >&6; }
25127              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25128$as_echo_n "checking Boot JDK version... " >&6; }
25129              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25130              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25131$as_echo "$BOOT_JDK_VERSION" >&6; }
25132            fi # end check jdk version
25133          fi # end check rt.jar
25134        fi # end check javac
25135      fi # end check java
25136    fi # end check boot jdk found
25137  fi
25138
25139    done
25140  fi
25141
25142
25143    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25144    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25145      # Do we have a bin/java?
25146      if test ! -x "$BOOT_JDK/bin/java"; then
25147        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25149        BOOT_JDK_FOUND=no
25150      else
25151        # Do we have a bin/javac?
25152        if test ! -x "$BOOT_JDK/bin/javac"; then
25153          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25155          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25156$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25157          BOOT_JDK_FOUND=no
25158        else
25159          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25160          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25161            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25163            BOOT_JDK_FOUND=no
25164          else
25165            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25166            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25167
25168            # Extra M4 quote needed to protect [] in grep expression.
25169            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25170            if test "x$FOUND_CORRECT_VERSION" = x; then
25171              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25173              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25174$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25175              BOOT_JDK_FOUND=no
25176            else
25177              # We're done! :-)
25178              BOOT_JDK_FOUND=yes
25179
25180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25181
25182  # Input might be given as Windows format, start by converting to
25183  # unix format.
25184  path="$BOOT_JDK"
25185  new_path=`$CYGPATH -u "$path"`
25186
25187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25190  # "foo.exe" is OK but "foo" is an error.
25191  #
25192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25193  # It is also a way to make sure we got the proper file name for the real test later on.
25194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25195  if test "x$test_shortpath" = x; then
25196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25198    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25199  fi
25200
25201  # Call helper function which possibly converts this using DOS-style short mode.
25202  # If so, the updated path is stored in $new_path.
25203
25204  input_path="$new_path"
25205  # Check if we need to convert this using DOS-style short mode. If the path
25206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25207  # take no chances and rewrite it.
25208  # Note: m4 eats our [], so we need to use [ and ] instead.
25209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25210  if test "x$has_forbidden_chars" != x; then
25211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25215      # Going to short mode and back again did indeed matter. Since short mode is
25216      # case insensitive, let's make it lowercase to improve readability.
25217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25218      # Now convert it back to Unix-stile (cygpath)
25219      input_path=`$CYGPATH -u "$shortmode_path"`
25220      new_path="$input_path"
25221    fi
25222  fi
25223
25224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25225  if test "x$test_cygdrive_prefix" = x; then
25226    # As a simple fix, exclude /usr/bin since it's not a real path.
25227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25229      # a path prefixed by /cygdrive for fixpath to work.
25230      new_path="$CYGWIN_ROOT_PATH$input_path"
25231    fi
25232  fi
25233
25234
25235  if test "x$path" != "x$new_path"; then
25236    BOOT_JDK="$new_path"
25237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25238$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25239  fi
25240
25241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25242
25243  path="$BOOT_JDK"
25244  has_colon=`$ECHO $path | $GREP ^.:`
25245  new_path="$path"
25246  if test "x$has_colon" = x; then
25247    # Not in mixed or Windows style, start by that.
25248    new_path=`cmd //c echo $path`
25249  fi
25250
25251
25252  input_path="$new_path"
25253  # Check if we need to convert this using DOS-style short mode. If the path
25254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25255  # take no chances and rewrite it.
25256  # Note: m4 eats our [], so we need to use [ and ] instead.
25257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25258  if test "x$has_forbidden_chars" != x; then
25259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25261  fi
25262
25263
25264  windows_path="$new_path"
25265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25266    unix_path=`$CYGPATH -u "$windows_path"`
25267    new_path="$unix_path"
25268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25270    new_path="$unix_path"
25271  fi
25272
25273  if test "x$path" != "x$new_path"; then
25274    BOOT_JDK="$new_path"
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25277  fi
25278
25279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25281
25282  else
25283    # We're on a posix platform. Hooray! :)
25284    path="$BOOT_JDK"
25285    has_space=`$ECHO "$path" | $GREP " "`
25286    if test "x$has_space" != x; then
25287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25289      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25290    fi
25291
25292    # Use eval to expand a potential ~
25293    eval path="$path"
25294    if test ! -f "$path" && test ! -d "$path"; then
25295      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25296    fi
25297
25298    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25299  fi
25300
25301              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25302$as_echo_n "checking for Boot JDK... " >&6; }
25303              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25304$as_echo "$BOOT_JDK" >&6; }
25305              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25306$as_echo_n "checking Boot JDK version... " >&6; }
25307              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25308              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25309$as_echo "$BOOT_JDK_VERSION" >&6; }
25310            fi # end check jdk version
25311          fi # end check rt.jar
25312        fi # end check javac
25313      fi # end check java
25314    fi # end check boot jdk found
25315  fi
25316
25317  fi
25318
25319
25320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25322      # Do we have a bin/java?
25323      if test ! -x "$BOOT_JDK/bin/java"; then
25324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25326        BOOT_JDK_FOUND=no
25327      else
25328        # Do we have a bin/javac?
25329        if test ! -x "$BOOT_JDK/bin/javac"; then
25330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25334          BOOT_JDK_FOUND=no
25335        else
25336          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25337          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25338            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25340            BOOT_JDK_FOUND=no
25341          else
25342            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25344
25345            # Extra M4 quote needed to protect [] in grep expression.
25346            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25347            if test "x$FOUND_CORRECT_VERSION" = x; then
25348              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25350              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25352              BOOT_JDK_FOUND=no
25353            else
25354              # We're done! :-)
25355              BOOT_JDK_FOUND=yes
25356
25357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25358
25359  # Input might be given as Windows format, start by converting to
25360  # unix format.
25361  path="$BOOT_JDK"
25362  new_path=`$CYGPATH -u "$path"`
25363
25364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25367  # "foo.exe" is OK but "foo" is an error.
25368  #
25369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25370  # It is also a way to make sure we got the proper file name for the real test later on.
25371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25372  if test "x$test_shortpath" = x; then
25373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25375    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25376  fi
25377
25378  # Call helper function which possibly converts this using DOS-style short mode.
25379  # If so, the updated path is stored in $new_path.
25380
25381  input_path="$new_path"
25382  # Check if we need to convert this using DOS-style short mode. If the path
25383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25384  # take no chances and rewrite it.
25385  # Note: m4 eats our [], so we need to use [ and ] instead.
25386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25387  if test "x$has_forbidden_chars" != x; then
25388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25392      # Going to short mode and back again did indeed matter. Since short mode is
25393      # case insensitive, let's make it lowercase to improve readability.
25394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25395      # Now convert it back to Unix-stile (cygpath)
25396      input_path=`$CYGPATH -u "$shortmode_path"`
25397      new_path="$input_path"
25398    fi
25399  fi
25400
25401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25402  if test "x$test_cygdrive_prefix" = x; then
25403    # As a simple fix, exclude /usr/bin since it's not a real path.
25404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25406      # a path prefixed by /cygdrive for fixpath to work.
25407      new_path="$CYGWIN_ROOT_PATH$input_path"
25408    fi
25409  fi
25410
25411
25412  if test "x$path" != "x$new_path"; then
25413    BOOT_JDK="$new_path"
25414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25416  fi
25417
25418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25419
25420  path="$BOOT_JDK"
25421  has_colon=`$ECHO $path | $GREP ^.:`
25422  new_path="$path"
25423  if test "x$has_colon" = x; then
25424    # Not in mixed or Windows style, start by that.
25425    new_path=`cmd //c echo $path`
25426  fi
25427
25428
25429  input_path="$new_path"
25430  # Check if we need to convert this using DOS-style short mode. If the path
25431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25432  # take no chances and rewrite it.
25433  # Note: m4 eats our [], so we need to use [ and ] instead.
25434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25435  if test "x$has_forbidden_chars" != x; then
25436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25438  fi
25439
25440
25441  windows_path="$new_path"
25442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25443    unix_path=`$CYGPATH -u "$windows_path"`
25444    new_path="$unix_path"
25445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25447    new_path="$unix_path"
25448  fi
25449
25450  if test "x$path" != "x$new_path"; then
25451    BOOT_JDK="$new_path"
25452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25454  fi
25455
25456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25458
25459  else
25460    # We're on a posix platform. Hooray! :)
25461    path="$BOOT_JDK"
25462    has_space=`$ECHO "$path" | $GREP " "`
25463    if test "x$has_space" != x; then
25464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25465$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25466      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25467    fi
25468
25469    # Use eval to expand a potential ~
25470    eval path="$path"
25471    if test ! -f "$path" && test ! -d "$path"; then
25472      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25473    fi
25474
25475    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25476  fi
25477
25478              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25479$as_echo_n "checking for Boot JDK... " >&6; }
25480              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25481$as_echo "$BOOT_JDK" >&6; }
25482              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25483$as_echo_n "checking Boot JDK version... " >&6; }
25484              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25485              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25486$as_echo "$BOOT_JDK_VERSION" >&6; }
25487            fi # end check jdk version
25488          fi # end check rt.jar
25489        fi # end check javac
25490      fi # end check java
25491    fi # end check boot jdk found
25492  fi
25493
25494
25495  # If we haven't found anything yet, we've truly lost. Give up.
25496  if test "x$BOOT_JDK_FOUND" = xno; then
25497
25498  # Print a helpful message on how to acquire the necessary build dependency.
25499  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25500  MISSING_DEPENDENCY=openjdk
25501
25502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25503    cygwin_help $MISSING_DEPENDENCY
25504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25505    msys_help $MISSING_DEPENDENCY
25506  else
25507    PKGHANDLER_COMMAND=
25508
25509    case $PKGHANDLER in
25510      apt-get)
25511        apt_help     $MISSING_DEPENDENCY ;;
25512      yum)
25513        yum_help     $MISSING_DEPENDENCY ;;
25514      port)
25515        port_help    $MISSING_DEPENDENCY ;;
25516      pkgutil)
25517        pkgutil_help $MISSING_DEPENDENCY ;;
25518      pkgadd)
25519        pkgadd_help  $MISSING_DEPENDENCY ;;
25520    esac
25521
25522    if test "x$PKGHANDLER_COMMAND" != x; then
25523      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25524    fi
25525  fi
25526
25527    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25528$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25529    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25530$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25531    as_fn_error $? "Cannot continue" "$LINENO" 5
25532  fi
25533
25534
25535
25536  # Setup tools from the Boot JDK.
25537
25538  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25539
25540  # Publish this variable in the help.
25541
25542
25543  if test "x$JAVA" = x; then
25544    # The variable is not set by user, try to locate tool using the code snippet
25545
25546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25547$as_echo_n "checking for java in Boot JDK... " >&6; }
25548      JAVA=$BOOT_JDK/bin/java
25549      if test ! -x $JAVA; then
25550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25551$as_echo "not found" >&6; }
25552        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25553$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25554        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25555      fi
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25557$as_echo "ok" >&6; }
25558
25559
25560  else
25561    # The variable is set, but is it from the command line or the environment?
25562
25563    # Try to remove the string !JAVA! from our list.
25564    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25565    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25566      # If it failed, the variable was not from the command line. Ignore it,
25567      # but warn the user (except for BASH, which is always set by the calling BASH).
25568      if test "xJAVA" != xBASH; then
25569        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25570$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25571      fi
25572      # Try to locate tool using the code snippet
25573
25574      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25575$as_echo_n "checking for java in Boot JDK... " >&6; }
25576      JAVA=$BOOT_JDK/bin/java
25577      if test ! -x $JAVA; then
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25579$as_echo "not found" >&6; }
25580        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25581$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25582        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25583      fi
25584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25585$as_echo "ok" >&6; }
25586
25587
25588    else
25589      # If it succeeded, then it was overridden by the user. We will use it
25590      # for the tool.
25591
25592      # First remove it from the list of overridden variables, so we can test
25593      # for unknown variables in the end.
25594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25595
25596      # Check if the provided tool contains a complete path.
25597      tool_specified="$JAVA"
25598      tool_basename="${tool_specified##*/}"
25599      if test "x$tool_basename" = "x$tool_specified"; then
25600        # A command without a complete path is provided, search $PATH.
25601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25602$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25603        # Extract the first word of "$tool_basename", so it can be a program name with args.
25604set dummy $tool_basename; ac_word=$2
25605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25606$as_echo_n "checking for $ac_word... " >&6; }
25607if ${ac_cv_path_JAVA+:} false; then :
25608  $as_echo_n "(cached) " >&6
25609else
25610  case $JAVA in
25611  [\\/]* | ?:[\\/]*)
25612  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25613  ;;
25614  *)
25615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25616for as_dir in $PATH
25617do
25618  IFS=$as_save_IFS
25619  test -z "$as_dir" && as_dir=.
25620    for ac_exec_ext in '' $ac_executable_extensions; do
25621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25622    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25624    break 2
25625  fi
25626done
25627  done
25628IFS=$as_save_IFS
25629
25630  ;;
25631esac
25632fi
25633JAVA=$ac_cv_path_JAVA
25634if test -n "$JAVA"; then
25635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25636$as_echo "$JAVA" >&6; }
25637else
25638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25639$as_echo "no" >&6; }
25640fi
25641
25642
25643        if test "x$JAVA" = x; then
25644          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25645        fi
25646      else
25647        # Otherwise we believe it is a complete path. Use it as it is.
25648        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25649$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25651$as_echo_n "checking for JAVA... " >&6; }
25652        if test ! -x "$tool_specified"; then
25653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25654$as_echo "not found" >&6; }
25655          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25656        fi
25657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25658$as_echo "$tool_specified" >&6; }
25659      fi
25660    fi
25661  fi
25662
25663
25664
25665  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25666
25667  # Publish this variable in the help.
25668
25669
25670  if test "x$JAVAC" = x; then
25671    # The variable is not set by user, try to locate tool using the code snippet
25672
25673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25674$as_echo_n "checking for javac in Boot JDK... " >&6; }
25675      JAVAC=$BOOT_JDK/bin/javac
25676      if test ! -x $JAVAC; then
25677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25678$as_echo "not found" >&6; }
25679        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25680$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25681        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25682      fi
25683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25684$as_echo "ok" >&6; }
25685
25686
25687  else
25688    # The variable is set, but is it from the command line or the environment?
25689
25690    # Try to remove the string !JAVAC! from our list.
25691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25693      # If it failed, the variable was not from the command line. Ignore it,
25694      # but warn the user (except for BASH, which is always set by the calling BASH).
25695      if test "xJAVAC" != xBASH; then
25696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25697$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25698      fi
25699      # Try to locate tool using the code snippet
25700
25701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25702$as_echo_n "checking for javac in Boot JDK... " >&6; }
25703      JAVAC=$BOOT_JDK/bin/javac
25704      if test ! -x $JAVAC; then
25705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25706$as_echo "not found" >&6; }
25707        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25708$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25709        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25710      fi
25711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25712$as_echo "ok" >&6; }
25713
25714
25715    else
25716      # If it succeeded, then it was overridden by the user. We will use it
25717      # for the tool.
25718
25719      # First remove it from the list of overridden variables, so we can test
25720      # for unknown variables in the end.
25721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25722
25723      # Check if the provided tool contains a complete path.
25724      tool_specified="$JAVAC"
25725      tool_basename="${tool_specified##*/}"
25726      if test "x$tool_basename" = "x$tool_specified"; then
25727        # A command without a complete path is provided, search $PATH.
25728        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25729$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25730        # Extract the first word of "$tool_basename", so it can be a program name with args.
25731set dummy $tool_basename; ac_word=$2
25732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25733$as_echo_n "checking for $ac_word... " >&6; }
25734if ${ac_cv_path_JAVAC+:} false; then :
25735  $as_echo_n "(cached) " >&6
25736else
25737  case $JAVAC in
25738  [\\/]* | ?:[\\/]*)
25739  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25740  ;;
25741  *)
25742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25743for as_dir in $PATH
25744do
25745  IFS=$as_save_IFS
25746  test -z "$as_dir" && as_dir=.
25747    for ac_exec_ext in '' $ac_executable_extensions; do
25748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25749    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25751    break 2
25752  fi
25753done
25754  done
25755IFS=$as_save_IFS
25756
25757  ;;
25758esac
25759fi
25760JAVAC=$ac_cv_path_JAVAC
25761if test -n "$JAVAC"; then
25762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25763$as_echo "$JAVAC" >&6; }
25764else
25765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25766$as_echo "no" >&6; }
25767fi
25768
25769
25770        if test "x$JAVAC" = x; then
25771          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25772        fi
25773      else
25774        # Otherwise we believe it is a complete path. Use it as it is.
25775        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25776$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25778$as_echo_n "checking for JAVAC... " >&6; }
25779        if test ! -x "$tool_specified"; then
25780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25781$as_echo "not found" >&6; }
25782          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25783        fi
25784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25785$as_echo "$tool_specified" >&6; }
25786      fi
25787    fi
25788  fi
25789
25790
25791
25792  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25793
25794  # Publish this variable in the help.
25795
25796
25797  if test "x$JAVAH" = x; then
25798    # The variable is not set by user, try to locate tool using the code snippet
25799
25800      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25801$as_echo_n "checking for javah in Boot JDK... " >&6; }
25802      JAVAH=$BOOT_JDK/bin/javah
25803      if test ! -x $JAVAH; then
25804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25805$as_echo "not found" >&6; }
25806        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25807$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25808        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25809      fi
25810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25811$as_echo "ok" >&6; }
25812
25813
25814  else
25815    # The variable is set, but is it from the command line or the environment?
25816
25817    # Try to remove the string !JAVAH! from our list.
25818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25820      # If it failed, the variable was not from the command line. Ignore it,
25821      # but warn the user (except for BASH, which is always set by the calling BASH).
25822      if test "xJAVAH" != xBASH; then
25823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25824$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25825      fi
25826      # Try to locate tool using the code snippet
25827
25828      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25829$as_echo_n "checking for javah in Boot JDK... " >&6; }
25830      JAVAH=$BOOT_JDK/bin/javah
25831      if test ! -x $JAVAH; then
25832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25833$as_echo "not found" >&6; }
25834        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25835$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25836        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25837      fi
25838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25839$as_echo "ok" >&6; }
25840
25841
25842    else
25843      # If it succeeded, then it was overridden by the user. We will use it
25844      # for the tool.
25845
25846      # First remove it from the list of overridden variables, so we can test
25847      # for unknown variables in the end.
25848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25849
25850      # Check if the provided tool contains a complete path.
25851      tool_specified="$JAVAH"
25852      tool_basename="${tool_specified##*/}"
25853      if test "x$tool_basename" = "x$tool_specified"; then
25854        # A command without a complete path is provided, search $PATH.
25855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25856$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25857        # Extract the first word of "$tool_basename", so it can be a program name with args.
25858set dummy $tool_basename; ac_word=$2
25859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25860$as_echo_n "checking for $ac_word... " >&6; }
25861if ${ac_cv_path_JAVAH+:} false; then :
25862  $as_echo_n "(cached) " >&6
25863else
25864  case $JAVAH in
25865  [\\/]* | ?:[\\/]*)
25866  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25867  ;;
25868  *)
25869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25870for as_dir in $PATH
25871do
25872  IFS=$as_save_IFS
25873  test -z "$as_dir" && as_dir=.
25874    for ac_exec_ext in '' $ac_executable_extensions; do
25875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25876    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25878    break 2
25879  fi
25880done
25881  done
25882IFS=$as_save_IFS
25883
25884  ;;
25885esac
25886fi
25887JAVAH=$ac_cv_path_JAVAH
25888if test -n "$JAVAH"; then
25889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25890$as_echo "$JAVAH" >&6; }
25891else
25892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25893$as_echo "no" >&6; }
25894fi
25895
25896
25897        if test "x$JAVAH" = x; then
25898          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25899        fi
25900      else
25901        # Otherwise we believe it is a complete path. Use it as it is.
25902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25903$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25905$as_echo_n "checking for JAVAH... " >&6; }
25906        if test ! -x "$tool_specified"; then
25907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25908$as_echo "not found" >&6; }
25909          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25910        fi
25911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25912$as_echo "$tool_specified" >&6; }
25913      fi
25914    fi
25915  fi
25916
25917
25918
25919  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25920
25921  # Publish this variable in the help.
25922
25923
25924  if test "x$JAR" = x; then
25925    # The variable is not set by user, try to locate tool using the code snippet
25926
25927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25928$as_echo_n "checking for jar in Boot JDK... " >&6; }
25929      JAR=$BOOT_JDK/bin/jar
25930      if test ! -x $JAR; then
25931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25932$as_echo "not found" >&6; }
25933        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25934$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25935        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25936      fi
25937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25938$as_echo "ok" >&6; }
25939
25940
25941  else
25942    # The variable is set, but is it from the command line or the environment?
25943
25944    # Try to remove the string !JAR! from our list.
25945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25947      # If it failed, the variable was not from the command line. Ignore it,
25948      # but warn the user (except for BASH, which is always set by the calling BASH).
25949      if test "xJAR" != xBASH; then
25950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25951$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25952      fi
25953      # Try to locate tool using the code snippet
25954
25955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25956$as_echo_n "checking for jar in Boot JDK... " >&6; }
25957      JAR=$BOOT_JDK/bin/jar
25958      if test ! -x $JAR; then
25959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25960$as_echo "not found" >&6; }
25961        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25962$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25963        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25964      fi
25965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25966$as_echo "ok" >&6; }
25967
25968
25969    else
25970      # If it succeeded, then it was overridden by the user. We will use it
25971      # for the tool.
25972
25973      # First remove it from the list of overridden variables, so we can test
25974      # for unknown variables in the end.
25975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25976
25977      # Check if the provided tool contains a complete path.
25978      tool_specified="$JAR"
25979      tool_basename="${tool_specified##*/}"
25980      if test "x$tool_basename" = "x$tool_specified"; then
25981        # A command without a complete path is provided, search $PATH.
25982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25983$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25984        # Extract the first word of "$tool_basename", so it can be a program name with args.
25985set dummy $tool_basename; ac_word=$2
25986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25987$as_echo_n "checking for $ac_word... " >&6; }
25988if ${ac_cv_path_JAR+:} false; then :
25989  $as_echo_n "(cached) " >&6
25990else
25991  case $JAR in
25992  [\\/]* | ?:[\\/]*)
25993  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25994  ;;
25995  *)
25996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25997for as_dir in $PATH
25998do
25999  IFS=$as_save_IFS
26000  test -z "$as_dir" && as_dir=.
26001    for ac_exec_ext in '' $ac_executable_extensions; do
26002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26003    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26005    break 2
26006  fi
26007done
26008  done
26009IFS=$as_save_IFS
26010
26011  ;;
26012esac
26013fi
26014JAR=$ac_cv_path_JAR
26015if test -n "$JAR"; then
26016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26017$as_echo "$JAR" >&6; }
26018else
26019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26020$as_echo "no" >&6; }
26021fi
26022
26023
26024        if test "x$JAR" = x; then
26025          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26026        fi
26027      else
26028        # Otherwise we believe it is a complete path. Use it as it is.
26029        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26030$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26032$as_echo_n "checking for JAR... " >&6; }
26033        if test ! -x "$tool_specified"; then
26034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26035$as_echo "not found" >&6; }
26036          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26037        fi
26038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26039$as_echo "$tool_specified" >&6; }
26040      fi
26041    fi
26042  fi
26043
26044
26045
26046  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26047
26048  # Publish this variable in the help.
26049
26050
26051  if test "x$NATIVE2ASCII" = x; then
26052    # The variable is not set by user, try to locate tool using the code snippet
26053
26054      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26055$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26056      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26057      if test ! -x $NATIVE2ASCII; then
26058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26059$as_echo "not found" >&6; }
26060        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26061$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26062        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26063      fi
26064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26065$as_echo "ok" >&6; }
26066
26067
26068  else
26069    # The variable is set, but is it from the command line or the environment?
26070
26071    # Try to remove the string !NATIVE2ASCII! from our list.
26072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26074      # If it failed, the variable was not from the command line. Ignore it,
26075      # but warn the user (except for BASH, which is always set by the calling BASH).
26076      if test "xNATIVE2ASCII" != xBASH; then
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26078$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26079      fi
26080      # Try to locate tool using the code snippet
26081
26082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26083$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26084      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26085      if test ! -x $NATIVE2ASCII; then
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26087$as_echo "not found" >&6; }
26088        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26089$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26090        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26091      fi
26092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26093$as_echo "ok" >&6; }
26094
26095
26096    else
26097      # If it succeeded, then it was overridden by the user. We will use it
26098      # for the tool.
26099
26100      # First remove it from the list of overridden variables, so we can test
26101      # for unknown variables in the end.
26102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26103
26104      # Check if the provided tool contains a complete path.
26105      tool_specified="$NATIVE2ASCII"
26106      tool_basename="${tool_specified##*/}"
26107      if test "x$tool_basename" = "x$tool_specified"; then
26108        # A command without a complete path is provided, search $PATH.
26109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26110$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26111        # Extract the first word of "$tool_basename", so it can be a program name with args.
26112set dummy $tool_basename; ac_word=$2
26113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26114$as_echo_n "checking for $ac_word... " >&6; }
26115if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26116  $as_echo_n "(cached) " >&6
26117else
26118  case $NATIVE2ASCII in
26119  [\\/]* | ?:[\\/]*)
26120  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26121  ;;
26122  *)
26123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26124for as_dir in $PATH
26125do
26126  IFS=$as_save_IFS
26127  test -z "$as_dir" && as_dir=.
26128    for ac_exec_ext in '' $ac_executable_extensions; do
26129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26130    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26132    break 2
26133  fi
26134done
26135  done
26136IFS=$as_save_IFS
26137
26138  ;;
26139esac
26140fi
26141NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26142if test -n "$NATIVE2ASCII"; then
26143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26144$as_echo "$NATIVE2ASCII" >&6; }
26145else
26146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26147$as_echo "no" >&6; }
26148fi
26149
26150
26151        if test "x$NATIVE2ASCII" = x; then
26152          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26153        fi
26154      else
26155        # Otherwise we believe it is a complete path. Use it as it is.
26156        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26157$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26159$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26160        if test ! -x "$tool_specified"; then
26161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26162$as_echo "not found" >&6; }
26163          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26164        fi
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26166$as_echo "$tool_specified" >&6; }
26167      fi
26168    fi
26169  fi
26170
26171
26172
26173  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26174
26175  # Publish this variable in the help.
26176
26177
26178  if test "x$JARSIGNER" = x; then
26179    # The variable is not set by user, try to locate tool using the code snippet
26180
26181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26182$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26183      JARSIGNER=$BOOT_JDK/bin/jarsigner
26184      if test ! -x $JARSIGNER; then
26185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26186$as_echo "not found" >&6; }
26187        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26188$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26189        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26190      fi
26191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26192$as_echo "ok" >&6; }
26193
26194
26195  else
26196    # The variable is set, but is it from the command line or the environment?
26197
26198    # Try to remove the string !JARSIGNER! from our list.
26199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26201      # If it failed, the variable was not from the command line. Ignore it,
26202      # but warn the user (except for BASH, which is always set by the calling BASH).
26203      if test "xJARSIGNER" != xBASH; then
26204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26205$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26206      fi
26207      # Try to locate tool using the code snippet
26208
26209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26210$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26211      JARSIGNER=$BOOT_JDK/bin/jarsigner
26212      if test ! -x $JARSIGNER; then
26213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26214$as_echo "not found" >&6; }
26215        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26216$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26217        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26218      fi
26219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26220$as_echo "ok" >&6; }
26221
26222
26223    else
26224      # If it succeeded, then it was overridden by the user. We will use it
26225      # for the tool.
26226
26227      # First remove it from the list of overridden variables, so we can test
26228      # for unknown variables in the end.
26229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26230
26231      # Check if the provided tool contains a complete path.
26232      tool_specified="$JARSIGNER"
26233      tool_basename="${tool_specified##*/}"
26234      if test "x$tool_basename" = "x$tool_specified"; then
26235        # A command without a complete path is provided, search $PATH.
26236        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26237$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26238        # Extract the first word of "$tool_basename", so it can be a program name with args.
26239set dummy $tool_basename; ac_word=$2
26240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26241$as_echo_n "checking for $ac_word... " >&6; }
26242if ${ac_cv_path_JARSIGNER+:} false; then :
26243  $as_echo_n "(cached) " >&6
26244else
26245  case $JARSIGNER in
26246  [\\/]* | ?:[\\/]*)
26247  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26248  ;;
26249  *)
26250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26251for as_dir in $PATH
26252do
26253  IFS=$as_save_IFS
26254  test -z "$as_dir" && as_dir=.
26255    for ac_exec_ext in '' $ac_executable_extensions; do
26256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26257    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26259    break 2
26260  fi
26261done
26262  done
26263IFS=$as_save_IFS
26264
26265  ;;
26266esac
26267fi
26268JARSIGNER=$ac_cv_path_JARSIGNER
26269if test -n "$JARSIGNER"; then
26270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26271$as_echo "$JARSIGNER" >&6; }
26272else
26273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26274$as_echo "no" >&6; }
26275fi
26276
26277
26278        if test "x$JARSIGNER" = x; then
26279          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26280        fi
26281      else
26282        # Otherwise we believe it is a complete path. Use it as it is.
26283        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26284$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26286$as_echo_n "checking for JARSIGNER... " >&6; }
26287        if test ! -x "$tool_specified"; then
26288          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26289$as_echo "not found" >&6; }
26290          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26291        fi
26292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26293$as_echo "$tool_specified" >&6; }
26294      fi
26295    fi
26296  fi
26297
26298
26299
26300  # Finally, set some other options...
26301
26302  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26303  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26304
26305
26306
26307
26308###############################################################################
26309#
26310# Configure the sources to use. We can add or override individual directories.
26311#
26312###############################################################################
26313
26314
26315  # Where are the sources. Any of these can be overridden
26316  # using --with-override-corba and the likes.
26317  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26318  CORBA_TOPDIR="$SRC_ROOT/corba"
26319  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26320  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26321  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26322  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26323  JDK_TOPDIR="$SRC_ROOT/jdk"
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334  ###############################################################################
26335  #
26336  # Pickup additional source for a component from outside of the source root
26337  # or override source for a component.
26338  #
26339
26340# Check whether --with-add-source-root was given.
26341if test "${with_add_source_root+set}" = set; then :
26342  withval=$with_add_source_root;
26343fi
26344
26345
26346
26347# Check whether --with-override-source-root was given.
26348if test "${with_override_source_root+set}" = set; then :
26349  withval=$with_override_source_root;
26350fi
26351
26352
26353
26354# Check whether --with-adds-and-overrides was given.
26355if test "${with_adds_and_overrides+set}" = set; then :
26356  withval=$with_adds_and_overrides;
26357fi
26358
26359
26360  if test "x$with_adds_and_overrides" != x; then
26361    with_add_source_root="$with_adds_and_overrides/adds"
26362    with_override_source_root="$with_adds_and_overrides/overrides"
26363  fi
26364
26365  if test "x$with_add_source_root" != x; then
26366    if ! test -d $with_add_source_root; then
26367      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26368    fi
26369    CURDIR="$PWD"
26370    cd "$with_add_source_root"
26371    ADD_SRC_ROOT="`pwd`"
26372    cd "$CURDIR"
26373    # Verify that the addon source root does not have any root makefiles.
26374    # If it does, then it is usually an error, prevent this.
26375    if test -f $with_add_source_root/langtools/make/Makefile; then
26376      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
26377    fi
26378    if test -f $with_add_source_root/corba/make/Makefile; then
26379      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
26380    fi
26381    if test -f $with_add_source_root/jaxp/make/Makefile; then
26382      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
26383    fi
26384    if test -f $with_add_source_root/jaxws/make/Makefile; then
26385      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
26386    fi
26387    if test -f $with_add_source_root/hotspot/make/Makefile; then
26388      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
26389    fi
26390    if test -f $with_add_source_root/nashorn/make/Makefile; then
26391      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
26392    fi
26393    if test -f $with_add_source_root/jdk/make/Makefile; then
26394      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
26395    fi
26396  fi
26397
26398
26399  if test "x$with_override_source_root" != x; then
26400    if ! test -d $with_override_source_root; then
26401      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26402    fi
26403    CURDIR="$PWD"
26404    cd "$with_override_source_root"
26405    OVERRIDE_SRC_ROOT="`pwd`"
26406    cd "$CURDIR"
26407    if test -f $with_override_source_root/langtools/make/Makefile; then
26408      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
26409    fi
26410    if test -f $with_override_source_root/corba/make/Makefile; then
26411      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
26412    fi
26413    if test -f $with_override_source_root/jaxp/make/Makefile; then
26414      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
26415    fi
26416    if test -f $with_override_source_root/jaxws/make/Makefile; then
26417      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
26418    fi
26419    if test -f $with_override_source_root/hotspot/make/Makefile; then
26420      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
26421    fi
26422    if test -f $with_override_source_root/nashorn/make/Makefile; then
26423      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
26424    fi
26425    if test -f $with_override_source_root/jdk/make/Makefile; then
26426      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
26427    fi
26428  fi
26429
26430
26431  ###############################################################################
26432  #
26433  # Override a repo completely, this is used for example when you have 3 small
26434  # development sandboxes of the langtools sources and want to avoid having 3 full
26435  # OpenJDK sources checked out on disk.
26436  #
26437  # Assuming that the 3 langtools sandboxes are located here:
26438  # /home/fredrik/sandbox1/langtools
26439  # /home/fredrik/sandbox2/langtools
26440  # /home/fredrik/sandbox3/langtools
26441  #
26442  # From the source root you create build subdirs manually:
26443  #     mkdir -p build1 build2 build3
26444  # in each build directory run:
26445  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26446  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26447  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26448  #
26449
26450
26451# Check whether --with-override-langtools was given.
26452if test "${with_override_langtools+set}" = set; then :
26453  withval=$with_override_langtools;
26454fi
26455
26456
26457
26458# Check whether --with-override-corba was given.
26459if test "${with_override_corba+set}" = set; then :
26460  withval=$with_override_corba;
26461fi
26462
26463
26464
26465# Check whether --with-override-jaxp was given.
26466if test "${with_override_jaxp+set}" = set; then :
26467  withval=$with_override_jaxp;
26468fi
26469
26470
26471
26472# Check whether --with-override-jaxws was given.
26473if test "${with_override_jaxws+set}" = set; then :
26474  withval=$with_override_jaxws;
26475fi
26476
26477
26478
26479# Check whether --with-override-hotspot was given.
26480if test "${with_override_hotspot+set}" = set; then :
26481  withval=$with_override_hotspot;
26482fi
26483
26484
26485
26486# Check whether --with-override-nashorn was given.
26487if test "${with_override_nashorn+set}" = set; then :
26488  withval=$with_override_nashorn;
26489fi
26490
26491
26492
26493# Check whether --with-override-jdk was given.
26494if test "${with_override_jdk+set}" = set; then :
26495  withval=$with_override_jdk;
26496fi
26497
26498
26499  if test "x$with_override_langtools" != x; then
26500    CURDIR="$PWD"
26501    cd "$with_override_langtools"
26502    LANGTOOLS_TOPDIR="`pwd`"
26503    cd "$CURDIR"
26504    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26505      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26506    fi
26507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26508$as_echo_n "checking if langtools should be overridden... " >&6; }
26509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26510$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26511  fi
26512  if test "x$with_override_corba" != x; then
26513    CURDIR="$PWD"
26514    cd "$with_override_corba"
26515    CORBA_TOPDIR="`pwd`"
26516    cd "$CURDIR"
26517    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26518      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26519    fi
26520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26521$as_echo_n "checking if corba should be overridden... " >&6; }
26522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26523$as_echo "yes with $CORBA_TOPDIR" >&6; }
26524  fi
26525  if test "x$with_override_jaxp" != x; then
26526    CURDIR="$PWD"
26527    cd "$with_override_jaxp"
26528    JAXP_TOPDIR="`pwd`"
26529    cd "$CURDIR"
26530    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26531      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26532    fi
26533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26534$as_echo_n "checking if jaxp should be overridden... " >&6; }
26535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26536$as_echo "yes with $JAXP_TOPDIR" >&6; }
26537  fi
26538  if test "x$with_override_jaxws" != x; then
26539    CURDIR="$PWD"
26540    cd "$with_override_jaxws"
26541    JAXWS_TOPDIR="`pwd`"
26542    cd "$CURDIR"
26543    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26544      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26545    fi
26546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26547$as_echo_n "checking if jaxws should be overridden... " >&6; }
26548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26549$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26550  fi
26551  if test "x$with_override_hotspot" != x; then
26552    CURDIR="$PWD"
26553    cd "$with_override_hotspot"
26554    HOTSPOT_TOPDIR="`pwd`"
26555    cd "$CURDIR"
26556    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26557      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26558    fi
26559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26560$as_echo_n "checking if hotspot should be overridden... " >&6; }
26561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26562$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26563  fi
26564  if test "x$with_override_nashorn" != x; then
26565    CURDIR="$PWD"
26566    cd "$with_override_nashorn"
26567    NASHORN_TOPDIR="`pwd`"
26568    cd "$CURDIR"
26569    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26570      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26571    fi
26572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26573$as_echo_n "checking if nashorn should be overridden... " >&6; }
26574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26575$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26576  fi
26577  if test "x$with_override_jdk" != x; then
26578    CURDIR="$PWD"
26579    cd "$with_override_jdk"
26580    JDK_TOPDIR="`pwd`"
26581    cd "$CURDIR"
26582    if ! test -f $JDK_TOPDIR/make/Makefile; then
26583      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26584    fi
26585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26586$as_echo_n "checking if JDK should be overridden... " >&6; }
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26588$as_echo "yes with $JDK_TOPDIR" >&6; }
26589  fi
26590
26591
26592  BUILD_OUTPUT="$OUTPUT_ROOT"
26593
26594
26595  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26596  BUILD_HOTSPOT=true
26597
26598
26599
26600# Check whether --with-import-hotspot was given.
26601if test "${with_import_hotspot+set}" = set; then :
26602  withval=$with_import_hotspot;
26603fi
26604
26605  if test "x$with_import_hotspot" != x; then
26606    CURDIR="$PWD"
26607    cd "$with_import_hotspot"
26608    HOTSPOT_DIST="`pwd`"
26609    cd "$CURDIR"
26610    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26611      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26612    fi
26613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26614$as_echo_n "checking if hotspot should be imported... " >&6; }
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26616$as_echo "yes from $HOTSPOT_DIST" >&6; }
26617    BUILD_HOTSPOT=false
26618  fi
26619
26620  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26621
26622
26623###############################################################################
26624#
26625# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26626# native code.
26627#
26628###############################################################################
26629
26630# First determine the toolchain type (compiler family)
26631
26632
26633# Check whether --with-toolchain-type was given.
26634if test "${with_toolchain_type+set}" = set; then :
26635  withval=$with_toolchain_type;
26636fi
26637
26638
26639  # Use indirect variable referencing
26640  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26641  VALID_TOOLCHAINS=${!toolchain_var_name}
26642
26643  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26644    if test -n "$XCODEBUILD"; then
26645      # On Mac OS X, default toolchain to clang after Xcode 5
26646      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26647      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26648      if test $? -ne 0; then
26649        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26650      fi
26651      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26652          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26653          $CUT -f 1 -d .`
26654      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26655$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26656      if test $XCODE_MAJOR_VERSION -ge 5; then
26657          DEFAULT_TOOLCHAIN="clang"
26658      else
26659          DEFAULT_TOOLCHAIN="gcc"
26660      fi
26661    else
26662      # If Xcode is not installed, but the command line tools are
26663      # then we can't run xcodebuild. On these systems we should
26664      # default to clang
26665      DEFAULT_TOOLCHAIN="clang"
26666    fi
26667  else
26668    # First toolchain type in the list is the default
26669    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26670  fi
26671
26672  if test "x$with_toolchain_type" = xlist; then
26673    # List all toolchains
26674    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26675$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26676    for toolchain in $VALID_TOOLCHAINS; do
26677      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26678      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26679      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26680    done
26681
26682    exit 0
26683  elif test "x$with_toolchain_type" != x; then
26684    # User override; check that it is valid
26685    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26686      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26687$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26688      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26689$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26690      as_fn_error $? "Cannot continue." "$LINENO" 5
26691    fi
26692    TOOLCHAIN_TYPE=$with_toolchain_type
26693  else
26694    # No flag given, use default
26695    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26696  fi
26697
26698
26699  TOOLCHAIN_CC_BINARY_clang="clang"
26700  TOOLCHAIN_CC_BINARY_gcc="gcc"
26701  TOOLCHAIN_CC_BINARY_microsoft="cl"
26702  TOOLCHAIN_CC_BINARY_solstudio="cc"
26703  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26704
26705  TOOLCHAIN_CXX_BINARY_clang="clang++"
26706  TOOLCHAIN_CXX_BINARY_gcc="g++"
26707  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26708  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26709  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26710
26711  # Use indirect variable referencing
26712  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26713  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26714  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26715  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26716  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26717  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26718
26719
26720  # Define filename patterns
26721  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26722    LIBRARY_PREFIX=
26723    SHARED_LIBRARY_SUFFIX='.dll'
26724    STATIC_LIBRARY_SUFFIX='.lib'
26725    SHARED_LIBRARY='$1.dll'
26726    STATIC_LIBRARY='$1.lib'
26727    OBJ_SUFFIX='.obj'
26728    EXE_SUFFIX='.exe'
26729  else
26730    LIBRARY_PREFIX=lib
26731    SHARED_LIBRARY_SUFFIX='.so'
26732    STATIC_LIBRARY_SUFFIX='.a'
26733    SHARED_LIBRARY='lib$1.so'
26734    STATIC_LIBRARY='lib$1.a'
26735    OBJ_SUFFIX='.o'
26736    EXE_SUFFIX=''
26737    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26738      SHARED_LIBRARY='lib$1.dylib'
26739      SHARED_LIBRARY_SUFFIX='.dylib'
26740    fi
26741  fi
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26753    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26754$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26755  else
26756    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26757$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26758  fi
26759
26760
26761# Then detect the actual binaries needed
26762
26763  # FIXME: Is this needed?
26764  ac_ext=cpp
26765ac_cpp='$CXXCPP $CPPFLAGS'
26766ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26767ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26768ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26769
26770
26771  # Store the CFLAGS etc passed to the configure script.
26772  ORG_CFLAGS="$CFLAGS"
26773  ORG_CXXFLAGS="$CXXFLAGS"
26774  ORG_OBJCFLAGS="$OBJCFLAGS"
26775
26776  # On Windows, we need to detect the visual studio installation first.
26777  # This will change the PATH, but we need to keep that new PATH even
26778  # after toolchain detection is done, since the compiler (on x86) uses
26779  # it for DLL resolution in runtime.
26780  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26781
26782  # Store path to cygwin link.exe to help excluding it when searching for
26783  # VS linker. This must be done before changing the PATH when looking for VS.
26784  # Extract the first word of "link", so it can be a program name with args.
26785set dummy link; ac_word=$2
26786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26787$as_echo_n "checking for $ac_word... " >&6; }
26788if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26789  $as_echo_n "(cached) " >&6
26790else
26791  case $CYGWIN_LINK in
26792  [\\/]* | ?:[\\/]*)
26793  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26794  ;;
26795  *)
26796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26797for as_dir in $PATH
26798do
26799  IFS=$as_save_IFS
26800  test -z "$as_dir" && as_dir=.
26801    for ac_exec_ext in '' $ac_executable_extensions; do
26802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26803    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26805    break 2
26806  fi
26807done
26808  done
26809IFS=$as_save_IFS
26810
26811  ;;
26812esac
26813fi
26814CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26815if test -n "$CYGWIN_LINK"; then
26816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26817$as_echo "$CYGWIN_LINK" >&6; }
26818else
26819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26820$as_echo "no" >&6; }
26821fi
26822
26823
26824  if test "x$CYGWIN_LINK" != x; then
26825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26826$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26827    "$CYGWIN_LINK" --version > /dev/null
26828    if test $? -eq 0 ; then
26829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26830$as_echo "yes" >&6; }
26831    else
26832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26833$as_echo "no" >&6; }
26834      # This might be the VS linker. Don't exclude it later on.
26835      CYGWIN_LINK=""
26836    fi
26837  fi
26838
26839  # First-hand choice is to locate and run the vsvars bat file.
26840
26841  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26842    VCVARSFILE="vc/bin/vcvars32.bat"
26843  else
26844    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26845  fi
26846
26847  VS_ENV_CMD=""
26848  VS_ENV_ARGS=""
26849  if test "x$with_toolsdir" != x; then
26850
26851  if test "x$VS_ENV_CMD" = x; then
26852    VS100BASE="$with_toolsdir/../.."
26853    METHOD="--with-tools-dir"
26854
26855  windows_path="$VS100BASE"
26856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26857    unix_path=`$CYGPATH -u "$windows_path"`
26858    VS100BASE="$unix_path"
26859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26861    VS100BASE="$unix_path"
26862  fi
26863
26864    if test -d "$VS100BASE"; then
26865      if test -f "$VS100BASE/$VCVARSFILE"; then
26866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26867$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26868        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26869        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26870        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26871        # TODO: improve detection for other versions of VS
26872        PLATFORM_TOOLSET="v100"
26873      else
26874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26875$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26876        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26877$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26878      fi
26879    fi
26880  fi
26881
26882  fi
26883
26884  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26885    # Having specified an argument which is incorrect will produce an instant failure;
26886    # we should not go on looking
26887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26888$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26889    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26890$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26891    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26892  fi
26893
26894  if test "x$VS100COMNTOOLS" != x; then
26895
26896  if test "x$VS_ENV_CMD" = x; then
26897    VS100BASE="$VS100COMNTOOLS/../.."
26898    METHOD="VS100COMNTOOLS variable"
26899
26900  windows_path="$VS100BASE"
26901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26902    unix_path=`$CYGPATH -u "$windows_path"`
26903    VS100BASE="$unix_path"
26904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26906    VS100BASE="$unix_path"
26907  fi
26908
26909    if test -d "$VS100BASE"; then
26910      if test -f "$VS100BASE/$VCVARSFILE"; then
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26912$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26913        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26914        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26915        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26916        # TODO: improve detection for other versions of VS
26917        PLATFORM_TOOLSET="v100"
26918      else
26919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26920$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26922$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26923      fi
26924    fi
26925  fi
26926
26927  fi
26928  if test "x$PROGRAMFILES" != x; then
26929
26930  if test "x$VS_ENV_CMD" = x; then
26931    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26932    METHOD="well-known name"
26933
26934  windows_path="$VS100BASE"
26935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26936    unix_path=`$CYGPATH -u "$windows_path"`
26937    VS100BASE="$unix_path"
26938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26940    VS100BASE="$unix_path"
26941  fi
26942
26943    if test -d "$VS100BASE"; then
26944      if test -f "$VS100BASE/$VCVARSFILE"; then
26945        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26946$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26947        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26948        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26949        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26950        # TODO: improve detection for other versions of VS
26951        PLATFORM_TOOLSET="v100"
26952      else
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26954$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26956$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26957      fi
26958    fi
26959  fi
26960
26961  fi
26962
26963  if test "x$VS_ENV_CMD" = x; then
26964    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26965    METHOD="well-known name"
26966
26967  windows_path="$VS100BASE"
26968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26969    unix_path=`$CYGPATH -u "$windows_path"`
26970    VS100BASE="$unix_path"
26971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26973    VS100BASE="$unix_path"
26974  fi
26975
26976    if test -d "$VS100BASE"; then
26977      if test -f "$VS100BASE/$VCVARSFILE"; then
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26979$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26980        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26981        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26982        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26983        # TODO: improve detection for other versions of VS
26984        PLATFORM_TOOLSET="v100"
26985      else
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26987$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26988        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26989$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26990      fi
26991    fi
26992  fi
26993
26994
26995  if test "x$VS_ENV_CMD" = x; then
26996    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26997    METHOD="well-known name"
26998
26999  windows_path="$VS100BASE"
27000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27001    unix_path=`$CYGPATH -u "$windows_path"`
27002    VS100BASE="$unix_path"
27003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27005    VS100BASE="$unix_path"
27006  fi
27007
27008    if test -d "$VS100BASE"; then
27009      if test -f "$VS100BASE/$VCVARSFILE"; then
27010        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27011$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27012        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27013        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27014        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27015        # TODO: improve detection for other versions of VS
27016        PLATFORM_TOOLSET="v100"
27017      else
27018        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27019$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27021$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27022      fi
27023    fi
27024  fi
27025
27026
27027  if test "x$ProgramW6432" != x; then
27028
27029  if test "x$VS_ENV_CMD" = x; then
27030    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27031    METHOD="well-known name"
27032
27033  windows_path="$WIN_SDK_BASE"
27034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27035    unix_path=`$CYGPATH -u "$windows_path"`
27036    WIN_SDK_BASE="$unix_path"
27037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27039    WIN_SDK_BASE="$unix_path"
27040  fi
27041
27042    if test -d "$WIN_SDK_BASE"; then
27043      # There have been cases of partial or broken SDK installations. A missing
27044      # lib dir is not going to work.
27045      if test ! -d "$WIN_SDK_BASE/../lib"; then
27046        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27047$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27048        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27049$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27050      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27051        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27052$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27053        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27054        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27055          VS_ENV_ARGS="/x86"
27056        else
27057          VS_ENV_ARGS="/x64"
27058        fi
27059        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27060        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27061        # TODO: improve detection for other versions of SDK
27062        PLATFORM_TOOLSET="Windows7.1SDK"
27063      else
27064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27066        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27067$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27068      fi
27069    fi
27070  fi
27071
27072  fi
27073  if test "x$PROGRAMW6432" != x; then
27074
27075  if test "x$VS_ENV_CMD" = x; then
27076    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27077    METHOD="well-known name"
27078
27079  windows_path="$WIN_SDK_BASE"
27080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27081    unix_path=`$CYGPATH -u "$windows_path"`
27082    WIN_SDK_BASE="$unix_path"
27083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27085    WIN_SDK_BASE="$unix_path"
27086  fi
27087
27088    if test -d "$WIN_SDK_BASE"; then
27089      # There have been cases of partial or broken SDK installations. A missing
27090      # lib dir is not going to work.
27091      if test ! -d "$WIN_SDK_BASE/../lib"; then
27092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27094        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27095$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27096      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27099        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27100        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27101          VS_ENV_ARGS="/x86"
27102        else
27103          VS_ENV_ARGS="/x64"
27104        fi
27105        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27106        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27107        # TODO: improve detection for other versions of SDK
27108        PLATFORM_TOOLSET="Windows7.1SDK"
27109      else
27110        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27111$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27112        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27113$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27114      fi
27115    fi
27116  fi
27117
27118  fi
27119  if test "x$PROGRAMFILES" != x; then
27120
27121  if test "x$VS_ENV_CMD" = x; then
27122    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27123    METHOD="well-known name"
27124
27125  windows_path="$WIN_SDK_BASE"
27126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127    unix_path=`$CYGPATH -u "$windows_path"`
27128    WIN_SDK_BASE="$unix_path"
27129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27131    WIN_SDK_BASE="$unix_path"
27132  fi
27133
27134    if test -d "$WIN_SDK_BASE"; then
27135      # There have been cases of partial or broken SDK installations. A missing
27136      # lib dir is not going to work.
27137      if test ! -d "$WIN_SDK_BASE/../lib"; then
27138        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27139$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27140        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27141$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27142      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27145        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27146        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27147          VS_ENV_ARGS="/x86"
27148        else
27149          VS_ENV_ARGS="/x64"
27150        fi
27151        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27152        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27153        # TODO: improve detection for other versions of SDK
27154        PLATFORM_TOOLSET="Windows7.1SDK"
27155      else
27156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27157$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27158        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27159$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27160      fi
27161    fi
27162  fi
27163
27164  fi
27165
27166  if test "x$VS_ENV_CMD" = x; then
27167    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27168    METHOD="well-known name"
27169
27170  windows_path="$WIN_SDK_BASE"
27171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27172    unix_path=`$CYGPATH -u "$windows_path"`
27173    WIN_SDK_BASE="$unix_path"
27174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27176    WIN_SDK_BASE="$unix_path"
27177  fi
27178
27179    if test -d "$WIN_SDK_BASE"; then
27180      # There have been cases of partial or broken SDK installations. A missing
27181      # lib dir is not going to work.
27182      if test ! -d "$WIN_SDK_BASE/../lib"; then
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27184$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27185        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27186$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27187      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27190        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27191        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27192          VS_ENV_ARGS="/x86"
27193        else
27194          VS_ENV_ARGS="/x64"
27195        fi
27196        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27197        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27198        # TODO: improve detection for other versions of SDK
27199        PLATFORM_TOOLSET="Windows7.1SDK"
27200      else
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27204$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27205      fi
27206    fi
27207  fi
27208
27209
27210  if test "x$VS_ENV_CMD" = x; then
27211    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27212    METHOD="well-known name"
27213
27214  windows_path="$WIN_SDK_BASE"
27215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27216    unix_path=`$CYGPATH -u "$windows_path"`
27217    WIN_SDK_BASE="$unix_path"
27218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27220    WIN_SDK_BASE="$unix_path"
27221  fi
27222
27223    if test -d "$WIN_SDK_BASE"; then
27224      # There have been cases of partial or broken SDK installations. A missing
27225      # lib dir is not going to work.
27226      if test ! -d "$WIN_SDK_BASE/../lib"; then
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27228$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27229        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27230$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27231      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27233$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27234        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27235        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27236          VS_ENV_ARGS="/x86"
27237        else
27238          VS_ENV_ARGS="/x64"
27239        fi
27240        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27241        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27242        # TODO: improve detection for other versions of SDK
27243        PLATFORM_TOOLSET="Windows7.1SDK"
27244      else
27245        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27246$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27247        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27248$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27249      fi
27250    fi
27251  fi
27252
27253
27254  if test "x$VS_ENV_CMD" != x; then
27255    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27256
27257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27258
27259  # First separate the path from the arguments. This will split at the first
27260  # space.
27261  complete="$VS_ENV_CMD"
27262  path="${complete%% *}"
27263  tmp="$complete EOL"
27264  arguments="${tmp#* }"
27265
27266  # Input might be given as Windows format, start by converting to
27267  # unix format.
27268  new_path=`$CYGPATH -u "$path"`
27269
27270  # Now try to locate executable using which
27271  new_path=`$WHICH "$new_path" 2> /dev/null`
27272  # bat and cmd files are not always considered executable in cygwin causing which
27273  # to not find them
27274  if test "x$new_path" = x \
27275      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27276      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27277    new_path=`$CYGPATH -u "$path"`
27278  fi
27279  if test "x$new_path" = x; then
27280    # Oops. Which didn't find the executable.
27281    # The splitting of arguments from the executable at a space might have been incorrect,
27282    # since paths with space are more likely in Windows. Give it another try with the whole
27283    # argument.
27284    path="$complete"
27285    arguments="EOL"
27286    new_path=`$CYGPATH -u "$path"`
27287    new_path=`$WHICH "$new_path" 2> /dev/null`
27288    # bat and cmd files are not always considered executable in cygwin causing which
27289    # to not find them
27290    if test "x$new_path" = x \
27291        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27292        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27293      new_path=`$CYGPATH -u "$path"`
27294    fi
27295    if test "x$new_path" = x; then
27296      # It's still not found. Now this is an unrecoverable error.
27297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27298$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27299      has_space=`$ECHO "$complete" | $GREP " "`
27300      if test "x$has_space" != x; then
27301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27303      fi
27304      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27305    fi
27306  fi
27307
27308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27311  # "foo.exe" is OK but "foo" is an error.
27312  #
27313  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27314  # It is also a way to make sure we got the proper file name for the real test later on.
27315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27316  if test "x$test_shortpath" = x; then
27317    # Short path failed, file does not exist as specified.
27318    # Try adding .exe or .cmd
27319    if test -f "${new_path}.exe"; then
27320      input_to_shortpath="${new_path}.exe"
27321    elif test -f "${new_path}.cmd"; then
27322      input_to_shortpath="${new_path}.cmd"
27323    else
27324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27325$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27326      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27327$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27328      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27329    fi
27330  else
27331    input_to_shortpath="$new_path"
27332  fi
27333
27334  # Call helper function which possibly converts this using DOS-style short mode.
27335  # If so, the updated path is stored in $new_path.
27336  new_path="$input_to_shortpath"
27337
27338  input_path="$input_to_shortpath"
27339  # Check if we need to convert this using DOS-style short mode. If the path
27340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27341  # take no chances and rewrite it.
27342  # Note: m4 eats our [], so we need to use [ and ] instead.
27343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27344  if test "x$has_forbidden_chars" != x; then
27345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27349      # Going to short mode and back again did indeed matter. Since short mode is
27350      # case insensitive, let's make it lowercase to improve readability.
27351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27352      # Now convert it back to Unix-stile (cygpath)
27353      input_path=`$CYGPATH -u "$shortmode_path"`
27354      new_path="$input_path"
27355    fi
27356  fi
27357
27358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27359  if test "x$test_cygdrive_prefix" = x; then
27360    # As a simple fix, exclude /usr/bin since it's not a real path.
27361    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27363      # a path prefixed by /cygdrive for fixpath to work.
27364      new_path="$CYGWIN_ROOT_PATH$input_path"
27365    fi
27366  fi
27367
27368  # remove trailing .exe if any
27369  new_path="${new_path/%.exe/}"
27370
27371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27372
27373  # First separate the path from the arguments. This will split at the first
27374  # space.
27375  complete="$VS_ENV_CMD"
27376  path="${complete%% *}"
27377  tmp="$complete EOL"
27378  arguments="${tmp#* }"
27379
27380  # Input might be given as Windows format, start by converting to
27381  # unix format.
27382  new_path="$path"
27383
27384  windows_path="$new_path"
27385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27386    unix_path=`$CYGPATH -u "$windows_path"`
27387    new_path="$unix_path"
27388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27390    new_path="$unix_path"
27391  fi
27392
27393
27394  # Now try to locate executable using which
27395  new_path=`$WHICH "$new_path" 2> /dev/null`
27396
27397  if test "x$new_path" = x; then
27398    # Oops. Which didn't find the executable.
27399    # The splitting of arguments from the executable at a space might have been incorrect,
27400    # since paths with space are more likely in Windows. Give it another try with the whole
27401    # argument.
27402    path="$complete"
27403    arguments="EOL"
27404    new_path="$path"
27405
27406  windows_path="$new_path"
27407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27408    unix_path=`$CYGPATH -u "$windows_path"`
27409    new_path="$unix_path"
27410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27412    new_path="$unix_path"
27413  fi
27414
27415
27416    new_path=`$WHICH "$new_path" 2> /dev/null`
27417    # bat and cmd files are not always considered executable in MSYS causing which
27418    # to not find them
27419    if test "x$new_path" = x \
27420        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27421        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27422      new_path="$path"
27423
27424  windows_path="$new_path"
27425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27426    unix_path=`$CYGPATH -u "$windows_path"`
27427    new_path="$unix_path"
27428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27430    new_path="$unix_path"
27431  fi
27432
27433    fi
27434
27435    if test "x$new_path" = x; then
27436      # It's still not found. Now this is an unrecoverable error.
27437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27438$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27439      has_space=`$ECHO "$complete" | $GREP " "`
27440      if test "x$has_space" != x; then
27441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27443      fi
27444      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27445    fi
27446  fi
27447
27448  # Now new_path has a complete unix path to the binary
27449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27450    # Keep paths in /bin as-is, but remove trailing .exe if any
27451    new_path="${new_path/%.exe/}"
27452    # Do not save /bin paths to all_fixpath_prefixes!
27453  else
27454    # Not in mixed or Windows style, start by that.
27455    new_path=`cmd //c echo $new_path`
27456
27457  input_path="$new_path"
27458  # Check if we need to convert this using DOS-style short mode. If the path
27459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27460  # take no chances and rewrite it.
27461  # Note: m4 eats our [], so we need to use [ and ] instead.
27462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27463  if test "x$has_forbidden_chars" != x; then
27464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27466  fi
27467
27468    # Output is in $new_path
27469
27470  windows_path="$new_path"
27471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27472    unix_path=`$CYGPATH -u "$windows_path"`
27473    new_path="$unix_path"
27474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27476    new_path="$unix_path"
27477  fi
27478
27479    # remove trailing .exe if any
27480    new_path="${new_path/%.exe/}"
27481
27482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27484  fi
27485
27486  else
27487    # We're on a posix platform. Hooray! :)
27488    # First separate the path from the arguments. This will split at the first
27489    # space.
27490    complete="$VS_ENV_CMD"
27491    path="${complete%% *}"
27492    tmp="$complete EOL"
27493    arguments="${tmp#* }"
27494
27495    # Cannot rely on the command "which" here since it doesn't always work.
27496    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27497    if test -z "$is_absolute_path"; then
27498      # Path to executable is not absolute. Find it.
27499      IFS_save="$IFS"
27500      IFS=:
27501      for p in $PATH; do
27502        if test -f "$p/$path" && test -x "$p/$path"; then
27503          new_path="$p/$path"
27504          break
27505        fi
27506      done
27507      IFS="$IFS_save"
27508    else
27509      # This is an absolute path, we can use it without further modifications.
27510      new_path="$path"
27511    fi
27512
27513    if test "x$new_path" = x; then
27514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27515$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27516      has_space=`$ECHO "$complete" | $GREP " "`
27517      if test "x$has_space" != x; then
27518        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27519$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27520      fi
27521      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27522    fi
27523  fi
27524
27525  # Now join together the path and the arguments once again
27526  if test "x$arguments" != xEOL; then
27527    new_complete="$new_path ${arguments% *}"
27528  else
27529    new_complete="$new_path"
27530  fi
27531
27532  if test "x$complete" != "x$new_complete"; then
27533    VS_ENV_CMD="$new_complete"
27534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27535$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27536  fi
27537
27538
27539    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27540    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27541$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27542
27543    # We need to create a couple of temporary files.
27544    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27545    $MKDIR -p $VS_ENV_TMP_DIR
27546
27547    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27548    # Instead create a shell script which will set the relevant variables when run.
27549    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27550
27551  unix_path="$WINPATH_VS_ENV_CMD"
27552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27553    windows_path=`$CYGPATH -m "$unix_path"`
27554    WINPATH_VS_ENV_CMD="$windows_path"
27555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27556    windows_path=`cmd //c echo $unix_path`
27557    WINPATH_VS_ENV_CMD="$windows_path"
27558  fi
27559
27560    WINPATH_BASH="$BASH"
27561
27562  unix_path="$WINPATH_BASH"
27563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27564    windows_path=`$CYGPATH -m "$unix_path"`
27565    WINPATH_BASH="$windows_path"
27566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27567    windows_path=`cmd //c echo $unix_path`
27568    WINPATH_BASH="$windows_path"
27569  fi
27570
27571
27572    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27573    # script (executable by bash) that will setup the important variables.
27574    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27575    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27576    # This will end up something like:
27577    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27578    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27579    # These will end up something like:
27580    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27581    # The trailing space for everyone except PATH is no typo, but is needed due
27582    # to trailing \ in the Windows paths. These will be stripped later.
27583    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27584    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27585    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27586    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27587    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27588    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27589
27590    # Now execute the newly created bat file.
27591    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27592    # Change directory so we don't need to mess with Windows paths in redirects.
27593    cd $VS_ENV_TMP_DIR
27594    cmd /c extract-vs-env.bat | $CAT
27595    cd $CURDIR
27596
27597    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27598      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27599$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27600      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27601$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27602      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27603$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27604      as_fn_error $? "Cannot continue" "$LINENO" 5
27605    fi
27606
27607    # Now set all paths and other env variables. This will allow the rest of
27608    # the configure script to find and run the compiler in the proper way.
27609    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27610$as_echo "$as_me: Setting extracted environment variables" >&6;}
27611    . $VS_ENV_TMP_DIR/set-vs-env.sh
27612    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27613    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27614  else
27615    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27616    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27617$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27618  fi
27619
27620  # At this point, we should have correct variables in the environment, or we can't continue.
27621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27622$as_echo_n "checking for Visual Studio variables... " >&6; }
27623
27624  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27625    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27627$as_echo "present but broken" >&6; }
27628      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27629    else
27630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27631$as_echo "ok" >&6; }
27632      # Remove any trailing "\" and " " from the variables.
27633      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27634      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27635      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27636      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27637      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27638      # Remove any paths containing # (typically F#) as that messes up make. This
27639      # is needed if visual studio was installed with F# support.
27640      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27641
27642
27643
27644
27645    fi
27646  else
27647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27648$as_echo "not found" >&6; }
27649
27650    if test "x$VS_ENV_CMD" = x; then
27651      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27652$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27653      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27654$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27655    else
27656      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27657$as_echo "$as_me: Running the extraction script failed." >&6;}
27658    fi
27659    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27660$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27661    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27662$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27663    as_fn_error $? "Cannot continue" "$LINENO" 5
27664  fi
27665
27666    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27667    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27668    PATH="$VS_PATH"
27669    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27670    export INCLUDE="$VS_INCLUDE"
27671    export LIB="$VS_LIB"
27672  fi
27673
27674  # autoconf magic only relies on PATH, so update it if tools dir is specified
27675  OLD_PATH="$PATH"
27676
27677  # For solaris we really need solaris tools, and not the GNU equivalent.
27678  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27679  # so add that to path before starting to probe.
27680  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27681  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27682    PATH="/usr/ccs/bin:$PATH"
27683  fi
27684
27685  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27686  # override all other locations.
27687  if test "x$TOOLCHAIN_PATH" != x; then
27688    PATH=$TOOLCHAIN_PATH:$PATH
27689  fi
27690
27691
27692  #
27693  # Setup the compilers (CC and CXX)
27694  #
27695
27696  COMPILER_NAME=C
27697  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27698
27699  if test "x$CC" != x; then
27700    # User has supplied compiler name already, always let that override.
27701    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27702$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27703    if test "x`basename $CC`" = "x$CC"; then
27704      # A command without a complete path is provided, search $PATH.
27705
27706      for ac_prog in $CC
27707do
27708  # Extract the first word of "$ac_prog", so it can be a program name with args.
27709set dummy $ac_prog; ac_word=$2
27710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27711$as_echo_n "checking for $ac_word... " >&6; }
27712if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27713  $as_echo_n "(cached) " >&6
27714else
27715  case $POTENTIAL_CC in
27716  [\\/]* | ?:[\\/]*)
27717  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27718  ;;
27719  *)
27720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27721for as_dir in $PATH
27722do
27723  IFS=$as_save_IFS
27724  test -z "$as_dir" && as_dir=.
27725    for ac_exec_ext in '' $ac_executable_extensions; do
27726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27727    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27729    break 2
27730  fi
27731done
27732  done
27733IFS=$as_save_IFS
27734
27735  ;;
27736esac
27737fi
27738POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27739if test -n "$POTENTIAL_CC"; then
27740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27741$as_echo "$POTENTIAL_CC" >&6; }
27742else
27743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27744$as_echo "no" >&6; }
27745fi
27746
27747
27748  test -n "$POTENTIAL_CC" && break
27749done
27750
27751      if test "x$POTENTIAL_CC" != x; then
27752        CC=$POTENTIAL_CC
27753      else
27754        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27755      fi
27756    else
27757      # Otherwise it might already be a complete path
27758      if test ! -x "$CC"; then
27759        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27760      fi
27761    fi
27762  else
27763    # No user supplied value. Locate compiler ourselves.
27764
27765    # If we are cross compiling, assume cross compilation tools follows the
27766    # cross compilation standard where they are prefixed with the autoconf
27767    # standard name for the target. For example the binary
27768    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27769    # If we are not cross compiling, then the default compiler name will be
27770    # used.
27771
27772    CC=
27773    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27774    # before checking the rest of the PATH.
27775    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27776    # step, this should not be necessary.
27777    if test -n "$TOOLCHAIN_PATH"; then
27778      PATH_save="$PATH"
27779      PATH="$TOOLCHAIN_PATH"
27780      for ac_prog in $SEARCH_LIST
27781do
27782  # Extract the first word of "$ac_prog", so it can be a program name with args.
27783set dummy $ac_prog; ac_word=$2
27784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27785$as_echo_n "checking for $ac_word... " >&6; }
27786if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27787  $as_echo_n "(cached) " >&6
27788else
27789  case $TOOLCHAIN_PATH_CC in
27790  [\\/]* | ?:[\\/]*)
27791  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27792  ;;
27793  *)
27794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27795for as_dir in $PATH
27796do
27797  IFS=$as_save_IFS
27798  test -z "$as_dir" && as_dir=.
27799    for ac_exec_ext in '' $ac_executable_extensions; do
27800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27801    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27803    break 2
27804  fi
27805done
27806  done
27807IFS=$as_save_IFS
27808
27809  ;;
27810esac
27811fi
27812TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27813if test -n "$TOOLCHAIN_PATH_CC"; then
27814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27815$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27816else
27817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27818$as_echo "no" >&6; }
27819fi
27820
27821
27822  test -n "$TOOLCHAIN_PATH_CC" && break
27823done
27824
27825      CC=$TOOLCHAIN_PATH_CC
27826      PATH="$PATH_save"
27827    fi
27828
27829    # AC_PATH_PROGS can't be run multiple times with the same variable,
27830    # so create a new name for this run.
27831    if test "x$CC" = x; then
27832      for ac_prog in $SEARCH_LIST
27833do
27834  # Extract the first word of "$ac_prog", so it can be a program name with args.
27835set dummy $ac_prog; ac_word=$2
27836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27837$as_echo_n "checking for $ac_word... " >&6; }
27838if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27839  $as_echo_n "(cached) " >&6
27840else
27841  case $POTENTIAL_CC in
27842  [\\/]* | ?:[\\/]*)
27843  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27844  ;;
27845  *)
27846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27847for as_dir in $PATH
27848do
27849  IFS=$as_save_IFS
27850  test -z "$as_dir" && as_dir=.
27851    for ac_exec_ext in '' $ac_executable_extensions; do
27852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27853    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27855    break 2
27856  fi
27857done
27858  done
27859IFS=$as_save_IFS
27860
27861  ;;
27862esac
27863fi
27864POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27865if test -n "$POTENTIAL_CC"; then
27866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27867$as_echo "$POTENTIAL_CC" >&6; }
27868else
27869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27870$as_echo "no" >&6; }
27871fi
27872
27873
27874  test -n "$POTENTIAL_CC" && break
27875done
27876
27877      CC=$POTENTIAL_CC
27878    fi
27879
27880    if test "x$CC" = x; then
27881
27882  # Print a helpful message on how to acquire the necessary build dependency.
27883  # devkit is the help tag: freetype, cups, pulse, alsa etc
27884  MISSING_DEPENDENCY=devkit
27885
27886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27887    cygwin_help $MISSING_DEPENDENCY
27888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889    msys_help $MISSING_DEPENDENCY
27890  else
27891    PKGHANDLER_COMMAND=
27892
27893    case $PKGHANDLER in
27894      apt-get)
27895        apt_help     $MISSING_DEPENDENCY ;;
27896      yum)
27897        yum_help     $MISSING_DEPENDENCY ;;
27898      port)
27899        port_help    $MISSING_DEPENDENCY ;;
27900      pkgutil)
27901        pkgutil_help $MISSING_DEPENDENCY ;;
27902      pkgadd)
27903        pkgadd_help  $MISSING_DEPENDENCY ;;
27904    esac
27905
27906    if test "x$PKGHANDLER_COMMAND" != x; then
27907      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27908    fi
27909  fi
27910
27911      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27912    fi
27913  fi
27914
27915  # Now we have a compiler binary in CC. Make sure it's okay.
27916
27917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27918
27919  # First separate the path from the arguments. This will split at the first
27920  # space.
27921  complete="$CC"
27922  path="${complete%% *}"
27923  tmp="$complete EOL"
27924  arguments="${tmp#* }"
27925
27926  # Input might be given as Windows format, start by converting to
27927  # unix format.
27928  new_path=`$CYGPATH -u "$path"`
27929
27930  # Now try to locate executable using which
27931  new_path=`$WHICH "$new_path" 2> /dev/null`
27932  # bat and cmd files are not always considered executable in cygwin causing which
27933  # to not find them
27934  if test "x$new_path" = x \
27935      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27936      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27937    new_path=`$CYGPATH -u "$path"`
27938  fi
27939  if test "x$new_path" = x; then
27940    # Oops. Which didn't find the executable.
27941    # The splitting of arguments from the executable at a space might have been incorrect,
27942    # since paths with space are more likely in Windows. Give it another try with the whole
27943    # argument.
27944    path="$complete"
27945    arguments="EOL"
27946    new_path=`$CYGPATH -u "$path"`
27947    new_path=`$WHICH "$new_path" 2> /dev/null`
27948    # bat and cmd files are not always considered executable in cygwin causing which
27949    # to not find them
27950    if test "x$new_path" = x \
27951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27953      new_path=`$CYGPATH -u "$path"`
27954    fi
27955    if test "x$new_path" = x; then
27956      # It's still not found. Now this is an unrecoverable error.
27957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27958$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27959      has_space=`$ECHO "$complete" | $GREP " "`
27960      if test "x$has_space" != x; then
27961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27963      fi
27964      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27965    fi
27966  fi
27967
27968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27971  # "foo.exe" is OK but "foo" is an error.
27972  #
27973  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27974  # It is also a way to make sure we got the proper file name for the real test later on.
27975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27976  if test "x$test_shortpath" = x; then
27977    # Short path failed, file does not exist as specified.
27978    # Try adding .exe or .cmd
27979    if test -f "${new_path}.exe"; then
27980      input_to_shortpath="${new_path}.exe"
27981    elif test -f "${new_path}.cmd"; then
27982      input_to_shortpath="${new_path}.cmd"
27983    else
27984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27985$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27986      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27987$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27988      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27989    fi
27990  else
27991    input_to_shortpath="$new_path"
27992  fi
27993
27994  # Call helper function which possibly converts this using DOS-style short mode.
27995  # If so, the updated path is stored in $new_path.
27996  new_path="$input_to_shortpath"
27997
27998  input_path="$input_to_shortpath"
27999  # Check if we need to convert this using DOS-style short mode. If the path
28000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28001  # take no chances and rewrite it.
28002  # Note: m4 eats our [], so we need to use [ and ] instead.
28003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28004  if test "x$has_forbidden_chars" != x; then
28005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28009      # Going to short mode and back again did indeed matter. Since short mode is
28010      # case insensitive, let's make it lowercase to improve readability.
28011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28012      # Now convert it back to Unix-stile (cygpath)
28013      input_path=`$CYGPATH -u "$shortmode_path"`
28014      new_path="$input_path"
28015    fi
28016  fi
28017
28018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28019  if test "x$test_cygdrive_prefix" = x; then
28020    # As a simple fix, exclude /usr/bin since it's not a real path.
28021    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28023      # a path prefixed by /cygdrive for fixpath to work.
28024      new_path="$CYGWIN_ROOT_PATH$input_path"
28025    fi
28026  fi
28027
28028  # remove trailing .exe if any
28029  new_path="${new_path/%.exe/}"
28030
28031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28032
28033  # First separate the path from the arguments. This will split at the first
28034  # space.
28035  complete="$CC"
28036  path="${complete%% *}"
28037  tmp="$complete EOL"
28038  arguments="${tmp#* }"
28039
28040  # Input might be given as Windows format, start by converting to
28041  # unix format.
28042  new_path="$path"
28043
28044  windows_path="$new_path"
28045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28046    unix_path=`$CYGPATH -u "$windows_path"`
28047    new_path="$unix_path"
28048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28050    new_path="$unix_path"
28051  fi
28052
28053
28054  # Now try to locate executable using which
28055  new_path=`$WHICH "$new_path" 2> /dev/null`
28056
28057  if test "x$new_path" = x; then
28058    # Oops. Which didn't find the executable.
28059    # The splitting of arguments from the executable at a space might have been incorrect,
28060    # since paths with space are more likely in Windows. Give it another try with the whole
28061    # argument.
28062    path="$complete"
28063    arguments="EOL"
28064    new_path="$path"
28065
28066  windows_path="$new_path"
28067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28068    unix_path=`$CYGPATH -u "$windows_path"`
28069    new_path="$unix_path"
28070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28072    new_path="$unix_path"
28073  fi
28074
28075
28076    new_path=`$WHICH "$new_path" 2> /dev/null`
28077    # bat and cmd files are not always considered executable in MSYS causing which
28078    # to not find them
28079    if test "x$new_path" = x \
28080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28082      new_path="$path"
28083
28084  windows_path="$new_path"
28085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28086    unix_path=`$CYGPATH -u "$windows_path"`
28087    new_path="$unix_path"
28088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28090    new_path="$unix_path"
28091  fi
28092
28093    fi
28094
28095    if test "x$new_path" = x; then
28096      # It's still not found. Now this is an unrecoverable error.
28097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28098$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28099      has_space=`$ECHO "$complete" | $GREP " "`
28100      if test "x$has_space" != x; then
28101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28103      fi
28104      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28105    fi
28106  fi
28107
28108  # Now new_path has a complete unix path to the binary
28109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28110    # Keep paths in /bin as-is, but remove trailing .exe if any
28111    new_path="${new_path/%.exe/}"
28112    # Do not save /bin paths to all_fixpath_prefixes!
28113  else
28114    # Not in mixed or Windows style, start by that.
28115    new_path=`cmd //c echo $new_path`
28116
28117  input_path="$new_path"
28118  # Check if we need to convert this using DOS-style short mode. If the path
28119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28120  # take no chances and rewrite it.
28121  # Note: m4 eats our [], so we need to use [ and ] instead.
28122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28123  if test "x$has_forbidden_chars" != x; then
28124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28126  fi
28127
28128    # Output is in $new_path
28129
28130  windows_path="$new_path"
28131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132    unix_path=`$CYGPATH -u "$windows_path"`
28133    new_path="$unix_path"
28134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28136    new_path="$unix_path"
28137  fi
28138
28139    # remove trailing .exe if any
28140    new_path="${new_path/%.exe/}"
28141
28142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28144  fi
28145
28146  else
28147    # We're on a posix platform. Hooray! :)
28148    # First separate the path from the arguments. This will split at the first
28149    # space.
28150    complete="$CC"
28151    path="${complete%% *}"
28152    tmp="$complete EOL"
28153    arguments="${tmp#* }"
28154
28155    # Cannot rely on the command "which" here since it doesn't always work.
28156    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28157    if test -z "$is_absolute_path"; then
28158      # Path to executable is not absolute. Find it.
28159      IFS_save="$IFS"
28160      IFS=:
28161      for p in $PATH; do
28162        if test -f "$p/$path" && test -x "$p/$path"; then
28163          new_path="$p/$path"
28164          break
28165        fi
28166      done
28167      IFS="$IFS_save"
28168    else
28169      # This is an absolute path, we can use it without further modifications.
28170      new_path="$path"
28171    fi
28172
28173    if test "x$new_path" = x; then
28174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28175$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28176      has_space=`$ECHO "$complete" | $GREP " "`
28177      if test "x$has_space" != x; then
28178        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28180      fi
28181      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28182    fi
28183  fi
28184
28185  # Now join together the path and the arguments once again
28186  if test "x$arguments" != xEOL; then
28187    new_complete="$new_path ${arguments% *}"
28188  else
28189    new_complete="$new_path"
28190  fi
28191
28192  if test "x$complete" != "x$new_complete"; then
28193    CC="$new_complete"
28194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28195$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28196  fi
28197
28198  TEST_COMPILER="$CC"
28199  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28200  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28201  if test "x$OPENJDK_BUILD_OS" != xaix; then
28202    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28204$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28205
28206  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28207    # Follow a chain of symbolic links. Use readlink
28208    # where it exists, else fall back to horribly
28209    # complicated shell code.
28210    if test "x$READLINK_TESTED" != yes; then
28211      # On MacOSX there is a readlink tool with a different
28212      # purpose than the GNU readlink tool. Check the found readlink.
28213      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28214      if test "x$ISGNU" = x; then
28215        # A readlink that we do not know how to use.
28216        # Are there other non-GNU readlinks out there?
28217        READLINK_TESTED=yes
28218        READLINK=
28219      fi
28220    fi
28221
28222    if test "x$READLINK" != x; then
28223      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28224    else
28225      # Save the current directory for restoring afterwards
28226      STARTDIR=$PWD
28227      COUNTER=0
28228      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28229      sym_link_file=`$BASENAME $TEST_COMPILER`
28230      cd $sym_link_dir
28231      # Use -P flag to resolve symlinks in directories.
28232      cd `$THEPWDCMD -P`
28233      sym_link_dir=`$THEPWDCMD -P`
28234      # Resolve file symlinks
28235      while test $COUNTER -lt 20; do
28236        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28237        if test "x$ISLINK" == x; then
28238          # This is not a symbolic link! We are done!
28239          break
28240        fi
28241        # Again resolve directory symlinks since the target of the just found
28242        # link could be in a different directory
28243        cd `$DIRNAME $ISLINK`
28244        sym_link_dir=`$THEPWDCMD -P`
28245        sym_link_file=`$BASENAME $ISLINK`
28246        let COUNTER=COUNTER+1
28247      done
28248      cd $STARTDIR
28249      TEST_COMPILER=$sym_link_dir/$sym_link_file
28250    fi
28251  fi
28252
28253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28254$as_echo "$TEST_COMPILER" >&6; }
28255  fi
28256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28257$as_echo_n "checking if CC is disguised ccache... " >&6; }
28258
28259  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28260  if test "x$COMPILER_BASENAME" = "xccache"; then
28261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28262$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28263    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28264    # We want to control ccache invocation ourselves, so ignore this cc and try
28265    # searching again.
28266
28267    # Remove the path to the fake ccache cc from the PATH
28268    RETRY_COMPILER_SAVED_PATH="$PATH"
28269    COMPILER_DIRNAME=`$DIRNAME $CC`
28270    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28271
28272    # Try again looking for our compiler
28273    if test -n "$ac_tool_prefix"; then
28274  for ac_prog in $TOOLCHAIN_CC_BINARY
28275  do
28276    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28279$as_echo_n "checking for $ac_word... " >&6; }
28280if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28281  $as_echo_n "(cached) " >&6
28282else
28283  if test -n "$PROPER_COMPILER_CC"; then
28284  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28285else
28286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28287for as_dir in $PATH
28288do
28289  IFS=$as_save_IFS
28290  test -z "$as_dir" && as_dir=.
28291    for ac_exec_ext in '' $ac_executable_extensions; do
28292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28293    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28295    break 2
28296  fi
28297done
28298  done
28299IFS=$as_save_IFS
28300
28301fi
28302fi
28303PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28304if test -n "$PROPER_COMPILER_CC"; then
28305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28306$as_echo "$PROPER_COMPILER_CC" >&6; }
28307else
28308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28309$as_echo "no" >&6; }
28310fi
28311
28312
28313    test -n "$PROPER_COMPILER_CC" && break
28314  done
28315fi
28316if test -z "$PROPER_COMPILER_CC"; then
28317  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28318  for ac_prog in $TOOLCHAIN_CC_BINARY
28319do
28320  # Extract the first word of "$ac_prog", so it can be a program name with args.
28321set dummy $ac_prog; ac_word=$2
28322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28323$as_echo_n "checking for $ac_word... " >&6; }
28324if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28325  $as_echo_n "(cached) " >&6
28326else
28327  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28328  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28329else
28330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28331for as_dir in $PATH
28332do
28333  IFS=$as_save_IFS
28334  test -z "$as_dir" && as_dir=.
28335    for ac_exec_ext in '' $ac_executable_extensions; do
28336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28337    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28339    break 2
28340  fi
28341done
28342  done
28343IFS=$as_save_IFS
28344
28345fi
28346fi
28347ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28348if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28350$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28351else
28352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28353$as_echo "no" >&6; }
28354fi
28355
28356
28357  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28358done
28359
28360  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28361    PROPER_COMPILER_CC=""
28362  else
28363    case $cross_compiling:$ac_tool_warned in
28364yes:)
28365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28367ac_tool_warned=yes ;;
28368esac
28369    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28370  fi
28371fi
28372
28373
28374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28375
28376  # First separate the path from the arguments. This will split at the first
28377  # space.
28378  complete="$PROPER_COMPILER_CC"
28379  path="${complete%% *}"
28380  tmp="$complete EOL"
28381  arguments="${tmp#* }"
28382
28383  # Input might be given as Windows format, start by converting to
28384  # unix format.
28385  new_path=`$CYGPATH -u "$path"`
28386
28387  # Now try to locate executable using which
28388  new_path=`$WHICH "$new_path" 2> /dev/null`
28389  # bat and cmd files are not always considered executable in cygwin causing which
28390  # to not find them
28391  if test "x$new_path" = x \
28392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28394    new_path=`$CYGPATH -u "$path"`
28395  fi
28396  if test "x$new_path" = x; then
28397    # Oops. Which didn't find the executable.
28398    # The splitting of arguments from the executable at a space might have been incorrect,
28399    # since paths with space are more likely in Windows. Give it another try with the whole
28400    # argument.
28401    path="$complete"
28402    arguments="EOL"
28403    new_path=`$CYGPATH -u "$path"`
28404    new_path=`$WHICH "$new_path" 2> /dev/null`
28405    # bat and cmd files are not always considered executable in cygwin causing which
28406    # to not find them
28407    if test "x$new_path" = x \
28408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28410      new_path=`$CYGPATH -u "$path"`
28411    fi
28412    if test "x$new_path" = x; then
28413      # It's still not found. Now this is an unrecoverable error.
28414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28415$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28416      has_space=`$ECHO "$complete" | $GREP " "`
28417      if test "x$has_space" != x; then
28418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28420      fi
28421      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28422    fi
28423  fi
28424
28425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28428  # "foo.exe" is OK but "foo" is an error.
28429  #
28430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28431  # It is also a way to make sure we got the proper file name for the real test later on.
28432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28433  if test "x$test_shortpath" = x; then
28434    # Short path failed, file does not exist as specified.
28435    # Try adding .exe or .cmd
28436    if test -f "${new_path}.exe"; then
28437      input_to_shortpath="${new_path}.exe"
28438    elif test -f "${new_path}.cmd"; then
28439      input_to_shortpath="${new_path}.cmd"
28440    else
28441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28442$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28445      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28446    fi
28447  else
28448    input_to_shortpath="$new_path"
28449  fi
28450
28451  # Call helper function which possibly converts this using DOS-style short mode.
28452  # If so, the updated path is stored in $new_path.
28453  new_path="$input_to_shortpath"
28454
28455  input_path="$input_to_shortpath"
28456  # Check if we need to convert this using DOS-style short mode. If the path
28457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28458  # take no chances and rewrite it.
28459  # Note: m4 eats our [], so we need to use [ and ] instead.
28460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28461  if test "x$has_forbidden_chars" != x; then
28462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28466      # Going to short mode and back again did indeed matter. Since short mode is
28467      # case insensitive, let's make it lowercase to improve readability.
28468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28469      # Now convert it back to Unix-stile (cygpath)
28470      input_path=`$CYGPATH -u "$shortmode_path"`
28471      new_path="$input_path"
28472    fi
28473  fi
28474
28475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28476  if test "x$test_cygdrive_prefix" = x; then
28477    # As a simple fix, exclude /usr/bin since it's not a real path.
28478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28480      # a path prefixed by /cygdrive for fixpath to work.
28481      new_path="$CYGWIN_ROOT_PATH$input_path"
28482    fi
28483  fi
28484
28485  # remove trailing .exe if any
28486  new_path="${new_path/%.exe/}"
28487
28488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28489
28490  # First separate the path from the arguments. This will split at the first
28491  # space.
28492  complete="$PROPER_COMPILER_CC"
28493  path="${complete%% *}"
28494  tmp="$complete EOL"
28495  arguments="${tmp#* }"
28496
28497  # Input might be given as Windows format, start by converting to
28498  # unix format.
28499  new_path="$path"
28500
28501  windows_path="$new_path"
28502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28503    unix_path=`$CYGPATH -u "$windows_path"`
28504    new_path="$unix_path"
28505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28507    new_path="$unix_path"
28508  fi
28509
28510
28511  # Now try to locate executable using which
28512  new_path=`$WHICH "$new_path" 2> /dev/null`
28513
28514  if test "x$new_path" = x; then
28515    # Oops. Which didn't find the executable.
28516    # The splitting of arguments from the executable at a space might have been incorrect,
28517    # since paths with space are more likely in Windows. Give it another try with the whole
28518    # argument.
28519    path="$complete"
28520    arguments="EOL"
28521    new_path="$path"
28522
28523  windows_path="$new_path"
28524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28525    unix_path=`$CYGPATH -u "$windows_path"`
28526    new_path="$unix_path"
28527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28529    new_path="$unix_path"
28530  fi
28531
28532
28533    new_path=`$WHICH "$new_path" 2> /dev/null`
28534    # bat and cmd files are not always considered executable in MSYS causing which
28535    # to not find them
28536    if test "x$new_path" = x \
28537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28539      new_path="$path"
28540
28541  windows_path="$new_path"
28542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28543    unix_path=`$CYGPATH -u "$windows_path"`
28544    new_path="$unix_path"
28545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28547    new_path="$unix_path"
28548  fi
28549
28550    fi
28551
28552    if test "x$new_path" = x; then
28553      # It's still not found. Now this is an unrecoverable error.
28554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28555$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28556      has_space=`$ECHO "$complete" | $GREP " "`
28557      if test "x$has_space" != x; then
28558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28560      fi
28561      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28562    fi
28563  fi
28564
28565  # Now new_path has a complete unix path to the binary
28566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28567    # Keep paths in /bin as-is, but remove trailing .exe if any
28568    new_path="${new_path/%.exe/}"
28569    # Do not save /bin paths to all_fixpath_prefixes!
28570  else
28571    # Not in mixed or Windows style, start by that.
28572    new_path=`cmd //c echo $new_path`
28573
28574  input_path="$new_path"
28575  # Check if we need to convert this using DOS-style short mode. If the path
28576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28577  # take no chances and rewrite it.
28578  # Note: m4 eats our [], so we need to use [ and ] instead.
28579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28580  if test "x$has_forbidden_chars" != x; then
28581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28583  fi
28584
28585    # Output is in $new_path
28586
28587  windows_path="$new_path"
28588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28589    unix_path=`$CYGPATH -u "$windows_path"`
28590    new_path="$unix_path"
28591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28593    new_path="$unix_path"
28594  fi
28595
28596    # remove trailing .exe if any
28597    new_path="${new_path/%.exe/}"
28598
28599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28601  fi
28602
28603  else
28604    # We're on a posix platform. Hooray! :)
28605    # First separate the path from the arguments. This will split at the first
28606    # space.
28607    complete="$PROPER_COMPILER_CC"
28608    path="${complete%% *}"
28609    tmp="$complete EOL"
28610    arguments="${tmp#* }"
28611
28612    # Cannot rely on the command "which" here since it doesn't always work.
28613    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28614    if test -z "$is_absolute_path"; then
28615      # Path to executable is not absolute. Find it.
28616      IFS_save="$IFS"
28617      IFS=:
28618      for p in $PATH; do
28619        if test -f "$p/$path" && test -x "$p/$path"; then
28620          new_path="$p/$path"
28621          break
28622        fi
28623      done
28624      IFS="$IFS_save"
28625    else
28626      # This is an absolute path, we can use it without further modifications.
28627      new_path="$path"
28628    fi
28629
28630    if test "x$new_path" = x; then
28631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28632$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28633      has_space=`$ECHO "$complete" | $GREP " "`
28634      if test "x$has_space" != x; then
28635        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28637      fi
28638      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28639    fi
28640  fi
28641
28642  # Now join together the path and the arguments once again
28643  if test "x$arguments" != xEOL; then
28644    new_complete="$new_path ${arguments% *}"
28645  else
28646    new_complete="$new_path"
28647  fi
28648
28649  if test "x$complete" != "x$new_complete"; then
28650    PROPER_COMPILER_CC="$new_complete"
28651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28652$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28653  fi
28654
28655    PATH="$RETRY_COMPILER_SAVED_PATH"
28656
28657    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28658$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28659
28660  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28661    # Follow a chain of symbolic links. Use readlink
28662    # where it exists, else fall back to horribly
28663    # complicated shell code.
28664    if test "x$READLINK_TESTED" != yes; then
28665      # On MacOSX there is a readlink tool with a different
28666      # purpose than the GNU readlink tool. Check the found readlink.
28667      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28668      if test "x$ISGNU" = x; then
28669        # A readlink that we do not know how to use.
28670        # Are there other non-GNU readlinks out there?
28671        READLINK_TESTED=yes
28672        READLINK=
28673      fi
28674    fi
28675
28676    if test "x$READLINK" != x; then
28677      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28678    else
28679      # Save the current directory for restoring afterwards
28680      STARTDIR=$PWD
28681      COUNTER=0
28682      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28683      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28684      cd $sym_link_dir
28685      # Use -P flag to resolve symlinks in directories.
28686      cd `$THEPWDCMD -P`
28687      sym_link_dir=`$THEPWDCMD -P`
28688      # Resolve file symlinks
28689      while test $COUNTER -lt 20; do
28690        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28691        if test "x$ISLINK" == x; then
28692          # This is not a symbolic link! We are done!
28693          break
28694        fi
28695        # Again resolve directory symlinks since the target of the just found
28696        # link could be in a different directory
28697        cd `$DIRNAME $ISLINK`
28698        sym_link_dir=`$THEPWDCMD -P`
28699        sym_link_file=`$BASENAME $ISLINK`
28700        let COUNTER=COUNTER+1
28701      done
28702      cd $STARTDIR
28703      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28704    fi
28705  fi
28706
28707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28708$as_echo "$PROPER_COMPILER_CC" >&6; }
28709    CC="$PROPER_COMPILER_CC"
28710  else
28711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28712$as_echo "no, keeping CC" >&6; }
28713  fi
28714
28715
28716  COMPILER=$CC
28717  COMPILER_NAME=$COMPILER_NAME
28718
28719  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28720    # cc -V output typically looks like
28721    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28722    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28723    # Check that this is likely to be the Solaris Studio cc.
28724    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28725    if test $? -ne 0; then
28726      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28727      { $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
28728$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28729      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28730$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28731      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28732$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28733      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28734    fi
28735    # Remove usage instructions (if present), and
28736    # collapse compiler output into a single line
28737    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28738        $SED -e 's/ *[Uu]sage:.*//'`
28739    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28740        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28741  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28742    # xlc -qversion output typically looks like
28743    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28744    #     Version: 11.01.0000.0015
28745    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28746    # Check that this is likely to be the IBM XL C compiler.
28747    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28748    if test $? -ne 0; then
28749      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28750      { $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
28751$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28752      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28753$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28754      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28755$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28756      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28757    fi
28758    # Collapse compiler output into a single line
28759    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28760    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28761        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28762  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28763    # There is no specific version flag, but all output starts with a version string.
28764    # First line typically looks something like:
28765    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28766    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28767    # Check that this is likely to be Microsoft CL.EXE.
28768    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28769    if test $? -ne 0; then
28770      { $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
28771$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28772      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28773$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28774      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28775    fi
28776    # Collapse compiler output into a single line
28777    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28778    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28779        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28780  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28781    # gcc --version output typically looks like
28782    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28783    #     Copyright (C) 2013 Free Software Foundation, Inc.
28784    #     This is free software; see the source for copying conditions.  There is NO
28785    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28786    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28787    # Check that this is likely to be GCC.
28788    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28789    if test $? -ne 0; then
28790      { $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
28791$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28792      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28793$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28794      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28795    fi
28796    # Remove Copyright and legalese from version string, and
28797    # collapse into a single line
28798    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28799        $SED -e 's/ *Copyright .*//'`
28800    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28801        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28802  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28803    # clang --version output typically looks like
28804    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28805    #    clang version 3.3 (tags/RELEASE_33/final)
28806    # or
28807    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28808    #    Target: x86_64-pc-linux-gnu
28809    #    Thread model: posix
28810    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28811    # Check that this is likely to be clang
28812    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28813    if test $? -ne 0; then
28814      { $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
28815$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28816      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28817$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28818      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28819    fi
28820    # Collapse compiler output into a single line
28821    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28822    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28823        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28824  else
28825      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28826  fi
28827  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28828  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28829  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28830  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28831
28832  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28833$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28834
28835
28836  # Now that we have resolved CC ourself, let autoconf have its go at it
28837  ac_ext=c
28838ac_cpp='$CPP $CPPFLAGS'
28839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28841ac_compiler_gnu=$ac_cv_c_compiler_gnu
28842if test -n "$ac_tool_prefix"; then
28843  for ac_prog in $CC
28844  do
28845    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28846set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28848$as_echo_n "checking for $ac_word... " >&6; }
28849if ${ac_cv_prog_CC+:} false; then :
28850  $as_echo_n "(cached) " >&6
28851else
28852  if test -n "$CC"; then
28853  ac_cv_prog_CC="$CC" # Let the user override the test.
28854else
28855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28856for as_dir in $PATH
28857do
28858  IFS=$as_save_IFS
28859  test -z "$as_dir" && as_dir=.
28860    for ac_exec_ext in '' $ac_executable_extensions; do
28861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28862    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28864    break 2
28865  fi
28866done
28867  done
28868IFS=$as_save_IFS
28869
28870fi
28871fi
28872CC=$ac_cv_prog_CC
28873if test -n "$CC"; then
28874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28875$as_echo "$CC" >&6; }
28876else
28877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28878$as_echo "no" >&6; }
28879fi
28880
28881
28882    test -n "$CC" && break
28883  done
28884fi
28885if test -z "$CC"; then
28886  ac_ct_CC=$CC
28887  for ac_prog in $CC
28888do
28889  # Extract the first word of "$ac_prog", so it can be a program name with args.
28890set dummy $ac_prog; ac_word=$2
28891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28892$as_echo_n "checking for $ac_word... " >&6; }
28893if ${ac_cv_prog_ac_ct_CC+:} false; then :
28894  $as_echo_n "(cached) " >&6
28895else
28896  if test -n "$ac_ct_CC"; then
28897  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28898else
28899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28900for as_dir in $PATH
28901do
28902  IFS=$as_save_IFS
28903  test -z "$as_dir" && as_dir=.
28904    for ac_exec_ext in '' $ac_executable_extensions; do
28905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28906    ac_cv_prog_ac_ct_CC="$ac_prog"
28907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28908    break 2
28909  fi
28910done
28911  done
28912IFS=$as_save_IFS
28913
28914fi
28915fi
28916ac_ct_CC=$ac_cv_prog_ac_ct_CC
28917if test -n "$ac_ct_CC"; then
28918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28919$as_echo "$ac_ct_CC" >&6; }
28920else
28921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28922$as_echo "no" >&6; }
28923fi
28924
28925
28926  test -n "$ac_ct_CC" && break
28927done
28928
28929  if test "x$ac_ct_CC" = x; then
28930    CC=""
28931  else
28932    case $cross_compiling:$ac_tool_warned in
28933yes:)
28934{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28935$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28936ac_tool_warned=yes ;;
28937esac
28938    CC=$ac_ct_CC
28939  fi
28940fi
28941
28942
28943test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28945as_fn_error $? "no acceptable C compiler found in \$PATH
28946See \`config.log' for more details" "$LINENO" 5; }
28947
28948# Provide some information about the compiler.
28949$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28950set X $ac_compile
28951ac_compiler=$2
28952for ac_option in --version -v -V -qversion; do
28953  { { ac_try="$ac_compiler $ac_option >&5"
28954case "(($ac_try" in
28955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28956  *) ac_try_echo=$ac_try;;
28957esac
28958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28959$as_echo "$ac_try_echo"; } >&5
28960  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28961  ac_status=$?
28962  if test -s conftest.err; then
28963    sed '10a\
28964... rest of stderr output deleted ...
28965         10q' conftest.err >conftest.er1
28966    cat conftest.er1 >&5
28967  fi
28968  rm -f conftest.er1 conftest.err
28969  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28970  test $ac_status = 0; }
28971done
28972
28973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28974/* end confdefs.h.  */
28975
28976int
28977main ()
28978{
28979
28980  ;
28981  return 0;
28982}
28983_ACEOF
28984ac_clean_files_save=$ac_clean_files
28985ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28986# Try to create an executable without -o first, disregard a.out.
28987# It will help us diagnose broken compilers, and finding out an intuition
28988# of exeext.
28989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28990$as_echo_n "checking whether the C compiler works... " >&6; }
28991ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28992
28993# The possible output files:
28994ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28995
28996ac_rmfiles=
28997for ac_file in $ac_files
28998do
28999  case $ac_file in
29000    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29001    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29002  esac
29003done
29004rm -f $ac_rmfiles
29005
29006if { { ac_try="$ac_link_default"
29007case "(($ac_try" in
29008  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29009  *) ac_try_echo=$ac_try;;
29010esac
29011eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29012$as_echo "$ac_try_echo"; } >&5
29013  (eval "$ac_link_default") 2>&5
29014  ac_status=$?
29015  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29016  test $ac_status = 0; }; then :
29017  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29018# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29019# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29020# so that the user can short-circuit this test for compilers unknown to
29021# Autoconf.
29022for ac_file in $ac_files ''
29023do
29024  test -f "$ac_file" || continue
29025  case $ac_file in
29026    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29027	;;
29028    [ab].out )
29029	# We found the default executable, but exeext='' is most
29030	# certainly right.
29031	break;;
29032    *.* )
29033	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29034	then :; else
29035	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29036	fi
29037	# We set ac_cv_exeext here because the later test for it is not
29038	# safe: cross compilers may not add the suffix if given an `-o'
29039	# argument, so we may need to know it at that point already.
29040	# Even if this section looks crufty: it has the advantage of
29041	# actually working.
29042	break;;
29043    * )
29044	break;;
29045  esac
29046done
29047test "$ac_cv_exeext" = no && ac_cv_exeext=
29048
29049else
29050  ac_file=''
29051fi
29052if test -z "$ac_file"; then :
29053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29054$as_echo "no" >&6; }
29055$as_echo "$as_me: failed program was:" >&5
29056sed 's/^/| /' conftest.$ac_ext >&5
29057
29058{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29059$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29060as_fn_error 77 "C compiler cannot create executables
29061See \`config.log' for more details" "$LINENO" 5; }
29062else
29063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29064$as_echo "yes" >&6; }
29065fi
29066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29067$as_echo_n "checking for C compiler default output file name... " >&6; }
29068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29069$as_echo "$ac_file" >&6; }
29070ac_exeext=$ac_cv_exeext
29071
29072rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29073ac_clean_files=$ac_clean_files_save
29074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29075$as_echo_n "checking for suffix of executables... " >&6; }
29076if { { ac_try="$ac_link"
29077case "(($ac_try" in
29078  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29079  *) ac_try_echo=$ac_try;;
29080esac
29081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29082$as_echo "$ac_try_echo"; } >&5
29083  (eval "$ac_link") 2>&5
29084  ac_status=$?
29085  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29086  test $ac_status = 0; }; then :
29087  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29088# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29089# work properly (i.e., refer to `conftest.exe'), while it won't with
29090# `rm'.
29091for ac_file in conftest.exe conftest conftest.*; do
29092  test -f "$ac_file" || continue
29093  case $ac_file in
29094    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29095    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29096	  break;;
29097    * ) break;;
29098  esac
29099done
29100else
29101  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29103as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29104See \`config.log' for more details" "$LINENO" 5; }
29105fi
29106rm -f conftest conftest$ac_cv_exeext
29107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29108$as_echo "$ac_cv_exeext" >&6; }
29109
29110rm -f conftest.$ac_ext
29111EXEEXT=$ac_cv_exeext
29112ac_exeext=$EXEEXT
29113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29114/* end confdefs.h.  */
29115#include <stdio.h>
29116int
29117main ()
29118{
29119FILE *f = fopen ("conftest.out", "w");
29120 return ferror (f) || fclose (f) != 0;
29121
29122  ;
29123  return 0;
29124}
29125_ACEOF
29126ac_clean_files="$ac_clean_files conftest.out"
29127# Check that the compiler produces executables we can run.  If not, either
29128# the compiler is broken, or we cross compile.
29129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29130$as_echo_n "checking whether we are cross compiling... " >&6; }
29131if test "$cross_compiling" != yes; then
29132  { { ac_try="$ac_link"
29133case "(($ac_try" in
29134  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29135  *) ac_try_echo=$ac_try;;
29136esac
29137eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29138$as_echo "$ac_try_echo"; } >&5
29139  (eval "$ac_link") 2>&5
29140  ac_status=$?
29141  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29142  test $ac_status = 0; }
29143  if { ac_try='./conftest$ac_cv_exeext'
29144  { { case "(($ac_try" in
29145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29146  *) ac_try_echo=$ac_try;;
29147esac
29148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29149$as_echo "$ac_try_echo"; } >&5
29150  (eval "$ac_try") 2>&5
29151  ac_status=$?
29152  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29153  test $ac_status = 0; }; }; then
29154    cross_compiling=no
29155  else
29156    if test "$cross_compiling" = maybe; then
29157	cross_compiling=yes
29158    else
29159	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29161as_fn_error $? "cannot run C compiled programs.
29162If you meant to cross compile, use \`--host'.
29163See \`config.log' for more details" "$LINENO" 5; }
29164    fi
29165  fi
29166fi
29167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29168$as_echo "$cross_compiling" >&6; }
29169
29170rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29171ac_clean_files=$ac_clean_files_save
29172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29173$as_echo_n "checking for suffix of object files... " >&6; }
29174if ${ac_cv_objext+:} false; then :
29175  $as_echo_n "(cached) " >&6
29176else
29177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29178/* end confdefs.h.  */
29179
29180int
29181main ()
29182{
29183
29184  ;
29185  return 0;
29186}
29187_ACEOF
29188rm -f conftest.o conftest.obj
29189if { { ac_try="$ac_compile"
29190case "(($ac_try" in
29191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29192  *) ac_try_echo=$ac_try;;
29193esac
29194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29195$as_echo "$ac_try_echo"; } >&5
29196  (eval "$ac_compile") 2>&5
29197  ac_status=$?
29198  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29199  test $ac_status = 0; }; then :
29200  for ac_file in conftest.o conftest.obj conftest.*; do
29201  test -f "$ac_file" || continue;
29202  case $ac_file in
29203    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29204    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29205       break;;
29206  esac
29207done
29208else
29209  $as_echo "$as_me: failed program was:" >&5
29210sed 's/^/| /' conftest.$ac_ext >&5
29211
29212{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29214as_fn_error $? "cannot compute suffix of object files: cannot compile
29215See \`config.log' for more details" "$LINENO" 5; }
29216fi
29217rm -f conftest.$ac_cv_objext conftest.$ac_ext
29218fi
29219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29220$as_echo "$ac_cv_objext" >&6; }
29221OBJEXT=$ac_cv_objext
29222ac_objext=$OBJEXT
29223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29224$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29225if ${ac_cv_c_compiler_gnu+:} false; then :
29226  $as_echo_n "(cached) " >&6
29227else
29228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29229/* end confdefs.h.  */
29230
29231int
29232main ()
29233{
29234#ifndef __GNUC__
29235       choke me
29236#endif
29237
29238  ;
29239  return 0;
29240}
29241_ACEOF
29242if ac_fn_c_try_compile "$LINENO"; then :
29243  ac_compiler_gnu=yes
29244else
29245  ac_compiler_gnu=no
29246fi
29247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29248ac_cv_c_compiler_gnu=$ac_compiler_gnu
29249
29250fi
29251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29252$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29253if test $ac_compiler_gnu = yes; then
29254  GCC=yes
29255else
29256  GCC=
29257fi
29258ac_test_CFLAGS=${CFLAGS+set}
29259ac_save_CFLAGS=$CFLAGS
29260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29261$as_echo_n "checking whether $CC accepts -g... " >&6; }
29262if ${ac_cv_prog_cc_g+:} false; then :
29263  $as_echo_n "(cached) " >&6
29264else
29265  ac_save_c_werror_flag=$ac_c_werror_flag
29266   ac_c_werror_flag=yes
29267   ac_cv_prog_cc_g=no
29268   CFLAGS="-g"
29269   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29270/* end confdefs.h.  */
29271
29272int
29273main ()
29274{
29275
29276  ;
29277  return 0;
29278}
29279_ACEOF
29280if ac_fn_c_try_compile "$LINENO"; then :
29281  ac_cv_prog_cc_g=yes
29282else
29283  CFLAGS=""
29284      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29285/* end confdefs.h.  */
29286
29287int
29288main ()
29289{
29290
29291  ;
29292  return 0;
29293}
29294_ACEOF
29295if ac_fn_c_try_compile "$LINENO"; then :
29296
29297else
29298  ac_c_werror_flag=$ac_save_c_werror_flag
29299	 CFLAGS="-g"
29300	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29301/* end confdefs.h.  */
29302
29303int
29304main ()
29305{
29306
29307  ;
29308  return 0;
29309}
29310_ACEOF
29311if ac_fn_c_try_compile "$LINENO"; then :
29312  ac_cv_prog_cc_g=yes
29313fi
29314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29315fi
29316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29317fi
29318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29319   ac_c_werror_flag=$ac_save_c_werror_flag
29320fi
29321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29322$as_echo "$ac_cv_prog_cc_g" >&6; }
29323if test "$ac_test_CFLAGS" = set; then
29324  CFLAGS=$ac_save_CFLAGS
29325elif test $ac_cv_prog_cc_g = yes; then
29326  if test "$GCC" = yes; then
29327    CFLAGS="-g -O2"
29328  else
29329    CFLAGS="-g"
29330  fi
29331else
29332  if test "$GCC" = yes; then
29333    CFLAGS="-O2"
29334  else
29335    CFLAGS=
29336  fi
29337fi
29338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29339$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29340if ${ac_cv_prog_cc_c89+:} false; then :
29341  $as_echo_n "(cached) " >&6
29342else
29343  ac_cv_prog_cc_c89=no
29344ac_save_CC=$CC
29345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29346/* end confdefs.h.  */
29347#include <stdarg.h>
29348#include <stdio.h>
29349struct stat;
29350/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29351struct buf { int x; };
29352FILE * (*rcsopen) (struct buf *, struct stat *, int);
29353static char *e (p, i)
29354     char **p;
29355     int i;
29356{
29357  return p[i];
29358}
29359static char *f (char * (*g) (char **, int), char **p, ...)
29360{
29361  char *s;
29362  va_list v;
29363  va_start (v,p);
29364  s = g (p, va_arg (v,int));
29365  va_end (v);
29366  return s;
29367}
29368
29369/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29370   function prototypes and stuff, but not '\xHH' hex character constants.
29371   These don't provoke an error unfortunately, instead are silently treated
29372   as 'x'.  The following induces an error, until -std is added to get
29373   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29374   array size at least.  It's necessary to write '\x00'==0 to get something
29375   that's true only with -std.  */
29376int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29377
29378/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29379   inside strings and character constants.  */
29380#define FOO(x) 'x'
29381int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29382
29383int test (int i, double x);
29384struct s1 {int (*f) (int a);};
29385struct s2 {int (*f) (double a);};
29386int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29387int argc;
29388char **argv;
29389int
29390main ()
29391{
29392return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29393  ;
29394  return 0;
29395}
29396_ACEOF
29397for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29398	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29399do
29400  CC="$ac_save_CC $ac_arg"
29401  if ac_fn_c_try_compile "$LINENO"; then :
29402  ac_cv_prog_cc_c89=$ac_arg
29403fi
29404rm -f core conftest.err conftest.$ac_objext
29405  test "x$ac_cv_prog_cc_c89" != "xno" && break
29406done
29407rm -f conftest.$ac_ext
29408CC=$ac_save_CC
29409
29410fi
29411# AC_CACHE_VAL
29412case "x$ac_cv_prog_cc_c89" in
29413  x)
29414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29415$as_echo "none needed" >&6; } ;;
29416  xno)
29417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29418$as_echo "unsupported" >&6; } ;;
29419  *)
29420    CC="$CC $ac_cv_prog_cc_c89"
29421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29422$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29423esac
29424if test "x$ac_cv_prog_cc_c89" != xno; then :
29425
29426fi
29427
29428ac_ext=cpp
29429ac_cpp='$CXXCPP $CPPFLAGS'
29430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29433
29434
29435
29436  COMPILER_NAME=C++
29437  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29438
29439  if test "x$CXX" != x; then
29440    # User has supplied compiler name already, always let that override.
29441    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29442$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29443    if test "x`basename $CXX`" = "x$CXX"; then
29444      # A command without a complete path is provided, search $PATH.
29445
29446      for ac_prog in $CXX
29447do
29448  # Extract the first word of "$ac_prog", so it can be a program name with args.
29449set dummy $ac_prog; ac_word=$2
29450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29451$as_echo_n "checking for $ac_word... " >&6; }
29452if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29453  $as_echo_n "(cached) " >&6
29454else
29455  case $POTENTIAL_CXX in
29456  [\\/]* | ?:[\\/]*)
29457  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29458  ;;
29459  *)
29460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29461for as_dir in $PATH
29462do
29463  IFS=$as_save_IFS
29464  test -z "$as_dir" && as_dir=.
29465    for ac_exec_ext in '' $ac_executable_extensions; do
29466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29467    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29469    break 2
29470  fi
29471done
29472  done
29473IFS=$as_save_IFS
29474
29475  ;;
29476esac
29477fi
29478POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29479if test -n "$POTENTIAL_CXX"; then
29480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29481$as_echo "$POTENTIAL_CXX" >&6; }
29482else
29483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29484$as_echo "no" >&6; }
29485fi
29486
29487
29488  test -n "$POTENTIAL_CXX" && break
29489done
29490
29491      if test "x$POTENTIAL_CXX" != x; then
29492        CXX=$POTENTIAL_CXX
29493      else
29494        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29495      fi
29496    else
29497      # Otherwise it might already be a complete path
29498      if test ! -x "$CXX"; then
29499        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29500      fi
29501    fi
29502  else
29503    # No user supplied value. Locate compiler ourselves.
29504
29505    # If we are cross compiling, assume cross compilation tools follows the
29506    # cross compilation standard where they are prefixed with the autoconf
29507    # standard name for the target. For example the binary
29508    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29509    # If we are not cross compiling, then the default compiler name will be
29510    # used.
29511
29512    CXX=
29513    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29514    # before checking the rest of the PATH.
29515    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29516    # step, this should not be necessary.
29517    if test -n "$TOOLCHAIN_PATH"; then
29518      PATH_save="$PATH"
29519      PATH="$TOOLCHAIN_PATH"
29520      for ac_prog in $SEARCH_LIST
29521do
29522  # Extract the first word of "$ac_prog", so it can be a program name with args.
29523set dummy $ac_prog; ac_word=$2
29524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29525$as_echo_n "checking for $ac_word... " >&6; }
29526if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29527  $as_echo_n "(cached) " >&6
29528else
29529  case $TOOLCHAIN_PATH_CXX in
29530  [\\/]* | ?:[\\/]*)
29531  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29532  ;;
29533  *)
29534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29535for as_dir in $PATH
29536do
29537  IFS=$as_save_IFS
29538  test -z "$as_dir" && as_dir=.
29539    for ac_exec_ext in '' $ac_executable_extensions; do
29540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29541    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29543    break 2
29544  fi
29545done
29546  done
29547IFS=$as_save_IFS
29548
29549  ;;
29550esac
29551fi
29552TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29553if test -n "$TOOLCHAIN_PATH_CXX"; then
29554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29555$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29556else
29557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29558$as_echo "no" >&6; }
29559fi
29560
29561
29562  test -n "$TOOLCHAIN_PATH_CXX" && break
29563done
29564
29565      CXX=$TOOLCHAIN_PATH_CXX
29566      PATH="$PATH_save"
29567    fi
29568
29569    # AC_PATH_PROGS can't be run multiple times with the same variable,
29570    # so create a new name for this run.
29571    if test "x$CXX" = x; then
29572      for ac_prog in $SEARCH_LIST
29573do
29574  # Extract the first word of "$ac_prog", so it can be a program name with args.
29575set dummy $ac_prog; ac_word=$2
29576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29577$as_echo_n "checking for $ac_word... " >&6; }
29578if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29579  $as_echo_n "(cached) " >&6
29580else
29581  case $POTENTIAL_CXX in
29582  [\\/]* | ?:[\\/]*)
29583  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29584  ;;
29585  *)
29586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29587for as_dir in $PATH
29588do
29589  IFS=$as_save_IFS
29590  test -z "$as_dir" && as_dir=.
29591    for ac_exec_ext in '' $ac_executable_extensions; do
29592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29593    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29595    break 2
29596  fi
29597done
29598  done
29599IFS=$as_save_IFS
29600
29601  ;;
29602esac
29603fi
29604POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29605if test -n "$POTENTIAL_CXX"; then
29606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29607$as_echo "$POTENTIAL_CXX" >&6; }
29608else
29609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29610$as_echo "no" >&6; }
29611fi
29612
29613
29614  test -n "$POTENTIAL_CXX" && break
29615done
29616
29617      CXX=$POTENTIAL_CXX
29618    fi
29619
29620    if test "x$CXX" = x; then
29621
29622  # Print a helpful message on how to acquire the necessary build dependency.
29623  # devkit is the help tag: freetype, cups, pulse, alsa etc
29624  MISSING_DEPENDENCY=devkit
29625
29626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29627    cygwin_help $MISSING_DEPENDENCY
29628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29629    msys_help $MISSING_DEPENDENCY
29630  else
29631    PKGHANDLER_COMMAND=
29632
29633    case $PKGHANDLER in
29634      apt-get)
29635        apt_help     $MISSING_DEPENDENCY ;;
29636      yum)
29637        yum_help     $MISSING_DEPENDENCY ;;
29638      port)
29639        port_help    $MISSING_DEPENDENCY ;;
29640      pkgutil)
29641        pkgutil_help $MISSING_DEPENDENCY ;;
29642      pkgadd)
29643        pkgadd_help  $MISSING_DEPENDENCY ;;
29644    esac
29645
29646    if test "x$PKGHANDLER_COMMAND" != x; then
29647      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29648    fi
29649  fi
29650
29651      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29652    fi
29653  fi
29654
29655  # Now we have a compiler binary in CXX. Make sure it's okay.
29656
29657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29658
29659  # First separate the path from the arguments. This will split at the first
29660  # space.
29661  complete="$CXX"
29662  path="${complete%% *}"
29663  tmp="$complete EOL"
29664  arguments="${tmp#* }"
29665
29666  # Input might be given as Windows format, start by converting to
29667  # unix format.
29668  new_path=`$CYGPATH -u "$path"`
29669
29670  # Now try to locate executable using which
29671  new_path=`$WHICH "$new_path" 2> /dev/null`
29672  # bat and cmd files are not always considered executable in cygwin causing which
29673  # to not find them
29674  if test "x$new_path" = x \
29675      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29676      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29677    new_path=`$CYGPATH -u "$path"`
29678  fi
29679  if test "x$new_path" = x; then
29680    # Oops. Which didn't find the executable.
29681    # The splitting of arguments from the executable at a space might have been incorrect,
29682    # since paths with space are more likely in Windows. Give it another try with the whole
29683    # argument.
29684    path="$complete"
29685    arguments="EOL"
29686    new_path=`$CYGPATH -u "$path"`
29687    new_path=`$WHICH "$new_path" 2> /dev/null`
29688    # bat and cmd files are not always considered executable in cygwin causing which
29689    # to not find them
29690    if test "x$new_path" = x \
29691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29693      new_path=`$CYGPATH -u "$path"`
29694    fi
29695    if test "x$new_path" = x; then
29696      # It's still not found. Now this is an unrecoverable error.
29697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29698$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29699      has_space=`$ECHO "$complete" | $GREP " "`
29700      if test "x$has_space" != x; then
29701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29703      fi
29704      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29705    fi
29706  fi
29707
29708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29711  # "foo.exe" is OK but "foo" is an error.
29712  #
29713  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29714  # It is also a way to make sure we got the proper file name for the real test later on.
29715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29716  if test "x$test_shortpath" = x; then
29717    # Short path failed, file does not exist as specified.
29718    # Try adding .exe or .cmd
29719    if test -f "${new_path}.exe"; then
29720      input_to_shortpath="${new_path}.exe"
29721    elif test -f "${new_path}.cmd"; then
29722      input_to_shortpath="${new_path}.cmd"
29723    else
29724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29725$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29726      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29727$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29728      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29729    fi
29730  else
29731    input_to_shortpath="$new_path"
29732  fi
29733
29734  # Call helper function which possibly converts this using DOS-style short mode.
29735  # If so, the updated path is stored in $new_path.
29736  new_path="$input_to_shortpath"
29737
29738  input_path="$input_to_shortpath"
29739  # Check if we need to convert this using DOS-style short mode. If the path
29740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29741  # take no chances and rewrite it.
29742  # Note: m4 eats our [], so we need to use [ and ] instead.
29743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29744  if test "x$has_forbidden_chars" != x; then
29745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29749      # Going to short mode and back again did indeed matter. Since short mode is
29750      # case insensitive, let's make it lowercase to improve readability.
29751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29752      # Now convert it back to Unix-stile (cygpath)
29753      input_path=`$CYGPATH -u "$shortmode_path"`
29754      new_path="$input_path"
29755    fi
29756  fi
29757
29758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29759  if test "x$test_cygdrive_prefix" = x; then
29760    # As a simple fix, exclude /usr/bin since it's not a real path.
29761    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29763      # a path prefixed by /cygdrive for fixpath to work.
29764      new_path="$CYGWIN_ROOT_PATH$input_path"
29765    fi
29766  fi
29767
29768  # remove trailing .exe if any
29769  new_path="${new_path/%.exe/}"
29770
29771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29772
29773  # First separate the path from the arguments. This will split at the first
29774  # space.
29775  complete="$CXX"
29776  path="${complete%% *}"
29777  tmp="$complete EOL"
29778  arguments="${tmp#* }"
29779
29780  # Input might be given as Windows format, start by converting to
29781  # unix format.
29782  new_path="$path"
29783
29784  windows_path="$new_path"
29785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29786    unix_path=`$CYGPATH -u "$windows_path"`
29787    new_path="$unix_path"
29788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29790    new_path="$unix_path"
29791  fi
29792
29793
29794  # Now try to locate executable using which
29795  new_path=`$WHICH "$new_path" 2> /dev/null`
29796
29797  if test "x$new_path" = x; then
29798    # Oops. Which didn't find the executable.
29799    # The splitting of arguments from the executable at a space might have been incorrect,
29800    # since paths with space are more likely in Windows. Give it another try with the whole
29801    # argument.
29802    path="$complete"
29803    arguments="EOL"
29804    new_path="$path"
29805
29806  windows_path="$new_path"
29807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29808    unix_path=`$CYGPATH -u "$windows_path"`
29809    new_path="$unix_path"
29810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29812    new_path="$unix_path"
29813  fi
29814
29815
29816    new_path=`$WHICH "$new_path" 2> /dev/null`
29817    # bat and cmd files are not always considered executable in MSYS causing which
29818    # to not find them
29819    if test "x$new_path" = x \
29820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29822      new_path="$path"
29823
29824  windows_path="$new_path"
29825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29826    unix_path=`$CYGPATH -u "$windows_path"`
29827    new_path="$unix_path"
29828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29830    new_path="$unix_path"
29831  fi
29832
29833    fi
29834
29835    if test "x$new_path" = x; then
29836      # It's still not found. Now this is an unrecoverable error.
29837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29838$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29839      has_space=`$ECHO "$complete" | $GREP " "`
29840      if test "x$has_space" != x; then
29841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29843      fi
29844      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29845    fi
29846  fi
29847
29848  # Now new_path has a complete unix path to the binary
29849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29850    # Keep paths in /bin as-is, but remove trailing .exe if any
29851    new_path="${new_path/%.exe/}"
29852    # Do not save /bin paths to all_fixpath_prefixes!
29853  else
29854    # Not in mixed or Windows style, start by that.
29855    new_path=`cmd //c echo $new_path`
29856
29857  input_path="$new_path"
29858  # Check if we need to convert this using DOS-style short mode. If the path
29859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29860  # take no chances and rewrite it.
29861  # Note: m4 eats our [], so we need to use [ and ] instead.
29862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29863  if test "x$has_forbidden_chars" != x; then
29864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29866  fi
29867
29868    # Output is in $new_path
29869
29870  windows_path="$new_path"
29871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29872    unix_path=`$CYGPATH -u "$windows_path"`
29873    new_path="$unix_path"
29874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29876    new_path="$unix_path"
29877  fi
29878
29879    # remove trailing .exe if any
29880    new_path="${new_path/%.exe/}"
29881
29882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29884  fi
29885
29886  else
29887    # We're on a posix platform. Hooray! :)
29888    # First separate the path from the arguments. This will split at the first
29889    # space.
29890    complete="$CXX"
29891    path="${complete%% *}"
29892    tmp="$complete EOL"
29893    arguments="${tmp#* }"
29894
29895    # Cannot rely on the command "which" here since it doesn't always work.
29896    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29897    if test -z "$is_absolute_path"; then
29898      # Path to executable is not absolute. Find it.
29899      IFS_save="$IFS"
29900      IFS=:
29901      for p in $PATH; do
29902        if test -f "$p/$path" && test -x "$p/$path"; then
29903          new_path="$p/$path"
29904          break
29905        fi
29906      done
29907      IFS="$IFS_save"
29908    else
29909      # This is an absolute path, we can use it without further modifications.
29910      new_path="$path"
29911    fi
29912
29913    if test "x$new_path" = x; then
29914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29915$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29916      has_space=`$ECHO "$complete" | $GREP " "`
29917      if test "x$has_space" != x; then
29918        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29919$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29920      fi
29921      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29922    fi
29923  fi
29924
29925  # Now join together the path and the arguments once again
29926  if test "x$arguments" != xEOL; then
29927    new_complete="$new_path ${arguments% *}"
29928  else
29929    new_complete="$new_path"
29930  fi
29931
29932  if test "x$complete" != "x$new_complete"; then
29933    CXX="$new_complete"
29934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29935$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29936  fi
29937
29938  TEST_COMPILER="$CXX"
29939  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29940  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29941  if test "x$OPENJDK_BUILD_OS" != xaix; then
29942    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29944$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29945
29946  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29947    # Follow a chain of symbolic links. Use readlink
29948    # where it exists, else fall back to horribly
29949    # complicated shell code.
29950    if test "x$READLINK_TESTED" != yes; then
29951      # On MacOSX there is a readlink tool with a different
29952      # purpose than the GNU readlink tool. Check the found readlink.
29953      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29954      if test "x$ISGNU" = x; then
29955        # A readlink that we do not know how to use.
29956        # Are there other non-GNU readlinks out there?
29957        READLINK_TESTED=yes
29958        READLINK=
29959      fi
29960    fi
29961
29962    if test "x$READLINK" != x; then
29963      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29964    else
29965      # Save the current directory for restoring afterwards
29966      STARTDIR=$PWD
29967      COUNTER=0
29968      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29969      sym_link_file=`$BASENAME $TEST_COMPILER`
29970      cd $sym_link_dir
29971      # Use -P flag to resolve symlinks in directories.
29972      cd `$THEPWDCMD -P`
29973      sym_link_dir=`$THEPWDCMD -P`
29974      # Resolve file symlinks
29975      while test $COUNTER -lt 20; do
29976        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29977        if test "x$ISLINK" == x; then
29978          # This is not a symbolic link! We are done!
29979          break
29980        fi
29981        # Again resolve directory symlinks since the target of the just found
29982        # link could be in a different directory
29983        cd `$DIRNAME $ISLINK`
29984        sym_link_dir=`$THEPWDCMD -P`
29985        sym_link_file=`$BASENAME $ISLINK`
29986        let COUNTER=COUNTER+1
29987      done
29988      cd $STARTDIR
29989      TEST_COMPILER=$sym_link_dir/$sym_link_file
29990    fi
29991  fi
29992
29993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29994$as_echo "$TEST_COMPILER" >&6; }
29995  fi
29996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29997$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29998
29999  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30000  if test "x$COMPILER_BASENAME" = "xccache"; then
30001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30002$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30003    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30004    # We want to control ccache invocation ourselves, so ignore this cc and try
30005    # searching again.
30006
30007    # Remove the path to the fake ccache cc from the PATH
30008    RETRY_COMPILER_SAVED_PATH="$PATH"
30009    COMPILER_DIRNAME=`$DIRNAME $CXX`
30010    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30011
30012    # Try again looking for our compiler
30013    if test -n "$ac_tool_prefix"; then
30014  for ac_prog in $TOOLCHAIN_CXX_BINARY
30015  do
30016    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30019$as_echo_n "checking for $ac_word... " >&6; }
30020if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30021  $as_echo_n "(cached) " >&6
30022else
30023  if test -n "$PROPER_COMPILER_CXX"; then
30024  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30025else
30026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30027for as_dir in $PATH
30028do
30029  IFS=$as_save_IFS
30030  test -z "$as_dir" && as_dir=.
30031    for ac_exec_ext in '' $ac_executable_extensions; do
30032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30033    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30035    break 2
30036  fi
30037done
30038  done
30039IFS=$as_save_IFS
30040
30041fi
30042fi
30043PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30044if test -n "$PROPER_COMPILER_CXX"; then
30045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30046$as_echo "$PROPER_COMPILER_CXX" >&6; }
30047else
30048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30049$as_echo "no" >&6; }
30050fi
30051
30052
30053    test -n "$PROPER_COMPILER_CXX" && break
30054  done
30055fi
30056if test -z "$PROPER_COMPILER_CXX"; then
30057  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30058  for ac_prog in $TOOLCHAIN_CXX_BINARY
30059do
30060  # Extract the first word of "$ac_prog", so it can be a program name with args.
30061set dummy $ac_prog; ac_word=$2
30062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30063$as_echo_n "checking for $ac_word... " >&6; }
30064if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30065  $as_echo_n "(cached) " >&6
30066else
30067  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30068  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30069else
30070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30071for as_dir in $PATH
30072do
30073  IFS=$as_save_IFS
30074  test -z "$as_dir" && as_dir=.
30075    for ac_exec_ext in '' $ac_executable_extensions; do
30076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30077    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30079    break 2
30080  fi
30081done
30082  done
30083IFS=$as_save_IFS
30084
30085fi
30086fi
30087ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30088if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30090$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30091else
30092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30093$as_echo "no" >&6; }
30094fi
30095
30096
30097  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30098done
30099
30100  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30101    PROPER_COMPILER_CXX=""
30102  else
30103    case $cross_compiling:$ac_tool_warned in
30104yes:)
30105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30107ac_tool_warned=yes ;;
30108esac
30109    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30110  fi
30111fi
30112
30113
30114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30115
30116  # First separate the path from the arguments. This will split at the first
30117  # space.
30118  complete="$PROPER_COMPILER_CXX"
30119  path="${complete%% *}"
30120  tmp="$complete EOL"
30121  arguments="${tmp#* }"
30122
30123  # Input might be given as Windows format, start by converting to
30124  # unix format.
30125  new_path=`$CYGPATH -u "$path"`
30126
30127  # Now try to locate executable using which
30128  new_path=`$WHICH "$new_path" 2> /dev/null`
30129  # bat and cmd files are not always considered executable in cygwin causing which
30130  # to not find them
30131  if test "x$new_path" = x \
30132      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30133      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30134    new_path=`$CYGPATH -u "$path"`
30135  fi
30136  if test "x$new_path" = x; then
30137    # Oops. Which didn't find the executable.
30138    # The splitting of arguments from the executable at a space might have been incorrect,
30139    # since paths with space are more likely in Windows. Give it another try with the whole
30140    # argument.
30141    path="$complete"
30142    arguments="EOL"
30143    new_path=`$CYGPATH -u "$path"`
30144    new_path=`$WHICH "$new_path" 2> /dev/null`
30145    # bat and cmd files are not always considered executable in cygwin causing which
30146    # to not find them
30147    if test "x$new_path" = x \
30148        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30149        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30150      new_path=`$CYGPATH -u "$path"`
30151    fi
30152    if test "x$new_path" = x; then
30153      # It's still not found. Now this is an unrecoverable error.
30154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30155$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30156      has_space=`$ECHO "$complete" | $GREP " "`
30157      if test "x$has_space" != x; then
30158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30160      fi
30161      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30162    fi
30163  fi
30164
30165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30168  # "foo.exe" is OK but "foo" is an error.
30169  #
30170  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30171  # It is also a way to make sure we got the proper file name for the real test later on.
30172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30173  if test "x$test_shortpath" = x; then
30174    # Short path failed, file does not exist as specified.
30175    # Try adding .exe or .cmd
30176    if test -f "${new_path}.exe"; then
30177      input_to_shortpath="${new_path}.exe"
30178    elif test -f "${new_path}.cmd"; then
30179      input_to_shortpath="${new_path}.cmd"
30180    else
30181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30182$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30183      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30184$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30185      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30186    fi
30187  else
30188    input_to_shortpath="$new_path"
30189  fi
30190
30191  # Call helper function which possibly converts this using DOS-style short mode.
30192  # If so, the updated path is stored in $new_path.
30193  new_path="$input_to_shortpath"
30194
30195  input_path="$input_to_shortpath"
30196  # Check if we need to convert this using DOS-style short mode. If the path
30197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30198  # take no chances and rewrite it.
30199  # Note: m4 eats our [], so we need to use [ and ] instead.
30200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30201  if test "x$has_forbidden_chars" != x; then
30202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30206      # Going to short mode and back again did indeed matter. Since short mode is
30207      # case insensitive, let's make it lowercase to improve readability.
30208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30209      # Now convert it back to Unix-stile (cygpath)
30210      input_path=`$CYGPATH -u "$shortmode_path"`
30211      new_path="$input_path"
30212    fi
30213  fi
30214
30215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30216  if test "x$test_cygdrive_prefix" = x; then
30217    # As a simple fix, exclude /usr/bin since it's not a real path.
30218    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30220      # a path prefixed by /cygdrive for fixpath to work.
30221      new_path="$CYGWIN_ROOT_PATH$input_path"
30222    fi
30223  fi
30224
30225  # remove trailing .exe if any
30226  new_path="${new_path/%.exe/}"
30227
30228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30229
30230  # First separate the path from the arguments. This will split at the first
30231  # space.
30232  complete="$PROPER_COMPILER_CXX"
30233  path="${complete%% *}"
30234  tmp="$complete EOL"
30235  arguments="${tmp#* }"
30236
30237  # Input might be given as Windows format, start by converting to
30238  # unix format.
30239  new_path="$path"
30240
30241  windows_path="$new_path"
30242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30243    unix_path=`$CYGPATH -u "$windows_path"`
30244    new_path="$unix_path"
30245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30247    new_path="$unix_path"
30248  fi
30249
30250
30251  # Now try to locate executable using which
30252  new_path=`$WHICH "$new_path" 2> /dev/null`
30253
30254  if test "x$new_path" = x; then
30255    # Oops. Which didn't find the executable.
30256    # The splitting of arguments from the executable at a space might have been incorrect,
30257    # since paths with space are more likely in Windows. Give it another try with the whole
30258    # argument.
30259    path="$complete"
30260    arguments="EOL"
30261    new_path="$path"
30262
30263  windows_path="$new_path"
30264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30265    unix_path=`$CYGPATH -u "$windows_path"`
30266    new_path="$unix_path"
30267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30269    new_path="$unix_path"
30270  fi
30271
30272
30273    new_path=`$WHICH "$new_path" 2> /dev/null`
30274    # bat and cmd files are not always considered executable in MSYS causing which
30275    # to not find them
30276    if test "x$new_path" = x \
30277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30279      new_path="$path"
30280
30281  windows_path="$new_path"
30282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30283    unix_path=`$CYGPATH -u "$windows_path"`
30284    new_path="$unix_path"
30285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30287    new_path="$unix_path"
30288  fi
30289
30290    fi
30291
30292    if test "x$new_path" = x; then
30293      # It's still not found. Now this is an unrecoverable error.
30294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30295$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30296      has_space=`$ECHO "$complete" | $GREP " "`
30297      if test "x$has_space" != x; then
30298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30300      fi
30301      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30302    fi
30303  fi
30304
30305  # Now new_path has a complete unix path to the binary
30306  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30307    # Keep paths in /bin as-is, but remove trailing .exe if any
30308    new_path="${new_path/%.exe/}"
30309    # Do not save /bin paths to all_fixpath_prefixes!
30310  else
30311    # Not in mixed or Windows style, start by that.
30312    new_path=`cmd //c echo $new_path`
30313
30314  input_path="$new_path"
30315  # Check if we need to convert this using DOS-style short mode. If the path
30316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30317  # take no chances and rewrite it.
30318  # Note: m4 eats our [], so we need to use [ and ] instead.
30319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30320  if test "x$has_forbidden_chars" != x; then
30321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30323  fi
30324
30325    # Output is in $new_path
30326
30327  windows_path="$new_path"
30328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30329    unix_path=`$CYGPATH -u "$windows_path"`
30330    new_path="$unix_path"
30331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30333    new_path="$unix_path"
30334  fi
30335
30336    # remove trailing .exe if any
30337    new_path="${new_path/%.exe/}"
30338
30339    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30340    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30341  fi
30342
30343  else
30344    # We're on a posix platform. Hooray! :)
30345    # First separate the path from the arguments. This will split at the first
30346    # space.
30347    complete="$PROPER_COMPILER_CXX"
30348    path="${complete%% *}"
30349    tmp="$complete EOL"
30350    arguments="${tmp#* }"
30351
30352    # Cannot rely on the command "which" here since it doesn't always work.
30353    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30354    if test -z "$is_absolute_path"; then
30355      # Path to executable is not absolute. Find it.
30356      IFS_save="$IFS"
30357      IFS=:
30358      for p in $PATH; do
30359        if test -f "$p/$path" && test -x "$p/$path"; then
30360          new_path="$p/$path"
30361          break
30362        fi
30363      done
30364      IFS="$IFS_save"
30365    else
30366      # This is an absolute path, we can use it without further modifications.
30367      new_path="$path"
30368    fi
30369
30370    if test "x$new_path" = x; then
30371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30372$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30373      has_space=`$ECHO "$complete" | $GREP " "`
30374      if test "x$has_space" != x; then
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30376$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30377      fi
30378      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30379    fi
30380  fi
30381
30382  # Now join together the path and the arguments once again
30383  if test "x$arguments" != xEOL; then
30384    new_complete="$new_path ${arguments% *}"
30385  else
30386    new_complete="$new_path"
30387  fi
30388
30389  if test "x$complete" != "x$new_complete"; then
30390    PROPER_COMPILER_CXX="$new_complete"
30391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30392$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30393  fi
30394
30395    PATH="$RETRY_COMPILER_SAVED_PATH"
30396
30397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30398$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30399
30400  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30401    # Follow a chain of symbolic links. Use readlink
30402    # where it exists, else fall back to horribly
30403    # complicated shell code.
30404    if test "x$READLINK_TESTED" != yes; then
30405      # On MacOSX there is a readlink tool with a different
30406      # purpose than the GNU readlink tool. Check the found readlink.
30407      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30408      if test "x$ISGNU" = x; then
30409        # A readlink that we do not know how to use.
30410        # Are there other non-GNU readlinks out there?
30411        READLINK_TESTED=yes
30412        READLINK=
30413      fi
30414    fi
30415
30416    if test "x$READLINK" != x; then
30417      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30418    else
30419      # Save the current directory for restoring afterwards
30420      STARTDIR=$PWD
30421      COUNTER=0
30422      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30423      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30424      cd $sym_link_dir
30425      # Use -P flag to resolve symlinks in directories.
30426      cd `$THEPWDCMD -P`
30427      sym_link_dir=`$THEPWDCMD -P`
30428      # Resolve file symlinks
30429      while test $COUNTER -lt 20; do
30430        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30431        if test "x$ISLINK" == x; then
30432          # This is not a symbolic link! We are done!
30433          break
30434        fi
30435        # Again resolve directory symlinks since the target of the just found
30436        # link could be in a different directory
30437        cd `$DIRNAME $ISLINK`
30438        sym_link_dir=`$THEPWDCMD -P`
30439        sym_link_file=`$BASENAME $ISLINK`
30440        let COUNTER=COUNTER+1
30441      done
30442      cd $STARTDIR
30443      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30444    fi
30445  fi
30446
30447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30448$as_echo "$PROPER_COMPILER_CXX" >&6; }
30449    CXX="$PROPER_COMPILER_CXX"
30450  else
30451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30452$as_echo "no, keeping CXX" >&6; }
30453  fi
30454
30455
30456  COMPILER=$CXX
30457  COMPILER_NAME=$COMPILER_NAME
30458
30459  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30460    # cc -V output typically looks like
30461    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30462    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30463    # Check that this is likely to be the Solaris Studio cc.
30464    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30465    if test $? -ne 0; then
30466      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30467      { $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
30468$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30469      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30470$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30471      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30472$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30473      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30474    fi
30475    # Remove usage instructions (if present), and
30476    # collapse compiler output into a single line
30477    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30478        $SED -e 's/ *[Uu]sage:.*//'`
30479    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30480        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30481  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30482    # xlc -qversion output typically looks like
30483    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30484    #     Version: 11.01.0000.0015
30485    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30486    # Check that this is likely to be the IBM XL C compiler.
30487    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30488    if test $? -ne 0; then
30489      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30490      { $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
30491$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30493$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30494      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30495$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30496      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30497    fi
30498    # Collapse compiler output into a single line
30499    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30500    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30501        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30502  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30503    # There is no specific version flag, but all output starts with a version string.
30504    # First line typically looks something like:
30505    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30506    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30507    # Check that this is likely to be Microsoft CL.EXE.
30508    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30509    if test $? -ne 0; then
30510      { $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
30511$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30512      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30513$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30514      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30515    fi
30516    # Collapse compiler output into a single line
30517    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30518    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30519        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30520  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30521    # gcc --version output typically looks like
30522    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30523    #     Copyright (C) 2013 Free Software Foundation, Inc.
30524    #     This is free software; see the source for copying conditions.  There is NO
30525    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30526    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30527    # Check that this is likely to be GCC.
30528    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30529    if test $? -ne 0; then
30530      { $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
30531$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30532      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30533$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30534      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30535    fi
30536    # Remove Copyright and legalese from version string, and
30537    # collapse into a single line
30538    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30539        $SED -e 's/ *Copyright .*//'`
30540    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30541        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30542  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30543    # clang --version output typically looks like
30544    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30545    #    clang version 3.3 (tags/RELEASE_33/final)
30546    # or
30547    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30548    #    Target: x86_64-pc-linux-gnu
30549    #    Thread model: posix
30550    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30551    # Check that this is likely to be clang
30552    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30553    if test $? -ne 0; then
30554      { $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
30555$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30556      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30557$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30558      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30559    fi
30560    # Collapse compiler output into a single line
30561    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30562    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30563        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30564  else
30565      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30566  fi
30567  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30568  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30569  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30570  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30571
30572  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30573$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30574
30575
30576  # Now that we have resolved CXX ourself, let autoconf have its go at it
30577  ac_ext=cpp
30578ac_cpp='$CXXCPP $CPPFLAGS'
30579ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30580ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30581ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30582if test -z "$CXX"; then
30583  if test -n "$CCC"; then
30584    CXX=$CCC
30585  else
30586    if test -n "$ac_tool_prefix"; then
30587  for ac_prog in $CXX
30588  do
30589    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30590set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30592$as_echo_n "checking for $ac_word... " >&6; }
30593if ${ac_cv_prog_CXX+:} false; then :
30594  $as_echo_n "(cached) " >&6
30595else
30596  if test -n "$CXX"; then
30597  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30598else
30599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30600for as_dir in $PATH
30601do
30602  IFS=$as_save_IFS
30603  test -z "$as_dir" && as_dir=.
30604    for ac_exec_ext in '' $ac_executable_extensions; do
30605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30606    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30608    break 2
30609  fi
30610done
30611  done
30612IFS=$as_save_IFS
30613
30614fi
30615fi
30616CXX=$ac_cv_prog_CXX
30617if test -n "$CXX"; then
30618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30619$as_echo "$CXX" >&6; }
30620else
30621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30622$as_echo "no" >&6; }
30623fi
30624
30625
30626    test -n "$CXX" && break
30627  done
30628fi
30629if test -z "$CXX"; then
30630  ac_ct_CXX=$CXX
30631  for ac_prog in $CXX
30632do
30633  # Extract the first word of "$ac_prog", so it can be a program name with args.
30634set dummy $ac_prog; ac_word=$2
30635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30636$as_echo_n "checking for $ac_word... " >&6; }
30637if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30638  $as_echo_n "(cached) " >&6
30639else
30640  if test -n "$ac_ct_CXX"; then
30641  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30642else
30643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30644for as_dir in $PATH
30645do
30646  IFS=$as_save_IFS
30647  test -z "$as_dir" && as_dir=.
30648    for ac_exec_ext in '' $ac_executable_extensions; do
30649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30650    ac_cv_prog_ac_ct_CXX="$ac_prog"
30651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30652    break 2
30653  fi
30654done
30655  done
30656IFS=$as_save_IFS
30657
30658fi
30659fi
30660ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30661if test -n "$ac_ct_CXX"; then
30662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30663$as_echo "$ac_ct_CXX" >&6; }
30664else
30665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30666$as_echo "no" >&6; }
30667fi
30668
30669
30670  test -n "$ac_ct_CXX" && break
30671done
30672
30673  if test "x$ac_ct_CXX" = x; then
30674    CXX="g++"
30675  else
30676    case $cross_compiling:$ac_tool_warned in
30677yes:)
30678{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30679$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30680ac_tool_warned=yes ;;
30681esac
30682    CXX=$ac_ct_CXX
30683  fi
30684fi
30685
30686  fi
30687fi
30688# Provide some information about the compiler.
30689$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30690set X $ac_compile
30691ac_compiler=$2
30692for ac_option in --version -v -V -qversion; do
30693  { { ac_try="$ac_compiler $ac_option >&5"
30694case "(($ac_try" in
30695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30696  *) ac_try_echo=$ac_try;;
30697esac
30698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30699$as_echo "$ac_try_echo"; } >&5
30700  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30701  ac_status=$?
30702  if test -s conftest.err; then
30703    sed '10a\
30704... rest of stderr output deleted ...
30705         10q' conftest.err >conftest.er1
30706    cat conftest.er1 >&5
30707  fi
30708  rm -f conftest.er1 conftest.err
30709  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30710  test $ac_status = 0; }
30711done
30712
30713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30714$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30715if ${ac_cv_cxx_compiler_gnu+:} false; then :
30716  $as_echo_n "(cached) " >&6
30717else
30718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30719/* end confdefs.h.  */
30720
30721int
30722main ()
30723{
30724#ifndef __GNUC__
30725       choke me
30726#endif
30727
30728  ;
30729  return 0;
30730}
30731_ACEOF
30732if ac_fn_cxx_try_compile "$LINENO"; then :
30733  ac_compiler_gnu=yes
30734else
30735  ac_compiler_gnu=no
30736fi
30737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30738ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30739
30740fi
30741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30742$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30743if test $ac_compiler_gnu = yes; then
30744  GXX=yes
30745else
30746  GXX=
30747fi
30748ac_test_CXXFLAGS=${CXXFLAGS+set}
30749ac_save_CXXFLAGS=$CXXFLAGS
30750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30751$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30752if ${ac_cv_prog_cxx_g+:} false; then :
30753  $as_echo_n "(cached) " >&6
30754else
30755  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30756   ac_cxx_werror_flag=yes
30757   ac_cv_prog_cxx_g=no
30758   CXXFLAGS="-g"
30759   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30760/* end confdefs.h.  */
30761
30762int
30763main ()
30764{
30765
30766  ;
30767  return 0;
30768}
30769_ACEOF
30770if ac_fn_cxx_try_compile "$LINENO"; then :
30771  ac_cv_prog_cxx_g=yes
30772else
30773  CXXFLAGS=""
30774      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30775/* end confdefs.h.  */
30776
30777int
30778main ()
30779{
30780
30781  ;
30782  return 0;
30783}
30784_ACEOF
30785if ac_fn_cxx_try_compile "$LINENO"; then :
30786
30787else
30788  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30789	 CXXFLAGS="-g"
30790	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30791/* end confdefs.h.  */
30792
30793int
30794main ()
30795{
30796
30797  ;
30798  return 0;
30799}
30800_ACEOF
30801if ac_fn_cxx_try_compile "$LINENO"; then :
30802  ac_cv_prog_cxx_g=yes
30803fi
30804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30805fi
30806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30807fi
30808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30809   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30810fi
30811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30812$as_echo "$ac_cv_prog_cxx_g" >&6; }
30813if test "$ac_test_CXXFLAGS" = set; then
30814  CXXFLAGS=$ac_save_CXXFLAGS
30815elif test $ac_cv_prog_cxx_g = yes; then
30816  if test "$GXX" = yes; then
30817    CXXFLAGS="-g -O2"
30818  else
30819    CXXFLAGS="-g"
30820  fi
30821else
30822  if test "$GXX" = yes; then
30823    CXXFLAGS="-O2"
30824  else
30825    CXXFLAGS=
30826  fi
30827fi
30828ac_ext=cpp
30829ac_cpp='$CXXCPP $CPPFLAGS'
30830ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30831ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30832ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30833
30834
30835  #
30836  # Setup the preprocessor (CPP and CXXCPP)
30837  #
30838  ac_ext=c
30839ac_cpp='$CPP $CPPFLAGS'
30840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30842ac_compiler_gnu=$ac_cv_c_compiler_gnu
30843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30844$as_echo_n "checking how to run the C preprocessor... " >&6; }
30845# On Suns, sometimes $CPP names a directory.
30846if test -n "$CPP" && test -d "$CPP"; then
30847  CPP=
30848fi
30849if test -z "$CPP"; then
30850  if ${ac_cv_prog_CPP+:} false; then :
30851  $as_echo_n "(cached) " >&6
30852else
30853      # Double quotes because CPP needs to be expanded
30854    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30855    do
30856      ac_preproc_ok=false
30857for ac_c_preproc_warn_flag in '' yes
30858do
30859  # Use a header file that comes with gcc, so configuring glibc
30860  # with a fresh cross-compiler works.
30861  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30862  # <limits.h> exists even on freestanding compilers.
30863  # On the NeXT, cc -E runs the code through the compiler's parser,
30864  # not just through cpp. "Syntax error" is here to catch this case.
30865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30866/* end confdefs.h.  */
30867#ifdef __STDC__
30868# include <limits.h>
30869#else
30870# include <assert.h>
30871#endif
30872		     Syntax error
30873_ACEOF
30874if ac_fn_c_try_cpp "$LINENO"; then :
30875
30876else
30877  # Broken: fails on valid input.
30878continue
30879fi
30880rm -f conftest.err conftest.i conftest.$ac_ext
30881
30882  # OK, works on sane cases.  Now check whether nonexistent headers
30883  # can be detected and how.
30884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30885/* end confdefs.h.  */
30886#include <ac_nonexistent.h>
30887_ACEOF
30888if ac_fn_c_try_cpp "$LINENO"; then :
30889  # Broken: success on invalid input.
30890continue
30891else
30892  # Passes both tests.
30893ac_preproc_ok=:
30894break
30895fi
30896rm -f conftest.err conftest.i conftest.$ac_ext
30897
30898done
30899# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30900rm -f conftest.i conftest.err conftest.$ac_ext
30901if $ac_preproc_ok; then :
30902  break
30903fi
30904
30905    done
30906    ac_cv_prog_CPP=$CPP
30907
30908fi
30909  CPP=$ac_cv_prog_CPP
30910else
30911  ac_cv_prog_CPP=$CPP
30912fi
30913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30914$as_echo "$CPP" >&6; }
30915ac_preproc_ok=false
30916for ac_c_preproc_warn_flag in '' yes
30917do
30918  # Use a header file that comes with gcc, so configuring glibc
30919  # with a fresh cross-compiler works.
30920  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30921  # <limits.h> exists even on freestanding compilers.
30922  # On the NeXT, cc -E runs the code through the compiler's parser,
30923  # not just through cpp. "Syntax error" is here to catch this case.
30924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30925/* end confdefs.h.  */
30926#ifdef __STDC__
30927# include <limits.h>
30928#else
30929# include <assert.h>
30930#endif
30931		     Syntax error
30932_ACEOF
30933if ac_fn_c_try_cpp "$LINENO"; then :
30934
30935else
30936  # Broken: fails on valid input.
30937continue
30938fi
30939rm -f conftest.err conftest.i conftest.$ac_ext
30940
30941  # OK, works on sane cases.  Now check whether nonexistent headers
30942  # can be detected and how.
30943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30944/* end confdefs.h.  */
30945#include <ac_nonexistent.h>
30946_ACEOF
30947if ac_fn_c_try_cpp "$LINENO"; then :
30948  # Broken: success on invalid input.
30949continue
30950else
30951  # Passes both tests.
30952ac_preproc_ok=:
30953break
30954fi
30955rm -f conftest.err conftest.i conftest.$ac_ext
30956
30957done
30958# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30959rm -f conftest.i conftest.err conftest.$ac_ext
30960if $ac_preproc_ok; then :
30961
30962else
30963  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30965as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30966See \`config.log' for more details" "$LINENO" 5; }
30967fi
30968
30969ac_ext=cpp
30970ac_cpp='$CXXCPP $CPPFLAGS'
30971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30974
30975
30976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30977
30978  # First separate the path from the arguments. This will split at the first
30979  # space.
30980  complete="$CPP"
30981  path="${complete%% *}"
30982  tmp="$complete EOL"
30983  arguments="${tmp#* }"
30984
30985  # Input might be given as Windows format, start by converting to
30986  # unix format.
30987  new_path=`$CYGPATH -u "$path"`
30988
30989  # Now try to locate executable using which
30990  new_path=`$WHICH "$new_path" 2> /dev/null`
30991  # bat and cmd files are not always considered executable in cygwin causing which
30992  # to not find them
30993  if test "x$new_path" = x \
30994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30996    new_path=`$CYGPATH -u "$path"`
30997  fi
30998  if test "x$new_path" = x; then
30999    # Oops. Which didn't find the executable.
31000    # The splitting of arguments from the executable at a space might have been incorrect,
31001    # since paths with space are more likely in Windows. Give it another try with the whole
31002    # argument.
31003    path="$complete"
31004    arguments="EOL"
31005    new_path=`$CYGPATH -u "$path"`
31006    new_path=`$WHICH "$new_path" 2> /dev/null`
31007    # bat and cmd files are not always considered executable in cygwin causing which
31008    # to not find them
31009    if test "x$new_path" = x \
31010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31012      new_path=`$CYGPATH -u "$path"`
31013    fi
31014    if test "x$new_path" = x; then
31015      # It's still not found. Now this is an unrecoverable error.
31016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31017$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31018      has_space=`$ECHO "$complete" | $GREP " "`
31019      if test "x$has_space" != x; then
31020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31022      fi
31023      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31024    fi
31025  fi
31026
31027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31030  # "foo.exe" is OK but "foo" is an error.
31031  #
31032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31033  # It is also a way to make sure we got the proper file name for the real test later on.
31034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31035  if test "x$test_shortpath" = x; then
31036    # Short path failed, file does not exist as specified.
31037    # Try adding .exe or .cmd
31038    if test -f "${new_path}.exe"; then
31039      input_to_shortpath="${new_path}.exe"
31040    elif test -f "${new_path}.cmd"; then
31041      input_to_shortpath="${new_path}.cmd"
31042    else
31043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31044$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31047      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31048    fi
31049  else
31050    input_to_shortpath="$new_path"
31051  fi
31052
31053  # Call helper function which possibly converts this using DOS-style short mode.
31054  # If so, the updated path is stored in $new_path.
31055  new_path="$input_to_shortpath"
31056
31057  input_path="$input_to_shortpath"
31058  # Check if we need to convert this using DOS-style short mode. If the path
31059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31060  # take no chances and rewrite it.
31061  # Note: m4 eats our [], so we need to use [ and ] instead.
31062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31063  if test "x$has_forbidden_chars" != x; then
31064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31068      # Going to short mode and back again did indeed matter. Since short mode is
31069      # case insensitive, let's make it lowercase to improve readability.
31070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31071      # Now convert it back to Unix-stile (cygpath)
31072      input_path=`$CYGPATH -u "$shortmode_path"`
31073      new_path="$input_path"
31074    fi
31075  fi
31076
31077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31078  if test "x$test_cygdrive_prefix" = x; then
31079    # As a simple fix, exclude /usr/bin since it's not a real path.
31080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31082      # a path prefixed by /cygdrive for fixpath to work.
31083      new_path="$CYGWIN_ROOT_PATH$input_path"
31084    fi
31085  fi
31086
31087  # remove trailing .exe if any
31088  new_path="${new_path/%.exe/}"
31089
31090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31091
31092  # First separate the path from the arguments. This will split at the first
31093  # space.
31094  complete="$CPP"
31095  path="${complete%% *}"
31096  tmp="$complete EOL"
31097  arguments="${tmp#* }"
31098
31099  # Input might be given as Windows format, start by converting to
31100  # unix format.
31101  new_path="$path"
31102
31103  windows_path="$new_path"
31104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31105    unix_path=`$CYGPATH -u "$windows_path"`
31106    new_path="$unix_path"
31107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31109    new_path="$unix_path"
31110  fi
31111
31112
31113  # Now try to locate executable using which
31114  new_path=`$WHICH "$new_path" 2> /dev/null`
31115
31116  if test "x$new_path" = x; then
31117    # Oops. Which didn't find the executable.
31118    # The splitting of arguments from the executable at a space might have been incorrect,
31119    # since paths with space are more likely in Windows. Give it another try with the whole
31120    # argument.
31121    path="$complete"
31122    arguments="EOL"
31123    new_path="$path"
31124
31125  windows_path="$new_path"
31126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31127    unix_path=`$CYGPATH -u "$windows_path"`
31128    new_path="$unix_path"
31129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31131    new_path="$unix_path"
31132  fi
31133
31134
31135    new_path=`$WHICH "$new_path" 2> /dev/null`
31136    # bat and cmd files are not always considered executable in MSYS causing which
31137    # to not find them
31138    if test "x$new_path" = x \
31139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31141      new_path="$path"
31142
31143  windows_path="$new_path"
31144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31145    unix_path=`$CYGPATH -u "$windows_path"`
31146    new_path="$unix_path"
31147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31149    new_path="$unix_path"
31150  fi
31151
31152    fi
31153
31154    if test "x$new_path" = x; then
31155      # It's still not found. Now this is an unrecoverable error.
31156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31157$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31158      has_space=`$ECHO "$complete" | $GREP " "`
31159      if test "x$has_space" != x; then
31160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31162      fi
31163      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31164    fi
31165  fi
31166
31167  # Now new_path has a complete unix path to the binary
31168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31169    # Keep paths in /bin as-is, but remove trailing .exe if any
31170    new_path="${new_path/%.exe/}"
31171    # Do not save /bin paths to all_fixpath_prefixes!
31172  else
31173    # Not in mixed or Windows style, start by that.
31174    new_path=`cmd //c echo $new_path`
31175
31176  input_path="$new_path"
31177  # Check if we need to convert this using DOS-style short mode. If the path
31178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31179  # take no chances and rewrite it.
31180  # Note: m4 eats our [], so we need to use [ and ] instead.
31181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31182  if test "x$has_forbidden_chars" != x; then
31183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31185  fi
31186
31187    # Output is in $new_path
31188
31189  windows_path="$new_path"
31190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31191    unix_path=`$CYGPATH -u "$windows_path"`
31192    new_path="$unix_path"
31193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31195    new_path="$unix_path"
31196  fi
31197
31198    # remove trailing .exe if any
31199    new_path="${new_path/%.exe/}"
31200
31201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31203  fi
31204
31205  else
31206    # We're on a posix platform. Hooray! :)
31207    # First separate the path from the arguments. This will split at the first
31208    # space.
31209    complete="$CPP"
31210    path="${complete%% *}"
31211    tmp="$complete EOL"
31212    arguments="${tmp#* }"
31213
31214    # Cannot rely on the command "which" here since it doesn't always work.
31215    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31216    if test -z "$is_absolute_path"; then
31217      # Path to executable is not absolute. Find it.
31218      IFS_save="$IFS"
31219      IFS=:
31220      for p in $PATH; do
31221        if test -f "$p/$path" && test -x "$p/$path"; then
31222          new_path="$p/$path"
31223          break
31224        fi
31225      done
31226      IFS="$IFS_save"
31227    else
31228      # This is an absolute path, we can use it without further modifications.
31229      new_path="$path"
31230    fi
31231
31232    if test "x$new_path" = x; then
31233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31234$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31235      has_space=`$ECHO "$complete" | $GREP " "`
31236      if test "x$has_space" != x; then
31237        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31239      fi
31240      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31241    fi
31242  fi
31243
31244  # Now join together the path and the arguments once again
31245  if test "x$arguments" != xEOL; then
31246    new_complete="$new_path ${arguments% *}"
31247  else
31248    new_complete="$new_path"
31249  fi
31250
31251  if test "x$complete" != "x$new_complete"; then
31252    CPP="$new_complete"
31253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31254$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31255  fi
31256
31257  ac_ext=cpp
31258ac_cpp='$CXXCPP $CPPFLAGS'
31259ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31260ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31261ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31263$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31264if test -z "$CXXCPP"; then
31265  if ${ac_cv_prog_CXXCPP+:} false; then :
31266  $as_echo_n "(cached) " >&6
31267else
31268      # Double quotes because CXXCPP needs to be expanded
31269    for CXXCPP in "$CXX -E" "/lib/cpp"
31270    do
31271      ac_preproc_ok=false
31272for ac_cxx_preproc_warn_flag in '' yes
31273do
31274  # Use a header file that comes with gcc, so configuring glibc
31275  # with a fresh cross-compiler works.
31276  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31277  # <limits.h> exists even on freestanding compilers.
31278  # On the NeXT, cc -E runs the code through the compiler's parser,
31279  # not just through cpp. "Syntax error" is here to catch this case.
31280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31281/* end confdefs.h.  */
31282#ifdef __STDC__
31283# include <limits.h>
31284#else
31285# include <assert.h>
31286#endif
31287		     Syntax error
31288_ACEOF
31289if ac_fn_cxx_try_cpp "$LINENO"; then :
31290
31291else
31292  # Broken: fails on valid input.
31293continue
31294fi
31295rm -f conftest.err conftest.i conftest.$ac_ext
31296
31297  # OK, works on sane cases.  Now check whether nonexistent headers
31298  # can be detected and how.
31299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31300/* end confdefs.h.  */
31301#include <ac_nonexistent.h>
31302_ACEOF
31303if ac_fn_cxx_try_cpp "$LINENO"; then :
31304  # Broken: success on invalid input.
31305continue
31306else
31307  # Passes both tests.
31308ac_preproc_ok=:
31309break
31310fi
31311rm -f conftest.err conftest.i conftest.$ac_ext
31312
31313done
31314# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31315rm -f conftest.i conftest.err conftest.$ac_ext
31316if $ac_preproc_ok; then :
31317  break
31318fi
31319
31320    done
31321    ac_cv_prog_CXXCPP=$CXXCPP
31322
31323fi
31324  CXXCPP=$ac_cv_prog_CXXCPP
31325else
31326  ac_cv_prog_CXXCPP=$CXXCPP
31327fi
31328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31329$as_echo "$CXXCPP" >&6; }
31330ac_preproc_ok=false
31331for ac_cxx_preproc_warn_flag in '' yes
31332do
31333  # Use a header file that comes with gcc, so configuring glibc
31334  # with a fresh cross-compiler works.
31335  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31336  # <limits.h> exists even on freestanding compilers.
31337  # On the NeXT, cc -E runs the code through the compiler's parser,
31338  # not just through cpp. "Syntax error" is here to catch this case.
31339  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31340/* end confdefs.h.  */
31341#ifdef __STDC__
31342# include <limits.h>
31343#else
31344# include <assert.h>
31345#endif
31346		     Syntax error
31347_ACEOF
31348if ac_fn_cxx_try_cpp "$LINENO"; then :
31349
31350else
31351  # Broken: fails on valid input.
31352continue
31353fi
31354rm -f conftest.err conftest.i conftest.$ac_ext
31355
31356  # OK, works on sane cases.  Now check whether nonexistent headers
31357  # can be detected and how.
31358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31359/* end confdefs.h.  */
31360#include <ac_nonexistent.h>
31361_ACEOF
31362if ac_fn_cxx_try_cpp "$LINENO"; then :
31363  # Broken: success on invalid input.
31364continue
31365else
31366  # Passes both tests.
31367ac_preproc_ok=:
31368break
31369fi
31370rm -f conftest.err conftest.i conftest.$ac_ext
31371
31372done
31373# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31374rm -f conftest.i conftest.err conftest.$ac_ext
31375if $ac_preproc_ok; then :
31376
31377else
31378  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31380as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31381See \`config.log' for more details" "$LINENO" 5; }
31382fi
31383
31384ac_ext=cpp
31385ac_cpp='$CXXCPP $CPPFLAGS'
31386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31389
31390
31391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31392
31393  # First separate the path from the arguments. This will split at the first
31394  # space.
31395  complete="$CXXCPP"
31396  path="${complete%% *}"
31397  tmp="$complete EOL"
31398  arguments="${tmp#* }"
31399
31400  # Input might be given as Windows format, start by converting to
31401  # unix format.
31402  new_path=`$CYGPATH -u "$path"`
31403
31404  # Now try to locate executable using which
31405  new_path=`$WHICH "$new_path" 2> /dev/null`
31406  # bat and cmd files are not always considered executable in cygwin causing which
31407  # to not find them
31408  if test "x$new_path" = x \
31409      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31410      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31411    new_path=`$CYGPATH -u "$path"`
31412  fi
31413  if test "x$new_path" = x; then
31414    # Oops. Which didn't find the executable.
31415    # The splitting of arguments from the executable at a space might have been incorrect,
31416    # since paths with space are more likely in Windows. Give it another try with the whole
31417    # argument.
31418    path="$complete"
31419    arguments="EOL"
31420    new_path=`$CYGPATH -u "$path"`
31421    new_path=`$WHICH "$new_path" 2> /dev/null`
31422    # bat and cmd files are not always considered executable in cygwin causing which
31423    # to not find them
31424    if test "x$new_path" = x \
31425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31427      new_path=`$CYGPATH -u "$path"`
31428    fi
31429    if test "x$new_path" = x; then
31430      # It's still not found. Now this is an unrecoverable error.
31431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31432$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31433      has_space=`$ECHO "$complete" | $GREP " "`
31434      if test "x$has_space" != x; then
31435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31437      fi
31438      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31439    fi
31440  fi
31441
31442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31445  # "foo.exe" is OK but "foo" is an error.
31446  #
31447  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31448  # It is also a way to make sure we got the proper file name for the real test later on.
31449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31450  if test "x$test_shortpath" = x; then
31451    # Short path failed, file does not exist as specified.
31452    # Try adding .exe or .cmd
31453    if test -f "${new_path}.exe"; then
31454      input_to_shortpath="${new_path}.exe"
31455    elif test -f "${new_path}.cmd"; then
31456      input_to_shortpath="${new_path}.cmd"
31457    else
31458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31459$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31460      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31461$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31462      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31463    fi
31464  else
31465    input_to_shortpath="$new_path"
31466  fi
31467
31468  # Call helper function which possibly converts this using DOS-style short mode.
31469  # If so, the updated path is stored in $new_path.
31470  new_path="$input_to_shortpath"
31471
31472  input_path="$input_to_shortpath"
31473  # Check if we need to convert this using DOS-style short mode. If the path
31474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31475  # take no chances and rewrite it.
31476  # Note: m4 eats our [], so we need to use [ and ] instead.
31477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31478  if test "x$has_forbidden_chars" != x; then
31479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31483      # Going to short mode and back again did indeed matter. Since short mode is
31484      # case insensitive, let's make it lowercase to improve readability.
31485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31486      # Now convert it back to Unix-stile (cygpath)
31487      input_path=`$CYGPATH -u "$shortmode_path"`
31488      new_path="$input_path"
31489    fi
31490  fi
31491
31492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31493  if test "x$test_cygdrive_prefix" = x; then
31494    # As a simple fix, exclude /usr/bin since it's not a real path.
31495    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31497      # a path prefixed by /cygdrive for fixpath to work.
31498      new_path="$CYGWIN_ROOT_PATH$input_path"
31499    fi
31500  fi
31501
31502  # remove trailing .exe if any
31503  new_path="${new_path/%.exe/}"
31504
31505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31506
31507  # First separate the path from the arguments. This will split at the first
31508  # space.
31509  complete="$CXXCPP"
31510  path="${complete%% *}"
31511  tmp="$complete EOL"
31512  arguments="${tmp#* }"
31513
31514  # Input might be given as Windows format, start by converting to
31515  # unix format.
31516  new_path="$path"
31517
31518  windows_path="$new_path"
31519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31520    unix_path=`$CYGPATH -u "$windows_path"`
31521    new_path="$unix_path"
31522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31524    new_path="$unix_path"
31525  fi
31526
31527
31528  # Now try to locate executable using which
31529  new_path=`$WHICH "$new_path" 2> /dev/null`
31530
31531  if test "x$new_path" = x; then
31532    # Oops. Which didn't find the executable.
31533    # The splitting of arguments from the executable at a space might have been incorrect,
31534    # since paths with space are more likely in Windows. Give it another try with the whole
31535    # argument.
31536    path="$complete"
31537    arguments="EOL"
31538    new_path="$path"
31539
31540  windows_path="$new_path"
31541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31542    unix_path=`$CYGPATH -u "$windows_path"`
31543    new_path="$unix_path"
31544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31546    new_path="$unix_path"
31547  fi
31548
31549
31550    new_path=`$WHICH "$new_path" 2> /dev/null`
31551    # bat and cmd files are not always considered executable in MSYS causing which
31552    # to not find them
31553    if test "x$new_path" = x \
31554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31556      new_path="$path"
31557
31558  windows_path="$new_path"
31559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31560    unix_path=`$CYGPATH -u "$windows_path"`
31561    new_path="$unix_path"
31562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31564    new_path="$unix_path"
31565  fi
31566
31567    fi
31568
31569    if test "x$new_path" = x; then
31570      # It's still not found. Now this is an unrecoverable error.
31571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31572$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31573      has_space=`$ECHO "$complete" | $GREP " "`
31574      if test "x$has_space" != x; then
31575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31577      fi
31578      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31579    fi
31580  fi
31581
31582  # Now new_path has a complete unix path to the binary
31583  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31584    # Keep paths in /bin as-is, but remove trailing .exe if any
31585    new_path="${new_path/%.exe/}"
31586    # Do not save /bin paths to all_fixpath_prefixes!
31587  else
31588    # Not in mixed or Windows style, start by that.
31589    new_path=`cmd //c echo $new_path`
31590
31591  input_path="$new_path"
31592  # Check if we need to convert this using DOS-style short mode. If the path
31593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31594  # take no chances and rewrite it.
31595  # Note: m4 eats our [], so we need to use [ and ] instead.
31596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31597  if test "x$has_forbidden_chars" != x; then
31598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31600  fi
31601
31602    # Output is in $new_path
31603
31604  windows_path="$new_path"
31605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31606    unix_path=`$CYGPATH -u "$windows_path"`
31607    new_path="$unix_path"
31608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31610    new_path="$unix_path"
31611  fi
31612
31613    # remove trailing .exe if any
31614    new_path="${new_path/%.exe/}"
31615
31616    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31617    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31618  fi
31619
31620  else
31621    # We're on a posix platform. Hooray! :)
31622    # First separate the path from the arguments. This will split at the first
31623    # space.
31624    complete="$CXXCPP"
31625    path="${complete%% *}"
31626    tmp="$complete EOL"
31627    arguments="${tmp#* }"
31628
31629    # Cannot rely on the command "which" here since it doesn't always work.
31630    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31631    if test -z "$is_absolute_path"; then
31632      # Path to executable is not absolute. Find it.
31633      IFS_save="$IFS"
31634      IFS=:
31635      for p in $PATH; do
31636        if test -f "$p/$path" && test -x "$p/$path"; then
31637          new_path="$p/$path"
31638          break
31639        fi
31640      done
31641      IFS="$IFS_save"
31642    else
31643      # This is an absolute path, we can use it without further modifications.
31644      new_path="$path"
31645    fi
31646
31647    if test "x$new_path" = x; then
31648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31649$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31650      has_space=`$ECHO "$complete" | $GREP " "`
31651      if test "x$has_space" != x; then
31652        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31653$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31654      fi
31655      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31656    fi
31657  fi
31658
31659  # Now join together the path and the arguments once again
31660  if test "x$arguments" != xEOL; then
31661    new_complete="$new_path ${arguments% *}"
31662  else
31663    new_complete="$new_path"
31664  fi
31665
31666  if test "x$complete" != "x$new_complete"; then
31667    CXXCPP="$new_complete"
31668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31669$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31670  fi
31671
31672
31673  #
31674  # Setup the linker (LD)
31675  #
31676  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31677    # In the Microsoft toolchain we have a separate LD command "link".
31678    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31679    # a cygwin program for something completely different.
31680    # Extract the first word of "link", so it can be a program name with args.
31681set dummy link; ac_word=$2
31682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31683$as_echo_n "checking for $ac_word... " >&6; }
31684if ${ac_cv_prog_LD+:} false; then :
31685  $as_echo_n "(cached) " >&6
31686else
31687  if test -n "$LD"; then
31688  ac_cv_prog_LD="$LD" # Let the user override the test.
31689else
31690  ac_prog_rejected=no
31691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31692for as_dir in $PATH
31693do
31694  IFS=$as_save_IFS
31695  test -z "$as_dir" && as_dir=.
31696    for ac_exec_ext in '' $ac_executable_extensions; do
31697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31698    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31699       ac_prog_rejected=yes
31700       continue
31701     fi
31702    ac_cv_prog_LD="link"
31703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31704    break 2
31705  fi
31706done
31707  done
31708IFS=$as_save_IFS
31709
31710if test $ac_prog_rejected = yes; then
31711  # We found a bogon in the path, so make sure we never use it.
31712  set dummy $ac_cv_prog_LD
31713  shift
31714  if test $# != 0; then
31715    # We chose a different compiler from the bogus one.
31716    # However, it has the same basename, so the bogon will be chosen
31717    # first if we set LD to just the basename; use the full file name.
31718    shift
31719    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31720  fi
31721fi
31722fi
31723fi
31724LD=$ac_cv_prog_LD
31725if test -n "$LD"; then
31726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31727$as_echo "$LD" >&6; }
31728else
31729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31730$as_echo "no" >&6; }
31731fi
31732
31733
31734
31735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31736
31737  # First separate the path from the arguments. This will split at the first
31738  # space.
31739  complete="$LD"
31740  path="${complete%% *}"
31741  tmp="$complete EOL"
31742  arguments="${tmp#* }"
31743
31744  # Input might be given as Windows format, start by converting to
31745  # unix format.
31746  new_path=`$CYGPATH -u "$path"`
31747
31748  # Now try to locate executable using which
31749  new_path=`$WHICH "$new_path" 2> /dev/null`
31750  # bat and cmd files are not always considered executable in cygwin causing which
31751  # to not find them
31752  if test "x$new_path" = x \
31753      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31754      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31755    new_path=`$CYGPATH -u "$path"`
31756  fi
31757  if test "x$new_path" = x; then
31758    # Oops. Which didn't find the executable.
31759    # The splitting of arguments from the executable at a space might have been incorrect,
31760    # since paths with space are more likely in Windows. Give it another try with the whole
31761    # argument.
31762    path="$complete"
31763    arguments="EOL"
31764    new_path=`$CYGPATH -u "$path"`
31765    new_path=`$WHICH "$new_path" 2> /dev/null`
31766    # bat and cmd files are not always considered executable in cygwin causing which
31767    # to not find them
31768    if test "x$new_path" = x \
31769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31771      new_path=`$CYGPATH -u "$path"`
31772    fi
31773    if test "x$new_path" = x; then
31774      # It's still not found. Now this is an unrecoverable error.
31775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31776$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31777      has_space=`$ECHO "$complete" | $GREP " "`
31778      if test "x$has_space" != x; then
31779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31781      fi
31782      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31783    fi
31784  fi
31785
31786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31789  # "foo.exe" is OK but "foo" is an error.
31790  #
31791  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31792  # It is also a way to make sure we got the proper file name for the real test later on.
31793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31794  if test "x$test_shortpath" = x; then
31795    # Short path failed, file does not exist as specified.
31796    # Try adding .exe or .cmd
31797    if test -f "${new_path}.exe"; then
31798      input_to_shortpath="${new_path}.exe"
31799    elif test -f "${new_path}.cmd"; then
31800      input_to_shortpath="${new_path}.cmd"
31801    else
31802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31803$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31804      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31805$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31806      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31807    fi
31808  else
31809    input_to_shortpath="$new_path"
31810  fi
31811
31812  # Call helper function which possibly converts this using DOS-style short mode.
31813  # If so, the updated path is stored in $new_path.
31814  new_path="$input_to_shortpath"
31815
31816  input_path="$input_to_shortpath"
31817  # Check if we need to convert this using DOS-style short mode. If the path
31818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31819  # take no chances and rewrite it.
31820  # Note: m4 eats our [], so we need to use [ and ] instead.
31821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31822  if test "x$has_forbidden_chars" != x; then
31823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31827      # Going to short mode and back again did indeed matter. Since short mode is
31828      # case insensitive, let's make it lowercase to improve readability.
31829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31830      # Now convert it back to Unix-stile (cygpath)
31831      input_path=`$CYGPATH -u "$shortmode_path"`
31832      new_path="$input_path"
31833    fi
31834  fi
31835
31836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31837  if test "x$test_cygdrive_prefix" = x; then
31838    # As a simple fix, exclude /usr/bin since it's not a real path.
31839    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31841      # a path prefixed by /cygdrive for fixpath to work.
31842      new_path="$CYGWIN_ROOT_PATH$input_path"
31843    fi
31844  fi
31845
31846  # remove trailing .exe if any
31847  new_path="${new_path/%.exe/}"
31848
31849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31850
31851  # First separate the path from the arguments. This will split at the first
31852  # space.
31853  complete="$LD"
31854  path="${complete%% *}"
31855  tmp="$complete EOL"
31856  arguments="${tmp#* }"
31857
31858  # Input might be given as Windows format, start by converting to
31859  # unix format.
31860  new_path="$path"
31861
31862  windows_path="$new_path"
31863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31864    unix_path=`$CYGPATH -u "$windows_path"`
31865    new_path="$unix_path"
31866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31868    new_path="$unix_path"
31869  fi
31870
31871
31872  # Now try to locate executable using which
31873  new_path=`$WHICH "$new_path" 2> /dev/null`
31874
31875  if test "x$new_path" = x; then
31876    # Oops. Which didn't find the executable.
31877    # The splitting of arguments from the executable at a space might have been incorrect,
31878    # since paths with space are more likely in Windows. Give it another try with the whole
31879    # argument.
31880    path="$complete"
31881    arguments="EOL"
31882    new_path="$path"
31883
31884  windows_path="$new_path"
31885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31886    unix_path=`$CYGPATH -u "$windows_path"`
31887    new_path="$unix_path"
31888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31890    new_path="$unix_path"
31891  fi
31892
31893
31894    new_path=`$WHICH "$new_path" 2> /dev/null`
31895    # bat and cmd files are not always considered executable in MSYS causing which
31896    # to not find them
31897    if test "x$new_path" = x \
31898        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31899        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31900      new_path="$path"
31901
31902  windows_path="$new_path"
31903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31904    unix_path=`$CYGPATH -u "$windows_path"`
31905    new_path="$unix_path"
31906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31908    new_path="$unix_path"
31909  fi
31910
31911    fi
31912
31913    if test "x$new_path" = x; then
31914      # It's still not found. Now this is an unrecoverable error.
31915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31916$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31917      has_space=`$ECHO "$complete" | $GREP " "`
31918      if test "x$has_space" != x; then
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31921      fi
31922      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31923    fi
31924  fi
31925
31926  # Now new_path has a complete unix path to the binary
31927  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31928    # Keep paths in /bin as-is, but remove trailing .exe if any
31929    new_path="${new_path/%.exe/}"
31930    # Do not save /bin paths to all_fixpath_prefixes!
31931  else
31932    # Not in mixed or Windows style, start by that.
31933    new_path=`cmd //c echo $new_path`
31934
31935  input_path="$new_path"
31936  # Check if we need to convert this using DOS-style short mode. If the path
31937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31938  # take no chances and rewrite it.
31939  # Note: m4 eats our [], so we need to use [ and ] instead.
31940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31941  if test "x$has_forbidden_chars" != x; then
31942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31944  fi
31945
31946    # Output is in $new_path
31947
31948  windows_path="$new_path"
31949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31950    unix_path=`$CYGPATH -u "$windows_path"`
31951    new_path="$unix_path"
31952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31954    new_path="$unix_path"
31955  fi
31956
31957    # remove trailing .exe if any
31958    new_path="${new_path/%.exe/}"
31959
31960    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31961    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31962  fi
31963
31964  else
31965    # We're on a posix platform. Hooray! :)
31966    # First separate the path from the arguments. This will split at the first
31967    # space.
31968    complete="$LD"
31969    path="${complete%% *}"
31970    tmp="$complete EOL"
31971    arguments="${tmp#* }"
31972
31973    # Cannot rely on the command "which" here since it doesn't always work.
31974    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31975    if test -z "$is_absolute_path"; then
31976      # Path to executable is not absolute. Find it.
31977      IFS_save="$IFS"
31978      IFS=:
31979      for p in $PATH; do
31980        if test -f "$p/$path" && test -x "$p/$path"; then
31981          new_path="$p/$path"
31982          break
31983        fi
31984      done
31985      IFS="$IFS_save"
31986    else
31987      # This is an absolute path, we can use it without further modifications.
31988      new_path="$path"
31989    fi
31990
31991    if test "x$new_path" = x; then
31992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31993$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31994      has_space=`$ECHO "$complete" | $GREP " "`
31995      if test "x$has_space" != x; then
31996        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31997$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31998      fi
31999      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32000    fi
32001  fi
32002
32003  # Now join together the path and the arguments once again
32004  if test "x$arguments" != xEOL; then
32005    new_complete="$new_path ${arguments% *}"
32006  else
32007    new_complete="$new_path"
32008  fi
32009
32010  if test "x$complete" != "x$new_complete"; then
32011    LD="$new_complete"
32012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32013$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32014  fi
32015
32016    # Verify that we indeed succeeded with this trick.
32017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32018$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32019    "$LD" --version > /dev/null
32020    if test $? -eq 0 ; then
32021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32022$as_echo "no" >&6; }
32023      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32024    else
32025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32026$as_echo "yes" >&6; }
32027    fi
32028    LDCXX="$LD"
32029  else
32030    # All other toolchains use the compiler to link.
32031    LD="$CC"
32032    LDCXX="$CXX"
32033  fi
32034
32035  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32036
32037
32038  #
32039  # Setup the assembler (AS)
32040  #
32041  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32042    # FIXME: should this really be solaris, or solstudio?
32043
32044
32045  # Publish this variable in the help.
32046
32047
32048  if test "x$AS" = x; then
32049    # The variable is not set by user, try to locate tool using the code snippet
32050    for ac_prog in as
32051do
32052  # Extract the first word of "$ac_prog", so it can be a program name with args.
32053set dummy $ac_prog; ac_word=$2
32054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32055$as_echo_n "checking for $ac_word... " >&6; }
32056if ${ac_cv_path_AS+:} false; then :
32057  $as_echo_n "(cached) " >&6
32058else
32059  case $AS in
32060  [\\/]* | ?:[\\/]*)
32061  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32062  ;;
32063  *)
32064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32065for as_dir in $PATH
32066do
32067  IFS=$as_save_IFS
32068  test -z "$as_dir" && as_dir=.
32069    for ac_exec_ext in '' $ac_executable_extensions; do
32070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32071    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32073    break 2
32074  fi
32075done
32076  done
32077IFS=$as_save_IFS
32078
32079  ;;
32080esac
32081fi
32082AS=$ac_cv_path_AS
32083if test -n "$AS"; then
32084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32085$as_echo "$AS" >&6; }
32086else
32087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32088$as_echo "no" >&6; }
32089fi
32090
32091
32092  test -n "$AS" && break
32093done
32094
32095  else
32096    # The variable is set, but is it from the command line or the environment?
32097
32098    # Try to remove the string !AS! from our list.
32099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32101      # If it failed, the variable was not from the command line. Ignore it,
32102      # but warn the user (except for BASH, which is always set by the calling BASH).
32103      if test "xAS" != xBASH; then
32104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32105$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32106      fi
32107      # Try to locate tool using the code snippet
32108      for ac_prog in as
32109do
32110  # Extract the first word of "$ac_prog", so it can be a program name with args.
32111set dummy $ac_prog; ac_word=$2
32112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32113$as_echo_n "checking for $ac_word... " >&6; }
32114if ${ac_cv_path_AS+:} false; then :
32115  $as_echo_n "(cached) " >&6
32116else
32117  case $AS in
32118  [\\/]* | ?:[\\/]*)
32119  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32120  ;;
32121  *)
32122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32123for as_dir in $PATH
32124do
32125  IFS=$as_save_IFS
32126  test -z "$as_dir" && as_dir=.
32127    for ac_exec_ext in '' $ac_executable_extensions; do
32128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32129    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32131    break 2
32132  fi
32133done
32134  done
32135IFS=$as_save_IFS
32136
32137  ;;
32138esac
32139fi
32140AS=$ac_cv_path_AS
32141if test -n "$AS"; then
32142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32143$as_echo "$AS" >&6; }
32144else
32145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32146$as_echo "no" >&6; }
32147fi
32148
32149
32150  test -n "$AS" && break
32151done
32152
32153    else
32154      # If it succeeded, then it was overridden by the user. We will use it
32155      # for the tool.
32156
32157      # First remove it from the list of overridden variables, so we can test
32158      # for unknown variables in the end.
32159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32160
32161      # Check if the provided tool contains a complete path.
32162      tool_specified="$AS"
32163      tool_basename="${tool_specified##*/}"
32164      if test "x$tool_basename" = "x$tool_specified"; then
32165        # A command without a complete path is provided, search $PATH.
32166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32167$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32168        # Extract the first word of "$tool_basename", so it can be a program name with args.
32169set dummy $tool_basename; ac_word=$2
32170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32171$as_echo_n "checking for $ac_word... " >&6; }
32172if ${ac_cv_path_AS+:} false; then :
32173  $as_echo_n "(cached) " >&6
32174else
32175  case $AS in
32176  [\\/]* | ?:[\\/]*)
32177  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32178  ;;
32179  *)
32180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32181for as_dir in $PATH
32182do
32183  IFS=$as_save_IFS
32184  test -z "$as_dir" && as_dir=.
32185    for ac_exec_ext in '' $ac_executable_extensions; do
32186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32187    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32189    break 2
32190  fi
32191done
32192  done
32193IFS=$as_save_IFS
32194
32195  ;;
32196esac
32197fi
32198AS=$ac_cv_path_AS
32199if test -n "$AS"; then
32200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32201$as_echo "$AS" >&6; }
32202else
32203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32204$as_echo "no" >&6; }
32205fi
32206
32207
32208        if test "x$AS" = x; then
32209          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32210        fi
32211      else
32212        # Otherwise we believe it is a complete path. Use it as it is.
32213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32214$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32216$as_echo_n "checking for AS... " >&6; }
32217        if test ! -x "$tool_specified"; then
32218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32219$as_echo "not found" >&6; }
32220          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32221        fi
32222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32223$as_echo "$tool_specified" >&6; }
32224      fi
32225    fi
32226  fi
32227
32228
32229
32230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32231
32232  # First separate the path from the arguments. This will split at the first
32233  # space.
32234  complete="$AS"
32235  path="${complete%% *}"
32236  tmp="$complete EOL"
32237  arguments="${tmp#* }"
32238
32239  # Input might be given as Windows format, start by converting to
32240  # unix format.
32241  new_path=`$CYGPATH -u "$path"`
32242
32243  # Now try to locate executable using which
32244  new_path=`$WHICH "$new_path" 2> /dev/null`
32245  # bat and cmd files are not always considered executable in cygwin causing which
32246  # to not find them
32247  if test "x$new_path" = x \
32248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32250    new_path=`$CYGPATH -u "$path"`
32251  fi
32252  if test "x$new_path" = x; then
32253    # Oops. Which didn't find the executable.
32254    # The splitting of arguments from the executable at a space might have been incorrect,
32255    # since paths with space are more likely in Windows. Give it another try with the whole
32256    # argument.
32257    path="$complete"
32258    arguments="EOL"
32259    new_path=`$CYGPATH -u "$path"`
32260    new_path=`$WHICH "$new_path" 2> /dev/null`
32261    # bat and cmd files are not always considered executable in cygwin causing which
32262    # to not find them
32263    if test "x$new_path" = x \
32264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32266      new_path=`$CYGPATH -u "$path"`
32267    fi
32268    if test "x$new_path" = x; then
32269      # It's still not found. Now this is an unrecoverable error.
32270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32271$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32272      has_space=`$ECHO "$complete" | $GREP " "`
32273      if test "x$has_space" != x; then
32274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32276      fi
32277      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32278    fi
32279  fi
32280
32281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32284  # "foo.exe" is OK but "foo" is an error.
32285  #
32286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32287  # It is also a way to make sure we got the proper file name for the real test later on.
32288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32289  if test "x$test_shortpath" = x; then
32290    # Short path failed, file does not exist as specified.
32291    # Try adding .exe or .cmd
32292    if test -f "${new_path}.exe"; then
32293      input_to_shortpath="${new_path}.exe"
32294    elif test -f "${new_path}.cmd"; then
32295      input_to_shortpath="${new_path}.cmd"
32296    else
32297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32298$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32301      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32302    fi
32303  else
32304    input_to_shortpath="$new_path"
32305  fi
32306
32307  # Call helper function which possibly converts this using DOS-style short mode.
32308  # If so, the updated path is stored in $new_path.
32309  new_path="$input_to_shortpath"
32310
32311  input_path="$input_to_shortpath"
32312  # Check if we need to convert this using DOS-style short mode. If the path
32313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32314  # take no chances and rewrite it.
32315  # Note: m4 eats our [], so we need to use [ and ] instead.
32316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32317  if test "x$has_forbidden_chars" != x; then
32318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32322      # Going to short mode and back again did indeed matter. Since short mode is
32323      # case insensitive, let's make it lowercase to improve readability.
32324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32325      # Now convert it back to Unix-stile (cygpath)
32326      input_path=`$CYGPATH -u "$shortmode_path"`
32327      new_path="$input_path"
32328    fi
32329  fi
32330
32331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32332  if test "x$test_cygdrive_prefix" = x; then
32333    # As a simple fix, exclude /usr/bin since it's not a real path.
32334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32336      # a path prefixed by /cygdrive for fixpath to work.
32337      new_path="$CYGWIN_ROOT_PATH$input_path"
32338    fi
32339  fi
32340
32341  # remove trailing .exe if any
32342  new_path="${new_path/%.exe/}"
32343
32344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32345
32346  # First separate the path from the arguments. This will split at the first
32347  # space.
32348  complete="$AS"
32349  path="${complete%% *}"
32350  tmp="$complete EOL"
32351  arguments="${tmp#* }"
32352
32353  # Input might be given as Windows format, start by converting to
32354  # unix format.
32355  new_path="$path"
32356
32357  windows_path="$new_path"
32358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32359    unix_path=`$CYGPATH -u "$windows_path"`
32360    new_path="$unix_path"
32361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32363    new_path="$unix_path"
32364  fi
32365
32366
32367  # Now try to locate executable using which
32368  new_path=`$WHICH "$new_path" 2> /dev/null`
32369
32370  if test "x$new_path" = x; then
32371    # Oops. Which didn't find the executable.
32372    # The splitting of arguments from the executable at a space might have been incorrect,
32373    # since paths with space are more likely in Windows. Give it another try with the whole
32374    # argument.
32375    path="$complete"
32376    arguments="EOL"
32377    new_path="$path"
32378
32379  windows_path="$new_path"
32380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32381    unix_path=`$CYGPATH -u "$windows_path"`
32382    new_path="$unix_path"
32383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32385    new_path="$unix_path"
32386  fi
32387
32388
32389    new_path=`$WHICH "$new_path" 2> /dev/null`
32390    # bat and cmd files are not always considered executable in MSYS causing which
32391    # to not find them
32392    if test "x$new_path" = x \
32393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32395      new_path="$path"
32396
32397  windows_path="$new_path"
32398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32399    unix_path=`$CYGPATH -u "$windows_path"`
32400    new_path="$unix_path"
32401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32403    new_path="$unix_path"
32404  fi
32405
32406    fi
32407
32408    if test "x$new_path" = x; then
32409      # It's still not found. Now this is an unrecoverable error.
32410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32411$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32412      has_space=`$ECHO "$complete" | $GREP " "`
32413      if test "x$has_space" != x; then
32414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32416      fi
32417      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32418    fi
32419  fi
32420
32421  # Now new_path has a complete unix path to the binary
32422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32423    # Keep paths in /bin as-is, but remove trailing .exe if any
32424    new_path="${new_path/%.exe/}"
32425    # Do not save /bin paths to all_fixpath_prefixes!
32426  else
32427    # Not in mixed or Windows style, start by that.
32428    new_path=`cmd //c echo $new_path`
32429
32430  input_path="$new_path"
32431  # Check if we need to convert this using DOS-style short mode. If the path
32432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32433  # take no chances and rewrite it.
32434  # Note: m4 eats our [], so we need to use [ and ] instead.
32435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32436  if test "x$has_forbidden_chars" != x; then
32437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32439  fi
32440
32441    # Output is in $new_path
32442
32443  windows_path="$new_path"
32444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32445    unix_path=`$CYGPATH -u "$windows_path"`
32446    new_path="$unix_path"
32447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32449    new_path="$unix_path"
32450  fi
32451
32452    # remove trailing .exe if any
32453    new_path="${new_path/%.exe/}"
32454
32455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32457  fi
32458
32459  else
32460    # We're on a posix platform. Hooray! :)
32461    # First separate the path from the arguments. This will split at the first
32462    # space.
32463    complete="$AS"
32464    path="${complete%% *}"
32465    tmp="$complete EOL"
32466    arguments="${tmp#* }"
32467
32468    # Cannot rely on the command "which" here since it doesn't always work.
32469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32470    if test -z "$is_absolute_path"; then
32471      # Path to executable is not absolute. Find it.
32472      IFS_save="$IFS"
32473      IFS=:
32474      for p in $PATH; do
32475        if test -f "$p/$path" && test -x "$p/$path"; then
32476          new_path="$p/$path"
32477          break
32478        fi
32479      done
32480      IFS="$IFS_save"
32481    else
32482      # This is an absolute path, we can use it without further modifications.
32483      new_path="$path"
32484    fi
32485
32486    if test "x$new_path" = x; then
32487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32488$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32489      has_space=`$ECHO "$complete" | $GREP " "`
32490      if test "x$has_space" != x; then
32491        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32493      fi
32494      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32495    fi
32496  fi
32497
32498  # Now join together the path and the arguments once again
32499  if test "x$arguments" != xEOL; then
32500    new_complete="$new_path ${arguments% *}"
32501  else
32502    new_complete="$new_path"
32503  fi
32504
32505  if test "x$complete" != "x$new_complete"; then
32506    AS="$new_complete"
32507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32508$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32509  fi
32510
32511  else
32512    # FIXME: is this correct for microsoft?
32513    AS="$CC -c"
32514  fi
32515
32516
32517  #
32518  # Setup the archiver (AR)
32519  #
32520  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32521    # The corresponding ar tool is lib.exe (used to create static libraries)
32522    # Extract the first word of "lib", so it can be a program name with args.
32523set dummy lib; ac_word=$2
32524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32525$as_echo_n "checking for $ac_word... " >&6; }
32526if ${ac_cv_prog_AR+:} false; then :
32527  $as_echo_n "(cached) " >&6
32528else
32529  if test -n "$AR"; then
32530  ac_cv_prog_AR="$AR" # Let the user override the test.
32531else
32532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32533for as_dir in $PATH
32534do
32535  IFS=$as_save_IFS
32536  test -z "$as_dir" && as_dir=.
32537    for ac_exec_ext in '' $ac_executable_extensions; do
32538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32539    ac_cv_prog_AR="lib"
32540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32541    break 2
32542  fi
32543done
32544  done
32545IFS=$as_save_IFS
32546
32547fi
32548fi
32549AR=$ac_cv_prog_AR
32550if test -n "$AR"; then
32551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32552$as_echo "$AR" >&6; }
32553else
32554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32555$as_echo "no" >&6; }
32556fi
32557
32558
32559  else
32560
32561
32562  # Publish this variable in the help.
32563
32564
32565  if test "x$AR" = x; then
32566    # The variable is not set by user, try to locate tool using the code snippet
32567    if test -n "$ac_tool_prefix"; then
32568  for ac_prog in ar
32569  do
32570    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32571set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32573$as_echo_n "checking for $ac_word... " >&6; }
32574if ${ac_cv_prog_AR+:} false; then :
32575  $as_echo_n "(cached) " >&6
32576else
32577  if test -n "$AR"; then
32578  ac_cv_prog_AR="$AR" # Let the user override the test.
32579else
32580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32581for as_dir in $PATH
32582do
32583  IFS=$as_save_IFS
32584  test -z "$as_dir" && as_dir=.
32585    for ac_exec_ext in '' $ac_executable_extensions; do
32586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32587    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32589    break 2
32590  fi
32591done
32592  done
32593IFS=$as_save_IFS
32594
32595fi
32596fi
32597AR=$ac_cv_prog_AR
32598if test -n "$AR"; then
32599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32600$as_echo "$AR" >&6; }
32601else
32602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32603$as_echo "no" >&6; }
32604fi
32605
32606
32607    test -n "$AR" && break
32608  done
32609fi
32610if test -z "$AR"; then
32611  ac_ct_AR=$AR
32612  for ac_prog in ar
32613do
32614  # Extract the first word of "$ac_prog", so it can be a program name with args.
32615set dummy $ac_prog; ac_word=$2
32616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32617$as_echo_n "checking for $ac_word... " >&6; }
32618if ${ac_cv_prog_ac_ct_AR+:} false; then :
32619  $as_echo_n "(cached) " >&6
32620else
32621  if test -n "$ac_ct_AR"; then
32622  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32623else
32624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32625for as_dir in $PATH
32626do
32627  IFS=$as_save_IFS
32628  test -z "$as_dir" && as_dir=.
32629    for ac_exec_ext in '' $ac_executable_extensions; do
32630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32631    ac_cv_prog_ac_ct_AR="$ac_prog"
32632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32633    break 2
32634  fi
32635done
32636  done
32637IFS=$as_save_IFS
32638
32639fi
32640fi
32641ac_ct_AR=$ac_cv_prog_ac_ct_AR
32642if test -n "$ac_ct_AR"; then
32643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32644$as_echo "$ac_ct_AR" >&6; }
32645else
32646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32647$as_echo "no" >&6; }
32648fi
32649
32650
32651  test -n "$ac_ct_AR" && break
32652done
32653
32654  if test "x$ac_ct_AR" = x; then
32655    AR=""
32656  else
32657    case $cross_compiling:$ac_tool_warned in
32658yes:)
32659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32661ac_tool_warned=yes ;;
32662esac
32663    AR=$ac_ct_AR
32664  fi
32665fi
32666
32667  else
32668    # The variable is set, but is it from the command line or the environment?
32669
32670    # Try to remove the string !AR! from our list.
32671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32673      # If it failed, the variable was not from the command line. Ignore it,
32674      # but warn the user (except for BASH, which is always set by the calling BASH).
32675      if test "xAR" != xBASH; then
32676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32677$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32678      fi
32679      # Try to locate tool using the code snippet
32680      if test -n "$ac_tool_prefix"; then
32681  for ac_prog in ar
32682  do
32683    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32686$as_echo_n "checking for $ac_word... " >&6; }
32687if ${ac_cv_prog_AR+:} false; then :
32688  $as_echo_n "(cached) " >&6
32689else
32690  if test -n "$AR"; then
32691  ac_cv_prog_AR="$AR" # Let the user override the test.
32692else
32693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32694for as_dir in $PATH
32695do
32696  IFS=$as_save_IFS
32697  test -z "$as_dir" && as_dir=.
32698    for ac_exec_ext in '' $ac_executable_extensions; do
32699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32700    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32702    break 2
32703  fi
32704done
32705  done
32706IFS=$as_save_IFS
32707
32708fi
32709fi
32710AR=$ac_cv_prog_AR
32711if test -n "$AR"; then
32712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32713$as_echo "$AR" >&6; }
32714else
32715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32716$as_echo "no" >&6; }
32717fi
32718
32719
32720    test -n "$AR" && break
32721  done
32722fi
32723if test -z "$AR"; then
32724  ac_ct_AR=$AR
32725  for ac_prog in ar
32726do
32727  # Extract the first word of "$ac_prog", so it can be a program name with args.
32728set dummy $ac_prog; ac_word=$2
32729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32730$as_echo_n "checking for $ac_word... " >&6; }
32731if ${ac_cv_prog_ac_ct_AR+:} false; then :
32732  $as_echo_n "(cached) " >&6
32733else
32734  if test -n "$ac_ct_AR"; then
32735  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32736else
32737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32738for as_dir in $PATH
32739do
32740  IFS=$as_save_IFS
32741  test -z "$as_dir" && as_dir=.
32742    for ac_exec_ext in '' $ac_executable_extensions; do
32743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32744    ac_cv_prog_ac_ct_AR="$ac_prog"
32745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32746    break 2
32747  fi
32748done
32749  done
32750IFS=$as_save_IFS
32751
32752fi
32753fi
32754ac_ct_AR=$ac_cv_prog_ac_ct_AR
32755if test -n "$ac_ct_AR"; then
32756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32757$as_echo "$ac_ct_AR" >&6; }
32758else
32759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32760$as_echo "no" >&6; }
32761fi
32762
32763
32764  test -n "$ac_ct_AR" && break
32765done
32766
32767  if test "x$ac_ct_AR" = x; then
32768    AR=""
32769  else
32770    case $cross_compiling:$ac_tool_warned in
32771yes:)
32772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32774ac_tool_warned=yes ;;
32775esac
32776    AR=$ac_ct_AR
32777  fi
32778fi
32779
32780    else
32781      # If it succeeded, then it was overridden by the user. We will use it
32782      # for the tool.
32783
32784      # First remove it from the list of overridden variables, so we can test
32785      # for unknown variables in the end.
32786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32787
32788      # Check if the provided tool contains a complete path.
32789      tool_specified="$AR"
32790      tool_basename="${tool_specified##*/}"
32791      if test "x$tool_basename" = "x$tool_specified"; then
32792        # A command without a complete path is provided, search $PATH.
32793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32794$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32795        # Extract the first word of "$tool_basename", so it can be a program name with args.
32796set dummy $tool_basename; ac_word=$2
32797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32798$as_echo_n "checking for $ac_word... " >&6; }
32799if ${ac_cv_path_AR+:} false; then :
32800  $as_echo_n "(cached) " >&6
32801else
32802  case $AR in
32803  [\\/]* | ?:[\\/]*)
32804  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32805  ;;
32806  *)
32807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32808for as_dir in $PATH
32809do
32810  IFS=$as_save_IFS
32811  test -z "$as_dir" && as_dir=.
32812    for ac_exec_ext in '' $ac_executable_extensions; do
32813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32814    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32816    break 2
32817  fi
32818done
32819  done
32820IFS=$as_save_IFS
32821
32822  ;;
32823esac
32824fi
32825AR=$ac_cv_path_AR
32826if test -n "$AR"; then
32827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32828$as_echo "$AR" >&6; }
32829else
32830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32831$as_echo "no" >&6; }
32832fi
32833
32834
32835        if test "x$AR" = x; then
32836          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32837        fi
32838      else
32839        # Otherwise we believe it is a complete path. Use it as it is.
32840        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32841$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32843$as_echo_n "checking for AR... " >&6; }
32844        if test ! -x "$tool_specified"; then
32845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32846$as_echo "not found" >&6; }
32847          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32848        fi
32849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32850$as_echo "$tool_specified" >&6; }
32851      fi
32852    fi
32853  fi
32854
32855
32856  fi
32857
32858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32859
32860  # First separate the path from the arguments. This will split at the first
32861  # space.
32862  complete="$AR"
32863  path="${complete%% *}"
32864  tmp="$complete EOL"
32865  arguments="${tmp#* }"
32866
32867  # Input might be given as Windows format, start by converting to
32868  # unix format.
32869  new_path=`$CYGPATH -u "$path"`
32870
32871  # Now try to locate executable using which
32872  new_path=`$WHICH "$new_path" 2> /dev/null`
32873  # bat and cmd files are not always considered executable in cygwin causing which
32874  # to not find them
32875  if test "x$new_path" = x \
32876      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32877      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32878    new_path=`$CYGPATH -u "$path"`
32879  fi
32880  if test "x$new_path" = x; then
32881    # Oops. Which didn't find the executable.
32882    # The splitting of arguments from the executable at a space might have been incorrect,
32883    # since paths with space are more likely in Windows. Give it another try with the whole
32884    # argument.
32885    path="$complete"
32886    arguments="EOL"
32887    new_path=`$CYGPATH -u "$path"`
32888    new_path=`$WHICH "$new_path" 2> /dev/null`
32889    # bat and cmd files are not always considered executable in cygwin causing which
32890    # to not find them
32891    if test "x$new_path" = x \
32892        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32893        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32894      new_path=`$CYGPATH -u "$path"`
32895    fi
32896    if test "x$new_path" = x; then
32897      # It's still not found. Now this is an unrecoverable error.
32898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32899$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32900      has_space=`$ECHO "$complete" | $GREP " "`
32901      if test "x$has_space" != x; then
32902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32904      fi
32905      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32906    fi
32907  fi
32908
32909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32912  # "foo.exe" is OK but "foo" is an error.
32913  #
32914  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32915  # It is also a way to make sure we got the proper file name for the real test later on.
32916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32917  if test "x$test_shortpath" = x; then
32918    # Short path failed, file does not exist as specified.
32919    # Try adding .exe or .cmd
32920    if test -f "${new_path}.exe"; then
32921      input_to_shortpath="${new_path}.exe"
32922    elif test -f "${new_path}.cmd"; then
32923      input_to_shortpath="${new_path}.cmd"
32924    else
32925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32926$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32927      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32928$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32929      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32930    fi
32931  else
32932    input_to_shortpath="$new_path"
32933  fi
32934
32935  # Call helper function which possibly converts this using DOS-style short mode.
32936  # If so, the updated path is stored in $new_path.
32937  new_path="$input_to_shortpath"
32938
32939  input_path="$input_to_shortpath"
32940  # Check if we need to convert this using DOS-style short mode. If the path
32941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32942  # take no chances and rewrite it.
32943  # Note: m4 eats our [], so we need to use [ and ] instead.
32944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32945  if test "x$has_forbidden_chars" != x; then
32946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32950      # Going to short mode and back again did indeed matter. Since short mode is
32951      # case insensitive, let's make it lowercase to improve readability.
32952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32953      # Now convert it back to Unix-stile (cygpath)
32954      input_path=`$CYGPATH -u "$shortmode_path"`
32955      new_path="$input_path"
32956    fi
32957  fi
32958
32959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32960  if test "x$test_cygdrive_prefix" = x; then
32961    # As a simple fix, exclude /usr/bin since it's not a real path.
32962    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32964      # a path prefixed by /cygdrive for fixpath to work.
32965      new_path="$CYGWIN_ROOT_PATH$input_path"
32966    fi
32967  fi
32968
32969  # remove trailing .exe if any
32970  new_path="${new_path/%.exe/}"
32971
32972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32973
32974  # First separate the path from the arguments. This will split at the first
32975  # space.
32976  complete="$AR"
32977  path="${complete%% *}"
32978  tmp="$complete EOL"
32979  arguments="${tmp#* }"
32980
32981  # Input might be given as Windows format, start by converting to
32982  # unix format.
32983  new_path="$path"
32984
32985  windows_path="$new_path"
32986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32987    unix_path=`$CYGPATH -u "$windows_path"`
32988    new_path="$unix_path"
32989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32991    new_path="$unix_path"
32992  fi
32993
32994
32995  # Now try to locate executable using which
32996  new_path=`$WHICH "$new_path" 2> /dev/null`
32997
32998  if test "x$new_path" = x; then
32999    # Oops. Which didn't find the executable.
33000    # The splitting of arguments from the executable at a space might have been incorrect,
33001    # since paths with space are more likely in Windows. Give it another try with the whole
33002    # argument.
33003    path="$complete"
33004    arguments="EOL"
33005    new_path="$path"
33006
33007  windows_path="$new_path"
33008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33009    unix_path=`$CYGPATH -u "$windows_path"`
33010    new_path="$unix_path"
33011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33013    new_path="$unix_path"
33014  fi
33015
33016
33017    new_path=`$WHICH "$new_path" 2> /dev/null`
33018    # bat and cmd files are not always considered executable in MSYS causing which
33019    # to not find them
33020    if test "x$new_path" = x \
33021        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33022        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33023      new_path="$path"
33024
33025  windows_path="$new_path"
33026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33027    unix_path=`$CYGPATH -u "$windows_path"`
33028    new_path="$unix_path"
33029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33031    new_path="$unix_path"
33032  fi
33033
33034    fi
33035
33036    if test "x$new_path" = x; then
33037      # It's still not found. Now this is an unrecoverable error.
33038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33039$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33040      has_space=`$ECHO "$complete" | $GREP " "`
33041      if test "x$has_space" != x; then
33042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33044      fi
33045      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33046    fi
33047  fi
33048
33049  # Now new_path has a complete unix path to the binary
33050  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33051    # Keep paths in /bin as-is, but remove trailing .exe if any
33052    new_path="${new_path/%.exe/}"
33053    # Do not save /bin paths to all_fixpath_prefixes!
33054  else
33055    # Not in mixed or Windows style, start by that.
33056    new_path=`cmd //c echo $new_path`
33057
33058  input_path="$new_path"
33059  # Check if we need to convert this using DOS-style short mode. If the path
33060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33061  # take no chances and rewrite it.
33062  # Note: m4 eats our [], so we need to use [ and ] instead.
33063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33064  if test "x$has_forbidden_chars" != x; then
33065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33067  fi
33068
33069    # Output is in $new_path
33070
33071  windows_path="$new_path"
33072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33073    unix_path=`$CYGPATH -u "$windows_path"`
33074    new_path="$unix_path"
33075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33077    new_path="$unix_path"
33078  fi
33079
33080    # remove trailing .exe if any
33081    new_path="${new_path/%.exe/}"
33082
33083    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33084    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33085  fi
33086
33087  else
33088    # We're on a posix platform. Hooray! :)
33089    # First separate the path from the arguments. This will split at the first
33090    # space.
33091    complete="$AR"
33092    path="${complete%% *}"
33093    tmp="$complete EOL"
33094    arguments="${tmp#* }"
33095
33096    # Cannot rely on the command "which" here since it doesn't always work.
33097    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33098    if test -z "$is_absolute_path"; then
33099      # Path to executable is not absolute. Find it.
33100      IFS_save="$IFS"
33101      IFS=:
33102      for p in $PATH; do
33103        if test -f "$p/$path" && test -x "$p/$path"; then
33104          new_path="$p/$path"
33105          break
33106        fi
33107      done
33108      IFS="$IFS_save"
33109    else
33110      # This is an absolute path, we can use it without further modifications.
33111      new_path="$path"
33112    fi
33113
33114    if test "x$new_path" = x; then
33115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33116$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33117      has_space=`$ECHO "$complete" | $GREP " "`
33118      if test "x$has_space" != x; then
33119        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33120$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33121      fi
33122      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33123    fi
33124  fi
33125
33126  # Now join together the path and the arguments once again
33127  if test "x$arguments" != xEOL; then
33128    new_complete="$new_path ${arguments% *}"
33129  else
33130    new_complete="$new_path"
33131  fi
33132
33133  if test "x$complete" != "x$new_complete"; then
33134    AR="$new_complete"
33135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33136$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33137  fi
33138
33139
33140
33141  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33142    ac_ext=m
33143ac_cpp='$OBJCPP $CPPFLAGS'
33144ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33145ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33146ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33147if test -n "$ac_tool_prefix"; then
33148  for ac_prog in gcc objcc objc cc CC
33149  do
33150    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33151set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33153$as_echo_n "checking for $ac_word... " >&6; }
33154if ${ac_cv_prog_OBJC+:} false; then :
33155  $as_echo_n "(cached) " >&6
33156else
33157  if test -n "$OBJC"; then
33158  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33159else
33160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33161for as_dir in $PATH
33162do
33163  IFS=$as_save_IFS
33164  test -z "$as_dir" && as_dir=.
33165    for ac_exec_ext in '' $ac_executable_extensions; do
33166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33167    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33169    break 2
33170  fi
33171done
33172  done
33173IFS=$as_save_IFS
33174
33175fi
33176fi
33177OBJC=$ac_cv_prog_OBJC
33178if test -n "$OBJC"; then
33179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33180$as_echo "$OBJC" >&6; }
33181else
33182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33183$as_echo "no" >&6; }
33184fi
33185
33186
33187    test -n "$OBJC" && break
33188  done
33189fi
33190if test -z "$OBJC"; then
33191  ac_ct_OBJC=$OBJC
33192  for ac_prog in gcc objcc objc cc CC
33193do
33194  # Extract the first word of "$ac_prog", so it can be a program name with args.
33195set dummy $ac_prog; ac_word=$2
33196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33197$as_echo_n "checking for $ac_word... " >&6; }
33198if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33199  $as_echo_n "(cached) " >&6
33200else
33201  if test -n "$ac_ct_OBJC"; then
33202  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33203else
33204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33205for as_dir in $PATH
33206do
33207  IFS=$as_save_IFS
33208  test -z "$as_dir" && as_dir=.
33209    for ac_exec_ext in '' $ac_executable_extensions; do
33210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33211    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33213    break 2
33214  fi
33215done
33216  done
33217IFS=$as_save_IFS
33218
33219fi
33220fi
33221ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33222if test -n "$ac_ct_OBJC"; then
33223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33224$as_echo "$ac_ct_OBJC" >&6; }
33225else
33226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33227$as_echo "no" >&6; }
33228fi
33229
33230
33231  test -n "$ac_ct_OBJC" && break
33232done
33233
33234  if test "x$ac_ct_OBJC" = x; then
33235    OBJC="gcc"
33236  else
33237    case $cross_compiling:$ac_tool_warned in
33238yes:)
33239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33241ac_tool_warned=yes ;;
33242esac
33243    OBJC=$ac_ct_OBJC
33244  fi
33245fi
33246
33247# Provide some information about the compiler.
33248$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33249set X $ac_compile
33250ac_compiler=$2
33251for ac_option in --version -v -V -qversion; do
33252  { { ac_try="$ac_compiler $ac_option >&5"
33253case "(($ac_try" in
33254  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33255  *) ac_try_echo=$ac_try;;
33256esac
33257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33258$as_echo "$ac_try_echo"; } >&5
33259  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33260  ac_status=$?
33261  if test -s conftest.err; then
33262    sed '10a\
33263... rest of stderr output deleted ...
33264         10q' conftest.err >conftest.er1
33265    cat conftest.er1 >&5
33266  fi
33267  rm -f conftest.er1 conftest.err
33268  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33269  test $ac_status = 0; }
33270done
33271
33272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33273$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33274if ${ac_cv_objc_compiler_gnu+:} false; then :
33275  $as_echo_n "(cached) " >&6
33276else
33277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33278/* end confdefs.h.  */
33279
33280int
33281main ()
33282{
33283#ifndef __GNUC__
33284       choke me
33285#endif
33286
33287  ;
33288  return 0;
33289}
33290_ACEOF
33291if ac_fn_objc_try_compile "$LINENO"; then :
33292  ac_compiler_gnu=yes
33293else
33294  ac_compiler_gnu=no
33295fi
33296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33297ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33298
33299fi
33300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33301$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33302if test $ac_compiler_gnu = yes; then
33303  GOBJC=yes
33304else
33305  GOBJC=
33306fi
33307ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33308ac_save_OBJCFLAGS=$OBJCFLAGS
33309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33310$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33311if ${ac_cv_prog_objc_g+:} false; then :
33312  $as_echo_n "(cached) " >&6
33313else
33314  ac_save_objc_werror_flag=$ac_objc_werror_flag
33315   ac_objc_werror_flag=yes
33316   ac_cv_prog_objc_g=no
33317   OBJCFLAGS="-g"
33318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33319/* end confdefs.h.  */
33320
33321int
33322main ()
33323{
33324
33325  ;
33326  return 0;
33327}
33328_ACEOF
33329if ac_fn_objc_try_compile "$LINENO"; then :
33330  ac_cv_prog_objc_g=yes
33331else
33332  OBJCFLAGS=""
33333      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33334/* end confdefs.h.  */
33335
33336int
33337main ()
33338{
33339
33340  ;
33341  return 0;
33342}
33343_ACEOF
33344if ac_fn_objc_try_compile "$LINENO"; then :
33345
33346else
33347  ac_objc_werror_flag=$ac_save_objc_werror_flag
33348	 OBJCFLAGS="-g"
33349	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33350/* end confdefs.h.  */
33351
33352int
33353main ()
33354{
33355
33356  ;
33357  return 0;
33358}
33359_ACEOF
33360if ac_fn_objc_try_compile "$LINENO"; then :
33361  ac_cv_prog_objc_g=yes
33362fi
33363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33364fi
33365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33366fi
33367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33368   ac_objc_werror_flag=$ac_save_objc_werror_flag
33369fi
33370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33371$as_echo "$ac_cv_prog_objc_g" >&6; }
33372if test "$ac_test_OBJCFLAGS" = set; then
33373  OBJCFLAGS=$ac_save_OBJCFLAGS
33374elif test $ac_cv_prog_objc_g = yes; then
33375  if test "$GOBJC" = yes; then
33376    OBJCFLAGS="-g -O2"
33377  else
33378    OBJCFLAGS="-g"
33379  fi
33380else
33381  if test "$GOBJC" = yes; then
33382    OBJCFLAGS="-O2"
33383  else
33384    OBJCFLAGS=
33385  fi
33386fi
33387ac_ext=cpp
33388ac_cpp='$CXXCPP $CPPFLAGS'
33389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33392
33393
33394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33395
33396  # First separate the path from the arguments. This will split at the first
33397  # space.
33398  complete="$OBJC"
33399  path="${complete%% *}"
33400  tmp="$complete EOL"
33401  arguments="${tmp#* }"
33402
33403  # Input might be given as Windows format, start by converting to
33404  # unix format.
33405  new_path=`$CYGPATH -u "$path"`
33406
33407  # Now try to locate executable using which
33408  new_path=`$WHICH "$new_path" 2> /dev/null`
33409  # bat and cmd files are not always considered executable in cygwin causing which
33410  # to not find them
33411  if test "x$new_path" = x \
33412      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33413      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33414    new_path=`$CYGPATH -u "$path"`
33415  fi
33416  if test "x$new_path" = x; then
33417    # Oops. Which didn't find the executable.
33418    # The splitting of arguments from the executable at a space might have been incorrect,
33419    # since paths with space are more likely in Windows. Give it another try with the whole
33420    # argument.
33421    path="$complete"
33422    arguments="EOL"
33423    new_path=`$CYGPATH -u "$path"`
33424    new_path=`$WHICH "$new_path" 2> /dev/null`
33425    # bat and cmd files are not always considered executable in cygwin causing which
33426    # to not find them
33427    if test "x$new_path" = x \
33428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33430      new_path=`$CYGPATH -u "$path"`
33431    fi
33432    if test "x$new_path" = x; then
33433      # It's still not found. Now this is an unrecoverable error.
33434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33435$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33436      has_space=`$ECHO "$complete" | $GREP " "`
33437      if test "x$has_space" != x; then
33438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33440      fi
33441      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33442    fi
33443  fi
33444
33445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33448  # "foo.exe" is OK but "foo" is an error.
33449  #
33450  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33451  # It is also a way to make sure we got the proper file name for the real test later on.
33452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33453  if test "x$test_shortpath" = x; then
33454    # Short path failed, file does not exist as specified.
33455    # Try adding .exe or .cmd
33456    if test -f "${new_path}.exe"; then
33457      input_to_shortpath="${new_path}.exe"
33458    elif test -f "${new_path}.cmd"; then
33459      input_to_shortpath="${new_path}.cmd"
33460    else
33461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33462$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33465      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33466    fi
33467  else
33468    input_to_shortpath="$new_path"
33469  fi
33470
33471  # Call helper function which possibly converts this using DOS-style short mode.
33472  # If so, the updated path is stored in $new_path.
33473  new_path="$input_to_shortpath"
33474
33475  input_path="$input_to_shortpath"
33476  # Check if we need to convert this using DOS-style short mode. If the path
33477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33478  # take no chances and rewrite it.
33479  # Note: m4 eats our [], so we need to use [ and ] instead.
33480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33481  if test "x$has_forbidden_chars" != x; then
33482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33486      # Going to short mode and back again did indeed matter. Since short mode is
33487      # case insensitive, let's make it lowercase to improve readability.
33488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33489      # Now convert it back to Unix-stile (cygpath)
33490      input_path=`$CYGPATH -u "$shortmode_path"`
33491      new_path="$input_path"
33492    fi
33493  fi
33494
33495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33496  if test "x$test_cygdrive_prefix" = x; then
33497    # As a simple fix, exclude /usr/bin since it's not a real path.
33498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33500      # a path prefixed by /cygdrive for fixpath to work.
33501      new_path="$CYGWIN_ROOT_PATH$input_path"
33502    fi
33503  fi
33504
33505  # remove trailing .exe if any
33506  new_path="${new_path/%.exe/}"
33507
33508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33509
33510  # First separate the path from the arguments. This will split at the first
33511  # space.
33512  complete="$OBJC"
33513  path="${complete%% *}"
33514  tmp="$complete EOL"
33515  arguments="${tmp#* }"
33516
33517  # Input might be given as Windows format, start by converting to
33518  # unix format.
33519  new_path="$path"
33520
33521  windows_path="$new_path"
33522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33523    unix_path=`$CYGPATH -u "$windows_path"`
33524    new_path="$unix_path"
33525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33527    new_path="$unix_path"
33528  fi
33529
33530
33531  # Now try to locate executable using which
33532  new_path=`$WHICH "$new_path" 2> /dev/null`
33533
33534  if test "x$new_path" = x; then
33535    # Oops. Which didn't find the executable.
33536    # The splitting of arguments from the executable at a space might have been incorrect,
33537    # since paths with space are more likely in Windows. Give it another try with the whole
33538    # argument.
33539    path="$complete"
33540    arguments="EOL"
33541    new_path="$path"
33542
33543  windows_path="$new_path"
33544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33545    unix_path=`$CYGPATH -u "$windows_path"`
33546    new_path="$unix_path"
33547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33549    new_path="$unix_path"
33550  fi
33551
33552
33553    new_path=`$WHICH "$new_path" 2> /dev/null`
33554    # bat and cmd files are not always considered executable in MSYS causing which
33555    # to not find them
33556    if test "x$new_path" = x \
33557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33559      new_path="$path"
33560
33561  windows_path="$new_path"
33562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33563    unix_path=`$CYGPATH -u "$windows_path"`
33564    new_path="$unix_path"
33565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33567    new_path="$unix_path"
33568  fi
33569
33570    fi
33571
33572    if test "x$new_path" = x; then
33573      # It's still not found. Now this is an unrecoverable error.
33574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33575$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33576      has_space=`$ECHO "$complete" | $GREP " "`
33577      if test "x$has_space" != x; then
33578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33580      fi
33581      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33582    fi
33583  fi
33584
33585  # Now new_path has a complete unix path to the binary
33586  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33587    # Keep paths in /bin as-is, but remove trailing .exe if any
33588    new_path="${new_path/%.exe/}"
33589    # Do not save /bin paths to all_fixpath_prefixes!
33590  else
33591    # Not in mixed or Windows style, start by that.
33592    new_path=`cmd //c echo $new_path`
33593
33594  input_path="$new_path"
33595  # Check if we need to convert this using DOS-style short mode. If the path
33596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33597  # take no chances and rewrite it.
33598  # Note: m4 eats our [], so we need to use [ and ] instead.
33599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33600  if test "x$has_forbidden_chars" != x; then
33601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33603  fi
33604
33605    # Output is in $new_path
33606
33607  windows_path="$new_path"
33608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33609    unix_path=`$CYGPATH -u "$windows_path"`
33610    new_path="$unix_path"
33611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33613    new_path="$unix_path"
33614  fi
33615
33616    # remove trailing .exe if any
33617    new_path="${new_path/%.exe/}"
33618
33619    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33620    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33621  fi
33622
33623  else
33624    # We're on a posix platform. Hooray! :)
33625    # First separate the path from the arguments. This will split at the first
33626    # space.
33627    complete="$OBJC"
33628    path="${complete%% *}"
33629    tmp="$complete EOL"
33630    arguments="${tmp#* }"
33631
33632    # Cannot rely on the command "which" here since it doesn't always work.
33633    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33634    if test -z "$is_absolute_path"; then
33635      # Path to executable is not absolute. Find it.
33636      IFS_save="$IFS"
33637      IFS=:
33638      for p in $PATH; do
33639        if test -f "$p/$path" && test -x "$p/$path"; then
33640          new_path="$p/$path"
33641          break
33642        fi
33643      done
33644      IFS="$IFS_save"
33645    else
33646      # This is an absolute path, we can use it without further modifications.
33647      new_path="$path"
33648    fi
33649
33650    if test "x$new_path" = x; then
33651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33652$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33653      has_space=`$ECHO "$complete" | $GREP " "`
33654      if test "x$has_space" != x; then
33655        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33656$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33657      fi
33658      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33659    fi
33660  fi
33661
33662  # Now join together the path and the arguments once again
33663  if test "x$arguments" != xEOL; then
33664    new_complete="$new_path ${arguments% *}"
33665  else
33666    new_complete="$new_path"
33667  fi
33668
33669  if test "x$complete" != "x$new_complete"; then
33670    OBJC="$new_complete"
33671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33672$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33673  fi
33674
33675
33676
33677  # Publish this variable in the help.
33678
33679
33680  if test "x$LIPO" = x; then
33681    # The variable is not set by user, try to locate tool using the code snippet
33682    for ac_prog in lipo
33683do
33684  # Extract the first word of "$ac_prog", so it can be a program name with args.
33685set dummy $ac_prog; ac_word=$2
33686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33687$as_echo_n "checking for $ac_word... " >&6; }
33688if ${ac_cv_path_LIPO+:} false; then :
33689  $as_echo_n "(cached) " >&6
33690else
33691  case $LIPO in
33692  [\\/]* | ?:[\\/]*)
33693  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33694  ;;
33695  *)
33696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33697for as_dir in $PATH
33698do
33699  IFS=$as_save_IFS
33700  test -z "$as_dir" && as_dir=.
33701    for ac_exec_ext in '' $ac_executable_extensions; do
33702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33703    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33705    break 2
33706  fi
33707done
33708  done
33709IFS=$as_save_IFS
33710
33711  ;;
33712esac
33713fi
33714LIPO=$ac_cv_path_LIPO
33715if test -n "$LIPO"; then
33716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33717$as_echo "$LIPO" >&6; }
33718else
33719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33720$as_echo "no" >&6; }
33721fi
33722
33723
33724  test -n "$LIPO" && break
33725done
33726
33727  else
33728    # The variable is set, but is it from the command line or the environment?
33729
33730    # Try to remove the string !LIPO! from our list.
33731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33732    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33733      # If it failed, the variable was not from the command line. Ignore it,
33734      # but warn the user (except for BASH, which is always set by the calling BASH).
33735      if test "xLIPO" != xBASH; then
33736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33737$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33738      fi
33739      # Try to locate tool using the code snippet
33740      for ac_prog in lipo
33741do
33742  # Extract the first word of "$ac_prog", so it can be a program name with args.
33743set dummy $ac_prog; ac_word=$2
33744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33745$as_echo_n "checking for $ac_word... " >&6; }
33746if ${ac_cv_path_LIPO+:} false; then :
33747  $as_echo_n "(cached) " >&6
33748else
33749  case $LIPO in
33750  [\\/]* | ?:[\\/]*)
33751  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33752  ;;
33753  *)
33754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33755for as_dir in $PATH
33756do
33757  IFS=$as_save_IFS
33758  test -z "$as_dir" && as_dir=.
33759    for ac_exec_ext in '' $ac_executable_extensions; do
33760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33761    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33763    break 2
33764  fi
33765done
33766  done
33767IFS=$as_save_IFS
33768
33769  ;;
33770esac
33771fi
33772LIPO=$ac_cv_path_LIPO
33773if test -n "$LIPO"; then
33774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33775$as_echo "$LIPO" >&6; }
33776else
33777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33778$as_echo "no" >&6; }
33779fi
33780
33781
33782  test -n "$LIPO" && break
33783done
33784
33785    else
33786      # If it succeeded, then it was overridden by the user. We will use it
33787      # for the tool.
33788
33789      # First remove it from the list of overridden variables, so we can test
33790      # for unknown variables in the end.
33791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33792
33793      # Check if the provided tool contains a complete path.
33794      tool_specified="$LIPO"
33795      tool_basename="${tool_specified##*/}"
33796      if test "x$tool_basename" = "x$tool_specified"; then
33797        # A command without a complete path is provided, search $PATH.
33798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33799$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33800        # Extract the first word of "$tool_basename", so it can be a program name with args.
33801set dummy $tool_basename; ac_word=$2
33802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33803$as_echo_n "checking for $ac_word... " >&6; }
33804if ${ac_cv_path_LIPO+:} false; then :
33805  $as_echo_n "(cached) " >&6
33806else
33807  case $LIPO in
33808  [\\/]* | ?:[\\/]*)
33809  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33810  ;;
33811  *)
33812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33813for as_dir in $PATH
33814do
33815  IFS=$as_save_IFS
33816  test -z "$as_dir" && as_dir=.
33817    for ac_exec_ext in '' $ac_executable_extensions; do
33818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33819    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821    break 2
33822  fi
33823done
33824  done
33825IFS=$as_save_IFS
33826
33827  ;;
33828esac
33829fi
33830LIPO=$ac_cv_path_LIPO
33831if test -n "$LIPO"; then
33832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33833$as_echo "$LIPO" >&6; }
33834else
33835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33836$as_echo "no" >&6; }
33837fi
33838
33839
33840        if test "x$LIPO" = x; then
33841          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33842        fi
33843      else
33844        # Otherwise we believe it is a complete path. Use it as it is.
33845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33846$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33848$as_echo_n "checking for LIPO... " >&6; }
33849        if test ! -x "$tool_specified"; then
33850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33851$as_echo "not found" >&6; }
33852          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33853        fi
33854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33855$as_echo "$tool_specified" >&6; }
33856      fi
33857    fi
33858  fi
33859
33860
33861
33862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33863
33864  # First separate the path from the arguments. This will split at the first
33865  # space.
33866  complete="$LIPO"
33867  path="${complete%% *}"
33868  tmp="$complete EOL"
33869  arguments="${tmp#* }"
33870
33871  # Input might be given as Windows format, start by converting to
33872  # unix format.
33873  new_path=`$CYGPATH -u "$path"`
33874
33875  # Now try to locate executable using which
33876  new_path=`$WHICH "$new_path" 2> /dev/null`
33877  # bat and cmd files are not always considered executable in cygwin causing which
33878  # to not find them
33879  if test "x$new_path" = x \
33880      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33881      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33882    new_path=`$CYGPATH -u "$path"`
33883  fi
33884  if test "x$new_path" = x; then
33885    # Oops. Which didn't find the executable.
33886    # The splitting of arguments from the executable at a space might have been incorrect,
33887    # since paths with space are more likely in Windows. Give it another try with the whole
33888    # argument.
33889    path="$complete"
33890    arguments="EOL"
33891    new_path=`$CYGPATH -u "$path"`
33892    new_path=`$WHICH "$new_path" 2> /dev/null`
33893    # bat and cmd files are not always considered executable in cygwin causing which
33894    # to not find them
33895    if test "x$new_path" = x \
33896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33898      new_path=`$CYGPATH -u "$path"`
33899    fi
33900    if test "x$new_path" = x; then
33901      # It's still not found. Now this is an unrecoverable error.
33902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33903$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33904      has_space=`$ECHO "$complete" | $GREP " "`
33905      if test "x$has_space" != x; then
33906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33908      fi
33909      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33910    fi
33911  fi
33912
33913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33916  # "foo.exe" is OK but "foo" is an error.
33917  #
33918  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33919  # It is also a way to make sure we got the proper file name for the real test later on.
33920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33921  if test "x$test_shortpath" = x; then
33922    # Short path failed, file does not exist as specified.
33923    # Try adding .exe or .cmd
33924    if test -f "${new_path}.exe"; then
33925      input_to_shortpath="${new_path}.exe"
33926    elif test -f "${new_path}.cmd"; then
33927      input_to_shortpath="${new_path}.cmd"
33928    else
33929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33930$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33931      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33932$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33933      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33934    fi
33935  else
33936    input_to_shortpath="$new_path"
33937  fi
33938
33939  # Call helper function which possibly converts this using DOS-style short mode.
33940  # If so, the updated path is stored in $new_path.
33941  new_path="$input_to_shortpath"
33942
33943  input_path="$input_to_shortpath"
33944  # Check if we need to convert this using DOS-style short mode. If the path
33945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33946  # take no chances and rewrite it.
33947  # Note: m4 eats our [], so we need to use [ and ] instead.
33948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33949  if test "x$has_forbidden_chars" != x; then
33950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33954      # Going to short mode and back again did indeed matter. Since short mode is
33955      # case insensitive, let's make it lowercase to improve readability.
33956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33957      # Now convert it back to Unix-stile (cygpath)
33958      input_path=`$CYGPATH -u "$shortmode_path"`
33959      new_path="$input_path"
33960    fi
33961  fi
33962
33963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33964  if test "x$test_cygdrive_prefix" = x; then
33965    # As a simple fix, exclude /usr/bin since it's not a real path.
33966    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33968      # a path prefixed by /cygdrive for fixpath to work.
33969      new_path="$CYGWIN_ROOT_PATH$input_path"
33970    fi
33971  fi
33972
33973  # remove trailing .exe if any
33974  new_path="${new_path/%.exe/}"
33975
33976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33977
33978  # First separate the path from the arguments. This will split at the first
33979  # space.
33980  complete="$LIPO"
33981  path="${complete%% *}"
33982  tmp="$complete EOL"
33983  arguments="${tmp#* }"
33984
33985  # Input might be given as Windows format, start by converting to
33986  # unix format.
33987  new_path="$path"
33988
33989  windows_path="$new_path"
33990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33991    unix_path=`$CYGPATH -u "$windows_path"`
33992    new_path="$unix_path"
33993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33995    new_path="$unix_path"
33996  fi
33997
33998
33999  # Now try to locate executable using which
34000  new_path=`$WHICH "$new_path" 2> /dev/null`
34001
34002  if test "x$new_path" = x; then
34003    # Oops. Which didn't find the executable.
34004    # The splitting of arguments from the executable at a space might have been incorrect,
34005    # since paths with space are more likely in Windows. Give it another try with the whole
34006    # argument.
34007    path="$complete"
34008    arguments="EOL"
34009    new_path="$path"
34010
34011  windows_path="$new_path"
34012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34013    unix_path=`$CYGPATH -u "$windows_path"`
34014    new_path="$unix_path"
34015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34017    new_path="$unix_path"
34018  fi
34019
34020
34021    new_path=`$WHICH "$new_path" 2> /dev/null`
34022    # bat and cmd files are not always considered executable in MSYS causing which
34023    # to not find them
34024    if test "x$new_path" = x \
34025        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34026        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34027      new_path="$path"
34028
34029  windows_path="$new_path"
34030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34031    unix_path=`$CYGPATH -u "$windows_path"`
34032    new_path="$unix_path"
34033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34035    new_path="$unix_path"
34036  fi
34037
34038    fi
34039
34040    if test "x$new_path" = x; then
34041      # It's still not found. Now this is an unrecoverable error.
34042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34043$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34044      has_space=`$ECHO "$complete" | $GREP " "`
34045      if test "x$has_space" != x; then
34046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34048      fi
34049      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34050    fi
34051  fi
34052
34053  # Now new_path has a complete unix path to the binary
34054  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34055    # Keep paths in /bin as-is, but remove trailing .exe if any
34056    new_path="${new_path/%.exe/}"
34057    # Do not save /bin paths to all_fixpath_prefixes!
34058  else
34059    # Not in mixed or Windows style, start by that.
34060    new_path=`cmd //c echo $new_path`
34061
34062  input_path="$new_path"
34063  # Check if we need to convert this using DOS-style short mode. If the path
34064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34065  # take no chances and rewrite it.
34066  # Note: m4 eats our [], so we need to use [ and ] instead.
34067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34068  if test "x$has_forbidden_chars" != x; then
34069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34071  fi
34072
34073    # Output is in $new_path
34074
34075  windows_path="$new_path"
34076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34077    unix_path=`$CYGPATH -u "$windows_path"`
34078    new_path="$unix_path"
34079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34081    new_path="$unix_path"
34082  fi
34083
34084    # remove trailing .exe if any
34085    new_path="${new_path/%.exe/}"
34086
34087    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34088    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34089  fi
34090
34091  else
34092    # We're on a posix platform. Hooray! :)
34093    # First separate the path from the arguments. This will split at the first
34094    # space.
34095    complete="$LIPO"
34096    path="${complete%% *}"
34097    tmp="$complete EOL"
34098    arguments="${tmp#* }"
34099
34100    # Cannot rely on the command "which" here since it doesn't always work.
34101    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34102    if test -z "$is_absolute_path"; then
34103      # Path to executable is not absolute. Find it.
34104      IFS_save="$IFS"
34105      IFS=:
34106      for p in $PATH; do
34107        if test -f "$p/$path" && test -x "$p/$path"; then
34108          new_path="$p/$path"
34109          break
34110        fi
34111      done
34112      IFS="$IFS_save"
34113    else
34114      # This is an absolute path, we can use it without further modifications.
34115      new_path="$path"
34116    fi
34117
34118    if test "x$new_path" = x; then
34119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34120$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34121      has_space=`$ECHO "$complete" | $GREP " "`
34122      if test "x$has_space" != x; then
34123        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34124$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34125      fi
34126      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34127    fi
34128  fi
34129
34130  # Now join together the path and the arguments once again
34131  if test "x$arguments" != xEOL; then
34132    new_complete="$new_path ${arguments% *}"
34133  else
34134    new_complete="$new_path"
34135  fi
34136
34137  if test "x$complete" != "x$new_complete"; then
34138    LIPO="$new_complete"
34139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34140$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34141  fi
34142
34143  else
34144    OBJC=
34145  fi
34146
34147  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34148    # Extract the first word of "mt", so it can be a program name with args.
34149set dummy mt; ac_word=$2
34150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34151$as_echo_n "checking for $ac_word... " >&6; }
34152if ${ac_cv_prog_MT+:} false; then :
34153  $as_echo_n "(cached) " >&6
34154else
34155  if test -n "$MT"; then
34156  ac_cv_prog_MT="$MT" # Let the user override the test.
34157else
34158  ac_prog_rejected=no
34159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34160for as_dir in $PATH
34161do
34162  IFS=$as_save_IFS
34163  test -z "$as_dir" && as_dir=.
34164    for ac_exec_ext in '' $ac_executable_extensions; do
34165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34166    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34167       ac_prog_rejected=yes
34168       continue
34169     fi
34170    ac_cv_prog_MT="mt"
34171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34172    break 2
34173  fi
34174done
34175  done
34176IFS=$as_save_IFS
34177
34178if test $ac_prog_rejected = yes; then
34179  # We found a bogon in the path, so make sure we never use it.
34180  set dummy $ac_cv_prog_MT
34181  shift
34182  if test $# != 0; then
34183    # We chose a different compiler from the bogus one.
34184    # However, it has the same basename, so the bogon will be chosen
34185    # first if we set MT to just the basename; use the full file name.
34186    shift
34187    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34188  fi
34189fi
34190fi
34191fi
34192MT=$ac_cv_prog_MT
34193if test -n "$MT"; then
34194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34195$as_echo "$MT" >&6; }
34196else
34197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34198$as_echo "no" >&6; }
34199fi
34200
34201
34202
34203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34204
34205  # First separate the path from the arguments. This will split at the first
34206  # space.
34207  complete="$MT"
34208  path="${complete%% *}"
34209  tmp="$complete EOL"
34210  arguments="${tmp#* }"
34211
34212  # Input might be given as Windows format, start by converting to
34213  # unix format.
34214  new_path=`$CYGPATH -u "$path"`
34215
34216  # Now try to locate executable using which
34217  new_path=`$WHICH "$new_path" 2> /dev/null`
34218  # bat and cmd files are not always considered executable in cygwin causing which
34219  # to not find them
34220  if test "x$new_path" = x \
34221      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34222      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34223    new_path=`$CYGPATH -u "$path"`
34224  fi
34225  if test "x$new_path" = x; then
34226    # Oops. Which didn't find the executable.
34227    # The splitting of arguments from the executable at a space might have been incorrect,
34228    # since paths with space are more likely in Windows. Give it another try with the whole
34229    # argument.
34230    path="$complete"
34231    arguments="EOL"
34232    new_path=`$CYGPATH -u "$path"`
34233    new_path=`$WHICH "$new_path" 2> /dev/null`
34234    # bat and cmd files are not always considered executable in cygwin causing which
34235    # to not find them
34236    if test "x$new_path" = x \
34237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34239      new_path=`$CYGPATH -u "$path"`
34240    fi
34241    if test "x$new_path" = x; then
34242      # It's still not found. Now this is an unrecoverable error.
34243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34244$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34245      has_space=`$ECHO "$complete" | $GREP " "`
34246      if test "x$has_space" != x; then
34247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34249      fi
34250      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34251    fi
34252  fi
34253
34254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34257  # "foo.exe" is OK but "foo" is an error.
34258  #
34259  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34260  # It is also a way to make sure we got the proper file name for the real test later on.
34261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34262  if test "x$test_shortpath" = x; then
34263    # Short path failed, file does not exist as specified.
34264    # Try adding .exe or .cmd
34265    if test -f "${new_path}.exe"; then
34266      input_to_shortpath="${new_path}.exe"
34267    elif test -f "${new_path}.cmd"; then
34268      input_to_shortpath="${new_path}.cmd"
34269    else
34270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34271$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34274      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34275    fi
34276  else
34277    input_to_shortpath="$new_path"
34278  fi
34279
34280  # Call helper function which possibly converts this using DOS-style short mode.
34281  # If so, the updated path is stored in $new_path.
34282  new_path="$input_to_shortpath"
34283
34284  input_path="$input_to_shortpath"
34285  # Check if we need to convert this using DOS-style short mode. If the path
34286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34287  # take no chances and rewrite it.
34288  # Note: m4 eats our [], so we need to use [ and ] instead.
34289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34290  if test "x$has_forbidden_chars" != x; then
34291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34295      # Going to short mode and back again did indeed matter. Since short mode is
34296      # case insensitive, let's make it lowercase to improve readability.
34297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34298      # Now convert it back to Unix-stile (cygpath)
34299      input_path=`$CYGPATH -u "$shortmode_path"`
34300      new_path="$input_path"
34301    fi
34302  fi
34303
34304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34305  if test "x$test_cygdrive_prefix" = x; then
34306    # As a simple fix, exclude /usr/bin since it's not a real path.
34307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34309      # a path prefixed by /cygdrive for fixpath to work.
34310      new_path="$CYGWIN_ROOT_PATH$input_path"
34311    fi
34312  fi
34313
34314  # remove trailing .exe if any
34315  new_path="${new_path/%.exe/}"
34316
34317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34318
34319  # First separate the path from the arguments. This will split at the first
34320  # space.
34321  complete="$MT"
34322  path="${complete%% *}"
34323  tmp="$complete EOL"
34324  arguments="${tmp#* }"
34325
34326  # Input might be given as Windows format, start by converting to
34327  # unix format.
34328  new_path="$path"
34329
34330  windows_path="$new_path"
34331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34332    unix_path=`$CYGPATH -u "$windows_path"`
34333    new_path="$unix_path"
34334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34336    new_path="$unix_path"
34337  fi
34338
34339
34340  # Now try to locate executable using which
34341  new_path=`$WHICH "$new_path" 2> /dev/null`
34342
34343  if test "x$new_path" = x; then
34344    # Oops. Which didn't find the executable.
34345    # The splitting of arguments from the executable at a space might have been incorrect,
34346    # since paths with space are more likely in Windows. Give it another try with the whole
34347    # argument.
34348    path="$complete"
34349    arguments="EOL"
34350    new_path="$path"
34351
34352  windows_path="$new_path"
34353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34354    unix_path=`$CYGPATH -u "$windows_path"`
34355    new_path="$unix_path"
34356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34358    new_path="$unix_path"
34359  fi
34360
34361
34362    new_path=`$WHICH "$new_path" 2> /dev/null`
34363    # bat and cmd files are not always considered executable in MSYS causing which
34364    # to not find them
34365    if test "x$new_path" = x \
34366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34368      new_path="$path"
34369
34370  windows_path="$new_path"
34371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34372    unix_path=`$CYGPATH -u "$windows_path"`
34373    new_path="$unix_path"
34374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34376    new_path="$unix_path"
34377  fi
34378
34379    fi
34380
34381    if test "x$new_path" = x; then
34382      # It's still not found. Now this is an unrecoverable error.
34383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34384$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34385      has_space=`$ECHO "$complete" | $GREP " "`
34386      if test "x$has_space" != x; then
34387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34389      fi
34390      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34391    fi
34392  fi
34393
34394  # Now new_path has a complete unix path to the binary
34395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34396    # Keep paths in /bin as-is, but remove trailing .exe if any
34397    new_path="${new_path/%.exe/}"
34398    # Do not save /bin paths to all_fixpath_prefixes!
34399  else
34400    # Not in mixed or Windows style, start by that.
34401    new_path=`cmd //c echo $new_path`
34402
34403  input_path="$new_path"
34404  # Check if we need to convert this using DOS-style short mode. If the path
34405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34406  # take no chances and rewrite it.
34407  # Note: m4 eats our [], so we need to use [ and ] instead.
34408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34409  if test "x$has_forbidden_chars" != x; then
34410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34412  fi
34413
34414    # Output is in $new_path
34415
34416  windows_path="$new_path"
34417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34418    unix_path=`$CYGPATH -u "$windows_path"`
34419    new_path="$unix_path"
34420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34422    new_path="$unix_path"
34423  fi
34424
34425    # remove trailing .exe if any
34426    new_path="${new_path/%.exe/}"
34427
34428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34430  fi
34431
34432  else
34433    # We're on a posix platform. Hooray! :)
34434    # First separate the path from the arguments. This will split at the first
34435    # space.
34436    complete="$MT"
34437    path="${complete%% *}"
34438    tmp="$complete EOL"
34439    arguments="${tmp#* }"
34440
34441    # Cannot rely on the command "which" here since it doesn't always work.
34442    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34443    if test -z "$is_absolute_path"; then
34444      # Path to executable is not absolute. Find it.
34445      IFS_save="$IFS"
34446      IFS=:
34447      for p in $PATH; do
34448        if test -f "$p/$path" && test -x "$p/$path"; then
34449          new_path="$p/$path"
34450          break
34451        fi
34452      done
34453      IFS="$IFS_save"
34454    else
34455      # This is an absolute path, we can use it without further modifications.
34456      new_path="$path"
34457    fi
34458
34459    if test "x$new_path" = x; then
34460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34461$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34462      has_space=`$ECHO "$complete" | $GREP " "`
34463      if test "x$has_space" != x; then
34464        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34465$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34466      fi
34467      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34468    fi
34469  fi
34470
34471  # Now join together the path and the arguments once again
34472  if test "x$arguments" != xEOL; then
34473    new_complete="$new_path ${arguments% *}"
34474  else
34475    new_complete="$new_path"
34476  fi
34477
34478  if test "x$complete" != "x$new_complete"; then
34479    MT="$new_complete"
34480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34481$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34482  fi
34483
34484    # Setup the resource compiler (RC)
34485    # Extract the first word of "rc", so it can be a program name with args.
34486set dummy rc; ac_word=$2
34487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34488$as_echo_n "checking for $ac_word... " >&6; }
34489if ${ac_cv_prog_RC+:} false; then :
34490  $as_echo_n "(cached) " >&6
34491else
34492  if test -n "$RC"; then
34493  ac_cv_prog_RC="$RC" # Let the user override the test.
34494else
34495  ac_prog_rejected=no
34496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34497for as_dir in $PATH
34498do
34499  IFS=$as_save_IFS
34500  test -z "$as_dir" && as_dir=.
34501    for ac_exec_ext in '' $ac_executable_extensions; do
34502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34503    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34504       ac_prog_rejected=yes
34505       continue
34506     fi
34507    ac_cv_prog_RC="rc"
34508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34509    break 2
34510  fi
34511done
34512  done
34513IFS=$as_save_IFS
34514
34515if test $ac_prog_rejected = yes; then
34516  # We found a bogon in the path, so make sure we never use it.
34517  set dummy $ac_cv_prog_RC
34518  shift
34519  if test $# != 0; then
34520    # We chose a different compiler from the bogus one.
34521    # However, it has the same basename, so the bogon will be chosen
34522    # first if we set RC to just the basename; use the full file name.
34523    shift
34524    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34525  fi
34526fi
34527fi
34528fi
34529RC=$ac_cv_prog_RC
34530if test -n "$RC"; then
34531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34532$as_echo "$RC" >&6; }
34533else
34534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34535$as_echo "no" >&6; }
34536fi
34537
34538
34539
34540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34541
34542  # First separate the path from the arguments. This will split at the first
34543  # space.
34544  complete="$RC"
34545  path="${complete%% *}"
34546  tmp="$complete EOL"
34547  arguments="${tmp#* }"
34548
34549  # Input might be given as Windows format, start by converting to
34550  # unix format.
34551  new_path=`$CYGPATH -u "$path"`
34552
34553  # Now try to locate executable using which
34554  new_path=`$WHICH "$new_path" 2> /dev/null`
34555  # bat and cmd files are not always considered executable in cygwin causing which
34556  # to not find them
34557  if test "x$new_path" = x \
34558      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34559      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34560    new_path=`$CYGPATH -u "$path"`
34561  fi
34562  if test "x$new_path" = x; then
34563    # Oops. Which didn't find the executable.
34564    # The splitting of arguments from the executable at a space might have been incorrect,
34565    # since paths with space are more likely in Windows. Give it another try with the whole
34566    # argument.
34567    path="$complete"
34568    arguments="EOL"
34569    new_path=`$CYGPATH -u "$path"`
34570    new_path=`$WHICH "$new_path" 2> /dev/null`
34571    # bat and cmd files are not always considered executable in cygwin causing which
34572    # to not find them
34573    if test "x$new_path" = x \
34574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34576      new_path=`$CYGPATH -u "$path"`
34577    fi
34578    if test "x$new_path" = x; then
34579      # It's still not found. Now this is an unrecoverable error.
34580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34581$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34582      has_space=`$ECHO "$complete" | $GREP " "`
34583      if test "x$has_space" != x; then
34584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34586      fi
34587      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34588    fi
34589  fi
34590
34591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34594  # "foo.exe" is OK but "foo" is an error.
34595  #
34596  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34597  # It is also a way to make sure we got the proper file name for the real test later on.
34598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34599  if test "x$test_shortpath" = x; then
34600    # Short path failed, file does not exist as specified.
34601    # Try adding .exe or .cmd
34602    if test -f "${new_path}.exe"; then
34603      input_to_shortpath="${new_path}.exe"
34604    elif test -f "${new_path}.cmd"; then
34605      input_to_shortpath="${new_path}.cmd"
34606    else
34607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34608$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34611      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34612    fi
34613  else
34614    input_to_shortpath="$new_path"
34615  fi
34616
34617  # Call helper function which possibly converts this using DOS-style short mode.
34618  # If so, the updated path is stored in $new_path.
34619  new_path="$input_to_shortpath"
34620
34621  input_path="$input_to_shortpath"
34622  # Check if we need to convert this using DOS-style short mode. If the path
34623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34624  # take no chances and rewrite it.
34625  # Note: m4 eats our [], so we need to use [ and ] instead.
34626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34627  if test "x$has_forbidden_chars" != x; then
34628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34632      # Going to short mode and back again did indeed matter. Since short mode is
34633      # case insensitive, let's make it lowercase to improve readability.
34634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34635      # Now convert it back to Unix-stile (cygpath)
34636      input_path=`$CYGPATH -u "$shortmode_path"`
34637      new_path="$input_path"
34638    fi
34639  fi
34640
34641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34642  if test "x$test_cygdrive_prefix" = x; then
34643    # As a simple fix, exclude /usr/bin since it's not a real path.
34644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34646      # a path prefixed by /cygdrive for fixpath to work.
34647      new_path="$CYGWIN_ROOT_PATH$input_path"
34648    fi
34649  fi
34650
34651  # remove trailing .exe if any
34652  new_path="${new_path/%.exe/}"
34653
34654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34655
34656  # First separate the path from the arguments. This will split at the first
34657  # space.
34658  complete="$RC"
34659  path="${complete%% *}"
34660  tmp="$complete EOL"
34661  arguments="${tmp#* }"
34662
34663  # Input might be given as Windows format, start by converting to
34664  # unix format.
34665  new_path="$path"
34666
34667  windows_path="$new_path"
34668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34669    unix_path=`$CYGPATH -u "$windows_path"`
34670    new_path="$unix_path"
34671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34673    new_path="$unix_path"
34674  fi
34675
34676
34677  # Now try to locate executable using which
34678  new_path=`$WHICH "$new_path" 2> /dev/null`
34679
34680  if test "x$new_path" = x; then
34681    # Oops. Which didn't find the executable.
34682    # The splitting of arguments from the executable at a space might have been incorrect,
34683    # since paths with space are more likely in Windows. Give it another try with the whole
34684    # argument.
34685    path="$complete"
34686    arguments="EOL"
34687    new_path="$path"
34688
34689  windows_path="$new_path"
34690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34691    unix_path=`$CYGPATH -u "$windows_path"`
34692    new_path="$unix_path"
34693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34695    new_path="$unix_path"
34696  fi
34697
34698
34699    new_path=`$WHICH "$new_path" 2> /dev/null`
34700    # bat and cmd files are not always considered executable in MSYS causing which
34701    # to not find them
34702    if test "x$new_path" = x \
34703        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34704        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34705      new_path="$path"
34706
34707  windows_path="$new_path"
34708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34709    unix_path=`$CYGPATH -u "$windows_path"`
34710    new_path="$unix_path"
34711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34713    new_path="$unix_path"
34714  fi
34715
34716    fi
34717
34718    if test "x$new_path" = x; then
34719      # It's still not found. Now this is an unrecoverable error.
34720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34721$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34722      has_space=`$ECHO "$complete" | $GREP " "`
34723      if test "x$has_space" != x; then
34724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34726      fi
34727      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34728    fi
34729  fi
34730
34731  # Now new_path has a complete unix path to the binary
34732  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34733    # Keep paths in /bin as-is, but remove trailing .exe if any
34734    new_path="${new_path/%.exe/}"
34735    # Do not save /bin paths to all_fixpath_prefixes!
34736  else
34737    # Not in mixed or Windows style, start by that.
34738    new_path=`cmd //c echo $new_path`
34739
34740  input_path="$new_path"
34741  # Check if we need to convert this using DOS-style short mode. If the path
34742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34743  # take no chances and rewrite it.
34744  # Note: m4 eats our [], so we need to use [ and ] instead.
34745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34746  if test "x$has_forbidden_chars" != x; then
34747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34749  fi
34750
34751    # Output is in $new_path
34752
34753  windows_path="$new_path"
34754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34755    unix_path=`$CYGPATH -u "$windows_path"`
34756    new_path="$unix_path"
34757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34759    new_path="$unix_path"
34760  fi
34761
34762    # remove trailing .exe if any
34763    new_path="${new_path/%.exe/}"
34764
34765    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34766    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34767  fi
34768
34769  else
34770    # We're on a posix platform. Hooray! :)
34771    # First separate the path from the arguments. This will split at the first
34772    # space.
34773    complete="$RC"
34774    path="${complete%% *}"
34775    tmp="$complete EOL"
34776    arguments="${tmp#* }"
34777
34778    # Cannot rely on the command "which" here since it doesn't always work.
34779    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34780    if test -z "$is_absolute_path"; then
34781      # Path to executable is not absolute. Find it.
34782      IFS_save="$IFS"
34783      IFS=:
34784      for p in $PATH; do
34785        if test -f "$p/$path" && test -x "$p/$path"; then
34786          new_path="$p/$path"
34787          break
34788        fi
34789      done
34790      IFS="$IFS_save"
34791    else
34792      # This is an absolute path, we can use it without further modifications.
34793      new_path="$path"
34794    fi
34795
34796    if test "x$new_path" = x; then
34797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34798$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34799      has_space=`$ECHO "$complete" | $GREP " "`
34800      if test "x$has_space" != x; then
34801        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34802$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34803      fi
34804      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34805    fi
34806  fi
34807
34808  # Now join together the path and the arguments once again
34809  if test "x$arguments" != xEOL; then
34810    new_complete="$new_path ${arguments% *}"
34811  else
34812    new_complete="$new_path"
34813  fi
34814
34815  if test "x$complete" != "x$new_complete"; then
34816    RC="$new_complete"
34817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34818$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34819  fi
34820
34821    # Extract the first word of "dumpbin", so it can be a program name with args.
34822set dummy dumpbin; ac_word=$2
34823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34824$as_echo_n "checking for $ac_word... " >&6; }
34825if ${ac_cv_prog_DUMPBIN+:} false; then :
34826  $as_echo_n "(cached) " >&6
34827else
34828  if test -n "$DUMPBIN"; then
34829  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34830else
34831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34832for as_dir in $PATH
34833do
34834  IFS=$as_save_IFS
34835  test -z "$as_dir" && as_dir=.
34836    for ac_exec_ext in '' $ac_executable_extensions; do
34837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34838    ac_cv_prog_DUMPBIN="dumpbin"
34839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34840    break 2
34841  fi
34842done
34843  done
34844IFS=$as_save_IFS
34845
34846fi
34847fi
34848DUMPBIN=$ac_cv_prog_DUMPBIN
34849if test -n "$DUMPBIN"; then
34850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34851$as_echo "$DUMPBIN" >&6; }
34852else
34853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34854$as_echo "no" >&6; }
34855fi
34856
34857
34858
34859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34860
34861  # First separate the path from the arguments. This will split at the first
34862  # space.
34863  complete="$DUMPBIN"
34864  path="${complete%% *}"
34865  tmp="$complete EOL"
34866  arguments="${tmp#* }"
34867
34868  # Input might be given as Windows format, start by converting to
34869  # unix format.
34870  new_path=`$CYGPATH -u "$path"`
34871
34872  # Now try to locate executable using which
34873  new_path=`$WHICH "$new_path" 2> /dev/null`
34874  # bat and cmd files are not always considered executable in cygwin causing which
34875  # to not find them
34876  if test "x$new_path" = x \
34877      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34878      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34879    new_path=`$CYGPATH -u "$path"`
34880  fi
34881  if test "x$new_path" = x; then
34882    # Oops. Which didn't find the executable.
34883    # The splitting of arguments from the executable at a space might have been incorrect,
34884    # since paths with space are more likely in Windows. Give it another try with the whole
34885    # argument.
34886    path="$complete"
34887    arguments="EOL"
34888    new_path=`$CYGPATH -u "$path"`
34889    new_path=`$WHICH "$new_path" 2> /dev/null`
34890    # bat and cmd files are not always considered executable in cygwin causing which
34891    # to not find them
34892    if test "x$new_path" = x \
34893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34895      new_path=`$CYGPATH -u "$path"`
34896    fi
34897    if test "x$new_path" = x; then
34898      # It's still not found. Now this is an unrecoverable error.
34899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34900$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34901      has_space=`$ECHO "$complete" | $GREP " "`
34902      if test "x$has_space" != x; then
34903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34905      fi
34906      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34907    fi
34908  fi
34909
34910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34913  # "foo.exe" is OK but "foo" is an error.
34914  #
34915  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34916  # It is also a way to make sure we got the proper file name for the real test later on.
34917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34918  if test "x$test_shortpath" = x; then
34919    # Short path failed, file does not exist as specified.
34920    # Try adding .exe or .cmd
34921    if test -f "${new_path}.exe"; then
34922      input_to_shortpath="${new_path}.exe"
34923    elif test -f "${new_path}.cmd"; then
34924      input_to_shortpath="${new_path}.cmd"
34925    else
34926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34927$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34928      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34929$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34930      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34931    fi
34932  else
34933    input_to_shortpath="$new_path"
34934  fi
34935
34936  # Call helper function which possibly converts this using DOS-style short mode.
34937  # If so, the updated path is stored in $new_path.
34938  new_path="$input_to_shortpath"
34939
34940  input_path="$input_to_shortpath"
34941  # Check if we need to convert this using DOS-style short mode. If the path
34942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34943  # take no chances and rewrite it.
34944  # Note: m4 eats our [], so we need to use [ and ] instead.
34945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34946  if test "x$has_forbidden_chars" != x; then
34947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34951      # Going to short mode and back again did indeed matter. Since short mode is
34952      # case insensitive, let's make it lowercase to improve readability.
34953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34954      # Now convert it back to Unix-stile (cygpath)
34955      input_path=`$CYGPATH -u "$shortmode_path"`
34956      new_path="$input_path"
34957    fi
34958  fi
34959
34960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34961  if test "x$test_cygdrive_prefix" = x; then
34962    # As a simple fix, exclude /usr/bin since it's not a real path.
34963    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34965      # a path prefixed by /cygdrive for fixpath to work.
34966      new_path="$CYGWIN_ROOT_PATH$input_path"
34967    fi
34968  fi
34969
34970  # remove trailing .exe if any
34971  new_path="${new_path/%.exe/}"
34972
34973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34974
34975  # First separate the path from the arguments. This will split at the first
34976  # space.
34977  complete="$DUMPBIN"
34978  path="${complete%% *}"
34979  tmp="$complete EOL"
34980  arguments="${tmp#* }"
34981
34982  # Input might be given as Windows format, start by converting to
34983  # unix format.
34984  new_path="$path"
34985
34986  windows_path="$new_path"
34987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34988    unix_path=`$CYGPATH -u "$windows_path"`
34989    new_path="$unix_path"
34990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34992    new_path="$unix_path"
34993  fi
34994
34995
34996  # Now try to locate executable using which
34997  new_path=`$WHICH "$new_path" 2> /dev/null`
34998
34999  if test "x$new_path" = x; then
35000    # Oops. Which didn't find the executable.
35001    # The splitting of arguments from the executable at a space might have been incorrect,
35002    # since paths with space are more likely in Windows. Give it another try with the whole
35003    # argument.
35004    path="$complete"
35005    arguments="EOL"
35006    new_path="$path"
35007
35008  windows_path="$new_path"
35009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35010    unix_path=`$CYGPATH -u "$windows_path"`
35011    new_path="$unix_path"
35012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35014    new_path="$unix_path"
35015  fi
35016
35017
35018    new_path=`$WHICH "$new_path" 2> /dev/null`
35019    # bat and cmd files are not always considered executable in MSYS causing which
35020    # to not find them
35021    if test "x$new_path" = x \
35022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35024      new_path="$path"
35025
35026  windows_path="$new_path"
35027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35028    unix_path=`$CYGPATH -u "$windows_path"`
35029    new_path="$unix_path"
35030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35032    new_path="$unix_path"
35033  fi
35034
35035    fi
35036
35037    if test "x$new_path" = x; then
35038      # It's still not found. Now this is an unrecoverable error.
35039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35040$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35041      has_space=`$ECHO "$complete" | $GREP " "`
35042      if test "x$has_space" != x; then
35043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35045      fi
35046      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35047    fi
35048  fi
35049
35050  # Now new_path has a complete unix path to the binary
35051  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35052    # Keep paths in /bin as-is, but remove trailing .exe if any
35053    new_path="${new_path/%.exe/}"
35054    # Do not save /bin paths to all_fixpath_prefixes!
35055  else
35056    # Not in mixed or Windows style, start by that.
35057    new_path=`cmd //c echo $new_path`
35058
35059  input_path="$new_path"
35060  # Check if we need to convert this using DOS-style short mode. If the path
35061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35062  # take no chances and rewrite it.
35063  # Note: m4 eats our [], so we need to use [ and ] instead.
35064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35065  if test "x$has_forbidden_chars" != x; then
35066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35068  fi
35069
35070    # Output is in $new_path
35071
35072  windows_path="$new_path"
35073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35074    unix_path=`$CYGPATH -u "$windows_path"`
35075    new_path="$unix_path"
35076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35078    new_path="$unix_path"
35079  fi
35080
35081    # remove trailing .exe if any
35082    new_path="${new_path/%.exe/}"
35083
35084    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35085    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35086  fi
35087
35088  else
35089    # We're on a posix platform. Hooray! :)
35090    # First separate the path from the arguments. This will split at the first
35091    # space.
35092    complete="$DUMPBIN"
35093    path="${complete%% *}"
35094    tmp="$complete EOL"
35095    arguments="${tmp#* }"
35096
35097    # Cannot rely on the command "which" here since it doesn't always work.
35098    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35099    if test -z "$is_absolute_path"; then
35100      # Path to executable is not absolute. Find it.
35101      IFS_save="$IFS"
35102      IFS=:
35103      for p in $PATH; do
35104        if test -f "$p/$path" && test -x "$p/$path"; then
35105          new_path="$p/$path"
35106          break
35107        fi
35108      done
35109      IFS="$IFS_save"
35110    else
35111      # This is an absolute path, we can use it without further modifications.
35112      new_path="$path"
35113    fi
35114
35115    if test "x$new_path" = x; then
35116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35117$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35118      has_space=`$ECHO "$complete" | $GREP " "`
35119      if test "x$has_space" != x; then
35120        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35121$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35122      fi
35123      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35124    fi
35125  fi
35126
35127  # Now join together the path and the arguments once again
35128  if test "x$arguments" != xEOL; then
35129    new_complete="$new_path ${arguments% *}"
35130  else
35131    new_complete="$new_path"
35132  fi
35133
35134  if test "x$complete" != "x$new_complete"; then
35135    DUMPBIN="$new_complete"
35136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35137$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35138  fi
35139
35140    # We need to check for 'msbuild.exe' because at the place where we expect to
35141    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35142    # won't find the 'msbuild.exe' executable in that case (and the
35143    # 'ac_executable_extensions' is unusable due to performance reasons).
35144    # Notice that we intentionally don't fix up the path to MSBUILD because we
35145    # will call it in a DOS shell during freetype detection on Windows (see
35146    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35147    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35148set dummy msbuild.exe; ac_word=$2
35149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35150$as_echo_n "checking for $ac_word... " >&6; }
35151if ${ac_cv_prog_MSBUILD+:} false; then :
35152  $as_echo_n "(cached) " >&6
35153else
35154  if test -n "$MSBUILD"; then
35155  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35156else
35157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35158for as_dir in $PATH
35159do
35160  IFS=$as_save_IFS
35161  test -z "$as_dir" && as_dir=.
35162    for ac_exec_ext in '' $ac_executable_extensions; do
35163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35164    ac_cv_prog_MSBUILD="msbuild.exe"
35165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35166    break 2
35167  fi
35168done
35169  done
35170IFS=$as_save_IFS
35171
35172fi
35173fi
35174MSBUILD=$ac_cv_prog_MSBUILD
35175if test -n "$MSBUILD"; then
35176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35177$as_echo "$MSBUILD" >&6; }
35178else
35179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35180$as_echo "no" >&6; }
35181fi
35182
35183
35184  fi
35185
35186  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35187
35188
35189  # Publish this variable in the help.
35190
35191
35192  if test "x$STRIP" = x; then
35193    # The variable is not set by user, try to locate tool using the code snippet
35194    for ac_prog in strip
35195do
35196  # Extract the first word of "$ac_prog", so it can be a program name with args.
35197set dummy $ac_prog; ac_word=$2
35198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35199$as_echo_n "checking for $ac_word... " >&6; }
35200if ${ac_cv_path_STRIP+:} false; then :
35201  $as_echo_n "(cached) " >&6
35202else
35203  case $STRIP in
35204  [\\/]* | ?:[\\/]*)
35205  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35206  ;;
35207  *)
35208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35209for as_dir in $PATH
35210do
35211  IFS=$as_save_IFS
35212  test -z "$as_dir" && as_dir=.
35213    for ac_exec_ext in '' $ac_executable_extensions; do
35214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35215    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35217    break 2
35218  fi
35219done
35220  done
35221IFS=$as_save_IFS
35222
35223  ;;
35224esac
35225fi
35226STRIP=$ac_cv_path_STRIP
35227if test -n "$STRIP"; then
35228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35229$as_echo "$STRIP" >&6; }
35230else
35231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35232$as_echo "no" >&6; }
35233fi
35234
35235
35236  test -n "$STRIP" && break
35237done
35238
35239  else
35240    # The variable is set, but is it from the command line or the environment?
35241
35242    # Try to remove the string !STRIP! from our list.
35243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35245      # If it failed, the variable was not from the command line. Ignore it,
35246      # but warn the user (except for BASH, which is always set by the calling BASH).
35247      if test "xSTRIP" != xBASH; then
35248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35249$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35250      fi
35251      # Try to locate tool using the code snippet
35252      for ac_prog in strip
35253do
35254  # Extract the first word of "$ac_prog", so it can be a program name with args.
35255set dummy $ac_prog; ac_word=$2
35256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35257$as_echo_n "checking for $ac_word... " >&6; }
35258if ${ac_cv_path_STRIP+:} false; then :
35259  $as_echo_n "(cached) " >&6
35260else
35261  case $STRIP in
35262  [\\/]* | ?:[\\/]*)
35263  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35264  ;;
35265  *)
35266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35267for as_dir in $PATH
35268do
35269  IFS=$as_save_IFS
35270  test -z "$as_dir" && as_dir=.
35271    for ac_exec_ext in '' $ac_executable_extensions; do
35272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35273    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35275    break 2
35276  fi
35277done
35278  done
35279IFS=$as_save_IFS
35280
35281  ;;
35282esac
35283fi
35284STRIP=$ac_cv_path_STRIP
35285if test -n "$STRIP"; then
35286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35287$as_echo "$STRIP" >&6; }
35288else
35289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35290$as_echo "no" >&6; }
35291fi
35292
35293
35294  test -n "$STRIP" && break
35295done
35296
35297    else
35298      # If it succeeded, then it was overridden by the user. We will use it
35299      # for the tool.
35300
35301      # First remove it from the list of overridden variables, so we can test
35302      # for unknown variables in the end.
35303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35304
35305      # Check if the provided tool contains a complete path.
35306      tool_specified="$STRIP"
35307      tool_basename="${tool_specified##*/}"
35308      if test "x$tool_basename" = "x$tool_specified"; then
35309        # A command without a complete path is provided, search $PATH.
35310        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35311$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35312        # Extract the first word of "$tool_basename", so it can be a program name with args.
35313set dummy $tool_basename; ac_word=$2
35314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35315$as_echo_n "checking for $ac_word... " >&6; }
35316if ${ac_cv_path_STRIP+:} false; then :
35317  $as_echo_n "(cached) " >&6
35318else
35319  case $STRIP in
35320  [\\/]* | ?:[\\/]*)
35321  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35322  ;;
35323  *)
35324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35325for as_dir in $PATH
35326do
35327  IFS=$as_save_IFS
35328  test -z "$as_dir" && as_dir=.
35329    for ac_exec_ext in '' $ac_executable_extensions; do
35330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35331    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35333    break 2
35334  fi
35335done
35336  done
35337IFS=$as_save_IFS
35338
35339  ;;
35340esac
35341fi
35342STRIP=$ac_cv_path_STRIP
35343if test -n "$STRIP"; then
35344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35345$as_echo "$STRIP" >&6; }
35346else
35347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35348$as_echo "no" >&6; }
35349fi
35350
35351
35352        if test "x$STRIP" = x; then
35353          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35354        fi
35355      else
35356        # Otherwise we believe it is a complete path. Use it as it is.
35357        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35358$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35360$as_echo_n "checking for STRIP... " >&6; }
35361        if test ! -x "$tool_specified"; then
35362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35363$as_echo "not found" >&6; }
35364          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35365        fi
35366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35367$as_echo "$tool_specified" >&6; }
35368      fi
35369    fi
35370  fi
35371
35372
35373
35374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35375
35376  # First separate the path from the arguments. This will split at the first
35377  # space.
35378  complete="$STRIP"
35379  path="${complete%% *}"
35380  tmp="$complete EOL"
35381  arguments="${tmp#* }"
35382
35383  # Input might be given as Windows format, start by converting to
35384  # unix format.
35385  new_path=`$CYGPATH -u "$path"`
35386
35387  # Now try to locate executable using which
35388  new_path=`$WHICH "$new_path" 2> /dev/null`
35389  # bat and cmd files are not always considered executable in cygwin causing which
35390  # to not find them
35391  if test "x$new_path" = x \
35392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35394    new_path=`$CYGPATH -u "$path"`
35395  fi
35396  if test "x$new_path" = x; then
35397    # Oops. Which didn't find the executable.
35398    # The splitting of arguments from the executable at a space might have been incorrect,
35399    # since paths with space are more likely in Windows. Give it another try with the whole
35400    # argument.
35401    path="$complete"
35402    arguments="EOL"
35403    new_path=`$CYGPATH -u "$path"`
35404    new_path=`$WHICH "$new_path" 2> /dev/null`
35405    # bat and cmd files are not always considered executable in cygwin causing which
35406    # to not find them
35407    if test "x$new_path" = x \
35408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35410      new_path=`$CYGPATH -u "$path"`
35411    fi
35412    if test "x$new_path" = x; then
35413      # It's still not found. Now this is an unrecoverable error.
35414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35415$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35416      has_space=`$ECHO "$complete" | $GREP " "`
35417      if test "x$has_space" != x; then
35418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35420      fi
35421      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35422    fi
35423  fi
35424
35425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35428  # "foo.exe" is OK but "foo" is an error.
35429  #
35430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35431  # It is also a way to make sure we got the proper file name for the real test later on.
35432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35433  if test "x$test_shortpath" = x; then
35434    # Short path failed, file does not exist as specified.
35435    # Try adding .exe or .cmd
35436    if test -f "${new_path}.exe"; then
35437      input_to_shortpath="${new_path}.exe"
35438    elif test -f "${new_path}.cmd"; then
35439      input_to_shortpath="${new_path}.cmd"
35440    else
35441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35442$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35445      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35446    fi
35447  else
35448    input_to_shortpath="$new_path"
35449  fi
35450
35451  # Call helper function which possibly converts this using DOS-style short mode.
35452  # If so, the updated path is stored in $new_path.
35453  new_path="$input_to_shortpath"
35454
35455  input_path="$input_to_shortpath"
35456  # Check if we need to convert this using DOS-style short mode. If the path
35457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35458  # take no chances and rewrite it.
35459  # Note: m4 eats our [], so we need to use [ and ] instead.
35460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35461  if test "x$has_forbidden_chars" != x; then
35462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35466      # Going to short mode and back again did indeed matter. Since short mode is
35467      # case insensitive, let's make it lowercase to improve readability.
35468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35469      # Now convert it back to Unix-stile (cygpath)
35470      input_path=`$CYGPATH -u "$shortmode_path"`
35471      new_path="$input_path"
35472    fi
35473  fi
35474
35475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35476  if test "x$test_cygdrive_prefix" = x; then
35477    # As a simple fix, exclude /usr/bin since it's not a real path.
35478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35480      # a path prefixed by /cygdrive for fixpath to work.
35481      new_path="$CYGWIN_ROOT_PATH$input_path"
35482    fi
35483  fi
35484
35485  # remove trailing .exe if any
35486  new_path="${new_path/%.exe/}"
35487
35488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35489
35490  # First separate the path from the arguments. This will split at the first
35491  # space.
35492  complete="$STRIP"
35493  path="${complete%% *}"
35494  tmp="$complete EOL"
35495  arguments="${tmp#* }"
35496
35497  # Input might be given as Windows format, start by converting to
35498  # unix format.
35499  new_path="$path"
35500
35501  windows_path="$new_path"
35502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35503    unix_path=`$CYGPATH -u "$windows_path"`
35504    new_path="$unix_path"
35505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35507    new_path="$unix_path"
35508  fi
35509
35510
35511  # Now try to locate executable using which
35512  new_path=`$WHICH "$new_path" 2> /dev/null`
35513
35514  if test "x$new_path" = x; then
35515    # Oops. Which didn't find the executable.
35516    # The splitting of arguments from the executable at a space might have been incorrect,
35517    # since paths with space are more likely in Windows. Give it another try with the whole
35518    # argument.
35519    path="$complete"
35520    arguments="EOL"
35521    new_path="$path"
35522
35523  windows_path="$new_path"
35524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35525    unix_path=`$CYGPATH -u "$windows_path"`
35526    new_path="$unix_path"
35527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35529    new_path="$unix_path"
35530  fi
35531
35532
35533    new_path=`$WHICH "$new_path" 2> /dev/null`
35534    # bat and cmd files are not always considered executable in MSYS causing which
35535    # to not find them
35536    if test "x$new_path" = x \
35537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35539      new_path="$path"
35540
35541  windows_path="$new_path"
35542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35543    unix_path=`$CYGPATH -u "$windows_path"`
35544    new_path="$unix_path"
35545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35547    new_path="$unix_path"
35548  fi
35549
35550    fi
35551
35552    if test "x$new_path" = x; then
35553      # It's still not found. Now this is an unrecoverable error.
35554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35555$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35556      has_space=`$ECHO "$complete" | $GREP " "`
35557      if test "x$has_space" != x; then
35558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35560      fi
35561      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35562    fi
35563  fi
35564
35565  # Now new_path has a complete unix path to the binary
35566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35567    # Keep paths in /bin as-is, but remove trailing .exe if any
35568    new_path="${new_path/%.exe/}"
35569    # Do not save /bin paths to all_fixpath_prefixes!
35570  else
35571    # Not in mixed or Windows style, start by that.
35572    new_path=`cmd //c echo $new_path`
35573
35574  input_path="$new_path"
35575  # Check if we need to convert this using DOS-style short mode. If the path
35576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35577  # take no chances and rewrite it.
35578  # Note: m4 eats our [], so we need to use [ and ] instead.
35579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35580  if test "x$has_forbidden_chars" != x; then
35581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35583  fi
35584
35585    # Output is in $new_path
35586
35587  windows_path="$new_path"
35588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35589    unix_path=`$CYGPATH -u "$windows_path"`
35590    new_path="$unix_path"
35591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35593    new_path="$unix_path"
35594  fi
35595
35596    # remove trailing .exe if any
35597    new_path="${new_path/%.exe/}"
35598
35599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35601  fi
35602
35603  else
35604    # We're on a posix platform. Hooray! :)
35605    # First separate the path from the arguments. This will split at the first
35606    # space.
35607    complete="$STRIP"
35608    path="${complete%% *}"
35609    tmp="$complete EOL"
35610    arguments="${tmp#* }"
35611
35612    # Cannot rely on the command "which" here since it doesn't always work.
35613    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35614    if test -z "$is_absolute_path"; then
35615      # Path to executable is not absolute. Find it.
35616      IFS_save="$IFS"
35617      IFS=:
35618      for p in $PATH; do
35619        if test -f "$p/$path" && test -x "$p/$path"; then
35620          new_path="$p/$path"
35621          break
35622        fi
35623      done
35624      IFS="$IFS_save"
35625    else
35626      # This is an absolute path, we can use it without further modifications.
35627      new_path="$path"
35628    fi
35629
35630    if test "x$new_path" = x; then
35631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35632$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35633      has_space=`$ECHO "$complete" | $GREP " "`
35634      if test "x$has_space" != x; then
35635        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35637      fi
35638      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35639    fi
35640  fi
35641
35642  # Now join together the path and the arguments once again
35643  if test "x$arguments" != xEOL; then
35644    new_complete="$new_path ${arguments% *}"
35645  else
35646    new_complete="$new_path"
35647  fi
35648
35649  if test "x$complete" != "x$new_complete"; then
35650    STRIP="$new_complete"
35651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35652$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35653  fi
35654
35655
35656
35657  # Publish this variable in the help.
35658
35659
35660  if test "x$NM" = x; then
35661    # The variable is not set by user, try to locate tool using the code snippet
35662    for ac_prog in nm
35663do
35664  # Extract the first word of "$ac_prog", so it can be a program name with args.
35665set dummy $ac_prog; ac_word=$2
35666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35667$as_echo_n "checking for $ac_word... " >&6; }
35668if ${ac_cv_path_NM+:} false; then :
35669  $as_echo_n "(cached) " >&6
35670else
35671  case $NM in
35672  [\\/]* | ?:[\\/]*)
35673  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35674  ;;
35675  *)
35676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35677for as_dir in $PATH
35678do
35679  IFS=$as_save_IFS
35680  test -z "$as_dir" && as_dir=.
35681    for ac_exec_ext in '' $ac_executable_extensions; do
35682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35683    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35685    break 2
35686  fi
35687done
35688  done
35689IFS=$as_save_IFS
35690
35691  ;;
35692esac
35693fi
35694NM=$ac_cv_path_NM
35695if test -n "$NM"; then
35696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35697$as_echo "$NM" >&6; }
35698else
35699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35700$as_echo "no" >&6; }
35701fi
35702
35703
35704  test -n "$NM" && break
35705done
35706
35707  else
35708    # The variable is set, but is it from the command line or the environment?
35709
35710    # Try to remove the string !NM! from our list.
35711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35713      # If it failed, the variable was not from the command line. Ignore it,
35714      # but warn the user (except for BASH, which is always set by the calling BASH).
35715      if test "xNM" != xBASH; then
35716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35717$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35718      fi
35719      # Try to locate tool using the code snippet
35720      for ac_prog in nm
35721do
35722  # Extract the first word of "$ac_prog", so it can be a program name with args.
35723set dummy $ac_prog; ac_word=$2
35724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35725$as_echo_n "checking for $ac_word... " >&6; }
35726if ${ac_cv_path_NM+:} false; then :
35727  $as_echo_n "(cached) " >&6
35728else
35729  case $NM in
35730  [\\/]* | ?:[\\/]*)
35731  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35732  ;;
35733  *)
35734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35735for as_dir in $PATH
35736do
35737  IFS=$as_save_IFS
35738  test -z "$as_dir" && as_dir=.
35739    for ac_exec_ext in '' $ac_executable_extensions; do
35740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35741    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35743    break 2
35744  fi
35745done
35746  done
35747IFS=$as_save_IFS
35748
35749  ;;
35750esac
35751fi
35752NM=$ac_cv_path_NM
35753if test -n "$NM"; then
35754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35755$as_echo "$NM" >&6; }
35756else
35757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35758$as_echo "no" >&6; }
35759fi
35760
35761
35762  test -n "$NM" && break
35763done
35764
35765    else
35766      # If it succeeded, then it was overridden by the user. We will use it
35767      # for the tool.
35768
35769      # First remove it from the list of overridden variables, so we can test
35770      # for unknown variables in the end.
35771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35772
35773      # Check if the provided tool contains a complete path.
35774      tool_specified="$NM"
35775      tool_basename="${tool_specified##*/}"
35776      if test "x$tool_basename" = "x$tool_specified"; then
35777        # A command without a complete path is provided, search $PATH.
35778        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35779$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35780        # Extract the first word of "$tool_basename", so it can be a program name with args.
35781set dummy $tool_basename; ac_word=$2
35782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35783$as_echo_n "checking for $ac_word... " >&6; }
35784if ${ac_cv_path_NM+:} false; then :
35785  $as_echo_n "(cached) " >&6
35786else
35787  case $NM in
35788  [\\/]* | ?:[\\/]*)
35789  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35790  ;;
35791  *)
35792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35793for as_dir in $PATH
35794do
35795  IFS=$as_save_IFS
35796  test -z "$as_dir" && as_dir=.
35797    for ac_exec_ext in '' $ac_executable_extensions; do
35798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35799    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35801    break 2
35802  fi
35803done
35804  done
35805IFS=$as_save_IFS
35806
35807  ;;
35808esac
35809fi
35810NM=$ac_cv_path_NM
35811if test -n "$NM"; then
35812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35813$as_echo "$NM" >&6; }
35814else
35815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35816$as_echo "no" >&6; }
35817fi
35818
35819
35820        if test "x$NM" = x; then
35821          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35822        fi
35823      else
35824        # Otherwise we believe it is a complete path. Use it as it is.
35825        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35826$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35828$as_echo_n "checking for NM... " >&6; }
35829        if test ! -x "$tool_specified"; then
35830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35831$as_echo "not found" >&6; }
35832          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35833        fi
35834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35835$as_echo "$tool_specified" >&6; }
35836      fi
35837    fi
35838  fi
35839
35840
35841
35842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35843
35844  # First separate the path from the arguments. This will split at the first
35845  # space.
35846  complete="$NM"
35847  path="${complete%% *}"
35848  tmp="$complete EOL"
35849  arguments="${tmp#* }"
35850
35851  # Input might be given as Windows format, start by converting to
35852  # unix format.
35853  new_path=`$CYGPATH -u "$path"`
35854
35855  # Now try to locate executable using which
35856  new_path=`$WHICH "$new_path" 2> /dev/null`
35857  # bat and cmd files are not always considered executable in cygwin causing which
35858  # to not find them
35859  if test "x$new_path" = x \
35860      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35861      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35862    new_path=`$CYGPATH -u "$path"`
35863  fi
35864  if test "x$new_path" = x; then
35865    # Oops. Which didn't find the executable.
35866    # The splitting of arguments from the executable at a space might have been incorrect,
35867    # since paths with space are more likely in Windows. Give it another try with the whole
35868    # argument.
35869    path="$complete"
35870    arguments="EOL"
35871    new_path=`$CYGPATH -u "$path"`
35872    new_path=`$WHICH "$new_path" 2> /dev/null`
35873    # bat and cmd files are not always considered executable in cygwin causing which
35874    # to not find them
35875    if test "x$new_path" = x \
35876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35878      new_path=`$CYGPATH -u "$path"`
35879    fi
35880    if test "x$new_path" = x; then
35881      # It's still not found. Now this is an unrecoverable error.
35882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35883$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35884      has_space=`$ECHO "$complete" | $GREP " "`
35885      if test "x$has_space" != x; then
35886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35888      fi
35889      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35890    fi
35891  fi
35892
35893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35896  # "foo.exe" is OK but "foo" is an error.
35897  #
35898  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35899  # It is also a way to make sure we got the proper file name for the real test later on.
35900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35901  if test "x$test_shortpath" = x; then
35902    # Short path failed, file does not exist as specified.
35903    # Try adding .exe or .cmd
35904    if test -f "${new_path}.exe"; then
35905      input_to_shortpath="${new_path}.exe"
35906    elif test -f "${new_path}.cmd"; then
35907      input_to_shortpath="${new_path}.cmd"
35908    else
35909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35910$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35911      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35912$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35913      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35914    fi
35915  else
35916    input_to_shortpath="$new_path"
35917  fi
35918
35919  # Call helper function which possibly converts this using DOS-style short mode.
35920  # If so, the updated path is stored in $new_path.
35921  new_path="$input_to_shortpath"
35922
35923  input_path="$input_to_shortpath"
35924  # Check if we need to convert this using DOS-style short mode. If the path
35925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35926  # take no chances and rewrite it.
35927  # Note: m4 eats our [], so we need to use [ and ] instead.
35928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35929  if test "x$has_forbidden_chars" != x; then
35930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35934      # Going to short mode and back again did indeed matter. Since short mode is
35935      # case insensitive, let's make it lowercase to improve readability.
35936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35937      # Now convert it back to Unix-stile (cygpath)
35938      input_path=`$CYGPATH -u "$shortmode_path"`
35939      new_path="$input_path"
35940    fi
35941  fi
35942
35943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35944  if test "x$test_cygdrive_prefix" = x; then
35945    # As a simple fix, exclude /usr/bin since it's not a real path.
35946    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35948      # a path prefixed by /cygdrive for fixpath to work.
35949      new_path="$CYGWIN_ROOT_PATH$input_path"
35950    fi
35951  fi
35952
35953  # remove trailing .exe if any
35954  new_path="${new_path/%.exe/}"
35955
35956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35957
35958  # First separate the path from the arguments. This will split at the first
35959  # space.
35960  complete="$NM"
35961  path="${complete%% *}"
35962  tmp="$complete EOL"
35963  arguments="${tmp#* }"
35964
35965  # Input might be given as Windows format, start by converting to
35966  # unix format.
35967  new_path="$path"
35968
35969  windows_path="$new_path"
35970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35971    unix_path=`$CYGPATH -u "$windows_path"`
35972    new_path="$unix_path"
35973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35975    new_path="$unix_path"
35976  fi
35977
35978
35979  # Now try to locate executable using which
35980  new_path=`$WHICH "$new_path" 2> /dev/null`
35981
35982  if test "x$new_path" = x; then
35983    # Oops. Which didn't find the executable.
35984    # The splitting of arguments from the executable at a space might have been incorrect,
35985    # since paths with space are more likely in Windows. Give it another try with the whole
35986    # argument.
35987    path="$complete"
35988    arguments="EOL"
35989    new_path="$path"
35990
35991  windows_path="$new_path"
35992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35993    unix_path=`$CYGPATH -u "$windows_path"`
35994    new_path="$unix_path"
35995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35997    new_path="$unix_path"
35998  fi
35999
36000
36001    new_path=`$WHICH "$new_path" 2> /dev/null`
36002    # bat and cmd files are not always considered executable in MSYS causing which
36003    # to not find them
36004    if test "x$new_path" = x \
36005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36007      new_path="$path"
36008
36009  windows_path="$new_path"
36010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36011    unix_path=`$CYGPATH -u "$windows_path"`
36012    new_path="$unix_path"
36013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36015    new_path="$unix_path"
36016  fi
36017
36018    fi
36019
36020    if test "x$new_path" = x; then
36021      # It's still not found. Now this is an unrecoverable error.
36022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36023$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36024      has_space=`$ECHO "$complete" | $GREP " "`
36025      if test "x$has_space" != x; then
36026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36028      fi
36029      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36030    fi
36031  fi
36032
36033  # Now new_path has a complete unix path to the binary
36034  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36035    # Keep paths in /bin as-is, but remove trailing .exe if any
36036    new_path="${new_path/%.exe/}"
36037    # Do not save /bin paths to all_fixpath_prefixes!
36038  else
36039    # Not in mixed or Windows style, start by that.
36040    new_path=`cmd //c echo $new_path`
36041
36042  input_path="$new_path"
36043  # Check if we need to convert this using DOS-style short mode. If the path
36044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36045  # take no chances and rewrite it.
36046  # Note: m4 eats our [], so we need to use [ and ] instead.
36047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36048  if test "x$has_forbidden_chars" != x; then
36049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36051  fi
36052
36053    # Output is in $new_path
36054
36055  windows_path="$new_path"
36056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36057    unix_path=`$CYGPATH -u "$windows_path"`
36058    new_path="$unix_path"
36059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36061    new_path="$unix_path"
36062  fi
36063
36064    # remove trailing .exe if any
36065    new_path="${new_path/%.exe/}"
36066
36067    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36068    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36069  fi
36070
36071  else
36072    # We're on a posix platform. Hooray! :)
36073    # First separate the path from the arguments. This will split at the first
36074    # space.
36075    complete="$NM"
36076    path="${complete%% *}"
36077    tmp="$complete EOL"
36078    arguments="${tmp#* }"
36079
36080    # Cannot rely on the command "which" here since it doesn't always work.
36081    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36082    if test -z "$is_absolute_path"; then
36083      # Path to executable is not absolute. Find it.
36084      IFS_save="$IFS"
36085      IFS=:
36086      for p in $PATH; do
36087        if test -f "$p/$path" && test -x "$p/$path"; then
36088          new_path="$p/$path"
36089          break
36090        fi
36091      done
36092      IFS="$IFS_save"
36093    else
36094      # This is an absolute path, we can use it without further modifications.
36095      new_path="$path"
36096    fi
36097
36098    if test "x$new_path" = x; then
36099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36100$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36101      has_space=`$ECHO "$complete" | $GREP " "`
36102      if test "x$has_space" != x; then
36103        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36104$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36105      fi
36106      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36107    fi
36108  fi
36109
36110  # Now join together the path and the arguments once again
36111  if test "x$arguments" != xEOL; then
36112    new_complete="$new_path ${arguments% *}"
36113  else
36114    new_complete="$new_path"
36115  fi
36116
36117  if test "x$complete" != "x$new_complete"; then
36118    NM="$new_complete"
36119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36120$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36121  fi
36122
36123
36124
36125  # Publish this variable in the help.
36126
36127
36128  if test "x$GNM" = x; then
36129    # The variable is not set by user, try to locate tool using the code snippet
36130    for ac_prog in gnm
36131do
36132  # Extract the first word of "$ac_prog", so it can be a program name with args.
36133set dummy $ac_prog; ac_word=$2
36134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36135$as_echo_n "checking for $ac_word... " >&6; }
36136if ${ac_cv_path_GNM+:} false; then :
36137  $as_echo_n "(cached) " >&6
36138else
36139  case $GNM in
36140  [\\/]* | ?:[\\/]*)
36141  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36142  ;;
36143  *)
36144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36145for as_dir in $PATH
36146do
36147  IFS=$as_save_IFS
36148  test -z "$as_dir" && as_dir=.
36149    for ac_exec_ext in '' $ac_executable_extensions; do
36150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36151    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36153    break 2
36154  fi
36155done
36156  done
36157IFS=$as_save_IFS
36158
36159  ;;
36160esac
36161fi
36162GNM=$ac_cv_path_GNM
36163if test -n "$GNM"; then
36164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36165$as_echo "$GNM" >&6; }
36166else
36167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36168$as_echo "no" >&6; }
36169fi
36170
36171
36172  test -n "$GNM" && break
36173done
36174
36175  else
36176    # The variable is set, but is it from the command line or the environment?
36177
36178    # Try to remove the string !GNM! from our list.
36179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36181      # If it failed, the variable was not from the command line. Ignore it,
36182      # but warn the user (except for BASH, which is always set by the calling BASH).
36183      if test "xGNM" != xBASH; then
36184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36185$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36186      fi
36187      # Try to locate tool using the code snippet
36188      for ac_prog in gnm
36189do
36190  # Extract the first word of "$ac_prog", so it can be a program name with args.
36191set dummy $ac_prog; ac_word=$2
36192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36193$as_echo_n "checking for $ac_word... " >&6; }
36194if ${ac_cv_path_GNM+:} false; then :
36195  $as_echo_n "(cached) " >&6
36196else
36197  case $GNM in
36198  [\\/]* | ?:[\\/]*)
36199  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36200  ;;
36201  *)
36202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36203for as_dir in $PATH
36204do
36205  IFS=$as_save_IFS
36206  test -z "$as_dir" && as_dir=.
36207    for ac_exec_ext in '' $ac_executable_extensions; do
36208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36209    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36211    break 2
36212  fi
36213done
36214  done
36215IFS=$as_save_IFS
36216
36217  ;;
36218esac
36219fi
36220GNM=$ac_cv_path_GNM
36221if test -n "$GNM"; then
36222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36223$as_echo "$GNM" >&6; }
36224else
36225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36226$as_echo "no" >&6; }
36227fi
36228
36229
36230  test -n "$GNM" && break
36231done
36232
36233    else
36234      # If it succeeded, then it was overridden by the user. We will use it
36235      # for the tool.
36236
36237      # First remove it from the list of overridden variables, so we can test
36238      # for unknown variables in the end.
36239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36240
36241      # Check if the provided tool contains a complete path.
36242      tool_specified="$GNM"
36243      tool_basename="${tool_specified##*/}"
36244      if test "x$tool_basename" = "x$tool_specified"; then
36245        # A command without a complete path is provided, search $PATH.
36246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36247$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36248        # Extract the first word of "$tool_basename", so it can be a program name with args.
36249set dummy $tool_basename; ac_word=$2
36250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36251$as_echo_n "checking for $ac_word... " >&6; }
36252if ${ac_cv_path_GNM+:} false; then :
36253  $as_echo_n "(cached) " >&6
36254else
36255  case $GNM in
36256  [\\/]* | ?:[\\/]*)
36257  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36258  ;;
36259  *)
36260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36261for as_dir in $PATH
36262do
36263  IFS=$as_save_IFS
36264  test -z "$as_dir" && as_dir=.
36265    for ac_exec_ext in '' $ac_executable_extensions; do
36266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36267    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36269    break 2
36270  fi
36271done
36272  done
36273IFS=$as_save_IFS
36274
36275  ;;
36276esac
36277fi
36278GNM=$ac_cv_path_GNM
36279if test -n "$GNM"; then
36280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36281$as_echo "$GNM" >&6; }
36282else
36283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36284$as_echo "no" >&6; }
36285fi
36286
36287
36288        if test "x$GNM" = x; then
36289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36290        fi
36291      else
36292        # Otherwise we believe it is a complete path. Use it as it is.
36293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36294$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36296$as_echo_n "checking for GNM... " >&6; }
36297        if test ! -x "$tool_specified"; then
36298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36299$as_echo "not found" >&6; }
36300          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36301        fi
36302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36303$as_echo "$tool_specified" >&6; }
36304      fi
36305    fi
36306  fi
36307
36308
36309
36310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36311
36312  # First separate the path from the arguments. This will split at the first
36313  # space.
36314  complete="$GNM"
36315  path="${complete%% *}"
36316  tmp="$complete EOL"
36317  arguments="${tmp#* }"
36318
36319  # Input might be given as Windows format, start by converting to
36320  # unix format.
36321  new_path=`$CYGPATH -u "$path"`
36322
36323  # Now try to locate executable using which
36324  new_path=`$WHICH "$new_path" 2> /dev/null`
36325  # bat and cmd files are not always considered executable in cygwin causing which
36326  # to not find them
36327  if test "x$new_path" = x \
36328      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36329      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36330    new_path=`$CYGPATH -u "$path"`
36331  fi
36332  if test "x$new_path" = x; then
36333    # Oops. Which didn't find the executable.
36334    # The splitting of arguments from the executable at a space might have been incorrect,
36335    # since paths with space are more likely in Windows. Give it another try with the whole
36336    # argument.
36337    path="$complete"
36338    arguments="EOL"
36339    new_path=`$CYGPATH -u "$path"`
36340    new_path=`$WHICH "$new_path" 2> /dev/null`
36341    # bat and cmd files are not always considered executable in cygwin causing which
36342    # to not find them
36343    if test "x$new_path" = x \
36344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36346      new_path=`$CYGPATH -u "$path"`
36347    fi
36348    if test "x$new_path" = x; then
36349      # It's still not found. Now this is an unrecoverable error.
36350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36351$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36352      has_space=`$ECHO "$complete" | $GREP " "`
36353      if test "x$has_space" != x; then
36354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36356      fi
36357      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36358    fi
36359  fi
36360
36361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36364  # "foo.exe" is OK but "foo" is an error.
36365  #
36366  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36367  # It is also a way to make sure we got the proper file name for the real test later on.
36368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36369  if test "x$test_shortpath" = x; then
36370    # Short path failed, file does not exist as specified.
36371    # Try adding .exe or .cmd
36372    if test -f "${new_path}.exe"; then
36373      input_to_shortpath="${new_path}.exe"
36374    elif test -f "${new_path}.cmd"; then
36375      input_to_shortpath="${new_path}.cmd"
36376    else
36377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36378$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36381      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36382    fi
36383  else
36384    input_to_shortpath="$new_path"
36385  fi
36386
36387  # Call helper function which possibly converts this using DOS-style short mode.
36388  # If so, the updated path is stored in $new_path.
36389  new_path="$input_to_shortpath"
36390
36391  input_path="$input_to_shortpath"
36392  # Check if we need to convert this using DOS-style short mode. If the path
36393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36394  # take no chances and rewrite it.
36395  # Note: m4 eats our [], so we need to use [ and ] instead.
36396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36397  if test "x$has_forbidden_chars" != x; then
36398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36402      # Going to short mode and back again did indeed matter. Since short mode is
36403      # case insensitive, let's make it lowercase to improve readability.
36404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36405      # Now convert it back to Unix-stile (cygpath)
36406      input_path=`$CYGPATH -u "$shortmode_path"`
36407      new_path="$input_path"
36408    fi
36409  fi
36410
36411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36412  if test "x$test_cygdrive_prefix" = x; then
36413    # As a simple fix, exclude /usr/bin since it's not a real path.
36414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36416      # a path prefixed by /cygdrive for fixpath to work.
36417      new_path="$CYGWIN_ROOT_PATH$input_path"
36418    fi
36419  fi
36420
36421  # remove trailing .exe if any
36422  new_path="${new_path/%.exe/}"
36423
36424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36425
36426  # First separate the path from the arguments. This will split at the first
36427  # space.
36428  complete="$GNM"
36429  path="${complete%% *}"
36430  tmp="$complete EOL"
36431  arguments="${tmp#* }"
36432
36433  # Input might be given as Windows format, start by converting to
36434  # unix format.
36435  new_path="$path"
36436
36437  windows_path="$new_path"
36438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36439    unix_path=`$CYGPATH -u "$windows_path"`
36440    new_path="$unix_path"
36441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36443    new_path="$unix_path"
36444  fi
36445
36446
36447  # Now try to locate executable using which
36448  new_path=`$WHICH "$new_path" 2> /dev/null`
36449
36450  if test "x$new_path" = x; then
36451    # Oops. Which didn't find the executable.
36452    # The splitting of arguments from the executable at a space might have been incorrect,
36453    # since paths with space are more likely in Windows. Give it another try with the whole
36454    # argument.
36455    path="$complete"
36456    arguments="EOL"
36457    new_path="$path"
36458
36459  windows_path="$new_path"
36460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36461    unix_path=`$CYGPATH -u "$windows_path"`
36462    new_path="$unix_path"
36463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36465    new_path="$unix_path"
36466  fi
36467
36468
36469    new_path=`$WHICH "$new_path" 2> /dev/null`
36470    # bat and cmd files are not always considered executable in MSYS causing which
36471    # to not find them
36472    if test "x$new_path" = x \
36473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36475      new_path="$path"
36476
36477  windows_path="$new_path"
36478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36479    unix_path=`$CYGPATH -u "$windows_path"`
36480    new_path="$unix_path"
36481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36483    new_path="$unix_path"
36484  fi
36485
36486    fi
36487
36488    if test "x$new_path" = x; then
36489      # It's still not found. Now this is an unrecoverable error.
36490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36491$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36492      has_space=`$ECHO "$complete" | $GREP " "`
36493      if test "x$has_space" != x; then
36494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36496      fi
36497      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36498    fi
36499  fi
36500
36501  # Now new_path has a complete unix path to the binary
36502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36503    # Keep paths in /bin as-is, but remove trailing .exe if any
36504    new_path="${new_path/%.exe/}"
36505    # Do not save /bin paths to all_fixpath_prefixes!
36506  else
36507    # Not in mixed or Windows style, start by that.
36508    new_path=`cmd //c echo $new_path`
36509
36510  input_path="$new_path"
36511  # Check if we need to convert this using DOS-style short mode. If the path
36512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36513  # take no chances and rewrite it.
36514  # Note: m4 eats our [], so we need to use [ and ] instead.
36515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36516  if test "x$has_forbidden_chars" != x; then
36517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36519  fi
36520
36521    # Output is in $new_path
36522
36523  windows_path="$new_path"
36524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36525    unix_path=`$CYGPATH -u "$windows_path"`
36526    new_path="$unix_path"
36527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36529    new_path="$unix_path"
36530  fi
36531
36532    # remove trailing .exe if any
36533    new_path="${new_path/%.exe/}"
36534
36535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36537  fi
36538
36539  else
36540    # We're on a posix platform. Hooray! :)
36541    # First separate the path from the arguments. This will split at the first
36542    # space.
36543    complete="$GNM"
36544    path="${complete%% *}"
36545    tmp="$complete EOL"
36546    arguments="${tmp#* }"
36547
36548    # Cannot rely on the command "which" here since it doesn't always work.
36549    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36550    if test -z "$is_absolute_path"; then
36551      # Path to executable is not absolute. Find it.
36552      IFS_save="$IFS"
36553      IFS=:
36554      for p in $PATH; do
36555        if test -f "$p/$path" && test -x "$p/$path"; then
36556          new_path="$p/$path"
36557          break
36558        fi
36559      done
36560      IFS="$IFS_save"
36561    else
36562      # This is an absolute path, we can use it without further modifications.
36563      new_path="$path"
36564    fi
36565
36566    if test "x$new_path" = x; then
36567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36568$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36569      has_space=`$ECHO "$complete" | $GREP " "`
36570      if test "x$has_space" != x; then
36571        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36573      fi
36574      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36575    fi
36576  fi
36577
36578  # Now join together the path and the arguments once again
36579  if test "x$arguments" != xEOL; then
36580    new_complete="$new_path ${arguments% *}"
36581  else
36582    new_complete="$new_path"
36583  fi
36584
36585  if test "x$complete" != "x$new_complete"; then
36586    GNM="$new_complete"
36587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36588$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36589  fi
36590
36591
36592
36593
36594  # Publish this variable in the help.
36595
36596
36597  if test "x$MCS" = x; then
36598    # The variable is not set by user, try to locate tool using the code snippet
36599    for ac_prog in mcs
36600do
36601  # Extract the first word of "$ac_prog", so it can be a program name with args.
36602set dummy $ac_prog; ac_word=$2
36603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36604$as_echo_n "checking for $ac_word... " >&6; }
36605if ${ac_cv_path_MCS+:} false; then :
36606  $as_echo_n "(cached) " >&6
36607else
36608  case $MCS in
36609  [\\/]* | ?:[\\/]*)
36610  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36611  ;;
36612  *)
36613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36614for as_dir in $PATH
36615do
36616  IFS=$as_save_IFS
36617  test -z "$as_dir" && as_dir=.
36618    for ac_exec_ext in '' $ac_executable_extensions; do
36619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36620    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36622    break 2
36623  fi
36624done
36625  done
36626IFS=$as_save_IFS
36627
36628  ;;
36629esac
36630fi
36631MCS=$ac_cv_path_MCS
36632if test -n "$MCS"; then
36633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36634$as_echo "$MCS" >&6; }
36635else
36636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36637$as_echo "no" >&6; }
36638fi
36639
36640
36641  test -n "$MCS" && break
36642done
36643
36644  else
36645    # The variable is set, but is it from the command line or the environment?
36646
36647    # Try to remove the string !MCS! from our list.
36648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36650      # If it failed, the variable was not from the command line. Ignore it,
36651      # but warn the user (except for BASH, which is always set by the calling BASH).
36652      if test "xMCS" != xBASH; then
36653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36654$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36655      fi
36656      # Try to locate tool using the code snippet
36657      for ac_prog in mcs
36658do
36659  # Extract the first word of "$ac_prog", so it can be a program name with args.
36660set dummy $ac_prog; ac_word=$2
36661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36662$as_echo_n "checking for $ac_word... " >&6; }
36663if ${ac_cv_path_MCS+:} false; then :
36664  $as_echo_n "(cached) " >&6
36665else
36666  case $MCS in
36667  [\\/]* | ?:[\\/]*)
36668  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36669  ;;
36670  *)
36671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36672for as_dir in $PATH
36673do
36674  IFS=$as_save_IFS
36675  test -z "$as_dir" && as_dir=.
36676    for ac_exec_ext in '' $ac_executable_extensions; do
36677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36678    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36680    break 2
36681  fi
36682done
36683  done
36684IFS=$as_save_IFS
36685
36686  ;;
36687esac
36688fi
36689MCS=$ac_cv_path_MCS
36690if test -n "$MCS"; then
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36692$as_echo "$MCS" >&6; }
36693else
36694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36695$as_echo "no" >&6; }
36696fi
36697
36698
36699  test -n "$MCS" && break
36700done
36701
36702    else
36703      # If it succeeded, then it was overridden by the user. We will use it
36704      # for the tool.
36705
36706      # First remove it from the list of overridden variables, so we can test
36707      # for unknown variables in the end.
36708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36709
36710      # Check if the provided tool contains a complete path.
36711      tool_specified="$MCS"
36712      tool_basename="${tool_specified##*/}"
36713      if test "x$tool_basename" = "x$tool_specified"; then
36714        # A command without a complete path is provided, search $PATH.
36715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36716$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36717        # Extract the first word of "$tool_basename", so it can be a program name with args.
36718set dummy $tool_basename; ac_word=$2
36719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36720$as_echo_n "checking for $ac_word... " >&6; }
36721if ${ac_cv_path_MCS+:} false; then :
36722  $as_echo_n "(cached) " >&6
36723else
36724  case $MCS in
36725  [\\/]* | ?:[\\/]*)
36726  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36727  ;;
36728  *)
36729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36730for as_dir in $PATH
36731do
36732  IFS=$as_save_IFS
36733  test -z "$as_dir" && as_dir=.
36734    for ac_exec_ext in '' $ac_executable_extensions; do
36735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36736    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36738    break 2
36739  fi
36740done
36741  done
36742IFS=$as_save_IFS
36743
36744  ;;
36745esac
36746fi
36747MCS=$ac_cv_path_MCS
36748if test -n "$MCS"; then
36749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36750$as_echo "$MCS" >&6; }
36751else
36752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36753$as_echo "no" >&6; }
36754fi
36755
36756
36757        if test "x$MCS" = x; then
36758          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36759        fi
36760      else
36761        # Otherwise we believe it is a complete path. Use it as it is.
36762        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36763$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36765$as_echo_n "checking for MCS... " >&6; }
36766        if test ! -x "$tool_specified"; then
36767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36768$as_echo "not found" >&6; }
36769          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36770        fi
36771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36772$as_echo "$tool_specified" >&6; }
36773      fi
36774    fi
36775  fi
36776
36777
36778
36779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36780
36781  # First separate the path from the arguments. This will split at the first
36782  # space.
36783  complete="$MCS"
36784  path="${complete%% *}"
36785  tmp="$complete EOL"
36786  arguments="${tmp#* }"
36787
36788  # Input might be given as Windows format, start by converting to
36789  # unix format.
36790  new_path=`$CYGPATH -u "$path"`
36791
36792  # Now try to locate executable using which
36793  new_path=`$WHICH "$new_path" 2> /dev/null`
36794  # bat and cmd files are not always considered executable in cygwin causing which
36795  # to not find them
36796  if test "x$new_path" = x \
36797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36799    new_path=`$CYGPATH -u "$path"`
36800  fi
36801  if test "x$new_path" = x; then
36802    # Oops. Which didn't find the executable.
36803    # The splitting of arguments from the executable at a space might have been incorrect,
36804    # since paths with space are more likely in Windows. Give it another try with the whole
36805    # argument.
36806    path="$complete"
36807    arguments="EOL"
36808    new_path=`$CYGPATH -u "$path"`
36809    new_path=`$WHICH "$new_path" 2> /dev/null`
36810    # bat and cmd files are not always considered executable in cygwin causing which
36811    # to not find them
36812    if test "x$new_path" = x \
36813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36815      new_path=`$CYGPATH -u "$path"`
36816    fi
36817    if test "x$new_path" = x; then
36818      # It's still not found. Now this is an unrecoverable error.
36819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36820$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36821      has_space=`$ECHO "$complete" | $GREP " "`
36822      if test "x$has_space" != x; then
36823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36825      fi
36826      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36827    fi
36828  fi
36829
36830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36833  # "foo.exe" is OK but "foo" is an error.
36834  #
36835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36836  # It is also a way to make sure we got the proper file name for the real test later on.
36837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36838  if test "x$test_shortpath" = x; then
36839    # Short path failed, file does not exist as specified.
36840    # Try adding .exe or .cmd
36841    if test -f "${new_path}.exe"; then
36842      input_to_shortpath="${new_path}.exe"
36843    elif test -f "${new_path}.cmd"; then
36844      input_to_shortpath="${new_path}.cmd"
36845    else
36846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36847$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36850      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36851    fi
36852  else
36853    input_to_shortpath="$new_path"
36854  fi
36855
36856  # Call helper function which possibly converts this using DOS-style short mode.
36857  # If so, the updated path is stored in $new_path.
36858  new_path="$input_to_shortpath"
36859
36860  input_path="$input_to_shortpath"
36861  # Check if we need to convert this using DOS-style short mode. If the path
36862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36863  # take no chances and rewrite it.
36864  # Note: m4 eats our [], so we need to use [ and ] instead.
36865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36866  if test "x$has_forbidden_chars" != x; then
36867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36871      # Going to short mode and back again did indeed matter. Since short mode is
36872      # case insensitive, let's make it lowercase to improve readability.
36873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36874      # Now convert it back to Unix-stile (cygpath)
36875      input_path=`$CYGPATH -u "$shortmode_path"`
36876      new_path="$input_path"
36877    fi
36878  fi
36879
36880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36881  if test "x$test_cygdrive_prefix" = x; then
36882    # As a simple fix, exclude /usr/bin since it's not a real path.
36883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36885      # a path prefixed by /cygdrive for fixpath to work.
36886      new_path="$CYGWIN_ROOT_PATH$input_path"
36887    fi
36888  fi
36889
36890  # remove trailing .exe if any
36891  new_path="${new_path/%.exe/}"
36892
36893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36894
36895  # First separate the path from the arguments. This will split at the first
36896  # space.
36897  complete="$MCS"
36898  path="${complete%% *}"
36899  tmp="$complete EOL"
36900  arguments="${tmp#* }"
36901
36902  # Input might be given as Windows format, start by converting to
36903  # unix format.
36904  new_path="$path"
36905
36906  windows_path="$new_path"
36907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36908    unix_path=`$CYGPATH -u "$windows_path"`
36909    new_path="$unix_path"
36910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36912    new_path="$unix_path"
36913  fi
36914
36915
36916  # Now try to locate executable using which
36917  new_path=`$WHICH "$new_path" 2> /dev/null`
36918
36919  if test "x$new_path" = x; then
36920    # Oops. Which didn't find the executable.
36921    # The splitting of arguments from the executable at a space might have been incorrect,
36922    # since paths with space are more likely in Windows. Give it another try with the whole
36923    # argument.
36924    path="$complete"
36925    arguments="EOL"
36926    new_path="$path"
36927
36928  windows_path="$new_path"
36929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36930    unix_path=`$CYGPATH -u "$windows_path"`
36931    new_path="$unix_path"
36932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36934    new_path="$unix_path"
36935  fi
36936
36937
36938    new_path=`$WHICH "$new_path" 2> /dev/null`
36939    # bat and cmd files are not always considered executable in MSYS causing which
36940    # to not find them
36941    if test "x$new_path" = x \
36942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36944      new_path="$path"
36945
36946  windows_path="$new_path"
36947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36948    unix_path=`$CYGPATH -u "$windows_path"`
36949    new_path="$unix_path"
36950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36952    new_path="$unix_path"
36953  fi
36954
36955    fi
36956
36957    if test "x$new_path" = x; then
36958      # It's still not found. Now this is an unrecoverable error.
36959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36960$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36961      has_space=`$ECHO "$complete" | $GREP " "`
36962      if test "x$has_space" != x; then
36963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36965      fi
36966      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36967    fi
36968  fi
36969
36970  # Now new_path has a complete unix path to the binary
36971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36972    # Keep paths in /bin as-is, but remove trailing .exe if any
36973    new_path="${new_path/%.exe/}"
36974    # Do not save /bin paths to all_fixpath_prefixes!
36975  else
36976    # Not in mixed or Windows style, start by that.
36977    new_path=`cmd //c echo $new_path`
36978
36979  input_path="$new_path"
36980  # Check if we need to convert this using DOS-style short mode. If the path
36981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36982  # take no chances and rewrite it.
36983  # Note: m4 eats our [], so we need to use [ and ] instead.
36984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36985  if test "x$has_forbidden_chars" != x; then
36986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36988  fi
36989
36990    # Output is in $new_path
36991
36992  windows_path="$new_path"
36993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994    unix_path=`$CYGPATH -u "$windows_path"`
36995    new_path="$unix_path"
36996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36998    new_path="$unix_path"
36999  fi
37000
37001    # remove trailing .exe if any
37002    new_path="${new_path/%.exe/}"
37003
37004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37006  fi
37007
37008  else
37009    # We're on a posix platform. Hooray! :)
37010    # First separate the path from the arguments. This will split at the first
37011    # space.
37012    complete="$MCS"
37013    path="${complete%% *}"
37014    tmp="$complete EOL"
37015    arguments="${tmp#* }"
37016
37017    # Cannot rely on the command "which" here since it doesn't always work.
37018    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37019    if test -z "$is_absolute_path"; then
37020      # Path to executable is not absolute. Find it.
37021      IFS_save="$IFS"
37022      IFS=:
37023      for p in $PATH; do
37024        if test -f "$p/$path" && test -x "$p/$path"; then
37025          new_path="$p/$path"
37026          break
37027        fi
37028      done
37029      IFS="$IFS_save"
37030    else
37031      # This is an absolute path, we can use it without further modifications.
37032      new_path="$path"
37033    fi
37034
37035    if test "x$new_path" = x; then
37036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37037$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37038      has_space=`$ECHO "$complete" | $GREP " "`
37039      if test "x$has_space" != x; then
37040        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37042      fi
37043      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37044    fi
37045  fi
37046
37047  # Now join together the path and the arguments once again
37048  if test "x$arguments" != xEOL; then
37049    new_complete="$new_path ${arguments% *}"
37050  else
37051    new_complete="$new_path"
37052  fi
37053
37054  if test "x$complete" != "x$new_complete"; then
37055    MCS="$new_complete"
37056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37057$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37058  fi
37059
37060  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37061    # FIXME: we should unify this with the solaris case above.
37062
37063
37064  # Publish this variable in the help.
37065
37066
37067  if test "x$STRIP" = x; then
37068    # The variable is not set by user, try to locate tool using the code snippet
37069    if test -n "$ac_tool_prefix"; then
37070  for ac_prog in strip
37071  do
37072    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37075$as_echo_n "checking for $ac_word... " >&6; }
37076if ${ac_cv_prog_STRIP+:} false; then :
37077  $as_echo_n "(cached) " >&6
37078else
37079  if test -n "$STRIP"; then
37080  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37081else
37082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37083for as_dir in $PATH
37084do
37085  IFS=$as_save_IFS
37086  test -z "$as_dir" && as_dir=.
37087    for ac_exec_ext in '' $ac_executable_extensions; do
37088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37089    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37091    break 2
37092  fi
37093done
37094  done
37095IFS=$as_save_IFS
37096
37097fi
37098fi
37099STRIP=$ac_cv_prog_STRIP
37100if test -n "$STRIP"; then
37101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37102$as_echo "$STRIP" >&6; }
37103else
37104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37105$as_echo "no" >&6; }
37106fi
37107
37108
37109    test -n "$STRIP" && break
37110  done
37111fi
37112if test -z "$STRIP"; then
37113  ac_ct_STRIP=$STRIP
37114  for ac_prog in strip
37115do
37116  # Extract the first word of "$ac_prog", so it can be a program name with args.
37117set dummy $ac_prog; ac_word=$2
37118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37119$as_echo_n "checking for $ac_word... " >&6; }
37120if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37121  $as_echo_n "(cached) " >&6
37122else
37123  if test -n "$ac_ct_STRIP"; then
37124  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37125else
37126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37127for as_dir in $PATH
37128do
37129  IFS=$as_save_IFS
37130  test -z "$as_dir" && as_dir=.
37131    for ac_exec_ext in '' $ac_executable_extensions; do
37132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37133    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37135    break 2
37136  fi
37137done
37138  done
37139IFS=$as_save_IFS
37140
37141fi
37142fi
37143ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37144if test -n "$ac_ct_STRIP"; then
37145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37146$as_echo "$ac_ct_STRIP" >&6; }
37147else
37148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37149$as_echo "no" >&6; }
37150fi
37151
37152
37153  test -n "$ac_ct_STRIP" && break
37154done
37155
37156  if test "x$ac_ct_STRIP" = x; then
37157    STRIP=""
37158  else
37159    case $cross_compiling:$ac_tool_warned in
37160yes:)
37161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37163ac_tool_warned=yes ;;
37164esac
37165    STRIP=$ac_ct_STRIP
37166  fi
37167fi
37168
37169  else
37170    # The variable is set, but is it from the command line or the environment?
37171
37172    # Try to remove the string !STRIP! from our list.
37173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37175      # If it failed, the variable was not from the command line. Ignore it,
37176      # but warn the user (except for BASH, which is always set by the calling BASH).
37177      if test "xSTRIP" != xBASH; then
37178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37179$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37180      fi
37181      # Try to locate tool using the code snippet
37182      if test -n "$ac_tool_prefix"; then
37183  for ac_prog in strip
37184  do
37185    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37186set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37188$as_echo_n "checking for $ac_word... " >&6; }
37189if ${ac_cv_prog_STRIP+:} false; then :
37190  $as_echo_n "(cached) " >&6
37191else
37192  if test -n "$STRIP"; then
37193  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37194else
37195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37196for as_dir in $PATH
37197do
37198  IFS=$as_save_IFS
37199  test -z "$as_dir" && as_dir=.
37200    for ac_exec_ext in '' $ac_executable_extensions; do
37201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37202    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37204    break 2
37205  fi
37206done
37207  done
37208IFS=$as_save_IFS
37209
37210fi
37211fi
37212STRIP=$ac_cv_prog_STRIP
37213if test -n "$STRIP"; then
37214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37215$as_echo "$STRIP" >&6; }
37216else
37217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37218$as_echo "no" >&6; }
37219fi
37220
37221
37222    test -n "$STRIP" && break
37223  done
37224fi
37225if test -z "$STRIP"; then
37226  ac_ct_STRIP=$STRIP
37227  for ac_prog in strip
37228do
37229  # Extract the first word of "$ac_prog", so it can be a program name with args.
37230set dummy $ac_prog; ac_word=$2
37231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37232$as_echo_n "checking for $ac_word... " >&6; }
37233if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37234  $as_echo_n "(cached) " >&6
37235else
37236  if test -n "$ac_ct_STRIP"; then
37237  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37238else
37239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37240for as_dir in $PATH
37241do
37242  IFS=$as_save_IFS
37243  test -z "$as_dir" && as_dir=.
37244    for ac_exec_ext in '' $ac_executable_extensions; do
37245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37246    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37248    break 2
37249  fi
37250done
37251  done
37252IFS=$as_save_IFS
37253
37254fi
37255fi
37256ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37257if test -n "$ac_ct_STRIP"; then
37258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37259$as_echo "$ac_ct_STRIP" >&6; }
37260else
37261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37262$as_echo "no" >&6; }
37263fi
37264
37265
37266  test -n "$ac_ct_STRIP" && break
37267done
37268
37269  if test "x$ac_ct_STRIP" = x; then
37270    STRIP=""
37271  else
37272    case $cross_compiling:$ac_tool_warned in
37273yes:)
37274{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37275$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37276ac_tool_warned=yes ;;
37277esac
37278    STRIP=$ac_ct_STRIP
37279  fi
37280fi
37281
37282    else
37283      # If it succeeded, then it was overridden by the user. We will use it
37284      # for the tool.
37285
37286      # First remove it from the list of overridden variables, so we can test
37287      # for unknown variables in the end.
37288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37289
37290      # Check if the provided tool contains a complete path.
37291      tool_specified="$STRIP"
37292      tool_basename="${tool_specified##*/}"
37293      if test "x$tool_basename" = "x$tool_specified"; then
37294        # A command without a complete path is provided, search $PATH.
37295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37296$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37297        # Extract the first word of "$tool_basename", so it can be a program name with args.
37298set dummy $tool_basename; ac_word=$2
37299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37300$as_echo_n "checking for $ac_word... " >&6; }
37301if ${ac_cv_path_STRIP+:} false; then :
37302  $as_echo_n "(cached) " >&6
37303else
37304  case $STRIP in
37305  [\\/]* | ?:[\\/]*)
37306  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37307  ;;
37308  *)
37309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37310for as_dir in $PATH
37311do
37312  IFS=$as_save_IFS
37313  test -z "$as_dir" && as_dir=.
37314    for ac_exec_ext in '' $ac_executable_extensions; do
37315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37316    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37318    break 2
37319  fi
37320done
37321  done
37322IFS=$as_save_IFS
37323
37324  ;;
37325esac
37326fi
37327STRIP=$ac_cv_path_STRIP
37328if test -n "$STRIP"; then
37329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37330$as_echo "$STRIP" >&6; }
37331else
37332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37333$as_echo "no" >&6; }
37334fi
37335
37336
37337        if test "x$STRIP" = x; then
37338          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37339        fi
37340      else
37341        # Otherwise we believe it is a complete path. Use it as it is.
37342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37343$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37345$as_echo_n "checking for STRIP... " >&6; }
37346        if test ! -x "$tool_specified"; then
37347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37348$as_echo "not found" >&6; }
37349          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37350        fi
37351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37352$as_echo "$tool_specified" >&6; }
37353      fi
37354    fi
37355  fi
37356
37357
37358
37359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37360
37361  # First separate the path from the arguments. This will split at the first
37362  # space.
37363  complete="$STRIP"
37364  path="${complete%% *}"
37365  tmp="$complete EOL"
37366  arguments="${tmp#* }"
37367
37368  # Input might be given as Windows format, start by converting to
37369  # unix format.
37370  new_path=`$CYGPATH -u "$path"`
37371
37372  # Now try to locate executable using which
37373  new_path=`$WHICH "$new_path" 2> /dev/null`
37374  # bat and cmd files are not always considered executable in cygwin causing which
37375  # to not find them
37376  if test "x$new_path" = x \
37377      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37378      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37379    new_path=`$CYGPATH -u "$path"`
37380  fi
37381  if test "x$new_path" = x; then
37382    # Oops. Which didn't find the executable.
37383    # The splitting of arguments from the executable at a space might have been incorrect,
37384    # since paths with space are more likely in Windows. Give it another try with the whole
37385    # argument.
37386    path="$complete"
37387    arguments="EOL"
37388    new_path=`$CYGPATH -u "$path"`
37389    new_path=`$WHICH "$new_path" 2> /dev/null`
37390    # bat and cmd files are not always considered executable in cygwin causing which
37391    # to not find them
37392    if test "x$new_path" = x \
37393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37395      new_path=`$CYGPATH -u "$path"`
37396    fi
37397    if test "x$new_path" = x; then
37398      # It's still not found. Now this is an unrecoverable error.
37399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37400$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37401      has_space=`$ECHO "$complete" | $GREP " "`
37402      if test "x$has_space" != x; then
37403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37405      fi
37406      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37407    fi
37408  fi
37409
37410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37413  # "foo.exe" is OK but "foo" is an error.
37414  #
37415  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37416  # It is also a way to make sure we got the proper file name for the real test later on.
37417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37418  if test "x$test_shortpath" = x; then
37419    # Short path failed, file does not exist as specified.
37420    # Try adding .exe or .cmd
37421    if test -f "${new_path}.exe"; then
37422      input_to_shortpath="${new_path}.exe"
37423    elif test -f "${new_path}.cmd"; then
37424      input_to_shortpath="${new_path}.cmd"
37425    else
37426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37427$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37428      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37429$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37430      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37431    fi
37432  else
37433    input_to_shortpath="$new_path"
37434  fi
37435
37436  # Call helper function which possibly converts this using DOS-style short mode.
37437  # If so, the updated path is stored in $new_path.
37438  new_path="$input_to_shortpath"
37439
37440  input_path="$input_to_shortpath"
37441  # Check if we need to convert this using DOS-style short mode. If the path
37442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37443  # take no chances and rewrite it.
37444  # Note: m4 eats our [], so we need to use [ and ] instead.
37445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37446  if test "x$has_forbidden_chars" != x; then
37447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37451      # Going to short mode and back again did indeed matter. Since short mode is
37452      # case insensitive, let's make it lowercase to improve readability.
37453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37454      # Now convert it back to Unix-stile (cygpath)
37455      input_path=`$CYGPATH -u "$shortmode_path"`
37456      new_path="$input_path"
37457    fi
37458  fi
37459
37460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37461  if test "x$test_cygdrive_prefix" = x; then
37462    # As a simple fix, exclude /usr/bin since it's not a real path.
37463    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37465      # a path prefixed by /cygdrive for fixpath to work.
37466      new_path="$CYGWIN_ROOT_PATH$input_path"
37467    fi
37468  fi
37469
37470  # remove trailing .exe if any
37471  new_path="${new_path/%.exe/}"
37472
37473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37474
37475  # First separate the path from the arguments. This will split at the first
37476  # space.
37477  complete="$STRIP"
37478  path="${complete%% *}"
37479  tmp="$complete EOL"
37480  arguments="${tmp#* }"
37481
37482  # Input might be given as Windows format, start by converting to
37483  # unix format.
37484  new_path="$path"
37485
37486  windows_path="$new_path"
37487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37488    unix_path=`$CYGPATH -u "$windows_path"`
37489    new_path="$unix_path"
37490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37492    new_path="$unix_path"
37493  fi
37494
37495
37496  # Now try to locate executable using which
37497  new_path=`$WHICH "$new_path" 2> /dev/null`
37498
37499  if test "x$new_path" = x; then
37500    # Oops. Which didn't find the executable.
37501    # The splitting of arguments from the executable at a space might have been incorrect,
37502    # since paths with space are more likely in Windows. Give it another try with the whole
37503    # argument.
37504    path="$complete"
37505    arguments="EOL"
37506    new_path="$path"
37507
37508  windows_path="$new_path"
37509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37510    unix_path=`$CYGPATH -u "$windows_path"`
37511    new_path="$unix_path"
37512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37514    new_path="$unix_path"
37515  fi
37516
37517
37518    new_path=`$WHICH "$new_path" 2> /dev/null`
37519    # bat and cmd files are not always considered executable in MSYS causing which
37520    # to not find them
37521    if test "x$new_path" = x \
37522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37524      new_path="$path"
37525
37526  windows_path="$new_path"
37527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37528    unix_path=`$CYGPATH -u "$windows_path"`
37529    new_path="$unix_path"
37530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37532    new_path="$unix_path"
37533  fi
37534
37535    fi
37536
37537    if test "x$new_path" = x; then
37538      # It's still not found. Now this is an unrecoverable error.
37539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37540$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37541      has_space=`$ECHO "$complete" | $GREP " "`
37542      if test "x$has_space" != x; then
37543        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37544$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37545      fi
37546      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37547    fi
37548  fi
37549
37550  # Now new_path has a complete unix path to the binary
37551  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37552    # Keep paths in /bin as-is, but remove trailing .exe if any
37553    new_path="${new_path/%.exe/}"
37554    # Do not save /bin paths to all_fixpath_prefixes!
37555  else
37556    # Not in mixed or Windows style, start by that.
37557    new_path=`cmd //c echo $new_path`
37558
37559  input_path="$new_path"
37560  # Check if we need to convert this using DOS-style short mode. If the path
37561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37562  # take no chances and rewrite it.
37563  # Note: m4 eats our [], so we need to use [ and ] instead.
37564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37565  if test "x$has_forbidden_chars" != x; then
37566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37568  fi
37569
37570    # Output is in $new_path
37571
37572  windows_path="$new_path"
37573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37574    unix_path=`$CYGPATH -u "$windows_path"`
37575    new_path="$unix_path"
37576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37578    new_path="$unix_path"
37579  fi
37580
37581    # remove trailing .exe if any
37582    new_path="${new_path/%.exe/}"
37583
37584    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37585    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37586  fi
37587
37588  else
37589    # We're on a posix platform. Hooray! :)
37590    # First separate the path from the arguments. This will split at the first
37591    # space.
37592    complete="$STRIP"
37593    path="${complete%% *}"
37594    tmp="$complete EOL"
37595    arguments="${tmp#* }"
37596
37597    # Cannot rely on the command "which" here since it doesn't always work.
37598    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37599    if test -z "$is_absolute_path"; then
37600      # Path to executable is not absolute. Find it.
37601      IFS_save="$IFS"
37602      IFS=:
37603      for p in $PATH; do
37604        if test -f "$p/$path" && test -x "$p/$path"; then
37605          new_path="$p/$path"
37606          break
37607        fi
37608      done
37609      IFS="$IFS_save"
37610    else
37611      # This is an absolute path, we can use it without further modifications.
37612      new_path="$path"
37613    fi
37614
37615    if test "x$new_path" = x; then
37616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37617$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37618      has_space=`$ECHO "$complete" | $GREP " "`
37619      if test "x$has_space" != x; then
37620        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37621$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37622      fi
37623      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37624    fi
37625  fi
37626
37627  # Now join together the path and the arguments once again
37628  if test "x$arguments" != xEOL; then
37629    new_complete="$new_path ${arguments% *}"
37630  else
37631    new_complete="$new_path"
37632  fi
37633
37634  if test "x$complete" != "x$new_complete"; then
37635    STRIP="$new_complete"
37636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37637$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37638  fi
37639
37640
37641
37642  # Publish this variable in the help.
37643
37644
37645  if test "x$NM" = x; then
37646    # The variable is not set by user, try to locate tool using the code snippet
37647    if test -n "$ac_tool_prefix"; then
37648  for ac_prog in nm
37649  do
37650    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37651set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37653$as_echo_n "checking for $ac_word... " >&6; }
37654if ${ac_cv_prog_NM+:} false; then :
37655  $as_echo_n "(cached) " >&6
37656else
37657  if test -n "$NM"; then
37658  ac_cv_prog_NM="$NM" # Let the user override the test.
37659else
37660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37661for as_dir in $PATH
37662do
37663  IFS=$as_save_IFS
37664  test -z "$as_dir" && as_dir=.
37665    for ac_exec_ext in '' $ac_executable_extensions; do
37666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37667    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37669    break 2
37670  fi
37671done
37672  done
37673IFS=$as_save_IFS
37674
37675fi
37676fi
37677NM=$ac_cv_prog_NM
37678if test -n "$NM"; then
37679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37680$as_echo "$NM" >&6; }
37681else
37682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37683$as_echo "no" >&6; }
37684fi
37685
37686
37687    test -n "$NM" && break
37688  done
37689fi
37690if test -z "$NM"; then
37691  ac_ct_NM=$NM
37692  for ac_prog in nm
37693do
37694  # Extract the first word of "$ac_prog", so it can be a program name with args.
37695set dummy $ac_prog; ac_word=$2
37696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37697$as_echo_n "checking for $ac_word... " >&6; }
37698if ${ac_cv_prog_ac_ct_NM+:} false; then :
37699  $as_echo_n "(cached) " >&6
37700else
37701  if test -n "$ac_ct_NM"; then
37702  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37703else
37704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37705for as_dir in $PATH
37706do
37707  IFS=$as_save_IFS
37708  test -z "$as_dir" && as_dir=.
37709    for ac_exec_ext in '' $ac_executable_extensions; do
37710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37711    ac_cv_prog_ac_ct_NM="$ac_prog"
37712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37713    break 2
37714  fi
37715done
37716  done
37717IFS=$as_save_IFS
37718
37719fi
37720fi
37721ac_ct_NM=$ac_cv_prog_ac_ct_NM
37722if test -n "$ac_ct_NM"; then
37723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37724$as_echo "$ac_ct_NM" >&6; }
37725else
37726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37727$as_echo "no" >&6; }
37728fi
37729
37730
37731  test -n "$ac_ct_NM" && break
37732done
37733
37734  if test "x$ac_ct_NM" = x; then
37735    NM=""
37736  else
37737    case $cross_compiling:$ac_tool_warned in
37738yes:)
37739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37741ac_tool_warned=yes ;;
37742esac
37743    NM=$ac_ct_NM
37744  fi
37745fi
37746
37747  else
37748    # The variable is set, but is it from the command line or the environment?
37749
37750    # Try to remove the string !NM! from our list.
37751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37753      # If it failed, the variable was not from the command line. Ignore it,
37754      # but warn the user (except for BASH, which is always set by the calling BASH).
37755      if test "xNM" != xBASH; then
37756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37757$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37758      fi
37759      # Try to locate tool using the code snippet
37760      if test -n "$ac_tool_prefix"; then
37761  for ac_prog in nm
37762  do
37763    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37764set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37766$as_echo_n "checking for $ac_word... " >&6; }
37767if ${ac_cv_prog_NM+:} false; then :
37768  $as_echo_n "(cached) " >&6
37769else
37770  if test -n "$NM"; then
37771  ac_cv_prog_NM="$NM" # Let the user override the test.
37772else
37773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37774for as_dir in $PATH
37775do
37776  IFS=$as_save_IFS
37777  test -z "$as_dir" && as_dir=.
37778    for ac_exec_ext in '' $ac_executable_extensions; do
37779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37780    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37782    break 2
37783  fi
37784done
37785  done
37786IFS=$as_save_IFS
37787
37788fi
37789fi
37790NM=$ac_cv_prog_NM
37791if test -n "$NM"; then
37792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37793$as_echo "$NM" >&6; }
37794else
37795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37796$as_echo "no" >&6; }
37797fi
37798
37799
37800    test -n "$NM" && break
37801  done
37802fi
37803if test -z "$NM"; then
37804  ac_ct_NM=$NM
37805  for ac_prog in nm
37806do
37807  # Extract the first word of "$ac_prog", so it can be a program name with args.
37808set dummy $ac_prog; ac_word=$2
37809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37810$as_echo_n "checking for $ac_word... " >&6; }
37811if ${ac_cv_prog_ac_ct_NM+:} false; then :
37812  $as_echo_n "(cached) " >&6
37813else
37814  if test -n "$ac_ct_NM"; then
37815  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37816else
37817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37818for as_dir in $PATH
37819do
37820  IFS=$as_save_IFS
37821  test -z "$as_dir" && as_dir=.
37822    for ac_exec_ext in '' $ac_executable_extensions; do
37823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37824    ac_cv_prog_ac_ct_NM="$ac_prog"
37825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37826    break 2
37827  fi
37828done
37829  done
37830IFS=$as_save_IFS
37831
37832fi
37833fi
37834ac_ct_NM=$ac_cv_prog_ac_ct_NM
37835if test -n "$ac_ct_NM"; then
37836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37837$as_echo "$ac_ct_NM" >&6; }
37838else
37839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37840$as_echo "no" >&6; }
37841fi
37842
37843
37844  test -n "$ac_ct_NM" && break
37845done
37846
37847  if test "x$ac_ct_NM" = x; then
37848    NM=""
37849  else
37850    case $cross_compiling:$ac_tool_warned in
37851yes:)
37852{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37853$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37854ac_tool_warned=yes ;;
37855esac
37856    NM=$ac_ct_NM
37857  fi
37858fi
37859
37860    else
37861      # If it succeeded, then it was overridden by the user. We will use it
37862      # for the tool.
37863
37864      # First remove it from the list of overridden variables, so we can test
37865      # for unknown variables in the end.
37866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37867
37868      # Check if the provided tool contains a complete path.
37869      tool_specified="$NM"
37870      tool_basename="${tool_specified##*/}"
37871      if test "x$tool_basename" = "x$tool_specified"; then
37872        # A command without a complete path is provided, search $PATH.
37873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37874$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37875        # Extract the first word of "$tool_basename", so it can be a program name with args.
37876set dummy $tool_basename; ac_word=$2
37877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37878$as_echo_n "checking for $ac_word... " >&6; }
37879if ${ac_cv_path_NM+:} false; then :
37880  $as_echo_n "(cached) " >&6
37881else
37882  case $NM in
37883  [\\/]* | ?:[\\/]*)
37884  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37885  ;;
37886  *)
37887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37888for as_dir in $PATH
37889do
37890  IFS=$as_save_IFS
37891  test -z "$as_dir" && as_dir=.
37892    for ac_exec_ext in '' $ac_executable_extensions; do
37893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37894    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37896    break 2
37897  fi
37898done
37899  done
37900IFS=$as_save_IFS
37901
37902  ;;
37903esac
37904fi
37905NM=$ac_cv_path_NM
37906if test -n "$NM"; then
37907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37908$as_echo "$NM" >&6; }
37909else
37910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37911$as_echo "no" >&6; }
37912fi
37913
37914
37915        if test "x$NM" = x; then
37916          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37917        fi
37918      else
37919        # Otherwise we believe it is a complete path. Use it as it is.
37920        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37921$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37923$as_echo_n "checking for NM... " >&6; }
37924        if test ! -x "$tool_specified"; then
37925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37926$as_echo "not found" >&6; }
37927          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37928        fi
37929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37930$as_echo "$tool_specified" >&6; }
37931      fi
37932    fi
37933  fi
37934
37935
37936
37937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37938
37939  # First separate the path from the arguments. This will split at the first
37940  # space.
37941  complete="$NM"
37942  path="${complete%% *}"
37943  tmp="$complete EOL"
37944  arguments="${tmp#* }"
37945
37946  # Input might be given as Windows format, start by converting to
37947  # unix format.
37948  new_path=`$CYGPATH -u "$path"`
37949
37950  # Now try to locate executable using which
37951  new_path=`$WHICH "$new_path" 2> /dev/null`
37952  # bat and cmd files are not always considered executable in cygwin causing which
37953  # to not find them
37954  if test "x$new_path" = x \
37955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37957    new_path=`$CYGPATH -u "$path"`
37958  fi
37959  if test "x$new_path" = x; then
37960    # Oops. Which didn't find the executable.
37961    # The splitting of arguments from the executable at a space might have been incorrect,
37962    # since paths with space are more likely in Windows. Give it another try with the whole
37963    # argument.
37964    path="$complete"
37965    arguments="EOL"
37966    new_path=`$CYGPATH -u "$path"`
37967    new_path=`$WHICH "$new_path" 2> /dev/null`
37968    # bat and cmd files are not always considered executable in cygwin causing which
37969    # to not find them
37970    if test "x$new_path" = x \
37971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37973      new_path=`$CYGPATH -u "$path"`
37974    fi
37975    if test "x$new_path" = x; then
37976      # It's still not found. Now this is an unrecoverable error.
37977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37978$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37979      has_space=`$ECHO "$complete" | $GREP " "`
37980      if test "x$has_space" != x; then
37981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37983      fi
37984      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37985    fi
37986  fi
37987
37988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37991  # "foo.exe" is OK but "foo" is an error.
37992  #
37993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37994  # It is also a way to make sure we got the proper file name for the real test later on.
37995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37996  if test "x$test_shortpath" = x; then
37997    # Short path failed, file does not exist as specified.
37998    # Try adding .exe or .cmd
37999    if test -f "${new_path}.exe"; then
38000      input_to_shortpath="${new_path}.exe"
38001    elif test -f "${new_path}.cmd"; then
38002      input_to_shortpath="${new_path}.cmd"
38003    else
38004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38005$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38008      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38009    fi
38010  else
38011    input_to_shortpath="$new_path"
38012  fi
38013
38014  # Call helper function which possibly converts this using DOS-style short mode.
38015  # If so, the updated path is stored in $new_path.
38016  new_path="$input_to_shortpath"
38017
38018  input_path="$input_to_shortpath"
38019  # Check if we need to convert this using DOS-style short mode. If the path
38020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38021  # take no chances and rewrite it.
38022  # Note: m4 eats our [], so we need to use [ and ] instead.
38023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38024  if test "x$has_forbidden_chars" != x; then
38025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38029      # Going to short mode and back again did indeed matter. Since short mode is
38030      # case insensitive, let's make it lowercase to improve readability.
38031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38032      # Now convert it back to Unix-stile (cygpath)
38033      input_path=`$CYGPATH -u "$shortmode_path"`
38034      new_path="$input_path"
38035    fi
38036  fi
38037
38038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38039  if test "x$test_cygdrive_prefix" = x; then
38040    # As a simple fix, exclude /usr/bin since it's not a real path.
38041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38043      # a path prefixed by /cygdrive for fixpath to work.
38044      new_path="$CYGWIN_ROOT_PATH$input_path"
38045    fi
38046  fi
38047
38048  # remove trailing .exe if any
38049  new_path="${new_path/%.exe/}"
38050
38051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38052
38053  # First separate the path from the arguments. This will split at the first
38054  # space.
38055  complete="$NM"
38056  path="${complete%% *}"
38057  tmp="$complete EOL"
38058  arguments="${tmp#* }"
38059
38060  # Input might be given as Windows format, start by converting to
38061  # unix format.
38062  new_path="$path"
38063
38064  windows_path="$new_path"
38065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38066    unix_path=`$CYGPATH -u "$windows_path"`
38067    new_path="$unix_path"
38068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38070    new_path="$unix_path"
38071  fi
38072
38073
38074  # Now try to locate executable using which
38075  new_path=`$WHICH "$new_path" 2> /dev/null`
38076
38077  if test "x$new_path" = x; then
38078    # Oops. Which didn't find the executable.
38079    # The splitting of arguments from the executable at a space might have been incorrect,
38080    # since paths with space are more likely in Windows. Give it another try with the whole
38081    # argument.
38082    path="$complete"
38083    arguments="EOL"
38084    new_path="$path"
38085
38086  windows_path="$new_path"
38087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38088    unix_path=`$CYGPATH -u "$windows_path"`
38089    new_path="$unix_path"
38090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38092    new_path="$unix_path"
38093  fi
38094
38095
38096    new_path=`$WHICH "$new_path" 2> /dev/null`
38097    # bat and cmd files are not always considered executable in MSYS causing which
38098    # to not find them
38099    if test "x$new_path" = x \
38100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38102      new_path="$path"
38103
38104  windows_path="$new_path"
38105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38106    unix_path=`$CYGPATH -u "$windows_path"`
38107    new_path="$unix_path"
38108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38110    new_path="$unix_path"
38111  fi
38112
38113    fi
38114
38115    if test "x$new_path" = x; then
38116      # It's still not found. Now this is an unrecoverable error.
38117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38118$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38119      has_space=`$ECHO "$complete" | $GREP " "`
38120      if test "x$has_space" != x; then
38121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38123      fi
38124      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38125    fi
38126  fi
38127
38128  # Now new_path has a complete unix path to the binary
38129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38130    # Keep paths in /bin as-is, but remove trailing .exe if any
38131    new_path="${new_path/%.exe/}"
38132    # Do not save /bin paths to all_fixpath_prefixes!
38133  else
38134    # Not in mixed or Windows style, start by that.
38135    new_path=`cmd //c echo $new_path`
38136
38137  input_path="$new_path"
38138  # Check if we need to convert this using DOS-style short mode. If the path
38139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38140  # take no chances and rewrite it.
38141  # Note: m4 eats our [], so we need to use [ and ] instead.
38142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38143  if test "x$has_forbidden_chars" != x; then
38144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38146  fi
38147
38148    # Output is in $new_path
38149
38150  windows_path="$new_path"
38151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38152    unix_path=`$CYGPATH -u "$windows_path"`
38153    new_path="$unix_path"
38154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38156    new_path="$unix_path"
38157  fi
38158
38159    # remove trailing .exe if any
38160    new_path="${new_path/%.exe/}"
38161
38162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38164  fi
38165
38166  else
38167    # We're on a posix platform. Hooray! :)
38168    # First separate the path from the arguments. This will split at the first
38169    # space.
38170    complete="$NM"
38171    path="${complete%% *}"
38172    tmp="$complete EOL"
38173    arguments="${tmp#* }"
38174
38175    # Cannot rely on the command "which" here since it doesn't always work.
38176    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38177    if test -z "$is_absolute_path"; then
38178      # Path to executable is not absolute. Find it.
38179      IFS_save="$IFS"
38180      IFS=:
38181      for p in $PATH; do
38182        if test -f "$p/$path" && test -x "$p/$path"; then
38183          new_path="$p/$path"
38184          break
38185        fi
38186      done
38187      IFS="$IFS_save"
38188    else
38189      # This is an absolute path, we can use it without further modifications.
38190      new_path="$path"
38191    fi
38192
38193    if test "x$new_path" = x; then
38194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38195$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38196      has_space=`$ECHO "$complete" | $GREP " "`
38197      if test "x$has_space" != x; then
38198        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38200      fi
38201      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38202    fi
38203  fi
38204
38205  # Now join together the path and the arguments once again
38206  if test "x$arguments" != xEOL; then
38207    new_complete="$new_path ${arguments% *}"
38208  else
38209    new_complete="$new_path"
38210  fi
38211
38212  if test "x$complete" != "x$new_complete"; then
38213    NM="$new_complete"
38214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38215$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38216  fi
38217
38218    GNM="$NM"
38219
38220  fi
38221
38222  # objcopy is used for moving debug symbols to separate files when
38223  # full debug symbols are enabled.
38224  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38225
38226
38227  # Publish this variable in the help.
38228
38229
38230  if test "x$OBJCOPY" = x; then
38231    # The variable is not set by user, try to locate tool using the code snippet
38232    if test -n "$ac_tool_prefix"; then
38233  for ac_prog in gobjcopy objcopy
38234  do
38235    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38238$as_echo_n "checking for $ac_word... " >&6; }
38239if ${ac_cv_prog_OBJCOPY+:} false; then :
38240  $as_echo_n "(cached) " >&6
38241else
38242  if test -n "$OBJCOPY"; then
38243  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38244else
38245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38246for as_dir in $PATH
38247do
38248  IFS=$as_save_IFS
38249  test -z "$as_dir" && as_dir=.
38250    for ac_exec_ext in '' $ac_executable_extensions; do
38251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38252    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38254    break 2
38255  fi
38256done
38257  done
38258IFS=$as_save_IFS
38259
38260fi
38261fi
38262OBJCOPY=$ac_cv_prog_OBJCOPY
38263if test -n "$OBJCOPY"; then
38264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38265$as_echo "$OBJCOPY" >&6; }
38266else
38267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38268$as_echo "no" >&6; }
38269fi
38270
38271
38272    test -n "$OBJCOPY" && break
38273  done
38274fi
38275if test -z "$OBJCOPY"; then
38276  ac_ct_OBJCOPY=$OBJCOPY
38277  for ac_prog in gobjcopy objcopy
38278do
38279  # Extract the first word of "$ac_prog", so it can be a program name with args.
38280set dummy $ac_prog; ac_word=$2
38281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38282$as_echo_n "checking for $ac_word... " >&6; }
38283if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38284  $as_echo_n "(cached) " >&6
38285else
38286  if test -n "$ac_ct_OBJCOPY"; then
38287  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38288else
38289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38290for as_dir in $PATH
38291do
38292  IFS=$as_save_IFS
38293  test -z "$as_dir" && as_dir=.
38294    for ac_exec_ext in '' $ac_executable_extensions; do
38295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38296    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38298    break 2
38299  fi
38300done
38301  done
38302IFS=$as_save_IFS
38303
38304fi
38305fi
38306ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38307if test -n "$ac_ct_OBJCOPY"; then
38308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38309$as_echo "$ac_ct_OBJCOPY" >&6; }
38310else
38311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38312$as_echo "no" >&6; }
38313fi
38314
38315
38316  test -n "$ac_ct_OBJCOPY" && break
38317done
38318
38319  if test "x$ac_ct_OBJCOPY" = x; then
38320    OBJCOPY=""
38321  else
38322    case $cross_compiling:$ac_tool_warned in
38323yes:)
38324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38326ac_tool_warned=yes ;;
38327esac
38328    OBJCOPY=$ac_ct_OBJCOPY
38329  fi
38330fi
38331
38332  else
38333    # The variable is set, but is it from the command line or the environment?
38334
38335    # Try to remove the string !OBJCOPY! from our list.
38336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38338      # If it failed, the variable was not from the command line. Ignore it,
38339      # but warn the user (except for BASH, which is always set by the calling BASH).
38340      if test "xOBJCOPY" != xBASH; then
38341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38342$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38343      fi
38344      # Try to locate tool using the code snippet
38345      if test -n "$ac_tool_prefix"; then
38346  for ac_prog in gobjcopy objcopy
38347  do
38348    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38349set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38351$as_echo_n "checking for $ac_word... " >&6; }
38352if ${ac_cv_prog_OBJCOPY+:} false; then :
38353  $as_echo_n "(cached) " >&6
38354else
38355  if test -n "$OBJCOPY"; then
38356  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38357else
38358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38359for as_dir in $PATH
38360do
38361  IFS=$as_save_IFS
38362  test -z "$as_dir" && as_dir=.
38363    for ac_exec_ext in '' $ac_executable_extensions; do
38364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38365    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38367    break 2
38368  fi
38369done
38370  done
38371IFS=$as_save_IFS
38372
38373fi
38374fi
38375OBJCOPY=$ac_cv_prog_OBJCOPY
38376if test -n "$OBJCOPY"; then
38377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38378$as_echo "$OBJCOPY" >&6; }
38379else
38380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38381$as_echo "no" >&6; }
38382fi
38383
38384
38385    test -n "$OBJCOPY" && break
38386  done
38387fi
38388if test -z "$OBJCOPY"; then
38389  ac_ct_OBJCOPY=$OBJCOPY
38390  for ac_prog in gobjcopy objcopy
38391do
38392  # Extract the first word of "$ac_prog", so it can be a program name with args.
38393set dummy $ac_prog; ac_word=$2
38394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38395$as_echo_n "checking for $ac_word... " >&6; }
38396if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38397  $as_echo_n "(cached) " >&6
38398else
38399  if test -n "$ac_ct_OBJCOPY"; then
38400  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38401else
38402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38403for as_dir in $PATH
38404do
38405  IFS=$as_save_IFS
38406  test -z "$as_dir" && as_dir=.
38407    for ac_exec_ext in '' $ac_executable_extensions; do
38408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38409    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38411    break 2
38412  fi
38413done
38414  done
38415IFS=$as_save_IFS
38416
38417fi
38418fi
38419ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38420if test -n "$ac_ct_OBJCOPY"; then
38421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38422$as_echo "$ac_ct_OBJCOPY" >&6; }
38423else
38424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38425$as_echo "no" >&6; }
38426fi
38427
38428
38429  test -n "$ac_ct_OBJCOPY" && break
38430done
38431
38432  if test "x$ac_ct_OBJCOPY" = x; then
38433    OBJCOPY=""
38434  else
38435    case $cross_compiling:$ac_tool_warned in
38436yes:)
38437{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38438$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38439ac_tool_warned=yes ;;
38440esac
38441    OBJCOPY=$ac_ct_OBJCOPY
38442  fi
38443fi
38444
38445    else
38446      # If it succeeded, then it was overridden by the user. We will use it
38447      # for the tool.
38448
38449      # First remove it from the list of overridden variables, so we can test
38450      # for unknown variables in the end.
38451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38452
38453      # Check if the provided tool contains a complete path.
38454      tool_specified="$OBJCOPY"
38455      tool_basename="${tool_specified##*/}"
38456      if test "x$tool_basename" = "x$tool_specified"; then
38457        # A command without a complete path is provided, search $PATH.
38458        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38459$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38460        # Extract the first word of "$tool_basename", so it can be a program name with args.
38461set dummy $tool_basename; ac_word=$2
38462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38463$as_echo_n "checking for $ac_word... " >&6; }
38464if ${ac_cv_path_OBJCOPY+:} false; then :
38465  $as_echo_n "(cached) " >&6
38466else
38467  case $OBJCOPY in
38468  [\\/]* | ?:[\\/]*)
38469  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38470  ;;
38471  *)
38472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38473for as_dir in $PATH
38474do
38475  IFS=$as_save_IFS
38476  test -z "$as_dir" && as_dir=.
38477    for ac_exec_ext in '' $ac_executable_extensions; do
38478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38479    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38481    break 2
38482  fi
38483done
38484  done
38485IFS=$as_save_IFS
38486
38487  ;;
38488esac
38489fi
38490OBJCOPY=$ac_cv_path_OBJCOPY
38491if test -n "$OBJCOPY"; then
38492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38493$as_echo "$OBJCOPY" >&6; }
38494else
38495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38496$as_echo "no" >&6; }
38497fi
38498
38499
38500        if test "x$OBJCOPY" = x; then
38501          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38502        fi
38503      else
38504        # Otherwise we believe it is a complete path. Use it as it is.
38505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38506$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38508$as_echo_n "checking for OBJCOPY... " >&6; }
38509        if test ! -x "$tool_specified"; then
38510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38511$as_echo "not found" >&6; }
38512          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38513        fi
38514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38515$as_echo "$tool_specified" >&6; }
38516      fi
38517    fi
38518  fi
38519
38520
38521    # Only call fixup if objcopy was found.
38522    if test -n "$OBJCOPY"; then
38523
38524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38525
38526  # First separate the path from the arguments. This will split at the first
38527  # space.
38528  complete="$OBJCOPY"
38529  path="${complete%% *}"
38530  tmp="$complete EOL"
38531  arguments="${tmp#* }"
38532
38533  # Input might be given as Windows format, start by converting to
38534  # unix format.
38535  new_path=`$CYGPATH -u "$path"`
38536
38537  # Now try to locate executable using which
38538  new_path=`$WHICH "$new_path" 2> /dev/null`
38539  # bat and cmd files are not always considered executable in cygwin causing which
38540  # to not find them
38541  if test "x$new_path" = x \
38542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38544    new_path=`$CYGPATH -u "$path"`
38545  fi
38546  if test "x$new_path" = x; then
38547    # Oops. Which didn't find the executable.
38548    # The splitting of arguments from the executable at a space might have been incorrect,
38549    # since paths with space are more likely in Windows. Give it another try with the whole
38550    # argument.
38551    path="$complete"
38552    arguments="EOL"
38553    new_path=`$CYGPATH -u "$path"`
38554    new_path=`$WHICH "$new_path" 2> /dev/null`
38555    # bat and cmd files are not always considered executable in cygwin causing which
38556    # to not find them
38557    if test "x$new_path" = x \
38558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38560      new_path=`$CYGPATH -u "$path"`
38561    fi
38562    if test "x$new_path" = x; then
38563      # It's still not found. Now this is an unrecoverable error.
38564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38565$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38566      has_space=`$ECHO "$complete" | $GREP " "`
38567      if test "x$has_space" != x; then
38568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38570      fi
38571      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38572    fi
38573  fi
38574
38575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38578  # "foo.exe" is OK but "foo" is an error.
38579  #
38580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38581  # It is also a way to make sure we got the proper file name for the real test later on.
38582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38583  if test "x$test_shortpath" = x; then
38584    # Short path failed, file does not exist as specified.
38585    # Try adding .exe or .cmd
38586    if test -f "${new_path}.exe"; then
38587      input_to_shortpath="${new_path}.exe"
38588    elif test -f "${new_path}.cmd"; then
38589      input_to_shortpath="${new_path}.cmd"
38590    else
38591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38592$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38595      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38596    fi
38597  else
38598    input_to_shortpath="$new_path"
38599  fi
38600
38601  # Call helper function which possibly converts this using DOS-style short mode.
38602  # If so, the updated path is stored in $new_path.
38603  new_path="$input_to_shortpath"
38604
38605  input_path="$input_to_shortpath"
38606  # Check if we need to convert this using DOS-style short mode. If the path
38607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38608  # take no chances and rewrite it.
38609  # Note: m4 eats our [], so we need to use [ and ] instead.
38610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38611  if test "x$has_forbidden_chars" != x; then
38612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38616      # Going to short mode and back again did indeed matter. Since short mode is
38617      # case insensitive, let's make it lowercase to improve readability.
38618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38619      # Now convert it back to Unix-stile (cygpath)
38620      input_path=`$CYGPATH -u "$shortmode_path"`
38621      new_path="$input_path"
38622    fi
38623  fi
38624
38625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38626  if test "x$test_cygdrive_prefix" = x; then
38627    # As a simple fix, exclude /usr/bin since it's not a real path.
38628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38630      # a path prefixed by /cygdrive for fixpath to work.
38631      new_path="$CYGWIN_ROOT_PATH$input_path"
38632    fi
38633  fi
38634
38635  # remove trailing .exe if any
38636  new_path="${new_path/%.exe/}"
38637
38638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38639
38640  # First separate the path from the arguments. This will split at the first
38641  # space.
38642  complete="$OBJCOPY"
38643  path="${complete%% *}"
38644  tmp="$complete EOL"
38645  arguments="${tmp#* }"
38646
38647  # Input might be given as Windows format, start by converting to
38648  # unix format.
38649  new_path="$path"
38650
38651  windows_path="$new_path"
38652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38653    unix_path=`$CYGPATH -u "$windows_path"`
38654    new_path="$unix_path"
38655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38657    new_path="$unix_path"
38658  fi
38659
38660
38661  # Now try to locate executable using which
38662  new_path=`$WHICH "$new_path" 2> /dev/null`
38663
38664  if test "x$new_path" = x; then
38665    # Oops. Which didn't find the executable.
38666    # The splitting of arguments from the executable at a space might have been incorrect,
38667    # since paths with space are more likely in Windows. Give it another try with the whole
38668    # argument.
38669    path="$complete"
38670    arguments="EOL"
38671    new_path="$path"
38672
38673  windows_path="$new_path"
38674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38675    unix_path=`$CYGPATH -u "$windows_path"`
38676    new_path="$unix_path"
38677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38679    new_path="$unix_path"
38680  fi
38681
38682
38683    new_path=`$WHICH "$new_path" 2> /dev/null`
38684    # bat and cmd files are not always considered executable in MSYS causing which
38685    # to not find them
38686    if test "x$new_path" = x \
38687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38689      new_path="$path"
38690
38691  windows_path="$new_path"
38692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38693    unix_path=`$CYGPATH -u "$windows_path"`
38694    new_path="$unix_path"
38695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38697    new_path="$unix_path"
38698  fi
38699
38700    fi
38701
38702    if test "x$new_path" = x; then
38703      # It's still not found. Now this is an unrecoverable error.
38704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38705$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38706      has_space=`$ECHO "$complete" | $GREP " "`
38707      if test "x$has_space" != x; then
38708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38710      fi
38711      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38712    fi
38713  fi
38714
38715  # Now new_path has a complete unix path to the binary
38716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38717    # Keep paths in /bin as-is, but remove trailing .exe if any
38718    new_path="${new_path/%.exe/}"
38719    # Do not save /bin paths to all_fixpath_prefixes!
38720  else
38721    # Not in mixed or Windows style, start by that.
38722    new_path=`cmd //c echo $new_path`
38723
38724  input_path="$new_path"
38725  # Check if we need to convert this using DOS-style short mode. If the path
38726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38727  # take no chances and rewrite it.
38728  # Note: m4 eats our [], so we need to use [ and ] instead.
38729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38730  if test "x$has_forbidden_chars" != x; then
38731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38733  fi
38734
38735    # Output is in $new_path
38736
38737  windows_path="$new_path"
38738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38739    unix_path=`$CYGPATH -u "$windows_path"`
38740    new_path="$unix_path"
38741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38743    new_path="$unix_path"
38744  fi
38745
38746    # remove trailing .exe if any
38747    new_path="${new_path/%.exe/}"
38748
38749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38751  fi
38752
38753  else
38754    # We're on a posix platform. Hooray! :)
38755    # First separate the path from the arguments. This will split at the first
38756    # space.
38757    complete="$OBJCOPY"
38758    path="${complete%% *}"
38759    tmp="$complete EOL"
38760    arguments="${tmp#* }"
38761
38762    # Cannot rely on the command "which" here since it doesn't always work.
38763    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38764    if test -z "$is_absolute_path"; then
38765      # Path to executable is not absolute. Find it.
38766      IFS_save="$IFS"
38767      IFS=:
38768      for p in $PATH; do
38769        if test -f "$p/$path" && test -x "$p/$path"; then
38770          new_path="$p/$path"
38771          break
38772        fi
38773      done
38774      IFS="$IFS_save"
38775    else
38776      # This is an absolute path, we can use it without further modifications.
38777      new_path="$path"
38778    fi
38779
38780    if test "x$new_path" = x; then
38781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38782$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38783      has_space=`$ECHO "$complete" | $GREP " "`
38784      if test "x$has_space" != x; then
38785        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38787      fi
38788      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38789    fi
38790  fi
38791
38792  # Now join together the path and the arguments once again
38793  if test "x$arguments" != xEOL; then
38794    new_complete="$new_path ${arguments% *}"
38795  else
38796    new_complete="$new_path"
38797  fi
38798
38799  if test "x$complete" != "x$new_complete"; then
38800    OBJCOPY="$new_complete"
38801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38802$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38803  fi
38804
38805    fi
38806  fi
38807
38808
38809
38810  # Publish this variable in the help.
38811
38812
38813  if test "x$OBJDUMP" = x; then
38814    # The variable is not set by user, try to locate tool using the code snippet
38815    if test -n "$ac_tool_prefix"; then
38816  for ac_prog in gobjdump objdump
38817  do
38818    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38819set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38821$as_echo_n "checking for $ac_word... " >&6; }
38822if ${ac_cv_prog_OBJDUMP+:} false; then :
38823  $as_echo_n "(cached) " >&6
38824else
38825  if test -n "$OBJDUMP"; then
38826  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38827else
38828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38829for as_dir in $PATH
38830do
38831  IFS=$as_save_IFS
38832  test -z "$as_dir" && as_dir=.
38833    for ac_exec_ext in '' $ac_executable_extensions; do
38834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38835    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38837    break 2
38838  fi
38839done
38840  done
38841IFS=$as_save_IFS
38842
38843fi
38844fi
38845OBJDUMP=$ac_cv_prog_OBJDUMP
38846if test -n "$OBJDUMP"; then
38847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38848$as_echo "$OBJDUMP" >&6; }
38849else
38850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38851$as_echo "no" >&6; }
38852fi
38853
38854
38855    test -n "$OBJDUMP" && break
38856  done
38857fi
38858if test -z "$OBJDUMP"; then
38859  ac_ct_OBJDUMP=$OBJDUMP
38860  for ac_prog in gobjdump objdump
38861do
38862  # Extract the first word of "$ac_prog", so it can be a program name with args.
38863set dummy $ac_prog; ac_word=$2
38864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38865$as_echo_n "checking for $ac_word... " >&6; }
38866if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38867  $as_echo_n "(cached) " >&6
38868else
38869  if test -n "$ac_ct_OBJDUMP"; then
38870  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38871else
38872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38873for as_dir in $PATH
38874do
38875  IFS=$as_save_IFS
38876  test -z "$as_dir" && as_dir=.
38877    for ac_exec_ext in '' $ac_executable_extensions; do
38878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38879    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38881    break 2
38882  fi
38883done
38884  done
38885IFS=$as_save_IFS
38886
38887fi
38888fi
38889ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38890if test -n "$ac_ct_OBJDUMP"; then
38891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38892$as_echo "$ac_ct_OBJDUMP" >&6; }
38893else
38894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38895$as_echo "no" >&6; }
38896fi
38897
38898
38899  test -n "$ac_ct_OBJDUMP" && break
38900done
38901
38902  if test "x$ac_ct_OBJDUMP" = x; then
38903    OBJDUMP=""
38904  else
38905    case $cross_compiling:$ac_tool_warned in
38906yes:)
38907{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38908$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38909ac_tool_warned=yes ;;
38910esac
38911    OBJDUMP=$ac_ct_OBJDUMP
38912  fi
38913fi
38914
38915  else
38916    # The variable is set, but is it from the command line or the environment?
38917
38918    # Try to remove the string !OBJDUMP! from our list.
38919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38921      # If it failed, the variable was not from the command line. Ignore it,
38922      # but warn the user (except for BASH, which is always set by the calling BASH).
38923      if test "xOBJDUMP" != xBASH; then
38924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38925$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38926      fi
38927      # Try to locate tool using the code snippet
38928      if test -n "$ac_tool_prefix"; then
38929  for ac_prog in gobjdump objdump
38930  do
38931    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38932set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38934$as_echo_n "checking for $ac_word... " >&6; }
38935if ${ac_cv_prog_OBJDUMP+:} false; then :
38936  $as_echo_n "(cached) " >&6
38937else
38938  if test -n "$OBJDUMP"; then
38939  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38940else
38941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38942for as_dir in $PATH
38943do
38944  IFS=$as_save_IFS
38945  test -z "$as_dir" && as_dir=.
38946    for ac_exec_ext in '' $ac_executable_extensions; do
38947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38948    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38950    break 2
38951  fi
38952done
38953  done
38954IFS=$as_save_IFS
38955
38956fi
38957fi
38958OBJDUMP=$ac_cv_prog_OBJDUMP
38959if test -n "$OBJDUMP"; then
38960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38961$as_echo "$OBJDUMP" >&6; }
38962else
38963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38964$as_echo "no" >&6; }
38965fi
38966
38967
38968    test -n "$OBJDUMP" && break
38969  done
38970fi
38971if test -z "$OBJDUMP"; then
38972  ac_ct_OBJDUMP=$OBJDUMP
38973  for ac_prog in gobjdump objdump
38974do
38975  # Extract the first word of "$ac_prog", so it can be a program name with args.
38976set dummy $ac_prog; ac_word=$2
38977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38978$as_echo_n "checking for $ac_word... " >&6; }
38979if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38980  $as_echo_n "(cached) " >&6
38981else
38982  if test -n "$ac_ct_OBJDUMP"; then
38983  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38984else
38985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38986for as_dir in $PATH
38987do
38988  IFS=$as_save_IFS
38989  test -z "$as_dir" && as_dir=.
38990    for ac_exec_ext in '' $ac_executable_extensions; do
38991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38992    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38994    break 2
38995  fi
38996done
38997  done
38998IFS=$as_save_IFS
38999
39000fi
39001fi
39002ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39003if test -n "$ac_ct_OBJDUMP"; then
39004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39005$as_echo "$ac_ct_OBJDUMP" >&6; }
39006else
39007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39008$as_echo "no" >&6; }
39009fi
39010
39011
39012  test -n "$ac_ct_OBJDUMP" && break
39013done
39014
39015  if test "x$ac_ct_OBJDUMP" = x; then
39016    OBJDUMP=""
39017  else
39018    case $cross_compiling:$ac_tool_warned in
39019yes:)
39020{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39021$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39022ac_tool_warned=yes ;;
39023esac
39024    OBJDUMP=$ac_ct_OBJDUMP
39025  fi
39026fi
39027
39028    else
39029      # If it succeeded, then it was overridden by the user. We will use it
39030      # for the tool.
39031
39032      # First remove it from the list of overridden variables, so we can test
39033      # for unknown variables in the end.
39034      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39035
39036      # Check if the provided tool contains a complete path.
39037      tool_specified="$OBJDUMP"
39038      tool_basename="${tool_specified##*/}"
39039      if test "x$tool_basename" = "x$tool_specified"; then
39040        # A command without a complete path is provided, search $PATH.
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39042$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39043        # Extract the first word of "$tool_basename", so it can be a program name with args.
39044set dummy $tool_basename; ac_word=$2
39045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39046$as_echo_n "checking for $ac_word... " >&6; }
39047if ${ac_cv_path_OBJDUMP+:} false; then :
39048  $as_echo_n "(cached) " >&6
39049else
39050  case $OBJDUMP in
39051  [\\/]* | ?:[\\/]*)
39052  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39053  ;;
39054  *)
39055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39056for as_dir in $PATH
39057do
39058  IFS=$as_save_IFS
39059  test -z "$as_dir" && as_dir=.
39060    for ac_exec_ext in '' $ac_executable_extensions; do
39061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39062    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39064    break 2
39065  fi
39066done
39067  done
39068IFS=$as_save_IFS
39069
39070  ;;
39071esac
39072fi
39073OBJDUMP=$ac_cv_path_OBJDUMP
39074if test -n "$OBJDUMP"; then
39075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39076$as_echo "$OBJDUMP" >&6; }
39077else
39078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39079$as_echo "no" >&6; }
39080fi
39081
39082
39083        if test "x$OBJDUMP" = x; then
39084          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39085        fi
39086      else
39087        # Otherwise we believe it is a complete path. Use it as it is.
39088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39089$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39091$as_echo_n "checking for OBJDUMP... " >&6; }
39092        if test ! -x "$tool_specified"; then
39093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39094$as_echo "not found" >&6; }
39095          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39096        fi
39097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39098$as_echo "$tool_specified" >&6; }
39099      fi
39100    fi
39101  fi
39102
39103
39104  if test "x$OBJDUMP" != x; then
39105    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39106    # bails if argument is missing.
39107
39108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39109
39110  # First separate the path from the arguments. This will split at the first
39111  # space.
39112  complete="$OBJDUMP"
39113  path="${complete%% *}"
39114  tmp="$complete EOL"
39115  arguments="${tmp#* }"
39116
39117  # Input might be given as Windows format, start by converting to
39118  # unix format.
39119  new_path=`$CYGPATH -u "$path"`
39120
39121  # Now try to locate executable using which
39122  new_path=`$WHICH "$new_path" 2> /dev/null`
39123  # bat and cmd files are not always considered executable in cygwin causing which
39124  # to not find them
39125  if test "x$new_path" = x \
39126      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39127      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39128    new_path=`$CYGPATH -u "$path"`
39129  fi
39130  if test "x$new_path" = x; then
39131    # Oops. Which didn't find the executable.
39132    # The splitting of arguments from the executable at a space might have been incorrect,
39133    # since paths with space are more likely in Windows. Give it another try with the whole
39134    # argument.
39135    path="$complete"
39136    arguments="EOL"
39137    new_path=`$CYGPATH -u "$path"`
39138    new_path=`$WHICH "$new_path" 2> /dev/null`
39139    # bat and cmd files are not always considered executable in cygwin causing which
39140    # to not find them
39141    if test "x$new_path" = x \
39142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39144      new_path=`$CYGPATH -u "$path"`
39145    fi
39146    if test "x$new_path" = x; then
39147      # It's still not found. Now this is an unrecoverable error.
39148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39149$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39150      has_space=`$ECHO "$complete" | $GREP " "`
39151      if test "x$has_space" != x; then
39152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39154      fi
39155      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39156    fi
39157  fi
39158
39159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39162  # "foo.exe" is OK but "foo" is an error.
39163  #
39164  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39165  # It is also a way to make sure we got the proper file name for the real test later on.
39166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39167  if test "x$test_shortpath" = x; then
39168    # Short path failed, file does not exist as specified.
39169    # Try adding .exe or .cmd
39170    if test -f "${new_path}.exe"; then
39171      input_to_shortpath="${new_path}.exe"
39172    elif test -f "${new_path}.cmd"; then
39173      input_to_shortpath="${new_path}.cmd"
39174    else
39175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39176$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39179      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39180    fi
39181  else
39182    input_to_shortpath="$new_path"
39183  fi
39184
39185  # Call helper function which possibly converts this using DOS-style short mode.
39186  # If so, the updated path is stored in $new_path.
39187  new_path="$input_to_shortpath"
39188
39189  input_path="$input_to_shortpath"
39190  # Check if we need to convert this using DOS-style short mode. If the path
39191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39192  # take no chances and rewrite it.
39193  # Note: m4 eats our [], so we need to use [ and ] instead.
39194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39195  if test "x$has_forbidden_chars" != x; then
39196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39200      # Going to short mode and back again did indeed matter. Since short mode is
39201      # case insensitive, let's make it lowercase to improve readability.
39202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39203      # Now convert it back to Unix-stile (cygpath)
39204      input_path=`$CYGPATH -u "$shortmode_path"`
39205      new_path="$input_path"
39206    fi
39207  fi
39208
39209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39210  if test "x$test_cygdrive_prefix" = x; then
39211    # As a simple fix, exclude /usr/bin since it's not a real path.
39212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39214      # a path prefixed by /cygdrive for fixpath to work.
39215      new_path="$CYGWIN_ROOT_PATH$input_path"
39216    fi
39217  fi
39218
39219  # remove trailing .exe if any
39220  new_path="${new_path/%.exe/}"
39221
39222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39223
39224  # First separate the path from the arguments. This will split at the first
39225  # space.
39226  complete="$OBJDUMP"
39227  path="${complete%% *}"
39228  tmp="$complete EOL"
39229  arguments="${tmp#* }"
39230
39231  # Input might be given as Windows format, start by converting to
39232  # unix format.
39233  new_path="$path"
39234
39235  windows_path="$new_path"
39236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39237    unix_path=`$CYGPATH -u "$windows_path"`
39238    new_path="$unix_path"
39239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39241    new_path="$unix_path"
39242  fi
39243
39244
39245  # Now try to locate executable using which
39246  new_path=`$WHICH "$new_path" 2> /dev/null`
39247
39248  if test "x$new_path" = x; then
39249    # Oops. Which didn't find the executable.
39250    # The splitting of arguments from the executable at a space might have been incorrect,
39251    # since paths with space are more likely in Windows. Give it another try with the whole
39252    # argument.
39253    path="$complete"
39254    arguments="EOL"
39255    new_path="$path"
39256
39257  windows_path="$new_path"
39258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39259    unix_path=`$CYGPATH -u "$windows_path"`
39260    new_path="$unix_path"
39261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39263    new_path="$unix_path"
39264  fi
39265
39266
39267    new_path=`$WHICH "$new_path" 2> /dev/null`
39268    # bat and cmd files are not always considered executable in MSYS causing which
39269    # to not find them
39270    if test "x$new_path" = x \
39271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39273      new_path="$path"
39274
39275  windows_path="$new_path"
39276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39277    unix_path=`$CYGPATH -u "$windows_path"`
39278    new_path="$unix_path"
39279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39281    new_path="$unix_path"
39282  fi
39283
39284    fi
39285
39286    if test "x$new_path" = x; then
39287      # It's still not found. Now this is an unrecoverable error.
39288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39289$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39290      has_space=`$ECHO "$complete" | $GREP " "`
39291      if test "x$has_space" != x; then
39292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39294      fi
39295      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39296    fi
39297  fi
39298
39299  # Now new_path has a complete unix path to the binary
39300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39301    # Keep paths in /bin as-is, but remove trailing .exe if any
39302    new_path="${new_path/%.exe/}"
39303    # Do not save /bin paths to all_fixpath_prefixes!
39304  else
39305    # Not in mixed or Windows style, start by that.
39306    new_path=`cmd //c echo $new_path`
39307
39308  input_path="$new_path"
39309  # Check if we need to convert this using DOS-style short mode. If the path
39310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39311  # take no chances and rewrite it.
39312  # Note: m4 eats our [], so we need to use [ and ] instead.
39313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39314  if test "x$has_forbidden_chars" != x; then
39315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39317  fi
39318
39319    # Output is in $new_path
39320
39321  windows_path="$new_path"
39322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39323    unix_path=`$CYGPATH -u "$windows_path"`
39324    new_path="$unix_path"
39325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39327    new_path="$unix_path"
39328  fi
39329
39330    # remove trailing .exe if any
39331    new_path="${new_path/%.exe/}"
39332
39333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39335  fi
39336
39337  else
39338    # We're on a posix platform. Hooray! :)
39339    # First separate the path from the arguments. This will split at the first
39340    # space.
39341    complete="$OBJDUMP"
39342    path="${complete%% *}"
39343    tmp="$complete EOL"
39344    arguments="${tmp#* }"
39345
39346    # Cannot rely on the command "which" here since it doesn't always work.
39347    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39348    if test -z "$is_absolute_path"; then
39349      # Path to executable is not absolute. Find it.
39350      IFS_save="$IFS"
39351      IFS=:
39352      for p in $PATH; do
39353        if test -f "$p/$path" && test -x "$p/$path"; then
39354          new_path="$p/$path"
39355          break
39356        fi
39357      done
39358      IFS="$IFS_save"
39359    else
39360      # This is an absolute path, we can use it without further modifications.
39361      new_path="$path"
39362    fi
39363
39364    if test "x$new_path" = x; then
39365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39366$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39367      has_space=`$ECHO "$complete" | $GREP " "`
39368      if test "x$has_space" != x; then
39369        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39370$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39371      fi
39372      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39373    fi
39374  fi
39375
39376  # Now join together the path and the arguments once again
39377  if test "x$arguments" != xEOL; then
39378    new_complete="$new_path ${arguments% *}"
39379  else
39380    new_complete="$new_path"
39381  fi
39382
39383  if test "x$complete" != "x$new_complete"; then
39384    OBJDUMP="$new_complete"
39385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39386$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39387  fi
39388
39389  fi
39390
39391
39392  # Restore old path.
39393  PATH="$OLD_PATH"
39394
39395  # Restore the flags to the user specified values.
39396  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39397  CFLAGS="$ORG_CFLAGS"
39398  CXXFLAGS="$ORG_CXXFLAGS"
39399  OBJCFLAGS="$ORG_OBJCFLAGS"
39400
39401
39402# Finally do some processing after the detection phase
39403
39404  if test "x$COMPILE_TYPE" = "xcross"; then
39405    # Now we need to find a C/C++ compiler that can build executables for the
39406    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39407    # used once. Also, we need to do this without adding a tools dir to the
39408    # path, otherwise we might pick up cross-compilers which don't use standard
39409    # naming.
39410
39411    # FIXME: we should list the discovered compilers as an exclude pattern!
39412    # If we do that, we can do this detection before POST_DETECTION, and still
39413    # find the build compilers in the tools dir, if needed.
39414
39415
39416  # Publish this variable in the help.
39417
39418
39419  if test "x$BUILD_CC" = x; then
39420    # The variable is not set by user, try to locate tool using the code snippet
39421    for ac_prog in cl cc gcc
39422do
39423  # Extract the first word of "$ac_prog", so it can be a program name with args.
39424set dummy $ac_prog; ac_word=$2
39425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39426$as_echo_n "checking for $ac_word... " >&6; }
39427if ${ac_cv_path_BUILD_CC+:} false; then :
39428  $as_echo_n "(cached) " >&6
39429else
39430  case $BUILD_CC in
39431  [\\/]* | ?:[\\/]*)
39432  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39433  ;;
39434  *)
39435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39436for as_dir in $PATH
39437do
39438  IFS=$as_save_IFS
39439  test -z "$as_dir" && as_dir=.
39440    for ac_exec_ext in '' $ac_executable_extensions; do
39441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39442    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39444    break 2
39445  fi
39446done
39447  done
39448IFS=$as_save_IFS
39449
39450  ;;
39451esac
39452fi
39453BUILD_CC=$ac_cv_path_BUILD_CC
39454if test -n "$BUILD_CC"; then
39455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39456$as_echo "$BUILD_CC" >&6; }
39457else
39458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39459$as_echo "no" >&6; }
39460fi
39461
39462
39463  test -n "$BUILD_CC" && break
39464done
39465
39466  else
39467    # The variable is set, but is it from the command line or the environment?
39468
39469    # Try to remove the string !BUILD_CC! from our list.
39470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39472      # If it failed, the variable was not from the command line. Ignore it,
39473      # but warn the user (except for BASH, which is always set by the calling BASH).
39474      if test "xBUILD_CC" != xBASH; then
39475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39476$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39477      fi
39478      # Try to locate tool using the code snippet
39479      for ac_prog in cl cc gcc
39480do
39481  # Extract the first word of "$ac_prog", so it can be a program name with args.
39482set dummy $ac_prog; ac_word=$2
39483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39484$as_echo_n "checking for $ac_word... " >&6; }
39485if ${ac_cv_path_BUILD_CC+:} false; then :
39486  $as_echo_n "(cached) " >&6
39487else
39488  case $BUILD_CC in
39489  [\\/]* | ?:[\\/]*)
39490  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39491  ;;
39492  *)
39493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39494for as_dir in $PATH
39495do
39496  IFS=$as_save_IFS
39497  test -z "$as_dir" && as_dir=.
39498    for ac_exec_ext in '' $ac_executable_extensions; do
39499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39500    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39502    break 2
39503  fi
39504done
39505  done
39506IFS=$as_save_IFS
39507
39508  ;;
39509esac
39510fi
39511BUILD_CC=$ac_cv_path_BUILD_CC
39512if test -n "$BUILD_CC"; then
39513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39514$as_echo "$BUILD_CC" >&6; }
39515else
39516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39517$as_echo "no" >&6; }
39518fi
39519
39520
39521  test -n "$BUILD_CC" && break
39522done
39523
39524    else
39525      # If it succeeded, then it was overridden by the user. We will use it
39526      # for the tool.
39527
39528      # First remove it from the list of overridden variables, so we can test
39529      # for unknown variables in the end.
39530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39531
39532      # Check if the provided tool contains a complete path.
39533      tool_specified="$BUILD_CC"
39534      tool_basename="${tool_specified##*/}"
39535      if test "x$tool_basename" = "x$tool_specified"; then
39536        # A command without a complete path is provided, search $PATH.
39537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39538$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39539        # Extract the first word of "$tool_basename", so it can be a program name with args.
39540set dummy $tool_basename; ac_word=$2
39541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39542$as_echo_n "checking for $ac_word... " >&6; }
39543if ${ac_cv_path_BUILD_CC+:} false; then :
39544  $as_echo_n "(cached) " >&6
39545else
39546  case $BUILD_CC in
39547  [\\/]* | ?:[\\/]*)
39548  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39549  ;;
39550  *)
39551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39552for as_dir in $PATH
39553do
39554  IFS=$as_save_IFS
39555  test -z "$as_dir" && as_dir=.
39556    for ac_exec_ext in '' $ac_executable_extensions; do
39557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39558    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39560    break 2
39561  fi
39562done
39563  done
39564IFS=$as_save_IFS
39565
39566  ;;
39567esac
39568fi
39569BUILD_CC=$ac_cv_path_BUILD_CC
39570if test -n "$BUILD_CC"; then
39571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39572$as_echo "$BUILD_CC" >&6; }
39573else
39574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39575$as_echo "no" >&6; }
39576fi
39577
39578
39579        if test "x$BUILD_CC" = x; then
39580          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39581        fi
39582      else
39583        # Otherwise we believe it is a complete path. Use it as it is.
39584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39585$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39587$as_echo_n "checking for BUILD_CC... " >&6; }
39588        if test ! -x "$tool_specified"; then
39589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39590$as_echo "not found" >&6; }
39591          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39592        fi
39593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39594$as_echo "$tool_specified" >&6; }
39595      fi
39596    fi
39597  fi
39598
39599
39600
39601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39602
39603  # First separate the path from the arguments. This will split at the first
39604  # space.
39605  complete="$BUILD_CC"
39606  path="${complete%% *}"
39607  tmp="$complete EOL"
39608  arguments="${tmp#* }"
39609
39610  # Input might be given as Windows format, start by converting to
39611  # unix format.
39612  new_path=`$CYGPATH -u "$path"`
39613
39614  # Now try to locate executable using which
39615  new_path=`$WHICH "$new_path" 2> /dev/null`
39616  # bat and cmd files are not always considered executable in cygwin causing which
39617  # to not find them
39618  if test "x$new_path" = x \
39619      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39620      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39621    new_path=`$CYGPATH -u "$path"`
39622  fi
39623  if test "x$new_path" = x; then
39624    # Oops. Which didn't find the executable.
39625    # The splitting of arguments from the executable at a space might have been incorrect,
39626    # since paths with space are more likely in Windows. Give it another try with the whole
39627    # argument.
39628    path="$complete"
39629    arguments="EOL"
39630    new_path=`$CYGPATH -u "$path"`
39631    new_path=`$WHICH "$new_path" 2> /dev/null`
39632    # bat and cmd files are not always considered executable in cygwin causing which
39633    # to not find them
39634    if test "x$new_path" = x \
39635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39637      new_path=`$CYGPATH -u "$path"`
39638    fi
39639    if test "x$new_path" = x; then
39640      # It's still not found. Now this is an unrecoverable error.
39641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39642$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39643      has_space=`$ECHO "$complete" | $GREP " "`
39644      if test "x$has_space" != x; then
39645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39647      fi
39648      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39649    fi
39650  fi
39651
39652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39655  # "foo.exe" is OK but "foo" is an error.
39656  #
39657  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39658  # It is also a way to make sure we got the proper file name for the real test later on.
39659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39660  if test "x$test_shortpath" = x; then
39661    # Short path failed, file does not exist as specified.
39662    # Try adding .exe or .cmd
39663    if test -f "${new_path}.exe"; then
39664      input_to_shortpath="${new_path}.exe"
39665    elif test -f "${new_path}.cmd"; then
39666      input_to_shortpath="${new_path}.cmd"
39667    else
39668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39669$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39670      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39671$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39672      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39673    fi
39674  else
39675    input_to_shortpath="$new_path"
39676  fi
39677
39678  # Call helper function which possibly converts this using DOS-style short mode.
39679  # If so, the updated path is stored in $new_path.
39680  new_path="$input_to_shortpath"
39681
39682  input_path="$input_to_shortpath"
39683  # Check if we need to convert this using DOS-style short mode. If the path
39684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39685  # take no chances and rewrite it.
39686  # Note: m4 eats our [], so we need to use [ and ] instead.
39687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39688  if test "x$has_forbidden_chars" != x; then
39689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39693      # Going to short mode and back again did indeed matter. Since short mode is
39694      # case insensitive, let's make it lowercase to improve readability.
39695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39696      # Now convert it back to Unix-stile (cygpath)
39697      input_path=`$CYGPATH -u "$shortmode_path"`
39698      new_path="$input_path"
39699    fi
39700  fi
39701
39702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39703  if test "x$test_cygdrive_prefix" = x; then
39704    # As a simple fix, exclude /usr/bin since it's not a real path.
39705    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39707      # a path prefixed by /cygdrive for fixpath to work.
39708      new_path="$CYGWIN_ROOT_PATH$input_path"
39709    fi
39710  fi
39711
39712  # remove trailing .exe if any
39713  new_path="${new_path/%.exe/}"
39714
39715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39716
39717  # First separate the path from the arguments. This will split at the first
39718  # space.
39719  complete="$BUILD_CC"
39720  path="${complete%% *}"
39721  tmp="$complete EOL"
39722  arguments="${tmp#* }"
39723
39724  # Input might be given as Windows format, start by converting to
39725  # unix format.
39726  new_path="$path"
39727
39728  windows_path="$new_path"
39729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39730    unix_path=`$CYGPATH -u "$windows_path"`
39731    new_path="$unix_path"
39732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39734    new_path="$unix_path"
39735  fi
39736
39737
39738  # Now try to locate executable using which
39739  new_path=`$WHICH "$new_path" 2> /dev/null`
39740
39741  if test "x$new_path" = x; then
39742    # Oops. Which didn't find the executable.
39743    # The splitting of arguments from the executable at a space might have been incorrect,
39744    # since paths with space are more likely in Windows. Give it another try with the whole
39745    # argument.
39746    path="$complete"
39747    arguments="EOL"
39748    new_path="$path"
39749
39750  windows_path="$new_path"
39751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39752    unix_path=`$CYGPATH -u "$windows_path"`
39753    new_path="$unix_path"
39754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39756    new_path="$unix_path"
39757  fi
39758
39759
39760    new_path=`$WHICH "$new_path" 2> /dev/null`
39761    # bat and cmd files are not always considered executable in MSYS causing which
39762    # to not find them
39763    if test "x$new_path" = x \
39764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39766      new_path="$path"
39767
39768  windows_path="$new_path"
39769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39770    unix_path=`$CYGPATH -u "$windows_path"`
39771    new_path="$unix_path"
39772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39774    new_path="$unix_path"
39775  fi
39776
39777    fi
39778
39779    if test "x$new_path" = x; then
39780      # It's still not found. Now this is an unrecoverable error.
39781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39782$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39783      has_space=`$ECHO "$complete" | $GREP " "`
39784      if test "x$has_space" != x; then
39785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39787      fi
39788      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39789    fi
39790  fi
39791
39792  # Now new_path has a complete unix path to the binary
39793  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39794    # Keep paths in /bin as-is, but remove trailing .exe if any
39795    new_path="${new_path/%.exe/}"
39796    # Do not save /bin paths to all_fixpath_prefixes!
39797  else
39798    # Not in mixed or Windows style, start by that.
39799    new_path=`cmd //c echo $new_path`
39800
39801  input_path="$new_path"
39802  # Check if we need to convert this using DOS-style short mode. If the path
39803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39804  # take no chances and rewrite it.
39805  # Note: m4 eats our [], so we need to use [ and ] instead.
39806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39807  if test "x$has_forbidden_chars" != x; then
39808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39810  fi
39811
39812    # Output is in $new_path
39813
39814  windows_path="$new_path"
39815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39816    unix_path=`$CYGPATH -u "$windows_path"`
39817    new_path="$unix_path"
39818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39820    new_path="$unix_path"
39821  fi
39822
39823    # remove trailing .exe if any
39824    new_path="${new_path/%.exe/}"
39825
39826    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39827    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39828  fi
39829
39830  else
39831    # We're on a posix platform. Hooray! :)
39832    # First separate the path from the arguments. This will split at the first
39833    # space.
39834    complete="$BUILD_CC"
39835    path="${complete%% *}"
39836    tmp="$complete EOL"
39837    arguments="${tmp#* }"
39838
39839    # Cannot rely on the command "which" here since it doesn't always work.
39840    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39841    if test -z "$is_absolute_path"; then
39842      # Path to executable is not absolute. Find it.
39843      IFS_save="$IFS"
39844      IFS=:
39845      for p in $PATH; do
39846        if test -f "$p/$path" && test -x "$p/$path"; then
39847          new_path="$p/$path"
39848          break
39849        fi
39850      done
39851      IFS="$IFS_save"
39852    else
39853      # This is an absolute path, we can use it without further modifications.
39854      new_path="$path"
39855    fi
39856
39857    if test "x$new_path" = x; then
39858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39859$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39860      has_space=`$ECHO "$complete" | $GREP " "`
39861      if test "x$has_space" != x; then
39862        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39863$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39864      fi
39865      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39866    fi
39867  fi
39868
39869  # Now join together the path and the arguments once again
39870  if test "x$arguments" != xEOL; then
39871    new_complete="$new_path ${arguments% *}"
39872  else
39873    new_complete="$new_path"
39874  fi
39875
39876  if test "x$complete" != "x$new_complete"; then
39877    BUILD_CC="$new_complete"
39878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39879$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39880  fi
39881
39882
39883
39884  # Publish this variable in the help.
39885
39886
39887  if test "x$BUILD_CXX" = x; then
39888    # The variable is not set by user, try to locate tool using the code snippet
39889    for ac_prog in cl CC g++
39890do
39891  # Extract the first word of "$ac_prog", so it can be a program name with args.
39892set dummy $ac_prog; ac_word=$2
39893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39894$as_echo_n "checking for $ac_word... " >&6; }
39895if ${ac_cv_path_BUILD_CXX+:} false; then :
39896  $as_echo_n "(cached) " >&6
39897else
39898  case $BUILD_CXX in
39899  [\\/]* | ?:[\\/]*)
39900  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39901  ;;
39902  *)
39903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39904for as_dir in $PATH
39905do
39906  IFS=$as_save_IFS
39907  test -z "$as_dir" && as_dir=.
39908    for ac_exec_ext in '' $ac_executable_extensions; do
39909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39910    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39912    break 2
39913  fi
39914done
39915  done
39916IFS=$as_save_IFS
39917
39918  ;;
39919esac
39920fi
39921BUILD_CXX=$ac_cv_path_BUILD_CXX
39922if test -n "$BUILD_CXX"; then
39923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39924$as_echo "$BUILD_CXX" >&6; }
39925else
39926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39927$as_echo "no" >&6; }
39928fi
39929
39930
39931  test -n "$BUILD_CXX" && break
39932done
39933
39934  else
39935    # The variable is set, but is it from the command line or the environment?
39936
39937    # Try to remove the string !BUILD_CXX! from our list.
39938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39940      # If it failed, the variable was not from the command line. Ignore it,
39941      # but warn the user (except for BASH, which is always set by the calling BASH).
39942      if test "xBUILD_CXX" != xBASH; then
39943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39944$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39945      fi
39946      # Try to locate tool using the code snippet
39947      for ac_prog in cl CC g++
39948do
39949  # Extract the first word of "$ac_prog", so it can be a program name with args.
39950set dummy $ac_prog; ac_word=$2
39951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39952$as_echo_n "checking for $ac_word... " >&6; }
39953if ${ac_cv_path_BUILD_CXX+:} false; then :
39954  $as_echo_n "(cached) " >&6
39955else
39956  case $BUILD_CXX in
39957  [\\/]* | ?:[\\/]*)
39958  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39959  ;;
39960  *)
39961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39962for as_dir in $PATH
39963do
39964  IFS=$as_save_IFS
39965  test -z "$as_dir" && as_dir=.
39966    for ac_exec_ext in '' $ac_executable_extensions; do
39967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39968    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39970    break 2
39971  fi
39972done
39973  done
39974IFS=$as_save_IFS
39975
39976  ;;
39977esac
39978fi
39979BUILD_CXX=$ac_cv_path_BUILD_CXX
39980if test -n "$BUILD_CXX"; then
39981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39982$as_echo "$BUILD_CXX" >&6; }
39983else
39984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39985$as_echo "no" >&6; }
39986fi
39987
39988
39989  test -n "$BUILD_CXX" && break
39990done
39991
39992    else
39993      # If it succeeded, then it was overridden by the user. We will use it
39994      # for the tool.
39995
39996      # First remove it from the list of overridden variables, so we can test
39997      # for unknown variables in the end.
39998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39999
40000      # Check if the provided tool contains a complete path.
40001      tool_specified="$BUILD_CXX"
40002      tool_basename="${tool_specified##*/}"
40003      if test "x$tool_basename" = "x$tool_specified"; then
40004        # A command without a complete path is provided, search $PATH.
40005        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40006$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40007        # Extract the first word of "$tool_basename", so it can be a program name with args.
40008set dummy $tool_basename; ac_word=$2
40009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40010$as_echo_n "checking for $ac_word... " >&6; }
40011if ${ac_cv_path_BUILD_CXX+:} false; then :
40012  $as_echo_n "(cached) " >&6
40013else
40014  case $BUILD_CXX in
40015  [\\/]* | ?:[\\/]*)
40016  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40017  ;;
40018  *)
40019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40020for as_dir in $PATH
40021do
40022  IFS=$as_save_IFS
40023  test -z "$as_dir" && as_dir=.
40024    for ac_exec_ext in '' $ac_executable_extensions; do
40025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40026    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40028    break 2
40029  fi
40030done
40031  done
40032IFS=$as_save_IFS
40033
40034  ;;
40035esac
40036fi
40037BUILD_CXX=$ac_cv_path_BUILD_CXX
40038if test -n "$BUILD_CXX"; then
40039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40040$as_echo "$BUILD_CXX" >&6; }
40041else
40042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40043$as_echo "no" >&6; }
40044fi
40045
40046
40047        if test "x$BUILD_CXX" = x; then
40048          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40049        fi
40050      else
40051        # Otherwise we believe it is a complete path. Use it as it is.
40052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40053$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40055$as_echo_n "checking for BUILD_CXX... " >&6; }
40056        if test ! -x "$tool_specified"; then
40057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40058$as_echo "not found" >&6; }
40059          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40060        fi
40061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40062$as_echo "$tool_specified" >&6; }
40063      fi
40064    fi
40065  fi
40066
40067
40068
40069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40070
40071  # First separate the path from the arguments. This will split at the first
40072  # space.
40073  complete="$BUILD_CXX"
40074  path="${complete%% *}"
40075  tmp="$complete EOL"
40076  arguments="${tmp#* }"
40077
40078  # Input might be given as Windows format, start by converting to
40079  # unix format.
40080  new_path=`$CYGPATH -u "$path"`
40081
40082  # Now try to locate executable using which
40083  new_path=`$WHICH "$new_path" 2> /dev/null`
40084  # bat and cmd files are not always considered executable in cygwin causing which
40085  # to not find them
40086  if test "x$new_path" = x \
40087      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40088      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40089    new_path=`$CYGPATH -u "$path"`
40090  fi
40091  if test "x$new_path" = x; then
40092    # Oops. Which didn't find the executable.
40093    # The splitting of arguments from the executable at a space might have been incorrect,
40094    # since paths with space are more likely in Windows. Give it another try with the whole
40095    # argument.
40096    path="$complete"
40097    arguments="EOL"
40098    new_path=`$CYGPATH -u "$path"`
40099    new_path=`$WHICH "$new_path" 2> /dev/null`
40100    # bat and cmd files are not always considered executable in cygwin causing which
40101    # to not find them
40102    if test "x$new_path" = x \
40103        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40104        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40105      new_path=`$CYGPATH -u "$path"`
40106    fi
40107    if test "x$new_path" = x; then
40108      # It's still not found. Now this is an unrecoverable error.
40109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40110$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40111      has_space=`$ECHO "$complete" | $GREP " "`
40112      if test "x$has_space" != x; then
40113        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40114$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40115      fi
40116      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40117    fi
40118  fi
40119
40120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40123  # "foo.exe" is OK but "foo" is an error.
40124  #
40125  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40126  # It is also a way to make sure we got the proper file name for the real test later on.
40127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40128  if test "x$test_shortpath" = x; then
40129    # Short path failed, file does not exist as specified.
40130    # Try adding .exe or .cmd
40131    if test -f "${new_path}.exe"; then
40132      input_to_shortpath="${new_path}.exe"
40133    elif test -f "${new_path}.cmd"; then
40134      input_to_shortpath="${new_path}.cmd"
40135    else
40136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40137$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40138      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40139$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40140      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40141    fi
40142  else
40143    input_to_shortpath="$new_path"
40144  fi
40145
40146  # Call helper function which possibly converts this using DOS-style short mode.
40147  # If so, the updated path is stored in $new_path.
40148  new_path="$input_to_shortpath"
40149
40150  input_path="$input_to_shortpath"
40151  # Check if we need to convert this using DOS-style short mode. If the path
40152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40153  # take no chances and rewrite it.
40154  # Note: m4 eats our [], so we need to use [ and ] instead.
40155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40156  if test "x$has_forbidden_chars" != x; then
40157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40161      # Going to short mode and back again did indeed matter. Since short mode is
40162      # case insensitive, let's make it lowercase to improve readability.
40163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40164      # Now convert it back to Unix-stile (cygpath)
40165      input_path=`$CYGPATH -u "$shortmode_path"`
40166      new_path="$input_path"
40167    fi
40168  fi
40169
40170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40171  if test "x$test_cygdrive_prefix" = x; then
40172    # As a simple fix, exclude /usr/bin since it's not a real path.
40173    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40175      # a path prefixed by /cygdrive for fixpath to work.
40176      new_path="$CYGWIN_ROOT_PATH$input_path"
40177    fi
40178  fi
40179
40180  # remove trailing .exe if any
40181  new_path="${new_path/%.exe/}"
40182
40183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40184
40185  # First separate the path from the arguments. This will split at the first
40186  # space.
40187  complete="$BUILD_CXX"
40188  path="${complete%% *}"
40189  tmp="$complete EOL"
40190  arguments="${tmp#* }"
40191
40192  # Input might be given as Windows format, start by converting to
40193  # unix format.
40194  new_path="$path"
40195
40196  windows_path="$new_path"
40197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40198    unix_path=`$CYGPATH -u "$windows_path"`
40199    new_path="$unix_path"
40200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40202    new_path="$unix_path"
40203  fi
40204
40205
40206  # Now try to locate executable using which
40207  new_path=`$WHICH "$new_path" 2> /dev/null`
40208
40209  if test "x$new_path" = x; then
40210    # Oops. Which didn't find the executable.
40211    # The splitting of arguments from the executable at a space might have been incorrect,
40212    # since paths with space are more likely in Windows. Give it another try with the whole
40213    # argument.
40214    path="$complete"
40215    arguments="EOL"
40216    new_path="$path"
40217
40218  windows_path="$new_path"
40219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40220    unix_path=`$CYGPATH -u "$windows_path"`
40221    new_path="$unix_path"
40222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40224    new_path="$unix_path"
40225  fi
40226
40227
40228    new_path=`$WHICH "$new_path" 2> /dev/null`
40229    # bat and cmd files are not always considered executable in MSYS causing which
40230    # to not find them
40231    if test "x$new_path" = x \
40232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40234      new_path="$path"
40235
40236  windows_path="$new_path"
40237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40238    unix_path=`$CYGPATH -u "$windows_path"`
40239    new_path="$unix_path"
40240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40242    new_path="$unix_path"
40243  fi
40244
40245    fi
40246
40247    if test "x$new_path" = x; then
40248      # It's still not found. Now this is an unrecoverable error.
40249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40250$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40251      has_space=`$ECHO "$complete" | $GREP " "`
40252      if test "x$has_space" != x; then
40253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40255      fi
40256      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40257    fi
40258  fi
40259
40260  # Now new_path has a complete unix path to the binary
40261  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40262    # Keep paths in /bin as-is, but remove trailing .exe if any
40263    new_path="${new_path/%.exe/}"
40264    # Do not save /bin paths to all_fixpath_prefixes!
40265  else
40266    # Not in mixed or Windows style, start by that.
40267    new_path=`cmd //c echo $new_path`
40268
40269  input_path="$new_path"
40270  # Check if we need to convert this using DOS-style short mode. If the path
40271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40272  # take no chances and rewrite it.
40273  # Note: m4 eats our [], so we need to use [ and ] instead.
40274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40275  if test "x$has_forbidden_chars" != x; then
40276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40278  fi
40279
40280    # Output is in $new_path
40281
40282  windows_path="$new_path"
40283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40284    unix_path=`$CYGPATH -u "$windows_path"`
40285    new_path="$unix_path"
40286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40288    new_path="$unix_path"
40289  fi
40290
40291    # remove trailing .exe if any
40292    new_path="${new_path/%.exe/}"
40293
40294    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40295    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40296  fi
40297
40298  else
40299    # We're on a posix platform. Hooray! :)
40300    # First separate the path from the arguments. This will split at the first
40301    # space.
40302    complete="$BUILD_CXX"
40303    path="${complete%% *}"
40304    tmp="$complete EOL"
40305    arguments="${tmp#* }"
40306
40307    # Cannot rely on the command "which" here since it doesn't always work.
40308    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40309    if test -z "$is_absolute_path"; then
40310      # Path to executable is not absolute. Find it.
40311      IFS_save="$IFS"
40312      IFS=:
40313      for p in $PATH; do
40314        if test -f "$p/$path" && test -x "$p/$path"; then
40315          new_path="$p/$path"
40316          break
40317        fi
40318      done
40319      IFS="$IFS_save"
40320    else
40321      # This is an absolute path, we can use it without further modifications.
40322      new_path="$path"
40323    fi
40324
40325    if test "x$new_path" = x; then
40326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40327$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40328      has_space=`$ECHO "$complete" | $GREP " "`
40329      if test "x$has_space" != x; then
40330        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40331$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40332      fi
40333      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40334    fi
40335  fi
40336
40337  # Now join together the path and the arguments once again
40338  if test "x$arguments" != xEOL; then
40339    new_complete="$new_path ${arguments% *}"
40340  else
40341    new_complete="$new_path"
40342  fi
40343
40344  if test "x$complete" != "x$new_complete"; then
40345    BUILD_CXX="$new_complete"
40346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40347$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40348  fi
40349
40350
40351
40352  # Publish this variable in the help.
40353
40354
40355  if test "x$BUILD_LD" = x; then
40356    # The variable is not set by user, try to locate tool using the code snippet
40357    for ac_prog in ld
40358do
40359  # Extract the first word of "$ac_prog", so it can be a program name with args.
40360set dummy $ac_prog; ac_word=$2
40361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40362$as_echo_n "checking for $ac_word... " >&6; }
40363if ${ac_cv_path_BUILD_LD+:} false; then :
40364  $as_echo_n "(cached) " >&6
40365else
40366  case $BUILD_LD in
40367  [\\/]* | ?:[\\/]*)
40368  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40369  ;;
40370  *)
40371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40372for as_dir in $PATH
40373do
40374  IFS=$as_save_IFS
40375  test -z "$as_dir" && as_dir=.
40376    for ac_exec_ext in '' $ac_executable_extensions; do
40377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40378    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40380    break 2
40381  fi
40382done
40383  done
40384IFS=$as_save_IFS
40385
40386  ;;
40387esac
40388fi
40389BUILD_LD=$ac_cv_path_BUILD_LD
40390if test -n "$BUILD_LD"; then
40391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40392$as_echo "$BUILD_LD" >&6; }
40393else
40394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40395$as_echo "no" >&6; }
40396fi
40397
40398
40399  test -n "$BUILD_LD" && break
40400done
40401
40402  else
40403    # The variable is set, but is it from the command line or the environment?
40404
40405    # Try to remove the string !BUILD_LD! from our list.
40406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40408      # If it failed, the variable was not from the command line. Ignore it,
40409      # but warn the user (except for BASH, which is always set by the calling BASH).
40410      if test "xBUILD_LD" != xBASH; then
40411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40412$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40413      fi
40414      # Try to locate tool using the code snippet
40415      for ac_prog in ld
40416do
40417  # Extract the first word of "$ac_prog", so it can be a program name with args.
40418set dummy $ac_prog; ac_word=$2
40419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40420$as_echo_n "checking for $ac_word... " >&6; }
40421if ${ac_cv_path_BUILD_LD+:} false; then :
40422  $as_echo_n "(cached) " >&6
40423else
40424  case $BUILD_LD in
40425  [\\/]* | ?:[\\/]*)
40426  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40427  ;;
40428  *)
40429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40430for as_dir in $PATH
40431do
40432  IFS=$as_save_IFS
40433  test -z "$as_dir" && as_dir=.
40434    for ac_exec_ext in '' $ac_executable_extensions; do
40435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40436    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40438    break 2
40439  fi
40440done
40441  done
40442IFS=$as_save_IFS
40443
40444  ;;
40445esac
40446fi
40447BUILD_LD=$ac_cv_path_BUILD_LD
40448if test -n "$BUILD_LD"; then
40449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40450$as_echo "$BUILD_LD" >&6; }
40451else
40452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40453$as_echo "no" >&6; }
40454fi
40455
40456
40457  test -n "$BUILD_LD" && break
40458done
40459
40460    else
40461      # If it succeeded, then it was overridden by the user. We will use it
40462      # for the tool.
40463
40464      # First remove it from the list of overridden variables, so we can test
40465      # for unknown variables in the end.
40466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40467
40468      # Check if the provided tool contains a complete path.
40469      tool_specified="$BUILD_LD"
40470      tool_basename="${tool_specified##*/}"
40471      if test "x$tool_basename" = "x$tool_specified"; then
40472        # A command without a complete path is provided, search $PATH.
40473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40474$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40475        # Extract the first word of "$tool_basename", so it can be a program name with args.
40476set dummy $tool_basename; ac_word=$2
40477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40478$as_echo_n "checking for $ac_word... " >&6; }
40479if ${ac_cv_path_BUILD_LD+:} false; then :
40480  $as_echo_n "(cached) " >&6
40481else
40482  case $BUILD_LD in
40483  [\\/]* | ?:[\\/]*)
40484  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40485  ;;
40486  *)
40487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40488for as_dir in $PATH
40489do
40490  IFS=$as_save_IFS
40491  test -z "$as_dir" && as_dir=.
40492    for ac_exec_ext in '' $ac_executable_extensions; do
40493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40494    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40496    break 2
40497  fi
40498done
40499  done
40500IFS=$as_save_IFS
40501
40502  ;;
40503esac
40504fi
40505BUILD_LD=$ac_cv_path_BUILD_LD
40506if test -n "$BUILD_LD"; then
40507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40508$as_echo "$BUILD_LD" >&6; }
40509else
40510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40511$as_echo "no" >&6; }
40512fi
40513
40514
40515        if test "x$BUILD_LD" = x; then
40516          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40517        fi
40518      else
40519        # Otherwise we believe it is a complete path. Use it as it is.
40520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40521$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40523$as_echo_n "checking for BUILD_LD... " >&6; }
40524        if test ! -x "$tool_specified"; then
40525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40526$as_echo "not found" >&6; }
40527          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40528        fi
40529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40530$as_echo "$tool_specified" >&6; }
40531      fi
40532    fi
40533  fi
40534
40535
40536
40537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40538
40539  # First separate the path from the arguments. This will split at the first
40540  # space.
40541  complete="$BUILD_LD"
40542  path="${complete%% *}"
40543  tmp="$complete EOL"
40544  arguments="${tmp#* }"
40545
40546  # Input might be given as Windows format, start by converting to
40547  # unix format.
40548  new_path=`$CYGPATH -u "$path"`
40549
40550  # Now try to locate executable using which
40551  new_path=`$WHICH "$new_path" 2> /dev/null`
40552  # bat and cmd files are not always considered executable in cygwin causing which
40553  # to not find them
40554  if test "x$new_path" = x \
40555      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40556      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40557    new_path=`$CYGPATH -u "$path"`
40558  fi
40559  if test "x$new_path" = x; then
40560    # Oops. Which didn't find the executable.
40561    # The splitting of arguments from the executable at a space might have been incorrect,
40562    # since paths with space are more likely in Windows. Give it another try with the whole
40563    # argument.
40564    path="$complete"
40565    arguments="EOL"
40566    new_path=`$CYGPATH -u "$path"`
40567    new_path=`$WHICH "$new_path" 2> /dev/null`
40568    # bat and cmd files are not always considered executable in cygwin causing which
40569    # to not find them
40570    if test "x$new_path" = x \
40571        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40572        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40573      new_path=`$CYGPATH -u "$path"`
40574    fi
40575    if test "x$new_path" = x; then
40576      # It's still not found. Now this is an unrecoverable error.
40577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40578$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40579      has_space=`$ECHO "$complete" | $GREP " "`
40580      if test "x$has_space" != x; then
40581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40583      fi
40584      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40585    fi
40586  fi
40587
40588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40591  # "foo.exe" is OK but "foo" is an error.
40592  #
40593  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40594  # It is also a way to make sure we got the proper file name for the real test later on.
40595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40596  if test "x$test_shortpath" = x; then
40597    # Short path failed, file does not exist as specified.
40598    # Try adding .exe or .cmd
40599    if test -f "${new_path}.exe"; then
40600      input_to_shortpath="${new_path}.exe"
40601    elif test -f "${new_path}.cmd"; then
40602      input_to_shortpath="${new_path}.cmd"
40603    else
40604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40605$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40606      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40607$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40608      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40609    fi
40610  else
40611    input_to_shortpath="$new_path"
40612  fi
40613
40614  # Call helper function which possibly converts this using DOS-style short mode.
40615  # If so, the updated path is stored in $new_path.
40616  new_path="$input_to_shortpath"
40617
40618  input_path="$input_to_shortpath"
40619  # Check if we need to convert this using DOS-style short mode. If the path
40620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40621  # take no chances and rewrite it.
40622  # Note: m4 eats our [], so we need to use [ and ] instead.
40623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40624  if test "x$has_forbidden_chars" != x; then
40625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40629      # Going to short mode and back again did indeed matter. Since short mode is
40630      # case insensitive, let's make it lowercase to improve readability.
40631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40632      # Now convert it back to Unix-stile (cygpath)
40633      input_path=`$CYGPATH -u "$shortmode_path"`
40634      new_path="$input_path"
40635    fi
40636  fi
40637
40638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40639  if test "x$test_cygdrive_prefix" = x; then
40640    # As a simple fix, exclude /usr/bin since it's not a real path.
40641    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40643      # a path prefixed by /cygdrive for fixpath to work.
40644      new_path="$CYGWIN_ROOT_PATH$input_path"
40645    fi
40646  fi
40647
40648  # remove trailing .exe if any
40649  new_path="${new_path/%.exe/}"
40650
40651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40652
40653  # First separate the path from the arguments. This will split at the first
40654  # space.
40655  complete="$BUILD_LD"
40656  path="${complete%% *}"
40657  tmp="$complete EOL"
40658  arguments="${tmp#* }"
40659
40660  # Input might be given as Windows format, start by converting to
40661  # unix format.
40662  new_path="$path"
40663
40664  windows_path="$new_path"
40665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40666    unix_path=`$CYGPATH -u "$windows_path"`
40667    new_path="$unix_path"
40668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40670    new_path="$unix_path"
40671  fi
40672
40673
40674  # Now try to locate executable using which
40675  new_path=`$WHICH "$new_path" 2> /dev/null`
40676
40677  if test "x$new_path" = x; then
40678    # Oops. Which didn't find the executable.
40679    # The splitting of arguments from the executable at a space might have been incorrect,
40680    # since paths with space are more likely in Windows. Give it another try with the whole
40681    # argument.
40682    path="$complete"
40683    arguments="EOL"
40684    new_path="$path"
40685
40686  windows_path="$new_path"
40687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40688    unix_path=`$CYGPATH -u "$windows_path"`
40689    new_path="$unix_path"
40690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40692    new_path="$unix_path"
40693  fi
40694
40695
40696    new_path=`$WHICH "$new_path" 2> /dev/null`
40697    # bat and cmd files are not always considered executable in MSYS causing which
40698    # to not find them
40699    if test "x$new_path" = x \
40700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40702      new_path="$path"
40703
40704  windows_path="$new_path"
40705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40706    unix_path=`$CYGPATH -u "$windows_path"`
40707    new_path="$unix_path"
40708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40710    new_path="$unix_path"
40711  fi
40712
40713    fi
40714
40715    if test "x$new_path" = x; then
40716      # It's still not found. Now this is an unrecoverable error.
40717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40718$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40719      has_space=`$ECHO "$complete" | $GREP " "`
40720      if test "x$has_space" != x; then
40721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40723      fi
40724      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40725    fi
40726  fi
40727
40728  # Now new_path has a complete unix path to the binary
40729  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40730    # Keep paths in /bin as-is, but remove trailing .exe if any
40731    new_path="${new_path/%.exe/}"
40732    # Do not save /bin paths to all_fixpath_prefixes!
40733  else
40734    # Not in mixed or Windows style, start by that.
40735    new_path=`cmd //c echo $new_path`
40736
40737  input_path="$new_path"
40738  # Check if we need to convert this using DOS-style short mode. If the path
40739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40740  # take no chances and rewrite it.
40741  # Note: m4 eats our [], so we need to use [ and ] instead.
40742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40743  if test "x$has_forbidden_chars" != x; then
40744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40746  fi
40747
40748    # Output is in $new_path
40749
40750  windows_path="$new_path"
40751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40752    unix_path=`$CYGPATH -u "$windows_path"`
40753    new_path="$unix_path"
40754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40756    new_path="$unix_path"
40757  fi
40758
40759    # remove trailing .exe if any
40760    new_path="${new_path/%.exe/}"
40761
40762    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40763    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40764  fi
40765
40766  else
40767    # We're on a posix platform. Hooray! :)
40768    # First separate the path from the arguments. This will split at the first
40769    # space.
40770    complete="$BUILD_LD"
40771    path="${complete%% *}"
40772    tmp="$complete EOL"
40773    arguments="${tmp#* }"
40774
40775    # Cannot rely on the command "which" here since it doesn't always work.
40776    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40777    if test -z "$is_absolute_path"; then
40778      # Path to executable is not absolute. Find it.
40779      IFS_save="$IFS"
40780      IFS=:
40781      for p in $PATH; do
40782        if test -f "$p/$path" && test -x "$p/$path"; then
40783          new_path="$p/$path"
40784          break
40785        fi
40786      done
40787      IFS="$IFS_save"
40788    else
40789      # This is an absolute path, we can use it without further modifications.
40790      new_path="$path"
40791    fi
40792
40793    if test "x$new_path" = x; then
40794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40795$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40796      has_space=`$ECHO "$complete" | $GREP " "`
40797      if test "x$has_space" != x; then
40798        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40799$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40800      fi
40801      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40802    fi
40803  fi
40804
40805  # Now join together the path and the arguments once again
40806  if test "x$arguments" != xEOL; then
40807    new_complete="$new_path ${arguments% *}"
40808  else
40809    new_complete="$new_path"
40810  fi
40811
40812  if test "x$complete" != "x$new_complete"; then
40813    BUILD_LD="$new_complete"
40814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40815$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40816  fi
40817
40818  else
40819    # If we are not cross compiling, use the normal target compilers for
40820    # building the build platform executables.
40821    BUILD_CC="$CC"
40822    BUILD_CXX="$CXX"
40823    BUILD_LD="$LD"
40824  fi
40825
40826
40827
40828
40829
40830
40831  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40832    # For hotspot, we need these in Windows mixed path,
40833    # so rewrite them all. Need added .exe suffix.
40834    HOTSPOT_CXX="$CXX.exe"
40835    HOTSPOT_LD="$LD.exe"
40836    HOTSPOT_MT="$MT.exe"
40837    HOTSPOT_RC="$RC.exe"
40838
40839  unix_path="$HOTSPOT_CXX"
40840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40841    windows_path=`$CYGPATH -m "$unix_path"`
40842    HOTSPOT_CXX="$windows_path"
40843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40844    windows_path=`cmd //c echo $unix_path`
40845    HOTSPOT_CXX="$windows_path"
40846  fi
40847
40848
40849  unix_path="$HOTSPOT_LD"
40850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40851    windows_path=`$CYGPATH -m "$unix_path"`
40852    HOTSPOT_LD="$windows_path"
40853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40854    windows_path=`cmd //c echo $unix_path`
40855    HOTSPOT_LD="$windows_path"
40856  fi
40857
40858
40859  unix_path="$HOTSPOT_MT"
40860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40861    windows_path=`$CYGPATH -m "$unix_path"`
40862    HOTSPOT_MT="$windows_path"
40863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40864    windows_path=`cmd //c echo $unix_path`
40865    HOTSPOT_MT="$windows_path"
40866  fi
40867
40868
40869  unix_path="$HOTSPOT_RC"
40870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40871    windows_path=`$CYGPATH -m "$unix_path"`
40872    HOTSPOT_RC="$windows_path"
40873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40874    windows_path=`cmd //c echo $unix_path`
40875    HOTSPOT_RC="$windows_path"
40876  fi
40877
40878
40879
40880  else
40881    HOTSPOT_CXX="$CXX"
40882    HOTSPOT_LD="$LD"
40883  fi
40884
40885
40886
40887  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40888    USE_CLANG=true
40889  fi
40890
40891
40892  # LDEXE is the linker to use, when creating executables. Not really used.
40893  # FIXME: These should just be removed!
40894  LDEXE="$LD"
40895  LDEXECXX="$LDCXX"
40896
40897
40898
40899
40900
40901
40902  # The package path is used only on macosx?
40903  # FIXME: clean this up, and/or move it elsewhere.
40904  PACKAGE_PATH=/opt/local
40905
40906
40907  # Check for extra potential brokenness.
40908  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40909    # On Windows, double-check that we got the right compiler.
40910    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40911    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40912    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40913      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40914        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40915      fi
40916    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40917      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40918        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40919      fi
40920    fi
40921  fi
40922
40923  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40924    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40925    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40926    # This is later checked when setting flags.
40927
40928    # "-Og" suppported for GCC 4.8 and later
40929    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40930
40931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40932$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40933  supports=yes
40934
40935  saved_cflags="$CFLAGS"
40936  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40937  ac_ext=c
40938ac_cpp='$CPP $CPPFLAGS'
40939ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40940ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40941ac_compiler_gnu=$ac_cv_c_compiler_gnu
40942
40943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40944/* end confdefs.h.  */
40945int i;
40946_ACEOF
40947if ac_fn_c_try_compile "$LINENO"; then :
40948
40949else
40950  supports=no
40951fi
40952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40953  ac_ext=cpp
40954ac_cpp='$CXXCPP $CPPFLAGS'
40955ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40956ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40957ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40958
40959  CFLAGS="$saved_cflags"
40960
40961  saved_cxxflags="$CXXFLAGS"
40962  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40963  ac_ext=cpp
40964ac_cpp='$CXXCPP $CPPFLAGS'
40965ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40966ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40967ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40968
40969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40970/* end confdefs.h.  */
40971int i;
40972_ACEOF
40973if ac_fn_cxx_try_compile "$LINENO"; then :
40974
40975else
40976  supports=no
40977fi
40978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40979  ac_ext=cpp
40980ac_cpp='$CXXCPP $CPPFLAGS'
40981ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40982ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40983ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40984
40985  CXXFLAGS="$saved_cxxflags"
40986
40987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40988$as_echo "$supports" >&6; }
40989  if test "x$supports" = "xyes" ; then
40990    HAS_CFLAG_OPTIMIZE_DEBUG=true
40991  else
40992    HAS_CFLAG_OPTIMIZE_DEBUG=false
40993  fi
40994
40995
40996    # "-fsanitize=undefined" supported for GCC 4.9 and later
40997    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
40998
40999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
41000$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
41001  supports=yes
41002
41003  saved_cflags="$CFLAGS"
41004  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41005  ac_ext=c
41006ac_cpp='$CPP $CPPFLAGS'
41007ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41008ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41009ac_compiler_gnu=$ac_cv_c_compiler_gnu
41010
41011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41012/* end confdefs.h.  */
41013int i;
41014_ACEOF
41015if ac_fn_c_try_compile "$LINENO"; then :
41016
41017else
41018  supports=no
41019fi
41020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41021  ac_ext=cpp
41022ac_cpp='$CXXCPP $CPPFLAGS'
41023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41026
41027  CFLAGS="$saved_cflags"
41028
41029  saved_cxxflags="$CXXFLAGS"
41030  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41031  ac_ext=cpp
41032ac_cpp='$CXXCPP $CPPFLAGS'
41033ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41034ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41035ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41036
41037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41038/* end confdefs.h.  */
41039int i;
41040_ACEOF
41041if ac_fn_cxx_try_compile "$LINENO"; then :
41042
41043else
41044  supports=no
41045fi
41046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41047  ac_ext=cpp
41048ac_cpp='$CXXCPP $CPPFLAGS'
41049ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41050ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41051ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41052
41053  CXXFLAGS="$saved_cxxflags"
41054
41055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41056$as_echo "$supports" >&6; }
41057  if test "x$supports" = "xyes" ; then
41058    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
41059  else
41060    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
41061  fi
41062
41063
41064    # "-z relro" supported in GNU binutils 2.17 and later
41065    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41066
41067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41068$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41069  supports=yes
41070
41071  saved_ldflags="$LDFLAGS"
41072  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41073  ac_ext=c
41074ac_cpp='$CPP $CPPFLAGS'
41075ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41076ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41077ac_compiler_gnu=$ac_cv_c_compiler_gnu
41078
41079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41080/* end confdefs.h.  */
41081
41082int
41083main ()
41084{
41085
41086  ;
41087  return 0;
41088}
41089_ACEOF
41090if ac_fn_c_try_link "$LINENO"; then :
41091
41092else
41093  supports=no
41094fi
41095rm -f core conftest.err conftest.$ac_objext \
41096    conftest$ac_exeext conftest.$ac_ext
41097  ac_ext=cpp
41098ac_cpp='$CXXCPP $CPPFLAGS'
41099ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41100ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41101ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41102
41103  LDFLAGS="$saved_ldflags"
41104
41105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41106$as_echo "$supports" >&6; }
41107  if test "x$supports" = "xyes" ; then
41108    HAS_LINKER_RELRO=true
41109  else
41110    HAS_LINKER_RELRO=false
41111  fi
41112
41113
41114    # "-z now" supported in GNU binutils 2.11 and later
41115    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41116
41117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41118$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41119  supports=yes
41120
41121  saved_ldflags="$LDFLAGS"
41122  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41123  ac_ext=c
41124ac_cpp='$CPP $CPPFLAGS'
41125ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41126ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41127ac_compiler_gnu=$ac_cv_c_compiler_gnu
41128
41129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41130/* end confdefs.h.  */
41131
41132int
41133main ()
41134{
41135
41136  ;
41137  return 0;
41138}
41139_ACEOF
41140if ac_fn_c_try_link "$LINENO"; then :
41141
41142else
41143  supports=no
41144fi
41145rm -f core conftest.err conftest.$ac_objext \
41146    conftest$ac_exeext conftest.$ac_ext
41147  ac_ext=cpp
41148ac_cpp='$CXXCPP $CPPFLAGS'
41149ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41150ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41151ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41152
41153  LDFLAGS="$saved_ldflags"
41154
41155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41156$as_echo "$supports" >&6; }
41157  if test "x$supports" = "xyes" ; then
41158    HAS_LINKER_NOW=true
41159  else
41160    HAS_LINKER_NOW=false
41161  fi
41162
41163  fi
41164
41165  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41166  # in executable.'
41167  USING_BROKEN_SUSE_LD=no
41168  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41170$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41171    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41172    $ECHO "int main() { }" > main.c
41173    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41175$as_echo "no" >&6; }
41176      USING_BROKEN_SUSE_LD=no
41177    else
41178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41179$as_echo "yes" >&6; }
41180      USING_BROKEN_SUSE_LD=yes
41181    fi
41182    rm -rf version-script.map main.c a.out
41183  fi
41184
41185
41186
41187# Setup the JTReg Regression Test Harness.
41188
41189
41190# Check whether --with-jtreg was given.
41191if test "${with_jtreg+set}" = set; then :
41192  withval=$with_jtreg;
41193else
41194  with_jtreg=no
41195fi
41196
41197
41198  if test "x$with_jtreg" = xno; then
41199    # jtreg disabled
41200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41201$as_echo_n "checking for jtreg... " >&6; }
41202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41203$as_echo "no" >&6; }
41204  else
41205    if test "x$with_jtreg" != xyes; then
41206      # with path specified.
41207      JT_HOME="$with_jtreg"
41208    fi
41209
41210    if test "x$JT_HOME" != x; then
41211      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41212$as_echo_n "checking for jtreg... " >&6; }
41213
41214      # use JT_HOME enviroment var.
41215
41216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41217
41218  # Input might be given as Windows format, start by converting to
41219  # unix format.
41220  path="$JT_HOME"
41221  new_path=`$CYGPATH -u "$path"`
41222
41223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41226  # "foo.exe" is OK but "foo" is an error.
41227  #
41228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41229  # It is also a way to make sure we got the proper file name for the real test later on.
41230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41231  if test "x$test_shortpath" = x; then
41232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41233$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41234    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41235  fi
41236
41237  # Call helper function which possibly converts this using DOS-style short mode.
41238  # If so, the updated path is stored in $new_path.
41239
41240  input_path="$new_path"
41241  # Check if we need to convert this using DOS-style short mode. If the path
41242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41243  # take no chances and rewrite it.
41244  # Note: m4 eats our [], so we need to use [ and ] instead.
41245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41246  if test "x$has_forbidden_chars" != x; then
41247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41251      # Going to short mode and back again did indeed matter. Since short mode is
41252      # case insensitive, let's make it lowercase to improve readability.
41253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41254      # Now convert it back to Unix-stile (cygpath)
41255      input_path=`$CYGPATH -u "$shortmode_path"`
41256      new_path="$input_path"
41257    fi
41258  fi
41259
41260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41261  if test "x$test_cygdrive_prefix" = x; then
41262    # As a simple fix, exclude /usr/bin since it's not a real path.
41263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41265      # a path prefixed by /cygdrive for fixpath to work.
41266      new_path="$CYGWIN_ROOT_PATH$input_path"
41267    fi
41268  fi
41269
41270
41271  if test "x$path" != "x$new_path"; then
41272    JT_HOME="$new_path"
41273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41274$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41275  fi
41276
41277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41278
41279  path="$JT_HOME"
41280  has_colon=`$ECHO $path | $GREP ^.:`
41281  new_path="$path"
41282  if test "x$has_colon" = x; then
41283    # Not in mixed or Windows style, start by that.
41284    new_path=`cmd //c echo $path`
41285  fi
41286
41287
41288  input_path="$new_path"
41289  # Check if we need to convert this using DOS-style short mode. If the path
41290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41291  # take no chances and rewrite it.
41292  # Note: m4 eats our [], so we need to use [ and ] instead.
41293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41294  if test "x$has_forbidden_chars" != x; then
41295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41297  fi
41298
41299
41300  windows_path="$new_path"
41301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41302    unix_path=`$CYGPATH -u "$windows_path"`
41303    new_path="$unix_path"
41304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41306    new_path="$unix_path"
41307  fi
41308
41309  if test "x$path" != "x$new_path"; then
41310    JT_HOME="$new_path"
41311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41312$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41313  fi
41314
41315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41317
41318  else
41319    # We're on a posix platform. Hooray! :)
41320    path="$JT_HOME"
41321    has_space=`$ECHO "$path" | $GREP " "`
41322    if test "x$has_space" != x; then
41323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41324$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41325      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41326    fi
41327
41328    # Use eval to expand a potential ~
41329    eval path="$path"
41330    if test ! -f "$path" && test ! -d "$path"; then
41331      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41332    fi
41333
41334    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41335  fi
41336
41337
41338      # jtreg win32 script works for everybody
41339      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41340
41341      if test ! -f "$JTREGEXE"; then
41342        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41343      fi
41344
41345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41346$as_echo "$JTREGEXE" >&6; }
41347    else
41348      # try to find jtreg on path
41349
41350
41351
41352  # Publish this variable in the help.
41353
41354
41355  if test "x$JTREGEXE" = x; then
41356    # The variable is not set by user, try to locate tool using the code snippet
41357    for ac_prog in jtreg
41358do
41359  # Extract the first word of "$ac_prog", so it can be a program name with args.
41360set dummy $ac_prog; ac_word=$2
41361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41362$as_echo_n "checking for $ac_word... " >&6; }
41363if ${ac_cv_path_JTREGEXE+:} false; then :
41364  $as_echo_n "(cached) " >&6
41365else
41366  case $JTREGEXE in
41367  [\\/]* | ?:[\\/]*)
41368  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41369  ;;
41370  *)
41371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41372for as_dir in $PATH
41373do
41374  IFS=$as_save_IFS
41375  test -z "$as_dir" && as_dir=.
41376    for ac_exec_ext in '' $ac_executable_extensions; do
41377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41378    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41380    break 2
41381  fi
41382done
41383  done
41384IFS=$as_save_IFS
41385
41386  ;;
41387esac
41388fi
41389JTREGEXE=$ac_cv_path_JTREGEXE
41390if test -n "$JTREGEXE"; then
41391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41392$as_echo "$JTREGEXE" >&6; }
41393else
41394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41395$as_echo "no" >&6; }
41396fi
41397
41398
41399  test -n "$JTREGEXE" && break
41400done
41401
41402  else
41403    # The variable is set, but is it from the command line or the environment?
41404
41405    # Try to remove the string !JTREGEXE! from our list.
41406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41408      # If it failed, the variable was not from the command line. Ignore it,
41409      # but warn the user (except for BASH, which is always set by the calling BASH).
41410      if test "xJTREGEXE" != xBASH; then
41411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41412$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41413      fi
41414      # Try to locate tool using the code snippet
41415      for ac_prog in jtreg
41416do
41417  # Extract the first word of "$ac_prog", so it can be a program name with args.
41418set dummy $ac_prog; ac_word=$2
41419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41420$as_echo_n "checking for $ac_word... " >&6; }
41421if ${ac_cv_path_JTREGEXE+:} false; then :
41422  $as_echo_n "(cached) " >&6
41423else
41424  case $JTREGEXE in
41425  [\\/]* | ?:[\\/]*)
41426  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41427  ;;
41428  *)
41429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41430for as_dir in $PATH
41431do
41432  IFS=$as_save_IFS
41433  test -z "$as_dir" && as_dir=.
41434    for ac_exec_ext in '' $ac_executable_extensions; do
41435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41436    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41438    break 2
41439  fi
41440done
41441  done
41442IFS=$as_save_IFS
41443
41444  ;;
41445esac
41446fi
41447JTREGEXE=$ac_cv_path_JTREGEXE
41448if test -n "$JTREGEXE"; then
41449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41450$as_echo "$JTREGEXE" >&6; }
41451else
41452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41453$as_echo "no" >&6; }
41454fi
41455
41456
41457  test -n "$JTREGEXE" && break
41458done
41459
41460    else
41461      # If it succeeded, then it was overridden by the user. We will use it
41462      # for the tool.
41463
41464      # First remove it from the list of overridden variables, so we can test
41465      # for unknown variables in the end.
41466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41467
41468      # Check if the provided tool contains a complete path.
41469      tool_specified="$JTREGEXE"
41470      tool_basename="${tool_specified##*/}"
41471      if test "x$tool_basename" = "x$tool_specified"; then
41472        # A command without a complete path is provided, search $PATH.
41473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41474$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41475        # Extract the first word of "$tool_basename", so it can be a program name with args.
41476set dummy $tool_basename; ac_word=$2
41477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41478$as_echo_n "checking for $ac_word... " >&6; }
41479if ${ac_cv_path_JTREGEXE+:} false; then :
41480  $as_echo_n "(cached) " >&6
41481else
41482  case $JTREGEXE in
41483  [\\/]* | ?:[\\/]*)
41484  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41485  ;;
41486  *)
41487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41488for as_dir in $PATH
41489do
41490  IFS=$as_save_IFS
41491  test -z "$as_dir" && as_dir=.
41492    for ac_exec_ext in '' $ac_executable_extensions; do
41493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41494    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41496    break 2
41497  fi
41498done
41499  done
41500IFS=$as_save_IFS
41501
41502  ;;
41503esac
41504fi
41505JTREGEXE=$ac_cv_path_JTREGEXE
41506if test -n "$JTREGEXE"; then
41507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41508$as_echo "$JTREGEXE" >&6; }
41509else
41510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41511$as_echo "no" >&6; }
41512fi
41513
41514
41515        if test "x$JTREGEXE" = x; then
41516          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41517        fi
41518      else
41519        # Otherwise we believe it is a complete path. Use it as it is.
41520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41521$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41523$as_echo_n "checking for JTREGEXE... " >&6; }
41524        if test ! -x "$tool_specified"; then
41525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41526$as_echo "not found" >&6; }
41527          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41528        fi
41529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41530$as_echo "$tool_specified" >&6; }
41531      fi
41532    fi
41533  fi
41534
41535
41536
41537  if test "x$JTREGEXE" = x; then
41538    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41539  fi
41540
41541
41542      JT_HOME="`$DIRNAME $JTREGEXE`"
41543    fi
41544  fi
41545
41546
41547
41548
41549
41550
41551  # Option used to tell the compiler whether to create 32- or 64-bit executables
41552  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41553    COMPILER_TARGET_BITS_FLAG="-q"
41554  else
41555    COMPILER_TARGET_BITS_FLAG="-m"
41556  fi
41557
41558
41559  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41560  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41561    ARFLAGS="-r"
41562  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41563    ARFLAGS="-X64"
41564  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41565    # lib.exe is used as AR to create static libraries.
41566    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41567  else
41568    ARFLAGS=""
41569  fi
41570
41571
41572  ## Setup strip.
41573  # FIXME: should this really be per platform, or should it be per toolchain type?
41574  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41575  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41576  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41577    STRIPFLAGS="-g"
41578  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41579    STRIPFLAGS="-x"
41580  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41581    STRIPFLAGS="-S"
41582  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41583    STRIPFLAGS="-X32_64"
41584  fi
41585
41586  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41587    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41588  fi
41589
41590
41591  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41592    # FIXME: break out into MCSFLAGS
41593    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41594  fi
41595
41596
41597  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41598    CC_OUT_OPTION=-Fo
41599    EXE_OUT_OPTION=-out:
41600    LD_OUT_OPTION=-out:
41601    AR_OUT_OPTION=-out:
41602  else
41603    # The option used to specify the target .o,.a or .so file.
41604    # When compiling, how to specify the to be created object file.
41605    CC_OUT_OPTION='-o$(SPACE)'
41606    # When linking, how to specify the to be created executable.
41607    EXE_OUT_OPTION='-o$(SPACE)'
41608    # When linking, how to specify the to be created dynamically linkable library.
41609    LD_OUT_OPTION='-o$(SPACE)'
41610    # When archiving, how to specify the to be create static archive for object files.
41611    AR_OUT_OPTION='rcs$(SPACE)'
41612  fi
41613
41614
41615
41616
41617
41618  # On Windows, we need to set RC flags.
41619  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41620    RC_FLAGS="-nologo -l 0x409 -r"
41621    if test "x$VARIANT" = xOPT; then
41622      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41623    fi
41624
41625    # The version variables used to create RC_FLAGS may be overridden
41626    # in a custom configure script, or possibly the command line.
41627    # Let those variables be expanded at make time in spec.gmk.
41628    # The \$ are escaped to the shell, and the $(...) variables
41629    # are evaluated by make.
41630    RC_FLAGS="$RC_FLAGS \
41631        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41632        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41633        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41634        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41635        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41636        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41637        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41638  fi
41639
41640
41641  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41642    # silence copyright notice and other headers.
41643    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41644  fi
41645
41646  if test "x$SYSROOT" != "x"; then
41647    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41648      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41649        # Solaris Studio does not have a concept of sysroot. Instead we must
41650        # make sure the default include and lib dirs are appended to each
41651        # compile and link command line.
41652        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41653        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41654            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41655            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41656      fi
41657    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41658      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41659      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41660      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41661    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41662      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41663      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41664    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41665      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41666      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41667    fi
41668    # Propagate the sysroot args to hotspot
41669    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41670    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41671    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41672  fi
41673
41674  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41675  # set this here so it doesn't have to be peppered throughout the forest
41676  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41677    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41678    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41679  fi
41680
41681
41682
41683
41684
41685# FIXME: Currently we must test this after toolchain but before flags. Fix!
41686
41687# Now we can test some aspects on the target using configure macros.
41688
41689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41690$as_echo_n "checking for ANSI C header files... " >&6; }
41691if ${ac_cv_header_stdc+:} false; then :
41692  $as_echo_n "(cached) " >&6
41693else
41694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41695/* end confdefs.h.  */
41696#include <stdlib.h>
41697#include <stdarg.h>
41698#include <string.h>
41699#include <float.h>
41700
41701int
41702main ()
41703{
41704
41705  ;
41706  return 0;
41707}
41708_ACEOF
41709if ac_fn_cxx_try_compile "$LINENO"; then :
41710  ac_cv_header_stdc=yes
41711else
41712  ac_cv_header_stdc=no
41713fi
41714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41715
41716if test $ac_cv_header_stdc = yes; then
41717  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41719/* end confdefs.h.  */
41720#include <string.h>
41721
41722_ACEOF
41723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41724  $EGREP "memchr" >/dev/null 2>&1; then :
41725
41726else
41727  ac_cv_header_stdc=no
41728fi
41729rm -f conftest*
41730
41731fi
41732
41733if test $ac_cv_header_stdc = yes; then
41734  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41736/* end confdefs.h.  */
41737#include <stdlib.h>
41738
41739_ACEOF
41740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41741  $EGREP "free" >/dev/null 2>&1; then :
41742
41743else
41744  ac_cv_header_stdc=no
41745fi
41746rm -f conftest*
41747
41748fi
41749
41750if test $ac_cv_header_stdc = yes; then
41751  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41752  if test "$cross_compiling" = yes; then :
41753  :
41754else
41755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41756/* end confdefs.h.  */
41757#include <ctype.h>
41758#include <stdlib.h>
41759#if ((' ' & 0x0FF) == 0x020)
41760# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41761# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41762#else
41763# define ISLOWER(c) \
41764		   (('a' <= (c) && (c) <= 'i') \
41765		     || ('j' <= (c) && (c) <= 'r') \
41766		     || ('s' <= (c) && (c) <= 'z'))
41767# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41768#endif
41769
41770#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41771int
41772main ()
41773{
41774  int i;
41775  for (i = 0; i < 256; i++)
41776    if (XOR (islower (i), ISLOWER (i))
41777	|| toupper (i) != TOUPPER (i))
41778      return 2;
41779  return 0;
41780}
41781_ACEOF
41782if ac_fn_cxx_try_run "$LINENO"; then :
41783
41784else
41785  ac_cv_header_stdc=no
41786fi
41787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41788  conftest.$ac_objext conftest.beam conftest.$ac_ext
41789fi
41790
41791fi
41792fi
41793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41794$as_echo "$ac_cv_header_stdc" >&6; }
41795if test $ac_cv_header_stdc = yes; then
41796
41797$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41798
41799fi
41800
41801# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41802for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41803		  inttypes.h stdint.h unistd.h
41804do :
41805  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41806ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41807"
41808if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41809  cat >>confdefs.h <<_ACEOF
41810#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41811_ACEOF
41812
41813fi
41814
41815done
41816
41817
41818
41819  ###############################################################################
41820  #
41821  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41822  # (The JVM can use 32 or 64 bit Java pointers but that decision
41823  # is made at runtime.)
41824  #
41825
41826  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41827    # Always specify -m flag on Solaris
41828    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41829
41830  # When we add flags to the "official" CFLAGS etc, we need to
41831  # keep track of these additions in ADDED_CFLAGS etc. These
41832  # will later be checked to make sure only controlled additions
41833  # have been made to CFLAGS etc.
41834  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41835  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41836  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41837
41838  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41839  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41840  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41841
41842  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41843  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41844  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41845
41846  elif test "x$COMPILE_TYPE" = xreduced; then
41847    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41848      # Specify -m if running reduced on other Posix platforms
41849
41850  # When we add flags to the "official" CFLAGS etc, we need to
41851  # keep track of these additions in ADDED_CFLAGS etc. These
41852  # will later be checked to make sure only controlled additions
41853  # have been made to CFLAGS etc.
41854  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41855  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41856  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41857
41858  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41859  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41860  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41861
41862  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41863  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41864  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41865
41866    fi
41867  fi
41868
41869  # Make compilation sanity check
41870  for ac_header in stdio.h
41871do :
41872  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41873if test "x$ac_cv_header_stdio_h" = xyes; then :
41874  cat >>confdefs.h <<_ACEOF
41875#define HAVE_STDIO_H 1
41876_ACEOF
41877
41878else
41879
41880    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41881$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41882    if test "x$COMPILE_TYPE" = xreduced; then
41883      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41884$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41885    elif test "x$COMPILE_TYPE" = xcross; then
41886      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41887$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41888    fi
41889    as_fn_error $? "Cannot continue." "$LINENO" 5
41890
41891fi
41892
41893done
41894
41895
41896  # The cast to long int works around a bug in the HP C Compiler
41897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41899# This bug is HP SR number 8606223364.
41900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41901$as_echo_n "checking size of int *... " >&6; }
41902if ${ac_cv_sizeof_int_p+:} false; then :
41903  $as_echo_n "(cached) " >&6
41904else
41905  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41906
41907else
41908  if test "$ac_cv_type_int_p" = yes; then
41909     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41911as_fn_error 77 "cannot compute sizeof (int *)
41912See \`config.log' for more details" "$LINENO" 5; }
41913   else
41914     ac_cv_sizeof_int_p=0
41915   fi
41916fi
41917
41918fi
41919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41920$as_echo "$ac_cv_sizeof_int_p" >&6; }
41921
41922
41923
41924cat >>confdefs.h <<_ACEOF
41925#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41926_ACEOF
41927
41928
41929
41930  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41931  if test "x$ac_cv_sizeof_int_p" = x; then
41932    # The test failed, lets stick to the assumed value.
41933    { $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
41934$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41935  else
41936    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41937
41938    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41939      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41940      # Let's try to implicitely set the compilers target architecture and retry the test
41941      { $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
41942$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;}
41943      { $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
41944$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;}
41945
41946  # When we add flags to the "official" CFLAGS etc, we need to
41947  # keep track of these additions in ADDED_CFLAGS etc. These
41948  # will later be checked to make sure only controlled additions
41949  # have been made to CFLAGS etc.
41950  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41951  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41952  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41953
41954  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41955  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41956  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41957
41958  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41959  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41960  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41961
41962
41963      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41964      unset ac_cv_sizeof_int_p
41965      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41966      cat >>confdefs.h <<_ACEOF
41967#undef SIZEOF_INT_P
41968_ACEOF
41969
41970      # The cast to long int works around a bug in the HP C Compiler
41971# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41972# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41973# This bug is HP SR number 8606223364.
41974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41975$as_echo_n "checking size of int *... " >&6; }
41976if ${ac_cv_sizeof_int_p+:} false; then :
41977  $as_echo_n "(cached) " >&6
41978else
41979  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41980
41981else
41982  if test "$ac_cv_type_int_p" = yes; then
41983     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41985as_fn_error 77 "cannot compute sizeof (int *)
41986See \`config.log' for more details" "$LINENO" 5; }
41987   else
41988     ac_cv_sizeof_int_p=0
41989   fi
41990fi
41991
41992fi
41993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41994$as_echo "$ac_cv_sizeof_int_p" >&6; }
41995
41996
41997
41998cat >>confdefs.h <<_ACEOF
41999#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42000_ACEOF
42001
42002
42003
42004      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42005
42006      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42007        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
42008      fi
42009    fi
42010  fi
42011
42012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42013$as_echo_n "checking for target address size... " >&6; }
42014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42015$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42016
42017
42018  ###############################################################################
42019  #
42020  # Is the target little of big endian?
42021  #
42022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42023$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42024if ${ac_cv_c_bigendian+:} false; then :
42025  $as_echo_n "(cached) " >&6
42026else
42027  ac_cv_c_bigendian=unknown
42028    # See if we're dealing with a universal compiler.
42029    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42030/* end confdefs.h.  */
42031#ifndef __APPLE_CC__
42032	       not a universal capable compiler
42033	     #endif
42034	     typedef int dummy;
42035
42036_ACEOF
42037if ac_fn_cxx_try_compile "$LINENO"; then :
42038
42039	# Check for potential -arch flags.  It is not universal unless
42040	# there are at least two -arch flags with different values.
42041	ac_arch=
42042	ac_prev=
42043	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42044	 if test -n "$ac_prev"; then
42045	   case $ac_word in
42046	     i?86 | x86_64 | ppc | ppc64)
42047	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42048		 ac_arch=$ac_word
42049	       else
42050		 ac_cv_c_bigendian=universal
42051		 break
42052	       fi
42053	       ;;
42054	   esac
42055	   ac_prev=
42056	 elif test "x$ac_word" = "x-arch"; then
42057	   ac_prev=arch
42058	 fi
42059       done
42060fi
42061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42062    if test $ac_cv_c_bigendian = unknown; then
42063      # See if sys/param.h defines the BYTE_ORDER macro.
42064      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42065/* end confdefs.h.  */
42066#include <sys/types.h>
42067	     #include <sys/param.h>
42068
42069int
42070main ()
42071{
42072#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42073		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42074		     && LITTLE_ENDIAN)
42075	      bogus endian macros
42076	     #endif
42077
42078  ;
42079  return 0;
42080}
42081_ACEOF
42082if ac_fn_cxx_try_compile "$LINENO"; then :
42083  # It does; now see whether it defined to BIG_ENDIAN or not.
42084	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42085/* end confdefs.h.  */
42086#include <sys/types.h>
42087		#include <sys/param.h>
42088
42089int
42090main ()
42091{
42092#if BYTE_ORDER != BIG_ENDIAN
42093		 not big endian
42094		#endif
42095
42096  ;
42097  return 0;
42098}
42099_ACEOF
42100if ac_fn_cxx_try_compile "$LINENO"; then :
42101  ac_cv_c_bigendian=yes
42102else
42103  ac_cv_c_bigendian=no
42104fi
42105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42106fi
42107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42108    fi
42109    if test $ac_cv_c_bigendian = unknown; then
42110      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42111      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42112/* end confdefs.h.  */
42113#include <limits.h>
42114
42115int
42116main ()
42117{
42118#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42119	      bogus endian macros
42120	     #endif
42121
42122  ;
42123  return 0;
42124}
42125_ACEOF
42126if ac_fn_cxx_try_compile "$LINENO"; then :
42127  # It does; now see whether it defined to _BIG_ENDIAN or not.
42128	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42129/* end confdefs.h.  */
42130#include <limits.h>
42131
42132int
42133main ()
42134{
42135#ifndef _BIG_ENDIAN
42136		 not big endian
42137		#endif
42138
42139  ;
42140  return 0;
42141}
42142_ACEOF
42143if ac_fn_cxx_try_compile "$LINENO"; then :
42144  ac_cv_c_bigendian=yes
42145else
42146  ac_cv_c_bigendian=no
42147fi
42148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42149fi
42150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42151    fi
42152    if test $ac_cv_c_bigendian = unknown; then
42153      # Compile a test program.
42154      if test "$cross_compiling" = yes; then :
42155  # Try to guess by grepping values from an object file.
42156	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42157/* end confdefs.h.  */
42158short int ascii_mm[] =
42159		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42160		short int ascii_ii[] =
42161		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42162		int use_ascii (int i) {
42163		  return ascii_mm[i] + ascii_ii[i];
42164		}
42165		short int ebcdic_ii[] =
42166		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42167		short int ebcdic_mm[] =
42168		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42169		int use_ebcdic (int i) {
42170		  return ebcdic_mm[i] + ebcdic_ii[i];
42171		}
42172		extern int foo;
42173
42174int
42175main ()
42176{
42177return use_ascii (foo) == use_ebcdic (foo);
42178  ;
42179  return 0;
42180}
42181_ACEOF
42182if ac_fn_cxx_try_compile "$LINENO"; then :
42183  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42184	      ac_cv_c_bigendian=yes
42185	    fi
42186	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42187	      if test "$ac_cv_c_bigendian" = unknown; then
42188		ac_cv_c_bigendian=no
42189	      else
42190		# finding both strings is unlikely to happen, but who knows?
42191		ac_cv_c_bigendian=unknown
42192	      fi
42193	    fi
42194fi
42195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42196else
42197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42198/* end confdefs.h.  */
42199$ac_includes_default
42200int
42201main ()
42202{
42203
42204	     /* Are we little or big endian?  From Harbison&Steele.  */
42205	     union
42206	     {
42207	       long int l;
42208	       char c[sizeof (long int)];
42209	     } u;
42210	     u.l = 1;
42211	     return u.c[sizeof (long int) - 1] == 1;
42212
42213  ;
42214  return 0;
42215}
42216_ACEOF
42217if ac_fn_cxx_try_run "$LINENO"; then :
42218  ac_cv_c_bigendian=no
42219else
42220  ac_cv_c_bigendian=yes
42221fi
42222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42223  conftest.$ac_objext conftest.beam conftest.$ac_ext
42224fi
42225
42226    fi
42227fi
42228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42229$as_echo "$ac_cv_c_bigendian" >&6; }
42230 case $ac_cv_c_bigendian in #(
42231   yes)
42232     ENDIAN="big";; #(
42233   no)
42234     ENDIAN="little" ;; #(
42235   universal)
42236     ENDIAN="universal_endianness"
42237     ;; #(
42238   *)
42239     ENDIAN="unknown" ;;
42240 esac
42241
42242
42243  if test "x$ENDIAN" = xuniversal_endianness; then
42244    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42245  fi
42246  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42247    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
42248  fi
42249
42250
42251# Configure flags for the tools
42252
42253  ###############################################################################
42254  #
42255  # How to compile shared libraries.
42256  #
42257
42258  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42259    PICFLAG="-fPIC"
42260    C_FLAG_REORDER=''
42261    CXX_FLAG_REORDER=''
42262
42263    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42264      # Linking is different on MacOSX
42265      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42266      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42267      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42268      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42269      SET_SHARED_LIBRARY_MAPFILE=''
42270    else
42271      # Default works for linux, might work on other platforms as well.
42272      SHARED_LIBRARY_FLAGS='-shared'
42273      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42274      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42275      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42276      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42277    fi
42278  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42279    PICFLAG=''
42280    C_FLAG_REORDER=''
42281    CXX_FLAG_REORDER=''
42282
42283    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42284      # Linking is different on MacOSX
42285      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42286      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42287      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42288      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42289      SET_SHARED_LIBRARY_MAPFILE=''
42290    else
42291      # Default works for linux, might work on other platforms as well.
42292      SHARED_LIBRARY_FLAGS='-shared'
42293      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42294      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42295      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42296      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42297    fi
42298  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42299    PICFLAG="-KPIC"
42300    C_FLAG_REORDER='-xF'
42301    CXX_FLAG_REORDER='-xF'
42302    SHARED_LIBRARY_FLAGS="-G"
42303    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42304    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42305    SET_SHARED_LIBRARY_NAME=''
42306    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42307  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42308    PICFLAG="-qpic=large"
42309    C_FLAG_REORDER=''
42310    CXX_FLAG_REORDER=''
42311    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42312    SET_EXECUTABLE_ORIGIN=""
42313    SET_SHARED_LIBRARY_ORIGIN=''
42314    SET_SHARED_LIBRARY_NAME=''
42315    SET_SHARED_LIBRARY_MAPFILE=''
42316  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42317    PICFLAG=""
42318    C_FLAG_REORDER=''
42319    CXX_FLAG_REORDER=''
42320    SHARED_LIBRARY_FLAGS="-LD"
42321    SET_EXECUTABLE_ORIGIN=''
42322    SET_SHARED_LIBRARY_ORIGIN=''
42323    SET_SHARED_LIBRARY_NAME=''
42324    SET_SHARED_LIBRARY_MAPFILE=''
42325  fi
42326
42327
42328
42329
42330
42331
42332
42333
42334
42335  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42336    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42337    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42338    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42339  fi
42340  # The (cross) compiler is now configured, we can now test capabilities
42341  # of the target platform.
42342
42343
42344
42345  ###############################################################################
42346  #
42347  # Setup the opt flags for different compilers
42348  # and different operating systems.
42349  #
42350
42351  # FIXME: this was indirectly the old default, but just inherited.
42352  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42353  #   C_FLAG_DEPS="-MMD -MF"
42354  # fi
42355
42356  # Generate make dependency files
42357  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42358    C_FLAG_DEPS="-MMD -MF"
42359  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42360    C_FLAG_DEPS="-MMD -MF"
42361  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42362    C_FLAG_DEPS="-xMMD -xMF"
42363  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42364    C_FLAG_DEPS="-qmakedep=gcc -MF"
42365  fi
42366  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42367
42368
42369
42370  # Debug symbols
42371  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42372    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42373      # reduce from default "-g2" option to save space
42374      CFLAGS_DEBUG_SYMBOLS="-g1"
42375      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42376    else
42377      CFLAGS_DEBUG_SYMBOLS="-g"
42378      CXXFLAGS_DEBUG_SYMBOLS="-g"
42379    fi
42380  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42381    CFLAGS_DEBUG_SYMBOLS="-g"
42382    CXXFLAGS_DEBUG_SYMBOLS="-g"
42383  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42384    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42385    # FIXME: likely a bug, this disables debug symbols rather than enables them
42386    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42387  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42388    CFLAGS_DEBUG_SYMBOLS="-g"
42389    CXXFLAGS_DEBUG_SYMBOLS="-g"
42390  fi
42391
42392
42393
42394  # bounds, memory and behavior checking options
42395  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42396    case $DEBUG_LEVEL in
42397    release )
42398      # no adjustment
42399      ;;
42400    fastdebug )
42401      # no adjustment
42402      ;;
42403    slowdebug )
42404      # Add runtime stack smashing and undefined behavior checks
42405      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42406      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42407      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42408        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42409        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
42410      fi
42411      ;;
42412    esac
42413  fi
42414
42415
42416
42417  # Optimization levels
42418  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42419    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42420
42421    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42422      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42423      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42424      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42425      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42426      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42427      C_O_FLAG_NONE="-xregs=no%frameptr"
42428      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42429      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42430      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42431      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42432      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42433      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42434        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42435        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42436      fi
42437    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42438      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42439      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42440      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42441      C_O_FLAG_DEBUG=""
42442      C_O_FLAG_NONE=""
42443      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42444      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42445      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42446      C_O_FLAG_DEBUG=""
42447      CXX_O_FLAG_NONE=""
42448    fi
42449  else
42450    # The remaining toolchains share opt flags between CC and CXX;
42451    # setup for C and duplicate afterwards.
42452    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42453      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42454        # On MacOSX we optimize for size, something
42455        # we should do for all platforms?
42456        C_O_FLAG_HIGHEST="-Os"
42457        C_O_FLAG_HI="-Os"
42458        C_O_FLAG_NORM="-Os"
42459      else
42460        C_O_FLAG_HIGHEST="-O3"
42461        C_O_FLAG_HI="-O3"
42462        C_O_FLAG_NORM="-O2"
42463      fi
42464      C_O_FLAG_DEBUG="-O0"
42465      C_O_FLAG_NONE="-O0"
42466    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42467      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42468        # On MacOSX we optimize for size, something
42469        # we should do for all platforms?
42470        C_O_FLAG_HIGHEST="-Os"
42471        C_O_FLAG_HI="-Os"
42472        C_O_FLAG_NORM="-Os"
42473      else
42474        C_O_FLAG_HIGHEST="-O3"
42475        C_O_FLAG_HI="-O3"
42476        C_O_FLAG_NORM="-O2"
42477      fi
42478      C_O_FLAG_DEBUG="-O0"
42479      C_O_FLAG_NONE="-O0"
42480    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42481      C_O_FLAG_HIGHEST="-O3"
42482      C_O_FLAG_HI="-O3 -qstrict"
42483      C_O_FLAG_NORM="-O2"
42484      C_O_FLAG_DEBUG="-qnoopt"
42485      C_O_FLAG_NONE="-qnoop"
42486    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42487      C_O_FLAG_HIGHEST="-O2"
42488      C_O_FLAG_HI="-O1"
42489      C_O_FLAG_NORM="-O1"
42490      C_O_FLAG_DEBUG="-Od"
42491      C_O_FLAG_NONE="-Od"
42492    fi
42493    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42494    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42495    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42496    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42497    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42498  fi
42499
42500  # Adjust optimization flags according to debug level.
42501  case $DEBUG_LEVEL in
42502    release )
42503      # no adjustment
42504      ;;
42505    fastdebug )
42506      # Not quite so much optimization
42507      C_O_FLAG_HI="$C_O_FLAG_NORM"
42508      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42509      ;;
42510    slowdebug )
42511      # Disable optimization
42512      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42513      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42514      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42515      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42516      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42517      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42518      ;;
42519  esac
42520
42521
42522
42523
42524
42525
42526
42527
42528
42529
42530
42531
42532
42533  # Special extras...
42534  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42535    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42536      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42537      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42538    fi
42539  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42540    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42541    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42542    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42543  fi
42544
42545  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42546    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42547$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42548  fi
42549
42550  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42551    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42552$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42553  fi
42554
42555  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42556    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42557$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42558  fi
42559
42560
42561# Check whether --with-extra-cflags was given.
42562if test "${with_extra_cflags+set}" = set; then :
42563  withval=$with_extra_cflags;
42564fi
42565
42566
42567
42568# Check whether --with-extra-cxxflags was given.
42569if test "${with_extra_cxxflags+set}" = set; then :
42570  withval=$with_extra_cxxflags;
42571fi
42572
42573
42574
42575# Check whether --with-extra-ldflags was given.
42576if test "${with_extra_ldflags+set}" = set; then :
42577  withval=$with_extra_ldflags;
42578fi
42579
42580
42581  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42582  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42583  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42584
42585  # Hotspot needs these set in their legacy form
42586  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42587  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42588  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42589
42590
42591
42592
42593
42594  ###############################################################################
42595  #
42596  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42597  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42598  #
42599
42600  # Setup compiler/platform specific flags into
42601  #    CFLAGS_JDK    - C Compiler flags
42602  #    CXXFLAGS_JDK  - C++ Compiler flags
42603  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42604  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42605    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42606        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42607    case $OPENJDK_TARGET_CPU_ARCH in
42608      arm )
42609        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42610        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42611        ;;
42612      ppc )
42613        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42614        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42615        ;;
42616      * )
42617        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42618        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42619        ;;
42620    esac
42621  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42622    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42623    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42624      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42625      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42626    fi
42627
42628    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42629    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42630  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42631    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42632    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42633  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42634    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42635    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42636    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42637    -DWIN32 -DIAL"
42638    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42639      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42640    else
42641      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42642    fi
42643  fi
42644
42645  ###############################################################################
42646
42647  # Adjust flags according to debug level.
42648  case $DEBUG_LEVEL in
42649    fastdebug | slowdebug )
42650      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42651      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42652      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42653      ;;
42654    release )
42655      ;;
42656    * )
42657      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42658      ;;
42659  esac
42660
42661  # Setup LP64
42662  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42663
42664  # Set some common defines. These works for all compilers, but assume
42665  # -D is universally accepted.
42666
42667  # Setup endianness
42668  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42669    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42670    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42671    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42672    #   Note: -Dmacro         is the same as    #define macro 1
42673    #         -Dmacro=        is the same as    #define macro
42674    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42675      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42676    else
42677      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42678    fi
42679  else
42680    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42681    # are defined in the system?
42682    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42683      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42684    else
42685      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42686    fi
42687  fi
42688
42689  # Setup target OS define. Use OS target name but in upper case.
42690  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42691  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42692
42693  # Setup target CPU
42694  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42695
42696  # Setup debug/release defines
42697  if test "x$DEBUG_LEVEL" = xrelease; then
42698    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42699    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42700      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42701    fi
42702  else
42703    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42704  fi
42705
42706  # Setup release name
42707  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42708
42709
42710  # Set some additional per-OS defines.
42711  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42712    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42713  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42714    # FIXME: PPC64 should not be here.
42715    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42716  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42717    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42718  fi
42719
42720  # Additional macosx handling
42721  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42722    # Setting these parameters makes it an error to link to macosx APIs that are
42723    # newer than the given OS version and makes the linked binaries compatible
42724    # even if built on a newer version of the OS.
42725    # The expected format is X.Y.Z
42726    MACOSX_VERSION_MIN=10.7.0
42727
42728
42729    # The macro takes the version with no dots, ex: 1070
42730    # Let the flags variables get resolved in make for easier override on make
42731    # command line.
42732    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42733    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42734  fi
42735
42736  # Setup some hard coded includes
42737  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42738      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42739      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42740      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
42741
42742  # The shared libraries are compiled using the picflag.
42743  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42744  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42745
42746  # Executable flags
42747  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42748  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42749
42750
42751
42752
42753
42754
42755  # Setup LDFLAGS et al.
42756  #
42757
42758  # Now this is odd. The JDK native libraries have to link against libjvm.so
42759  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42760  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42761  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42762  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42763  # libraries will link to whatever is in memory. Yuck.
42764  #
42765  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42766  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42767    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42768    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42769      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42770    fi
42771    # TODO: make -debug optional "--disable-full-debug-symbols"
42772    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42773  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42774    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42775    # We have previously set HAS_GNU_HASH if this is the case
42776    if test -n "$HAS_GNU_HASH"; then
42777      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42778    fi
42779    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42780      # And since we now know that the linker is gnu, then add -z defs, to forbid
42781      # undefined symbols in object files.
42782      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42783      case $DEBUG_LEVEL in
42784        release )
42785          # tell linker to optimize libraries.
42786          # Should this be supplied to the OSS linker as well?
42787          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42788          ;;
42789        slowdebug )
42790          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42791            # do relocations at load
42792            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42793            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42794          fi
42795          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42796            # mark relocations read only
42797            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42798            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42799          fi
42800          ;;
42801        fastdebug )
42802          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42803            # mark relocations read only
42804            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42805            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42806          fi
42807          ;;
42808        * )
42809          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42810          ;;
42811        esac
42812    fi
42813  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42814    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42815    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42816  fi
42817
42818  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42819    # If undefined behaviour detection is enabled then we need to tell linker.
42820    case $DEBUG_LEVEL in
42821      release | fastdebug )
42822        ;;
42823      slowdebug )
42824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42825$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42826        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42827          # enable undefined behaviour checking
42828          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42829          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42830        fi
42831        ;;
42832      * )
42833        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42834        ;;
42835    esac
42836  fi
42837
42838  # Customize LDFLAGS for executables
42839
42840  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42841
42842  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42843    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42844      LDFLAGS_STACK_SIZE=1048576
42845    else
42846      LDFLAGS_STACK_SIZE=327680
42847    fi
42848    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42849  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42850    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42851  fi
42852
42853  # Customize LDFLAGS for libs
42854  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42855
42856  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42857    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42858    LDFLAGS_JDKLIB_SUFFIX=""
42859  else
42860    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42861        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42862
42863    # On some platforms (mac) the linker warns about non existing -L dirs.
42864    # Add server first if available. Linking aginst client does not always produce the same results.
42865    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42866    # Default to server for other variants.
42867    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42868      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42869    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42870      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42871    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42872      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42873    else
42874      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42875    fi
42876
42877    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42878    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42879      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42880    fi
42881  fi
42882
42883
42884
42885
42886
42887
42888
42889
42890  # Some Zero and Shark settings.
42891  # ZERO_ARCHFLAG tells the compiler which mode to build for
42892  case "${OPENJDK_TARGET_CPU}" in
42893    s390)
42894      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42895      ;;
42896    *)
42897      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42898  esac
42899
42900  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42901$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42902  supports=yes
42903
42904  saved_cflags="$CFLAGS"
42905  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42906  ac_ext=c
42907ac_cpp='$CPP $CPPFLAGS'
42908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42910ac_compiler_gnu=$ac_cv_c_compiler_gnu
42911
42912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42913/* end confdefs.h.  */
42914int i;
42915_ACEOF
42916if ac_fn_c_try_compile "$LINENO"; then :
42917
42918else
42919  supports=no
42920fi
42921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42922  ac_ext=cpp
42923ac_cpp='$CXXCPP $CPPFLAGS'
42924ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42925ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42926ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42927
42928  CFLAGS="$saved_cflags"
42929
42930  saved_cxxflags="$CXXFLAGS"
42931  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42932  ac_ext=cpp
42933ac_cpp='$CXXCPP $CPPFLAGS'
42934ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42935ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42936ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42937
42938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42939/* end confdefs.h.  */
42940int i;
42941_ACEOF
42942if ac_fn_cxx_try_compile "$LINENO"; then :
42943
42944else
42945  supports=no
42946fi
42947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42948  ac_ext=cpp
42949ac_cpp='$CXXCPP $CPPFLAGS'
42950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42953
42954  CXXFLAGS="$saved_cxxflags"
42955
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42957$as_echo "$supports" >&6; }
42958  if test "x$supports" = "xyes" ; then
42959    :
42960  else
42961    ZERO_ARCHFLAG=""
42962  fi
42963
42964
42965
42966  # Check that the compiler supports -mX (or -qX on AIX) flags
42967  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42968
42969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42970$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42971  supports=yes
42972
42973  saved_cflags="$CFLAGS"
42974  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42975  ac_ext=c
42976ac_cpp='$CPP $CPPFLAGS'
42977ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42978ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42979ac_compiler_gnu=$ac_cv_c_compiler_gnu
42980
42981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42982/* end confdefs.h.  */
42983int i;
42984_ACEOF
42985if ac_fn_c_try_compile "$LINENO"; then :
42986
42987else
42988  supports=no
42989fi
42990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42991  ac_ext=cpp
42992ac_cpp='$CXXCPP $CPPFLAGS'
42993ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42994ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42995ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42996
42997  CFLAGS="$saved_cflags"
42998
42999  saved_cxxflags="$CXXFLAGS"
43000  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43001  ac_ext=cpp
43002ac_cpp='$CXXCPP $CPPFLAGS'
43003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43006
43007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43008/* end confdefs.h.  */
43009int i;
43010_ACEOF
43011if ac_fn_cxx_try_compile "$LINENO"; then :
43012
43013else
43014  supports=no
43015fi
43016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43017  ac_ext=cpp
43018ac_cpp='$CXXCPP $CPPFLAGS'
43019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43022
43023  CXXFLAGS="$saved_cxxflags"
43024
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43026$as_echo "$supports" >&6; }
43027  if test "x$supports" = "xyes" ; then
43028    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43029  else
43030    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43031  fi
43032
43033
43034
43035  case "${TOOLCHAIN_TYPE}" in
43036    microsoft)
43037      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43038      ;;
43039    solstudio)
43040      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43041      ;;
43042    gcc)
43043      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43044      ;;
43045    clang)
43046      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43047      ;;
43048  esac
43049
43050
43051
43052# Setup debug symbols (need objcopy from the toolchain for that)
43053
43054  #
43055  # ENABLE_DEBUG_SYMBOLS
43056  # This must be done after the toolchain is setup, since we're looking at objcopy.
43057  #
43058  # Check whether --enable-debug-symbols was given.
43059if test "${enable_debug_symbols+set}" = set; then :
43060  enableval=$enable_debug_symbols;
43061fi
43062
43063
43064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43065$as_echo_n "checking if we should generate debug symbols... " >&6; }
43066
43067  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43068    # explicit enabling of enable-debug-symbols and can't find objcopy
43069    #   this is an error
43070    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43071  fi
43072
43073  if test "x$enable_debug_symbols" = "xyes"; then
43074    ENABLE_DEBUG_SYMBOLS=true
43075  elif test "x$enable_debug_symbols" = "xno"; then
43076    ENABLE_DEBUG_SYMBOLS=false
43077  else
43078    # Default is on if objcopy is found
43079    if test "x$OBJCOPY" != x; then
43080      ENABLE_DEBUG_SYMBOLS=true
43081    # MacOS X and Windows don't use objcopy but default is on for those OSes
43082    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43083      ENABLE_DEBUG_SYMBOLS=true
43084    else
43085      ENABLE_DEBUG_SYMBOLS=false
43086    fi
43087  fi
43088
43089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43090$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43091
43092  #
43093  # ZIP_DEBUGINFO_FILES
43094  #
43095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43096$as_echo_n "checking if we should zip debug-info files... " >&6; }
43097  # Check whether --enable-zip-debug-info was given.
43098if test "${enable_zip_debug_info+set}" = set; then :
43099  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43100else
43101  enable_zip_debug_info="yes"
43102fi
43103
43104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43105$as_echo "${enable_zip_debug_info}" >&6; }
43106
43107  if test "x${enable_zip_debug_info}" = "xno"; then
43108    ZIP_DEBUGINFO_FILES=false
43109  else
43110    ZIP_DEBUGINFO_FILES=true
43111  fi
43112
43113
43114
43115
43116
43117###############################################################################
43118#
43119# Check dependencies for external and internal libraries.
43120#
43121###############################################################################
43122
43123# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43124
43125  # When using cygwin or msys, we need a wrapper binary that renames
43126  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43127  # @files and rewrites these too! This wrapper binary is
43128  # called fixpath.
43129  FIXPATH=
43130  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43132$as_echo_n "checking if fixpath can be created... " >&6; }
43133    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43134    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43135    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43136      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43137      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43138      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43139      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43140    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43141      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43142      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43143
43144      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43145      # @ was chosen as separator to minimize risk of other tools messing around with it
43146      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43147      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43148
43149      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43150    fi
43151    rm -f $OUTPUT_ROOT/fixpath*
43152    cd $OUTPUT_ROOT
43153    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43154    cd $CURDIR
43155
43156    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43158$as_echo "no" >&6; }
43159      cat $OUTPUT_ROOT/fixpath1.log
43160      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43161    fi
43162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43163$as_echo "yes" >&6; }
43164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43165$as_echo_n "checking if fixpath.exe works... " >&6; }
43166    cd $OUTPUT_ROOT
43167    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43168    cd $CURDIR
43169    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43171$as_echo "no" >&6; }
43172      cat $OUTPUT_ROOT/fixpath2.log
43173      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43174    fi
43175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43176$as_echo "yes" >&6; }
43177    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43178  fi
43179
43180
43181
43182
43183
43184
43185  ###############################################################################
43186  #
43187  # OS specific settings that we never will need to probe.
43188  #
43189  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43191$as_echo_n "checking what is not needed on Linux?... " >&6; }
43192    PULSE_NOT_NEEDED=yes
43193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43194$as_echo "pulse" >&6; }
43195  fi
43196
43197  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43199$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43200    ALSA_NOT_NEEDED=yes
43201    PULSE_NOT_NEEDED=yes
43202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43203$as_echo "alsa pulse" >&6; }
43204  fi
43205
43206  if test "x$OPENJDK_TARGET_OS" = xaix; then
43207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43208$as_echo_n "checking what is not needed on AIX?... " >&6; }
43209    ALSA_NOT_NEEDED=yes
43210    PULSE_NOT_NEEDED=yes
43211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43212$as_echo "alsa pulse" >&6; }
43213  fi
43214
43215
43216  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43218$as_echo_n "checking what is not needed on Windows?... " >&6; }
43219    CUPS_NOT_NEEDED=yes
43220    ALSA_NOT_NEEDED=yes
43221    PULSE_NOT_NEEDED=yes
43222    X11_NOT_NEEDED=yes
43223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43224$as_echo "alsa cups pulse x11" >&6; }
43225  fi
43226
43227  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43229$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43230    ALSA_NOT_NEEDED=yes
43231    PULSE_NOT_NEEDED=yes
43232    X11_NOT_NEEDED=yes
43233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43234$as_echo "alsa pulse x11" >&6; }
43235  fi
43236
43237  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43239$as_echo_n "checking what is not needed on bsd?... " >&6; }
43240    ALSA_NOT_NEEDED=yes
43241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43242$as_echo "alsa" >&6; }
43243  fi
43244
43245  if test "x$OPENJDK" = "xfalse"; then
43246    FREETYPE_NOT_NEEDED=yes
43247  fi
43248
43249  if test "x$SUPPORT_HEADFUL" = xno; then
43250    X11_NOT_NEEDED=yes
43251  fi
43252
43253
43254
43255  ###############################################################################
43256  #
43257  # Check for X Windows
43258  #
43259
43260  if test "x$X11_NOT_NEEDED" = xyes; then
43261    if test "x${with_x}" != x; then
43262      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43263$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43264    fi
43265    X_CFLAGS=
43266    X_LIBS=
43267  else
43268    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43269    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43270    # --x-libraries for the sysroot, if that seems to be correct.
43271    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43272      if test "x$SYSROOT" != "x"; then
43273        if test "x$x_includes" = xNONE; then
43274          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43275            x_includes="$SYSROOT/usr/X11R6/include"
43276          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43277            x_includes="$SYSROOT/usr/include"
43278          fi
43279        fi
43280        if test "x$x_libraries" = xNONE; then
43281          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43282            x_libraries="$SYSROOT/usr/X11R6/lib"
43283          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43284            x_libraries="$SYSROOT/usr/lib64"
43285          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43286            x_libraries="$SYSROOT/usr/lib"
43287          fi
43288        fi
43289      fi
43290    fi
43291
43292    # Now let autoconf do it's magic
43293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43294$as_echo_n "checking for X... " >&6; }
43295
43296
43297# Check whether --with-x was given.
43298if test "${with_x+set}" = set; then :
43299  withval=$with_x;
43300fi
43301
43302# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43303if test "x$with_x" = xno; then
43304  # The user explicitly disabled X.
43305  have_x=disabled
43306else
43307  case $x_includes,$x_libraries in #(
43308    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43309    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43310  $as_echo_n "(cached) " >&6
43311else
43312  # One or both of the vars are not set, and there is no cached value.
43313ac_x_includes=no ac_x_libraries=no
43314rm -f -r conftest.dir
43315if mkdir conftest.dir; then
43316  cd conftest.dir
43317  cat >Imakefile <<'_ACEOF'
43318incroot:
43319	@echo incroot='${INCROOT}'
43320usrlibdir:
43321	@echo usrlibdir='${USRLIBDIR}'
43322libdir:
43323	@echo libdir='${LIBDIR}'
43324_ACEOF
43325  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43326    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43327    for ac_var in incroot usrlibdir libdir; do
43328      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43329    done
43330    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43331    for ac_extension in a so sl dylib la dll; do
43332      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43333	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43334	ac_im_usrlibdir=$ac_im_libdir; break
43335      fi
43336    done
43337    # Screen out bogus values from the imake configuration.  They are
43338    # bogus both because they are the default anyway, and because
43339    # using them would break gcc on systems where it needs fixed includes.
43340    case $ac_im_incroot in
43341	/usr/include) ac_x_includes= ;;
43342	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43343    esac
43344    case $ac_im_usrlibdir in
43345	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43346	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43347    esac
43348  fi
43349  cd ..
43350  rm -f -r conftest.dir
43351fi
43352
43353# Standard set of common directories for X headers.
43354# Check X11 before X11Rn because it is often a symlink to the current release.
43355ac_x_header_dirs='
43356/usr/X11/include
43357/usr/X11R7/include
43358/usr/X11R6/include
43359/usr/X11R5/include
43360/usr/X11R4/include
43361
43362/usr/include/X11
43363/usr/include/X11R7
43364/usr/include/X11R6
43365/usr/include/X11R5
43366/usr/include/X11R4
43367
43368/usr/local/X11/include
43369/usr/local/X11R7/include
43370/usr/local/X11R6/include
43371/usr/local/X11R5/include
43372/usr/local/X11R4/include
43373
43374/usr/local/include/X11
43375/usr/local/include/X11R7
43376/usr/local/include/X11R6
43377/usr/local/include/X11R5
43378/usr/local/include/X11R4
43379
43380/usr/X386/include
43381/usr/x386/include
43382/usr/XFree86/include/X11
43383
43384/usr/include
43385/usr/local/include
43386/usr/unsupported/include
43387/usr/athena/include
43388/usr/local/x11r5/include
43389/usr/lpp/Xamples/include
43390
43391/usr/openwin/include
43392/usr/openwin/share/include'
43393
43394if test "$ac_x_includes" = no; then
43395  # Guess where to find include files, by looking for Xlib.h.
43396  # First, try using that file with no special directory specified.
43397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43398/* end confdefs.h.  */
43399#include <X11/Xlib.h>
43400_ACEOF
43401if ac_fn_cxx_try_cpp "$LINENO"; then :
43402  # We can compile using X headers with no special include directory.
43403ac_x_includes=
43404else
43405  for ac_dir in $ac_x_header_dirs; do
43406  if test -r "$ac_dir/X11/Xlib.h"; then
43407    ac_x_includes=$ac_dir
43408    break
43409  fi
43410done
43411fi
43412rm -f conftest.err conftest.i conftest.$ac_ext
43413fi # $ac_x_includes = no
43414
43415if test "$ac_x_libraries" = no; then
43416  # Check for the libraries.
43417  # See if we find them without any special options.
43418  # Don't add to $LIBS permanently.
43419  ac_save_LIBS=$LIBS
43420  LIBS="-lX11 $LIBS"
43421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43422/* end confdefs.h.  */
43423#include <X11/Xlib.h>
43424int
43425main ()
43426{
43427XrmInitialize ()
43428  ;
43429  return 0;
43430}
43431_ACEOF
43432if ac_fn_cxx_try_link "$LINENO"; then :
43433  LIBS=$ac_save_LIBS
43434# We can link X programs with no special library path.
43435ac_x_libraries=
43436else
43437  LIBS=$ac_save_LIBS
43438for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43439do
43440  # Don't even attempt the hair of trying to link an X program!
43441  for ac_extension in a so sl dylib la dll; do
43442    if test -r "$ac_dir/libX11.$ac_extension"; then
43443      ac_x_libraries=$ac_dir
43444      break 2
43445    fi
43446  done
43447done
43448fi
43449rm -f core conftest.err conftest.$ac_objext \
43450    conftest$ac_exeext conftest.$ac_ext
43451fi # $ac_x_libraries = no
43452
43453case $ac_x_includes,$ac_x_libraries in #(
43454  no,* | *,no | *\'*)
43455    # Didn't find X, or a directory has "'" in its name.
43456    ac_cv_have_x="have_x=no";; #(
43457  *)
43458    # Record where we found X for the cache.
43459    ac_cv_have_x="have_x=yes\
43460	ac_x_includes='$ac_x_includes'\
43461	ac_x_libraries='$ac_x_libraries'"
43462esac
43463fi
43464;; #(
43465    *) have_x=yes;;
43466  esac
43467  eval "$ac_cv_have_x"
43468fi # $with_x != no
43469
43470if test "$have_x" != yes; then
43471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43472$as_echo "$have_x" >&6; }
43473  no_x=yes
43474else
43475  # If each of the values was on the command line, it overrides each guess.
43476  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43477  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43478  # Update the cache value to reflect the command line values.
43479  ac_cv_have_x="have_x=yes\
43480	ac_x_includes='$x_includes'\
43481	ac_x_libraries='$x_libraries'"
43482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43483$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43484fi
43485
43486    if test "$no_x" = yes; then
43487  # Not all programs may use this symbol, but it does not hurt to define it.
43488
43489$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43490
43491  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43492else
43493  if test -n "$x_includes"; then
43494    X_CFLAGS="$X_CFLAGS -I$x_includes"
43495  fi
43496
43497  # It would also be nice to do this for all -L options, not just this one.
43498  if test -n "$x_libraries"; then
43499    X_LIBS="$X_LIBS -L$x_libraries"
43500    # For Solaris; some versions of Sun CC require a space after -R and
43501    # others require no space.  Words are not sufficient . . . .
43502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43503$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43504    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43505    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43506    ac_cxx_werror_flag=yes
43507    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43508/* end confdefs.h.  */
43509
43510int
43511main ()
43512{
43513
43514  ;
43515  return 0;
43516}
43517_ACEOF
43518if ac_fn_cxx_try_link "$LINENO"; then :
43519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43520$as_echo "no" >&6; }
43521       X_LIBS="$X_LIBS -R$x_libraries"
43522else
43523  LIBS="$ac_xsave_LIBS -R $x_libraries"
43524       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43525/* end confdefs.h.  */
43526
43527int
43528main ()
43529{
43530
43531  ;
43532  return 0;
43533}
43534_ACEOF
43535if ac_fn_cxx_try_link "$LINENO"; then :
43536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43537$as_echo "yes" >&6; }
43538	  X_LIBS="$X_LIBS -R $x_libraries"
43539else
43540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43541$as_echo "neither works" >&6; }
43542fi
43543rm -f core conftest.err conftest.$ac_objext \
43544    conftest$ac_exeext conftest.$ac_ext
43545fi
43546rm -f core conftest.err conftest.$ac_objext \
43547    conftest$ac_exeext conftest.$ac_ext
43548    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43549    LIBS=$ac_xsave_LIBS
43550  fi
43551
43552  # Check for system-dependent libraries X programs must link with.
43553  # Do this before checking for the system-independent R6 libraries
43554  # (-lICE), since we may need -lsocket or whatever for X linking.
43555
43556  if test "$ISC" = yes; then
43557    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43558  else
43559    # Martyn Johnson says this is needed for Ultrix, if the X
43560    # libraries were built with DECnet support.  And Karl Berry says
43561    # the Alpha needs dnet_stub (dnet does not exist).
43562    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43563    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43564/* end confdefs.h.  */
43565
43566/* Override any GCC internal prototype to avoid an error.
43567   Use char because int might match the return type of a GCC
43568   builtin and then its argument prototype would still apply.  */
43569#ifdef __cplusplus
43570extern "C"
43571#endif
43572char XOpenDisplay ();
43573int
43574main ()
43575{
43576return XOpenDisplay ();
43577  ;
43578  return 0;
43579}
43580_ACEOF
43581if ac_fn_cxx_try_link "$LINENO"; then :
43582
43583else
43584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43585$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43586if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43587  $as_echo_n "(cached) " >&6
43588else
43589  ac_check_lib_save_LIBS=$LIBS
43590LIBS="-ldnet  $LIBS"
43591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43592/* end confdefs.h.  */
43593
43594/* Override any GCC internal prototype to avoid an error.
43595   Use char because int might match the return type of a GCC
43596   builtin and then its argument prototype would still apply.  */
43597#ifdef __cplusplus
43598extern "C"
43599#endif
43600char dnet_ntoa ();
43601int
43602main ()
43603{
43604return dnet_ntoa ();
43605  ;
43606  return 0;
43607}
43608_ACEOF
43609if ac_fn_cxx_try_link "$LINENO"; then :
43610  ac_cv_lib_dnet_dnet_ntoa=yes
43611else
43612  ac_cv_lib_dnet_dnet_ntoa=no
43613fi
43614rm -f core conftest.err conftest.$ac_objext \
43615    conftest$ac_exeext conftest.$ac_ext
43616LIBS=$ac_check_lib_save_LIBS
43617fi
43618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43619$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43620if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43621  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43622fi
43623
43624    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43625      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43626$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43627if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43628  $as_echo_n "(cached) " >&6
43629else
43630  ac_check_lib_save_LIBS=$LIBS
43631LIBS="-ldnet_stub  $LIBS"
43632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43633/* end confdefs.h.  */
43634
43635/* Override any GCC internal prototype to avoid an error.
43636   Use char because int might match the return type of a GCC
43637   builtin and then its argument prototype would still apply.  */
43638#ifdef __cplusplus
43639extern "C"
43640#endif
43641char dnet_ntoa ();
43642int
43643main ()
43644{
43645return dnet_ntoa ();
43646  ;
43647  return 0;
43648}
43649_ACEOF
43650if ac_fn_cxx_try_link "$LINENO"; then :
43651  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43652else
43653  ac_cv_lib_dnet_stub_dnet_ntoa=no
43654fi
43655rm -f core conftest.err conftest.$ac_objext \
43656    conftest$ac_exeext conftest.$ac_ext
43657LIBS=$ac_check_lib_save_LIBS
43658fi
43659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43660$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43661if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43662  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43663fi
43664
43665    fi
43666fi
43667rm -f core conftest.err conftest.$ac_objext \
43668    conftest$ac_exeext conftest.$ac_ext
43669    LIBS="$ac_xsave_LIBS"
43670
43671    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43672    # to get the SysV transport functions.
43673    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43674    # needs -lnsl.
43675    # The nsl library prevents programs from opening the X display
43676    # on Irix 5.2, according to T.E. Dickey.
43677    # The functions gethostbyname, getservbyname, and inet_addr are
43678    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43679    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43680if test "x$ac_cv_func_gethostbyname" = xyes; then :
43681
43682fi
43683
43684    if test $ac_cv_func_gethostbyname = no; then
43685      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43686$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43687if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43688  $as_echo_n "(cached) " >&6
43689else
43690  ac_check_lib_save_LIBS=$LIBS
43691LIBS="-lnsl  $LIBS"
43692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43693/* end confdefs.h.  */
43694
43695/* Override any GCC internal prototype to avoid an error.
43696   Use char because int might match the return type of a GCC
43697   builtin and then its argument prototype would still apply.  */
43698#ifdef __cplusplus
43699extern "C"
43700#endif
43701char gethostbyname ();
43702int
43703main ()
43704{
43705return gethostbyname ();
43706  ;
43707  return 0;
43708}
43709_ACEOF
43710if ac_fn_cxx_try_link "$LINENO"; then :
43711  ac_cv_lib_nsl_gethostbyname=yes
43712else
43713  ac_cv_lib_nsl_gethostbyname=no
43714fi
43715rm -f core conftest.err conftest.$ac_objext \
43716    conftest$ac_exeext conftest.$ac_ext
43717LIBS=$ac_check_lib_save_LIBS
43718fi
43719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43720$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43721if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43722  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43723fi
43724
43725      if test $ac_cv_lib_nsl_gethostbyname = no; then
43726	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43727$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43728if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43729  $as_echo_n "(cached) " >&6
43730else
43731  ac_check_lib_save_LIBS=$LIBS
43732LIBS="-lbsd  $LIBS"
43733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43734/* end confdefs.h.  */
43735
43736/* Override any GCC internal prototype to avoid an error.
43737   Use char because int might match the return type of a GCC
43738   builtin and then its argument prototype would still apply.  */
43739#ifdef __cplusplus
43740extern "C"
43741#endif
43742char gethostbyname ();
43743int
43744main ()
43745{
43746return gethostbyname ();
43747  ;
43748  return 0;
43749}
43750_ACEOF
43751if ac_fn_cxx_try_link "$LINENO"; then :
43752  ac_cv_lib_bsd_gethostbyname=yes
43753else
43754  ac_cv_lib_bsd_gethostbyname=no
43755fi
43756rm -f core conftest.err conftest.$ac_objext \
43757    conftest$ac_exeext conftest.$ac_ext
43758LIBS=$ac_check_lib_save_LIBS
43759fi
43760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43761$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43762if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43763  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43764fi
43765
43766      fi
43767    fi
43768
43769    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43770    # socket/setsockopt and other routines are undefined under SCO ODT
43771    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43772    # on later versions), says Simon Leinen: it contains gethostby*
43773    # variants that don't use the name server (or something).  -lsocket
43774    # must be given before -lnsl if both are needed.  We assume that
43775    # if connect needs -lnsl, so does gethostbyname.
43776    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43777if test "x$ac_cv_func_connect" = xyes; then :
43778
43779fi
43780
43781    if test $ac_cv_func_connect = no; then
43782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43783$as_echo_n "checking for connect in -lsocket... " >&6; }
43784if ${ac_cv_lib_socket_connect+:} false; then :
43785  $as_echo_n "(cached) " >&6
43786else
43787  ac_check_lib_save_LIBS=$LIBS
43788LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43790/* end confdefs.h.  */
43791
43792/* Override any GCC internal prototype to avoid an error.
43793   Use char because int might match the return type of a GCC
43794   builtin and then its argument prototype would still apply.  */
43795#ifdef __cplusplus
43796extern "C"
43797#endif
43798char connect ();
43799int
43800main ()
43801{
43802return connect ();
43803  ;
43804  return 0;
43805}
43806_ACEOF
43807if ac_fn_cxx_try_link "$LINENO"; then :
43808  ac_cv_lib_socket_connect=yes
43809else
43810  ac_cv_lib_socket_connect=no
43811fi
43812rm -f core conftest.err conftest.$ac_objext \
43813    conftest$ac_exeext conftest.$ac_ext
43814LIBS=$ac_check_lib_save_LIBS
43815fi
43816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43817$as_echo "$ac_cv_lib_socket_connect" >&6; }
43818if test "x$ac_cv_lib_socket_connect" = xyes; then :
43819  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43820fi
43821
43822    fi
43823
43824    # Guillermo Gomez says -lposix is necessary on A/UX.
43825    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43826if test "x$ac_cv_func_remove" = xyes; then :
43827
43828fi
43829
43830    if test $ac_cv_func_remove = no; then
43831      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43832$as_echo_n "checking for remove in -lposix... " >&6; }
43833if ${ac_cv_lib_posix_remove+:} false; then :
43834  $as_echo_n "(cached) " >&6
43835else
43836  ac_check_lib_save_LIBS=$LIBS
43837LIBS="-lposix  $LIBS"
43838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43839/* end confdefs.h.  */
43840
43841/* Override any GCC internal prototype to avoid an error.
43842   Use char because int might match the return type of a GCC
43843   builtin and then its argument prototype would still apply.  */
43844#ifdef __cplusplus
43845extern "C"
43846#endif
43847char remove ();
43848int
43849main ()
43850{
43851return remove ();
43852  ;
43853  return 0;
43854}
43855_ACEOF
43856if ac_fn_cxx_try_link "$LINENO"; then :
43857  ac_cv_lib_posix_remove=yes
43858else
43859  ac_cv_lib_posix_remove=no
43860fi
43861rm -f core conftest.err conftest.$ac_objext \
43862    conftest$ac_exeext conftest.$ac_ext
43863LIBS=$ac_check_lib_save_LIBS
43864fi
43865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43866$as_echo "$ac_cv_lib_posix_remove" >&6; }
43867if test "x$ac_cv_lib_posix_remove" = xyes; then :
43868  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43869fi
43870
43871    fi
43872
43873    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43874    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43875if test "x$ac_cv_func_shmat" = xyes; then :
43876
43877fi
43878
43879    if test $ac_cv_func_shmat = no; then
43880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43881$as_echo_n "checking for shmat in -lipc... " >&6; }
43882if ${ac_cv_lib_ipc_shmat+:} false; then :
43883  $as_echo_n "(cached) " >&6
43884else
43885  ac_check_lib_save_LIBS=$LIBS
43886LIBS="-lipc  $LIBS"
43887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43888/* end confdefs.h.  */
43889
43890/* Override any GCC internal prototype to avoid an error.
43891   Use char because int might match the return type of a GCC
43892   builtin and then its argument prototype would still apply.  */
43893#ifdef __cplusplus
43894extern "C"
43895#endif
43896char shmat ();
43897int
43898main ()
43899{
43900return shmat ();
43901  ;
43902  return 0;
43903}
43904_ACEOF
43905if ac_fn_cxx_try_link "$LINENO"; then :
43906  ac_cv_lib_ipc_shmat=yes
43907else
43908  ac_cv_lib_ipc_shmat=no
43909fi
43910rm -f core conftest.err conftest.$ac_objext \
43911    conftest$ac_exeext conftest.$ac_ext
43912LIBS=$ac_check_lib_save_LIBS
43913fi
43914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43915$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43916if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43917  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43918fi
43919
43920    fi
43921  fi
43922
43923  # Check for libraries that X11R6 Xt/Xaw programs need.
43924  ac_save_LDFLAGS=$LDFLAGS
43925  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43926  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43927  # check for ICE first), but we must link in the order -lSM -lICE or
43928  # we get undefined symbols.  So assume we have SM if we have ICE.
43929  # These have to be linked with before -lX11, unlike the other
43930  # libraries we check for below, so use a different variable.
43931  # John Interrante, Karl Berry
43932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43933$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43934if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43935  $as_echo_n "(cached) " >&6
43936else
43937  ac_check_lib_save_LIBS=$LIBS
43938LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43940/* end confdefs.h.  */
43941
43942/* Override any GCC internal prototype to avoid an error.
43943   Use char because int might match the return type of a GCC
43944   builtin and then its argument prototype would still apply.  */
43945#ifdef __cplusplus
43946extern "C"
43947#endif
43948char IceConnectionNumber ();
43949int
43950main ()
43951{
43952return IceConnectionNumber ();
43953  ;
43954  return 0;
43955}
43956_ACEOF
43957if ac_fn_cxx_try_link "$LINENO"; then :
43958  ac_cv_lib_ICE_IceConnectionNumber=yes
43959else
43960  ac_cv_lib_ICE_IceConnectionNumber=no
43961fi
43962rm -f core conftest.err conftest.$ac_objext \
43963    conftest$ac_exeext conftest.$ac_ext
43964LIBS=$ac_check_lib_save_LIBS
43965fi
43966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43967$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43968if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43969  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43970fi
43971
43972  LDFLAGS=$ac_save_LDFLAGS
43973
43974fi
43975
43976
43977    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43978    # this doesn't make sense so we remove it.
43979    if test "x$COMPILE_TYPE" = xcross; then
43980      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43981    fi
43982
43983    if test "x$no_x" = xyes; then
43984
43985  # Print a helpful message on how to acquire the necessary build dependency.
43986  # x11 is the help tag: freetype, cups, pulse, alsa etc
43987  MISSING_DEPENDENCY=x11
43988
43989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43990    cygwin_help $MISSING_DEPENDENCY
43991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43992    msys_help $MISSING_DEPENDENCY
43993  else
43994    PKGHANDLER_COMMAND=
43995
43996    case $PKGHANDLER in
43997      apt-get)
43998        apt_help     $MISSING_DEPENDENCY ;;
43999      yum)
44000        yum_help     $MISSING_DEPENDENCY ;;
44001      port)
44002        port_help    $MISSING_DEPENDENCY ;;
44003      pkgutil)
44004        pkgutil_help $MISSING_DEPENDENCY ;;
44005      pkgadd)
44006        pkgadd_help  $MISSING_DEPENDENCY ;;
44007    esac
44008
44009    if test "x$PKGHANDLER_COMMAND" != x; then
44010      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44011    fi
44012  fi
44013
44014      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44015    fi
44016
44017    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44018      OPENWIN_HOME="/usr/openwin"
44019      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44020      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44021          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44022          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44023          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44024    fi
44025
44026    ac_ext=c
44027ac_cpp='$CPP $CPPFLAGS'
44028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44030ac_compiler_gnu=$ac_cv_c_compiler_gnu
44031
44032    OLD_CFLAGS="$CFLAGS"
44033    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44034
44035    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44036    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44037do :
44038  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44039ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44040          # include <X11/Xlib.h>
44041          # include <X11/Xutil.h>
44042
44043
44044"
44045if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44046  cat >>confdefs.h <<_ACEOF
44047#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44048_ACEOF
44049 X11_HEADERS_OK=yes
44050else
44051  X11_HEADERS_OK=no; break
44052fi
44053
44054done
44055
44056
44057    if test "x$X11_HEADERS_OK" = xno; then
44058
44059  # Print a helpful message on how to acquire the necessary build dependency.
44060  # x11 is the help tag: freetype, cups, pulse, alsa etc
44061  MISSING_DEPENDENCY=x11
44062
44063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44064    cygwin_help $MISSING_DEPENDENCY
44065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44066    msys_help $MISSING_DEPENDENCY
44067  else
44068    PKGHANDLER_COMMAND=
44069
44070    case $PKGHANDLER in
44071      apt-get)
44072        apt_help     $MISSING_DEPENDENCY ;;
44073      yum)
44074        yum_help     $MISSING_DEPENDENCY ;;
44075      port)
44076        port_help    $MISSING_DEPENDENCY ;;
44077      pkgutil)
44078        pkgutil_help $MISSING_DEPENDENCY ;;
44079      pkgadd)
44080        pkgadd_help  $MISSING_DEPENDENCY ;;
44081    esac
44082
44083    if test "x$PKGHANDLER_COMMAND" != x; then
44084      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44085    fi
44086  fi
44087
44088      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44089    fi
44090
44091    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44092    # defined in libawt_xawt.
44093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44094$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44095    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44096/* end confdefs.h.  */
44097#include <X11/extensions/Xrender.h>
44098int
44099main ()
44100{
44101XLinearGradient x;
44102  ;
44103  return 0;
44104}
44105_ACEOF
44106if ac_fn_c_try_compile "$LINENO"; then :
44107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44108$as_echo "yes" >&6; }
44109else
44110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44111$as_echo "no" >&6; }
44112         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44113fi
44114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44115
44116    CFLAGS="$OLD_CFLAGS"
44117    ac_ext=cpp
44118ac_cpp='$CXXCPP $CPPFLAGS'
44119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44122
44123  fi # X11_NOT_NEEDED
44124
44125
44126
44127
44128
44129
44130  ###############################################################################
44131  #
44132  # The common unix printing system cups is used to print from java.
44133  #
44134
44135# Check whether --with-cups was given.
44136if test "${with_cups+set}" = set; then :
44137  withval=$with_cups;
44138fi
44139
44140
44141# Check whether --with-cups-include was given.
44142if test "${with_cups_include+set}" = set; then :
44143  withval=$with_cups_include;
44144fi
44145
44146
44147  if test "x$CUPS_NOT_NEEDED" = xyes; then
44148    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44149      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44150$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44151    fi
44152    CUPS_CFLAGS=
44153  else
44154    CUPS_FOUND=no
44155
44156    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44157      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44158    fi
44159
44160    if test "x${with_cups}" != x; then
44161      CUPS_CFLAGS="-I${with_cups}/include"
44162      CUPS_FOUND=yes
44163    fi
44164    if test "x${with_cups_include}" != x; then
44165      CUPS_CFLAGS="-I${with_cups_include}"
44166      CUPS_FOUND=yes
44167    fi
44168    if test "x$CUPS_FOUND" = xno; then
44169
44170
44171  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44172    # Source the builddeps file again, to make sure it uses the latest variables!
44173    . $builddepsfile
44174    # Look for a target and build machine specific resource!
44175    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44176    if test "x$resource" = x; then
44177      # Ok, lets instead look for a target specific resource
44178      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44179    fi
44180    if test "x$resource" = x; then
44181      # Ok, lets instead look for a build specific resource
44182      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44183    fi
44184    if test "x$resource" = x; then
44185      # Ok, lets instead look for a generic resource
44186      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44187      resource=${builddep_cups}
44188    fi
44189    if test "x$resource" != x; then
44190      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44191$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44192      # If the resource in the builddeps.conf file is an existing directory,
44193      # for example /java/linux/cups
44194      if test -d ${resource}; then
44195        depdir=${resource}
44196      else
44197
44198  # cups is for example mymodule
44199  # $resource is for example libs/general/libmymod_1_2_3.zip
44200  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44201  # $with_builddeps_dir is for example /localhome/builddeps
44202  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44203  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44204  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44205  filename=`basename $resource`
44206  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44207  filebase=${filename%%.*}
44208  extension=${filename#*.}
44209  installdir=$with_builddeps_dir/$filebase
44210  if test ! -f $installdir/$filename.unpacked; then
44211    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44212$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44213    if test ! -d $installdir; then
44214      mkdir -p $installdir
44215    fi
44216    if test ! -d $installdir; then
44217      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44218    fi
44219    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44220    touch $tmpfile
44221    if test ! -f $tmpfile; then
44222      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44223    fi
44224
44225  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44226  # $tmpfile is the local file name for the downloaded file.
44227  VALID_TOOL=no
44228  if test "x$BDEPS_FTP" = xwget; then
44229    VALID_TOOL=yes
44230    wget -O $tmpfile $with_builddeps_server/$resource
44231  fi
44232  if test "x$BDEPS_FTP" = xlftp; then
44233    VALID_TOOL=yes
44234    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44235  fi
44236  if test "x$BDEPS_FTP" = xftp; then
44237    VALID_TOOL=yes
44238    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44239    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44240    FTPUSERPWD=${FTPSERVER%%@*}
44241    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44242      FTPUSER=${userpwd%%:*}
44243      FTPPWD=${userpwd#*@}
44244      FTPSERVER=${FTPSERVER#*@}
44245    else
44246      FTPUSER=ftp
44247      FTPPWD=ftp
44248    fi
44249    # the "pass" command does not work on some
44250    # ftp clients (read ftp.exe) but if it works,
44251    # passive mode is better!
44252    ( \
44253        echo "user $FTPUSER $FTPPWD"        ; \
44254        echo "pass"                         ; \
44255        echo "bin"                          ; \
44256        echo "get $FTPPATH $tmpfile"              ; \
44257    ) | ftp -in $FTPSERVER
44258  fi
44259  if test "x$VALID_TOOL" != xyes; then
44260    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44261  fi
44262
44263    mv $tmpfile $installdir/$filename
44264    if test ! -s $installdir/$filename; then
44265      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44266    fi
44267    case "$extension" in
44268      zip)  echo "Unzipping $installdir/$filename..."
44269        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44270        ;;
44271      tar.gz) echo "Untaring $installdir/$filename..."
44272        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44273        ;;
44274      tgz) echo "Untaring $installdir/$filename..."
44275        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44276        ;;
44277      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44278        ;;
44279    esac
44280  fi
44281  if test -f $installdir/$filename.unpacked; then
44282    depdir=$installdir
44283  fi
44284
44285      fi
44286      # Source the builddeps file again, because in the previous command, the depdir
44287      # was updated to point at the current build dependency install directory.
44288      . $builddepsfile
44289      # Now extract variables from the builddeps.conf files.
44290      theroot=${builddep_cups_ROOT}
44291      thecflags=${builddep_cups_CFLAGS}
44292      thelibs=${builddep_cups_LIBS}
44293      if test "x$depdir" = x; then
44294        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44295      fi
44296      CUPS=$depdir
44297      if test "x$theroot" != x; then
44298        CUPS="$theroot"
44299      fi
44300      if test "x$thecflags" != x; then
44301        CUPS_CFLAGS="$thecflags"
44302      fi
44303      if test "x$thelibs" != x; then
44304        CUPS_LIBS="$thelibs"
44305      fi
44306      CUPS_FOUND=yes
44307
44308    fi
44309
44310  fi
44311
44312    fi
44313    if test "x$CUPS_FOUND" = xno; then
44314      # Are the cups headers installed in the default /usr/include location?
44315      for ac_header in cups/cups.h cups/ppd.h
44316do :
44317  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44318ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44319if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44320  cat >>confdefs.h <<_ACEOF
44321#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44322_ACEOF
44323
44324            CUPS_FOUND=yes
44325            CUPS_CFLAGS=
44326            DEFAULT_CUPS=yes
44327
44328
44329fi
44330
44331done
44332
44333    fi
44334    if test "x$CUPS_FOUND" = xno; then
44335      # Getting nervous now? Lets poke around for standard Solaris third-party
44336      # package installation locations.
44337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44338$as_echo_n "checking for cups headers... " >&6; }
44339      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44340        # An SFW package seems to be installed!
44341        CUPS_FOUND=yes
44342        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44343      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44344        # A CSW package seems to be installed!
44345        CUPS_FOUND=yes
44346        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44347      fi
44348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44349$as_echo "$CUPS_FOUND" >&6; }
44350    fi
44351    if test "x$CUPS_FOUND" = xno; then
44352
44353  # Print a helpful message on how to acquire the necessary build dependency.
44354  # cups is the help tag: freetype, cups, pulse, alsa etc
44355  MISSING_DEPENDENCY=cups
44356
44357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44358    cygwin_help $MISSING_DEPENDENCY
44359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44360    msys_help $MISSING_DEPENDENCY
44361  else
44362    PKGHANDLER_COMMAND=
44363
44364    case $PKGHANDLER in
44365      apt-get)
44366        apt_help     $MISSING_DEPENDENCY ;;
44367      yum)
44368        yum_help     $MISSING_DEPENDENCY ;;
44369      port)
44370        port_help    $MISSING_DEPENDENCY ;;
44371      pkgutil)
44372        pkgutil_help $MISSING_DEPENDENCY ;;
44373      pkgadd)
44374        pkgadd_help  $MISSING_DEPENDENCY ;;
44375    esac
44376
44377    if test "x$PKGHANDLER_COMMAND" != x; then
44378      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44379    fi
44380  fi
44381
44382      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44383    fi
44384  fi
44385
44386
44387
44388
44389
44390
44391  ###############################################################################
44392  #
44393  # The ubiquitous freetype library is used to render fonts.
44394  #
44395
44396# Check whether --with-freetype was given.
44397if test "${with_freetype+set}" = set; then :
44398  withval=$with_freetype;
44399fi
44400
44401
44402# Check whether --with-freetype-include was given.
44403if test "${with_freetype_include+set}" = set; then :
44404  withval=$with_freetype_include;
44405fi
44406
44407
44408# Check whether --with-freetype-lib was given.
44409if test "${with_freetype_lib+set}" = set; then :
44410  withval=$with_freetype_lib;
44411fi
44412
44413
44414# Check whether --with-freetype-src was given.
44415if test "${with_freetype_src+set}" = set; then :
44416  withval=$with_freetype_src;
44417fi
44418
44419  # Check whether --enable-freetype-bundling was given.
44420if test "${enable_freetype_bundling+set}" = set; then :
44421  enableval=$enable_freetype_bundling;
44422fi
44423
44424
44425  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44426  FREETYPE_BASE_NAME=freetype
44427  FREETYPE_CFLAGS=
44428  FREETYPE_LIBS=
44429  FREETYPE_BUNDLE_LIB_PATH=
44430
44431  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44432    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
44433      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44434$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44435    fi
44436    if test "x$enable_freetype_bundling" != x; then
44437      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44438$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44439    fi
44440  else
44441    # freetype is needed to build; go get it!
44442
44443    BUNDLE_FREETYPE="$enable_freetype_bundling"
44444
44445    if  test "x$with_freetype_src" != x; then
44446      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44447        # Try to build freetype if --with-freetype-src was given on Windows
44448
44449  FREETYPE_SRC_PATH="$with_freetype_src"
44450  BUILD_FREETYPE=yes
44451
44452  # Check if the freetype sources are acessible..
44453  if ! test -d $FREETYPE_SRC_PATH; then
44454    { $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
44455$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44456    BUILD_FREETYPE=no
44457  fi
44458  # ..and contain a vc2010 project file
44459  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44460  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44461    { $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
44462$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44463    BUILD_FREETYPE=no
44464  fi
44465  # Now check if configure found a version of 'msbuild.exe'
44466  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44467    { $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
44468$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;}
44469    BUILD_FREETYPE=no
44470  fi
44471
44472  # Ready to go..
44473  if test "x$BUILD_FREETYPE" = xyes; then
44474
44475    # msbuild requires trailing slashes for output directories
44476    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44477    freetype_lib_path_unix="$freetype_lib_path"
44478    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44479
44480  unix_path="$vcxproj_path"
44481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44482    windows_path=`$CYGPATH -m "$unix_path"`
44483    vcxproj_path="$windows_path"
44484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44485    windows_path=`cmd //c echo $unix_path`
44486    vcxproj_path="$windows_path"
44487  fi
44488
44489
44490  unix_path="$freetype_lib_path"
44491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44492    windows_path=`$CYGPATH -m "$unix_path"`
44493    freetype_lib_path="$windows_path"
44494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44495    windows_path=`cmd //c echo $unix_path`
44496    freetype_lib_path="$windows_path"
44497  fi
44498
44499
44500  unix_path="$freetype_obj_path"
44501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44502    windows_path=`$CYGPATH -m "$unix_path"`
44503    freetype_obj_path="$windows_path"
44504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44505    windows_path=`cmd //c echo $unix_path`
44506    freetype_obj_path="$windows_path"
44507  fi
44508
44509    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44510      freetype_platform=x64
44511    else
44512      freetype_platform=win32
44513    fi
44514
44515    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44516    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44517    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44518    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44519    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44520$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44521
44522    # First we try to build the freetype.dll
44523    $ECHO -e "@echo off\n"\
44524	     "$MSBUILD $vcxproj_path "\
44525		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44526		       "/p:Configuration=\"Release Multithreaded\" "\
44527		       "/p:Platform=$freetype_platform "\
44528		       "/p:ConfigurationType=DynamicLibrary "\
44529		       "/p:TargetName=freetype "\
44530		       "/p:OutDir=\"$freetype_lib_path\" "\
44531		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44532    cmd /c freetype.bat
44533
44534    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44535      # If that succeeds we also build freetype.lib
44536      $ECHO -e "@echo off\n"\
44537	       "$MSBUILD $vcxproj_path "\
44538			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44539			 "/p:Configuration=\"Release Multithreaded\" "\
44540			 "/p:Platform=$freetype_platform "\
44541			 "/p:ConfigurationType=StaticLibrary "\
44542			 "/p:TargetName=freetype "\
44543			 "/p:OutDir=\"$freetype_lib_path\" "\
44544			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44545      cmd /c freetype.bat
44546
44547      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44548	# Once we build both, lib and dll, set freetype lib and include path appropriately
44549	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44550	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44551	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44552$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44553      else
44554	BUILD_FREETYPE=no
44555      fi
44556    else
44557      BUILD_FREETYPE=no
44558    fi
44559  fi
44560
44561        if test "x$BUILD_FREETYPE" = xyes; then
44562          # Okay, we built it. Check that it works.
44563
44564  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44565  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44566  METHOD="--with-freetype-src"
44567
44568  # Let's start with an optimistic view of the world :-)
44569  FOUND_FREETYPE=yes
44570
44571  # First look for the canonical freetype main include file ft2build.h.
44572  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44573    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44574    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44575    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44576      # Fail.
44577      FOUND_FREETYPE=no
44578    fi
44579  fi
44580
44581  if test "x$FOUND_FREETYPE" = xyes; then
44582    # Include file found, let's continue the sanity check.
44583    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44584$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44585
44586    # Reset to default value
44587    FREETYPE_BASE_NAME=freetype
44588    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44589    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44590      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44591          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44592        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44593        # for the .6 version explicitly.
44594        FREETYPE_BASE_NAME=freetype.6
44595        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44596        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44597$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44598      else
44599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44601        FOUND_FREETYPE=no
44602      fi
44603    else
44604      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44605        # On Windows, we will need both .lib and .dll file.
44606        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44607          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44608$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44609          FOUND_FREETYPE=no
44610        fi
44611      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44612          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44613        # Found lib in isa dir, use that instead.
44614        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44615        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44616$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44617      fi
44618    fi
44619  fi
44620
44621  if test "x$FOUND_FREETYPE" = xyes; then
44622
44623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44624
44625  # Input might be given as Windows format, start by converting to
44626  # unix format.
44627  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44628  new_path=`$CYGPATH -u "$path"`
44629
44630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44633  # "foo.exe" is OK but "foo" is an error.
44634  #
44635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44636  # It is also a way to make sure we got the proper file name for the real test later on.
44637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44638  if test "x$test_shortpath" = x; then
44639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44642  fi
44643
44644  # Call helper function which possibly converts this using DOS-style short mode.
44645  # If so, the updated path is stored in $new_path.
44646
44647  input_path="$new_path"
44648  # Check if we need to convert this using DOS-style short mode. If the path
44649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44650  # take no chances and rewrite it.
44651  # Note: m4 eats our [], so we need to use [ and ] instead.
44652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44653  if test "x$has_forbidden_chars" != x; then
44654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44658      # Going to short mode and back again did indeed matter. Since short mode is
44659      # case insensitive, let's make it lowercase to improve readability.
44660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44661      # Now convert it back to Unix-stile (cygpath)
44662      input_path=`$CYGPATH -u "$shortmode_path"`
44663      new_path="$input_path"
44664    fi
44665  fi
44666
44667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44668  if test "x$test_cygdrive_prefix" = x; then
44669    # As a simple fix, exclude /usr/bin since it's not a real path.
44670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44672      # a path prefixed by /cygdrive for fixpath to work.
44673      new_path="$CYGWIN_ROOT_PATH$input_path"
44674    fi
44675  fi
44676
44677
44678  if test "x$path" != "x$new_path"; then
44679    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44682  fi
44683
44684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44685
44686  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44687  has_colon=`$ECHO $path | $GREP ^.:`
44688  new_path="$path"
44689  if test "x$has_colon" = x; then
44690    # Not in mixed or Windows style, start by that.
44691    new_path=`cmd //c echo $path`
44692  fi
44693
44694
44695  input_path="$new_path"
44696  # Check if we need to convert this using DOS-style short mode. If the path
44697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44698  # take no chances and rewrite it.
44699  # Note: m4 eats our [], so we need to use [ and ] instead.
44700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44701  if test "x$has_forbidden_chars" != x; then
44702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44704  fi
44705
44706
44707  windows_path="$new_path"
44708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44709    unix_path=`$CYGPATH -u "$windows_path"`
44710    new_path="$unix_path"
44711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44713    new_path="$unix_path"
44714  fi
44715
44716  if test "x$path" != "x$new_path"; then
44717    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44720  fi
44721
44722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44724
44725  else
44726    # We're on a posix platform. Hooray! :)
44727    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44728    has_space=`$ECHO "$path" | $GREP " "`
44729    if test "x$has_space" != x; then
44730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44732      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44733    fi
44734
44735    # Use eval to expand a potential ~
44736    eval path="$path"
44737    if test ! -f "$path" && test ! -d "$path"; then
44738      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44739    fi
44740
44741    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44742  fi
44743
44744
44745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746
44747  # Input might be given as Windows format, start by converting to
44748  # unix format.
44749  path="$POTENTIAL_FREETYPE_LIB_PATH"
44750  new_path=`$CYGPATH -u "$path"`
44751
44752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44755  # "foo.exe" is OK but "foo" is an error.
44756  #
44757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44758  # It is also a way to make sure we got the proper file name for the real test later on.
44759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44760  if test "x$test_shortpath" = x; then
44761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44762$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44763    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44764  fi
44765
44766  # Call helper function which possibly converts this using DOS-style short mode.
44767  # If so, the updated path is stored in $new_path.
44768
44769  input_path="$new_path"
44770  # Check if we need to convert this using DOS-style short mode. If the path
44771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44772  # take no chances and rewrite it.
44773  # Note: m4 eats our [], so we need to use [ and ] instead.
44774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44775  if test "x$has_forbidden_chars" != x; then
44776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44780      # Going to short mode and back again did indeed matter. Since short mode is
44781      # case insensitive, let's make it lowercase to improve readability.
44782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44783      # Now convert it back to Unix-stile (cygpath)
44784      input_path=`$CYGPATH -u "$shortmode_path"`
44785      new_path="$input_path"
44786    fi
44787  fi
44788
44789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44790  if test "x$test_cygdrive_prefix" = x; then
44791    # As a simple fix, exclude /usr/bin since it's not a real path.
44792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44794      # a path prefixed by /cygdrive for fixpath to work.
44795      new_path="$CYGWIN_ROOT_PATH$input_path"
44796    fi
44797  fi
44798
44799
44800  if test "x$path" != "x$new_path"; then
44801    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44803$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44804  fi
44805
44806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44807
44808  path="$POTENTIAL_FREETYPE_LIB_PATH"
44809  has_colon=`$ECHO $path | $GREP ^.:`
44810  new_path="$path"
44811  if test "x$has_colon" = x; then
44812    # Not in mixed or Windows style, start by that.
44813    new_path=`cmd //c echo $path`
44814  fi
44815
44816
44817  input_path="$new_path"
44818  # Check if we need to convert this using DOS-style short mode. If the path
44819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44820  # take no chances and rewrite it.
44821  # Note: m4 eats our [], so we need to use [ and ] instead.
44822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44823  if test "x$has_forbidden_chars" != x; then
44824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44826  fi
44827
44828
44829  windows_path="$new_path"
44830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44831    unix_path=`$CYGPATH -u "$windows_path"`
44832    new_path="$unix_path"
44833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44835    new_path="$unix_path"
44836  fi
44837
44838  if test "x$path" != "x$new_path"; then
44839    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44841$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44842  fi
44843
44844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44846
44847  else
44848    # We're on a posix platform. Hooray! :)
44849    path="$POTENTIAL_FREETYPE_LIB_PATH"
44850    has_space=`$ECHO "$path" | $GREP " "`
44851    if test "x$has_space" != x; then
44852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44854      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44855    fi
44856
44857    # Use eval to expand a potential ~
44858    eval path="$path"
44859    if test ! -f "$path" && test ! -d "$path"; then
44860      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44861    fi
44862
44863    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44864  fi
44865
44866
44867    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44869$as_echo_n "checking for freetype includes... " >&6; }
44870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44871$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44872    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44874$as_echo_n "checking for freetype libraries... " >&6; }
44875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44876$as_echo "$FREETYPE_LIB_PATH" >&6; }
44877  fi
44878
44879          if test "x$FOUND_FREETYPE" != xyes; then
44880            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44881          fi
44882        else
44883          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44884$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44885          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44886        fi
44887      else
44888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44889$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44890      fi
44891    fi
44892
44893    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44894      # User has specified settings
44895
44896      if test "x$BUNDLE_FREETYPE" = x; then
44897        # If not specified, default is to bundle freetype
44898        BUNDLE_FREETYPE=yes
44899      fi
44900
44901      if test "x$with_freetype" != x; then
44902        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44903        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44904      fi
44905
44906      # Allow --with-freetype-lib and --with-freetype-include to override
44907      if test "x$with_freetype_include" != x; then
44908        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44909      fi
44910      if test "x$with_freetype_lib" != x; then
44911        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44912      fi
44913
44914      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44915        # Okay, we got it. Check that it works.
44916
44917  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44918  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44919  METHOD="--with-freetype"
44920
44921  # Let's start with an optimistic view of the world :-)
44922  FOUND_FREETYPE=yes
44923
44924  # First look for the canonical freetype main include file ft2build.h.
44925  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44926    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44927    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44928    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44929      # Fail.
44930      FOUND_FREETYPE=no
44931    fi
44932  fi
44933
44934  if test "x$FOUND_FREETYPE" = xyes; then
44935    # Include file found, let's continue the sanity check.
44936    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44937$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44938
44939    # Reset to default value
44940    FREETYPE_BASE_NAME=freetype
44941    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44942    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44943      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44944          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44945        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44946        # for the .6 version explicitly.
44947        FREETYPE_BASE_NAME=freetype.6
44948        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44949        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44950$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44951      else
44952        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44953$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44954        FOUND_FREETYPE=no
44955      fi
44956    else
44957      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44958        # On Windows, we will need both .lib and .dll file.
44959        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44960          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44961$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44962          FOUND_FREETYPE=no
44963        fi
44964      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44965          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44966        # Found lib in isa dir, use that instead.
44967        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44968        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44969$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44970      fi
44971    fi
44972  fi
44973
44974  if test "x$FOUND_FREETYPE" = xyes; then
44975
44976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44977
44978  # Input might be given as Windows format, start by converting to
44979  # unix format.
44980  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44981  new_path=`$CYGPATH -u "$path"`
44982
44983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44986  # "foo.exe" is OK but "foo" is an error.
44987  #
44988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44989  # It is also a way to make sure we got the proper file name for the real test later on.
44990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44991  if test "x$test_shortpath" = x; then
44992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44993$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44994    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44995  fi
44996
44997  # Call helper function which possibly converts this using DOS-style short mode.
44998  # If so, the updated path is stored in $new_path.
44999
45000  input_path="$new_path"
45001  # Check if we need to convert this using DOS-style short mode. If the path
45002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45003  # take no chances and rewrite it.
45004  # Note: m4 eats our [], so we need to use [ and ] instead.
45005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45006  if test "x$has_forbidden_chars" != x; then
45007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45011      # Going to short mode and back again did indeed matter. Since short mode is
45012      # case insensitive, let's make it lowercase to improve readability.
45013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45014      # Now convert it back to Unix-stile (cygpath)
45015      input_path=`$CYGPATH -u "$shortmode_path"`
45016      new_path="$input_path"
45017    fi
45018  fi
45019
45020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45021  if test "x$test_cygdrive_prefix" = x; then
45022    # As a simple fix, exclude /usr/bin since it's not a real path.
45023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45025      # a path prefixed by /cygdrive for fixpath to work.
45026      new_path="$CYGWIN_ROOT_PATH$input_path"
45027    fi
45028  fi
45029
45030
45031  if test "x$path" != "x$new_path"; then
45032    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45034$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45035  fi
45036
45037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45038
45039  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45040  has_colon=`$ECHO $path | $GREP ^.:`
45041  new_path="$path"
45042  if test "x$has_colon" = x; then
45043    # Not in mixed or Windows style, start by that.
45044    new_path=`cmd //c echo $path`
45045  fi
45046
45047
45048  input_path="$new_path"
45049  # Check if we need to convert this using DOS-style short mode. If the path
45050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45051  # take no chances and rewrite it.
45052  # Note: m4 eats our [], so we need to use [ and ] instead.
45053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45054  if test "x$has_forbidden_chars" != x; then
45055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45057  fi
45058
45059
45060  windows_path="$new_path"
45061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45062    unix_path=`$CYGPATH -u "$windows_path"`
45063    new_path="$unix_path"
45064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45066    new_path="$unix_path"
45067  fi
45068
45069  if test "x$path" != "x$new_path"; then
45070    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45072$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45073  fi
45074
45075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45077
45078  else
45079    # We're on a posix platform. Hooray! :)
45080    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45081    has_space=`$ECHO "$path" | $GREP " "`
45082    if test "x$has_space" != x; then
45083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45084$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45085      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45086    fi
45087
45088    # Use eval to expand a potential ~
45089    eval path="$path"
45090    if test ! -f "$path" && test ! -d "$path"; then
45091      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45092    fi
45093
45094    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45095  fi
45096
45097
45098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45099
45100  # Input might be given as Windows format, start by converting to
45101  # unix format.
45102  path="$POTENTIAL_FREETYPE_LIB_PATH"
45103  new_path=`$CYGPATH -u "$path"`
45104
45105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45108  # "foo.exe" is OK but "foo" is an error.
45109  #
45110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45111  # It is also a way to make sure we got the proper file name for the real test later on.
45112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45113  if test "x$test_shortpath" = x; then
45114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45116    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45117  fi
45118
45119  # Call helper function which possibly converts this using DOS-style short mode.
45120  # If so, the updated path is stored in $new_path.
45121
45122  input_path="$new_path"
45123  # Check if we need to convert this using DOS-style short mode. If the path
45124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45125  # take no chances and rewrite it.
45126  # Note: m4 eats our [], so we need to use [ and ] instead.
45127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45128  if test "x$has_forbidden_chars" != x; then
45129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45133      # Going to short mode and back again did indeed matter. Since short mode is
45134      # case insensitive, let's make it lowercase to improve readability.
45135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45136      # Now convert it back to Unix-stile (cygpath)
45137      input_path=`$CYGPATH -u "$shortmode_path"`
45138      new_path="$input_path"
45139    fi
45140  fi
45141
45142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45143  if test "x$test_cygdrive_prefix" = x; then
45144    # As a simple fix, exclude /usr/bin since it's not a real path.
45145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45147      # a path prefixed by /cygdrive for fixpath to work.
45148      new_path="$CYGWIN_ROOT_PATH$input_path"
45149    fi
45150  fi
45151
45152
45153  if test "x$path" != "x$new_path"; then
45154    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45156$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45157  fi
45158
45159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45160
45161  path="$POTENTIAL_FREETYPE_LIB_PATH"
45162  has_colon=`$ECHO $path | $GREP ^.:`
45163  new_path="$path"
45164  if test "x$has_colon" = x; then
45165    # Not in mixed or Windows style, start by that.
45166    new_path=`cmd //c echo $path`
45167  fi
45168
45169
45170  input_path="$new_path"
45171  # Check if we need to convert this using DOS-style short mode. If the path
45172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45173  # take no chances and rewrite it.
45174  # Note: m4 eats our [], so we need to use [ and ] instead.
45175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45176  if test "x$has_forbidden_chars" != x; then
45177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45179  fi
45180
45181
45182  windows_path="$new_path"
45183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45184    unix_path=`$CYGPATH -u "$windows_path"`
45185    new_path="$unix_path"
45186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45188    new_path="$unix_path"
45189  fi
45190
45191  if test "x$path" != "x$new_path"; then
45192    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45194$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45195  fi
45196
45197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45199
45200  else
45201    # We're on a posix platform. Hooray! :)
45202    path="$POTENTIAL_FREETYPE_LIB_PATH"
45203    has_space=`$ECHO "$path" | $GREP " "`
45204    if test "x$has_space" != x; then
45205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45207      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45208    fi
45209
45210    # Use eval to expand a potential ~
45211    eval path="$path"
45212    if test ! -f "$path" && test ! -d "$path"; then
45213      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45214    fi
45215
45216    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45217  fi
45218
45219
45220    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45222$as_echo_n "checking for freetype includes... " >&6; }
45223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45224$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45225    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45227$as_echo_n "checking for freetype libraries... " >&6; }
45228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45229$as_echo "$FREETYPE_LIB_PATH" >&6; }
45230  fi
45231
45232        if test "x$FOUND_FREETYPE" != xyes; then
45233          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45234        fi
45235      else
45236        # User specified only one of lib or include. This is an error.
45237        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45238          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45239$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45240          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45241        else
45242          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45243$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45244          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45245        fi
45246      fi
45247    else
45248      # User did not specify settings, but we need freetype. Try to locate it.
45249
45250      if test "x$BUNDLE_FREETYPE" = x; then
45251        # If not specified, default is to bundle freetype only on windows
45252        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45253          BUNDLE_FREETYPE=yes
45254        else
45255          BUNDLE_FREETYPE=no
45256        fi
45257      fi
45258
45259      if test "x$FOUND_FREETYPE" != xyes; then
45260        # Check builddeps
45261
45262
45263  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45264    # Source the builddeps file again, to make sure it uses the latest variables!
45265    . $builddepsfile
45266    # Look for a target and build machine specific resource!
45267    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45268    if test "x$resource" = x; then
45269      # Ok, lets instead look for a target specific resource
45270      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45271    fi
45272    if test "x$resource" = x; then
45273      # Ok, lets instead look for a build specific resource
45274      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45275    fi
45276    if test "x$resource" = x; then
45277      # Ok, lets instead look for a generic resource
45278      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45279      resource=${builddep_freetype2}
45280    fi
45281    if test "x$resource" != x; then
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45283$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45284      # If the resource in the builddeps.conf file is an existing directory,
45285      # for example /java/linux/cups
45286      if test -d ${resource}; then
45287        depdir=${resource}
45288      else
45289
45290  # freetype2 is for example mymodule
45291  # $resource is for example libs/general/libmymod_1_2_3.zip
45292  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45293  # $with_builddeps_dir is for example /localhome/builddeps
45294  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45295  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45296  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45297  filename=`basename $resource`
45298  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45299  filebase=${filename%%.*}
45300  extension=${filename#*.}
45301  installdir=$with_builddeps_dir/$filebase
45302  if test ! -f $installdir/$filename.unpacked; then
45303    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45304$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45305    if test ! -d $installdir; then
45306      mkdir -p $installdir
45307    fi
45308    if test ! -d $installdir; then
45309      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45310    fi
45311    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45312    touch $tmpfile
45313    if test ! -f $tmpfile; then
45314      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45315    fi
45316
45317  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45318  # $tmpfile is the local file name for the downloaded file.
45319  VALID_TOOL=no
45320  if test "x$BDEPS_FTP" = xwget; then
45321    VALID_TOOL=yes
45322    wget -O $tmpfile $with_builddeps_server/$resource
45323  fi
45324  if test "x$BDEPS_FTP" = xlftp; then
45325    VALID_TOOL=yes
45326    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45327  fi
45328  if test "x$BDEPS_FTP" = xftp; then
45329    VALID_TOOL=yes
45330    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45331    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45332    FTPUSERPWD=${FTPSERVER%%@*}
45333    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45334      FTPUSER=${userpwd%%:*}
45335      FTPPWD=${userpwd#*@}
45336      FTPSERVER=${FTPSERVER#*@}
45337    else
45338      FTPUSER=ftp
45339      FTPPWD=ftp
45340    fi
45341    # the "pass" command does not work on some
45342    # ftp clients (read ftp.exe) but if it works,
45343    # passive mode is better!
45344    ( \
45345        echo "user $FTPUSER $FTPPWD"        ; \
45346        echo "pass"                         ; \
45347        echo "bin"                          ; \
45348        echo "get $FTPPATH $tmpfile"              ; \
45349    ) | ftp -in $FTPSERVER
45350  fi
45351  if test "x$VALID_TOOL" != xyes; then
45352    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45353  fi
45354
45355    mv $tmpfile $installdir/$filename
45356    if test ! -s $installdir/$filename; then
45357      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45358    fi
45359    case "$extension" in
45360      zip)  echo "Unzipping $installdir/$filename..."
45361        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45362        ;;
45363      tar.gz) echo "Untaring $installdir/$filename..."
45364        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45365        ;;
45366      tgz) echo "Untaring $installdir/$filename..."
45367        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45368        ;;
45369      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45370        ;;
45371    esac
45372  fi
45373  if test -f $installdir/$filename.unpacked; then
45374    depdir=$installdir
45375  fi
45376
45377      fi
45378      # Source the builddeps file again, because in the previous command, the depdir
45379      # was updated to point at the current build dependency install directory.
45380      . $builddepsfile
45381      # Now extract variables from the builddeps.conf files.
45382      theroot=${builddep_freetype2_ROOT}
45383      thecflags=${builddep_freetype2_CFLAGS}
45384      thelibs=${builddep_freetype2_LIBS}
45385      if test "x$depdir" = x; then
45386        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45387      fi
45388      FREETYPE=$depdir
45389      if test "x$theroot" != x; then
45390        FREETYPE="$theroot"
45391      fi
45392      if test "x$thecflags" != x; then
45393        FREETYPE_CFLAGS="$thecflags"
45394      fi
45395      if test "x$thelibs" != x; then
45396        FREETYPE_LIBS="$thelibs"
45397      fi
45398      FOUND_FREETYPE=yes
45399      else FOUND_FREETYPE=no
45400
45401    fi
45402    else FOUND_FREETYPE=no
45403
45404  fi
45405
45406        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45407        if test "x$FOUND_FREETYPE" = xyes; then
45408          if test "x$BUNDLE_FREETYPE" = xyes; then
45409            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45410$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45411            FOUND_FREETYPE=no
45412          else
45413            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45414$as_echo_n "checking for freetype... " >&6; }
45415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45416$as_echo "yes (using builddeps)" >&6; }
45417          fi
45418        fi
45419      fi
45420
45421      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45422      if test "x$SYSROOT" = x; then
45423        if test "x$FOUND_FREETYPE" != xyes; then
45424          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45425          if test "x$PKG_CONFIG" != x; then
45426
45427pkg_failed=no
45428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45429$as_echo_n "checking for FREETYPE... " >&6; }
45430
45431if test -n "$FREETYPE_CFLAGS"; then
45432    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45433 elif test -n "$PKG_CONFIG"; then
45434    if test -n "$PKG_CONFIG" && \
45435    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45436  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45437  ac_status=$?
45438  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45439  test $ac_status = 0; }; then
45440  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45441else
45442  pkg_failed=yes
45443fi
45444 else
45445    pkg_failed=untried
45446fi
45447if test -n "$FREETYPE_LIBS"; then
45448    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45449 elif test -n "$PKG_CONFIG"; then
45450    if test -n "$PKG_CONFIG" && \
45451    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45452  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45453  ac_status=$?
45454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45455  test $ac_status = 0; }; then
45456  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45457else
45458  pkg_failed=yes
45459fi
45460 else
45461    pkg_failed=untried
45462fi
45463
45464
45465
45466if test $pkg_failed = yes; then
45467
45468if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45469        _pkg_short_errors_supported=yes
45470else
45471        _pkg_short_errors_supported=no
45472fi
45473        if test $_pkg_short_errors_supported = yes; then
45474	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45475        else
45476	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45477        fi
45478	# Put the nasty error message in config.log where it belongs
45479	echo "$FREETYPE_PKG_ERRORS" >&5
45480
45481	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45482$as_echo "no" >&6; }
45483                FOUND_FREETYPE=no
45484elif test $pkg_failed = untried; then
45485	FOUND_FREETYPE=no
45486else
45487	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45488	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45490$as_echo "yes" >&6; }
45491	FOUND_FREETYPE=yes
45492fi
45493            if test "x$FOUND_FREETYPE" = xyes; then
45494              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45495              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45496              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45497              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45498                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45499              fi
45500              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45501              if test "x$BUNDLE_FREETYPE" = xyes; then
45502                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45503$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45504                FOUND_FREETYPE=no
45505              else
45506                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45507$as_echo_n "checking for freetype... " >&6; }
45508                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45509$as_echo "yes (using pkg-config)" >&6; }
45510              fi
45511            fi
45512          fi
45513        fi
45514      fi
45515
45516      if test "x$FOUND_FREETYPE" != xyes; then
45517        # Check in well-known locations
45518        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45519          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45520
45521  windows_path="$FREETYPE_BASE_DIR"
45522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45523    unix_path=`$CYGPATH -u "$windows_path"`
45524    FREETYPE_BASE_DIR="$unix_path"
45525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45527    FREETYPE_BASE_DIR="$unix_path"
45528  fi
45529
45530
45531  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45532  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45533  METHOD="well-known location"
45534
45535  # Let's start with an optimistic view of the world :-)
45536  FOUND_FREETYPE=yes
45537
45538  # First look for the canonical freetype main include file ft2build.h.
45539  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45540    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45541    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45542    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45543      # Fail.
45544      FOUND_FREETYPE=no
45545    fi
45546  fi
45547
45548  if test "x$FOUND_FREETYPE" = xyes; then
45549    # Include file found, let's continue the sanity check.
45550    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45551$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45552
45553    # Reset to default value
45554    FREETYPE_BASE_NAME=freetype
45555    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45556    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45557      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45558          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45559        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45560        # for the .6 version explicitly.
45561        FREETYPE_BASE_NAME=freetype.6
45562        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45563        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45564$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45565      else
45566        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45567$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45568        FOUND_FREETYPE=no
45569      fi
45570    else
45571      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45572        # On Windows, we will need both .lib and .dll file.
45573        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45574          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45575$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45576          FOUND_FREETYPE=no
45577        fi
45578      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45579          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45580        # Found lib in isa dir, use that instead.
45581        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45582        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45583$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45584      fi
45585    fi
45586  fi
45587
45588  if test "x$FOUND_FREETYPE" = xyes; then
45589
45590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45591
45592  # Input might be given as Windows format, start by converting to
45593  # unix format.
45594  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45595  new_path=`$CYGPATH -u "$path"`
45596
45597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45600  # "foo.exe" is OK but "foo" is an error.
45601  #
45602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45603  # It is also a way to make sure we got the proper file name for the real test later on.
45604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45605  if test "x$test_shortpath" = x; then
45606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45607$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45608    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45609  fi
45610
45611  # Call helper function which possibly converts this using DOS-style short mode.
45612  # If so, the updated path is stored in $new_path.
45613
45614  input_path="$new_path"
45615  # Check if we need to convert this using DOS-style short mode. If the path
45616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45617  # take no chances and rewrite it.
45618  # Note: m4 eats our [], so we need to use [ and ] instead.
45619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45620  if test "x$has_forbidden_chars" != x; then
45621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45625      # Going to short mode and back again did indeed matter. Since short mode is
45626      # case insensitive, let's make it lowercase to improve readability.
45627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45628      # Now convert it back to Unix-stile (cygpath)
45629      input_path=`$CYGPATH -u "$shortmode_path"`
45630      new_path="$input_path"
45631    fi
45632  fi
45633
45634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45635  if test "x$test_cygdrive_prefix" = x; then
45636    # As a simple fix, exclude /usr/bin since it's not a real path.
45637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45639      # a path prefixed by /cygdrive for fixpath to work.
45640      new_path="$CYGWIN_ROOT_PATH$input_path"
45641    fi
45642  fi
45643
45644
45645  if test "x$path" != "x$new_path"; then
45646    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45649  fi
45650
45651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45652
45653  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45654  has_colon=`$ECHO $path | $GREP ^.:`
45655  new_path="$path"
45656  if test "x$has_colon" = x; then
45657    # Not in mixed or Windows style, start by that.
45658    new_path=`cmd //c echo $path`
45659  fi
45660
45661
45662  input_path="$new_path"
45663  # Check if we need to convert this using DOS-style short mode. If the path
45664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45665  # take no chances and rewrite it.
45666  # Note: m4 eats our [], so we need to use [ and ] instead.
45667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45668  if test "x$has_forbidden_chars" != x; then
45669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45671  fi
45672
45673
45674  windows_path="$new_path"
45675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45676    unix_path=`$CYGPATH -u "$windows_path"`
45677    new_path="$unix_path"
45678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45680    new_path="$unix_path"
45681  fi
45682
45683  if test "x$path" != "x$new_path"; then
45684    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45686$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45687  fi
45688
45689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45691
45692  else
45693    # We're on a posix platform. Hooray! :)
45694    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45695    has_space=`$ECHO "$path" | $GREP " "`
45696    if test "x$has_space" != x; then
45697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45699      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45700    fi
45701
45702    # Use eval to expand a potential ~
45703    eval path="$path"
45704    if test ! -f "$path" && test ! -d "$path"; then
45705      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45706    fi
45707
45708    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45709  fi
45710
45711
45712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45713
45714  # Input might be given as Windows format, start by converting to
45715  # unix format.
45716  path="$POTENTIAL_FREETYPE_LIB_PATH"
45717  new_path=`$CYGPATH -u "$path"`
45718
45719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45722  # "foo.exe" is OK but "foo" is an error.
45723  #
45724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45725  # It is also a way to make sure we got the proper file name for the real test later on.
45726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45727  if test "x$test_shortpath" = x; then
45728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45730    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45731  fi
45732
45733  # Call helper function which possibly converts this using DOS-style short mode.
45734  # If so, the updated path is stored in $new_path.
45735
45736  input_path="$new_path"
45737  # Check if we need to convert this using DOS-style short mode. If the path
45738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45739  # take no chances and rewrite it.
45740  # Note: m4 eats our [], so we need to use [ and ] instead.
45741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45742  if test "x$has_forbidden_chars" != x; then
45743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45747      # Going to short mode and back again did indeed matter. Since short mode is
45748      # case insensitive, let's make it lowercase to improve readability.
45749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45750      # Now convert it back to Unix-stile (cygpath)
45751      input_path=`$CYGPATH -u "$shortmode_path"`
45752      new_path="$input_path"
45753    fi
45754  fi
45755
45756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45757  if test "x$test_cygdrive_prefix" = x; then
45758    # As a simple fix, exclude /usr/bin since it's not a real path.
45759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45761      # a path prefixed by /cygdrive for fixpath to work.
45762      new_path="$CYGWIN_ROOT_PATH$input_path"
45763    fi
45764  fi
45765
45766
45767  if test "x$path" != "x$new_path"; then
45768    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45771  fi
45772
45773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45774
45775  path="$POTENTIAL_FREETYPE_LIB_PATH"
45776  has_colon=`$ECHO $path | $GREP ^.:`
45777  new_path="$path"
45778  if test "x$has_colon" = x; then
45779    # Not in mixed or Windows style, start by that.
45780    new_path=`cmd //c echo $path`
45781  fi
45782
45783
45784  input_path="$new_path"
45785  # Check if we need to convert this using DOS-style short mode. If the path
45786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45787  # take no chances and rewrite it.
45788  # Note: m4 eats our [], so we need to use [ and ] instead.
45789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45790  if test "x$has_forbidden_chars" != x; then
45791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45793  fi
45794
45795
45796  windows_path="$new_path"
45797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45798    unix_path=`$CYGPATH -u "$windows_path"`
45799    new_path="$unix_path"
45800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45802    new_path="$unix_path"
45803  fi
45804
45805  if test "x$path" != "x$new_path"; then
45806    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45809  fi
45810
45811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45813
45814  else
45815    # We're on a posix platform. Hooray! :)
45816    path="$POTENTIAL_FREETYPE_LIB_PATH"
45817    has_space=`$ECHO "$path" | $GREP " "`
45818    if test "x$has_space" != x; then
45819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45821      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45822    fi
45823
45824    # Use eval to expand a potential ~
45825    eval path="$path"
45826    if test ! -f "$path" && test ! -d "$path"; then
45827      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45828    fi
45829
45830    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45831  fi
45832
45833
45834    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45836$as_echo_n "checking for freetype includes... " >&6; }
45837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45838$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45839    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45841$as_echo_n "checking for freetype libraries... " >&6; }
45842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45843$as_echo "$FREETYPE_LIB_PATH" >&6; }
45844  fi
45845
45846          if test "x$FOUND_FREETYPE" != xyes; then
45847            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45848
45849  windows_path="$FREETYPE_BASE_DIR"
45850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45851    unix_path=`$CYGPATH -u "$windows_path"`
45852    FREETYPE_BASE_DIR="$unix_path"
45853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45855    FREETYPE_BASE_DIR="$unix_path"
45856  fi
45857
45858
45859  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45860  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45861  METHOD="well-known location"
45862
45863  # Let's start with an optimistic view of the world :-)
45864  FOUND_FREETYPE=yes
45865
45866  # First look for the canonical freetype main include file ft2build.h.
45867  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45868    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45869    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45870    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45871      # Fail.
45872      FOUND_FREETYPE=no
45873    fi
45874  fi
45875
45876  if test "x$FOUND_FREETYPE" = xyes; then
45877    # Include file found, let's continue the sanity check.
45878    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45879$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45880
45881    # Reset to default value
45882    FREETYPE_BASE_NAME=freetype
45883    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45884    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45885      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45886          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45887        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45888        # for the .6 version explicitly.
45889        FREETYPE_BASE_NAME=freetype.6
45890        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45891        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45892$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45893      else
45894        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45895$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45896        FOUND_FREETYPE=no
45897      fi
45898    else
45899      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45900        # On Windows, we will need both .lib and .dll file.
45901        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45902          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45903$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45904          FOUND_FREETYPE=no
45905        fi
45906      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45907          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45908        # Found lib in isa dir, use that instead.
45909        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45910        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45911$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45912      fi
45913    fi
45914  fi
45915
45916  if test "x$FOUND_FREETYPE" = xyes; then
45917
45918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45919
45920  # Input might be given as Windows format, start by converting to
45921  # unix format.
45922  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45923  new_path=`$CYGPATH -u "$path"`
45924
45925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45928  # "foo.exe" is OK but "foo" is an error.
45929  #
45930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45931  # It is also a way to make sure we got the proper file name for the real test later on.
45932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45933  if test "x$test_shortpath" = x; then
45934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45936    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45937  fi
45938
45939  # Call helper function which possibly converts this using DOS-style short mode.
45940  # If so, the updated path is stored in $new_path.
45941
45942  input_path="$new_path"
45943  # Check if we need to convert this using DOS-style short mode. If the path
45944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45945  # take no chances and rewrite it.
45946  # Note: m4 eats our [], so we need to use [ and ] instead.
45947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45948  if test "x$has_forbidden_chars" != x; then
45949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45953      # Going to short mode and back again did indeed matter. Since short mode is
45954      # case insensitive, let's make it lowercase to improve readability.
45955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45956      # Now convert it back to Unix-stile (cygpath)
45957      input_path=`$CYGPATH -u "$shortmode_path"`
45958      new_path="$input_path"
45959    fi
45960  fi
45961
45962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45963  if test "x$test_cygdrive_prefix" = x; then
45964    # As a simple fix, exclude /usr/bin since it's not a real path.
45965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45967      # a path prefixed by /cygdrive for fixpath to work.
45968      new_path="$CYGWIN_ROOT_PATH$input_path"
45969    fi
45970  fi
45971
45972
45973  if test "x$path" != "x$new_path"; then
45974    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45977  fi
45978
45979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45980
45981  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45982  has_colon=`$ECHO $path | $GREP ^.:`
45983  new_path="$path"
45984  if test "x$has_colon" = x; then
45985    # Not in mixed or Windows style, start by that.
45986    new_path=`cmd //c echo $path`
45987  fi
45988
45989
45990  input_path="$new_path"
45991  # Check if we need to convert this using DOS-style short mode. If the path
45992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45993  # take no chances and rewrite it.
45994  # Note: m4 eats our [], so we need to use [ and ] instead.
45995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45996  if test "x$has_forbidden_chars" != x; then
45997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45999  fi
46000
46001
46002  windows_path="$new_path"
46003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46004    unix_path=`$CYGPATH -u "$windows_path"`
46005    new_path="$unix_path"
46006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46008    new_path="$unix_path"
46009  fi
46010
46011  if test "x$path" != "x$new_path"; then
46012    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46014$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46015  fi
46016
46017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46019
46020  else
46021    # We're on a posix platform. Hooray! :)
46022    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46023    has_space=`$ECHO "$path" | $GREP " "`
46024    if test "x$has_space" != x; then
46025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46027      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46028    fi
46029
46030    # Use eval to expand a potential ~
46031    eval path="$path"
46032    if test ! -f "$path" && test ! -d "$path"; then
46033      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46034    fi
46035
46036    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46037  fi
46038
46039
46040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46041
46042  # Input might be given as Windows format, start by converting to
46043  # unix format.
46044  path="$POTENTIAL_FREETYPE_LIB_PATH"
46045  new_path=`$CYGPATH -u "$path"`
46046
46047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46050  # "foo.exe" is OK but "foo" is an error.
46051  #
46052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46053  # It is also a way to make sure we got the proper file name for the real test later on.
46054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46055  if test "x$test_shortpath" = x; then
46056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46057$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46058    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46059  fi
46060
46061  # Call helper function which possibly converts this using DOS-style short mode.
46062  # If so, the updated path is stored in $new_path.
46063
46064  input_path="$new_path"
46065  # Check if we need to convert this using DOS-style short mode. If the path
46066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46067  # take no chances and rewrite it.
46068  # Note: m4 eats our [], so we need to use [ and ] instead.
46069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46070  if test "x$has_forbidden_chars" != x; then
46071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46075      # Going to short mode and back again did indeed matter. Since short mode is
46076      # case insensitive, let's make it lowercase to improve readability.
46077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46078      # Now convert it back to Unix-stile (cygpath)
46079      input_path=`$CYGPATH -u "$shortmode_path"`
46080      new_path="$input_path"
46081    fi
46082  fi
46083
46084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46085  if test "x$test_cygdrive_prefix" = x; then
46086    # As a simple fix, exclude /usr/bin since it's not a real path.
46087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46089      # a path prefixed by /cygdrive for fixpath to work.
46090      new_path="$CYGWIN_ROOT_PATH$input_path"
46091    fi
46092  fi
46093
46094
46095  if test "x$path" != "x$new_path"; then
46096    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46099  fi
46100
46101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46102
46103  path="$POTENTIAL_FREETYPE_LIB_PATH"
46104  has_colon=`$ECHO $path | $GREP ^.:`
46105  new_path="$path"
46106  if test "x$has_colon" = x; then
46107    # Not in mixed or Windows style, start by that.
46108    new_path=`cmd //c echo $path`
46109  fi
46110
46111
46112  input_path="$new_path"
46113  # Check if we need to convert this using DOS-style short mode. If the path
46114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46115  # take no chances and rewrite it.
46116  # Note: m4 eats our [], so we need to use [ and ] instead.
46117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46118  if test "x$has_forbidden_chars" != x; then
46119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46121  fi
46122
46123
46124  windows_path="$new_path"
46125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46126    unix_path=`$CYGPATH -u "$windows_path"`
46127    new_path="$unix_path"
46128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46130    new_path="$unix_path"
46131  fi
46132
46133  if test "x$path" != "x$new_path"; then
46134    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46136$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46137  fi
46138
46139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46141
46142  else
46143    # We're on a posix platform. Hooray! :)
46144    path="$POTENTIAL_FREETYPE_LIB_PATH"
46145    has_space=`$ECHO "$path" | $GREP " "`
46146    if test "x$has_space" != x; then
46147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46149      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46150    fi
46151
46152    # Use eval to expand a potential ~
46153    eval path="$path"
46154    if test ! -f "$path" && test ! -d "$path"; then
46155      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46156    fi
46157
46158    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46159  fi
46160
46161
46162    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46164$as_echo_n "checking for freetype includes... " >&6; }
46165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46166$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46167    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46169$as_echo_n "checking for freetype libraries... " >&6; }
46170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46171$as_echo "$FREETYPE_LIB_PATH" >&6; }
46172  fi
46173
46174          fi
46175        else
46176          FREETYPE_BASE_DIR="$SYSROOT/usr"
46177
46178  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46179  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46180  METHOD="well-known location"
46181
46182  # Let's start with an optimistic view of the world :-)
46183  FOUND_FREETYPE=yes
46184
46185  # First look for the canonical freetype main include file ft2build.h.
46186  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46187    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46188    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46189    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46190      # Fail.
46191      FOUND_FREETYPE=no
46192    fi
46193  fi
46194
46195  if test "x$FOUND_FREETYPE" = xyes; then
46196    # Include file found, let's continue the sanity check.
46197    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46198$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46199
46200    # Reset to default value
46201    FREETYPE_BASE_NAME=freetype
46202    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46203    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46204      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46205          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46206        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46207        # for the .6 version explicitly.
46208        FREETYPE_BASE_NAME=freetype.6
46209        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46210        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46211$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46212      else
46213        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46214$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46215        FOUND_FREETYPE=no
46216      fi
46217    else
46218      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46219        # On Windows, we will need both .lib and .dll file.
46220        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46221          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46222$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46223          FOUND_FREETYPE=no
46224        fi
46225      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46226          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46227        # Found lib in isa dir, use that instead.
46228        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46229        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46230$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46231      fi
46232    fi
46233  fi
46234
46235  if test "x$FOUND_FREETYPE" = xyes; then
46236
46237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46238
46239  # Input might be given as Windows format, start by converting to
46240  # unix format.
46241  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46242  new_path=`$CYGPATH -u "$path"`
46243
46244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46247  # "foo.exe" is OK but "foo" is an error.
46248  #
46249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46250  # It is also a way to make sure we got the proper file name for the real test later on.
46251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46252  if test "x$test_shortpath" = x; then
46253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46254$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46255    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46256  fi
46257
46258  # Call helper function which possibly converts this using DOS-style short mode.
46259  # If so, the updated path is stored in $new_path.
46260
46261  input_path="$new_path"
46262  # Check if we need to convert this using DOS-style short mode. If the path
46263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46264  # take no chances and rewrite it.
46265  # Note: m4 eats our [], so we need to use [ and ] instead.
46266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46267  if test "x$has_forbidden_chars" != x; then
46268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46272      # Going to short mode and back again did indeed matter. Since short mode is
46273      # case insensitive, let's make it lowercase to improve readability.
46274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46275      # Now convert it back to Unix-stile (cygpath)
46276      input_path=`$CYGPATH -u "$shortmode_path"`
46277      new_path="$input_path"
46278    fi
46279  fi
46280
46281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46282  if test "x$test_cygdrive_prefix" = x; then
46283    # As a simple fix, exclude /usr/bin since it's not a real path.
46284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46286      # a path prefixed by /cygdrive for fixpath to work.
46287      new_path="$CYGWIN_ROOT_PATH$input_path"
46288    fi
46289  fi
46290
46291
46292  if test "x$path" != "x$new_path"; then
46293    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46296  fi
46297
46298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46299
46300  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46301  has_colon=`$ECHO $path | $GREP ^.:`
46302  new_path="$path"
46303  if test "x$has_colon" = x; then
46304    # Not in mixed or Windows style, start by that.
46305    new_path=`cmd //c echo $path`
46306  fi
46307
46308
46309  input_path="$new_path"
46310  # Check if we need to convert this using DOS-style short mode. If the path
46311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46312  # take no chances and rewrite it.
46313  # Note: m4 eats our [], so we need to use [ and ] instead.
46314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46315  if test "x$has_forbidden_chars" != x; then
46316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46318  fi
46319
46320
46321  windows_path="$new_path"
46322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46323    unix_path=`$CYGPATH -u "$windows_path"`
46324    new_path="$unix_path"
46325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46327    new_path="$unix_path"
46328  fi
46329
46330  if test "x$path" != "x$new_path"; then
46331    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46334  fi
46335
46336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46338
46339  else
46340    # We're on a posix platform. Hooray! :)
46341    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46342    has_space=`$ECHO "$path" | $GREP " "`
46343    if test "x$has_space" != x; then
46344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46347    fi
46348
46349    # Use eval to expand a potential ~
46350    eval path="$path"
46351    if test ! -f "$path" && test ! -d "$path"; then
46352      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46353    fi
46354
46355    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46356  fi
46357
46358
46359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46360
46361  # Input might be given as Windows format, start by converting to
46362  # unix format.
46363  path="$POTENTIAL_FREETYPE_LIB_PATH"
46364  new_path=`$CYGPATH -u "$path"`
46365
46366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46369  # "foo.exe" is OK but "foo" is an error.
46370  #
46371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46372  # It is also a way to make sure we got the proper file name for the real test later on.
46373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46374  if test "x$test_shortpath" = x; then
46375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46376$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46377    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46378  fi
46379
46380  # Call helper function which possibly converts this using DOS-style short mode.
46381  # If so, the updated path is stored in $new_path.
46382
46383  input_path="$new_path"
46384  # Check if we need to convert this using DOS-style short mode. If the path
46385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46386  # take no chances and rewrite it.
46387  # Note: m4 eats our [], so we need to use [ and ] instead.
46388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46389  if test "x$has_forbidden_chars" != x; then
46390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46394      # Going to short mode and back again did indeed matter. Since short mode is
46395      # case insensitive, let's make it lowercase to improve readability.
46396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46397      # Now convert it back to Unix-stile (cygpath)
46398      input_path=`$CYGPATH -u "$shortmode_path"`
46399      new_path="$input_path"
46400    fi
46401  fi
46402
46403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46404  if test "x$test_cygdrive_prefix" = x; then
46405    # As a simple fix, exclude /usr/bin since it's not a real path.
46406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46408      # a path prefixed by /cygdrive for fixpath to work.
46409      new_path="$CYGWIN_ROOT_PATH$input_path"
46410    fi
46411  fi
46412
46413
46414  if test "x$path" != "x$new_path"; then
46415    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46418  fi
46419
46420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46421
46422  path="$POTENTIAL_FREETYPE_LIB_PATH"
46423  has_colon=`$ECHO $path | $GREP ^.:`
46424  new_path="$path"
46425  if test "x$has_colon" = x; then
46426    # Not in mixed or Windows style, start by that.
46427    new_path=`cmd //c echo $path`
46428  fi
46429
46430
46431  input_path="$new_path"
46432  # Check if we need to convert this using DOS-style short mode. If the path
46433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46434  # take no chances and rewrite it.
46435  # Note: m4 eats our [], so we need to use [ and ] instead.
46436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46437  if test "x$has_forbidden_chars" != x; then
46438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46440  fi
46441
46442
46443  windows_path="$new_path"
46444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46445    unix_path=`$CYGPATH -u "$windows_path"`
46446    new_path="$unix_path"
46447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46449    new_path="$unix_path"
46450  fi
46451
46452  if test "x$path" != "x$new_path"; then
46453    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46456  fi
46457
46458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46460
46461  else
46462    # We're on a posix platform. Hooray! :)
46463    path="$POTENTIAL_FREETYPE_LIB_PATH"
46464    has_space=`$ECHO "$path" | $GREP " "`
46465    if test "x$has_space" != x; then
46466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46467$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46468      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46469    fi
46470
46471    # Use eval to expand a potential ~
46472    eval path="$path"
46473    if test ! -f "$path" && test ! -d "$path"; then
46474      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46475    fi
46476
46477    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46478  fi
46479
46480
46481    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46483$as_echo_n "checking for freetype includes... " >&6; }
46484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46485$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46486    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46488$as_echo_n "checking for freetype libraries... " >&6; }
46489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46490$as_echo "$FREETYPE_LIB_PATH" >&6; }
46491  fi
46492
46493
46494          if test "x$FOUND_FREETYPE" != xyes; then
46495            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46496
46497  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46498  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46499  METHOD="well-known location"
46500
46501  # Let's start with an optimistic view of the world :-)
46502  FOUND_FREETYPE=yes
46503
46504  # First look for the canonical freetype main include file ft2build.h.
46505  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46506    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46507    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46508    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46509      # Fail.
46510      FOUND_FREETYPE=no
46511    fi
46512  fi
46513
46514  if test "x$FOUND_FREETYPE" = xyes; then
46515    # Include file found, let's continue the sanity check.
46516    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46517$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46518
46519    # Reset to default value
46520    FREETYPE_BASE_NAME=freetype
46521    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46522    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46523      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46524          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46525        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46526        # for the .6 version explicitly.
46527        FREETYPE_BASE_NAME=freetype.6
46528        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46529        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46530$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46531      else
46532        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46533$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46534        FOUND_FREETYPE=no
46535      fi
46536    else
46537      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46538        # On Windows, we will need both .lib and .dll file.
46539        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46540          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46541$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46542          FOUND_FREETYPE=no
46543        fi
46544      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46545          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46546        # Found lib in isa dir, use that instead.
46547        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46548        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46549$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46550      fi
46551    fi
46552  fi
46553
46554  if test "x$FOUND_FREETYPE" = xyes; then
46555
46556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46557
46558  # Input might be given as Windows format, start by converting to
46559  # unix format.
46560  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46561  new_path=`$CYGPATH -u "$path"`
46562
46563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46566  # "foo.exe" is OK but "foo" is an error.
46567  #
46568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46569  # It is also a way to make sure we got the proper file name for the real test later on.
46570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46571  if test "x$test_shortpath" = x; then
46572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46573$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46574    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46575  fi
46576
46577  # Call helper function which possibly converts this using DOS-style short mode.
46578  # If so, the updated path is stored in $new_path.
46579
46580  input_path="$new_path"
46581  # Check if we need to convert this using DOS-style short mode. If the path
46582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46583  # take no chances and rewrite it.
46584  # Note: m4 eats our [], so we need to use [ and ] instead.
46585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46586  if test "x$has_forbidden_chars" != x; then
46587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46591      # Going to short mode and back again did indeed matter. Since short mode is
46592      # case insensitive, let's make it lowercase to improve readability.
46593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46594      # Now convert it back to Unix-stile (cygpath)
46595      input_path=`$CYGPATH -u "$shortmode_path"`
46596      new_path="$input_path"
46597    fi
46598  fi
46599
46600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46601  if test "x$test_cygdrive_prefix" = x; then
46602    # As a simple fix, exclude /usr/bin since it's not a real path.
46603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46605      # a path prefixed by /cygdrive for fixpath to work.
46606      new_path="$CYGWIN_ROOT_PATH$input_path"
46607    fi
46608  fi
46609
46610
46611  if test "x$path" != "x$new_path"; then
46612    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46615  fi
46616
46617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46618
46619  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46620  has_colon=`$ECHO $path | $GREP ^.:`
46621  new_path="$path"
46622  if test "x$has_colon" = x; then
46623    # Not in mixed or Windows style, start by that.
46624    new_path=`cmd //c echo $path`
46625  fi
46626
46627
46628  input_path="$new_path"
46629  # Check if we need to convert this using DOS-style short mode. If the path
46630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46631  # take no chances and rewrite it.
46632  # Note: m4 eats our [], so we need to use [ and ] instead.
46633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46634  if test "x$has_forbidden_chars" != x; then
46635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46637  fi
46638
46639
46640  windows_path="$new_path"
46641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46642    unix_path=`$CYGPATH -u "$windows_path"`
46643    new_path="$unix_path"
46644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46646    new_path="$unix_path"
46647  fi
46648
46649  if test "x$path" != "x$new_path"; then
46650    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46653  fi
46654
46655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46657
46658  else
46659    # We're on a posix platform. Hooray! :)
46660    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46661    has_space=`$ECHO "$path" | $GREP " "`
46662    if test "x$has_space" != x; then
46663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46664$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46665      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46666    fi
46667
46668    # Use eval to expand a potential ~
46669    eval path="$path"
46670    if test ! -f "$path" && test ! -d "$path"; then
46671      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46672    fi
46673
46674    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46675  fi
46676
46677
46678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46679
46680  # Input might be given as Windows format, start by converting to
46681  # unix format.
46682  path="$POTENTIAL_FREETYPE_LIB_PATH"
46683  new_path=`$CYGPATH -u "$path"`
46684
46685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46688  # "foo.exe" is OK but "foo" is an error.
46689  #
46690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46691  # It is also a way to make sure we got the proper file name for the real test later on.
46692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46693  if test "x$test_shortpath" = x; then
46694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46696    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46697  fi
46698
46699  # Call helper function which possibly converts this using DOS-style short mode.
46700  # If so, the updated path is stored in $new_path.
46701
46702  input_path="$new_path"
46703  # Check if we need to convert this using DOS-style short mode. If the path
46704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46705  # take no chances and rewrite it.
46706  # Note: m4 eats our [], so we need to use [ and ] instead.
46707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46708  if test "x$has_forbidden_chars" != x; then
46709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46713      # Going to short mode and back again did indeed matter. Since short mode is
46714      # case insensitive, let's make it lowercase to improve readability.
46715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46716      # Now convert it back to Unix-stile (cygpath)
46717      input_path=`$CYGPATH -u "$shortmode_path"`
46718      new_path="$input_path"
46719    fi
46720  fi
46721
46722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46723  if test "x$test_cygdrive_prefix" = x; then
46724    # As a simple fix, exclude /usr/bin since it's not a real path.
46725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46727      # a path prefixed by /cygdrive for fixpath to work.
46728      new_path="$CYGWIN_ROOT_PATH$input_path"
46729    fi
46730  fi
46731
46732
46733  if test "x$path" != "x$new_path"; then
46734    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46737  fi
46738
46739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46740
46741  path="$POTENTIAL_FREETYPE_LIB_PATH"
46742  has_colon=`$ECHO $path | $GREP ^.:`
46743  new_path="$path"
46744  if test "x$has_colon" = x; then
46745    # Not in mixed or Windows style, start by that.
46746    new_path=`cmd //c echo $path`
46747  fi
46748
46749
46750  input_path="$new_path"
46751  # Check if we need to convert this using DOS-style short mode. If the path
46752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46753  # take no chances and rewrite it.
46754  # Note: m4 eats our [], so we need to use [ and ] instead.
46755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46756  if test "x$has_forbidden_chars" != x; then
46757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46759  fi
46760
46761
46762  windows_path="$new_path"
46763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46764    unix_path=`$CYGPATH -u "$windows_path"`
46765    new_path="$unix_path"
46766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46768    new_path="$unix_path"
46769  fi
46770
46771  if test "x$path" != "x$new_path"; then
46772    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46775  fi
46776
46777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46779
46780  else
46781    # We're on a posix platform. Hooray! :)
46782    path="$POTENTIAL_FREETYPE_LIB_PATH"
46783    has_space=`$ECHO "$path" | $GREP " "`
46784    if test "x$has_space" != x; then
46785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46786$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46787      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46788    fi
46789
46790    # Use eval to expand a potential ~
46791    eval path="$path"
46792    if test ! -f "$path" && test ! -d "$path"; then
46793      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46794    fi
46795
46796    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46797  fi
46798
46799
46800    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46802$as_echo_n "checking for freetype includes... " >&6; }
46803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46804$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46805    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46807$as_echo_n "checking for freetype libraries... " >&6; }
46808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46809$as_echo "$FREETYPE_LIB_PATH" >&6; }
46810  fi
46811
46812          fi
46813
46814          if test "x$FOUND_FREETYPE" != xyes; then
46815            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46816
46817  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46818  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46819  METHOD="well-known location"
46820
46821  # Let's start with an optimistic view of the world :-)
46822  FOUND_FREETYPE=yes
46823
46824  # First look for the canonical freetype main include file ft2build.h.
46825  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46826    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46827    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46828    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46829      # Fail.
46830      FOUND_FREETYPE=no
46831    fi
46832  fi
46833
46834  if test "x$FOUND_FREETYPE" = xyes; then
46835    # Include file found, let's continue the sanity check.
46836    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46837$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46838
46839    # Reset to default value
46840    FREETYPE_BASE_NAME=freetype
46841    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46842    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46843      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46844          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46845        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46846        # for the .6 version explicitly.
46847        FREETYPE_BASE_NAME=freetype.6
46848        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46849        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46850$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46851      else
46852        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46853$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46854        FOUND_FREETYPE=no
46855      fi
46856    else
46857      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46858        # On Windows, we will need both .lib and .dll file.
46859        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46860          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46861$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46862          FOUND_FREETYPE=no
46863        fi
46864      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46865          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46866        # Found lib in isa dir, use that instead.
46867        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46868        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46869$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46870      fi
46871    fi
46872  fi
46873
46874  if test "x$FOUND_FREETYPE" = xyes; then
46875
46876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46877
46878  # Input might be given as Windows format, start by converting to
46879  # unix format.
46880  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46881  new_path=`$CYGPATH -u "$path"`
46882
46883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46886  # "foo.exe" is OK but "foo" is an error.
46887  #
46888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46889  # It is also a way to make sure we got the proper file name for the real test later on.
46890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46891  if test "x$test_shortpath" = x; then
46892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46894    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46895  fi
46896
46897  # Call helper function which possibly converts this using DOS-style short mode.
46898  # If so, the updated path is stored in $new_path.
46899
46900  input_path="$new_path"
46901  # Check if we need to convert this using DOS-style short mode. If the path
46902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46903  # take no chances and rewrite it.
46904  # Note: m4 eats our [], so we need to use [ and ] instead.
46905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46906  if test "x$has_forbidden_chars" != x; then
46907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46911      # Going to short mode and back again did indeed matter. Since short mode is
46912      # case insensitive, let's make it lowercase to improve readability.
46913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46914      # Now convert it back to Unix-stile (cygpath)
46915      input_path=`$CYGPATH -u "$shortmode_path"`
46916      new_path="$input_path"
46917    fi
46918  fi
46919
46920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46921  if test "x$test_cygdrive_prefix" = x; then
46922    # As a simple fix, exclude /usr/bin since it's not a real path.
46923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46925      # a path prefixed by /cygdrive for fixpath to work.
46926      new_path="$CYGWIN_ROOT_PATH$input_path"
46927    fi
46928  fi
46929
46930
46931  if test "x$path" != "x$new_path"; then
46932    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46934$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46935  fi
46936
46937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46938
46939  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46940  has_colon=`$ECHO $path | $GREP ^.:`
46941  new_path="$path"
46942  if test "x$has_colon" = x; then
46943    # Not in mixed or Windows style, start by that.
46944    new_path=`cmd //c echo $path`
46945  fi
46946
46947
46948  input_path="$new_path"
46949  # Check if we need to convert this using DOS-style short mode. If the path
46950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46951  # take no chances and rewrite it.
46952  # Note: m4 eats our [], so we need to use [ and ] instead.
46953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46954  if test "x$has_forbidden_chars" != x; then
46955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46957  fi
46958
46959
46960  windows_path="$new_path"
46961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46962    unix_path=`$CYGPATH -u "$windows_path"`
46963    new_path="$unix_path"
46964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46966    new_path="$unix_path"
46967  fi
46968
46969  if test "x$path" != "x$new_path"; then
46970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46973  fi
46974
46975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46977
46978  else
46979    # We're on a posix platform. Hooray! :)
46980    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46981    has_space=`$ECHO "$path" | $GREP " "`
46982    if test "x$has_space" != x; then
46983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46985      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46986    fi
46987
46988    # Use eval to expand a potential ~
46989    eval path="$path"
46990    if test ! -f "$path" && test ! -d "$path"; then
46991      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46992    fi
46993
46994    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46995  fi
46996
46997
46998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46999
47000  # Input might be given as Windows format, start by converting to
47001  # unix format.
47002  path="$POTENTIAL_FREETYPE_LIB_PATH"
47003  new_path=`$CYGPATH -u "$path"`
47004
47005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47008  # "foo.exe" is OK but "foo" is an error.
47009  #
47010  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47011  # It is also a way to make sure we got the proper file name for the real test later on.
47012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47013  if test "x$test_shortpath" = x; then
47014    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47016    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47017  fi
47018
47019  # Call helper function which possibly converts this using DOS-style short mode.
47020  # If so, the updated path is stored in $new_path.
47021
47022  input_path="$new_path"
47023  # Check if we need to convert this using DOS-style short mode. If the path
47024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47025  # take no chances and rewrite it.
47026  # Note: m4 eats our [], so we need to use [ and ] instead.
47027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47028  if test "x$has_forbidden_chars" != x; then
47029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47033      # Going to short mode and back again did indeed matter. Since short mode is
47034      # case insensitive, let's make it lowercase to improve readability.
47035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47036      # Now convert it back to Unix-stile (cygpath)
47037      input_path=`$CYGPATH -u "$shortmode_path"`
47038      new_path="$input_path"
47039    fi
47040  fi
47041
47042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47043  if test "x$test_cygdrive_prefix" = x; then
47044    # As a simple fix, exclude /usr/bin since it's not a real path.
47045    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47047      # a path prefixed by /cygdrive for fixpath to work.
47048      new_path="$CYGWIN_ROOT_PATH$input_path"
47049    fi
47050  fi
47051
47052
47053  if test "x$path" != "x$new_path"; then
47054    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47057  fi
47058
47059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47060
47061  path="$POTENTIAL_FREETYPE_LIB_PATH"
47062  has_colon=`$ECHO $path | $GREP ^.:`
47063  new_path="$path"
47064  if test "x$has_colon" = x; then
47065    # Not in mixed or Windows style, start by that.
47066    new_path=`cmd //c echo $path`
47067  fi
47068
47069
47070  input_path="$new_path"
47071  # Check if we need to convert this using DOS-style short mode. If the path
47072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47073  # take no chances and rewrite it.
47074  # Note: m4 eats our [], so we need to use [ and ] instead.
47075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47076  if test "x$has_forbidden_chars" != x; then
47077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47079  fi
47080
47081
47082  windows_path="$new_path"
47083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47084    unix_path=`$CYGPATH -u "$windows_path"`
47085    new_path="$unix_path"
47086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47088    new_path="$unix_path"
47089  fi
47090
47091  if test "x$path" != "x$new_path"; then
47092    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47095  fi
47096
47097  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47098  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47099
47100  else
47101    # We're on a posix platform. Hooray! :)
47102    path="$POTENTIAL_FREETYPE_LIB_PATH"
47103    has_space=`$ECHO "$path" | $GREP " "`
47104    if test "x$has_space" != x; then
47105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47106$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47107      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47108    fi
47109
47110    # Use eval to expand a potential ~
47111    eval path="$path"
47112    if test ! -f "$path" && test ! -d "$path"; then
47113      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47114    fi
47115
47116    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47117  fi
47118
47119
47120    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47122$as_echo_n "checking for freetype includes... " >&6; }
47123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47124$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47125    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47127$as_echo_n "checking for freetype libraries... " >&6; }
47128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47129$as_echo "$FREETYPE_LIB_PATH" >&6; }
47130  fi
47131
47132          fi
47133
47134          if test "x$FOUND_FREETYPE" != xyes; then
47135            FREETYPE_BASE_DIR="$SYSROOT/usr"
47136            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47137
47138  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47139  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47140  METHOD="well-known location"
47141
47142  # Let's start with an optimistic view of the world :-)
47143  FOUND_FREETYPE=yes
47144
47145  # First look for the canonical freetype main include file ft2build.h.
47146  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47147    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47148    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47149    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47150      # Fail.
47151      FOUND_FREETYPE=no
47152    fi
47153  fi
47154
47155  if test "x$FOUND_FREETYPE" = xyes; then
47156    # Include file found, let's continue the sanity check.
47157    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47158$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47159
47160    # Reset to default value
47161    FREETYPE_BASE_NAME=freetype
47162    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47163    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47164      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47165          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47166        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47167        # for the .6 version explicitly.
47168        FREETYPE_BASE_NAME=freetype.6
47169        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47171$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47172      else
47173        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47174$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47175        FOUND_FREETYPE=no
47176      fi
47177    else
47178      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47179        # On Windows, we will need both .lib and .dll file.
47180        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47181          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47182$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47183          FOUND_FREETYPE=no
47184        fi
47185      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47186          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47187        # Found lib in isa dir, use that instead.
47188        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47189        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47190$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47191      fi
47192    fi
47193  fi
47194
47195  if test "x$FOUND_FREETYPE" = xyes; then
47196
47197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47198
47199  # Input might be given as Windows format, start by converting to
47200  # unix format.
47201  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47202  new_path=`$CYGPATH -u "$path"`
47203
47204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47207  # "foo.exe" is OK but "foo" is an error.
47208  #
47209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47210  # It is also a way to make sure we got the proper file name for the real test later on.
47211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47212  if test "x$test_shortpath" = x; then
47213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47214$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47215    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47216  fi
47217
47218  # Call helper function which possibly converts this using DOS-style short mode.
47219  # If so, the updated path is stored in $new_path.
47220
47221  input_path="$new_path"
47222  # Check if we need to convert this using DOS-style short mode. If the path
47223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47224  # take no chances and rewrite it.
47225  # Note: m4 eats our [], so we need to use [ and ] instead.
47226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47227  if test "x$has_forbidden_chars" != x; then
47228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47232      # Going to short mode and back again did indeed matter. Since short mode is
47233      # case insensitive, let's make it lowercase to improve readability.
47234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47235      # Now convert it back to Unix-stile (cygpath)
47236      input_path=`$CYGPATH -u "$shortmode_path"`
47237      new_path="$input_path"
47238    fi
47239  fi
47240
47241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47242  if test "x$test_cygdrive_prefix" = x; then
47243    # As a simple fix, exclude /usr/bin since it's not a real path.
47244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47246      # a path prefixed by /cygdrive for fixpath to work.
47247      new_path="$CYGWIN_ROOT_PATH$input_path"
47248    fi
47249  fi
47250
47251
47252  if test "x$path" != "x$new_path"; then
47253    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47255$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47256  fi
47257
47258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47259
47260  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47261  has_colon=`$ECHO $path | $GREP ^.:`
47262  new_path="$path"
47263  if test "x$has_colon" = x; then
47264    # Not in mixed or Windows style, start by that.
47265    new_path=`cmd //c echo $path`
47266  fi
47267
47268
47269  input_path="$new_path"
47270  # Check if we need to convert this using DOS-style short mode. If the path
47271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47272  # take no chances and rewrite it.
47273  # Note: m4 eats our [], so we need to use [ and ] instead.
47274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47275  if test "x$has_forbidden_chars" != x; then
47276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47278  fi
47279
47280
47281  windows_path="$new_path"
47282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47283    unix_path=`$CYGPATH -u "$windows_path"`
47284    new_path="$unix_path"
47285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47287    new_path="$unix_path"
47288  fi
47289
47290  if test "x$path" != "x$new_path"; then
47291    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47294  fi
47295
47296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47298
47299  else
47300    # We're on a posix platform. Hooray! :)
47301    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47302    has_space=`$ECHO "$path" | $GREP " "`
47303    if test "x$has_space" != x; then
47304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47307    fi
47308
47309    # Use eval to expand a potential ~
47310    eval path="$path"
47311    if test ! -f "$path" && test ! -d "$path"; then
47312      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47313    fi
47314
47315    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47316  fi
47317
47318
47319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47320
47321  # Input might be given as Windows format, start by converting to
47322  # unix format.
47323  path="$POTENTIAL_FREETYPE_LIB_PATH"
47324  new_path=`$CYGPATH -u "$path"`
47325
47326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47329  # "foo.exe" is OK but "foo" is an error.
47330  #
47331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47332  # It is also a way to make sure we got the proper file name for the real test later on.
47333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47334  if test "x$test_shortpath" = x; then
47335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47337    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47338  fi
47339
47340  # Call helper function which possibly converts this using DOS-style short mode.
47341  # If so, the updated path is stored in $new_path.
47342
47343  input_path="$new_path"
47344  # Check if we need to convert this using DOS-style short mode. If the path
47345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47346  # take no chances and rewrite it.
47347  # Note: m4 eats our [], so we need to use [ and ] instead.
47348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47349  if test "x$has_forbidden_chars" != x; then
47350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47354      # Going to short mode and back again did indeed matter. Since short mode is
47355      # case insensitive, let's make it lowercase to improve readability.
47356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47357      # Now convert it back to Unix-stile (cygpath)
47358      input_path=`$CYGPATH -u "$shortmode_path"`
47359      new_path="$input_path"
47360    fi
47361  fi
47362
47363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47364  if test "x$test_cygdrive_prefix" = x; then
47365    # As a simple fix, exclude /usr/bin since it's not a real path.
47366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47368      # a path prefixed by /cygdrive for fixpath to work.
47369      new_path="$CYGWIN_ROOT_PATH$input_path"
47370    fi
47371  fi
47372
47373
47374  if test "x$path" != "x$new_path"; then
47375    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47378  fi
47379
47380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47381
47382  path="$POTENTIAL_FREETYPE_LIB_PATH"
47383  has_colon=`$ECHO $path | $GREP ^.:`
47384  new_path="$path"
47385  if test "x$has_colon" = x; then
47386    # Not in mixed or Windows style, start by that.
47387    new_path=`cmd //c echo $path`
47388  fi
47389
47390
47391  input_path="$new_path"
47392  # Check if we need to convert this using DOS-style short mode. If the path
47393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47394  # take no chances and rewrite it.
47395  # Note: m4 eats our [], so we need to use [ and ] instead.
47396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47397  if test "x$has_forbidden_chars" != x; then
47398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47400  fi
47401
47402
47403  windows_path="$new_path"
47404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47405    unix_path=`$CYGPATH -u "$windows_path"`
47406    new_path="$unix_path"
47407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47409    new_path="$unix_path"
47410  fi
47411
47412  if test "x$path" != "x$new_path"; then
47413    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47416  fi
47417
47418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47420
47421  else
47422    # We're on a posix platform. Hooray! :)
47423    path="$POTENTIAL_FREETYPE_LIB_PATH"
47424    has_space=`$ECHO "$path" | $GREP " "`
47425    if test "x$has_space" != x; then
47426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47428      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47429    fi
47430
47431    # Use eval to expand a potential ~
47432    eval path="$path"
47433    if test ! -f "$path" && test ! -d "$path"; then
47434      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47435    fi
47436
47437    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47438  fi
47439
47440
47441    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47443$as_echo_n "checking for freetype includes... " >&6; }
47444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47445$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47446    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47448$as_echo_n "checking for freetype libraries... " >&6; }
47449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47450$as_echo "$FREETYPE_LIB_PATH" >&6; }
47451  fi
47452
47453            else
47454
47455  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47456  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47457  METHOD="well-known location"
47458
47459  # Let's start with an optimistic view of the world :-)
47460  FOUND_FREETYPE=yes
47461
47462  # First look for the canonical freetype main include file ft2build.h.
47463  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47464    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47465    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47466    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47467      # Fail.
47468      FOUND_FREETYPE=no
47469    fi
47470  fi
47471
47472  if test "x$FOUND_FREETYPE" = xyes; then
47473    # Include file found, let's continue the sanity check.
47474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47475$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47476
47477    # Reset to default value
47478    FREETYPE_BASE_NAME=freetype
47479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47481      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47482          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47483        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47484        # for the .6 version explicitly.
47485        FREETYPE_BASE_NAME=freetype.6
47486        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47487        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47488$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47489      else
47490        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47492        FOUND_FREETYPE=no
47493      fi
47494    else
47495      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47496        # On Windows, we will need both .lib and .dll file.
47497        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47498          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47500          FOUND_FREETYPE=no
47501        fi
47502      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47504        # Found lib in isa dir, use that instead.
47505        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47506        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47507$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47508      fi
47509    fi
47510  fi
47511
47512  if test "x$FOUND_FREETYPE" = xyes; then
47513
47514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47515
47516  # Input might be given as Windows format, start by converting to
47517  # unix format.
47518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47519  new_path=`$CYGPATH -u "$path"`
47520
47521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47524  # "foo.exe" is OK but "foo" is an error.
47525  #
47526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47527  # It is also a way to make sure we got the proper file name for the real test later on.
47528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47529  if test "x$test_shortpath" = x; then
47530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47533  fi
47534
47535  # Call helper function which possibly converts this using DOS-style short mode.
47536  # If so, the updated path is stored in $new_path.
47537
47538  input_path="$new_path"
47539  # Check if we need to convert this using DOS-style short mode. If the path
47540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47541  # take no chances and rewrite it.
47542  # Note: m4 eats our [], so we need to use [ and ] instead.
47543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47544  if test "x$has_forbidden_chars" != x; then
47545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47549      # Going to short mode and back again did indeed matter. Since short mode is
47550      # case insensitive, let's make it lowercase to improve readability.
47551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47552      # Now convert it back to Unix-stile (cygpath)
47553      input_path=`$CYGPATH -u "$shortmode_path"`
47554      new_path="$input_path"
47555    fi
47556  fi
47557
47558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47559  if test "x$test_cygdrive_prefix" = x; then
47560    # As a simple fix, exclude /usr/bin since it's not a real path.
47561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47563      # a path prefixed by /cygdrive for fixpath to work.
47564      new_path="$CYGWIN_ROOT_PATH$input_path"
47565    fi
47566  fi
47567
47568
47569  if test "x$path" != "x$new_path"; then
47570    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47573  fi
47574
47575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47576
47577  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47578  has_colon=`$ECHO $path | $GREP ^.:`
47579  new_path="$path"
47580  if test "x$has_colon" = x; then
47581    # Not in mixed or Windows style, start by that.
47582    new_path=`cmd //c echo $path`
47583  fi
47584
47585
47586  input_path="$new_path"
47587  # Check if we need to convert this using DOS-style short mode. If the path
47588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47589  # take no chances and rewrite it.
47590  # Note: m4 eats our [], so we need to use [ and ] instead.
47591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47592  if test "x$has_forbidden_chars" != x; then
47593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47595  fi
47596
47597
47598  windows_path="$new_path"
47599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47600    unix_path=`$CYGPATH -u "$windows_path"`
47601    new_path="$unix_path"
47602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47604    new_path="$unix_path"
47605  fi
47606
47607  if test "x$path" != "x$new_path"; then
47608    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47611  fi
47612
47613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47615
47616  else
47617    # We're on a posix platform. Hooray! :)
47618    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47619    has_space=`$ECHO "$path" | $GREP " "`
47620    if test "x$has_space" != x; then
47621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47624    fi
47625
47626    # Use eval to expand a potential ~
47627    eval path="$path"
47628    if test ! -f "$path" && test ! -d "$path"; then
47629      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47630    fi
47631
47632    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47633  fi
47634
47635
47636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47637
47638  # Input might be given as Windows format, start by converting to
47639  # unix format.
47640  path="$POTENTIAL_FREETYPE_LIB_PATH"
47641  new_path=`$CYGPATH -u "$path"`
47642
47643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47646  # "foo.exe" is OK but "foo" is an error.
47647  #
47648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47649  # It is also a way to make sure we got the proper file name for the real test later on.
47650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47651  if test "x$test_shortpath" = x; then
47652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47654    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47655  fi
47656
47657  # Call helper function which possibly converts this using DOS-style short mode.
47658  # If so, the updated path is stored in $new_path.
47659
47660  input_path="$new_path"
47661  # Check if we need to convert this using DOS-style short mode. If the path
47662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47663  # take no chances and rewrite it.
47664  # Note: m4 eats our [], so we need to use [ and ] instead.
47665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47666  if test "x$has_forbidden_chars" != x; then
47667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47671      # Going to short mode and back again did indeed matter. Since short mode is
47672      # case insensitive, let's make it lowercase to improve readability.
47673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47674      # Now convert it back to Unix-stile (cygpath)
47675      input_path=`$CYGPATH -u "$shortmode_path"`
47676      new_path="$input_path"
47677    fi
47678  fi
47679
47680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47681  if test "x$test_cygdrive_prefix" = x; then
47682    # As a simple fix, exclude /usr/bin since it's not a real path.
47683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47685      # a path prefixed by /cygdrive for fixpath to work.
47686      new_path="$CYGWIN_ROOT_PATH$input_path"
47687    fi
47688  fi
47689
47690
47691  if test "x$path" != "x$new_path"; then
47692    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47694$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47695  fi
47696
47697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47698
47699  path="$POTENTIAL_FREETYPE_LIB_PATH"
47700  has_colon=`$ECHO $path | $GREP ^.:`
47701  new_path="$path"
47702  if test "x$has_colon" = x; then
47703    # Not in mixed or Windows style, start by that.
47704    new_path=`cmd //c echo $path`
47705  fi
47706
47707
47708  input_path="$new_path"
47709  # Check if we need to convert this using DOS-style short mode. If the path
47710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47711  # take no chances and rewrite it.
47712  # Note: m4 eats our [], so we need to use [ and ] instead.
47713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47714  if test "x$has_forbidden_chars" != x; then
47715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47717  fi
47718
47719
47720  windows_path="$new_path"
47721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47722    unix_path=`$CYGPATH -u "$windows_path"`
47723    new_path="$unix_path"
47724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47726    new_path="$unix_path"
47727  fi
47728
47729  if test "x$path" != "x$new_path"; then
47730    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47732$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47733  fi
47734
47735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47737
47738  else
47739    # We're on a posix platform. Hooray! :)
47740    path="$POTENTIAL_FREETYPE_LIB_PATH"
47741    has_space=`$ECHO "$path" | $GREP " "`
47742    if test "x$has_space" != x; then
47743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47745      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47746    fi
47747
47748    # Use eval to expand a potential ~
47749    eval path="$path"
47750    if test ! -f "$path" && test ! -d "$path"; then
47751      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47752    fi
47753
47754    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47755  fi
47756
47757
47758    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47760$as_echo_n "checking for freetype includes... " >&6; }
47761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47762$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47763    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47765$as_echo_n "checking for freetype libraries... " >&6; }
47766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47767$as_echo "$FREETYPE_LIB_PATH" >&6; }
47768  fi
47769
47770              if test "x$FOUND_FREETYPE" != xyes; then
47771
47772  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47773  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47774  METHOD="well-known location"
47775
47776  # Let's start with an optimistic view of the world :-)
47777  FOUND_FREETYPE=yes
47778
47779  # First look for the canonical freetype main include file ft2build.h.
47780  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47781    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47782    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47783    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47784      # Fail.
47785      FOUND_FREETYPE=no
47786    fi
47787  fi
47788
47789  if test "x$FOUND_FREETYPE" = xyes; then
47790    # Include file found, let's continue the sanity check.
47791    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47792$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47793
47794    # Reset to default value
47795    FREETYPE_BASE_NAME=freetype
47796    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47797    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47798      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47799          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47800        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47801        # for the .6 version explicitly.
47802        FREETYPE_BASE_NAME=freetype.6
47803        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47804        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47805$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47806      else
47807        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47808$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47809        FOUND_FREETYPE=no
47810      fi
47811    else
47812      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47813        # On Windows, we will need both .lib and .dll file.
47814        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47815          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47816$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47817          FOUND_FREETYPE=no
47818        fi
47819      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47820          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47821        # Found lib in isa dir, use that instead.
47822        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47823        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47824$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47825      fi
47826    fi
47827  fi
47828
47829  if test "x$FOUND_FREETYPE" = xyes; then
47830
47831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47832
47833  # Input might be given as Windows format, start by converting to
47834  # unix format.
47835  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47836  new_path=`$CYGPATH -u "$path"`
47837
47838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47841  # "foo.exe" is OK but "foo" is an error.
47842  #
47843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47844  # It is also a way to make sure we got the proper file name for the real test later on.
47845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47846  if test "x$test_shortpath" = x; then
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47849    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47850  fi
47851
47852  # Call helper function which possibly converts this using DOS-style short mode.
47853  # If so, the updated path is stored in $new_path.
47854
47855  input_path="$new_path"
47856  # Check if we need to convert this using DOS-style short mode. If the path
47857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47858  # take no chances and rewrite it.
47859  # Note: m4 eats our [], so we need to use [ and ] instead.
47860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47861  if test "x$has_forbidden_chars" != x; then
47862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47866      # Going to short mode and back again did indeed matter. Since short mode is
47867      # case insensitive, let's make it lowercase to improve readability.
47868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47869      # Now convert it back to Unix-stile (cygpath)
47870      input_path=`$CYGPATH -u "$shortmode_path"`
47871      new_path="$input_path"
47872    fi
47873  fi
47874
47875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47876  if test "x$test_cygdrive_prefix" = x; then
47877    # As a simple fix, exclude /usr/bin since it's not a real path.
47878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47880      # a path prefixed by /cygdrive for fixpath to work.
47881      new_path="$CYGWIN_ROOT_PATH$input_path"
47882    fi
47883  fi
47884
47885
47886  if test "x$path" != "x$new_path"; then
47887    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47890  fi
47891
47892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47893
47894  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47895  has_colon=`$ECHO $path | $GREP ^.:`
47896  new_path="$path"
47897  if test "x$has_colon" = x; then
47898    # Not in mixed or Windows style, start by that.
47899    new_path=`cmd //c echo $path`
47900  fi
47901
47902
47903  input_path="$new_path"
47904  # Check if we need to convert this using DOS-style short mode. If the path
47905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47906  # take no chances and rewrite it.
47907  # Note: m4 eats our [], so we need to use [ and ] instead.
47908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47909  if test "x$has_forbidden_chars" != x; then
47910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47912  fi
47913
47914
47915  windows_path="$new_path"
47916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47917    unix_path=`$CYGPATH -u "$windows_path"`
47918    new_path="$unix_path"
47919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47921    new_path="$unix_path"
47922  fi
47923
47924  if test "x$path" != "x$new_path"; then
47925    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47928  fi
47929
47930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47932
47933  else
47934    # We're on a posix platform. Hooray! :)
47935    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47936    has_space=`$ECHO "$path" | $GREP " "`
47937    if test "x$has_space" != x; then
47938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47940      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47941    fi
47942
47943    # Use eval to expand a potential ~
47944    eval path="$path"
47945    if test ! -f "$path" && test ! -d "$path"; then
47946      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47947    fi
47948
47949    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47950  fi
47951
47952
47953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47954
47955  # Input might be given as Windows format, start by converting to
47956  # unix format.
47957  path="$POTENTIAL_FREETYPE_LIB_PATH"
47958  new_path=`$CYGPATH -u "$path"`
47959
47960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47963  # "foo.exe" is OK but "foo" is an error.
47964  #
47965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47966  # It is also a way to make sure we got the proper file name for the real test later on.
47967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47968  if test "x$test_shortpath" = x; then
47969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47972  fi
47973
47974  # Call helper function which possibly converts this using DOS-style short mode.
47975  # If so, the updated path is stored in $new_path.
47976
47977  input_path="$new_path"
47978  # Check if we need to convert this using DOS-style short mode. If the path
47979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47980  # take no chances and rewrite it.
47981  # Note: m4 eats our [], so we need to use [ and ] instead.
47982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47983  if test "x$has_forbidden_chars" != x; then
47984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47988      # Going to short mode and back again did indeed matter. Since short mode is
47989      # case insensitive, let's make it lowercase to improve readability.
47990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47991      # Now convert it back to Unix-stile (cygpath)
47992      input_path=`$CYGPATH -u "$shortmode_path"`
47993      new_path="$input_path"
47994    fi
47995  fi
47996
47997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47998  if test "x$test_cygdrive_prefix" = x; then
47999    # As a simple fix, exclude /usr/bin since it's not a real path.
48000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48002      # a path prefixed by /cygdrive for fixpath to work.
48003      new_path="$CYGWIN_ROOT_PATH$input_path"
48004    fi
48005  fi
48006
48007
48008  if test "x$path" != "x$new_path"; then
48009    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48012  fi
48013
48014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48015
48016  path="$POTENTIAL_FREETYPE_LIB_PATH"
48017  has_colon=`$ECHO $path | $GREP ^.:`
48018  new_path="$path"
48019  if test "x$has_colon" = x; then
48020    # Not in mixed or Windows style, start by that.
48021    new_path=`cmd //c echo $path`
48022  fi
48023
48024
48025  input_path="$new_path"
48026  # Check if we need to convert this using DOS-style short mode. If the path
48027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48028  # take no chances and rewrite it.
48029  # Note: m4 eats our [], so we need to use [ and ] instead.
48030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48031  if test "x$has_forbidden_chars" != x; then
48032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48034  fi
48035
48036
48037  windows_path="$new_path"
48038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48039    unix_path=`$CYGPATH -u "$windows_path"`
48040    new_path="$unix_path"
48041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48043    new_path="$unix_path"
48044  fi
48045
48046  if test "x$path" != "x$new_path"; then
48047    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48050  fi
48051
48052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48054
48055  else
48056    # We're on a posix platform. Hooray! :)
48057    path="$POTENTIAL_FREETYPE_LIB_PATH"
48058    has_space=`$ECHO "$path" | $GREP " "`
48059    if test "x$has_space" != x; then
48060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48062      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48063    fi
48064
48065    # Use eval to expand a potential ~
48066    eval path="$path"
48067    if test ! -f "$path" && test ! -d "$path"; then
48068      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48069    fi
48070
48071    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48072  fi
48073
48074
48075    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48077$as_echo_n "checking for freetype includes... " >&6; }
48078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48079$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48080    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48082$as_echo_n "checking for freetype libraries... " >&6; }
48083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48084$as_echo "$FREETYPE_LIB_PATH" >&6; }
48085  fi
48086
48087              fi
48088            fi
48089          fi
48090        fi
48091      fi # end check in well-known locations
48092
48093      if test "x$FOUND_FREETYPE" != xyes; then
48094
48095  # Print a helpful message on how to acquire the necessary build dependency.
48096  # freetype is the help tag: freetype, cups, pulse, alsa etc
48097  MISSING_DEPENDENCY=freetype
48098
48099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48100    cygwin_help $MISSING_DEPENDENCY
48101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48102    msys_help $MISSING_DEPENDENCY
48103  else
48104    PKGHANDLER_COMMAND=
48105
48106    case $PKGHANDLER in
48107      apt-get)
48108        apt_help     $MISSING_DEPENDENCY ;;
48109      yum)
48110        yum_help     $MISSING_DEPENDENCY ;;
48111      port)
48112        port_help    $MISSING_DEPENDENCY ;;
48113      pkgutil)
48114        pkgutil_help $MISSING_DEPENDENCY ;;
48115      pkgadd)
48116        pkgadd_help  $MISSING_DEPENDENCY ;;
48117    esac
48118
48119    if test "x$PKGHANDLER_COMMAND" != x; then
48120      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48121    fi
48122  fi
48123
48124        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48125      fi
48126    fi # end user specified settings
48127
48128    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48129    if test "x$FREETYPE_CFLAGS" = x; then
48130
48131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48132
48133  # Input might be given as Windows format, start by converting to
48134  # unix format.
48135  path="$FREETYPE_INCLUDE_PATH"
48136  new_path=`$CYGPATH -u "$path"`
48137
48138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48141  # "foo.exe" is OK but "foo" is an error.
48142  #
48143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48144  # It is also a way to make sure we got the proper file name for the real test later on.
48145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48146  if test "x$test_shortpath" = x; then
48147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48148$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48149    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48150  fi
48151
48152  # Call helper function which possibly converts this using DOS-style short mode.
48153  # If so, the updated path is stored in $new_path.
48154
48155  input_path="$new_path"
48156  # Check if we need to convert this using DOS-style short mode. If the path
48157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48158  # take no chances and rewrite it.
48159  # Note: m4 eats our [], so we need to use [ and ] instead.
48160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48161  if test "x$has_forbidden_chars" != x; then
48162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48166      # Going to short mode and back again did indeed matter. Since short mode is
48167      # case insensitive, let's make it lowercase to improve readability.
48168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48169      # Now convert it back to Unix-stile (cygpath)
48170      input_path=`$CYGPATH -u "$shortmode_path"`
48171      new_path="$input_path"
48172    fi
48173  fi
48174
48175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48176  if test "x$test_cygdrive_prefix" = x; then
48177    # As a simple fix, exclude /usr/bin since it's not a real path.
48178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48180      # a path prefixed by /cygdrive for fixpath to work.
48181      new_path="$CYGWIN_ROOT_PATH$input_path"
48182    fi
48183  fi
48184
48185
48186  if test "x$path" != "x$new_path"; then
48187    FREETYPE_INCLUDE_PATH="$new_path"
48188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48189$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48190  fi
48191
48192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48193
48194  path="$FREETYPE_INCLUDE_PATH"
48195  has_colon=`$ECHO $path | $GREP ^.:`
48196  new_path="$path"
48197  if test "x$has_colon" = x; then
48198    # Not in mixed or Windows style, start by that.
48199    new_path=`cmd //c echo $path`
48200  fi
48201
48202
48203  input_path="$new_path"
48204  # Check if we need to convert this using DOS-style short mode. If the path
48205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48206  # take no chances and rewrite it.
48207  # Note: m4 eats our [], so we need to use [ and ] instead.
48208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48209  if test "x$has_forbidden_chars" != x; then
48210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48212  fi
48213
48214
48215  windows_path="$new_path"
48216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48217    unix_path=`$CYGPATH -u "$windows_path"`
48218    new_path="$unix_path"
48219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48221    new_path="$unix_path"
48222  fi
48223
48224  if test "x$path" != "x$new_path"; then
48225    FREETYPE_INCLUDE_PATH="$new_path"
48226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48227$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48228  fi
48229
48230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48232
48233  else
48234    # We're on a posix platform. Hooray! :)
48235    path="$FREETYPE_INCLUDE_PATH"
48236    has_space=`$ECHO "$path" | $GREP " "`
48237    if test "x$has_space" != x; then
48238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48239$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48240      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48241    fi
48242
48243    # Use eval to expand a potential ~
48244    eval path="$path"
48245    if test ! -f "$path" && test ! -d "$path"; then
48246      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48247    fi
48248
48249    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48250  fi
48251
48252      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48253        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48254      else
48255        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48256      fi
48257    fi
48258
48259    if test "x$FREETYPE_LIBS" = x; then
48260
48261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48262
48263  # Input might be given as Windows format, start by converting to
48264  # unix format.
48265  path="$FREETYPE_LIB_PATH"
48266  new_path=`$CYGPATH -u "$path"`
48267
48268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48271  # "foo.exe" is OK but "foo" is an error.
48272  #
48273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48274  # It is also a way to make sure we got the proper file name for the real test later on.
48275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48276  if test "x$test_shortpath" = x; then
48277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48278$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48279    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48280  fi
48281
48282  # Call helper function which possibly converts this using DOS-style short mode.
48283  # If so, the updated path is stored in $new_path.
48284
48285  input_path="$new_path"
48286  # Check if we need to convert this using DOS-style short mode. If the path
48287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48288  # take no chances and rewrite it.
48289  # Note: m4 eats our [], so we need to use [ and ] instead.
48290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48291  if test "x$has_forbidden_chars" != x; then
48292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48296      # Going to short mode and back again did indeed matter. Since short mode is
48297      # case insensitive, let's make it lowercase to improve readability.
48298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48299      # Now convert it back to Unix-stile (cygpath)
48300      input_path=`$CYGPATH -u "$shortmode_path"`
48301      new_path="$input_path"
48302    fi
48303  fi
48304
48305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48306  if test "x$test_cygdrive_prefix" = x; then
48307    # As a simple fix, exclude /usr/bin since it's not a real path.
48308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48310      # a path prefixed by /cygdrive for fixpath to work.
48311      new_path="$CYGWIN_ROOT_PATH$input_path"
48312    fi
48313  fi
48314
48315
48316  if test "x$path" != "x$new_path"; then
48317    FREETYPE_LIB_PATH="$new_path"
48318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48319$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48320  fi
48321
48322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48323
48324  path="$FREETYPE_LIB_PATH"
48325  has_colon=`$ECHO $path | $GREP ^.:`
48326  new_path="$path"
48327  if test "x$has_colon" = x; then
48328    # Not in mixed or Windows style, start by that.
48329    new_path=`cmd //c echo $path`
48330  fi
48331
48332
48333  input_path="$new_path"
48334  # Check if we need to convert this using DOS-style short mode. If the path
48335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48336  # take no chances and rewrite it.
48337  # Note: m4 eats our [], so we need to use [ and ] instead.
48338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48339  if test "x$has_forbidden_chars" != x; then
48340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48342  fi
48343
48344
48345  windows_path="$new_path"
48346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48347    unix_path=`$CYGPATH -u "$windows_path"`
48348    new_path="$unix_path"
48349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48351    new_path="$unix_path"
48352  fi
48353
48354  if test "x$path" != "x$new_path"; then
48355    FREETYPE_LIB_PATH="$new_path"
48356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48357$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48358  fi
48359
48360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48362
48363  else
48364    # We're on a posix platform. Hooray! :)
48365    path="$FREETYPE_LIB_PATH"
48366    has_space=`$ECHO "$path" | $GREP " "`
48367    if test "x$has_space" != x; then
48368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48369$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48371    fi
48372
48373    # Use eval to expand a potential ~
48374    eval path="$path"
48375    if test ! -f "$path" && test ! -d "$path"; then
48376      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48377    fi
48378
48379    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48380  fi
48381
48382      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48383        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48384      else
48385        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48386      fi
48387    fi
48388
48389    # Try to compile it
48390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48391$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48392    ac_ext=cpp
48393ac_cpp='$CXXCPP $CPPFLAGS'
48394ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48395ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48396ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48397
48398    PREV_CXXCFLAGS="$CXXFLAGS"
48399    PREV_LIBS="$LIBS"
48400    PREV_CXX="$CXX"
48401    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48402    LIBS="$LIBS $FREETYPE_LIBS"
48403    CXX="$FIXPATH $CXX"
48404    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48405/* end confdefs.h.  */
48406
48407          #include<ft2build.h>
48408          #include FT_FREETYPE_H
48409          int main () {
48410            FT_Init_FreeType(NULL);
48411            return 0;
48412          }
48413
48414_ACEOF
48415if ac_fn_cxx_try_link "$LINENO"; then :
48416
48417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48418$as_echo "yes" >&6; }
48419
48420else
48421
48422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48423$as_echo "no" >&6; }
48424          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48425$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48426          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48427$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48428
48429
48430  # Print a helpful message on how to acquire the necessary build dependency.
48431  # freetype is the help tag: freetype, cups, pulse, alsa etc
48432  MISSING_DEPENDENCY=freetype
48433
48434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48435    cygwin_help $MISSING_DEPENDENCY
48436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48437    msys_help $MISSING_DEPENDENCY
48438  else
48439    PKGHANDLER_COMMAND=
48440
48441    case $PKGHANDLER in
48442      apt-get)
48443        apt_help     $MISSING_DEPENDENCY ;;
48444      yum)
48445        yum_help     $MISSING_DEPENDENCY ;;
48446      port)
48447        port_help    $MISSING_DEPENDENCY ;;
48448      pkgutil)
48449        pkgutil_help $MISSING_DEPENDENCY ;;
48450      pkgadd)
48451        pkgadd_help  $MISSING_DEPENDENCY ;;
48452    esac
48453
48454    if test "x$PKGHANDLER_COMMAND" != x; then
48455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48456    fi
48457  fi
48458
48459
48460          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48461
48462
48463fi
48464rm -f core conftest.err conftest.$ac_objext \
48465    conftest$ac_exeext conftest.$ac_ext
48466    CXXCFLAGS="$PREV_CXXFLAGS"
48467    LIBS="$PREV_LIBS"
48468    CXX="$PREV_CXX"
48469    ac_ext=cpp
48470ac_cpp='$CXXCPP $CPPFLAGS'
48471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48474
48475
48476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48477$as_echo_n "checking if we should bundle freetype... " >&6; }
48478    if test "x$BUNDLE_FREETYPE" = xyes; then
48479      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48480    fi
48481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48482$as_echo "$BUNDLE_FREETYPE" >&6; }
48483
48484  fi # end freetype needed
48485
48486
48487
48488
48489
48490
48491
48492  ###############################################################################
48493  #
48494  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48495  #
48496
48497# Check whether --with-alsa was given.
48498if test "${with_alsa+set}" = set; then :
48499  withval=$with_alsa;
48500fi
48501
48502
48503# Check whether --with-alsa-include was given.
48504if test "${with_alsa_include+set}" = set; then :
48505  withval=$with_alsa_include;
48506fi
48507
48508
48509# Check whether --with-alsa-lib was given.
48510if test "${with_alsa_lib+set}" = set; then :
48511  withval=$with_alsa_lib;
48512fi
48513
48514
48515  if test "x$ALSA_NOT_NEEDED" = xyes; then
48516    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48517      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48518$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48519    fi
48520    ALSA_CFLAGS=
48521    ALSA_LIBS=
48522  else
48523    ALSA_FOUND=no
48524
48525    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48526      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48527    fi
48528
48529    if test "x${with_alsa}" != x; then
48530      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48531      ALSA_CFLAGS="-I${with_alsa}/include"
48532      ALSA_FOUND=yes
48533    fi
48534    if test "x${with_alsa_include}" != x; then
48535      ALSA_CFLAGS="-I${with_alsa_include}"
48536      ALSA_FOUND=yes
48537    fi
48538    if test "x${with_alsa_lib}" != x; then
48539      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48540      ALSA_FOUND=yes
48541    fi
48542    if test "x$ALSA_FOUND" = xno; then
48543
48544
48545  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48546    # Source the builddeps file again, to make sure it uses the latest variables!
48547    . $builddepsfile
48548    # Look for a target and build machine specific resource!
48549    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48550    if test "x$resource" = x; then
48551      # Ok, lets instead look for a target specific resource
48552      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48553    fi
48554    if test "x$resource" = x; then
48555      # Ok, lets instead look for a build specific resource
48556      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48557    fi
48558    if test "x$resource" = x; then
48559      # Ok, lets instead look for a generic resource
48560      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48561      resource=${builddep_alsa}
48562    fi
48563    if test "x$resource" != x; then
48564      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48565$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48566      # If the resource in the builddeps.conf file is an existing directory,
48567      # for example /java/linux/cups
48568      if test -d ${resource}; then
48569        depdir=${resource}
48570      else
48571
48572  # alsa is for example mymodule
48573  # $resource is for example libs/general/libmymod_1_2_3.zip
48574  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48575  # $with_builddeps_dir is for example /localhome/builddeps
48576  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48577  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48578  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48579  filename=`basename $resource`
48580  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48581  filebase=${filename%%.*}
48582  extension=${filename#*.}
48583  installdir=$with_builddeps_dir/$filebase
48584  if test ! -f $installdir/$filename.unpacked; then
48585    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48586$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48587    if test ! -d $installdir; then
48588      mkdir -p $installdir
48589    fi
48590    if test ! -d $installdir; then
48591      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48592    fi
48593    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48594    touch $tmpfile
48595    if test ! -f $tmpfile; then
48596      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48597    fi
48598
48599  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48600  # $tmpfile is the local file name for the downloaded file.
48601  VALID_TOOL=no
48602  if test "x$BDEPS_FTP" = xwget; then
48603    VALID_TOOL=yes
48604    wget -O $tmpfile $with_builddeps_server/$resource
48605  fi
48606  if test "x$BDEPS_FTP" = xlftp; then
48607    VALID_TOOL=yes
48608    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48609  fi
48610  if test "x$BDEPS_FTP" = xftp; then
48611    VALID_TOOL=yes
48612    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48613    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48614    FTPUSERPWD=${FTPSERVER%%@*}
48615    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48616      FTPUSER=${userpwd%%:*}
48617      FTPPWD=${userpwd#*@}
48618      FTPSERVER=${FTPSERVER#*@}
48619    else
48620      FTPUSER=ftp
48621      FTPPWD=ftp
48622    fi
48623    # the "pass" command does not work on some
48624    # ftp clients (read ftp.exe) but if it works,
48625    # passive mode is better!
48626    ( \
48627        echo "user $FTPUSER $FTPPWD"        ; \
48628        echo "pass"                         ; \
48629        echo "bin"                          ; \
48630        echo "get $FTPPATH $tmpfile"              ; \
48631    ) | ftp -in $FTPSERVER
48632  fi
48633  if test "x$VALID_TOOL" != xyes; then
48634    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48635  fi
48636
48637    mv $tmpfile $installdir/$filename
48638    if test ! -s $installdir/$filename; then
48639      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48640    fi
48641    case "$extension" in
48642      zip)  echo "Unzipping $installdir/$filename..."
48643        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48644        ;;
48645      tar.gz) echo "Untaring $installdir/$filename..."
48646        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48647        ;;
48648      tgz) echo "Untaring $installdir/$filename..."
48649        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48650        ;;
48651      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48652        ;;
48653    esac
48654  fi
48655  if test -f $installdir/$filename.unpacked; then
48656    depdir=$installdir
48657  fi
48658
48659      fi
48660      # Source the builddeps file again, because in the previous command, the depdir
48661      # was updated to point at the current build dependency install directory.
48662      . $builddepsfile
48663      # Now extract variables from the builddeps.conf files.
48664      theroot=${builddep_alsa_ROOT}
48665      thecflags=${builddep_alsa_CFLAGS}
48666      thelibs=${builddep_alsa_LIBS}
48667      if test "x$depdir" = x; then
48668        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48669      fi
48670      ALSA=$depdir
48671      if test "x$theroot" != x; then
48672        ALSA="$theroot"
48673      fi
48674      if test "x$thecflags" != x; then
48675        ALSA_CFLAGS="$thecflags"
48676      fi
48677      if test "x$thelibs" != x; then
48678        ALSA_LIBS="$thelibs"
48679      fi
48680      ALSA_FOUND=yes
48681      else ALSA_FOUND=no
48682
48683    fi
48684    else ALSA_FOUND=no
48685
48686  fi
48687
48688    fi
48689    # Do not try pkg-config if we have a sysroot set.
48690    if test "x$SYSROOT" = x; then
48691      if test "x$ALSA_FOUND" = xno; then
48692
48693pkg_failed=no
48694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48695$as_echo_n "checking for ALSA... " >&6; }
48696
48697if test -n "$ALSA_CFLAGS"; then
48698    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48699 elif test -n "$PKG_CONFIG"; then
48700    if test -n "$PKG_CONFIG" && \
48701    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48702  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48703  ac_status=$?
48704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48705  test $ac_status = 0; }; then
48706  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48707else
48708  pkg_failed=yes
48709fi
48710 else
48711    pkg_failed=untried
48712fi
48713if test -n "$ALSA_LIBS"; then
48714    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48715 elif test -n "$PKG_CONFIG"; then
48716    if test -n "$PKG_CONFIG" && \
48717    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48718  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48719  ac_status=$?
48720  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48721  test $ac_status = 0; }; then
48722  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48723else
48724  pkg_failed=yes
48725fi
48726 else
48727    pkg_failed=untried
48728fi
48729
48730
48731
48732if test $pkg_failed = yes; then
48733
48734if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48735        _pkg_short_errors_supported=yes
48736else
48737        _pkg_short_errors_supported=no
48738fi
48739        if test $_pkg_short_errors_supported = yes; then
48740	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48741        else
48742	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48743        fi
48744	# Put the nasty error message in config.log where it belongs
48745	echo "$ALSA_PKG_ERRORS" >&5
48746
48747	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48748$as_echo "no" >&6; }
48749                ALSA_FOUND=no
48750elif test $pkg_failed = untried; then
48751	ALSA_FOUND=no
48752else
48753	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48754	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48756$as_echo "yes" >&6; }
48757	ALSA_FOUND=yes
48758fi
48759      fi
48760    fi
48761    if test "x$ALSA_FOUND" = xno; then
48762      for ac_header in alsa/asoundlib.h
48763do :
48764  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48765if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48766  cat >>confdefs.h <<_ACEOF
48767#define HAVE_ALSA_ASOUNDLIB_H 1
48768_ACEOF
48769
48770            ALSA_FOUND=yes
48771            ALSA_CFLAGS=-Iignoreme
48772            ALSA_LIBS=-lasound
48773            DEFAULT_ALSA=yes
48774
48775else
48776  ALSA_FOUND=no
48777fi
48778
48779done
48780
48781    fi
48782    if test "x$ALSA_FOUND" = xno; then
48783
48784  # Print a helpful message on how to acquire the necessary build dependency.
48785  # alsa is the help tag: freetype, cups, pulse, alsa etc
48786  MISSING_DEPENDENCY=alsa
48787
48788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48789    cygwin_help $MISSING_DEPENDENCY
48790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48791    msys_help $MISSING_DEPENDENCY
48792  else
48793    PKGHANDLER_COMMAND=
48794
48795    case $PKGHANDLER in
48796      apt-get)
48797        apt_help     $MISSING_DEPENDENCY ;;
48798      yum)
48799        yum_help     $MISSING_DEPENDENCY ;;
48800      port)
48801        port_help    $MISSING_DEPENDENCY ;;
48802      pkgutil)
48803        pkgutil_help $MISSING_DEPENDENCY ;;
48804      pkgadd)
48805        pkgadd_help  $MISSING_DEPENDENCY ;;
48806    esac
48807
48808    if test "x$PKGHANDLER_COMMAND" != x; then
48809      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48810    fi
48811  fi
48812
48813      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48814    fi
48815  fi
48816
48817
48818
48819
48820
48821
48822  ###############################################################################
48823  #
48824  # Check for the jpeg library
48825  #
48826
48827
48828# Check whether --with-libjpeg was given.
48829if test "${with_libjpeg+set}" = set; then :
48830  withval=$with_libjpeg;
48831fi
48832
48833
48834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48835$as_echo_n "checking for which libjpeg to use... " >&6; }
48836
48837  # default is bundled
48838  DEFAULT_LIBJPEG=bundled
48839
48840  #
48841  # if user didn't specify, use DEFAULT_LIBJPEG
48842  #
48843  if test "x${with_libjpeg}" = "x"; then
48844    with_libjpeg=${DEFAULT_LIBJPEG}
48845  fi
48846
48847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48848$as_echo "${with_libjpeg}" >&6; }
48849
48850  if test "x${with_libjpeg}" = "xbundled"; then
48851    USE_EXTERNAL_LIBJPEG=false
48852  elif test "x${with_libjpeg}" = "xsystem"; then
48853    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48854if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48855
48856else
48857   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48858fi
48859
48860
48861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48862$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48863if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48864  $as_echo_n "(cached) " >&6
48865else
48866  ac_check_lib_save_LIBS=$LIBS
48867LIBS="-ljpeg  $LIBS"
48868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48869/* end confdefs.h.  */
48870
48871/* Override any GCC internal prototype to avoid an error.
48872   Use char because int might match the return type of a GCC
48873   builtin and then its argument prototype would still apply.  */
48874#ifdef __cplusplus
48875extern "C"
48876#endif
48877char jpeg_CreateDecompress ();
48878int
48879main ()
48880{
48881return jpeg_CreateDecompress ();
48882  ;
48883  return 0;
48884}
48885_ACEOF
48886if ac_fn_cxx_try_link "$LINENO"; then :
48887  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48888else
48889  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48890fi
48891rm -f core conftest.err conftest.$ac_objext \
48892    conftest$ac_exeext conftest.$ac_ext
48893LIBS=$ac_check_lib_save_LIBS
48894fi
48895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48896$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48897if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48898  cat >>confdefs.h <<_ACEOF
48899#define HAVE_LIBJPEG 1
48900_ACEOF
48901
48902  LIBS="-ljpeg $LIBS"
48903
48904else
48905   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48906fi
48907
48908
48909    USE_EXTERNAL_LIBJPEG=true
48910  else
48911    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48912  fi
48913
48914
48915
48916  ###############################################################################
48917  #
48918  # Check for the gif library
48919  #
48920
48921
48922# Check whether --with-giflib was given.
48923if test "${with_giflib+set}" = set; then :
48924  withval=$with_giflib;
48925fi
48926
48927
48928
48929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48930$as_echo_n "checking for which giflib to use... " >&6; }
48931
48932  # default is bundled
48933  DEFAULT_GIFLIB=bundled
48934
48935  #
48936  # if user didn't specify, use DEFAULT_GIFLIB
48937  #
48938  if test "x${with_giflib}" = "x"; then
48939    with_giflib=${DEFAULT_GIFLIB}
48940  fi
48941
48942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48943$as_echo "${with_giflib}" >&6; }
48944
48945  if test "x${with_giflib}" = "xbundled"; then
48946    USE_EXTERNAL_LIBGIF=false
48947  elif test "x${with_giflib}" = "xsystem"; then
48948    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48949if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48950
48951else
48952   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48953fi
48954
48955
48956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48957$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48958if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48959  $as_echo_n "(cached) " >&6
48960else
48961  ac_check_lib_save_LIBS=$LIBS
48962LIBS="-lgif  $LIBS"
48963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48964/* end confdefs.h.  */
48965
48966/* Override any GCC internal prototype to avoid an error.
48967   Use char because int might match the return type of a GCC
48968   builtin and then its argument prototype would still apply.  */
48969#ifdef __cplusplus
48970extern "C"
48971#endif
48972char DGifGetCode ();
48973int
48974main ()
48975{
48976return DGifGetCode ();
48977  ;
48978  return 0;
48979}
48980_ACEOF
48981if ac_fn_cxx_try_link "$LINENO"; then :
48982  ac_cv_lib_gif_DGifGetCode=yes
48983else
48984  ac_cv_lib_gif_DGifGetCode=no
48985fi
48986rm -f core conftest.err conftest.$ac_objext \
48987    conftest$ac_exeext conftest.$ac_ext
48988LIBS=$ac_check_lib_save_LIBS
48989fi
48990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48991$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48992if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48993  cat >>confdefs.h <<_ACEOF
48994#define HAVE_LIBGIF 1
48995_ACEOF
48996
48997  LIBS="-lgif $LIBS"
48998
48999else
49000   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49001fi
49002
49003
49004    USE_EXTERNAL_LIBGIF=true
49005  else
49006    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49007  fi
49008
49009
49010  ###############################################################################
49011  #
49012  # Check for the lcms2 library
49013  #
49014
49015
49016# Check whether --with-lcms was given.
49017if test "${with_lcms+set}" = set; then :
49018  withval=$with_lcms;
49019fi
49020
49021
49022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49023$as_echo_n "checking for which lcms to use... " >&6; }
49024
49025  DEFAULT_LCMS=bundled
49026
49027  #
49028  # If user didn't specify, use DEFAULT_LCMS
49029  #
49030  if test "x${with_lcms}" = "x"; then
49031      with_lcms=${DEFAULT_LCMS}
49032  fi
49033
49034  if test "x${with_lcms}" = "xbundled"; then
49035    USE_EXTERNAL_LCMS=false
49036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49037$as_echo "bundled" >&6; }
49038  elif test "x${with_lcms}" = "xsystem"; then
49039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49040$as_echo "system" >&6; }
49041
49042pkg_failed=no
49043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49044$as_echo_n "checking for LCMS... " >&6; }
49045
49046if test -n "$LCMS_CFLAGS"; then
49047    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49048 elif test -n "$PKG_CONFIG"; then
49049    if test -n "$PKG_CONFIG" && \
49050    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49051  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49052  ac_status=$?
49053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49054  test $ac_status = 0; }; then
49055  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49056else
49057  pkg_failed=yes
49058fi
49059 else
49060    pkg_failed=untried
49061fi
49062if test -n "$LCMS_LIBS"; then
49063    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49064 elif test -n "$PKG_CONFIG"; then
49065    if test -n "$PKG_CONFIG" && \
49066    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49067  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49068  ac_status=$?
49069  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49070  test $ac_status = 0; }; then
49071  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49072else
49073  pkg_failed=yes
49074fi
49075 else
49076    pkg_failed=untried
49077fi
49078
49079
49080
49081if test $pkg_failed = yes; then
49082
49083if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49084        _pkg_short_errors_supported=yes
49085else
49086        _pkg_short_errors_supported=no
49087fi
49088        if test $_pkg_short_errors_supported = yes; then
49089	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49090        else
49091	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49092        fi
49093	# Put the nasty error message in config.log where it belongs
49094	echo "$LCMS_PKG_ERRORS" >&5
49095
49096	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49097$as_echo "no" >&6; }
49098                LCMS_FOUND=no
49099elif test $pkg_failed = untried; then
49100	LCMS_FOUND=no
49101else
49102	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49103	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49105$as_echo "yes" >&6; }
49106	LCMS_FOUND=yes
49107fi
49108    if test "x${LCMS_FOUND}" = "xyes"; then
49109      USE_EXTERNAL_LCMS=true
49110    else
49111      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49112    fi
49113  else
49114    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49115  fi
49116
49117
49118
49119  ###############################################################################
49120  #
49121  # Check for the png library
49122  #
49123
49124
49125# Check whether --with-libpng was given.
49126if test "${with_libpng+set}" = set; then :
49127  withval=$with_libpng;
49128fi
49129
49130
49131
49132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49133$as_echo_n "checking for which libpng to use... " >&6; }
49134
49135  # default is bundled
49136  DEFAULT_LIBPNG=bundled
49137
49138  #
49139  # if user didn't specify, use DEFAULT_LIBPNG
49140  #
49141  if test "x${with_libpng}" = "x"; then
49142      with_libpng=${DEFAULT_LIBPNG}
49143  fi
49144
49145  if test "x${with_libpng}" = "xbundled"; then
49146      USE_EXTERNAL_LIBPNG=false
49147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49148$as_echo "bundled" >&6; }
49149  elif test "x${with_libpng}" = "xsystem"; then
49150
49151pkg_failed=no
49152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49153$as_echo_n "checking for PNG... " >&6; }
49154
49155if test -n "$PNG_CFLAGS"; then
49156    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49157 elif test -n "$PKG_CONFIG"; then
49158    if test -n "$PKG_CONFIG" && \
49159    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49160  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49161  ac_status=$?
49162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49163  test $ac_status = 0; }; then
49164  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49165else
49166  pkg_failed=yes
49167fi
49168 else
49169    pkg_failed=untried
49170fi
49171if test -n "$PNG_LIBS"; then
49172    pkg_cv_PNG_LIBS="$PNG_LIBS"
49173 elif test -n "$PKG_CONFIG"; then
49174    if test -n "$PKG_CONFIG" && \
49175    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49176  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49177  ac_status=$?
49178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49179  test $ac_status = 0; }; then
49180  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49181else
49182  pkg_failed=yes
49183fi
49184 else
49185    pkg_failed=untried
49186fi
49187
49188
49189
49190if test $pkg_failed = yes; then
49191
49192if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49193        _pkg_short_errors_supported=yes
49194else
49195        _pkg_short_errors_supported=no
49196fi
49197        if test $_pkg_short_errors_supported = yes; then
49198	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49199        else
49200	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49201        fi
49202	# Put the nasty error message in config.log where it belongs
49203	echo "$PNG_PKG_ERRORS" >&5
49204
49205	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49206$as_echo "no" >&6; }
49207                 LIBPNG_FOUND=no
49208elif test $pkg_failed = untried; then
49209	 LIBPNG_FOUND=no
49210else
49211	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49212	PNG_LIBS=$pkg_cv_PNG_LIBS
49213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49214$as_echo "yes" >&6; }
49215	 LIBPNG_FOUND=yes
49216fi
49217      if test "x${LIBPNG_FOUND}" = "xyes"; then
49218          USE_EXTERNAL_LIBPNG=true
49219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49220$as_echo "system" >&6; }
49221      else
49222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49223$as_echo "system not found" >&6; }
49224          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49225      fi
49226  else
49227      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49228  fi
49229
49230
49231  ###############################################################################
49232  #
49233  # Check for the zlib library
49234  #
49235
49236
49237# Check whether --with-zlib was given.
49238if test "${with_zlib+set}" = set; then :
49239  withval=$with_zlib;
49240fi
49241
49242
49243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49244$as_echo_n "checking for compress in -lz... " >&6; }
49245if ${ac_cv_lib_z_compress+:} false; then :
49246  $as_echo_n "(cached) " >&6
49247else
49248  ac_check_lib_save_LIBS=$LIBS
49249LIBS="-lz  $LIBS"
49250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49251/* end confdefs.h.  */
49252
49253/* Override any GCC internal prototype to avoid an error.
49254   Use char because int might match the return type of a GCC
49255   builtin and then its argument prototype would still apply.  */
49256#ifdef __cplusplus
49257extern "C"
49258#endif
49259char compress ();
49260int
49261main ()
49262{
49263return compress ();
49264  ;
49265  return 0;
49266}
49267_ACEOF
49268if ac_fn_cxx_try_link "$LINENO"; then :
49269  ac_cv_lib_z_compress=yes
49270else
49271  ac_cv_lib_z_compress=no
49272fi
49273rm -f core conftest.err conftest.$ac_objext \
49274    conftest$ac_exeext conftest.$ac_ext
49275LIBS=$ac_check_lib_save_LIBS
49276fi
49277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49278$as_echo "$ac_cv_lib_z_compress" >&6; }
49279if test "x$ac_cv_lib_z_compress" = xyes; then :
49280   ZLIB_FOUND=yes
49281else
49282   ZLIB_FOUND=no
49283fi
49284
49285
49286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49287$as_echo_n "checking for which zlib to use... " >&6; }
49288
49289  DEFAULT_ZLIB=bundled
49290  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49291    #
49292    # On macosx default is system...on others default is
49293    #
49294    DEFAULT_ZLIB=system
49295  fi
49296
49297  if test "x${ZLIB_FOUND}" != "xyes"; then
49298    #
49299    # If we don't find any system...set default to bundled
49300    #
49301    DEFAULT_ZLIB=bundled
49302  fi
49303
49304  #
49305  # If user didn't specify, use DEFAULT_ZLIB
49306  #
49307  if test "x${with_zlib}" = "x"; then
49308    with_zlib=${DEFAULT_ZLIB}
49309  fi
49310
49311  if test "x${with_zlib}" = "xbundled"; then
49312    USE_EXTERNAL_LIBZ=false
49313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49314$as_echo "bundled" >&6; }
49315  elif test "x${with_zlib}" = "xsystem"; then
49316    if test "x${ZLIB_FOUND}" = "xyes"; then
49317      USE_EXTERNAL_LIBZ=true
49318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49319$as_echo "system" >&6; }
49320    else
49321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49322$as_echo "system not found" >&6; }
49323      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49324    fi
49325  else
49326    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49327  fi
49328
49329
49330
49331  ###############################################################################
49332  LIBZIP_CAN_USE_MMAP=true
49333
49334
49335
49336  ###############################################################################
49337  #
49338  # Check if altzone exists in time.h
49339  #
49340
49341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49342/* end confdefs.h.  */
49343#include <time.h>
49344int
49345main ()
49346{
49347return (int)altzone;
49348  ;
49349  return 0;
49350}
49351_ACEOF
49352if ac_fn_cxx_try_link "$LINENO"; then :
49353  has_altzone=yes
49354else
49355  has_altzone=no
49356fi
49357rm -f core conftest.err conftest.$ac_objext \
49358    conftest$ac_exeext conftest.$ac_ext
49359  if test "x$has_altzone" = xyes; then
49360
49361$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49362
49363  fi
49364
49365  ###############################################################################
49366  #
49367  # Check the maths library
49368  #
49369
49370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49371$as_echo_n "checking for cos in -lm... " >&6; }
49372if ${ac_cv_lib_m_cos+:} false; then :
49373  $as_echo_n "(cached) " >&6
49374else
49375  ac_check_lib_save_LIBS=$LIBS
49376LIBS="-lm  $LIBS"
49377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49378/* end confdefs.h.  */
49379
49380/* Override any GCC internal prototype to avoid an error.
49381   Use char because int might match the return type of a GCC
49382   builtin and then its argument prototype would still apply.  */
49383#ifdef __cplusplus
49384extern "C"
49385#endif
49386char cos ();
49387int
49388main ()
49389{
49390return cos ();
49391  ;
49392  return 0;
49393}
49394_ACEOF
49395if ac_fn_cxx_try_link "$LINENO"; then :
49396  ac_cv_lib_m_cos=yes
49397else
49398  ac_cv_lib_m_cos=no
49399fi
49400rm -f core conftest.err conftest.$ac_objext \
49401    conftest$ac_exeext conftest.$ac_ext
49402LIBS=$ac_check_lib_save_LIBS
49403fi
49404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49405$as_echo "$ac_cv_lib_m_cos" >&6; }
49406if test "x$ac_cv_lib_m_cos" = xyes; then :
49407  cat >>confdefs.h <<_ACEOF
49408#define HAVE_LIBM 1
49409_ACEOF
49410
49411  LIBS="-lm $LIBS"
49412
49413else
49414
49415        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49416$as_echo "$as_me: Maths library was not found" >&6;}
49417
49418
49419fi
49420
49421
49422
49423  ###############################################################################
49424  #
49425  # Check for libdl.so
49426
49427  save_LIBS="$LIBS"
49428  LIBS=""
49429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49430$as_echo_n "checking for dlopen in -ldl... " >&6; }
49431if ${ac_cv_lib_dl_dlopen+:} false; then :
49432  $as_echo_n "(cached) " >&6
49433else
49434  ac_check_lib_save_LIBS=$LIBS
49435LIBS="-ldl  $LIBS"
49436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49437/* end confdefs.h.  */
49438
49439/* Override any GCC internal prototype to avoid an error.
49440   Use char because int might match the return type of a GCC
49441   builtin and then its argument prototype would still apply.  */
49442#ifdef __cplusplus
49443extern "C"
49444#endif
49445char dlopen ();
49446int
49447main ()
49448{
49449return dlopen ();
49450  ;
49451  return 0;
49452}
49453_ACEOF
49454if ac_fn_cxx_try_link "$LINENO"; then :
49455  ac_cv_lib_dl_dlopen=yes
49456else
49457  ac_cv_lib_dl_dlopen=no
49458fi
49459rm -f core conftest.err conftest.$ac_objext \
49460    conftest$ac_exeext conftest.$ac_ext
49461LIBS=$ac_check_lib_save_LIBS
49462fi
49463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49464$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49465if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49466  cat >>confdefs.h <<_ACEOF
49467#define HAVE_LIBDL 1
49468_ACEOF
49469
49470  LIBS="-ldl $LIBS"
49471
49472fi
49473
49474  LIBDL="$LIBS"
49475
49476  LIBS="$save_LIBS"
49477
49478
49479  ###############################################################################
49480  #
49481  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49482  # dynamic build is configured on command line.
49483  #
49484
49485# Check whether --with-stdc++lib was given.
49486if test "${with_stdc__lib+set}" = set; then :
49487  withval=$with_stdc__lib;
49488        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49489                && test "x$with_stdc__lib" != xdefault; then
49490          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49491        fi
49492
49493else
49494  with_stdc__lib=default
49495
49496fi
49497
49498
49499  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49500    # Test if -lstdc++ works.
49501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49502$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49503    ac_ext=cpp
49504ac_cpp='$CXXCPP $CPPFLAGS'
49505ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49506ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49507ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49508
49509    OLD_CXXFLAGS="$CXXFLAGS"
49510    CXXFLAGS="$CXXFLAGS -lstdc++"
49511    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49512/* end confdefs.h.  */
49513
49514int
49515main ()
49516{
49517return 0;
49518  ;
49519  return 0;
49520}
49521_ACEOF
49522if ac_fn_cxx_try_link "$LINENO"; then :
49523  has_dynamic_libstdcxx=yes
49524else
49525  has_dynamic_libstdcxx=no
49526fi
49527rm -f core conftest.err conftest.$ac_objext \
49528    conftest$ac_exeext conftest.$ac_ext
49529    CXXFLAGS="$OLD_CXXFLAGS"
49530    ac_ext=cpp
49531ac_cpp='$CXXCPP $CPPFLAGS'
49532ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49533ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49534ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49535
49536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49537$as_echo "$has_dynamic_libstdcxx" >&6; }
49538
49539    # Test if stdc++ can be linked statically.
49540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49541$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49542    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49543    ac_ext=cpp
49544ac_cpp='$CXXCPP $CPPFLAGS'
49545ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49546ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49547ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49548
49549    OLD_LIBS="$LIBS"
49550    OLD_CXX="$CXX"
49551    LIBS="$STATIC_STDCXX_FLAGS"
49552    CXX="$CC"
49553    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49554/* end confdefs.h.  */
49555
49556int
49557main ()
49558{
49559return 0;
49560  ;
49561  return 0;
49562}
49563_ACEOF
49564if ac_fn_cxx_try_link "$LINENO"; then :
49565  has_static_libstdcxx=yes
49566else
49567  has_static_libstdcxx=no
49568fi
49569rm -f core conftest.err conftest.$ac_objext \
49570    conftest$ac_exeext conftest.$ac_ext
49571    LIBS="$OLD_LIBS"
49572    CXX="$OLD_CXX"
49573    ac_ext=cpp
49574ac_cpp='$CXXCPP $CPPFLAGS'
49575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49578
49579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49580$as_echo "$has_static_libstdcxx" >&6; }
49581
49582    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49583      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49584    fi
49585
49586    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49587      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49588    fi
49589
49590    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49591      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49592    fi
49593
49594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49595$as_echo_n "checking how to link with libstdc++... " >&6; }
49596    # If dynamic was requested, it's available since it would fail above otherwise.
49597    # If dynamic wasn't requested, go with static unless it isn't available.
49598    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49599      LIBCXX="$LIBCXX -lstdc++"
49600      LDCXX="$CXX"
49601      STATIC_CXX_SETTING="STATIC_CXX=false"
49602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49603$as_echo "dynamic" >&6; }
49604    else
49605      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49606      LDCXX="$CC"
49607      STATIC_CXX_SETTING="STATIC_CXX=true"
49608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49609$as_echo "static" >&6; }
49610    fi
49611  fi
49612
49613
49614  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49615    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49616
49617pkg_failed=no
49618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49619$as_echo_n "checking for LIBFFI... " >&6; }
49620
49621if test -n "$LIBFFI_CFLAGS"; then
49622    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49623 elif test -n "$PKG_CONFIG"; then
49624    if test -n "$PKG_CONFIG" && \
49625    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49626  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49627  ac_status=$?
49628  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49629  test $ac_status = 0; }; then
49630  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49631else
49632  pkg_failed=yes
49633fi
49634 else
49635    pkg_failed=untried
49636fi
49637if test -n "$LIBFFI_LIBS"; then
49638    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49639 elif test -n "$PKG_CONFIG"; then
49640    if test -n "$PKG_CONFIG" && \
49641    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49642  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49643  ac_status=$?
49644  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49645  test $ac_status = 0; }; then
49646  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49647else
49648  pkg_failed=yes
49649fi
49650 else
49651    pkg_failed=untried
49652fi
49653
49654
49655
49656if test $pkg_failed = yes; then
49657
49658if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49659        _pkg_short_errors_supported=yes
49660else
49661        _pkg_short_errors_supported=no
49662fi
49663        if test $_pkg_short_errors_supported = yes; then
49664	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49665        else
49666	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49667        fi
49668	# Put the nasty error message in config.log where it belongs
49669	echo "$LIBFFI_PKG_ERRORS" >&5
49670
49671	as_fn_error $? "Package requirements (libffi) were not met:
49672
49673$LIBFFI_PKG_ERRORS
49674
49675Consider adjusting the PKG_CONFIG_PATH environment variable if you
49676installed software in a non-standard prefix.
49677
49678Alternatively, you may set the environment variables LIBFFI_CFLAGS
49679and LIBFFI_LIBS to avoid the need to call pkg-config.
49680See the pkg-config man page for more details.
49681" "$LINENO" 5
49682elif test $pkg_failed = untried; then
49683	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49685as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49686is in your PATH or set the PKG_CONFIG environment variable to the full
49687path to pkg-config.
49688
49689Alternatively, you may set the environment variables LIBFFI_CFLAGS
49690and LIBFFI_LIBS to avoid the need to call pkg-config.
49691See the pkg-config man page for more details.
49692
49693To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49694See \`config.log' for more details" "$LINENO" 5; }
49695else
49696	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49697	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49699$as_echo "yes" >&6; }
49700	:
49701fi
49702
49703  fi
49704
49705  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49706    # Extract the first word of "llvm-config", so it can be a program name with args.
49707set dummy llvm-config; ac_word=$2
49708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49709$as_echo_n "checking for $ac_word... " >&6; }
49710if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49711  $as_echo_n "(cached) " >&6
49712else
49713  if test -n "$LLVM_CONFIG"; then
49714  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49715else
49716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49717for as_dir in $PATH
49718do
49719  IFS=$as_save_IFS
49720  test -z "$as_dir" && as_dir=.
49721    for ac_exec_ext in '' $ac_executable_extensions; do
49722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49723    ac_cv_prog_LLVM_CONFIG="llvm-config"
49724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49725    break 2
49726  fi
49727done
49728  done
49729IFS=$as_save_IFS
49730
49731fi
49732fi
49733LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49734if test -n "$LLVM_CONFIG"; then
49735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49736$as_echo "$LLVM_CONFIG" >&6; }
49737else
49738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49739$as_echo "no" >&6; }
49740fi
49741
49742
49743
49744    if test "x$LLVM_CONFIG" != xllvm-config; then
49745      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49746    fi
49747
49748    llvm_components="jit mcjit engine nativecodegen native"
49749    unset LLVM_CFLAGS
49750    for flag in $("$LLVM_CONFIG" --cxxflags); do
49751      if echo "${flag}" | grep -q '^-[ID]'; then
49752        if test "${flag}" != "-D_DEBUG" ; then
49753          if test "${LLVM_CFLAGS}" != "" ; then
49754            LLVM_CFLAGS="${LLVM_CFLAGS} "
49755          fi
49756          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49757        fi
49758      fi
49759    done
49760    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49761    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49762
49763    unset LLVM_LDFLAGS
49764    for flag in $("${LLVM_CONFIG}" --ldflags); do
49765      if echo "${flag}" | grep -q '^-L'; then
49766        if test "${LLVM_LDFLAGS}" != ""; then
49767          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49768        fi
49769        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49770      fi
49771    done
49772
49773    unset LLVM_LIBS
49774    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49775      if echo "${flag}" | grep -q '^-l'; then
49776        if test "${LLVM_LIBS}" != ""; then
49777          LLVM_LIBS="${LLVM_LIBS} "
49778        fi
49779        LLVM_LIBS="${LLVM_LIBS}${flag}"
49780      fi
49781    done
49782
49783
49784
49785
49786  fi
49787
49788  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49789  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49790    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49791  fi
49792
49793  # TODO better (platform agnostic) test
49794  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49795    LIBCXX="-lstdc++"
49796  fi
49797
49798
49799
49800
49801  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49802
49803
49804# Check whether --with-msvcr-dll was given.
49805if test "${with_msvcr_dll+set}" = set; then :
49806  withval=$with_msvcr_dll;
49807fi
49808
49809
49810  if test "x$with_msvcr_dll" != x; then
49811    # If given explicitely by user, do not probe. If not present, fail directly.
49812
49813  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49814  METHOD="--with-msvcr-dll"
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    if test "x$MSVCR_DLL" = x; then
49855      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49856    fi
49857  fi
49858
49859  if test "x$MSVCR_DLL" = x; then
49860    # Probe: Using well-known location from Visual Studio 10.0
49861    if test "x$VCINSTALLDIR" != x; then
49862      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49863
49864  windows_path="$CYGWIN_VC_INSTALL_DIR"
49865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49866    unix_path=`$CYGPATH -u "$windows_path"`
49867    CYGWIN_VC_INSTALL_DIR="$unix_path"
49868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49870    CYGWIN_VC_INSTALL_DIR="$unix_path"
49871  fi
49872
49873      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49874        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49875      else
49876        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49877      fi
49878
49879  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49880  METHOD="well-known location in VCINSTALLDIR"
49881  if test -e "$POSSIBLE_MSVCR_DLL"; then
49882    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49883$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49884
49885    # Need to check if the found msvcr is correct architecture
49886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49887$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49888    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49890      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49891      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49892      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49893        CORRECT_MSVCR_ARCH="PE32 executable"
49894      else
49895        CORRECT_MSVCR_ARCH="PE32+ executable"
49896      fi
49897    else
49898      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49899        CORRECT_MSVCR_ARCH=386
49900      else
49901        CORRECT_MSVCR_ARCH=x86-64
49902      fi
49903    fi
49904    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49906$as_echo "ok" >&6; }
49907      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49908      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49909$as_echo_n "checking for msvcr100.dll... " >&6; }
49910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49911$as_echo "$MSVCR_DLL" >&6; }
49912    else
49913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49914$as_echo "incorrect, ignoring" >&6; }
49915      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49916$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49917    fi
49918  fi
49919
49920    fi
49921  fi
49922
49923  if test "x$MSVCR_DLL" = x; then
49924    # Probe: Check in the Boot JDK directory.
49925    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49926
49927  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49928  METHOD="well-known location in Boot JDK"
49929  if test -e "$POSSIBLE_MSVCR_DLL"; then
49930    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49931$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49932
49933    # Need to check if the found msvcr is correct architecture
49934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49935$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49936    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49938      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49939      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49940      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49941        CORRECT_MSVCR_ARCH="PE32 executable"
49942      else
49943        CORRECT_MSVCR_ARCH="PE32+ executable"
49944      fi
49945    else
49946      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49947        CORRECT_MSVCR_ARCH=386
49948      else
49949        CORRECT_MSVCR_ARCH=x86-64
49950      fi
49951    fi
49952    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49954$as_echo "ok" >&6; }
49955      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49957$as_echo_n "checking for msvcr100.dll... " >&6; }
49958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49959$as_echo "$MSVCR_DLL" >&6; }
49960    else
49961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49962$as_echo "incorrect, ignoring" >&6; }
49963      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49964$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49965    fi
49966  fi
49967
49968  fi
49969
49970  if test "x$MSVCR_DLL" = x; then
49971    # Probe: Look in the Windows system32 directory
49972    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49973
49974  windows_path="$CYGWIN_SYSTEMROOT"
49975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49976    unix_path=`$CYGPATH -u "$windows_path"`
49977    CYGWIN_SYSTEMROOT="$unix_path"
49978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49980    CYGWIN_SYSTEMROOT="$unix_path"
49981  fi
49982
49983    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49984
49985  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49986  METHOD="well-known location in SYSTEMROOT"
49987  if test -e "$POSSIBLE_MSVCR_DLL"; then
49988    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49989$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49990
49991    # Need to check if the found msvcr is correct architecture
49992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49993$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49994    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49995    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49996      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49997      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49998      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49999        CORRECT_MSVCR_ARCH="PE32 executable"
50000      else
50001        CORRECT_MSVCR_ARCH="PE32+ executable"
50002      fi
50003    else
50004      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50005        CORRECT_MSVCR_ARCH=386
50006      else
50007        CORRECT_MSVCR_ARCH=x86-64
50008      fi
50009    fi
50010    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50012$as_echo "ok" >&6; }
50013      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50015$as_echo_n "checking for msvcr100.dll... " >&6; }
50016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50017$as_echo "$MSVCR_DLL" >&6; }
50018    else
50019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50020$as_echo "incorrect, ignoring" >&6; }
50021      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50022$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50023    fi
50024  fi
50025
50026  fi
50027
50028  if test "x$MSVCR_DLL" = x; then
50029    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50030    if test "x$VS100COMNTOOLS" != x; then
50031      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50032
50033  windows_path="$CYGWIN_VS_TOOLS_DIR"
50034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50035    unix_path=`$CYGPATH -u "$windows_path"`
50036    CYGWIN_VS_TOOLS_DIR="$unix_path"
50037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50039    CYGWIN_VS_TOOLS_DIR="$unix_path"
50040  fi
50041
50042      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50043        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
50044      else
50045        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
50046      fi
50047
50048  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50049  METHOD="search of VS100COMNTOOLS"
50050  if test -e "$POSSIBLE_MSVCR_DLL"; then
50051    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50052$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50053
50054    # Need to check if the found msvcr is correct architecture
50055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50056$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50057    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50059      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50060      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50061      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50062        CORRECT_MSVCR_ARCH="PE32 executable"
50063      else
50064        CORRECT_MSVCR_ARCH="PE32+ executable"
50065      fi
50066    else
50067      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50068        CORRECT_MSVCR_ARCH=386
50069      else
50070        CORRECT_MSVCR_ARCH=x86-64
50071      fi
50072    fi
50073    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50075$as_echo "ok" >&6; }
50076      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50078$as_echo_n "checking for msvcr100.dll... " >&6; }
50079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50080$as_echo "$MSVCR_DLL" >&6; }
50081    else
50082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50083$as_echo "incorrect, ignoring" >&6; }
50084      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50085$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50086    fi
50087  fi
50088
50089    fi
50090  fi
50091
50092  if test "x$MSVCR_DLL" = x; then
50093    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50094    # (This was the original behaviour; kept since it might turn up something)
50095    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50096      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50097        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
50098      else
50099        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50100        if test "x$POSSIBLE_MSVCR_DLL" = x; then
50101          # We're grasping at straws now...
50102          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
50103        fi
50104      fi
50105
50106
50107  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50108  METHOD="search of VCINSTALLDIR"
50109  if test -e "$POSSIBLE_MSVCR_DLL"; then
50110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50111$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50112
50113    # Need to check if the found msvcr is correct architecture
50114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50115$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50116    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50118      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50119      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50120      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50121        CORRECT_MSVCR_ARCH="PE32 executable"
50122      else
50123        CORRECT_MSVCR_ARCH="PE32+ executable"
50124      fi
50125    else
50126      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50127        CORRECT_MSVCR_ARCH=386
50128      else
50129        CORRECT_MSVCR_ARCH=x86-64
50130      fi
50131    fi
50132    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50134$as_echo "ok" >&6; }
50135      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50137$as_echo_n "checking for msvcr100.dll... " >&6; }
50138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50139$as_echo "$MSVCR_DLL" >&6; }
50140    else
50141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50142$as_echo "incorrect, ignoring" >&6; }
50143      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50144$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50145    fi
50146  fi
50147
50148    fi
50149  fi
50150
50151  if test "x$MSVCR_DLL" = x; then
50152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50153$as_echo_n "checking for msvcr100.dll... " >&6; }
50154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50155$as_echo "no" >&6; }
50156    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
50157  fi
50158
50159
50160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50161
50162  # Input might be given as Windows format, start by converting to
50163  # unix format.
50164  path="$MSVCR_DLL"
50165  new_path=`$CYGPATH -u "$path"`
50166
50167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50170  # "foo.exe" is OK but "foo" is an error.
50171  #
50172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50173  # It is also a way to make sure we got the proper file name for the real test later on.
50174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50175  if test "x$test_shortpath" = x; then
50176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50177$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50178    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50179  fi
50180
50181  # Call helper function which possibly converts this using DOS-style short mode.
50182  # If so, the updated path is stored in $new_path.
50183
50184  input_path="$new_path"
50185  # Check if we need to convert this using DOS-style short mode. If the path
50186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50187  # take no chances and rewrite it.
50188  # Note: m4 eats our [], so we need to use [ and ] instead.
50189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50190  if test "x$has_forbidden_chars" != x; then
50191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50195      # Going to short mode and back again did indeed matter. Since short mode is
50196      # case insensitive, let's make it lowercase to improve readability.
50197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50198      # Now convert it back to Unix-stile (cygpath)
50199      input_path=`$CYGPATH -u "$shortmode_path"`
50200      new_path="$input_path"
50201    fi
50202  fi
50203
50204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50205  if test "x$test_cygdrive_prefix" = x; then
50206    # As a simple fix, exclude /usr/bin since it's not a real path.
50207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50209      # a path prefixed by /cygdrive for fixpath to work.
50210      new_path="$CYGWIN_ROOT_PATH$input_path"
50211    fi
50212  fi
50213
50214
50215  if test "x$path" != "x$new_path"; then
50216    MSVCR_DLL="$new_path"
50217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50218$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50219  fi
50220
50221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50222
50223  path="$MSVCR_DLL"
50224  has_colon=`$ECHO $path | $GREP ^.:`
50225  new_path="$path"
50226  if test "x$has_colon" = x; then
50227    # Not in mixed or Windows style, start by that.
50228    new_path=`cmd //c echo $path`
50229  fi
50230
50231
50232  input_path="$new_path"
50233  # Check if we need to convert this using DOS-style short mode. If the path
50234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50235  # take no chances and rewrite it.
50236  # Note: m4 eats our [], so we need to use [ and ] instead.
50237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50238  if test "x$has_forbidden_chars" != x; then
50239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50241  fi
50242
50243
50244  windows_path="$new_path"
50245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50246    unix_path=`$CYGPATH -u "$windows_path"`
50247    new_path="$unix_path"
50248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50250    new_path="$unix_path"
50251  fi
50252
50253  if test "x$path" != "x$new_path"; then
50254    MSVCR_DLL="$new_path"
50255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50256$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50257  fi
50258
50259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50261
50262  else
50263    # We're on a posix platform. Hooray! :)
50264    path="$MSVCR_DLL"
50265    has_space=`$ECHO "$path" | $GREP " "`
50266    if test "x$has_space" != x; then
50267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50268$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50269      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50270    fi
50271
50272    # Use eval to expand a potential ~
50273    eval path="$path"
50274    if test ! -f "$path" && test ! -d "$path"; then
50275      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50276    fi
50277
50278    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50279  fi
50280
50281
50282
50283
50284# Check whether --with-dxsdk was given.
50285if test "${with_dxsdk+set}" = set; then :
50286  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50287$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50288fi
50289
50290
50291
50292
50293# Check whether --with-dxsdk-lib was given.
50294if test "${with_dxsdk_lib+set}" = set; then :
50295  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50296$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50297fi
50298
50299
50300
50301
50302# Check whether --with-dxsdk-include was given.
50303if test "${with_dxsdk_include+set}" = set; then :
50304  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50305$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50306fi
50307
50308
50309  fi
50310
50311
50312
50313###############################################################################
50314#
50315# We need to do some final tweaking, when everything else is done.
50316#
50317###############################################################################
50318
50319
50320  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50321
50322
50323  # The name of the Service Agent jar.
50324  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50325  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50326    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50327  fi
50328
50329
50330
50331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50332$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50333
50334    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50335      ENABLE_INTREE_EC=yes
50336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50337$as_echo "yes" >&6; }
50338    else
50339      ENABLE_INTREE_EC=no
50340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50341$as_echo "no" >&6; }
50342    fi
50343
50344
50345
50346
50347###############################################################################
50348#
50349# Configure parts of the build that only affect the build performance,
50350# not the result.
50351#
50352###############################################################################
50353
50354
50355  # How many cores do we have on this build system?
50356
50357# Check whether --with-num-cores was given.
50358if test "${with_num_cores+set}" = set; then :
50359  withval=$with_num_cores;
50360fi
50361
50362  if test "x$with_num_cores" = x; then
50363    # The number of cores were not specified, try to probe them.
50364
50365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50366$as_echo_n "checking for number of cores... " >&6; }
50367  NUM_CORES=1
50368  FOUND_CORES=no
50369
50370  if test -f /proc/cpuinfo; then
50371    # Looks like a Linux (or cygwin) system
50372    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50373    FOUND_CORES=yes
50374  elif test -x /usr/sbin/psrinfo; then
50375    # Looks like a Solaris system
50376    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50377    FOUND_CORES=yes
50378  elif test -x /usr/sbin/system_profiler; then
50379    # Looks like a MacOSX system
50380    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50381    FOUND_CORES=yes
50382  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50383    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50384    FOUND_CORES=yes
50385  elif test -n "$NUMBER_OF_PROCESSORS"; then
50386    # On windows, look in the env
50387    NUM_CORES=$NUMBER_OF_PROCESSORS
50388    FOUND_CORES=yes
50389  fi
50390
50391  if test "x$FOUND_CORES" = xyes; then
50392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50393$as_echo "$NUM_CORES" >&6; }
50394  else
50395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50396$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50397    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50398$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50399  fi
50400
50401  else
50402    NUM_CORES=$with_num_cores
50403  fi
50404
50405
50406
50407  # How much memory do we have on this build system?
50408
50409# Check whether --with-memory-size was given.
50410if test "${with_memory_size+set}" = set; then :
50411  withval=$with_memory_size;
50412fi
50413
50414  if test "x$with_memory_size" = x; then
50415    # The memory size was not specified, try to probe it.
50416
50417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50418$as_echo_n "checking for memory size... " >&6; }
50419  # Default to 1024 MB
50420  MEMORY_SIZE=1024
50421  FOUND_MEM=no
50422
50423  if test -f /proc/meminfo; then
50424    # Looks like a Linux (or cygwin) system
50425    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50426    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50427    FOUND_MEM=yes
50428  elif test -x /usr/sbin/prtconf; then
50429    # Looks like a Solaris or AIX system
50430    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50431    FOUND_MEM=yes
50432  elif test -x /usr/sbin/system_profiler; then
50433    # Looks like a MacOSX system
50434    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50435    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50436    FOUND_MEM=yes
50437  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50438    # Windows, but without cygwin
50439    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50440    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50441    FOUND_MEM=yes
50442  fi
50443
50444  if test "x$FOUND_MEM" = xyes; then
50445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50446$as_echo "$MEMORY_SIZE MB" >&6; }
50447  else
50448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50449$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50451$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50452  fi
50453
50454  else
50455    MEMORY_SIZE=$with_memory_size
50456  fi
50457
50458
50459
50460  # Provide a decent default number of parallel jobs for make depending on
50461  # number of cores, amount of memory and machine architecture.
50462
50463# Check whether --with-jobs was given.
50464if test "${with_jobs+set}" = set; then :
50465  withval=$with_jobs;
50466fi
50467
50468  if test "x$with_jobs" = x; then
50469    # Number of jobs was not specified, calculate.
50470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50471$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50472    # Approximate memory in GB.
50473    memory_gb=`expr $MEMORY_SIZE / 1024`
50474    # Pick the lowest of memory in gb and number of cores.
50475    if test "$memory_gb" -lt "$NUM_CORES"; then
50476      JOBS="$memory_gb"
50477    else
50478      JOBS="$NUM_CORES"
50479      # On bigger machines, leave some room for other processes to run
50480      if test "$JOBS" -gt "4"; then
50481        JOBS=`expr $JOBS '*' 90 / 100`
50482      fi
50483    fi
50484    # Cap number of jobs to 16
50485    if test "$JOBS" -gt "16"; then
50486      JOBS=16
50487    fi
50488    if test "$JOBS" -eq "0"; then
50489      JOBS=1
50490    fi
50491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50492$as_echo "$JOBS" >&6; }
50493  else
50494    JOBS=$with_jobs
50495  fi
50496
50497
50498
50499# Setup arguments for the boot jdk (after cores and memory have been setup)
50500
50501  ##############################################################################
50502  #
50503  # Specify jvm options for anything that is run with the Boot JDK.
50504  # Not all JVM:s accept the same arguments on the command line.
50505  #
50506
50507# Check whether --with-boot-jdk-jvmargs was given.
50508if test "${with_boot_jdk_jvmargs+set}" = set; then :
50509  withval=$with_boot_jdk_jvmargs;
50510fi
50511
50512
50513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50514$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50515
50516  # Disable special log output when a debug build is used as Boot JDK...
50517
50518  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50519  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50520  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50521  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50522  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50523  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50524    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50525    JVM_ARG_OK=true
50526  else
50527    $ECHO "Arg failed:" >&5
50528    $ECHO "$OUTPUT" >&5
50529    JVM_ARG_OK=false
50530  fi
50531
50532
50533  # Apply user provided options.
50534
50535  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50536  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50537  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50538  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50539  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50540  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50541    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50542    JVM_ARG_OK=true
50543  else
50544    $ECHO "Arg failed:" >&5
50545    $ECHO "$OUTPUT" >&5
50546    JVM_ARG_OK=false
50547  fi
50548
50549
50550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50551$as_echo "$boot_jdk_jvmargs" >&6; }
50552
50553  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50554  JAVA_FLAGS=$boot_jdk_jvmargs
50555
50556
50557
50558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50559$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50560
50561  # Starting amount of heap memory.
50562
50563  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50564  $ECHO "Command: $JAVA -Xms64M -version" >&5
50565  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50566  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50567  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50568  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50569    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50570    JVM_ARG_OK=true
50571  else
50572    $ECHO "Arg failed:" >&5
50573    $ECHO "$OUTPUT" >&5
50574    JVM_ARG_OK=false
50575  fi
50576
50577
50578  # Maximum amount of heap memory.
50579  # Maximum stack size.
50580  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50581  if test "x$BUILD_NUM_BITS" = x32; then
50582    if test "$JVM_MAX_HEAP" -gt "1100"; then
50583      JVM_MAX_HEAP=1100
50584    elif test "$JVM_MAX_HEAP" -lt "512"; then
50585      JVM_MAX_HEAP=512
50586    fi
50587    STACK_SIZE=768
50588  else
50589    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50590    # pointers are used. Apparently, we need to increase the heap and stack
50591    # space for the jvm. More specifically, when running javac to build huge
50592    # jdk batch
50593    if test "$JVM_MAX_HEAP" -gt "1600"; then
50594      JVM_MAX_HEAP=1600
50595    elif test "$JVM_MAX_HEAP" -lt "512"; then
50596      JVM_MAX_HEAP=512
50597    fi
50598    STACK_SIZE=1536
50599  fi
50600
50601  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50602  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50603  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50604  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50605  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50606  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50607    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50608    JVM_ARG_OK=true
50609  else
50610    $ECHO "Arg failed:" >&5
50611    $ECHO "$OUTPUT" >&5
50612    JVM_ARG_OK=false
50613  fi
50614
50615
50616  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50617  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50618  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50619  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50620  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50621  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50622    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50623    JVM_ARG_OK=true
50624  else
50625    $ECHO "Arg failed:" >&5
50626    $ECHO "$OUTPUT" >&5
50627    JVM_ARG_OK=false
50628  fi
50629
50630
50631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50632$as_echo "$boot_jdk_jvmargs_big" >&6; }
50633
50634  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50635
50636
50637
50638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50639$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50640
50641  # Use serial gc for small short lived tools if possible
50642
50643  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50644  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50645  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50646  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50647  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50648  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50649    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50650    JVM_ARG_OK=true
50651  else
50652    $ECHO "Arg failed:" >&5
50653    $ECHO "$OUTPUT" >&5
50654    JVM_ARG_OK=false
50655  fi
50656
50657
50658  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50659  $ECHO "Command: $JAVA -Xms32M -version" >&5
50660  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50661  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50662  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50663  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50664    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50665    JVM_ARG_OK=true
50666  else
50667    $ECHO "Arg failed:" >&5
50668    $ECHO "$OUTPUT" >&5
50669    JVM_ARG_OK=false
50670  fi
50671
50672
50673  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50674  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50675  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50676  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50677  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50678  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50679    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50680    JVM_ARG_OK=true
50681  else
50682    $ECHO "Arg failed:" >&5
50683    $ECHO "$OUTPUT" >&5
50684    JVM_ARG_OK=false
50685  fi
50686
50687
50688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50689$as_echo "$boot_jdk_jvmargs_small" >&6; }
50690
50691  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50692
50693
50694  JAVA_TOOL_FLAGS_SMALL=""
50695  for f in $JAVA_FLAGS_SMALL; do
50696    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50697  done
50698
50699
50700
50701# Setup smart javac (after cores and memory have been setup)
50702
50703
50704# Check whether --with-sjavac-server-java was given.
50705if test "${with_sjavac_server_java+set}" = set; then :
50706  withval=$with_sjavac_server_java;
50707fi
50708
50709
50710  if test "x$with_sjavac_server_java" != x; then
50711    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50712    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50713    if test "x$FOUND_VERSION" = x; then
50714      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50715    fi
50716  else
50717    SJAVAC_SERVER_JAVA="$JAVA"
50718  fi
50719
50720
50721  if test "$MEMORY_SIZE" -gt "3000"; then
50722
50723  $ECHO "Check if jvm arg is ok: -d64" >&5
50724  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50725  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50726  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50727  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50728  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50729    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50730    JVM_ARG_OK=true
50731  else
50732    $ECHO "Arg failed:" >&5
50733    $ECHO "$OUTPUT" >&5
50734    JVM_ARG_OK=false
50735  fi
50736
50737    if test "$JVM_ARG_OK" = true; then
50738      JVM_64BIT=true
50739      JVM_ARG_OK=false
50740    fi
50741  fi
50742
50743  MX_VALUE=`expr $MEMORY_SIZE / 2`
50744  if test "$JVM_64BIT" = true; then
50745    # Set ms lower than mx since more than one instance of the server might
50746    # get launched at the same time before they figure out which instance won.
50747    MS_VALUE=512
50748    if test "$MX_VALUE" -gt "2048"; then
50749      MX_VALUE=2048
50750    fi
50751  else
50752    MS_VALUE=256
50753    if test "$MX_VALUE" -gt "1500"; then
50754      MX_VALUE=1500
50755    fi
50756  fi
50757  if test "$MX_VALUE" -lt "512"; then
50758    MX_VALUE=512
50759  fi
50760
50761  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50762  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50763  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50764  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50765  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50766  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50767    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50768    JVM_ARG_OK=true
50769  else
50770    $ECHO "Arg failed:" >&5
50771    $ECHO "$OUTPUT" >&5
50772    JVM_ARG_OK=false
50773  fi
50774
50775
50776
50777  # Check whether --enable-sjavac was given.
50778if test "${enable_sjavac+set}" = set; then :
50779  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50780else
50781  ENABLE_SJAVAC='no'
50782fi
50783
50784  if test "x$JVM_ARG_OK" = "xfalse"; then
50785    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50786$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50787    ENABLE_SJAVAC=no;
50788  fi
50789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50790$as_echo_n "checking whether to use sjavac... " >&6; }
50791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50792$as_echo "$ENABLE_SJAVAC" >&6; }
50793
50794
50795  if test "x$ENABLE_SJAVAC" = xyes; then
50796    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50797  else
50798    SJAVAC_SERVER_DIR=
50799  fi
50800
50801
50802
50803# Can the C/C++ compiler use precompiled headers?
50804
50805
50806  ###############################################################################
50807  #
50808  # Can the C/C++ compiler use precompiled headers?
50809  #
50810  # Check whether --enable-precompiled-headers was given.
50811if test "${enable_precompiled_headers+set}" = set; then :
50812  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50813else
50814  ENABLE_PRECOMPH=yes
50815fi
50816
50817
50818  USE_PRECOMPILED_HEADER=1
50819  if test "x$ENABLE_PRECOMPH" = xno; then
50820    USE_PRECOMPILED_HEADER=0
50821  fi
50822
50823  if test "x$ENABLE_PRECOMPH" = xyes; then
50824    # Check that the compiler actually supports precomp headers.
50825    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50827$as_echo_n "checking that precompiled headers work... " >&6; }
50828      echo "int alfa();" > conftest.h
50829      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50830      if test ! -f conftest.hpp.gch; then
50831        USE_PRECOMPILED_HEADER=0
50832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50833$as_echo "no" >&6; }
50834      else
50835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50836$as_echo "yes" >&6; }
50837      fi
50838      rm -f conftest.h conftest.hpp.gch
50839    fi
50840  fi
50841
50842
50843
50844
50845# Setup use of ccache, if available
50846
50847  # Check whether --enable-ccache was given.
50848if test "${enable_ccache+set}" = set; then :
50849  enableval=$enable_ccache;
50850fi
50851
50852
50853  CCACHE=
50854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50855$as_echo_n "checking is ccache enabled... " >&6; }
50856  ENABLE_CCACHE=$enable_ccache
50857  if test "x$enable_ccache" = xyes; then
50858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50859$as_echo "yes" >&6; }
50860    OLD_PATH="$PATH"
50861    if test "x$TOOLCHAIN_PATH" != x; then
50862      PATH=$TOOLCHAIN_PATH:$PATH
50863    fi
50864
50865
50866
50867  # Publish this variable in the help.
50868
50869
50870  if test "x$CCACHE" = x; then
50871    # The variable is not set by user, try to locate tool using the code snippet
50872    for ac_prog in ccache
50873do
50874  # Extract the first word of "$ac_prog", so it can be a program name with args.
50875set dummy $ac_prog; ac_word=$2
50876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50877$as_echo_n "checking for $ac_word... " >&6; }
50878if ${ac_cv_path_CCACHE+:} false; then :
50879  $as_echo_n "(cached) " >&6
50880else
50881  case $CCACHE in
50882  [\\/]* | ?:[\\/]*)
50883  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50884  ;;
50885  *)
50886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50887for as_dir in $PATH
50888do
50889  IFS=$as_save_IFS
50890  test -z "$as_dir" && as_dir=.
50891    for ac_exec_ext in '' $ac_executable_extensions; do
50892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50893    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50895    break 2
50896  fi
50897done
50898  done
50899IFS=$as_save_IFS
50900
50901  ;;
50902esac
50903fi
50904CCACHE=$ac_cv_path_CCACHE
50905if test -n "$CCACHE"; then
50906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50907$as_echo "$CCACHE" >&6; }
50908else
50909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50910$as_echo "no" >&6; }
50911fi
50912
50913
50914  test -n "$CCACHE" && break
50915done
50916
50917  else
50918    # The variable is set, but is it from the command line or the environment?
50919
50920    # Try to remove the string !CCACHE! from our list.
50921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50923      # If it failed, the variable was not from the command line. Ignore it,
50924      # but warn the user (except for BASH, which is always set by the calling BASH).
50925      if test "xCCACHE" != xBASH; then
50926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50927$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50928      fi
50929      # Try to locate tool using the code snippet
50930      for ac_prog in ccache
50931do
50932  # Extract the first word of "$ac_prog", so it can be a program name with args.
50933set dummy $ac_prog; ac_word=$2
50934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50935$as_echo_n "checking for $ac_word... " >&6; }
50936if ${ac_cv_path_CCACHE+:} false; then :
50937  $as_echo_n "(cached) " >&6
50938else
50939  case $CCACHE in
50940  [\\/]* | ?:[\\/]*)
50941  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50942  ;;
50943  *)
50944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50945for as_dir in $PATH
50946do
50947  IFS=$as_save_IFS
50948  test -z "$as_dir" && as_dir=.
50949    for ac_exec_ext in '' $ac_executable_extensions; do
50950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50951    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50953    break 2
50954  fi
50955done
50956  done
50957IFS=$as_save_IFS
50958
50959  ;;
50960esac
50961fi
50962CCACHE=$ac_cv_path_CCACHE
50963if test -n "$CCACHE"; then
50964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50965$as_echo "$CCACHE" >&6; }
50966else
50967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50968$as_echo "no" >&6; }
50969fi
50970
50971
50972  test -n "$CCACHE" && break
50973done
50974
50975    else
50976      # If it succeeded, then it was overridden by the user. We will use it
50977      # for the tool.
50978
50979      # First remove it from the list of overridden variables, so we can test
50980      # for unknown variables in the end.
50981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50982
50983      # Check if the provided tool contains a complete path.
50984      tool_specified="$CCACHE"
50985      tool_basename="${tool_specified##*/}"
50986      if test "x$tool_basename" = "x$tool_specified"; then
50987        # A command without a complete path is provided, search $PATH.
50988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50989$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50990        # Extract the first word of "$tool_basename", so it can be a program name with args.
50991set dummy $tool_basename; ac_word=$2
50992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50993$as_echo_n "checking for $ac_word... " >&6; }
50994if ${ac_cv_path_CCACHE+:} false; then :
50995  $as_echo_n "(cached) " >&6
50996else
50997  case $CCACHE in
50998  [\\/]* | ?:[\\/]*)
50999  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51000  ;;
51001  *)
51002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51003for as_dir in $PATH
51004do
51005  IFS=$as_save_IFS
51006  test -z "$as_dir" && as_dir=.
51007    for ac_exec_ext in '' $ac_executable_extensions; do
51008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51009    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51011    break 2
51012  fi
51013done
51014  done
51015IFS=$as_save_IFS
51016
51017  ;;
51018esac
51019fi
51020CCACHE=$ac_cv_path_CCACHE
51021if test -n "$CCACHE"; then
51022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51023$as_echo "$CCACHE" >&6; }
51024else
51025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51026$as_echo "no" >&6; }
51027fi
51028
51029
51030        if test "x$CCACHE" = x; then
51031          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51032        fi
51033      else
51034        # Otherwise we believe it is a complete path. Use it as it is.
51035        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51036$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51038$as_echo_n "checking for CCACHE... " >&6; }
51039        if test ! -x "$tool_specified"; then
51040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51041$as_echo "not found" >&6; }
51042          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51043        fi
51044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51045$as_echo "$tool_specified" >&6; }
51046      fi
51047    fi
51048  fi
51049
51050
51051
51052  if test "x$CCACHE" = x; then
51053    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51054  fi
51055
51056
51057    CCACHE_STATUS="enabled"
51058    PATH="$OLD_PATH"
51059  elif test "x$enable_ccache" = xno; then
51060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51061$as_echo "no, explicitly disabled" >&6; }
51062  elif test "x$enable_ccache" = x; then
51063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51064$as_echo "no" >&6; }
51065  else
51066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51067$as_echo "unknown" >&6; }
51068    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51069  fi
51070
51071
51072
51073# Check whether --with-ccache-dir was given.
51074if test "${with_ccache_dir+set}" = set; then :
51075  withval=$with_ccache_dir;
51076fi
51077
51078
51079  if test "x$with_ccache_dir" != x; then
51080    # When using a non home ccache directory, assume the use is to share ccache files
51081    # with other users. Thus change the umask.
51082    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51083    if test "x$CCACHE" = x; then
51084      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51085$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51086    fi
51087  fi
51088
51089  if test "x$CCACHE" != x; then
51090
51091  if test "x$CCACHE" != x; then
51092    # Only use ccache if it is 3.1.4 or later, which supports
51093    # precompiled headers.
51094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51095$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51096    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51097    if test "x$HAS_GOOD_CCACHE" = x; then
51098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51099$as_echo "no, disabling ccache" >&6; }
51100      CCACHE=
51101      CCACHE_STATUS="disabled"
51102    else
51103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51104$as_echo "yes" >&6; }
51105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51106$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51107      PUSHED_FLAGS="$CXXFLAGS"
51108      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51109      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51110/* end confdefs.h.  */
51111
51112int
51113main ()
51114{
51115
51116  ;
51117  return 0;
51118}
51119_ACEOF
51120if ac_fn_cxx_try_compile "$LINENO"; then :
51121  CC_KNOWS_CCACHE_TRICK=yes
51122else
51123  CC_KNOWS_CCACHE_TRICK=no
51124fi
51125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51126      CXXFLAGS="$PUSHED_FLAGS"
51127      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51129$as_echo "yes" >&6; }
51130      else
51131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51132$as_echo "no, disabling ccaching of precompiled headers" >&6; }
51133        CCACHE=
51134        CCACHE_STATUS="disabled"
51135      fi
51136    fi
51137  fi
51138
51139  if test "x$CCACHE" != x; then
51140    CCACHE_SLOPPINESS=time_macros
51141    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51142    CCACHE_FLAGS=-fpch-preprocess
51143
51144    if test "x$SET_CCACHE_DIR" != x; then
51145      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51146      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51147    fi
51148  fi
51149
51150  fi
51151
51152
51153###############################################################################
51154#
51155# And now the finish...
51156#
51157###############################################################################
51158
51159# Check for some common pitfalls
51160
51161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51162    file_to_test="$SRC_ROOT/LICENSE"
51163    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51164      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
51165    fi
51166  fi
51167
51168
51169  # Did user specify any unknown variables?
51170
51171  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51172    # Replace the separating ! with spaces before presenting for end user.
51173    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51174    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51175$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51176  fi
51177
51178
51179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51180$as_echo_n "checking if build directory is on local disk... " >&6; }
51181
51182  # df -l lists only local disks; if the given directory is not found then
51183  # a non-zero exit code is given
51184  if test "x$DF" = x; then
51185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51186      # msys does not have df; use Windows "net use" instead.
51187      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51188      if test "x$IS_NETWORK_DISK" = x; then
51189        OUTPUT_DIR_IS_LOCAL="yes"
51190      else
51191        OUTPUT_DIR_IS_LOCAL="no"
51192      fi
51193    else
51194      # No df here, say it's local
51195      OUTPUT_DIR_IS_LOCAL="yes"
51196    fi
51197  else
51198    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51199      OUTPUT_DIR_IS_LOCAL="yes"
51200    else
51201      OUTPUT_DIR_IS_LOCAL="no"
51202    fi
51203  fi
51204
51205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51206$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51207
51208
51209
51210  # Check if the user has any old-style ALT_ variables set.
51211  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51212
51213  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51214  # Since we can't properly handle the dependencies for this, warn the user about the situation
51215  if test -e $OUTPUT_ROOT/spec.gmk; then
51216    IS_RECONFIGURE=yes
51217  else
51218    IS_RECONFIGURE=no
51219  fi
51220
51221
51222# At the end, call the custom hook. (Dummy macro if no custom sources available)
51223
51224
51225# We're messing a bit with internal autoconf variables to put the config.status
51226# in the output directory instead of the current directory.
51227CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51228
51229# Create the actual output files. Now the main work of configure is done.
51230cat >confcache <<\_ACEOF
51231# This file is a shell script that caches the results of configure
51232# tests run on this system so they can be shared between configure
51233# scripts and configure runs, see configure's option --config-cache.
51234# It is not useful on other systems.  If it contains results you don't
51235# want to keep, you may remove or edit it.
51236#
51237# config.status only pays attention to the cache file if you give it
51238# the --recheck option to rerun configure.
51239#
51240# `ac_cv_env_foo' variables (set or unset) will be overridden when
51241# loading this file, other *unset* `ac_cv_foo' will be assigned the
51242# following values.
51243
51244_ACEOF
51245
51246# The following way of writing the cache mishandles newlines in values,
51247# but we know of no workaround that is simple, portable, and efficient.
51248# So, we kill variables containing newlines.
51249# Ultrix sh set writes to stderr and can't be redirected directly,
51250# and sets the high bit in the cache file unless we assign to the vars.
51251(
51252  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51253    eval ac_val=\$$ac_var
51254    case $ac_val in #(
51255    *${as_nl}*)
51256      case $ac_var in #(
51257      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51258$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51259      esac
51260      case $ac_var in #(
51261      _ | IFS | as_nl) ;; #(
51262      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51263      *) { eval $ac_var=; unset $ac_var;} ;;
51264      esac ;;
51265    esac
51266  done
51267
51268  (set) 2>&1 |
51269    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51270    *${as_nl}ac_space=\ *)
51271      # `set' does not quote correctly, so add quotes: double-quote
51272      # substitution turns \\\\ into \\, and sed turns \\ into \.
51273      sed -n \
51274	"s/'/'\\\\''/g;
51275	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51276      ;; #(
51277    *)
51278      # `set' quotes correctly as required by POSIX, so do not add quotes.
51279      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51280      ;;
51281    esac |
51282    sort
51283) |
51284  sed '
51285     /^ac_cv_env_/b end
51286     t clear
51287     :clear
51288     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51289     t end
51290     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51291     :end' >>confcache
51292if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51293  if test -w "$cache_file"; then
51294    if test "x$cache_file" != "x/dev/null"; then
51295      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51296$as_echo "$as_me: updating cache $cache_file" >&6;}
51297      if test ! -f "$cache_file" || test -h "$cache_file"; then
51298	cat confcache >"$cache_file"
51299      else
51300        case $cache_file in #(
51301        */* | ?:*)
51302	  mv -f confcache "$cache_file"$$ &&
51303	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51304        *)
51305	  mv -f confcache "$cache_file" ;;
51306	esac
51307      fi
51308    fi
51309  else
51310    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51311$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51312  fi
51313fi
51314rm -f confcache
51315
51316test "x$prefix" = xNONE && prefix=$ac_default_prefix
51317# Let make expand exec_prefix.
51318test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51319
51320# Transform confdefs.h into DEFS.
51321# Protect against shell expansion while executing Makefile rules.
51322# Protect against Makefile macro expansion.
51323#
51324# If the first sed substitution is executed (which looks for macros that
51325# take arguments), then branch to the quote section.  Otherwise,
51326# look for a macro that doesn't take arguments.
51327ac_script='
51328:mline
51329/\\$/{
51330 N
51331 s,\\\n,,
51332 b mline
51333}
51334t clear
51335:clear
51336s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51337t quote
51338s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51339t quote
51340b any
51341:quote
51342s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51343s/\[/\\&/g
51344s/\]/\\&/g
51345s/\$/$$/g
51346H
51347:any
51348${
51349	g
51350	s/^\n//
51351	s/\n/ /g
51352	p
51353}
51354'
51355DEFS=`sed -n "$ac_script" confdefs.h`
51356
51357
51358ac_libobjs=
51359ac_ltlibobjs=
51360U=
51361for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51362  # 1. Remove the extension, and $U if already installed.
51363  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51364  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51365  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51366  #    will be set to the directory where LIBOBJS objects are built.
51367  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51368  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51369done
51370LIBOBJS=$ac_libobjs
51371
51372LTLIBOBJS=$ac_ltlibobjs
51373
51374
51375
51376: "${CONFIG_STATUS=./config.status}"
51377ac_write_fail=0
51378ac_clean_files_save=$ac_clean_files
51379ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51380{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51381$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51382as_write_fail=0
51383cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51384#! $SHELL
51385# Generated by $as_me.
51386# Run this file to recreate the current configuration.
51387# Compiler output produced by configure, useful for debugging
51388# configure, is in config.log if it exists.
51389
51390debug=false
51391ac_cs_recheck=false
51392ac_cs_silent=false
51393
51394SHELL=\${CONFIG_SHELL-$SHELL}
51395export SHELL
51396_ASEOF
51397cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51398## -------------------- ##
51399## M4sh Initialization. ##
51400## -------------------- ##
51401
51402# Be more Bourne compatible
51403DUALCASE=1; export DUALCASE # for MKS sh
51404if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51405  emulate sh
51406  NULLCMD=:
51407  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51408  # is contrary to our usage.  Disable this feature.
51409  alias -g '${1+"$@"}'='"$@"'
51410  setopt NO_GLOB_SUBST
51411else
51412  case `(set -o) 2>/dev/null` in #(
51413  *posix*) :
51414    set -o posix ;; #(
51415  *) :
51416     ;;
51417esac
51418fi
51419
51420
51421as_nl='
51422'
51423export as_nl
51424# Printing a long string crashes Solaris 7 /usr/bin/printf.
51425as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51426as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51427as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51428# Prefer a ksh shell builtin over an external printf program on Solaris,
51429# but without wasting forks for bash or zsh.
51430if test -z "$BASH_VERSION$ZSH_VERSION" \
51431    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51432  as_echo='print -r --'
51433  as_echo_n='print -rn --'
51434elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51435  as_echo='printf %s\n'
51436  as_echo_n='printf %s'
51437else
51438  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51439    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51440    as_echo_n='/usr/ucb/echo -n'
51441  else
51442    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51443    as_echo_n_body='eval
51444      arg=$1;
51445      case $arg in #(
51446      *"$as_nl"*)
51447	expr "X$arg" : "X\\(.*\\)$as_nl";
51448	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51449      esac;
51450      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51451    '
51452    export as_echo_n_body
51453    as_echo_n='sh -c $as_echo_n_body as_echo'
51454  fi
51455  export as_echo_body
51456  as_echo='sh -c $as_echo_body as_echo'
51457fi
51458
51459# The user is always right.
51460if test "${PATH_SEPARATOR+set}" != set; then
51461  PATH_SEPARATOR=:
51462  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51463    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51464      PATH_SEPARATOR=';'
51465  }
51466fi
51467
51468
51469# IFS
51470# We need space, tab and new line, in precisely that order.  Quoting is
51471# there to prevent editors from complaining about space-tab.
51472# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51473# splitting by setting IFS to empty value.)
51474IFS=" ""	$as_nl"
51475
51476# Find who we are.  Look in the path if we contain no directory separator.
51477as_myself=
51478case $0 in #((
51479  *[\\/]* ) as_myself=$0 ;;
51480  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51481for as_dir in $PATH
51482do
51483  IFS=$as_save_IFS
51484  test -z "$as_dir" && as_dir=.
51485    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51486  done
51487IFS=$as_save_IFS
51488
51489     ;;
51490esac
51491# We did not find ourselves, most probably we were run as `sh COMMAND'
51492# in which case we are not to be found in the path.
51493if test "x$as_myself" = x; then
51494  as_myself=$0
51495fi
51496if test ! -f "$as_myself"; then
51497  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51498  exit 1
51499fi
51500
51501# Unset variables that we do not need and which cause bugs (e.g. in
51502# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51503# suppresses any "Segmentation fault" message there.  '((' could
51504# trigger a bug in pdksh 5.2.14.
51505for as_var in BASH_ENV ENV MAIL MAILPATH
51506do eval test x\${$as_var+set} = xset \
51507  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51508done
51509PS1='$ '
51510PS2='> '
51511PS4='+ '
51512
51513# NLS nuisances.
51514LC_ALL=C
51515export LC_ALL
51516LANGUAGE=C
51517export LANGUAGE
51518
51519# CDPATH.
51520(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51521
51522
51523# as_fn_error STATUS ERROR [LINENO LOG_FD]
51524# ----------------------------------------
51525# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51526# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51527# script with STATUS, using 1 if that was 0.
51528as_fn_error ()
51529{
51530  as_status=$1; test $as_status -eq 0 && as_status=1
51531  if test "$4"; then
51532    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51533    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51534  fi
51535  $as_echo "$as_me: error: $2" >&2
51536  as_fn_exit $as_status
51537} # as_fn_error
51538
51539
51540# as_fn_set_status STATUS
51541# -----------------------
51542# Set $? to STATUS, without forking.
51543as_fn_set_status ()
51544{
51545  return $1
51546} # as_fn_set_status
51547
51548# as_fn_exit STATUS
51549# -----------------
51550# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51551as_fn_exit ()
51552{
51553  set +e
51554  as_fn_set_status $1
51555  exit $1
51556} # as_fn_exit
51557
51558# as_fn_unset VAR
51559# ---------------
51560# Portably unset VAR.
51561as_fn_unset ()
51562{
51563  { eval $1=; unset $1;}
51564}
51565as_unset=as_fn_unset
51566# as_fn_append VAR VALUE
51567# ----------------------
51568# Append the text in VALUE to the end of the definition contained in VAR. Take
51569# advantage of any shell optimizations that allow amortized linear growth over
51570# repeated appends, instead of the typical quadratic growth present in naive
51571# implementations.
51572if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51573  eval 'as_fn_append ()
51574  {
51575    eval $1+=\$2
51576  }'
51577else
51578  as_fn_append ()
51579  {
51580    eval $1=\$$1\$2
51581  }
51582fi # as_fn_append
51583
51584# as_fn_arith ARG...
51585# ------------------
51586# Perform arithmetic evaluation on the ARGs, and store the result in the
51587# global $as_val. Take advantage of shells that can avoid forks. The arguments
51588# must be portable across $(()) and expr.
51589if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51590  eval 'as_fn_arith ()
51591  {
51592    as_val=$(( $* ))
51593  }'
51594else
51595  as_fn_arith ()
51596  {
51597    as_val=`expr "$@" || test $? -eq 1`
51598  }
51599fi # as_fn_arith
51600
51601
51602if expr a : '\(a\)' >/dev/null 2>&1 &&
51603   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51604  as_expr=expr
51605else
51606  as_expr=false
51607fi
51608
51609if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51610  as_basename=basename
51611else
51612  as_basename=false
51613fi
51614
51615if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51616  as_dirname=dirname
51617else
51618  as_dirname=false
51619fi
51620
51621as_me=`$as_basename -- "$0" ||
51622$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51623	 X"$0" : 'X\(//\)$' \| \
51624	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51625$as_echo X/"$0" |
51626    sed '/^.*\/\([^/][^/]*\)\/*$/{
51627	    s//\1/
51628	    q
51629	  }
51630	  /^X\/\(\/\/\)$/{
51631	    s//\1/
51632	    q
51633	  }
51634	  /^X\/\(\/\).*/{
51635	    s//\1/
51636	    q
51637	  }
51638	  s/.*/./; q'`
51639
51640# Avoid depending upon Character Ranges.
51641as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51642as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51643as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51644as_cr_digits='0123456789'
51645as_cr_alnum=$as_cr_Letters$as_cr_digits
51646
51647ECHO_C= ECHO_N= ECHO_T=
51648case `echo -n x` in #(((((
51649-n*)
51650  case `echo 'xy\c'` in
51651  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51652  xy)  ECHO_C='\c';;
51653  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51654       ECHO_T='	';;
51655  esac;;
51656*)
51657  ECHO_N='-n';;
51658esac
51659
51660rm -f conf$$ conf$$.exe conf$$.file
51661if test -d conf$$.dir; then
51662  rm -f conf$$.dir/conf$$.file
51663else
51664  rm -f conf$$.dir
51665  mkdir conf$$.dir 2>/dev/null
51666fi
51667if (echo >conf$$.file) 2>/dev/null; then
51668  if ln -s conf$$.file conf$$ 2>/dev/null; then
51669    as_ln_s='ln -s'
51670    # ... but there are two gotchas:
51671    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51672    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51673    # In both cases, we have to default to `cp -pR'.
51674    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51675      as_ln_s='cp -pR'
51676  elif ln conf$$.file conf$$ 2>/dev/null; then
51677    as_ln_s=ln
51678  else
51679    as_ln_s='cp -pR'
51680  fi
51681else
51682  as_ln_s='cp -pR'
51683fi
51684rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51685rmdir conf$$.dir 2>/dev/null
51686
51687
51688# as_fn_mkdir_p
51689# -------------
51690# Create "$as_dir" as a directory, including parents if necessary.
51691as_fn_mkdir_p ()
51692{
51693
51694  case $as_dir in #(
51695  -*) as_dir=./$as_dir;;
51696  esac
51697  test -d "$as_dir" || eval $as_mkdir_p || {
51698    as_dirs=
51699    while :; do
51700      case $as_dir in #(
51701      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51702      *) as_qdir=$as_dir;;
51703      esac
51704      as_dirs="'$as_qdir' $as_dirs"
51705      as_dir=`$as_dirname -- "$as_dir" ||
51706$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51707	 X"$as_dir" : 'X\(//\)[^/]' \| \
51708	 X"$as_dir" : 'X\(//\)$' \| \
51709	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51710$as_echo X"$as_dir" |
51711    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51712	    s//\1/
51713	    q
51714	  }
51715	  /^X\(\/\/\)[^/].*/{
51716	    s//\1/
51717	    q
51718	  }
51719	  /^X\(\/\/\)$/{
51720	    s//\1/
51721	    q
51722	  }
51723	  /^X\(\/\).*/{
51724	    s//\1/
51725	    q
51726	  }
51727	  s/.*/./; q'`
51728      test -d "$as_dir" && break
51729    done
51730    test -z "$as_dirs" || eval "mkdir $as_dirs"
51731  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51732
51733
51734} # as_fn_mkdir_p
51735if mkdir -p . 2>/dev/null; then
51736  as_mkdir_p='mkdir -p "$as_dir"'
51737else
51738  test -d ./-p && rmdir ./-p
51739  as_mkdir_p=false
51740fi
51741
51742
51743# as_fn_executable_p FILE
51744# -----------------------
51745# Test if FILE is an executable regular file.
51746as_fn_executable_p ()
51747{
51748  test -f "$1" && test -x "$1"
51749} # as_fn_executable_p
51750as_test_x='test -x'
51751as_executable_p=as_fn_executable_p
51752
51753# Sed expression to map a string onto a valid CPP name.
51754as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51755
51756# Sed expression to map a string onto a valid variable name.
51757as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51758
51759
51760exec 6>&1
51761## ----------------------------------- ##
51762## Main body of $CONFIG_STATUS script. ##
51763## ----------------------------------- ##
51764_ASEOF
51765test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51766
51767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51768# Save the log message, to keep $0 and so on meaningful, and to
51769# report actual input values of CONFIG_FILES etc. instead of their
51770# values after options handling.
51771ac_log="
51772This file was extended by OpenJDK $as_me jdk9, which was
51773generated by GNU Autoconf 2.69.  Invocation command line was
51774
51775  CONFIG_FILES    = $CONFIG_FILES
51776  CONFIG_HEADERS  = $CONFIG_HEADERS
51777  CONFIG_LINKS    = $CONFIG_LINKS
51778  CONFIG_COMMANDS = $CONFIG_COMMANDS
51779  $ $0 $@
51780
51781on `(hostname || uname -n) 2>/dev/null | sed 1q`
51782"
51783
51784_ACEOF
51785
51786case $ac_config_files in *"
51787"*) set x $ac_config_files; shift; ac_config_files=$*;;
51788esac
51789
51790
51791
51792cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51793# Files that config.status was made for.
51794config_files="$ac_config_files"
51795
51796_ACEOF
51797
51798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51799ac_cs_usage="\
51800\`$as_me' instantiates files and other configuration actions
51801from templates according to the current configuration.  Unless the files
51802and actions are specified as TAGs, all are instantiated by default.
51803
51804Usage: $0 [OPTION]... [TAG]...
51805
51806  -h, --help       print this help, then exit
51807  -V, --version    print version number and configuration settings, then exit
51808      --config     print configuration, then exit
51809  -q, --quiet, --silent
51810                   do not print progress messages
51811  -d, --debug      don't remove temporary files
51812      --recheck    update $as_me by reconfiguring in the same conditions
51813      --file=FILE[:TEMPLATE]
51814                   instantiate the configuration file FILE
51815
51816Configuration files:
51817$config_files
51818
51819Report bugs to <build-dev@openjdk.java.net>.
51820OpenJDK home page: <http://openjdk.java.net>."
51821
51822_ACEOF
51823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51824ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51825ac_cs_version="\\
51826OpenJDK config.status jdk9
51827configured by $0, generated by GNU Autoconf 2.69,
51828  with options \\"\$ac_cs_config\\"
51829
51830Copyright (C) 2012 Free Software Foundation, Inc.
51831This config.status script is free software; the Free Software Foundation
51832gives unlimited permission to copy, distribute and modify it."
51833
51834ac_pwd='$ac_pwd'
51835srcdir='$srcdir'
51836AWK='$AWK'
51837test -n "\$AWK" || AWK=awk
51838_ACEOF
51839
51840cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51841# The default lists apply if the user does not specify any file.
51842ac_need_defaults=:
51843while test $# != 0
51844do
51845  case $1 in
51846  --*=?*)
51847    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51848    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51849    ac_shift=:
51850    ;;
51851  --*=)
51852    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51853    ac_optarg=
51854    ac_shift=:
51855    ;;
51856  *)
51857    ac_option=$1
51858    ac_optarg=$2
51859    ac_shift=shift
51860    ;;
51861  esac
51862
51863  case $ac_option in
51864  # Handling of the options.
51865  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51866    ac_cs_recheck=: ;;
51867  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51868    $as_echo "$ac_cs_version"; exit ;;
51869  --config | --confi | --conf | --con | --co | --c )
51870    $as_echo "$ac_cs_config"; exit ;;
51871  --debug | --debu | --deb | --de | --d | -d )
51872    debug=: ;;
51873  --file | --fil | --fi | --f )
51874    $ac_shift
51875    case $ac_optarg in
51876    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51877    '') as_fn_error $? "missing file argument" ;;
51878    esac
51879    as_fn_append CONFIG_FILES " '$ac_optarg'"
51880    ac_need_defaults=false;;
51881  --he | --h |  --help | --hel | -h )
51882    $as_echo "$ac_cs_usage"; exit ;;
51883  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51884  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51885    ac_cs_silent=: ;;
51886
51887  # This is an error.
51888  -*) as_fn_error $? "unrecognized option: \`$1'
51889Try \`$0 --help' for more information." ;;
51890
51891  *) as_fn_append ac_config_targets " $1"
51892     ac_need_defaults=false ;;
51893
51894  esac
51895  shift
51896done
51897
51898ac_configure_extra_args=
51899
51900if $ac_cs_silent; then
51901  exec 6>/dev/null
51902  ac_configure_extra_args="$ac_configure_extra_args --silent"
51903fi
51904
51905_ACEOF
51906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51907if \$ac_cs_recheck; then
51908  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51909  shift
51910  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51911  CONFIG_SHELL='$SHELL'
51912  export CONFIG_SHELL
51913  exec "\$@"
51914fi
51915
51916_ACEOF
51917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51918exec 5>>config.log
51919{
51920  echo
51921  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51922## Running $as_me. ##
51923_ASBOX
51924  $as_echo "$ac_log"
51925} >&5
51926
51927_ACEOF
51928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51929_ACEOF
51930
51931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51932
51933# Handling of arguments.
51934for ac_config_target in $ac_config_targets
51935do
51936  case $ac_config_target in
51937    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51938    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51939    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51940    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51941    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51942
51943  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51944  esac
51945done
51946
51947
51948# If the user did not use the arguments to specify the items to instantiate,
51949# then the envvar interface is used.  Set only those that are not.
51950# We use the long form for the default assignment because of an extremely
51951# bizarre bug on SunOS 4.1.3.
51952if $ac_need_defaults; then
51953  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51954fi
51955
51956# Have a temporary directory for convenience.  Make it in the build tree
51957# simply because there is no reason against having it here, and in addition,
51958# creating and moving files from /tmp can sometimes cause problems.
51959# Hook for its removal unless debugging.
51960# Note that there is a small window in which the directory will not be cleaned:
51961# after its creation but before its name has been assigned to `$tmp'.
51962$debug ||
51963{
51964  tmp= ac_tmp=
51965  trap 'exit_status=$?
51966  : "${ac_tmp:=$tmp}"
51967  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51968' 0
51969  trap 'as_fn_exit 1' 1 2 13 15
51970}
51971# Create a (secure) tmp directory for tmp files.
51972
51973{
51974  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51975  test -d "$tmp"
51976}  ||
51977{
51978  tmp=./conf$$-$RANDOM
51979  (umask 077 && mkdir "$tmp")
51980} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51981ac_tmp=$tmp
51982
51983# Set up the scripts for CONFIG_FILES section.
51984# No need to generate them if there are no CONFIG_FILES.
51985# This happens for instance with `./config.status config.h'.
51986if test -n "$CONFIG_FILES"; then
51987
51988
51989ac_cr=`echo X | tr X '\015'`
51990# On cygwin, bash can eat \r inside `` if the user requested igncr.
51991# But we know of no other shell where ac_cr would be empty at this
51992# point, so we can use a bashism as a fallback.
51993if test "x$ac_cr" = x; then
51994  eval ac_cr=\$\'\\r\'
51995fi
51996ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51997if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51998  ac_cs_awk_cr='\\r'
51999else
52000  ac_cs_awk_cr=$ac_cr
52001fi
52002
52003echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52004_ACEOF
52005
52006
52007{
52008  echo "cat >conf$$subs.awk <<_ACEOF" &&
52009  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52010  echo "_ACEOF"
52011} >conf$$subs.sh ||
52012  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52013ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52014ac_delim='%!_!# '
52015for ac_last_try in false false false false false :; do
52016  . ./conf$$subs.sh ||
52017    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52018
52019  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52020  if test $ac_delim_n = $ac_delim_num; then
52021    break
52022  elif $ac_last_try; then
52023    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52024  else
52025    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52026  fi
52027done
52028rm -f conf$$subs.sh
52029
52030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52031cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52032_ACEOF
52033sed -n '
52034h
52035s/^/S["/; s/!.*/"]=/
52036p
52037g
52038s/^[^!]*!//
52039:repl
52040t repl
52041s/'"$ac_delim"'$//
52042t delim
52043:nl
52044h
52045s/\(.\{148\}\)..*/\1/
52046t more1
52047s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52048p
52049n
52050b repl
52051:more1
52052s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52053p
52054g
52055s/.\{148\}//
52056t nl
52057:delim
52058h
52059s/\(.\{148\}\)..*/\1/
52060t more2
52061s/["\\]/\\&/g; s/^/"/; s/$/"/
52062p
52063b
52064:more2
52065s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52066p
52067g
52068s/.\{148\}//
52069t delim
52070' <conf$$subs.awk | sed '
52071/^[^""]/{
52072  N
52073  s/\n//
52074}
52075' >>$CONFIG_STATUS || ac_write_fail=1
52076rm -f conf$$subs.awk
52077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52078_ACAWK
52079cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52080  for (key in S) S_is_set[key] = 1
52081  FS = ""
52082
52083}
52084{
52085  line = $ 0
52086  nfields = split(line, field, "@")
52087  substed = 0
52088  len = length(field[1])
52089  for (i = 2; i < nfields; i++) {
52090    key = field[i]
52091    keylen = length(key)
52092    if (S_is_set[key]) {
52093      value = S[key]
52094      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52095      len += length(value) + length(field[++i])
52096      substed = 1
52097    } else
52098      len += 1 + keylen
52099  }
52100
52101  print line
52102}
52103
52104_ACAWK
52105_ACEOF
52106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52107if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52108  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52109else
52110  cat
52111fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52112  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52113_ACEOF
52114
52115# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52116# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52117# trailing colons and then remove the whole line if VPATH becomes empty
52118# (actually we leave an empty line to preserve line numbers).
52119if test "x$srcdir" = x.; then
52120  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52121h
52122s///
52123s/^/:/
52124s/[	 ]*$/:/
52125s/:\$(srcdir):/:/g
52126s/:\${srcdir}:/:/g
52127s/:@srcdir@:/:/g
52128s/^:*//
52129s/:*$//
52130x
52131s/\(=[	 ]*\).*/\1/
52132G
52133s/\n//
52134s/^[^=]*=[	 ]*$//
52135}'
52136fi
52137
52138cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52139fi # test -n "$CONFIG_FILES"
52140
52141
52142eval set X "  :F $CONFIG_FILES      "
52143shift
52144for ac_tag
52145do
52146  case $ac_tag in
52147  :[FHLC]) ac_mode=$ac_tag; continue;;
52148  esac
52149  case $ac_mode$ac_tag in
52150  :[FHL]*:*);;
52151  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52152  :[FH]-) ac_tag=-:-;;
52153  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52154  esac
52155  ac_save_IFS=$IFS
52156  IFS=:
52157  set x $ac_tag
52158  IFS=$ac_save_IFS
52159  shift
52160  ac_file=$1
52161  shift
52162
52163  case $ac_mode in
52164  :L) ac_source=$1;;
52165  :[FH])
52166    ac_file_inputs=
52167    for ac_f
52168    do
52169      case $ac_f in
52170      -) ac_f="$ac_tmp/stdin";;
52171      *) # Look for the file first in the build tree, then in the source tree
52172	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52173	 # because $ac_f cannot contain `:'.
52174	 test -f "$ac_f" ||
52175	   case $ac_f in
52176	   [\\/$]*) false;;
52177	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52178	   esac ||
52179	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52180      esac
52181      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52182      as_fn_append ac_file_inputs " '$ac_f'"
52183    done
52184
52185    # Let's still pretend it is `configure' which instantiates (i.e., don't
52186    # use $as_me), people would be surprised to read:
52187    #    /* config.h.  Generated by config.status.  */
52188    configure_input='Generated from '`
52189	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52190	`' by configure.'
52191    if test x"$ac_file" != x-; then
52192      configure_input="$ac_file.  $configure_input"
52193      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52194$as_echo "$as_me: creating $ac_file" >&6;}
52195    fi
52196    # Neutralize special characters interpreted by sed in replacement strings.
52197    case $configure_input in #(
52198    *\&* | *\|* | *\\* )
52199       ac_sed_conf_input=`$as_echo "$configure_input" |
52200       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52201    *) ac_sed_conf_input=$configure_input;;
52202    esac
52203
52204    case $ac_tag in
52205    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52206      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52207    esac
52208    ;;
52209  esac
52210
52211  ac_dir=`$as_dirname -- "$ac_file" ||
52212$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52213	 X"$ac_file" : 'X\(//\)[^/]' \| \
52214	 X"$ac_file" : 'X\(//\)$' \| \
52215	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52216$as_echo X"$ac_file" |
52217    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52218	    s//\1/
52219	    q
52220	  }
52221	  /^X\(\/\/\)[^/].*/{
52222	    s//\1/
52223	    q
52224	  }
52225	  /^X\(\/\/\)$/{
52226	    s//\1/
52227	    q
52228	  }
52229	  /^X\(\/\).*/{
52230	    s//\1/
52231	    q
52232	  }
52233	  s/.*/./; q'`
52234  as_dir="$ac_dir"; as_fn_mkdir_p
52235  ac_builddir=.
52236
52237case "$ac_dir" in
52238.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52239*)
52240  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52241  # A ".." for each directory in $ac_dir_suffix.
52242  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52243  case $ac_top_builddir_sub in
52244  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52245  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52246  esac ;;
52247esac
52248ac_abs_top_builddir=$ac_pwd
52249ac_abs_builddir=$ac_pwd$ac_dir_suffix
52250# for backward compatibility:
52251ac_top_builddir=$ac_top_build_prefix
52252
52253case $srcdir in
52254  .)  # We are building in place.
52255    ac_srcdir=.
52256    ac_top_srcdir=$ac_top_builddir_sub
52257    ac_abs_top_srcdir=$ac_pwd ;;
52258  [\\/]* | ?:[\\/]* )  # Absolute name.
52259    ac_srcdir=$srcdir$ac_dir_suffix;
52260    ac_top_srcdir=$srcdir
52261    ac_abs_top_srcdir=$srcdir ;;
52262  *) # Relative name.
52263    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52264    ac_top_srcdir=$ac_top_build_prefix$srcdir
52265    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52266esac
52267ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52268
52269
52270  case $ac_mode in
52271  :F)
52272  #
52273  # CONFIG_FILE
52274  #
52275
52276_ACEOF
52277
52278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52279# If the template does not know about datarootdir, expand it.
52280# FIXME: This hack should be removed a few years after 2.60.
52281ac_datarootdir_hack=; ac_datarootdir_seen=
52282ac_sed_dataroot='
52283/datarootdir/ {
52284  p
52285  q
52286}
52287/@datadir@/p
52288/@docdir@/p
52289/@infodir@/p
52290/@localedir@/p
52291/@mandir@/p'
52292case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52293*datarootdir*) ac_datarootdir_seen=yes;;
52294*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52295  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52296$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52297_ACEOF
52298cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52299  ac_datarootdir_hack='
52300  s&@datadir@&$datadir&g
52301  s&@docdir@&$docdir&g
52302  s&@infodir@&$infodir&g
52303  s&@localedir@&$localedir&g
52304  s&@mandir@&$mandir&g
52305  s&\\\${datarootdir}&$datarootdir&g' ;;
52306esac
52307_ACEOF
52308
52309# Neutralize VPATH when `$srcdir' = `.'.
52310# Shell code in configure.ac might set extrasub.
52311# FIXME: do we really want to maintain this feature?
52312cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52313ac_sed_extra="$ac_vpsub
52314$extrasub
52315_ACEOF
52316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52317:t
52318/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52319s|@configure_input@|$ac_sed_conf_input|;t t
52320s&@top_builddir@&$ac_top_builddir_sub&;t t
52321s&@top_build_prefix@&$ac_top_build_prefix&;t t
52322s&@srcdir@&$ac_srcdir&;t t
52323s&@abs_srcdir@&$ac_abs_srcdir&;t t
52324s&@top_srcdir@&$ac_top_srcdir&;t t
52325s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52326s&@builddir@&$ac_builddir&;t t
52327s&@abs_builddir@&$ac_abs_builddir&;t t
52328s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52329$ac_datarootdir_hack
52330"
52331eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52332  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52333
52334test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52335  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52336  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52337      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52338  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52339which seems to be undefined.  Please make sure it is defined" >&5
52340$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52341which seems to be undefined.  Please make sure it is defined" >&2;}
52342
52343  rm -f "$ac_tmp/stdin"
52344  case $ac_file in
52345  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52346  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52347  esac \
52348  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52349 ;;
52350
52351
52352
52353  esac
52354
52355done # for ac_tag
52356
52357
52358as_fn_exit 0
52359_ACEOF
52360ac_clean_files=$ac_clean_files_save
52361
52362test $ac_write_fail = 0 ||
52363  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52364
52365
52366# configure is writing to config.log, and then calls config.status.
52367# config.status does its own redirection, appending to config.log.
52368# Unfortunately, on DOS this fails, as config.log is still kept open
52369# by configure, so config.status won't be able to write to it; its
52370# output is simply discarded.  So we exec the FD to /dev/null,
52371# effectively closing config.log, so it can be properly (re)opened and
52372# appended to by config.status.  When coming back to configure, we
52373# need to make the FD available again.
52374if test "$no_create" != yes; then
52375  ac_cs_success=:
52376  ac_config_status_args=
52377  test "$silent" = yes &&
52378    ac_config_status_args="$ac_config_status_args --quiet"
52379  exec 5>/dev/null
52380  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52381  exec 5>>config.log
52382  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52383  # would make configure fail if this is the last instruction.
52384  $ac_cs_success || as_fn_exit 1
52385fi
52386if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52387  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52388$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52389fi
52390
52391
52392# Try to move the config.log file to the output directory.
52393if test -e ./config.log; then
52394  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52395fi
52396
52397# Make the compare script executable
52398$CHMOD +x $OUTPUT_ROOT/compare.sh
52399
52400# Finally output some useful information to the user
52401
52402  # Finally output some useful information to the user
52403
52404  printf "\n"
52405  printf "====================================================\n"
52406  if test "x$no_create" != "xyes"; then
52407    if test "x$IS_RECONFIGURE" != "xyes"; then
52408      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
52409    else
52410      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
52411    fi
52412  else
52413    if test "x$IS_RECONFIGURE" != "xyes"; then
52414      printf "A configuration has been successfully checked but not created\n"
52415    else
52416      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
52417    fi
52418  fi
52419  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52420    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52421  else
52422    printf "using default settings.\n"
52423  fi
52424
52425  printf "\n"
52426  printf "Configuration summary:\n"
52427  printf "* Debug level:    $DEBUG_LEVEL\n"
52428  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52429  printf "* JDK variant:    $JDK_VARIANT\n"
52430  printf "* JVM variants:   $with_jvm_variants\n"
52431  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52432
52433  printf "\n"
52434  printf "Tools summary:\n"
52435  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52436    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52437  fi
52438  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52439  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52440  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52441  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52442
52443  printf "\n"
52444  printf "Build performance summary:\n"
52445  printf "* Cores to use:   $JOBS\n"
52446  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52447  if test "x$CCACHE_STATUS" != "x"; then
52448    printf "* ccache status:  $CCACHE_STATUS\n"
52449  fi
52450  printf "\n"
52451
52452  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52453    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52454    printf "will result in longer build times.\n"
52455    printf "\n"
52456  fi
52457
52458  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52459    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52460    printf "These are not respected, and will be ignored. It is recommended\n"
52461    printf "that you clean your environment. The following variables are set:\n"
52462    printf "$FOUND_ALT_VARIABLES\n"
52463    printf "\n"
52464  fi
52465
52466  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52467    printf "WARNING: Your build output directory is not on a local disk.\n"
52468    printf "This will severely degrade build performance!\n"
52469    printf "It is recommended that you create an output directory on a local disk,\n"
52470    printf "and run the configure script again from that directory.\n"
52471    printf "\n"
52472  fi
52473
52474  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52475    printf "WARNING: The result of this configuration has overridden an older\n"
52476    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52477    printf "proper build. Failure to do so might result in strange build problems.\n"
52478    printf "\n"
52479  fi
52480
52481  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52482    printf "WARNING: The result of this configuration was not saved.\n"
52483    printf "You should run without '--no-create | -n' to create the configuration.\n"
52484    printf "\n"
52485  fi
52486
52487
52488