generated-configure.sh revision 1160:edbc7981f3be
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
637JAVA_TOOL_FLAGS_SMALL
638JAVA_FLAGS_SMALL
639JAVA_FLAGS_BIG
640JAVA_FLAGS
641JOBS
642MEMORY_SIZE
643NUM_CORES
644ENABLE_INTREE_EC
645SALIB_NAME
646HOTSPOT_MAKE_ARGS
647MSVCR_DLL
648LIBCXX
649LLVM_LIBS
650LLVM_LDFLAGS
651LLVM_CFLAGS
652LLVM_CONFIG
653LIBFFI_LIBS
654LIBFFI_CFLAGS
655STATIC_CXX_SETTING
656LIBDL
657LIBM
658LIBZIP_CAN_USE_MMAP
659USE_EXTERNAL_LIBZ
660USE_EXTERNAL_LIBPNG
661PNG_LIBS
662PNG_CFLAGS
663USE_EXTERNAL_LCMS
664LCMS_LIBS
665LCMS_CFLAGS
666USE_EXTERNAL_LIBGIF
667USE_EXTERNAL_LIBJPEG
668ALSA_LIBS
669ALSA_CFLAGS
670FREETYPE_BUNDLE_LIB_PATH
671FREETYPE_LIBS
672FREETYPE_CFLAGS
673CUPS_CFLAGS
674X_EXTRA_LIBS
675X_LIBS
676X_PRE_LIBS
677X_CFLAGS
678XMKMF
679FIXPATH
680ZIP_DEBUGINFO_FILES
681ENABLE_DEBUG_SYMBOLS
682CFLAGS_WARNINGS_ARE_ERRORS
683COMPILER_SUPPORTS_TARGET_BITS_FLAG
684ZERO_ARCHFLAG
685LDFLAGS_CXX_JDK
686LDFLAGS_JDKEXE_SUFFIX
687LDFLAGS_JDKLIB_SUFFIX
688LDFLAGS_JDKEXE
689LDFLAGS_JDKLIB
690CXXFLAGS_JDKEXE
691CXXFLAGS_JDKLIB
692CFLAGS_JDKEXE
693CFLAGS_JDKLIB
694MACOSX_VERSION_MIN
695LEGACY_EXTRA_LDFLAGS
696LEGACY_EXTRA_CXXFLAGS
697LEGACY_EXTRA_CFLAGS
698CXX_O_FLAG_NONE
699CXX_O_FLAG_DEBUG
700CXX_O_FLAG_NORM
701CXX_O_FLAG_HI
702CXX_O_FLAG_HIGHEST
703C_O_FLAG_NONE
704C_O_FLAG_DEBUG
705C_O_FLAG_NORM
706C_O_FLAG_HI
707C_O_FLAG_HIGHEST
708CXXFLAGS_DEBUG_OPTIONS
709CFLAGS_DEBUG_OPTIONS
710CXXFLAGS_DEBUG_SYMBOLS
711CFLAGS_DEBUG_SYMBOLS
712CXX_FLAG_DEPS
713C_FLAG_DEPS
714SET_SHARED_LIBRARY_MAPFILE
715SET_SHARED_LIBRARY_NAME
716SET_SHARED_LIBRARY_ORIGIN
717SET_EXECUTABLE_ORIGIN
718SHARED_LIBRARY_FLAGS
719CXX_FLAG_REORDER
720C_FLAG_REORDER
721SYSROOT_LDFLAGS
722SYSROOT_CFLAGS
723RC_FLAGS
724AR_OUT_OPTION
725LD_OUT_OPTION
726EXE_OUT_OPTION
727CC_OUT_OPTION
728POST_MCS_CMD
729POST_STRIP_CMD
730ARFLAGS
731COMPILER_TARGET_BITS_FLAG
732JT_HOME
733JTREGEXE
734USING_BROKEN_SUSE_LD
735PACKAGE_PATH
736LDEXECXX
737LDEXE
738USE_CLANG
739HOTSPOT_LD
740HOTSPOT_CXX
741HOTSPOT_RC
742HOTSPOT_MT
743BUILD_LD
744BUILD_CXX
745BUILD_CC
746ac_ct_OBJDUMP
747OBJDUMP
748ac_ct_OBJCOPY
749OBJCOPY
750ac_ct_NM
751ac_ct_STRIP
752MCS
753GNM
754NM
755STRIP
756MSBUILD
757DUMPBIN
758RC
759MT
760LIPO
761ac_ct_OBJC
762OBJCFLAGS
763OBJC
764ac_ct_AR
765AR
766AS
767LDCXX
768LD
769CXXCPP
770CPP
771ac_ct_CXX
772CXXFLAGS
773CXX
774ac_ct_PROPER_COMPILER_CXX
775PROPER_COMPILER_CXX
776TOOLCHAIN_PATH_CXX
777POTENTIAL_CXX
778OBJEXT
779EXEEXT
780ac_ct_CC
781CPPFLAGS
782LDFLAGS
783CFLAGS
784CC
785ac_ct_PROPER_COMPILER_CC
786PROPER_COMPILER_CC
787TOOLCHAIN_PATH_CC
788POTENTIAL_CC
789VS_LIB
790VS_INCLUDE
791VS_PATH
792CYGWIN_LINK
793EXE_SUFFIX
794OBJ_SUFFIX
795STATIC_LIBRARY
796SHARED_LIBRARY
797STATIC_LIBRARY_SUFFIX
798SHARED_LIBRARY_SUFFIX
799LIBRARY_PREFIX
800TOOLCHAIN_TYPE
801BUILD_HOTSPOT
802HOTSPOT_DIST
803BUILD_OUTPUT
804OVERRIDE_SRC_ROOT
805ADD_SRC_ROOT
806JDK_TOPDIR
807NASHORN_TOPDIR
808HOTSPOT_TOPDIR
809JAXWS_TOPDIR
810JAXP_TOPDIR
811CORBA_TOPDIR
812LANGTOOLS_TOPDIR
813JAVAC_FLAGS
814BOOT_JDK_SOURCETARGET
815JARSIGNER
816NATIVE2ASCII
817JAR
818JAVAH
819JAVAC
820JAVA
821BOOT_JDK
822BOOT_TOOLSJAR
823BOOT_RTJAR
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844RMICONNECTOR_IIOP
845UNLIMITED_CRYPTO
846CACERTS_FILE
847TEST_IN_BUILD
848BUILD_HEADLESS
849SUPPORT_HEADFUL
850SUPPORT_HEADLESS
851BDEPS_FTP
852BDEPS_UNZIP
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857CODESIGN
858XATTR
859DSYMUTIL
860IS_GNU_TIME
861TIME
862STAT
863HG
864READELF
865OTOOL
866LDD
867ZIP
868UNZIP
869FIND_DELETE
870OUTPUT_SYNC
871OUTPUT_SYNC_SUPPORTED
872MAKE
873CHECK_TOOLSDIR_MAKE
874CHECK_TOOLSDIR_GMAKE
875CHECK_MAKE
876CHECK_GMAKE
877PKGHANDLER
878OUTPUT_ROOT
879CONF_NAME
880SPEC
881SDKROOT
882XCODEBUILD
883BUILD_VARIANT_RELEASE
884DEBUG_CLASSFILES
885FASTDEBUG
886VARIANT
887DEBUG_LEVEL
888MACOSX_UNIVERSAL
889INCLUDE_SA
890JVM_VARIANT_CORE
891JVM_VARIANT_ZEROSHARK
892JVM_VARIANT_ZERO
893JVM_VARIANT_KERNEL
894JVM_VARIANT_MINIMAL1
895JVM_VARIANT_CLIENT
896JVM_VARIANT_SERVER
897JVM_VARIANTS
898JVM_INTERPRETER
899JDK_VARIANT
900SET_OPENJDK
901BUILD_LOG_WRAPPER
902BUILD_LOG_PREVIOUS
903BUILD_LOG
904TOPDIR
905PATH_SEP
906ZERO_ARCHDEF
907DEFINE_CROSS_COMPILE_ARCH
908LP64
909OPENJDK_TARGET_OS_EXPORT_DIR
910OPENJDK_TARGET_OS_API_DIR
911OPENJDK_TARGET_CPU_JLI_CFLAGS
912OPENJDK_TARGET_CPU_OSARCH
913OPENJDK_TARGET_CPU_ISADIR
914OPENJDK_TARGET_CPU_LIBDIR
915OPENJDK_TARGET_CPU_LEGACY_LIB
916OPENJDK_TARGET_CPU_LEGACY
917REQUIRED_OS_VERSION
918REQUIRED_OS_NAME
919COMPILE_TYPE
920OPENJDK_TARGET_CPU_ENDIAN
921OPENJDK_TARGET_CPU_BITS
922OPENJDK_TARGET_CPU_ARCH
923OPENJDK_TARGET_CPU
924OPENJDK_TARGET_OS_ENV
925OPENJDK_TARGET_OS_API
926OPENJDK_TARGET_OS
927OPENJDK_BUILD_CPU_ENDIAN
928OPENJDK_BUILD_CPU_BITS
929OPENJDK_BUILD_CPU_ARCH
930OPENJDK_BUILD_CPU
931OPENJDK_BUILD_OS_ENV
932OPENJDK_BUILD_OS_API
933OPENJDK_BUILD_OS
934OPENJDK_BUILD_AUTOCONF_NAME
935OPENJDK_TARGET_AUTOCONF_NAME
936target_os
937target_vendor
938target_cpu
939target
940host_os
941host_vendor
942host_cpu
943host
944build_os
945build_vendor
946build_cpu
947build
948CPIO
949SETFILE
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995CONFIGURE_COMMAND_LINE
996target_alias
997host_alias
998build_alias
999LIBS
1000ECHO_T
1001ECHO_N
1002ECHO_C
1003DEFS
1004mandir
1005localedir
1006libdir
1007psdir
1008pdfdir
1009dvidir
1010htmldir
1011infodir
1012docdir
1013oldincludedir
1014includedir
1015localstatedir
1016sharedstatedir
1017sysconfdir
1018datadir
1019datarootdir
1020libexecdir
1021sbindir
1022bindir
1023program_transform_name
1024prefix
1025exec_prefix
1026PACKAGE_URL
1027PACKAGE_BUGREPORT
1028PACKAGE_STRING
1029PACKAGE_VERSION
1030PACKAGE_TARNAME
1031PACKAGE_NAME
1032PATH_SEPARATOR
1033SHELL'
1034ac_subst_files=''
1035ac_user_opts='
1036enable_option_checking
1037with_target_bits
1038enable_openjdk_only
1039with_custom_make_dir
1040with_jdk_variant
1041with_jvm_interpreter
1042with_jvm_variants
1043enable_debug
1044with_debug_level
1045with_devkit
1046with_sys_root
1047with_sysroot
1048with_tools_dir
1049with_toolchain_path
1050with_extra_path
1051with_sdk_name
1052with_conf_name
1053with_output_sync
1054with_builddeps_conf
1055with_builddeps_server
1056with_builddeps_dir
1057with_builddeps_group
1058enable_headful
1059enable_hotspot_test_in_build
1060with_cacerts_file
1061enable_unlimited_crypto
1062enable_rmiconnector_iiop
1063with_milestone
1064with_update_version
1065with_user_release_suffix
1066with_build_number
1067with_boot_jdk
1068with_add_source_root
1069with_override_source_root
1070with_adds_and_overrides
1071with_override_langtools
1072with_override_corba
1073with_override_jaxp
1074with_override_jaxws
1075with_override_hotspot
1076with_override_nashorn
1077with_override_jdk
1078with_import_hotspot
1079with_toolchain_type
1080with_jtreg
1081with_extra_cflags
1082with_extra_cxxflags
1083with_extra_ldflags
1084enable_debug_symbols
1085enable_zip_debug_info
1086with_x
1087with_cups
1088with_cups_include
1089with_freetype
1090with_freetype_include
1091with_freetype_lib
1092with_freetype_src
1093enable_freetype_bundling
1094with_alsa
1095with_alsa_include
1096with_alsa_lib
1097with_libjpeg
1098with_giflib
1099with_lcms
1100with_libpng
1101with_zlib
1102with_stdc__lib
1103with_msvcr_dll
1104with_dxsdk
1105with_dxsdk_lib
1106with_dxsdk_include
1107with_num_cores
1108with_memory_size
1109with_jobs
1110with_boot_jdk_jvmargs
1111with_sjavac_server_java
1112enable_sjavac
1113enable_precompiled_headers
1114enable_ccache
1115with_ccache_dir
1116'
1117      ac_precious_vars='build_alias
1118host_alias
1119target_alias
1120BASENAME
1121BASH
1122CAT
1123CHMOD
1124CMP
1125COMM
1126CP
1127CUT
1128DATE
1129DIFF
1130DIRNAME
1131ECHO
1132EXPR
1133FILE
1134FIND
1135HEAD
1136LN
1137LS
1138MKDIR
1139MKTEMP
1140MV
1141NAWK
1142PRINTF
1143RM
1144SH
1145SORT
1146TAIL
1147TAR
1148TEE
1149TOUCH
1150TR
1151UNAME
1152UNIQ
1153WC
1154WHICH
1155XARGS
1156AWK
1157GREP
1158EGREP
1159FGREP
1160SED
1161CYGPATH
1162READLINK
1163DF
1164SETFILE
1165CPIO
1166UNZIP
1167ZIP
1168LDD
1169OTOOL
1170READELF
1171HG
1172STAT
1173TIME
1174DSYMUTIL
1175XATTR
1176CODESIGN
1177PKG_CONFIG
1178JAVA
1179JAVAC
1180JAVAH
1181JAR
1182NATIVE2ASCII
1183JARSIGNER
1184CC
1185CFLAGS
1186LDFLAGS
1187LIBS
1188CPPFLAGS
1189CXX
1190CXXFLAGS
1191CCC
1192CPP
1193CXXCPP
1194AS
1195AR
1196OBJC
1197OBJCFLAGS
1198LIPO
1199STRIP
1200NM
1201GNM
1202MCS
1203OBJCOPY
1204OBJDUMP
1205BUILD_CC
1206BUILD_CXX
1207BUILD_LD
1208JTREGEXE
1209XMKMF
1210FREETYPE_CFLAGS
1211FREETYPE_LIBS
1212ALSA_CFLAGS
1213ALSA_LIBS
1214LCMS_CFLAGS
1215LCMS_LIBS
1216PNG_CFLAGS
1217PNG_LIBS
1218LIBFFI_CFLAGS
1219LIBFFI_LIBS
1220CCACHE'
1221
1222
1223# Initialize some variables set by options.
1224ac_init_help=
1225ac_init_version=false
1226ac_unrecognized_opts=
1227ac_unrecognized_sep=
1228# The variables have the same names as the options, with
1229# dashes changed to underlines.
1230cache_file=/dev/null
1231exec_prefix=NONE
1232no_create=
1233no_recursion=
1234prefix=NONE
1235program_prefix=NONE
1236program_suffix=NONE
1237program_transform_name=s,x,x,
1238silent=
1239site=
1240srcdir=
1241verbose=
1242x_includes=NONE
1243x_libraries=NONE
1244
1245# Installation directory options.
1246# These are left unexpanded so users can "make install exec_prefix=/foo"
1247# and all the variables that are supposed to be based on exec_prefix
1248# by default will actually change.
1249# Use braces instead of parens because sh, perl, etc. also accept them.
1250# (The list follows the same order as the GNU Coding Standards.)
1251bindir='${exec_prefix}/bin'
1252sbindir='${exec_prefix}/sbin'
1253libexecdir='${exec_prefix}/libexec'
1254datarootdir='${prefix}/share'
1255datadir='${datarootdir}'
1256sysconfdir='${prefix}/etc'
1257sharedstatedir='${prefix}/com'
1258localstatedir='${prefix}/var'
1259includedir='${prefix}/include'
1260oldincludedir='/usr/include'
1261docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1262infodir='${datarootdir}/info'
1263htmldir='${docdir}'
1264dvidir='${docdir}'
1265pdfdir='${docdir}'
1266psdir='${docdir}'
1267libdir='${exec_prefix}/lib'
1268localedir='${datarootdir}/locale'
1269mandir='${datarootdir}/man'
1270
1271ac_prev=
1272ac_dashdash=
1273for ac_option
1274do
1275  # If the previous option needs an argument, assign it.
1276  if test -n "$ac_prev"; then
1277    eval $ac_prev=\$ac_option
1278    ac_prev=
1279    continue
1280  fi
1281
1282  case $ac_option in
1283  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1284  *=)   ac_optarg= ;;
1285  *)    ac_optarg=yes ;;
1286  esac
1287
1288  # Accept the important Cygnus configure options, so we can diagnose typos.
1289
1290  case $ac_dashdash$ac_option in
1291  --)
1292    ac_dashdash=yes ;;
1293
1294  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1295    ac_prev=bindir ;;
1296  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1297    bindir=$ac_optarg ;;
1298
1299  -build | --build | --buil | --bui | --bu)
1300    ac_prev=build_alias ;;
1301  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1302    build_alias=$ac_optarg ;;
1303
1304  -cache-file | --cache-file | --cache-fil | --cache-fi \
1305  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1306    ac_prev=cache_file ;;
1307  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1308  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1309    cache_file=$ac_optarg ;;
1310
1311  --config-cache | -C)
1312    cache_file=config.cache ;;
1313
1314  -datadir | --datadir | --datadi | --datad)
1315    ac_prev=datadir ;;
1316  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1317    datadir=$ac_optarg ;;
1318
1319  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1320  | --dataroo | --dataro | --datar)
1321    ac_prev=datarootdir ;;
1322  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1323  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1324    datarootdir=$ac_optarg ;;
1325
1326  -disable-* | --disable-*)
1327    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1328    # Reject names that are not valid shell variable names.
1329    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1330      as_fn_error $? "invalid feature name: $ac_useropt"
1331    ac_useropt_orig=$ac_useropt
1332    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1333    case $ac_user_opts in
1334      *"
1335"enable_$ac_useropt"
1336"*) ;;
1337      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1338	 ac_unrecognized_sep=', ';;
1339    esac
1340    eval enable_$ac_useropt=no ;;
1341
1342  -docdir | --docdir | --docdi | --doc | --do)
1343    ac_prev=docdir ;;
1344  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1345    docdir=$ac_optarg ;;
1346
1347  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1348    ac_prev=dvidir ;;
1349  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1350    dvidir=$ac_optarg ;;
1351
1352  -enable-* | --enable-*)
1353    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1354    # Reject names that are not valid shell variable names.
1355    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1356      as_fn_error $? "invalid feature name: $ac_useropt"
1357    ac_useropt_orig=$ac_useropt
1358    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1359    case $ac_user_opts in
1360      *"
1361"enable_$ac_useropt"
1362"*) ;;
1363      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1364	 ac_unrecognized_sep=', ';;
1365    esac
1366    eval enable_$ac_useropt=\$ac_optarg ;;
1367
1368  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1369  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1370  | --exec | --exe | --ex)
1371    ac_prev=exec_prefix ;;
1372  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1373  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1374  | --exec=* | --exe=* | --ex=*)
1375    exec_prefix=$ac_optarg ;;
1376
1377  -gas | --gas | --ga | --g)
1378    # Obsolete; use --with-gas.
1379    with_gas=yes ;;
1380
1381  -help | --help | --hel | --he | -h)
1382    ac_init_help=long ;;
1383  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1384    ac_init_help=recursive ;;
1385  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1386    ac_init_help=short ;;
1387
1388  -host | --host | --hos | --ho)
1389    ac_prev=host_alias ;;
1390  -host=* | --host=* | --hos=* | --ho=*)
1391    host_alias=$ac_optarg ;;
1392
1393  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1394    ac_prev=htmldir ;;
1395  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1396  | --ht=*)
1397    htmldir=$ac_optarg ;;
1398
1399  -includedir | --includedir | --includedi | --included | --include \
1400  | --includ | --inclu | --incl | --inc)
1401    ac_prev=includedir ;;
1402  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1403  | --includ=* | --inclu=* | --incl=* | --inc=*)
1404    includedir=$ac_optarg ;;
1405
1406  -infodir | --infodir | --infodi | --infod | --info | --inf)
1407    ac_prev=infodir ;;
1408  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1409    infodir=$ac_optarg ;;
1410
1411  -libdir | --libdir | --libdi | --libd)
1412    ac_prev=libdir ;;
1413  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1414    libdir=$ac_optarg ;;
1415
1416  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1417  | --libexe | --libex | --libe)
1418    ac_prev=libexecdir ;;
1419  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1420  | --libexe=* | --libex=* | --libe=*)
1421    libexecdir=$ac_optarg ;;
1422
1423  -localedir | --localedir | --localedi | --localed | --locale)
1424    ac_prev=localedir ;;
1425  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1426    localedir=$ac_optarg ;;
1427
1428  -localstatedir | --localstatedir | --localstatedi | --localstated \
1429  | --localstate | --localstat | --localsta | --localst | --locals)
1430    ac_prev=localstatedir ;;
1431  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1432  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1433    localstatedir=$ac_optarg ;;
1434
1435  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1436    ac_prev=mandir ;;
1437  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1438    mandir=$ac_optarg ;;
1439
1440  -nfp | --nfp | --nf)
1441    # Obsolete; use --without-fp.
1442    with_fp=no ;;
1443
1444  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1445  | --no-cr | --no-c | -n)
1446    no_create=yes ;;
1447
1448  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1449  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1450    no_recursion=yes ;;
1451
1452  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1453  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1454  | --oldin | --oldi | --old | --ol | --o)
1455    ac_prev=oldincludedir ;;
1456  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1457  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1458  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1459    oldincludedir=$ac_optarg ;;
1460
1461  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1462    ac_prev=prefix ;;
1463  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1464    prefix=$ac_optarg ;;
1465
1466  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1467  | --program-pre | --program-pr | --program-p)
1468    ac_prev=program_prefix ;;
1469  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1470  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1471    program_prefix=$ac_optarg ;;
1472
1473  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1474  | --program-suf | --program-su | --program-s)
1475    ac_prev=program_suffix ;;
1476  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1477  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1478    program_suffix=$ac_optarg ;;
1479
1480  -program-transform-name | --program-transform-name \
1481  | --program-transform-nam | --program-transform-na \
1482  | --program-transform-n | --program-transform- \
1483  | --program-transform | --program-transfor \
1484  | --program-transfo | --program-transf \
1485  | --program-trans | --program-tran \
1486  | --progr-tra | --program-tr | --program-t)
1487    ac_prev=program_transform_name ;;
1488  -program-transform-name=* | --program-transform-name=* \
1489  | --program-transform-nam=* | --program-transform-na=* \
1490  | --program-transform-n=* | --program-transform-=* \
1491  | --program-transform=* | --program-transfor=* \
1492  | --program-transfo=* | --program-transf=* \
1493  | --program-trans=* | --program-tran=* \
1494  | --progr-tra=* | --program-tr=* | --program-t=*)
1495    program_transform_name=$ac_optarg ;;
1496
1497  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1498    ac_prev=pdfdir ;;
1499  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1500    pdfdir=$ac_optarg ;;
1501
1502  -psdir | --psdir | --psdi | --psd | --ps)
1503    ac_prev=psdir ;;
1504  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1505    psdir=$ac_optarg ;;
1506
1507  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1508  | -silent | --silent | --silen | --sile | --sil)
1509    silent=yes ;;
1510
1511  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1512    ac_prev=sbindir ;;
1513  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1514  | --sbi=* | --sb=*)
1515    sbindir=$ac_optarg ;;
1516
1517  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1518  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1519  | --sharedst | --shareds | --shared | --share | --shar \
1520  | --sha | --sh)
1521    ac_prev=sharedstatedir ;;
1522  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1523  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1524  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1525  | --sha=* | --sh=*)
1526    sharedstatedir=$ac_optarg ;;
1527
1528  -site | --site | --sit)
1529    ac_prev=site ;;
1530  -site=* | --site=* | --sit=*)
1531    site=$ac_optarg ;;
1532
1533  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1534    ac_prev=srcdir ;;
1535  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1536    srcdir=$ac_optarg ;;
1537
1538  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1539  | --syscon | --sysco | --sysc | --sys | --sy)
1540    ac_prev=sysconfdir ;;
1541  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1542  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1543    sysconfdir=$ac_optarg ;;
1544
1545  -target | --target | --targe | --targ | --tar | --ta | --t)
1546    ac_prev=target_alias ;;
1547  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1548    target_alias=$ac_optarg ;;
1549
1550  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1551    verbose=yes ;;
1552
1553  -version | --version | --versio | --versi | --vers | -V)
1554    ac_init_version=: ;;
1555
1556  -with-* | --with-*)
1557    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1558    # Reject names that are not valid shell variable names.
1559    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1560      as_fn_error $? "invalid package name: $ac_useropt"
1561    ac_useropt_orig=$ac_useropt
1562    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1563    case $ac_user_opts in
1564      *"
1565"with_$ac_useropt"
1566"*) ;;
1567      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1568	 ac_unrecognized_sep=', ';;
1569    esac
1570    eval with_$ac_useropt=\$ac_optarg ;;
1571
1572  -without-* | --without-*)
1573    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1574    # Reject names that are not valid shell variable names.
1575    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1576      as_fn_error $? "invalid package name: $ac_useropt"
1577    ac_useropt_orig=$ac_useropt
1578    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1579    case $ac_user_opts in
1580      *"
1581"with_$ac_useropt"
1582"*) ;;
1583      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1584	 ac_unrecognized_sep=', ';;
1585    esac
1586    eval with_$ac_useropt=no ;;
1587
1588  --x)
1589    # Obsolete; use --with-x.
1590    with_x=yes ;;
1591
1592  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1593  | --x-incl | --x-inc | --x-in | --x-i)
1594    ac_prev=x_includes ;;
1595  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1596  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1597    x_includes=$ac_optarg ;;
1598
1599  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1600  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1601    ac_prev=x_libraries ;;
1602  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1603  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1604    x_libraries=$ac_optarg ;;
1605
1606  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1607Try \`$0 --help' for more information"
1608    ;;
1609
1610  *=*)
1611    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1612    # Reject names that are not valid shell variable names.
1613    case $ac_envvar in #(
1614      '' | [0-9]* | *[!_$as_cr_alnum]* )
1615      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1616    esac
1617    eval $ac_envvar=\$ac_optarg
1618    export $ac_envvar ;;
1619
1620  *)
1621    # FIXME: should be removed in autoconf 3.0.
1622    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1623    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1624      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1625    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1626    ;;
1627
1628  esac
1629done
1630
1631if test -n "$ac_prev"; then
1632  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1633  as_fn_error $? "missing argument to $ac_option"
1634fi
1635
1636if test -n "$ac_unrecognized_opts"; then
1637  case $enable_option_checking in
1638    no) ;;
1639    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1640    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1641  esac
1642fi
1643
1644# Check all directory arguments for consistency.
1645for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1646		datadir sysconfdir sharedstatedir localstatedir includedir \
1647		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1648		libdir localedir mandir
1649do
1650  eval ac_val=\$$ac_var
1651  # Remove trailing slashes.
1652  case $ac_val in
1653    */ )
1654      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1655      eval $ac_var=\$ac_val;;
1656  esac
1657  # Be sure to have absolute directory names.
1658  case $ac_val in
1659    [\\/$]* | ?:[\\/]* )  continue;;
1660    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1661  esac
1662  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1663done
1664
1665# There might be people who depend on the old broken behavior: `$host'
1666# used to hold the argument of --host etc.
1667# FIXME: To remove some day.
1668build=$build_alias
1669host=$host_alias
1670target=$target_alias
1671
1672# FIXME: To remove some day.
1673if test "x$host_alias" != x; then
1674  if test "x$build_alias" = x; then
1675    cross_compiling=maybe
1676  elif test "x$build_alias" != "x$host_alias"; then
1677    cross_compiling=yes
1678  fi
1679fi
1680
1681ac_tool_prefix=
1682test -n "$host_alias" && ac_tool_prefix=$host_alias-
1683
1684test "$silent" = yes && exec 6>/dev/null
1685
1686
1687ac_pwd=`pwd` && test -n "$ac_pwd" &&
1688ac_ls_di=`ls -di .` &&
1689ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1690  as_fn_error $? "working directory cannot be determined"
1691test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1692  as_fn_error $? "pwd does not report name of working directory"
1693
1694
1695# Find the source files, if location was not specified.
1696if test -z "$srcdir"; then
1697  ac_srcdir_defaulted=yes
1698  # Try the directory containing this script, then the parent directory.
1699  ac_confdir=`$as_dirname -- "$as_myself" ||
1700$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1701	 X"$as_myself" : 'X\(//\)[^/]' \| \
1702	 X"$as_myself" : 'X\(//\)$' \| \
1703	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1704$as_echo X"$as_myself" |
1705    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1706	    s//\1/
1707	    q
1708	  }
1709	  /^X\(\/\/\)[^/].*/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\/\)$/{
1714	    s//\1/
1715	    q
1716	  }
1717	  /^X\(\/\).*/{
1718	    s//\1/
1719	    q
1720	  }
1721	  s/.*/./; q'`
1722  srcdir=$ac_confdir
1723  if test ! -r "$srcdir/$ac_unique_file"; then
1724    srcdir=..
1725  fi
1726else
1727  ac_srcdir_defaulted=no
1728fi
1729if test ! -r "$srcdir/$ac_unique_file"; then
1730  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1731  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1732fi
1733ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1734ac_abs_confdir=`(
1735	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1736	pwd)`
1737# When building in place, set srcdir=.
1738if test "$ac_abs_confdir" = "$ac_pwd"; then
1739  srcdir=.
1740fi
1741# Remove unnecessary trailing slashes from srcdir.
1742# Double slashes in file names in object file debugging info
1743# mess up M-x gdb in Emacs.
1744case $srcdir in
1745*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1746esac
1747for ac_var in $ac_precious_vars; do
1748  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1749  eval ac_env_${ac_var}_value=\$${ac_var}
1750  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1752done
1753
1754#
1755# Report the --help message.
1756#
1757if test "$ac_init_help" = "long"; then
1758  # Omit some internal or obsolete options to make the list less imposing.
1759  # This message is too long to be a string in the A/UX 3.1 sh.
1760  cat <<_ACEOF
1761\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1762
1763Usage: $0 [OPTION]... [VAR=VALUE]...
1764
1765To assign environment variables (e.g., CC, CFLAGS...), specify them as
1766VAR=VALUE.  See below for descriptions of some of the useful variables.
1767
1768Defaults for the options are specified in brackets.
1769
1770Configuration:
1771  -h, --help              display this help and exit
1772      --help=short        display options specific to this package
1773      --help=recursive    display the short help of all the included packages
1774  -V, --version           display version information and exit
1775  -q, --quiet, --silent   do not print \`checking ...' messages
1776      --cache-file=FILE   cache test results in FILE [disabled]
1777  -C, --config-cache      alias for \`--cache-file=config.cache'
1778  -n, --no-create         do not create output files
1779      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1780
1781Installation directories:
1782  --prefix=PREFIX         install architecture-independent files in PREFIX
1783                          [$ac_default_prefix]
1784  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1785                          [PREFIX]
1786
1787By default, \`make install' will install all the files in
1788\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1789an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1790for instance \`--prefix=\$HOME'.
1791
1792For better control, use the options below.
1793
1794Fine tuning of the installation directories:
1795  --bindir=DIR            user executables [EPREFIX/bin]
1796  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1797  --libexecdir=DIR        program executables [EPREFIX/libexec]
1798  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1799  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1800  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1801  --libdir=DIR            object code libraries [EPREFIX/lib]
1802  --includedir=DIR        C header files [PREFIX/include]
1803  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1804  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1805  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1806  --infodir=DIR           info documentation [DATAROOTDIR/info]
1807  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1808  --mandir=DIR            man documentation [DATAROOTDIR/man]
1809  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1810  --htmldir=DIR           html documentation [DOCDIR]
1811  --dvidir=DIR            dvi documentation [DOCDIR]
1812  --pdfdir=DIR            pdf documentation [DOCDIR]
1813  --psdir=DIR             ps documentation [DOCDIR]
1814_ACEOF
1815
1816  cat <<\_ACEOF
1817
1818X features:
1819  --x-includes=DIR    X include files are in DIR
1820  --x-libraries=DIR   X library files are in DIR
1821
1822System types:
1823  --build=BUILD     configure for building on BUILD [guessed]
1824  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1825  --target=TARGET   configure for building compilers for TARGET [HOST]
1826_ACEOF
1827fi
1828
1829if test -n "$ac_init_help"; then
1830  case $ac_init_help in
1831     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1832   esac
1833  cat <<\_ACEOF
1834
1835Optional Features:
1836  --disable-option-checking  ignore unrecognized --enable/--with options
1837  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1838  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1839  --enable-openjdk-only   suppress building custom source even if present
1840                          [disabled]
1841  --enable-debug          set the debug level to fastdebug (shorthand for
1842                          --with-debug-level=fastdebug) [disabled]
1843  --disable-headful       disable building headful support (graphical UI
1844                          support) [enabled]
1845  --enable-hotspot-test-in-build
1846                          run the Queens test after Hotspot build [disabled]
1847  --enable-unlimited-crypto
1848                          Enable unlimited crypto policy [disabled]
1849  --enable-rmiconnector-iiop
1850                          enable the JMX RMIConnector iiop transport
1851                          [disabled]
1852  --disable-debug-symbols disable generation of debug symbols [enabled]
1853  --disable-zip-debug-info
1854                          disable zipping of debug-info files [enabled]
1855  --disable-freetype-bundling
1856                          disable bundling of the freetype library with the
1857                          build result [enabled on Windows or when using
1858                          --with-freetype, disabled otherwise]
1859  --enable-sjavac         use sjavac to do fast incremental compiles
1860                          [disabled]
1861  --disable-precompiled-headers
1862                          disable using precompiled headers when compiling C++
1863                          [enabled]
1864  --enable-ccache         enable using ccache to speed up recompilations
1865                          [disabled]
1866
1867Optional Packages:
1868  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1869  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1870  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1871                          support it), e.g. --with-target-bits=32 [guessed]
1872  --with-custom-make-dir  Deprecated. Option is kept for backwards
1873                          compatibility and is ignored
1874  --with-jdk-variant      JDK variant to build (normal) [normal]
1875  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1876  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1877                          client, minimal1, kernel, zero, zeroshark, core)
1878                          [server]
1879  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1880                          optimized (HotSpot build only)) [release]
1881  --with-devkit           use this devkit for compilers, tools and resources
1882  --with-sys-root         alias for --with-sysroot for backwards compatability
1883  --with-sysroot          use this directory as sysroot
1884  --with-tools-dir        alias for --with-toolchain-path for backwards
1885                          compatibility
1886  --with-toolchain-path   prepend these directories when searching for
1887                          toolchain binaries (compilers etc)
1888  --with-extra-path       prepend these directories to the default path
1889  --with-sdk-name         use the platform SDK of the given name. [macosx]
1890  --with-conf-name        use this as the name of the configuration [generated
1891                          from important configuration options]
1892  --with-output-sync      set make output sync type if supported by make.
1893                          [recurse]
1894  --with-builddeps-conf   use this configuration file for the builddeps
1895  --with-builddeps-server download and use build dependencies from this server
1896                          url
1897  --with-builddeps-dir    store downloaded build dependencies here
1898                          [/localhome/builddeps]
1899  --with-builddeps-group  chgrp the downloaded build dependencies to this
1900                          group
1901  --with-cacerts-file     specify alternative cacerts file
1902  --with-milestone        Set milestone value for build [internal]
1903  --with-update-version   Set update version value for build [b00]
1904  --with-user-release-suffix
1905                          Add a custom string to the version string if build
1906                          number is not set.[username_builddateb00]
1907  --with-build-number     Set build number value for build [b00]
1908  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1909  --with-add-source-root  for each and every source directory, look in this
1910                          additional source root for the same directory; if it
1911                          exists and have files in it, include it in the build
1912  --with-override-source-root
1913                          for each and every source directory, look in this
1914                          override source root for the same directory; if it
1915                          exists, use that directory instead and ignore the
1916                          directory in the original source root
1917  --with-adds-and-overrides
1918                          use the subdirs 'adds' and 'overrides' in the
1919                          specified directory as add-source-root and
1920                          override-source-root
1921  --with-override-langtools
1922                          use this langtools dir for the build
1923  --with-override-corba   use this corba dir for the build
1924  --with-override-jaxp    use this jaxp dir for the build
1925  --with-override-jaxws   use this jaxws dir for the build
1926  --with-override-hotspot use this hotspot dir for the build
1927  --with-override-nashorn use this nashorn dir for the build
1928  --with-override-jdk     use this jdk dir for the build
1929  --with-import-hotspot   import hotspot binaries from this jdk image or
1930                          hotspot build dist dir instead of building from
1931                          source
1932  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1933                          to show possible values [platform dependent]
1934  --with-jtreg            Regression Test Harness [probed]
1935  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1936  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1937  --with-extra-ldflags    extra flags to be used when linking jdk
1938  --with-x                use the X Window System
1939  --with-cups             specify prefix directory for the cups package
1940                          (expecting the headers under PATH/include)
1941  --with-cups-include     specify directory for the cups include files
1942  --with-freetype         specify prefix directory for the freetype package
1943                          (expecting the libraries under PATH/lib and the
1944                          headers under PATH/include)
1945  --with-freetype-include specify directory for the freetype include files
1946  --with-freetype-lib     specify directory for the freetype library
1947  --with-freetype-src     specify directory with freetype sources to
1948                          automatically build the library (experimental,
1949                          Windows-only)
1950  --with-alsa             specify prefix directory for the alsa package
1951                          (expecting the libraries under PATH/lib and the
1952                          headers under PATH/include)
1953  --with-alsa-include     specify directory for the alsa include files
1954  --with-alsa-lib         specify directory for the alsa library
1955  --with-libjpeg          use libjpeg from build system or OpenJDK source
1956                          (system, bundled) [bundled]
1957  --with-giflib           use giflib from build system or OpenJDK source
1958                          (system, bundled) [bundled]
1959  --with-lcms             use lcms2 from build system or OpenJDK source
1960                          (system, bundled) [bundled]
1961  --with-libpng           use libpng from build system or OpenJDK source
1962                          (system, bundled) [bundled]
1963  --with-zlib             use zlib from build system or OpenJDK source
1964                          (system, bundled) [bundled]
1965  --with-stdc++lib=<static>,<dynamic>,<default>
1966                          force linking of the C++ runtime on Linux to either
1967                          static or dynamic, default is static with dynamic as
1968                          fallback
1969  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1970                          only) [probed]
1971  --with-dxsdk            Deprecated. Option is kept for backwards
1972                          compatibility and is ignored
1973  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --with-dxsdk-include    Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-num-cores        number of cores in the build system, e.g.
1978                          --with-num-cores=8 [probed]
1979  --with-memory-size      memory (in MB) available in the build system, e.g.
1980                          --with-memory-size=1024 [probed]
1981  --with-jobs             number of parallel jobs to let make run [calculated
1982                          based on cores and memory]
1983  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1984                          invocations of boot JDK, overriding the default
1985                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1986                          -enableassertions"
1987  --with-sjavac-server-java
1988                          use this java binary for running the sjavac
1989                          background server [Boot JDK java]
1990  --with-ccache-dir       where to store ccache files [~/.ccache]
1991
1992Some influential environment variables:
1993  BASENAME    Override default value for BASENAME
1994  BASH        Override default value for BASH
1995  CAT         Override default value for CAT
1996  CHMOD       Override default value for CHMOD
1997  CMP         Override default value for CMP
1998  COMM        Override default value for COMM
1999  CP          Override default value for CP
2000  CUT         Override default value for CUT
2001  DATE        Override default value for DATE
2002  DIFF        Override default value for DIFF
2003  DIRNAME     Override default value for DIRNAME
2004  ECHO        Override default value for ECHO
2005  EXPR        Override default value for EXPR
2006  FILE        Override default value for FILE
2007  FIND        Override default value for FIND
2008  HEAD        Override default value for HEAD
2009  LN          Override default value for LN
2010  LS          Override default value for LS
2011  MKDIR       Override default value for MKDIR
2012  MKTEMP      Override default value for MKTEMP
2013  MV          Override default value for MV
2014  NAWK        Override default value for NAWK
2015  PRINTF      Override default value for PRINTF
2016  RM          Override default value for RM
2017  SH          Override default value for SH
2018  SORT        Override default value for SORT
2019  TAIL        Override default value for TAIL
2020  TAR         Override default value for TAR
2021  TEE         Override default value for TEE
2022  TOUCH       Override default value for TOUCH
2023  TR          Override default value for TR
2024  UNAME       Override default value for UNAME
2025  UNIQ        Override default value for UNIQ
2026  WC          Override default value for WC
2027  WHICH       Override default value for WHICH
2028  XARGS       Override default value for XARGS
2029  AWK         Override default value for AWK
2030  GREP        Override default value for GREP
2031  EGREP       Override default value for EGREP
2032  FGREP       Override default value for FGREP
2033  SED         Override default value for SED
2034  CYGPATH     Override default value for CYGPATH
2035  READLINK    Override default value for READLINK
2036  DF          Override default value for DF
2037  SETFILE     Override default value for SETFILE
2038  CPIO        Override default value for CPIO
2039  UNZIP       Override default value for UNZIP
2040  ZIP         Override default value for ZIP
2041  LDD         Override default value for LDD
2042  OTOOL       Override default value for OTOOL
2043  READELF     Override default value for READELF
2044  HG          Override default value for HG
2045  STAT        Override default value for STAT
2046  TIME        Override default value for TIME
2047  DSYMUTIL    Override default value for DSYMUTIL
2048  XATTR       Override default value for XATTR
2049  CODESIGN    Override default value for CODESIGN
2050  PKG_CONFIG  path to pkg-config utility
2051  JAVA        Override default value for JAVA
2052  JAVAC       Override default value for JAVAC
2053  JAVAH       Override default value for JAVAH
2054  JAR         Override default value for JAR
2055  NATIVE2ASCII
2056              Override default value for NATIVE2ASCII
2057  JARSIGNER   Override default value for JARSIGNER
2058  CC          C compiler command
2059  CFLAGS      C compiler flags
2060  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2061              nonstandard directory <lib dir>
2062  LIBS        libraries to pass to the linker, e.g. -l<library>
2063  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2064              you have headers in a nonstandard directory <include dir>
2065  CXX         C++ compiler command
2066  CXXFLAGS    C++ compiler flags
2067  CPP         C preprocessor
2068  CXXCPP      C++ preprocessor
2069  AS          Override default value for AS
2070  AR          Override default value for AR
2071  OBJC        Objective C compiler command
2072  OBJCFLAGS   Objective C compiler flags
2073  LIPO        Override default value for LIPO
2074  STRIP       Override default value for STRIP
2075  NM          Override default value for NM
2076  GNM         Override default value for GNM
2077  MCS         Override default value for MCS
2078  OBJCOPY     Override default value for OBJCOPY
2079  OBJDUMP     Override default value for OBJDUMP
2080  BUILD_CC    Override default value for BUILD_CC
2081  BUILD_CXX   Override default value for BUILD_CXX
2082  BUILD_LD    Override default value for BUILD_LD
2083  JTREGEXE    Override default value for JTREGEXE
2084  XMKMF       Path to xmkmf, Makefile generator for X Window System
2085  FREETYPE_CFLAGS
2086              C compiler flags for FREETYPE, overriding pkg-config
2087  FREETYPE_LIBS
2088              linker flags for FREETYPE, overriding pkg-config
2089  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2090  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2091  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2092  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2093  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2094  PNG_LIBS    linker flags for PNG, overriding pkg-config
2095  LIBFFI_CFLAGS
2096              C compiler flags for LIBFFI, overriding pkg-config
2097  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2098  CCACHE      Override default value for CCACHE
2099
2100Use these variables to override the choices made by `configure' or to help
2101it to find libraries and programs with nonstandard names/locations.
2102
2103Report bugs to <build-dev@openjdk.java.net>.
2104OpenJDK home page: <http://openjdk.java.net>.
2105_ACEOF
2106ac_status=$?
2107fi
2108
2109if test "$ac_init_help" = "recursive"; then
2110  # If there are subdirs, report their specific --help.
2111  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2112    test -d "$ac_dir" ||
2113      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2114      continue
2115    ac_builddir=.
2116
2117case "$ac_dir" in
2118.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2119*)
2120  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2121  # A ".." for each directory in $ac_dir_suffix.
2122  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2123  case $ac_top_builddir_sub in
2124  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2125  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2126  esac ;;
2127esac
2128ac_abs_top_builddir=$ac_pwd
2129ac_abs_builddir=$ac_pwd$ac_dir_suffix
2130# for backward compatibility:
2131ac_top_builddir=$ac_top_build_prefix
2132
2133case $srcdir in
2134  .)  # We are building in place.
2135    ac_srcdir=.
2136    ac_top_srcdir=$ac_top_builddir_sub
2137    ac_abs_top_srcdir=$ac_pwd ;;
2138  [\\/]* | ?:[\\/]* )  # Absolute name.
2139    ac_srcdir=$srcdir$ac_dir_suffix;
2140    ac_top_srcdir=$srcdir
2141    ac_abs_top_srcdir=$srcdir ;;
2142  *) # Relative name.
2143    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2144    ac_top_srcdir=$ac_top_build_prefix$srcdir
2145    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2146esac
2147ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2148
2149    cd "$ac_dir" || { ac_status=$?; continue; }
2150    # Check for guested configure.
2151    if test -f "$ac_srcdir/configure.gnu"; then
2152      echo &&
2153      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2154    elif test -f "$ac_srcdir/configure"; then
2155      echo &&
2156      $SHELL "$ac_srcdir/configure" --help=recursive
2157    else
2158      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2159    fi || ac_status=$?
2160    cd "$ac_pwd" || { ac_status=$?; break; }
2161  done
2162fi
2163
2164test -n "$ac_init_help" && exit $ac_status
2165if $ac_init_version; then
2166  cat <<\_ACEOF
2167OpenJDK configure jdk9
2168generated by GNU Autoconf 2.69
2169
2170Copyright (C) 2012 Free Software Foundation, Inc.
2171This configure script is free software; the Free Software Foundation
2172gives unlimited permission to copy, distribute and modify it.
2173_ACEOF
2174  exit
2175fi
2176
2177## ------------------------ ##
2178## Autoconf initialization. ##
2179## ------------------------ ##
2180
2181# ac_fn_c_try_compile LINENO
2182# --------------------------
2183# Try to compile conftest.$ac_ext, and return whether this succeeded.
2184ac_fn_c_try_compile ()
2185{
2186  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187  rm -f conftest.$ac_objext
2188  if { { ac_try="$ac_compile"
2189case "(($ac_try" in
2190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2191  *) ac_try_echo=$ac_try;;
2192esac
2193eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2194$as_echo "$ac_try_echo"; } >&5
2195  (eval "$ac_compile") 2>conftest.err
2196  ac_status=$?
2197  if test -s conftest.err; then
2198    grep -v '^ *+' conftest.err >conftest.er1
2199    cat conftest.er1 >&5
2200    mv -f conftest.er1 conftest.err
2201  fi
2202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203  test $ac_status = 0; } && {
2204	 test -z "$ac_c_werror_flag" ||
2205	 test ! -s conftest.err
2206       } && test -s conftest.$ac_objext; then :
2207  ac_retval=0
2208else
2209  $as_echo "$as_me: failed program was:" >&5
2210sed 's/^/| /' conftest.$ac_ext >&5
2211
2212	ac_retval=1
2213fi
2214  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215  as_fn_set_status $ac_retval
2216
2217} # ac_fn_c_try_compile
2218
2219# ac_fn_cxx_try_compile LINENO
2220# ----------------------------
2221# Try to compile conftest.$ac_ext, and return whether this succeeded.
2222ac_fn_cxx_try_compile ()
2223{
2224  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225  rm -f conftest.$ac_objext
2226  if { { ac_try="$ac_compile"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_compile") 2>conftest.err
2234  ac_status=$?
2235  if test -s conftest.err; then
2236    grep -v '^ *+' conftest.err >conftest.er1
2237    cat conftest.er1 >&5
2238    mv -f conftest.er1 conftest.err
2239  fi
2240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2241  test $ac_status = 0; } && {
2242	 test -z "$ac_cxx_werror_flag" ||
2243	 test ! -s conftest.err
2244       } && test -s conftest.$ac_objext; then :
2245  ac_retval=0
2246else
2247  $as_echo "$as_me: failed program was:" >&5
2248sed 's/^/| /' conftest.$ac_ext >&5
2249
2250	ac_retval=1
2251fi
2252  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2253  as_fn_set_status $ac_retval
2254
2255} # ac_fn_cxx_try_compile
2256
2257# ac_fn_c_try_cpp LINENO
2258# ----------------------
2259# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2260ac_fn_c_try_cpp ()
2261{
2262  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2263  if { { ac_try="$ac_cpp conftest.$ac_ext"
2264case "(($ac_try" in
2265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2266  *) ac_try_echo=$ac_try;;
2267esac
2268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2269$as_echo "$ac_try_echo"; } >&5
2270  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2271  ac_status=$?
2272  if test -s conftest.err; then
2273    grep -v '^ *+' conftest.err >conftest.er1
2274    cat conftest.er1 >&5
2275    mv -f conftest.er1 conftest.err
2276  fi
2277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2278  test $ac_status = 0; } > conftest.i && {
2279	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2280	 test ! -s conftest.err
2281       }; then :
2282  ac_retval=0
2283else
2284  $as_echo "$as_me: failed program was:" >&5
2285sed 's/^/| /' conftest.$ac_ext >&5
2286
2287    ac_retval=1
2288fi
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290  as_fn_set_status $ac_retval
2291
2292} # ac_fn_c_try_cpp
2293
2294# ac_fn_cxx_try_cpp LINENO
2295# ------------------------
2296# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2297ac_fn_cxx_try_cpp ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if { { ac_try="$ac_cpp conftest.$ac_ext"
2301case "(($ac_try" in
2302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303  *) ac_try_echo=$ac_try;;
2304esac
2305eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306$as_echo "$ac_try_echo"; } >&5
2307  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2308  ac_status=$?
2309  if test -s conftest.err; then
2310    grep -v '^ *+' conftest.err >conftest.er1
2311    cat conftest.er1 >&5
2312    mv -f conftest.er1 conftest.err
2313  fi
2314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315  test $ac_status = 0; } > conftest.i && {
2316	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2317	 test ! -s conftest.err
2318       }; then :
2319  ac_retval=0
2320else
2321  $as_echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324    ac_retval=1
2325fi
2326  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327  as_fn_set_status $ac_retval
2328
2329} # ac_fn_cxx_try_cpp
2330
2331# ac_fn_objc_try_compile LINENO
2332# -----------------------------
2333# Try to compile conftest.$ac_ext, and return whether this succeeded.
2334ac_fn_objc_try_compile ()
2335{
2336  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337  rm -f conftest.$ac_objext
2338  if { { ac_try="$ac_compile"
2339case "(($ac_try" in
2340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341  *) ac_try_echo=$ac_try;;
2342esac
2343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344$as_echo "$ac_try_echo"; } >&5
2345  (eval "$ac_compile") 2>conftest.err
2346  ac_status=$?
2347  if test -s conftest.err; then
2348    grep -v '^ *+' conftest.err >conftest.er1
2349    cat conftest.er1 >&5
2350    mv -f conftest.er1 conftest.err
2351  fi
2352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2353  test $ac_status = 0; } && {
2354	 test -z "$ac_objc_werror_flag" ||
2355	 test ! -s conftest.err
2356       } && test -s conftest.$ac_objext; then :
2357  ac_retval=0
2358else
2359  $as_echo "$as_me: failed program was:" >&5
2360sed 's/^/| /' conftest.$ac_ext >&5
2361
2362	ac_retval=1
2363fi
2364  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365  as_fn_set_status $ac_retval
2366
2367} # ac_fn_objc_try_compile
2368
2369# ac_fn_c_try_link LINENO
2370# -----------------------
2371# Try to link conftest.$ac_ext, and return whether this succeeded.
2372ac_fn_c_try_link ()
2373{
2374  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375  rm -f conftest.$ac_objext conftest$ac_exeext
2376  if { { ac_try="$ac_link"
2377case "(($ac_try" in
2378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2379  *) ac_try_echo=$ac_try;;
2380esac
2381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2382$as_echo "$ac_try_echo"; } >&5
2383  (eval "$ac_link") 2>conftest.err
2384  ac_status=$?
2385  if test -s conftest.err; then
2386    grep -v '^ *+' conftest.err >conftest.er1
2387    cat conftest.er1 >&5
2388    mv -f conftest.er1 conftest.err
2389  fi
2390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2391  test $ac_status = 0; } && {
2392	 test -z "$ac_c_werror_flag" ||
2393	 test ! -s conftest.err
2394       } && test -s conftest$ac_exeext && {
2395	 test "$cross_compiling" = yes ||
2396	 test -x conftest$ac_exeext
2397       }; then :
2398  ac_retval=0
2399else
2400  $as_echo "$as_me: failed program was:" >&5
2401sed 's/^/| /' conftest.$ac_ext >&5
2402
2403	ac_retval=1
2404fi
2405  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2406  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2407  # interfere with the next link command; also delete a directory that is
2408  # left behind by Apple's compiler.  We do this before executing the actions.
2409  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2410  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2411  as_fn_set_status $ac_retval
2412
2413} # ac_fn_c_try_link
2414
2415# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2416# ---------------------------------------------------------
2417# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2418# the include files in INCLUDES and setting the cache variable VAR
2419# accordingly.
2420ac_fn_cxx_check_header_mongrel ()
2421{
2422  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423  if eval \${$3+:} false; then :
2424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2425$as_echo_n "checking for $2... " >&6; }
2426if eval \${$3+:} false; then :
2427  $as_echo_n "(cached) " >&6
2428fi
2429eval ac_res=\$$3
2430	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
2432else
2433  # Is the header compilable?
2434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2435$as_echo_n "checking $2 usability... " >&6; }
2436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437/* end confdefs.h.  */
2438$4
2439#include <$2>
2440_ACEOF
2441if ac_fn_cxx_try_compile "$LINENO"; then :
2442  ac_header_compiler=yes
2443else
2444  ac_header_compiler=no
2445fi
2446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2448$as_echo "$ac_header_compiler" >&6; }
2449
2450# Is the header present?
2451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2452$as_echo_n "checking $2 presence... " >&6; }
2453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455#include <$2>
2456_ACEOF
2457if ac_fn_cxx_try_cpp "$LINENO"; then :
2458  ac_header_preproc=yes
2459else
2460  ac_header_preproc=no
2461fi
2462rm -f conftest.err conftest.i conftest.$ac_ext
2463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2464$as_echo "$ac_header_preproc" >&6; }
2465
2466# So?  What about this header?
2467case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2468  yes:no: )
2469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2470$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2472$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2473    ;;
2474  no:yes:* )
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2476$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2478$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2480$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2482$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2484$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2485( $as_echo "## ----------------------------------------- ##
2486## Report this to build-dev@openjdk.java.net ##
2487## ----------------------------------------- ##"
2488     ) | sed "s/^/$as_me: WARNING:     /" >&2
2489    ;;
2490esac
2491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2492$as_echo_n "checking for $2... " >&6; }
2493if eval \${$3+:} false; then :
2494  $as_echo_n "(cached) " >&6
2495else
2496  eval "$3=\$ac_header_compiler"
2497fi
2498eval ac_res=\$$3
2499	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2500$as_echo "$ac_res" >&6; }
2501fi
2502  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503
2504} # ac_fn_cxx_check_header_mongrel
2505
2506# ac_fn_cxx_try_run LINENO
2507# ------------------------
2508# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2509# that executables *can* be run.
2510ac_fn_cxx_try_run ()
2511{
2512  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513  if { { ac_try="$ac_link"
2514case "(($ac_try" in
2515  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2516  *) ac_try_echo=$ac_try;;
2517esac
2518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2519$as_echo "$ac_try_echo"; } >&5
2520  (eval "$ac_link") 2>&5
2521  ac_status=$?
2522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2524  { { case "(($ac_try" in
2525  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2526  *) ac_try_echo=$ac_try;;
2527esac
2528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2529$as_echo "$ac_try_echo"; } >&5
2530  (eval "$ac_try") 2>&5
2531  ac_status=$?
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; }; }; then :
2534  ac_retval=0
2535else
2536  $as_echo "$as_me: program exited with status $ac_status" >&5
2537       $as_echo "$as_me: failed program was:" >&5
2538sed 's/^/| /' conftest.$ac_ext >&5
2539
2540       ac_retval=$ac_status
2541fi
2542  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2543  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2544  as_fn_set_status $ac_retval
2545
2546} # ac_fn_cxx_try_run
2547
2548# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2549# ---------------------------------------------------------
2550# Tests whether HEADER exists and can be compiled using the include files in
2551# INCLUDES, setting the cache variable VAR accordingly.
2552ac_fn_cxx_check_header_compile ()
2553{
2554  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2556$as_echo_n "checking for $2... " >&6; }
2557if eval \${$3+:} false; then :
2558  $as_echo_n "(cached) " >&6
2559else
2560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561/* end confdefs.h.  */
2562$4
2563#include <$2>
2564_ACEOF
2565if ac_fn_cxx_try_compile "$LINENO"; then :
2566  eval "$3=yes"
2567else
2568  eval "$3=no"
2569fi
2570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2571fi
2572eval ac_res=\$$3
2573	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2574$as_echo "$ac_res" >&6; }
2575  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576
2577} # ac_fn_cxx_check_header_compile
2578
2579# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2580# ----------------------------------------------
2581# Tries to find the compile-time value of EXPR in a program that includes
2582# INCLUDES, setting VAR accordingly. Returns whether the value could be
2583# computed
2584ac_fn_cxx_compute_int ()
2585{
2586  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587  if test "$cross_compiling" = yes; then
2588    # Depending upon the size, compute the lo and hi bounds.
2589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590/* end confdefs.h.  */
2591$4
2592int
2593main ()
2594{
2595static int test_array [1 - 2 * !(($2) >= 0)];
2596test_array [0] = 0;
2597return test_array [0];
2598
2599  ;
2600  return 0;
2601}
2602_ACEOF
2603if ac_fn_cxx_try_compile "$LINENO"; then :
2604  ac_lo=0 ac_mid=0
2605  while :; do
2606    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609int
2610main ()
2611{
2612static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2613test_array [0] = 0;
2614return test_array [0];
2615
2616  ;
2617  return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_compile "$LINENO"; then :
2621  ac_hi=$ac_mid; break
2622else
2623  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2624			if test $ac_lo -le $ac_mid; then
2625			  ac_lo= ac_hi=
2626			  break
2627			fi
2628			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2629fi
2630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2631  done
2632else
2633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634/* end confdefs.h.  */
2635$4
2636int
2637main ()
2638{
2639static int test_array [1 - 2 * !(($2) < 0)];
2640test_array [0] = 0;
2641return test_array [0];
2642
2643  ;
2644  return 0;
2645}
2646_ACEOF
2647if ac_fn_cxx_try_compile "$LINENO"; then :
2648  ac_hi=-1 ac_mid=-1
2649  while :; do
2650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651/* end confdefs.h.  */
2652$4
2653int
2654main ()
2655{
2656static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2657test_array [0] = 0;
2658return test_array [0];
2659
2660  ;
2661  return 0;
2662}
2663_ACEOF
2664if ac_fn_cxx_try_compile "$LINENO"; then :
2665  ac_lo=$ac_mid; break
2666else
2667  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2668			if test $ac_mid -le $ac_hi; then
2669			  ac_lo= ac_hi=
2670			  break
2671			fi
2672			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675  done
2676else
2677  ac_lo= ac_hi=
2678fi
2679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680fi
2681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682# Binary search between lo and hi bounds.
2683while test "x$ac_lo" != "x$ac_hi"; do
2684  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688int
2689main ()
2690{
2691static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2692test_array [0] = 0;
2693return test_array [0];
2694
2695  ;
2696  return 0;
2697}
2698_ACEOF
2699if ac_fn_cxx_try_compile "$LINENO"; then :
2700  ac_hi=$ac_mid
2701else
2702  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2703fi
2704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2705done
2706case $ac_lo in #((
2707?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2708'') ac_retval=1 ;;
2709esac
2710  else
2711    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712/* end confdefs.h.  */
2713$4
2714static long int longval () { return $2; }
2715static unsigned long int ulongval () { return $2; }
2716#include <stdio.h>
2717#include <stdlib.h>
2718int
2719main ()
2720{
2721
2722  FILE *f = fopen ("conftest.val", "w");
2723  if (! f)
2724    return 1;
2725  if (($2) < 0)
2726    {
2727      long int i = longval ();
2728      if (i != ($2))
2729	return 1;
2730      fprintf (f, "%ld", i);
2731    }
2732  else
2733    {
2734      unsigned long int i = ulongval ();
2735      if (i != ($2))
2736	return 1;
2737      fprintf (f, "%lu", i);
2738    }
2739  /* Do not output a trailing newline, as this causes \r\n confusion
2740     on some platforms.  */
2741  return ferror (f) || fclose (f) != 0;
2742
2743  ;
2744  return 0;
2745}
2746_ACEOF
2747if ac_fn_cxx_try_run "$LINENO"; then :
2748  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2749else
2750  ac_retval=1
2751fi
2752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2753  conftest.$ac_objext conftest.beam conftest.$ac_ext
2754rm -f conftest.val
2755
2756  fi
2757  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2758  as_fn_set_status $ac_retval
2759
2760} # ac_fn_cxx_compute_int
2761
2762# ac_fn_cxx_try_link LINENO
2763# -------------------------
2764# Try to link conftest.$ac_ext, and return whether this succeeded.
2765ac_fn_cxx_try_link ()
2766{
2767  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2768  rm -f conftest.$ac_objext conftest$ac_exeext
2769  if { { ac_try="$ac_link"
2770case "(($ac_try" in
2771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772  *) ac_try_echo=$ac_try;;
2773esac
2774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2775$as_echo "$ac_try_echo"; } >&5
2776  (eval "$ac_link") 2>conftest.err
2777  ac_status=$?
2778  if test -s conftest.err; then
2779    grep -v '^ *+' conftest.err >conftest.er1
2780    cat conftest.er1 >&5
2781    mv -f conftest.er1 conftest.err
2782  fi
2783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2784  test $ac_status = 0; } && {
2785	 test -z "$ac_cxx_werror_flag" ||
2786	 test ! -s conftest.err
2787       } && test -s conftest$ac_exeext && {
2788	 test "$cross_compiling" = yes ||
2789	 test -x conftest$ac_exeext
2790       }; then :
2791  ac_retval=0
2792else
2793  $as_echo "$as_me: failed program was:" >&5
2794sed 's/^/| /' conftest.$ac_ext >&5
2795
2796	ac_retval=1
2797fi
2798  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2799  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2800  # interfere with the next link command; also delete a directory that is
2801  # left behind by Apple's compiler.  We do this before executing the actions.
2802  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2803  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2804  as_fn_set_status $ac_retval
2805
2806} # ac_fn_cxx_try_link
2807
2808# ac_fn_cxx_check_func LINENO FUNC VAR
2809# ------------------------------------
2810# Tests whether FUNC exists, setting the cache variable VAR accordingly
2811ac_fn_cxx_check_func ()
2812{
2813  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2815$as_echo_n "checking for $2... " >&6; }
2816if eval \${$3+:} false; then :
2817  $as_echo_n "(cached) " >&6
2818else
2819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h.  */
2821/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2822   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2823#define $2 innocuous_$2
2824
2825/* System header to define __stub macros and hopefully few prototypes,
2826    which can conflict with char $2 (); below.
2827    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2828    <limits.h> exists even on freestanding compilers.  */
2829
2830#ifdef __STDC__
2831# include <limits.h>
2832#else
2833# include <assert.h>
2834#endif
2835
2836#undef $2
2837
2838/* Override any GCC internal prototype to avoid an error.
2839   Use char because int might match the return type of a GCC
2840   builtin and then its argument prototype would still apply.  */
2841#ifdef __cplusplus
2842extern "C"
2843#endif
2844char $2 ();
2845/* The GNU C library defines this for functions which it implements
2846    to always fail with ENOSYS.  Some functions are actually named
2847    something starting with __ and the normal name is an alias.  */
2848#if defined __stub_$2 || defined __stub___$2
2849choke me
2850#endif
2851
2852int
2853main ()
2854{
2855return $2 ();
2856  ;
2857  return 0;
2858}
2859_ACEOF
2860if ac_fn_cxx_try_link "$LINENO"; then :
2861  eval "$3=yes"
2862else
2863  eval "$3=no"
2864fi
2865rm -f core conftest.err conftest.$ac_objext \
2866    conftest$ac_exeext conftest.$ac_ext
2867fi
2868eval ac_res=\$$3
2869	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2870$as_echo "$ac_res" >&6; }
2871  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2872
2873} # ac_fn_cxx_check_func
2874
2875# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2876# -------------------------------------------------------
2877# Tests whether HEADER exists and can be compiled using the include files in
2878# INCLUDES, setting the cache variable VAR accordingly.
2879ac_fn_c_check_header_compile ()
2880{
2881  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2883$as_echo_n "checking for $2... " >&6; }
2884if eval \${$3+:} false; then :
2885  $as_echo_n "(cached) " >&6
2886else
2887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2888/* end confdefs.h.  */
2889$4
2890#include <$2>
2891_ACEOF
2892if ac_fn_c_try_compile "$LINENO"; then :
2893  eval "$3=yes"
2894else
2895  eval "$3=no"
2896fi
2897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898fi
2899eval ac_res=\$$3
2900	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2901$as_echo "$ac_res" >&6; }
2902  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2903
2904} # ac_fn_c_check_header_compile
2905cat >config.log <<_ACEOF
2906This file contains any messages produced by compilers while
2907running configure, to aid debugging if configure makes a mistake.
2908
2909It was created by OpenJDK $as_me jdk9, which was
2910generated by GNU Autoconf 2.69.  Invocation command line was
2911
2912  $ $0 $@
2913
2914_ACEOF
2915exec 5>>config.log
2916{
2917cat <<_ASUNAME
2918## --------- ##
2919## Platform. ##
2920## --------- ##
2921
2922hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2923uname -m = `(uname -m) 2>/dev/null || echo unknown`
2924uname -r = `(uname -r) 2>/dev/null || echo unknown`
2925uname -s = `(uname -s) 2>/dev/null || echo unknown`
2926uname -v = `(uname -v) 2>/dev/null || echo unknown`
2927
2928/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2929/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2930
2931/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2932/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2933/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2934/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2935/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2936/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2937/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2938
2939_ASUNAME
2940
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944  IFS=$as_save_IFS
2945  test -z "$as_dir" && as_dir=.
2946    $as_echo "PATH: $as_dir"
2947  done
2948IFS=$as_save_IFS
2949
2950} >&5
2951
2952cat >&5 <<_ACEOF
2953
2954
2955## ----------- ##
2956## Core tests. ##
2957## ----------- ##
2958
2959_ACEOF
2960
2961
2962# Keep a trace of the command line.
2963# Strip out --no-create and --no-recursion so they do not pile up.
2964# Strip out --silent because we don't want to record it for future runs.
2965# Also quote any args containing shell meta-characters.
2966# Make two passes to allow for proper duplicate-argument suppression.
2967ac_configure_args=
2968ac_configure_args0=
2969ac_configure_args1=
2970ac_must_keep_next=false
2971for ac_pass in 1 2
2972do
2973  for ac_arg
2974  do
2975    case $ac_arg in
2976    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2977    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2978    | -silent | --silent | --silen | --sile | --sil)
2979      continue ;;
2980    *\'*)
2981      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2982    esac
2983    case $ac_pass in
2984    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2985    2)
2986      as_fn_append ac_configure_args1 " '$ac_arg'"
2987      if test $ac_must_keep_next = true; then
2988	ac_must_keep_next=false # Got value, back to normal.
2989      else
2990	case $ac_arg in
2991	  *=* | --config-cache | -C | -disable-* | --disable-* \
2992	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2993	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2994	  | -with-* | --with-* | -without-* | --without-* | --x)
2995	    case "$ac_configure_args0 " in
2996	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2997	    esac
2998	    ;;
2999	  -* ) ac_must_keep_next=true ;;
3000	esac
3001      fi
3002      as_fn_append ac_configure_args " '$ac_arg'"
3003      ;;
3004    esac
3005  done
3006done
3007{ ac_configure_args0=; unset ac_configure_args0;}
3008{ ac_configure_args1=; unset ac_configure_args1;}
3009
3010# When interrupted or exit'd, cleanup temporary files, and complete
3011# config.log.  We remove comments because anyway the quotes in there
3012# would cause problems or look ugly.
3013# WARNING: Use '\'' to represent an apostrophe within the trap.
3014# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3015trap 'exit_status=$?
3016  # Save into config.log some information that might help in debugging.
3017  {
3018    echo
3019
3020    $as_echo "## ---------------- ##
3021## Cache variables. ##
3022## ---------------- ##"
3023    echo
3024    # The following way of writing the cache mishandles newlines in values,
3025(
3026  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3027    eval ac_val=\$$ac_var
3028    case $ac_val in #(
3029    *${as_nl}*)
3030      case $ac_var in #(
3031      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3032$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3033      esac
3034      case $ac_var in #(
3035      _ | IFS | as_nl) ;; #(
3036      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3037      *) { eval $ac_var=; unset $ac_var;} ;;
3038      esac ;;
3039    esac
3040  done
3041  (set) 2>&1 |
3042    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3043    *${as_nl}ac_space=\ *)
3044      sed -n \
3045	"s/'\''/'\''\\\\'\'''\''/g;
3046	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3047      ;; #(
3048    *)
3049      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3050      ;;
3051    esac |
3052    sort
3053)
3054    echo
3055
3056    $as_echo "## ----------------- ##
3057## Output variables. ##
3058## ----------------- ##"
3059    echo
3060    for ac_var in $ac_subst_vars
3061    do
3062      eval ac_val=\$$ac_var
3063      case $ac_val in
3064      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3065      esac
3066      $as_echo "$ac_var='\''$ac_val'\''"
3067    done | sort
3068    echo
3069
3070    if test -n "$ac_subst_files"; then
3071      $as_echo "## ------------------- ##
3072## File substitutions. ##
3073## ------------------- ##"
3074      echo
3075      for ac_var in $ac_subst_files
3076      do
3077	eval ac_val=\$$ac_var
3078	case $ac_val in
3079	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3080	esac
3081	$as_echo "$ac_var='\''$ac_val'\''"
3082      done | sort
3083      echo
3084    fi
3085
3086    if test -s confdefs.h; then
3087      $as_echo "## ----------- ##
3088## confdefs.h. ##
3089## ----------- ##"
3090      echo
3091      cat confdefs.h
3092      echo
3093    fi
3094    test "$ac_signal" != 0 &&
3095      $as_echo "$as_me: caught signal $ac_signal"
3096    $as_echo "$as_me: exit $exit_status"
3097  } >&5
3098  rm -f core *.core core.conftest.* &&
3099    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3100    exit $exit_status
3101' 0
3102for ac_signal in 1 2 13 15; do
3103  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3104done
3105ac_signal=0
3106
3107# confdefs.h avoids OS command line length limits that DEFS can exceed.
3108rm -f -r conftest* confdefs.h
3109
3110$as_echo "/* confdefs.h */" > confdefs.h
3111
3112# Predefined preprocessor variables.
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_NAME "$PACKAGE_NAME"
3116_ACEOF
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3120_ACEOF
3121
3122cat >>confdefs.h <<_ACEOF
3123#define PACKAGE_VERSION "$PACKAGE_VERSION"
3124_ACEOF
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_STRING "$PACKAGE_STRING"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_URL "$PACKAGE_URL"
3136_ACEOF
3137
3138
3139# Let the site file select an alternate cache file if it wants to.
3140# Prefer an explicitly selected file to automatically selected ones.
3141ac_site_file1=NONE
3142ac_site_file2=NONE
3143if test -n "$CONFIG_SITE"; then
3144  # We do not want a PATH search for config.site.
3145  case $CONFIG_SITE in #((
3146    -*)  ac_site_file1=./$CONFIG_SITE;;
3147    */*) ac_site_file1=$CONFIG_SITE;;
3148    *)   ac_site_file1=./$CONFIG_SITE;;
3149  esac
3150elif test "x$prefix" != xNONE; then
3151  ac_site_file1=$prefix/share/config.site
3152  ac_site_file2=$prefix/etc/config.site
3153else
3154  ac_site_file1=$ac_default_prefix/share/config.site
3155  ac_site_file2=$ac_default_prefix/etc/config.site
3156fi
3157for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3158do
3159  test "x$ac_site_file" = xNONE && continue
3160  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3161    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3162$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3163    sed 's/^/| /' "$ac_site_file" >&5
3164    . "$ac_site_file" \
3165      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3167as_fn_error $? "failed to load site script $ac_site_file
3168See \`config.log' for more details" "$LINENO" 5; }
3169  fi
3170done
3171
3172if test -r "$cache_file"; then
3173  # Some versions of bash will fail to source /dev/null (special files
3174  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3175  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3176    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3177$as_echo "$as_me: loading cache $cache_file" >&6;}
3178    case $cache_file in
3179      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3180      *)                      . "./$cache_file";;
3181    esac
3182  fi
3183else
3184  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3185$as_echo "$as_me: creating cache $cache_file" >&6;}
3186  >$cache_file
3187fi
3188
3189# Check that the precious variables saved in the cache have kept the same
3190# value.
3191ac_cache_corrupted=false
3192for ac_var in $ac_precious_vars; do
3193  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3194  eval ac_new_set=\$ac_env_${ac_var}_set
3195  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3196  eval ac_new_val=\$ac_env_${ac_var}_value
3197  case $ac_old_set,$ac_new_set in
3198    set,)
3199      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3200$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3201      ac_cache_corrupted=: ;;
3202    ,set)
3203      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3204$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3205      ac_cache_corrupted=: ;;
3206    ,);;
3207    *)
3208      if test "x$ac_old_val" != "x$ac_new_val"; then
3209	# differences in whitespace do not lead to failure.
3210	ac_old_val_w=`echo x $ac_old_val`
3211	ac_new_val_w=`echo x $ac_new_val`
3212	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3213	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3214$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3215	  ac_cache_corrupted=:
3216	else
3217	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3218$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3219	  eval $ac_var=\$ac_old_val
3220	fi
3221	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3222$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3223	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3224$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3225      fi;;
3226  esac
3227  # Pass precious variables to config.status.
3228  if test "$ac_new_set" = set; then
3229    case $ac_new_val in
3230    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3231    *) ac_arg=$ac_var=$ac_new_val ;;
3232    esac
3233    case " $ac_configure_args " in
3234      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3235      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3236    esac
3237  fi
3238done
3239if $ac_cache_corrupted; then
3240  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3242  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3243$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3244  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3245fi
3246## -------------------- ##
3247## Main body of script. ##
3248## -------------------- ##
3249
3250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255
3256
3257
3258ac_aux_dir=
3259for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3260  if test -f "$ac_dir/install-sh"; then
3261    ac_aux_dir=$ac_dir
3262    ac_install_sh="$ac_aux_dir/install-sh -c"
3263    break
3264  elif test -f "$ac_dir/install.sh"; then
3265    ac_aux_dir=$ac_dir
3266    ac_install_sh="$ac_aux_dir/install.sh -c"
3267    break
3268  elif test -f "$ac_dir/shtool"; then
3269    ac_aux_dir=$ac_dir
3270    ac_install_sh="$ac_aux_dir/shtool install -c"
3271    break
3272  fi
3273done
3274if test -z "$ac_aux_dir"; then
3275  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3276fi
3277
3278# These three variables are undocumented and unsupported,
3279# and are intended to be withdrawn in a future Autoconf release.
3280# They can cause serious problems if a builder's source tree is in a directory
3281# whose full name contains unusual characters.
3282ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3283ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3284ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3285
3286
3287# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3288
3289#
3290# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3292#
3293# This code is free software; you can redistribute it and/or modify it
3294# under the terms of the GNU General Public License version 2 only, as
3295# published by the Free Software Foundation.  Oracle designates this
3296# particular file as subject to the "Classpath" exception as provided
3297# by Oracle in the LICENSE file that accompanied this code.
3298#
3299# This code is distributed in the hope that it will be useful, but WITHOUT
3300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3302# version 2 for more details (a copy is included in the LICENSE file that
3303# accompanied this code).
3304#
3305# You should have received a copy of the GNU General Public License version
3306# 2 along with this work; if not, write to the Free Software Foundation,
3307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3308#
3309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3310# or visit www.oracle.com if you need additional information or have any
3311# questions.
3312#
3313
3314#
3315# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3316#
3317# This program is free software; you can redistribute it and/or modify
3318# it under the terms of the GNU General Public License as published by
3319# the Free Software Foundation; either version 2 of the License, or
3320# (at your option) any later version.
3321#
3322# This program is distributed in the hope that it will be useful, but
3323# WITHOUT ANY WARRANTY; without even the implied warranty of
3324# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3325# General Public License for more details.
3326#
3327# You should have received a copy of the GNU General Public License
3328# along with this program; if not, write to the Free Software
3329# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3330#
3331# As a special exception to the GNU General Public License, if you
3332# distribute this file as part of a program that contains a
3333# configuration script generated by Autoconf, you may include it under
3334# the same distribution terms that you use for the rest of that program.
3335
3336# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3337# ----------------------------------
3338# PKG_PROG_PKG_CONFIG
3339
3340# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3341#
3342# Check to see whether a particular set of modules exists.  Similar
3343# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3344#
3345#
3346# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3347# this or PKG_CHECK_MODULES is called, or make sure to call
3348# PKG_CHECK_EXISTS manually
3349# --------------------------------------------------------------
3350
3351
3352
3353# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3354# ---------------------------------------------
3355# _PKG_CONFIG
3356
3357# _PKG_SHORT_ERRORS_SUPPORTED
3358# -----------------------------
3359# _PKG_SHORT_ERRORS_SUPPORTED
3360
3361
3362# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3363# [ACTION-IF-NOT-FOUND])
3364#
3365#
3366# Note that if there is a possibility the first call to
3367# PKG_CHECK_MODULES might not happen, you should be sure to include an
3368# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3369#
3370#
3371# --------------------------------------------------------------
3372# PKG_CHECK_MODULES
3373
3374
3375# Include these first...
3376#
3377# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3378# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3379#
3380# This code is free software; you can redistribute it and/or modify it
3381# under the terms of the GNU General Public License version 2 only, as
3382# published by the Free Software Foundation.  Oracle designates this
3383# particular file as subject to the "Classpath" exception as provided
3384# by Oracle in the LICENSE file that accompanied this code.
3385#
3386# This code is distributed in the hope that it will be useful, but WITHOUT
3387# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3388# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3389# version 2 for more details (a copy is included in the LICENSE file that
3390# accompanied this code).
3391#
3392# You should have received a copy of the GNU General Public License version
3393# 2 along with this work; if not, write to the Free Software Foundation,
3394# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3395#
3396# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3397# or visit www.oracle.com if you need additional information or have any
3398# questions.
3399#
3400
3401# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3402# If so, then append $1 to $2 \
3403# Also set JVM_ARG_OK to true/false depending on outcome.
3404
3405
3406# Appends a string to a path variable, only adding the : when needed.
3407
3408
3409# Prepends a string to a path variable, only adding the : when needed.
3410
3411
3412# This will make sure the given variable points to a full and proper
3413# path. This means:
3414# 1) There will be no spaces in the path. On posix platforms,
3415#    spaces in the path will result in an error. On Windows,
3416#    the path will be rewritten using short-style to be space-free.
3417# 2) The path will be absolute, and it will be in unix-style (on
3418#     cygwin).
3419# $1: The name of the variable to fix
3420
3421
3422# This will make sure the given variable points to a executable
3423# with a full and proper path. This means:
3424# 1) There will be no spaces in the path. On posix platforms,
3425#    spaces in the path will result in an error. On Windows,
3426#    the path will be rewritten using short-style to be space-free.
3427# 2) The path will be absolute, and it will be in unix-style (on
3428#     cygwin).
3429# Any arguments given to the executable is preserved.
3430# If the input variable does not have a directory specification, then
3431# it need to be in the PATH.
3432# $1: The name of the variable to fix
3433
3434
3435
3436
3437# Register a --with argument but mark it as deprecated
3438# $1: The name of the with argument to deprecate, not including --with-
3439
3440
3441# Register a --enable argument but mark it as deprecated
3442# $1: The name of the with argument to deprecate, not including --enable-
3443# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3444
3445
3446
3447
3448# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3449# $1: variable to check
3450
3451
3452# Check that there are no unprocessed overridden variables left.
3453# If so, they are an incorrect argument and we will exit with an error.
3454
3455
3456# Setup a tool for the given variable. If correctly specified by the user,
3457# use that value, otherwise search for the tool using the supplied code snippet.
3458# $1: variable to set
3459# $2: code snippet to call to look for the tool
3460
3461
3462# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3463# $1: variable to set
3464# $2: executable name (or list of names) to look for
3465
3466
3467# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Like BASIC_PATH_PROGS but fails if no tool was found.
3473# $1: variable to set
3474# $2: executable name (or list of names) to look for
3475
3476
3477# Like BASIC_SETUP_TOOL but fails if no tool was found.
3478# $1: variable to set
3479# $2: autoconf macro to call to look for the special tool
3480
3481
3482# Setup the most fundamental tools that relies on not much else to set up,
3483# but is used by much of the early bootstrap code.
3484
3485
3486# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496#%%% Simple tools %%%
3497
3498# Check if we have found a usable version of make
3499# $1: the path to a potential make binary (or empty)
3500# $2: the description on how we found this
3501
3502
3503
3504
3505# Goes looking for a usable version of GNU make.
3506
3507
3508
3509
3510
3511
3512# Check if build directory is on local disk. If not possible to determine,
3513# we prefer to claim it's local.
3514# Argument 1: directory to test
3515# Argument 2: what to do if it is on local disk
3516# Argument 3: what to do otherwise (remote disk or failure)
3517
3518
3519# Check that source files have basic read permissions set. This might
3520# not be the case in cygwin in certain conditions.
3521
3522
3523
3524
3525#
3526# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3527# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3528#
3529# This code is free software; you can redistribute it and/or modify it
3530# under the terms of the GNU General Public License version 2 only, as
3531# published by the Free Software Foundation.  Oracle designates this
3532# particular file as subject to the "Classpath" exception as provided
3533# by Oracle in the LICENSE file that accompanied this code.
3534#
3535# This code is distributed in the hope that it will be useful, but WITHOUT
3536# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3537# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3538# version 2 for more details (a copy is included in the LICENSE file that
3539# accompanied this code).
3540#
3541# You should have received a copy of the GNU General Public License version
3542# 2 along with this work; if not, write to the Free Software Foundation,
3543# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3544#
3545# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3546# or visit www.oracle.com if you need additional information or have any
3547# questions.
3548#
3549
3550
3551
3552
3553
3554# Helper function which possibly converts a path using DOS-style short mode.
3555# If so, the updated path is stored in $new_path.
3556# $1: The path to check
3557
3558
3559# Helper function which possibly converts a path using DOS-style short mode.
3560# If so, the updated path is stored in $new_path.
3561# $1: The path to check
3562
3563
3564# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3565# and could probably be heavily simplified. However, all changes in this
3566# area tend to need lot of testing in different scenarios, and in lack of
3567# proper unit testing, cleaning this up has not been deemed worth the effort
3568# at the moment.
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3579
3580
3581
3582
3583#
3584# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3585# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3586#
3587# This code is free software; you can redistribute it and/or modify it
3588# under the terms of the GNU General Public License version 2 only, as
3589# published by the Free Software Foundation.  Oracle designates this
3590# particular file as subject to the "Classpath" exception as provided
3591# by Oracle in the LICENSE file that accompanied this code.
3592#
3593# This code is distributed in the hope that it will be useful, but WITHOUT
3594# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3595# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3596# version 2 for more details (a copy is included in the LICENSE file that
3597# accompanied this code).
3598#
3599# You should have received a copy of the GNU General Public License version
3600# 2 along with this work; if not, write to the Free Software Foundation,
3601# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3602#
3603# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3604# or visit www.oracle.com if you need additional information or have any
3605# questions.
3606#
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618# ... then the rest
3619#
3620# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644########################################################################
3645# This file handles detection of the Boot JDK. The Boot JDK detection
3646# process has been developed as a response to solve a complex real-world
3647# problem. Initially, it was simple, but it has grown as platform after
3648# platform, idiosyncracy after idiosyncracy has been supported.
3649#
3650# The basic idea is this:
3651# 1) You need an acceptable *) JDK to use as a Boot JDK
3652# 2) There are several ways to locate a JDK, that are mostly platform
3653#    dependent **)
3654# 3) You can have multiple JDKs installed
3655# 4) If possible, configure should try to dig out an acceptable JDK
3656#    automatically, without having to resort to command-line options
3657#
3658# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3659#     javac) and not a JRE, etc.
3660#
3661# **) On Windows we typically use a well-known path.
3662#     On MacOSX we typically use the tool java_home.
3663#     On Linux we typically find javac in the $PATH, and then follow a
3664#     chain of symlinks that often ends up in a real JDK.
3665#
3666# This leads to the code where we check in different ways to locate a
3667# JDK, and if one is found, check if it is acceptable. If not, we print
3668# our reasons for rejecting it (useful when debugging non-working
3669# configure situations) and continue checking the next one.
3670########################################################################
3671
3672# Execute the check given as argument, and verify the result
3673# If the Boot JDK was previously found, do nothing
3674# $1 A command line (typically autoconf macro) to execute
3675
3676
3677# Test: Is bootjdk explicitely set by command line arguments?
3678
3679
3680# Test: Is bootjdk available from builddeps?
3681
3682
3683# Test: Is $JAVA_HOME set?
3684
3685
3686# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3687
3688
3689# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3690# $1: Argument to the java_home binary (optional)
3691
3692
3693# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3694
3695
3696# Look for a jdk in the given path. If there are multiple, try to select the newest.
3697# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3698# $1 = Path to directory containing jdk installations.
3699# $2 = String to append to the found JDK directory to get the proper JDK home
3700
3701
3702# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3703# environmental variable as base for where to look.
3704# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3705
3706
3707# Test: Is there a JDK installed in default, well-known locations?
3708
3709
3710# Check that a command-line tool in the Boot JDK is correct
3711# $1 = name of variable to assign
3712# $2 = name of binary
3713
3714
3715###############################################################################
3716#
3717# We need a Boot JDK to bootstrap the build.
3718#
3719
3720
3721
3722
3723
3724#
3725# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727#
3728# This code is free software; you can redistribute it and/or modify it
3729# under the terms of the GNU General Public License version 2 only, as
3730# published by the Free Software Foundation.  Oracle designates this
3731# particular file as subject to the "Classpath" exception as provided
3732# by Oracle in the LICENSE file that accompanied this code.
3733#
3734# This code is distributed in the hope that it will be useful, but WITHOUT
3735# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737# version 2 for more details (a copy is included in the LICENSE file that
3738# accompanied this code).
3739#
3740# You should have received a copy of the GNU General Public License version
3741# 2 along with this work; if not, write to the Free Software Foundation,
3742# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743#
3744# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745# or visit www.oracle.com if you need additional information or have any
3746# questions.
3747#
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768#
3769# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3770# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3771#
3772# This code is free software; you can redistribute it and/or modify it
3773# under the terms of the GNU General Public License version 2 only, as
3774# published by the Free Software Foundation.  Oracle designates this
3775# particular file as subject to the "Classpath" exception as provided
3776# by Oracle in the LICENSE file that accompanied this code.
3777#
3778# This code is distributed in the hope that it will be useful, but WITHOUT
3779# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3780# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3781# version 2 for more details (a copy is included in the LICENSE file that
3782# accompanied this code).
3783#
3784# You should have received a copy of the GNU General Public License version
3785# 2 along with this work; if not, write to the Free Software Foundation,
3786# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3787#
3788# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3789# or visit www.oracle.com if you need additional information or have any
3790# questions.
3791#
3792
3793
3794
3795
3796
3797# Documentation on common flags used for solstudio in HIGHEST.
3798#
3799# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3800#          done with care, there are some assumptions below that need to
3801#          be understood about the use of pointers, and IEEE behavior.
3802#
3803# -fns: Use non-standard floating point mode (not IEEE 754)
3804# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3805# -fsingle: Use single precision floating point with 'float'
3806# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3807#   (Source with excessing pointer casting and data access with mixed
3808#    pointer types are not recommended)
3809# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3810#   (If you expect perfect errno behavior, do not use this)
3811# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3812# -xrestrict: Pointer parameters to functions do not overlap
3813#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3814#    If you pass in multiple pointers to the same data, do not use this)
3815# -xlibmil: Inline some library routines
3816#   (If you expect perfect errno behavior, do not use this)
3817# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3818#   (If you expect perfect errno behavior, do not use this)
3819#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3820
3821    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3822    # Bug?
3823    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3824    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3825    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3826    #fi
3827
3828
3829
3830
3831
3832# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3833#                                   [RUN-IF-FALSE])
3834# ------------------------------------------------------------
3835# Check that the c and c++ compilers support an argument
3836
3837
3838# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3839#                                    [RUN-IF-FALSE])
3840# ------------------------------------------------------------
3841# Check that the linker support an argument
3842
3843
3844
3845
3846#
3847# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3848# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3849#
3850# This code is free software; you can redistribute it and/or modify it
3851# under the terms of the GNU General Public License version 2 only, as
3852# published by the Free Software Foundation.  Oracle designates this
3853# particular file as subject to the "Classpath" exception as provided
3854# by Oracle in the LICENSE file that accompanied this code.
3855#
3856# This code is distributed in the hope that it will be useful, but WITHOUT
3857# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3858# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3859# version 2 for more details (a copy is included in the LICENSE file that
3860# accompanied this code).
3861#
3862# You should have received a copy of the GNU General Public License version
3863# 2 along with this work; if not, write to the Free Software Foundation,
3864# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3865#
3866# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3867# or visit www.oracle.com if you need additional information or have any
3868# questions.
3869#
3870
3871
3872
3873
3874
3875cygwin_help() {
3876  case $1 in
3877    unzip)
3878      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3879      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3880      ;;
3881    zip)
3882      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3883      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3884      ;;
3885    make)
3886      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3888      ;;
3889    freetype)
3890      HELP_MSG="
3891The freetype library can now be build during the configure process.
3892Download the freetype sources and unpack them into an arbitrary directory:
3893
3894wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3895tar -xzf freetype-2.5.3.tar.gz
3896
3897Then run configure with '--with-freetype-src=<freetype_src>'. This will
3898automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3899builds or into '<freetype_src>/lib32' for 32-bit builds.
3900Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3901and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3902      ;;
3903  esac
3904}
3905
3906msys_help() {
3907  PKGHANDLER_COMMAND=""
3908}
3909
3910apt_help() {
3911  case $1 in
3912    devkit)
3913      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3914    openjdk)
3915      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3916    alsa)
3917      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3918    cups)
3919      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3920    freetype)
3921      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3922    pulse)
3923      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3924    x11)
3925      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3926    ccache)
3927      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3928  esac
3929}
3930
3931yum_help() {
3932  case $1 in
3933    devkit)
3934      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3935    openjdk)
3936      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3937    alsa)
3938      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3939    cups)
3940      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3941    freetype)
3942      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3943    pulse)
3944      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3945    x11)
3946      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3947    ccache)
3948      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3949  esac
3950}
3951
3952port_help() {
3953  PKGHANDLER_COMMAND=""
3954}
3955
3956pkgutil_help() {
3957  PKGHANDLER_COMMAND=""
3958}
3959
3960pkgadd_help() {
3961  PKGHANDLER_COMMAND=""
3962}
3963
3964# This function will check if we're called from the "configure" wrapper while
3965# printing --help. If so, we will print out additional information that can
3966# only be extracted within the autoconf script, and then exit. This must be
3967# called at the very beginning in configure.ac.
3968
3969
3970
3971
3972#
3973# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3974# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3975#
3976# This code is free software; you can redistribute it and/or modify it
3977# under the terms of the GNU General Public License version 2 only, as
3978# published by the Free Software Foundation.  Oracle designates this
3979# particular file as subject to the "Classpath" exception as provided
3980# by Oracle in the LICENSE file that accompanied this code.
3981#
3982# This code is distributed in the hope that it will be useful, but WITHOUT
3983# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3984# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3985# version 2 for more details (a copy is included in the LICENSE file that
3986# accompanied this code).
3987#
3988# You should have received a copy of the GNU General Public License version
3989# 2 along with this work; if not, write to the Free Software Foundation,
3990# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3991#
3992# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3993# or visit www.oracle.com if you need additional information or have any
3994# questions.
3995#
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006###############################################################################
4007#
4008# Should we build only OpenJDK even if closed sources are present?
4009#
4010
4011
4012
4013
4014###############################################################################
4015#
4016# Setup version numbers
4017#
4018
4019
4020
4021
4022
4023
4024#
4025# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4026# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4027#
4028# This code is free software; you can redistribute it and/or modify it
4029# under the terms of the GNU General Public License version 2 only, as
4030# published by the Free Software Foundation.  Oracle designates this
4031# particular file as subject to the "Classpath" exception as provided
4032# by Oracle in the LICENSE file that accompanied this code.
4033#
4034# This code is distributed in the hope that it will be useful, but WITHOUT
4035# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4036# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4037# version 2 for more details (a copy is included in the LICENSE file that
4038# accompanied this code).
4039#
4040# You should have received a copy of the GNU General Public License version
4041# 2 along with this work; if not, write to the Free Software Foundation,
4042# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4043#
4044# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4045# or visit www.oracle.com if you need additional information or have any
4046# questions.
4047#
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069#
4070# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4071# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4072#
4073# This code is free software; you can redistribute it and/or modify it
4074# under the terms of the GNU General Public License version 2 only, as
4075# published by the Free Software Foundation.  Oracle designates this
4076# particular file as subject to the "Classpath" exception as provided
4077# by Oracle in the LICENSE file that accompanied this code.
4078#
4079# This code is distributed in the hope that it will be useful, but WITHOUT
4080# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4081# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4082# version 2 for more details (a copy is included in the LICENSE file that
4083# accompanied this code).
4084#
4085# You should have received a copy of the GNU General Public License version
4086# 2 along with this work; if not, write to the Free Software Foundation,
4087# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4088#
4089# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4090# or visit www.oracle.com if you need additional information or have any
4091# questions.
4092#
4093
4094# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4095# Converts autoconf style CPU name to OpenJDK style, into
4096# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4097
4098
4099# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4100# Converts autoconf style OS name to OpenJDK style, into
4101# VAR_OS and VAR_OS_API.
4102
4103
4104# Expects $host_os $host_cpu $build_os and $build_cpu
4105# and $with_target_bits to have been setup!
4106#
4107# Translate the standard triplet(quadruplet) definition
4108# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4109# OPENJDK_BUILD_OS, etc.
4110
4111
4112# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4113# accordingly. Must be done after setting up build and target system, but before
4114# doing anything else with these values.
4115
4116
4117# Setup the legacy variables, for controlling the old makefiles.
4118#
4119
4120
4121
4122
4123#%%% Build and target systems %%%
4124
4125
4126
4127
4128# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4129# Add -mX to various FLAGS variables.
4130
4131
4132
4133
4134
4135
4136#
4137# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4138# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4139#
4140# This code is free software; you can redistribute it and/or modify it
4141# under the terms of the GNU General Public License version 2 only, as
4142# published by the Free Software Foundation.  Oracle designates this
4143# particular file as subject to the "Classpath" exception as provided
4144# by Oracle in the LICENSE file that accompanied this code.
4145#
4146# This code is distributed in the hope that it will be useful, but WITHOUT
4147# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4148# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4149# version 2 for more details (a copy is included in the LICENSE file that
4150# accompanied this code).
4151#
4152# You should have received a copy of the GNU General Public License version
4153# 2 along with this work; if not, write to the Free Software Foundation,
4154# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4155#
4156# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4157# or visit www.oracle.com if you need additional information or have any
4158# questions.
4159#
4160
4161
4162
4163
4164
4165
4166
4167
4168#
4169# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4170# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4171#
4172# This code is free software; you can redistribute it and/or modify it
4173# under the terms of the GNU General Public License version 2 only, as
4174# published by the Free Software Foundation.  Oracle designates this
4175# particular file as subject to the "Classpath" exception as provided
4176# by Oracle in the LICENSE file that accompanied this code.
4177#
4178# This code is distributed in the hope that it will be useful, but WITHOUT
4179# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4180# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4181# version 2 for more details (a copy is included in the LICENSE file that
4182# accompanied this code).
4183#
4184# You should have received a copy of the GNU General Public License version
4185# 2 along with this work; if not, write to the Free Software Foundation,
4186# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4187#
4188# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4189# or visit www.oracle.com if you need additional information or have any
4190# questions.
4191#
4192
4193########################################################################
4194# This file is responsible for detecting, verifying and setting up the
4195# toolchain, i.e. the compiler, linker and related utilities. It will setup
4196# proper paths to the binaries, but it will not setup any flags.
4197#
4198# The binaries used is determined by the toolchain type, which is the family of
4199# compilers and related tools that are used.
4200########################################################################
4201
4202
4203# All valid toolchains, regardless of platform (used by help.m4)
4204VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4205
4206# These toolchains are valid on different platforms
4207VALID_TOOLCHAINS_linux="gcc clang"
4208VALID_TOOLCHAINS_solaris="solstudio"
4209VALID_TOOLCHAINS_macosx="gcc clang"
4210VALID_TOOLCHAINS_aix="xlc"
4211VALID_TOOLCHAINS_windows="microsoft"
4212
4213# Toolchain descriptions
4214TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4215TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4216TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4217TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4218TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4219
4220# Setup a number of variables describing how native output files are
4221# named on this platform/toolchain.
4222
4223
4224# Determine which toolchain type to use, and make sure it is valid for this
4225# platform. Setup various information about the selected toolchain.
4226
4227
4228# Before we start detecting the toolchain executables, we might need some
4229# special setup, e.g. additional paths etc.
4230
4231
4232# Restore path, etc
4233
4234
4235# Check if a compiler is of the toolchain type we expect, and save the version
4236# information from it. If the compiler does not match the expected type,
4237# this function will abort using AC_MSG_ERROR. If it matches, the version will
4238# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4239# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4240#
4241# $1 = compiler to test (CC or CXX)
4242# $2 = human readable name of compiler (C or C++)
4243
4244
4245# Try to locate the given C or C++ compiler in the path, or otherwise.
4246#
4247# $1 = compiler to test (CC or CXX)
4248# $2 = human readable name of compiler (C or C++)
4249# $3 = list of compiler names to search for
4250
4251
4252# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4253# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4254# archiver (AR). Verify that the compilers are correct according to the
4255# toolchain type.
4256
4257
4258# Setup additional tools that is considered a part of the toolchain, but not the
4259# core part. Many of these are highly platform-specific and do not exist,
4260# and/or are not needed on all platforms.
4261
4262
4263# Setup the build tools (i.e, the compiler and linker used to build programs
4264# that should be run on the build platform, not the target platform, as a build
4265# helper). Since the non-cross-compile case uses the normal, target compilers
4266# for this, we can only do this after these have been setup.
4267
4268
4269# Setup legacy variables that are still needed as alternative ways to refer to
4270# parts of the toolchain.
4271
4272
4273# Do some additional checks on the detected tools.
4274
4275
4276# Setup the JTReg Regression Test Harness.
4277
4278
4279#
4280# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4281# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4282#
4283# This code is free software; you can redistribute it and/or modify it
4284# under the terms of the GNU General Public License version 2 only, as
4285# published by the Free Software Foundation.  Oracle designates this
4286# particular file as subject to the "Classpath" exception as provided
4287# by Oracle in the LICENSE file that accompanied this code.
4288#
4289# This code is distributed in the hope that it will be useful, but WITHOUT
4290# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4291# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4292# version 2 for more details (a copy is included in the LICENSE file that
4293# accompanied this code).
4294#
4295# You should have received a copy of the GNU General Public License version
4296# 2 along with this work; if not, write to the Free Software Foundation,
4297# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4298#
4299# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4300# or visit www.oracle.com if you need additional information or have any
4301# questions.
4302#
4303
4304
4305
4306
4307
4308
4309
4310# Check if the VS env variables were setup prior to running configure.
4311# If not, then find vcvarsall.bat and run it automatically, and integrate
4312# the set env variables into the spec file.
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324# This line needs to be here, verbatim, after all includes and the dummy hook
4325# definitions. It is replaced with custom functionality when building
4326# custom sources.
4327#CUSTOM_AUTOCONF_INCLUDE
4328
4329# Do not change or remove the following line, it is needed for consistency checks:
4330DATE_WHEN_GENERATED=1410377275
4331
4332###############################################################################
4333#
4334# Initialization / Boot-strapping
4335#
4336# The bootstrapping process needs to solve the "chicken or the egg" problem,
4337# thus it jumps back and forth, each time gaining something needed later on.
4338#
4339###############################################################################
4340
4341# If we are requested to print additional help, do that and then exit.
4342# This must be the very first call.
4343
4344  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4345    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4346    $PRINTF "Which are valid to use depends on the build platform.\n"
4347    for toolchain in $VALID_TOOLCHAINS_all; do
4348      # Use indirect variable referencing
4349      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4350      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4351      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4352    done
4353
4354    # And now exit directly
4355    exit 0
4356  fi
4357
4358
4359# Basic initialization that must happen first of all in the normal process.
4360
4361  # Save the original command line. This is passed to us by the wrapper configure script.
4362
4363  DATE_WHEN_CONFIGURED=`LANG=C date`
4364
4365  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4366$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4367  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4368$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4369
4370
4371  # Start with tools that do not need have cross compilation support
4372  # and can be expected to be found in the default PATH. These tools are
4373  # used by configure. Nor are these tools expected to be found in the
4374  # devkit from the builddeps server either, since they are
4375  # needed to download the devkit.
4376
4377  # First are all the simple required tools.
4378
4379
4380
4381  # Publish this variable in the help.
4382
4383
4384  if test "x$BASENAME" = x; then
4385    # The variable is not set by user, try to locate tool using the code snippet
4386    for ac_prog in basename
4387do
4388  # Extract the first word of "$ac_prog", so it can be a program name with args.
4389set dummy $ac_prog; ac_word=$2
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391$as_echo_n "checking for $ac_word... " >&6; }
4392if ${ac_cv_path_BASENAME+:} false; then :
4393  $as_echo_n "(cached) " >&6
4394else
4395  case $BASENAME in
4396  [\\/]* | ?:[\\/]*)
4397  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4398  ;;
4399  *)
4400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in $PATH
4402do
4403  IFS=$as_save_IFS
4404  test -z "$as_dir" && as_dir=.
4405    for ac_exec_ext in '' $ac_executable_extensions; do
4406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4407    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4409    break 2
4410  fi
4411done
4412  done
4413IFS=$as_save_IFS
4414
4415  ;;
4416esac
4417fi
4418BASENAME=$ac_cv_path_BASENAME
4419if test -n "$BASENAME"; then
4420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4421$as_echo "$BASENAME" >&6; }
4422else
4423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424$as_echo "no" >&6; }
4425fi
4426
4427
4428  test -n "$BASENAME" && break
4429done
4430
4431  else
4432    # The variable is set, but is it from the command line or the environment?
4433
4434    # Try to remove the string !BASENAME! from our list.
4435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4437      # If it failed, the variable was not from the command line. Ignore it,
4438      # but warn the user (except for BASH, which is always set by the calling BASH).
4439      if test "xBASENAME" != xBASH; then
4440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4441$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4442      fi
4443      # Try to locate tool using the code snippet
4444      for ac_prog in basename
4445do
4446  # Extract the first word of "$ac_prog", so it can be a program name with args.
4447set dummy $ac_prog; ac_word=$2
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449$as_echo_n "checking for $ac_word... " >&6; }
4450if ${ac_cv_path_BASENAME+:} false; then :
4451  $as_echo_n "(cached) " >&6
4452else
4453  case $BASENAME in
4454  [\\/]* | ?:[\\/]*)
4455  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4456  ;;
4457  *)
4458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459for as_dir in $PATH
4460do
4461  IFS=$as_save_IFS
4462  test -z "$as_dir" && as_dir=.
4463    for ac_exec_ext in '' $ac_executable_extensions; do
4464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4465    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4467    break 2
4468  fi
4469done
4470  done
4471IFS=$as_save_IFS
4472
4473  ;;
4474esac
4475fi
4476BASENAME=$ac_cv_path_BASENAME
4477if test -n "$BASENAME"; then
4478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4479$as_echo "$BASENAME" >&6; }
4480else
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4482$as_echo "no" >&6; }
4483fi
4484
4485
4486  test -n "$BASENAME" && break
4487done
4488
4489    else
4490      # If it succeeded, then it was overridden by the user. We will use it
4491      # for the tool.
4492
4493      # First remove it from the list of overridden variables, so we can test
4494      # for unknown variables in the end.
4495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4496
4497      # Check if the provided tool contains a complete path.
4498      tool_specified="$BASENAME"
4499      tool_basename="${tool_specified##*/}"
4500      if test "x$tool_basename" = "x$tool_specified"; then
4501        # A command without a complete path is provided, search $PATH.
4502        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4503$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4504        # Extract the first word of "$tool_basename", so it can be a program name with args.
4505set dummy $tool_basename; ac_word=$2
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507$as_echo_n "checking for $ac_word... " >&6; }
4508if ${ac_cv_path_BASENAME+:} false; then :
4509  $as_echo_n "(cached) " >&6
4510else
4511  case $BASENAME in
4512  [\\/]* | ?:[\\/]*)
4513  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4514  ;;
4515  *)
4516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH
4518do
4519  IFS=$as_save_IFS
4520  test -z "$as_dir" && as_dir=.
4521    for ac_exec_ext in '' $ac_executable_extensions; do
4522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525    break 2
4526  fi
4527done
4528  done
4529IFS=$as_save_IFS
4530
4531  ;;
4532esac
4533fi
4534BASENAME=$ac_cv_path_BASENAME
4535if test -n "$BASENAME"; then
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4537$as_echo "$BASENAME" >&6; }
4538else
4539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540$as_echo "no" >&6; }
4541fi
4542
4543
4544        if test "x$BASENAME" = x; then
4545          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4546        fi
4547      else
4548        # Otherwise we believe it is a complete path. Use it as it is.
4549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4550$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4552$as_echo_n "checking for BASENAME... " >&6; }
4553        if test ! -x "$tool_specified"; then
4554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4555$as_echo "not found" >&6; }
4556          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4557        fi
4558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4559$as_echo "$tool_specified" >&6; }
4560      fi
4561    fi
4562  fi
4563
4564
4565
4566  if test "x$BASENAME" = x; then
4567    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4568  fi
4569
4570
4571
4572
4573
4574  # Publish this variable in the help.
4575
4576
4577  if test "x$BASH" = x; then
4578    # The variable is not set by user, try to locate tool using the code snippet
4579    for ac_prog in bash
4580do
4581  # Extract the first word of "$ac_prog", so it can be a program name with args.
4582set dummy $ac_prog; ac_word=$2
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4584$as_echo_n "checking for $ac_word... " >&6; }
4585if ${ac_cv_path_BASH+:} false; then :
4586  $as_echo_n "(cached) " >&6
4587else
4588  case $BASH in
4589  [\\/]* | ?:[\\/]*)
4590  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4591  ;;
4592  *)
4593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in $PATH
4595do
4596  IFS=$as_save_IFS
4597  test -z "$as_dir" && as_dir=.
4598    for ac_exec_ext in '' $ac_executable_extensions; do
4599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4600    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4602    break 2
4603  fi
4604done
4605  done
4606IFS=$as_save_IFS
4607
4608  ;;
4609esac
4610fi
4611BASH=$ac_cv_path_BASH
4612if test -n "$BASH"; then
4613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4614$as_echo "$BASH" >&6; }
4615else
4616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4617$as_echo "no" >&6; }
4618fi
4619
4620
4621  test -n "$BASH" && break
4622done
4623
4624  else
4625    # The variable is set, but is it from the command line or the environment?
4626
4627    # Try to remove the string !BASH! from our list.
4628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4630      # If it failed, the variable was not from the command line. Ignore it,
4631      # but warn the user (except for BASH, which is always set by the calling BASH).
4632      if test "xBASH" != xBASH; then
4633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4634$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4635      fi
4636      # Try to locate tool using the code snippet
4637      for ac_prog in bash
4638do
4639  # Extract the first word of "$ac_prog", so it can be a program name with args.
4640set dummy $ac_prog; ac_word=$2
4641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4642$as_echo_n "checking for $ac_word... " >&6; }
4643if ${ac_cv_path_BASH+:} false; then :
4644  $as_echo_n "(cached) " >&6
4645else
4646  case $BASH in
4647  [\\/]* | ?:[\\/]*)
4648  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4649  ;;
4650  *)
4651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4652for as_dir in $PATH
4653do
4654  IFS=$as_save_IFS
4655  test -z "$as_dir" && as_dir=.
4656    for ac_exec_ext in '' $ac_executable_extensions; do
4657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4658    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4660    break 2
4661  fi
4662done
4663  done
4664IFS=$as_save_IFS
4665
4666  ;;
4667esac
4668fi
4669BASH=$ac_cv_path_BASH
4670if test -n "$BASH"; then
4671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4672$as_echo "$BASH" >&6; }
4673else
4674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4675$as_echo "no" >&6; }
4676fi
4677
4678
4679  test -n "$BASH" && break
4680done
4681
4682    else
4683      # If it succeeded, then it was overridden by the user. We will use it
4684      # for the tool.
4685
4686      # First remove it from the list of overridden variables, so we can test
4687      # for unknown variables in the end.
4688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4689
4690      # Check if the provided tool contains a complete path.
4691      tool_specified="$BASH"
4692      tool_basename="${tool_specified##*/}"
4693      if test "x$tool_basename" = "x$tool_specified"; then
4694        # A command without a complete path is provided, search $PATH.
4695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4696$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4697        # Extract the first word of "$tool_basename", so it can be a program name with args.
4698set dummy $tool_basename; ac_word=$2
4699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4700$as_echo_n "checking for $ac_word... " >&6; }
4701if ${ac_cv_path_BASH+:} false; then :
4702  $as_echo_n "(cached) " >&6
4703else
4704  case $BASH in
4705  [\\/]* | ?:[\\/]*)
4706  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4707  ;;
4708  *)
4709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4710for as_dir in $PATH
4711do
4712  IFS=$as_save_IFS
4713  test -z "$as_dir" && as_dir=.
4714    for ac_exec_ext in '' $ac_executable_extensions; do
4715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4716    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4718    break 2
4719  fi
4720done
4721  done
4722IFS=$as_save_IFS
4723
4724  ;;
4725esac
4726fi
4727BASH=$ac_cv_path_BASH
4728if test -n "$BASH"; then
4729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4730$as_echo "$BASH" >&6; }
4731else
4732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4733$as_echo "no" >&6; }
4734fi
4735
4736
4737        if test "x$BASH" = x; then
4738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4739        fi
4740      else
4741        # Otherwise we believe it is a complete path. Use it as it is.
4742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4743$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4745$as_echo_n "checking for BASH... " >&6; }
4746        if test ! -x "$tool_specified"; then
4747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4748$as_echo "not found" >&6; }
4749          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4750        fi
4751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4752$as_echo "$tool_specified" >&6; }
4753      fi
4754    fi
4755  fi
4756
4757
4758
4759  if test "x$BASH" = x; then
4760    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4761  fi
4762
4763
4764
4765
4766
4767  # Publish this variable in the help.
4768
4769
4770  if test "x$CAT" = x; then
4771    # The variable is not set by user, try to locate tool using the code snippet
4772    for ac_prog in cat
4773do
4774  # Extract the first word of "$ac_prog", so it can be a program name with args.
4775set dummy $ac_prog; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if ${ac_cv_path_CAT+:} false; then :
4779  $as_echo_n "(cached) " >&6
4780else
4781  case $CAT in
4782  [\\/]* | ?:[\\/]*)
4783  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4784  ;;
4785  *)
4786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4787for as_dir in $PATH
4788do
4789  IFS=$as_save_IFS
4790  test -z "$as_dir" && as_dir=.
4791    for ac_exec_ext in '' $ac_executable_extensions; do
4792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4793    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4795    break 2
4796  fi
4797done
4798  done
4799IFS=$as_save_IFS
4800
4801  ;;
4802esac
4803fi
4804CAT=$ac_cv_path_CAT
4805if test -n "$CAT"; then
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4807$as_echo "$CAT" >&6; }
4808else
4809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
4811fi
4812
4813
4814  test -n "$CAT" && break
4815done
4816
4817  else
4818    # The variable is set, but is it from the command line or the environment?
4819
4820    # Try to remove the string !CAT! from our list.
4821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4823      # If it failed, the variable was not from the command line. Ignore it,
4824      # but warn the user (except for BASH, which is always set by the calling BASH).
4825      if test "xCAT" != xBASH; then
4826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4827$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4828      fi
4829      # Try to locate tool using the code snippet
4830      for ac_prog in cat
4831do
4832  # Extract the first word of "$ac_prog", so it can be a program name with args.
4833set dummy $ac_prog; ac_word=$2
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
4836if ${ac_cv_path_CAT+:} false; then :
4837  $as_echo_n "(cached) " >&6
4838else
4839  case $CAT in
4840  [\\/]* | ?:[\\/]*)
4841  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4842  ;;
4843  *)
4844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in $PATH
4846do
4847  IFS=$as_save_IFS
4848  test -z "$as_dir" && as_dir=.
4849    for ac_exec_ext in '' $ac_executable_extensions; do
4850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4851    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4853    break 2
4854  fi
4855done
4856  done
4857IFS=$as_save_IFS
4858
4859  ;;
4860esac
4861fi
4862CAT=$ac_cv_path_CAT
4863if test -n "$CAT"; then
4864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4865$as_echo "$CAT" >&6; }
4866else
4867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
4869fi
4870
4871
4872  test -n "$CAT" && break
4873done
4874
4875    else
4876      # If it succeeded, then it was overridden by the user. We will use it
4877      # for the tool.
4878
4879      # First remove it from the list of overridden variables, so we can test
4880      # for unknown variables in the end.
4881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4882
4883      # Check if the provided tool contains a complete path.
4884      tool_specified="$CAT"
4885      tool_basename="${tool_specified##*/}"
4886      if test "x$tool_basename" = "x$tool_specified"; then
4887        # A command without a complete path is provided, search $PATH.
4888        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4889$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4890        # Extract the first word of "$tool_basename", so it can be a program name with args.
4891set dummy $tool_basename; ac_word=$2
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4893$as_echo_n "checking for $ac_word... " >&6; }
4894if ${ac_cv_path_CAT+:} false; then :
4895  $as_echo_n "(cached) " >&6
4896else
4897  case $CAT in
4898  [\\/]* | ?:[\\/]*)
4899  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4900  ;;
4901  *)
4902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4903for as_dir in $PATH
4904do
4905  IFS=$as_save_IFS
4906  test -z "$as_dir" && as_dir=.
4907    for ac_exec_ext in '' $ac_executable_extensions; do
4908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4909    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4911    break 2
4912  fi
4913done
4914  done
4915IFS=$as_save_IFS
4916
4917  ;;
4918esac
4919fi
4920CAT=$ac_cv_path_CAT
4921if test -n "$CAT"; then
4922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4923$as_echo "$CAT" >&6; }
4924else
4925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926$as_echo "no" >&6; }
4927fi
4928
4929
4930        if test "x$CAT" = x; then
4931          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4932        fi
4933      else
4934        # Otherwise we believe it is a complete path. Use it as it is.
4935        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4936$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4937        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4938$as_echo_n "checking for CAT... " >&6; }
4939        if test ! -x "$tool_specified"; then
4940          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4941$as_echo "not found" >&6; }
4942          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4943        fi
4944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4945$as_echo "$tool_specified" >&6; }
4946      fi
4947    fi
4948  fi
4949
4950
4951
4952  if test "x$CAT" = x; then
4953    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4954  fi
4955
4956
4957
4958
4959
4960  # Publish this variable in the help.
4961
4962
4963  if test "x$CHMOD" = x; then
4964    # The variable is not set by user, try to locate tool using the code snippet
4965    for ac_prog in chmod
4966do
4967  # Extract the first word of "$ac_prog", so it can be a program name with args.
4968set dummy $ac_prog; ac_word=$2
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970$as_echo_n "checking for $ac_word... " >&6; }
4971if ${ac_cv_path_CHMOD+:} false; then :
4972  $as_echo_n "(cached) " >&6
4973else
4974  case $CHMOD in
4975  [\\/]* | ?:[\\/]*)
4976  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4977  ;;
4978  *)
4979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in $PATH
4981do
4982  IFS=$as_save_IFS
4983  test -z "$as_dir" && as_dir=.
4984    for ac_exec_ext in '' $ac_executable_extensions; do
4985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988    break 2
4989  fi
4990done
4991  done
4992IFS=$as_save_IFS
4993
4994  ;;
4995esac
4996fi
4997CHMOD=$ac_cv_path_CHMOD
4998if test -n "$CHMOD"; then
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5000$as_echo "$CHMOD" >&6; }
5001else
5002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004fi
5005
5006
5007  test -n "$CHMOD" && break
5008done
5009
5010  else
5011    # The variable is set, but is it from the command line or the environment?
5012
5013    # Try to remove the string !CHMOD! from our list.
5014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5016      # If it failed, the variable was not from the command line. Ignore it,
5017      # but warn the user (except for BASH, which is always set by the calling BASH).
5018      if test "xCHMOD" != xBASH; then
5019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5020$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5021      fi
5022      # Try to locate tool using the code snippet
5023      for ac_prog in chmod
5024do
5025  # Extract the first word of "$ac_prog", so it can be a program name with args.
5026set dummy $ac_prog; ac_word=$2
5027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5028$as_echo_n "checking for $ac_word... " >&6; }
5029if ${ac_cv_path_CHMOD+:} false; then :
5030  $as_echo_n "(cached) " >&6
5031else
5032  case $CHMOD in
5033  [\\/]* | ?:[\\/]*)
5034  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5035  ;;
5036  *)
5037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5038for as_dir in $PATH
5039do
5040  IFS=$as_save_IFS
5041  test -z "$as_dir" && as_dir=.
5042    for ac_exec_ext in '' $ac_executable_extensions; do
5043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5044    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5046    break 2
5047  fi
5048done
5049  done
5050IFS=$as_save_IFS
5051
5052  ;;
5053esac
5054fi
5055CHMOD=$ac_cv_path_CHMOD
5056if test -n "$CHMOD"; then
5057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5058$as_echo "$CHMOD" >&6; }
5059else
5060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5061$as_echo "no" >&6; }
5062fi
5063
5064
5065  test -n "$CHMOD" && break
5066done
5067
5068    else
5069      # If it succeeded, then it was overridden by the user. We will use it
5070      # for the tool.
5071
5072      # First remove it from the list of overridden variables, so we can test
5073      # for unknown variables in the end.
5074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5075
5076      # Check if the provided tool contains a complete path.
5077      tool_specified="$CHMOD"
5078      tool_basename="${tool_specified##*/}"
5079      if test "x$tool_basename" = "x$tool_specified"; then
5080        # A command without a complete path is provided, search $PATH.
5081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5082$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5083        # Extract the first word of "$tool_basename", so it can be a program name with args.
5084set dummy $tool_basename; ac_word=$2
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
5087if ${ac_cv_path_CHMOD+:} false; then :
5088  $as_echo_n "(cached) " >&6
5089else
5090  case $CHMOD in
5091  [\\/]* | ?:[\\/]*)
5092  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5093  ;;
5094  *)
5095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098  IFS=$as_save_IFS
5099  test -z "$as_dir" && as_dir=.
5100    for ac_exec_ext in '' $ac_executable_extensions; do
5101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5102    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104    break 2
5105  fi
5106done
5107  done
5108IFS=$as_save_IFS
5109
5110  ;;
5111esac
5112fi
5113CHMOD=$ac_cv_path_CHMOD
5114if test -n "$CHMOD"; then
5115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5116$as_echo "$CHMOD" >&6; }
5117else
5118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
5120fi
5121
5122
5123        if test "x$CHMOD" = x; then
5124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5125        fi
5126      else
5127        # Otherwise we believe it is a complete path. Use it as it is.
5128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5129$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5131$as_echo_n "checking for CHMOD... " >&6; }
5132        if test ! -x "$tool_specified"; then
5133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5134$as_echo "not found" >&6; }
5135          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5136        fi
5137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5138$as_echo "$tool_specified" >&6; }
5139      fi
5140    fi
5141  fi
5142
5143
5144
5145  if test "x$CHMOD" = x; then
5146    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5147  fi
5148
5149
5150
5151
5152
5153  # Publish this variable in the help.
5154
5155
5156  if test "x$CMP" = x; then
5157    # The variable is not set by user, try to locate tool using the code snippet
5158    for ac_prog in cmp
5159do
5160  # Extract the first word of "$ac_prog", so it can be a program name with args.
5161set dummy $ac_prog; ac_word=$2
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5163$as_echo_n "checking for $ac_word... " >&6; }
5164if ${ac_cv_path_CMP+:} false; then :
5165  $as_echo_n "(cached) " >&6
5166else
5167  case $CMP in
5168  [\\/]* | ?:[\\/]*)
5169  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5170  ;;
5171  *)
5172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175  IFS=$as_save_IFS
5176  test -z "$as_dir" && as_dir=.
5177    for ac_exec_ext in '' $ac_executable_extensions; do
5178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5179    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5181    break 2
5182  fi
5183done
5184  done
5185IFS=$as_save_IFS
5186
5187  ;;
5188esac
5189fi
5190CMP=$ac_cv_path_CMP
5191if test -n "$CMP"; then
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5193$as_echo "$CMP" >&6; }
5194else
5195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
5197fi
5198
5199
5200  test -n "$CMP" && break
5201done
5202
5203  else
5204    # The variable is set, but is it from the command line or the environment?
5205
5206    # Try to remove the string !CMP! from our list.
5207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5209      # If it failed, the variable was not from the command line. Ignore it,
5210      # but warn the user (except for BASH, which is always set by the calling BASH).
5211      if test "xCMP" != xBASH; then
5212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5213$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5214      fi
5215      # Try to locate tool using the code snippet
5216      for ac_prog in cmp
5217do
5218  # Extract the first word of "$ac_prog", so it can be a program name with args.
5219set dummy $ac_prog; ac_word=$2
5220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5221$as_echo_n "checking for $ac_word... " >&6; }
5222if ${ac_cv_path_CMP+:} false; then :
5223  $as_echo_n "(cached) " >&6
5224else
5225  case $CMP in
5226  [\\/]* | ?:[\\/]*)
5227  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5228  ;;
5229  *)
5230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5231for as_dir in $PATH
5232do
5233  IFS=$as_save_IFS
5234  test -z "$as_dir" && as_dir=.
5235    for ac_exec_ext in '' $ac_executable_extensions; do
5236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5237    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5239    break 2
5240  fi
5241done
5242  done
5243IFS=$as_save_IFS
5244
5245  ;;
5246esac
5247fi
5248CMP=$ac_cv_path_CMP
5249if test -n "$CMP"; then
5250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5251$as_echo "$CMP" >&6; }
5252else
5253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5254$as_echo "no" >&6; }
5255fi
5256
5257
5258  test -n "$CMP" && break
5259done
5260
5261    else
5262      # If it succeeded, then it was overridden by the user. We will use it
5263      # for the tool.
5264
5265      # First remove it from the list of overridden variables, so we can test
5266      # for unknown variables in the end.
5267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5268
5269      # Check if the provided tool contains a complete path.
5270      tool_specified="$CMP"
5271      tool_basename="${tool_specified##*/}"
5272      if test "x$tool_basename" = "x$tool_specified"; then
5273        # A command without a complete path is provided, search $PATH.
5274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5275$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5276        # Extract the first word of "$tool_basename", so it can be a program name with args.
5277set dummy $tool_basename; ac_word=$2
5278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5279$as_echo_n "checking for $ac_word... " >&6; }
5280if ${ac_cv_path_CMP+:} false; then :
5281  $as_echo_n "(cached) " >&6
5282else
5283  case $CMP in
5284  [\\/]* | ?:[\\/]*)
5285  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5286  ;;
5287  *)
5288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5289for as_dir in $PATH
5290do
5291  IFS=$as_save_IFS
5292  test -z "$as_dir" && as_dir=.
5293    for ac_exec_ext in '' $ac_executable_extensions; do
5294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5295    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5297    break 2
5298  fi
5299done
5300  done
5301IFS=$as_save_IFS
5302
5303  ;;
5304esac
5305fi
5306CMP=$ac_cv_path_CMP
5307if test -n "$CMP"; then
5308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5309$as_echo "$CMP" >&6; }
5310else
5311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5312$as_echo "no" >&6; }
5313fi
5314
5315
5316        if test "x$CMP" = x; then
5317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5318        fi
5319      else
5320        # Otherwise we believe it is a complete path. Use it as it is.
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5322$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5324$as_echo_n "checking for CMP... " >&6; }
5325        if test ! -x "$tool_specified"; then
5326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5327$as_echo "not found" >&6; }
5328          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5329        fi
5330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5331$as_echo "$tool_specified" >&6; }
5332      fi
5333    fi
5334  fi
5335
5336
5337
5338  if test "x$CMP" = x; then
5339    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5340  fi
5341
5342
5343
5344
5345
5346  # Publish this variable in the help.
5347
5348
5349  if test "x$COMM" = x; then
5350    # The variable is not set by user, try to locate tool using the code snippet
5351    for ac_prog in comm
5352do
5353  # Extract the first word of "$ac_prog", so it can be a program name with args.
5354set dummy $ac_prog; ac_word=$2
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356$as_echo_n "checking for $ac_word... " >&6; }
5357if ${ac_cv_path_COMM+:} false; then :
5358  $as_echo_n "(cached) " >&6
5359else
5360  case $COMM in
5361  [\\/]* | ?:[\\/]*)
5362  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5363  ;;
5364  *)
5365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366for as_dir in $PATH
5367do
5368  IFS=$as_save_IFS
5369  test -z "$as_dir" && as_dir=.
5370    for ac_exec_ext in '' $ac_executable_extensions; do
5371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5372    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374    break 2
5375  fi
5376done
5377  done
5378IFS=$as_save_IFS
5379
5380  ;;
5381esac
5382fi
5383COMM=$ac_cv_path_COMM
5384if test -n "$COMM"; then
5385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5386$as_echo "$COMM" >&6; }
5387else
5388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389$as_echo "no" >&6; }
5390fi
5391
5392
5393  test -n "$COMM" && break
5394done
5395
5396  else
5397    # The variable is set, but is it from the command line or the environment?
5398
5399    # Try to remove the string !COMM! from our list.
5400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5402      # If it failed, the variable was not from the command line. Ignore it,
5403      # but warn the user (except for BASH, which is always set by the calling BASH).
5404      if test "xCOMM" != xBASH; then
5405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5406$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5407      fi
5408      # Try to locate tool using the code snippet
5409      for ac_prog in comm
5410do
5411  # Extract the first word of "$ac_prog", so it can be a program name with args.
5412set dummy $ac_prog; ac_word=$2
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5414$as_echo_n "checking for $ac_word... " >&6; }
5415if ${ac_cv_path_COMM+:} false; then :
5416  $as_echo_n "(cached) " >&6
5417else
5418  case $COMM in
5419  [\\/]* | ?:[\\/]*)
5420  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5421  ;;
5422  *)
5423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5424for as_dir in $PATH
5425do
5426  IFS=$as_save_IFS
5427  test -z "$as_dir" && as_dir=.
5428    for ac_exec_ext in '' $ac_executable_extensions; do
5429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5430    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5432    break 2
5433  fi
5434done
5435  done
5436IFS=$as_save_IFS
5437
5438  ;;
5439esac
5440fi
5441COMM=$ac_cv_path_COMM
5442if test -n "$COMM"; then
5443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5444$as_echo "$COMM" >&6; }
5445else
5446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5447$as_echo "no" >&6; }
5448fi
5449
5450
5451  test -n "$COMM" && break
5452done
5453
5454    else
5455      # If it succeeded, then it was overridden by the user. We will use it
5456      # for the tool.
5457
5458      # First remove it from the list of overridden variables, so we can test
5459      # for unknown variables in the end.
5460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5461
5462      # Check if the provided tool contains a complete path.
5463      tool_specified="$COMM"
5464      tool_basename="${tool_specified##*/}"
5465      if test "x$tool_basename" = "x$tool_specified"; then
5466        # A command without a complete path is provided, search $PATH.
5467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5468$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5469        # Extract the first word of "$tool_basename", so it can be a program name with args.
5470set dummy $tool_basename; ac_word=$2
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5472$as_echo_n "checking for $ac_word... " >&6; }
5473if ${ac_cv_path_COMM+:} false; then :
5474  $as_echo_n "(cached) " >&6
5475else
5476  case $COMM in
5477  [\\/]* | ?:[\\/]*)
5478  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5479  ;;
5480  *)
5481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5482for as_dir in $PATH
5483do
5484  IFS=$as_save_IFS
5485  test -z "$as_dir" && as_dir=.
5486    for ac_exec_ext in '' $ac_executable_extensions; do
5487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5488    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5490    break 2
5491  fi
5492done
5493  done
5494IFS=$as_save_IFS
5495
5496  ;;
5497esac
5498fi
5499COMM=$ac_cv_path_COMM
5500if test -n "$COMM"; then
5501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5502$as_echo "$COMM" >&6; }
5503else
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
5506fi
5507
5508
5509        if test "x$COMM" = x; then
5510          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5511        fi
5512      else
5513        # Otherwise we believe it is a complete path. Use it as it is.
5514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5515$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5517$as_echo_n "checking for COMM... " >&6; }
5518        if test ! -x "$tool_specified"; then
5519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5520$as_echo "not found" >&6; }
5521          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5522        fi
5523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5524$as_echo "$tool_specified" >&6; }
5525      fi
5526    fi
5527  fi
5528
5529
5530
5531  if test "x$COMM" = x; then
5532    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5533  fi
5534
5535
5536
5537
5538
5539  # Publish this variable in the help.
5540
5541
5542  if test "x$CP" = x; then
5543    # The variable is not set by user, try to locate tool using the code snippet
5544    for ac_prog in cp
5545do
5546  # Extract the first word of "$ac_prog", so it can be a program name with args.
5547set dummy $ac_prog; ac_word=$2
5548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5549$as_echo_n "checking for $ac_word... " >&6; }
5550if ${ac_cv_path_CP+:} false; then :
5551  $as_echo_n "(cached) " >&6
5552else
5553  case $CP in
5554  [\\/]* | ?:[\\/]*)
5555  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5556  ;;
5557  *)
5558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5559for as_dir in $PATH
5560do
5561  IFS=$as_save_IFS
5562  test -z "$as_dir" && as_dir=.
5563    for ac_exec_ext in '' $ac_executable_extensions; do
5564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5565    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5567    break 2
5568  fi
5569done
5570  done
5571IFS=$as_save_IFS
5572
5573  ;;
5574esac
5575fi
5576CP=$ac_cv_path_CP
5577if test -n "$CP"; then
5578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5579$as_echo "$CP" >&6; }
5580else
5581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5582$as_echo "no" >&6; }
5583fi
5584
5585
5586  test -n "$CP" && break
5587done
5588
5589  else
5590    # The variable is set, but is it from the command line or the environment?
5591
5592    # Try to remove the string !CP! from our list.
5593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5595      # If it failed, the variable was not from the command line. Ignore it,
5596      # but warn the user (except for BASH, which is always set by the calling BASH).
5597      if test "xCP" != xBASH; then
5598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5599$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5600      fi
5601      # Try to locate tool using the code snippet
5602      for ac_prog in cp
5603do
5604  # Extract the first word of "$ac_prog", so it can be a program name with args.
5605set dummy $ac_prog; ac_word=$2
5606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5607$as_echo_n "checking for $ac_word... " >&6; }
5608if ${ac_cv_path_CP+:} false; then :
5609  $as_echo_n "(cached) " >&6
5610else
5611  case $CP in
5612  [\\/]* | ?:[\\/]*)
5613  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5614  ;;
5615  *)
5616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5617for as_dir in $PATH
5618do
5619  IFS=$as_save_IFS
5620  test -z "$as_dir" && as_dir=.
5621    for ac_exec_ext in '' $ac_executable_extensions; do
5622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5623    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5625    break 2
5626  fi
5627done
5628  done
5629IFS=$as_save_IFS
5630
5631  ;;
5632esac
5633fi
5634CP=$ac_cv_path_CP
5635if test -n "$CP"; then
5636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5637$as_echo "$CP" >&6; }
5638else
5639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5640$as_echo "no" >&6; }
5641fi
5642
5643
5644  test -n "$CP" && break
5645done
5646
5647    else
5648      # If it succeeded, then it was overridden by the user. We will use it
5649      # for the tool.
5650
5651      # First remove it from the list of overridden variables, so we can test
5652      # for unknown variables in the end.
5653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5654
5655      # Check if the provided tool contains a complete path.
5656      tool_specified="$CP"
5657      tool_basename="${tool_specified##*/}"
5658      if test "x$tool_basename" = "x$tool_specified"; then
5659        # A command without a complete path is provided, search $PATH.
5660        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5661$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5662        # Extract the first word of "$tool_basename", so it can be a program name with args.
5663set dummy $tool_basename; ac_word=$2
5664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5665$as_echo_n "checking for $ac_word... " >&6; }
5666if ${ac_cv_path_CP+:} false; then :
5667  $as_echo_n "(cached) " >&6
5668else
5669  case $CP in
5670  [\\/]* | ?:[\\/]*)
5671  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5672  ;;
5673  *)
5674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677  IFS=$as_save_IFS
5678  test -z "$as_dir" && as_dir=.
5679    for ac_exec_ext in '' $ac_executable_extensions; do
5680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5681    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5683    break 2
5684  fi
5685done
5686  done
5687IFS=$as_save_IFS
5688
5689  ;;
5690esac
5691fi
5692CP=$ac_cv_path_CP
5693if test -n "$CP"; then
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5695$as_echo "$CP" >&6; }
5696else
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
5699fi
5700
5701
5702        if test "x$CP" = x; then
5703          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5704        fi
5705      else
5706        # Otherwise we believe it is a complete path. Use it as it is.
5707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5708$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5710$as_echo_n "checking for CP... " >&6; }
5711        if test ! -x "$tool_specified"; then
5712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5713$as_echo "not found" >&6; }
5714          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5715        fi
5716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5717$as_echo "$tool_specified" >&6; }
5718      fi
5719    fi
5720  fi
5721
5722
5723
5724  if test "x$CP" = x; then
5725    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5726  fi
5727
5728
5729
5730
5731
5732  # Publish this variable in the help.
5733
5734
5735  if test "x$CUT" = x; then
5736    # The variable is not set by user, try to locate tool using the code snippet
5737    for ac_prog in cut
5738do
5739  # Extract the first word of "$ac_prog", so it can be a program name with args.
5740set dummy $ac_prog; ac_word=$2
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
5743if ${ac_cv_path_CUT+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746  case $CUT in
5747  [\\/]* | ?:[\\/]*)
5748  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5749  ;;
5750  *)
5751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5752for as_dir in $PATH
5753do
5754  IFS=$as_save_IFS
5755  test -z "$as_dir" && as_dir=.
5756    for ac_exec_ext in '' $ac_executable_extensions; do
5757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5758    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5760    break 2
5761  fi
5762done
5763  done
5764IFS=$as_save_IFS
5765
5766  ;;
5767esac
5768fi
5769CUT=$ac_cv_path_CUT
5770if test -n "$CUT"; then
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5772$as_echo "$CUT" >&6; }
5773else
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775$as_echo "no" >&6; }
5776fi
5777
5778
5779  test -n "$CUT" && break
5780done
5781
5782  else
5783    # The variable is set, but is it from the command line or the environment?
5784
5785    # Try to remove the string !CUT! from our list.
5786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5788      # If it failed, the variable was not from the command line. Ignore it,
5789      # but warn the user (except for BASH, which is always set by the calling BASH).
5790      if test "xCUT" != xBASH; then
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5792$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5793      fi
5794      # Try to locate tool using the code snippet
5795      for ac_prog in cut
5796do
5797  # Extract the first word of "$ac_prog", so it can be a program name with args.
5798set dummy $ac_prog; ac_word=$2
5799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800$as_echo_n "checking for $ac_word... " >&6; }
5801if ${ac_cv_path_CUT+:} false; then :
5802  $as_echo_n "(cached) " >&6
5803else
5804  case $CUT in
5805  [\\/]* | ?:[\\/]*)
5806  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5807  ;;
5808  *)
5809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810for as_dir in $PATH
5811do
5812  IFS=$as_save_IFS
5813  test -z "$as_dir" && as_dir=.
5814    for ac_exec_ext in '' $ac_executable_extensions; do
5815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5816    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818    break 2
5819  fi
5820done
5821  done
5822IFS=$as_save_IFS
5823
5824  ;;
5825esac
5826fi
5827CUT=$ac_cv_path_CUT
5828if test -n "$CUT"; then
5829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5830$as_echo "$CUT" >&6; }
5831else
5832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833$as_echo "no" >&6; }
5834fi
5835
5836
5837  test -n "$CUT" && break
5838done
5839
5840    else
5841      # If it succeeded, then it was overridden by the user. We will use it
5842      # for the tool.
5843
5844      # First remove it from the list of overridden variables, so we can test
5845      # for unknown variables in the end.
5846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5847
5848      # Check if the provided tool contains a complete path.
5849      tool_specified="$CUT"
5850      tool_basename="${tool_specified##*/}"
5851      if test "x$tool_basename" = "x$tool_specified"; then
5852        # A command without a complete path is provided, search $PATH.
5853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5854$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5855        # Extract the first word of "$tool_basename", so it can be a program name with args.
5856set dummy $tool_basename; ac_word=$2
5857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5858$as_echo_n "checking for $ac_word... " >&6; }
5859if ${ac_cv_path_CUT+:} false; then :
5860  $as_echo_n "(cached) " >&6
5861else
5862  case $CUT in
5863  [\\/]* | ?:[\\/]*)
5864  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5865  ;;
5866  *)
5867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5868for as_dir in $PATH
5869do
5870  IFS=$as_save_IFS
5871  test -z "$as_dir" && as_dir=.
5872    for ac_exec_ext in '' $ac_executable_extensions; do
5873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5874    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5876    break 2
5877  fi
5878done
5879  done
5880IFS=$as_save_IFS
5881
5882  ;;
5883esac
5884fi
5885CUT=$ac_cv_path_CUT
5886if test -n "$CUT"; then
5887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5888$as_echo "$CUT" >&6; }
5889else
5890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5891$as_echo "no" >&6; }
5892fi
5893
5894
5895        if test "x$CUT" = x; then
5896          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5897        fi
5898      else
5899        # Otherwise we believe it is a complete path. Use it as it is.
5900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5901$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5903$as_echo_n "checking for CUT... " >&6; }
5904        if test ! -x "$tool_specified"; then
5905          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5906$as_echo "not found" >&6; }
5907          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5908        fi
5909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5910$as_echo "$tool_specified" >&6; }
5911      fi
5912    fi
5913  fi
5914
5915
5916
5917  if test "x$CUT" = x; then
5918    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5919  fi
5920
5921
5922
5923
5924
5925  # Publish this variable in the help.
5926
5927
5928  if test "x$DATE" = x; then
5929    # The variable is not set by user, try to locate tool using the code snippet
5930    for ac_prog in date
5931do
5932  # Extract the first word of "$ac_prog", so it can be a program name with args.
5933set dummy $ac_prog; ac_word=$2
5934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5935$as_echo_n "checking for $ac_word... " >&6; }
5936if ${ac_cv_path_DATE+:} false; then :
5937  $as_echo_n "(cached) " >&6
5938else
5939  case $DATE in
5940  [\\/]* | ?:[\\/]*)
5941  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5942  ;;
5943  *)
5944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5945for as_dir in $PATH
5946do
5947  IFS=$as_save_IFS
5948  test -z "$as_dir" && as_dir=.
5949    for ac_exec_ext in '' $ac_executable_extensions; do
5950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5951    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5953    break 2
5954  fi
5955done
5956  done
5957IFS=$as_save_IFS
5958
5959  ;;
5960esac
5961fi
5962DATE=$ac_cv_path_DATE
5963if test -n "$DATE"; then
5964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5965$as_echo "$DATE" >&6; }
5966else
5967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5968$as_echo "no" >&6; }
5969fi
5970
5971
5972  test -n "$DATE" && break
5973done
5974
5975  else
5976    # The variable is set, but is it from the command line or the environment?
5977
5978    # Try to remove the string !DATE! from our list.
5979    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5980    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5981      # If it failed, the variable was not from the command line. Ignore it,
5982      # but warn the user (except for BASH, which is always set by the calling BASH).
5983      if test "xDATE" != xBASH; then
5984        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5985$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5986      fi
5987      # Try to locate tool using the code snippet
5988      for ac_prog in date
5989do
5990  # Extract the first word of "$ac_prog", so it can be a program name with args.
5991set dummy $ac_prog; ac_word=$2
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5993$as_echo_n "checking for $ac_word... " >&6; }
5994if ${ac_cv_path_DATE+:} false; then :
5995  $as_echo_n "(cached) " >&6
5996else
5997  case $DATE in
5998  [\\/]* | ?:[\\/]*)
5999  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6000  ;;
6001  *)
6002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH
6004do
6005  IFS=$as_save_IFS
6006  test -z "$as_dir" && as_dir=.
6007    for ac_exec_ext in '' $ac_executable_extensions; do
6008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6009    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6011    break 2
6012  fi
6013done
6014  done
6015IFS=$as_save_IFS
6016
6017  ;;
6018esac
6019fi
6020DATE=$ac_cv_path_DATE
6021if test -n "$DATE"; then
6022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6023$as_echo "$DATE" >&6; }
6024else
6025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
6027fi
6028
6029
6030  test -n "$DATE" && break
6031done
6032
6033    else
6034      # If it succeeded, then it was overridden by the user. We will use it
6035      # for the tool.
6036
6037      # First remove it from the list of overridden variables, so we can test
6038      # for unknown variables in the end.
6039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6040
6041      # Check if the provided tool contains a complete path.
6042      tool_specified="$DATE"
6043      tool_basename="${tool_specified##*/}"
6044      if test "x$tool_basename" = "x$tool_specified"; then
6045        # A command without a complete path is provided, search $PATH.
6046        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6047$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6048        # Extract the first word of "$tool_basename", so it can be a program name with args.
6049set dummy $tool_basename; ac_word=$2
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6051$as_echo_n "checking for $ac_word... " >&6; }
6052if ${ac_cv_path_DATE+:} false; then :
6053  $as_echo_n "(cached) " >&6
6054else
6055  case $DATE in
6056  [\\/]* | ?:[\\/]*)
6057  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6058  ;;
6059  *)
6060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063  IFS=$as_save_IFS
6064  test -z "$as_dir" && as_dir=.
6065    for ac_exec_ext in '' $ac_executable_extensions; do
6066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6067    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069    break 2
6070  fi
6071done
6072  done
6073IFS=$as_save_IFS
6074
6075  ;;
6076esac
6077fi
6078DATE=$ac_cv_path_DATE
6079if test -n "$DATE"; then
6080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6081$as_echo "$DATE" >&6; }
6082else
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088        if test "x$DATE" = x; then
6089          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6090        fi
6091      else
6092        # Otherwise we believe it is a complete path. Use it as it is.
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6094$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6096$as_echo_n "checking for DATE... " >&6; }
6097        if test ! -x "$tool_specified"; then
6098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6099$as_echo "not found" >&6; }
6100          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6101        fi
6102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6103$as_echo "$tool_specified" >&6; }
6104      fi
6105    fi
6106  fi
6107
6108
6109
6110  if test "x$DATE" = x; then
6111    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6112  fi
6113
6114
6115
6116
6117
6118  # Publish this variable in the help.
6119
6120
6121  if test "x$DIFF" = x; then
6122    # The variable is not set by user, try to locate tool using the code snippet
6123    for ac_prog in gdiff diff
6124do
6125  # Extract the first word of "$ac_prog", so it can be a program name with args.
6126set dummy $ac_prog; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_path_DIFF+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  case $DIFF in
6133  [\\/]* | ?:[\\/]*)
6134  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6135  ;;
6136  *)
6137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140  IFS=$as_save_IFS
6141  test -z "$as_dir" && as_dir=.
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6144    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146    break 2
6147  fi
6148done
6149  done
6150IFS=$as_save_IFS
6151
6152  ;;
6153esac
6154fi
6155DIFF=$ac_cv_path_DIFF
6156if test -n "$DIFF"; then
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6158$as_echo "$DIFF" >&6; }
6159else
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161$as_echo "no" >&6; }
6162fi
6163
6164
6165  test -n "$DIFF" && break
6166done
6167
6168  else
6169    # The variable is set, but is it from the command line or the environment?
6170
6171    # Try to remove the string !DIFF! from our list.
6172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6174      # If it failed, the variable was not from the command line. Ignore it,
6175      # but warn the user (except for BASH, which is always set by the calling BASH).
6176      if test "xDIFF" != xBASH; then
6177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6178$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6179      fi
6180      # Try to locate tool using the code snippet
6181      for ac_prog in gdiff diff
6182do
6183  # Extract the first word of "$ac_prog", so it can be a program name with args.
6184set dummy $ac_prog; ac_word=$2
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6186$as_echo_n "checking for $ac_word... " >&6; }
6187if ${ac_cv_path_DIFF+:} false; then :
6188  $as_echo_n "(cached) " >&6
6189else
6190  case $DIFF in
6191  [\\/]* | ?:[\\/]*)
6192  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6193  ;;
6194  *)
6195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196for as_dir in $PATH
6197do
6198  IFS=$as_save_IFS
6199  test -z "$as_dir" && as_dir=.
6200    for ac_exec_ext in '' $ac_executable_extensions; do
6201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6202    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6204    break 2
6205  fi
6206done
6207  done
6208IFS=$as_save_IFS
6209
6210  ;;
6211esac
6212fi
6213DIFF=$ac_cv_path_DIFF
6214if test -n "$DIFF"; then
6215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6216$as_echo "$DIFF" >&6; }
6217else
6218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6219$as_echo "no" >&6; }
6220fi
6221
6222
6223  test -n "$DIFF" && break
6224done
6225
6226    else
6227      # If it succeeded, then it was overridden by the user. We will use it
6228      # for the tool.
6229
6230      # First remove it from the list of overridden variables, so we can test
6231      # for unknown variables in the end.
6232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6233
6234      # Check if the provided tool contains a complete path.
6235      tool_specified="$DIFF"
6236      tool_basename="${tool_specified##*/}"
6237      if test "x$tool_basename" = "x$tool_specified"; then
6238        # A command without a complete path is provided, search $PATH.
6239        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6240$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6241        # Extract the first word of "$tool_basename", so it can be a program name with args.
6242set dummy $tool_basename; ac_word=$2
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6244$as_echo_n "checking for $ac_word... " >&6; }
6245if ${ac_cv_path_DIFF+:} false; then :
6246  $as_echo_n "(cached) " >&6
6247else
6248  case $DIFF in
6249  [\\/]* | ?:[\\/]*)
6250  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6251  ;;
6252  *)
6253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6254for as_dir in $PATH
6255do
6256  IFS=$as_save_IFS
6257  test -z "$as_dir" && as_dir=.
6258    for ac_exec_ext in '' $ac_executable_extensions; do
6259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6260    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6262    break 2
6263  fi
6264done
6265  done
6266IFS=$as_save_IFS
6267
6268  ;;
6269esac
6270fi
6271DIFF=$ac_cv_path_DIFF
6272if test -n "$DIFF"; then
6273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6274$as_echo "$DIFF" >&6; }
6275else
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6277$as_echo "no" >&6; }
6278fi
6279
6280
6281        if test "x$DIFF" = x; then
6282          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6283        fi
6284      else
6285        # Otherwise we believe it is a complete path. Use it as it is.
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6287$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6289$as_echo_n "checking for DIFF... " >&6; }
6290        if test ! -x "$tool_specified"; then
6291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6292$as_echo "not found" >&6; }
6293          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6294        fi
6295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6296$as_echo "$tool_specified" >&6; }
6297      fi
6298    fi
6299  fi
6300
6301
6302
6303  if test "x$DIFF" = x; then
6304    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6305  fi
6306
6307
6308
6309
6310
6311  # Publish this variable in the help.
6312
6313
6314  if test "x$DIRNAME" = x; then
6315    # The variable is not set by user, try to locate tool using the code snippet
6316    for ac_prog in dirname
6317do
6318  # Extract the first word of "$ac_prog", so it can be a program name with args.
6319set dummy $ac_prog; ac_word=$2
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6321$as_echo_n "checking for $ac_word... " >&6; }
6322if ${ac_cv_path_DIRNAME+:} false; then :
6323  $as_echo_n "(cached) " >&6
6324else
6325  case $DIRNAME in
6326  [\\/]* | ?:[\\/]*)
6327  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6328  ;;
6329  *)
6330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6331for as_dir in $PATH
6332do
6333  IFS=$as_save_IFS
6334  test -z "$as_dir" && as_dir=.
6335    for ac_exec_ext in '' $ac_executable_extensions; do
6336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6337    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6339    break 2
6340  fi
6341done
6342  done
6343IFS=$as_save_IFS
6344
6345  ;;
6346esac
6347fi
6348DIRNAME=$ac_cv_path_DIRNAME
6349if test -n "$DIRNAME"; then
6350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6351$as_echo "$DIRNAME" >&6; }
6352else
6353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6354$as_echo "no" >&6; }
6355fi
6356
6357
6358  test -n "$DIRNAME" && break
6359done
6360
6361  else
6362    # The variable is set, but is it from the command line or the environment?
6363
6364    # Try to remove the string !DIRNAME! from our list.
6365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6367      # If it failed, the variable was not from the command line. Ignore it,
6368      # but warn the user (except for BASH, which is always set by the calling BASH).
6369      if test "xDIRNAME" != xBASH; then
6370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6371$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6372      fi
6373      # Try to locate tool using the code snippet
6374      for ac_prog in dirname
6375do
6376  # Extract the first word of "$ac_prog", so it can be a program name with args.
6377set dummy $ac_prog; ac_word=$2
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6379$as_echo_n "checking for $ac_word... " >&6; }
6380if ${ac_cv_path_DIRNAME+:} false; then :
6381  $as_echo_n "(cached) " >&6
6382else
6383  case $DIRNAME in
6384  [\\/]* | ?:[\\/]*)
6385  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6386  ;;
6387  *)
6388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389for as_dir in $PATH
6390do
6391  IFS=$as_save_IFS
6392  test -z "$as_dir" && as_dir=.
6393    for ac_exec_ext in '' $ac_executable_extensions; do
6394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6395    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6397    break 2
6398  fi
6399done
6400  done
6401IFS=$as_save_IFS
6402
6403  ;;
6404esac
6405fi
6406DIRNAME=$ac_cv_path_DIRNAME
6407if test -n "$DIRNAME"; then
6408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6409$as_echo "$DIRNAME" >&6; }
6410else
6411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; }
6413fi
6414
6415
6416  test -n "$DIRNAME" && break
6417done
6418
6419    else
6420      # If it succeeded, then it was overridden by the user. We will use it
6421      # for the tool.
6422
6423      # First remove it from the list of overridden variables, so we can test
6424      # for unknown variables in the end.
6425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6426
6427      # Check if the provided tool contains a complete path.
6428      tool_specified="$DIRNAME"
6429      tool_basename="${tool_specified##*/}"
6430      if test "x$tool_basename" = "x$tool_specified"; then
6431        # A command without a complete path is provided, search $PATH.
6432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6433$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6434        # Extract the first word of "$tool_basename", so it can be a program name with args.
6435set dummy $tool_basename; ac_word=$2
6436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6437$as_echo_n "checking for $ac_word... " >&6; }
6438if ${ac_cv_path_DIRNAME+:} false; then :
6439  $as_echo_n "(cached) " >&6
6440else
6441  case $DIRNAME in
6442  [\\/]* | ?:[\\/]*)
6443  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6444  ;;
6445  *)
6446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6447for as_dir in $PATH
6448do
6449  IFS=$as_save_IFS
6450  test -z "$as_dir" && as_dir=.
6451    for ac_exec_ext in '' $ac_executable_extensions; do
6452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6453    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6455    break 2
6456  fi
6457done
6458  done
6459IFS=$as_save_IFS
6460
6461  ;;
6462esac
6463fi
6464DIRNAME=$ac_cv_path_DIRNAME
6465if test -n "$DIRNAME"; then
6466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6467$as_echo "$DIRNAME" >&6; }
6468else
6469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
6471fi
6472
6473
6474        if test "x$DIRNAME" = x; then
6475          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6476        fi
6477      else
6478        # Otherwise we believe it is a complete path. Use it as it is.
6479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6480$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6482$as_echo_n "checking for DIRNAME... " >&6; }
6483        if test ! -x "$tool_specified"; then
6484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6485$as_echo "not found" >&6; }
6486          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6487        fi
6488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6489$as_echo "$tool_specified" >&6; }
6490      fi
6491    fi
6492  fi
6493
6494
6495
6496  if test "x$DIRNAME" = x; then
6497    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6498  fi
6499
6500
6501
6502
6503
6504  # Publish this variable in the help.
6505
6506
6507  if test "x$ECHO" = x; then
6508    # The variable is not set by user, try to locate tool using the code snippet
6509    for ac_prog in echo
6510do
6511  # Extract the first word of "$ac_prog", so it can be a program name with args.
6512set dummy $ac_prog; ac_word=$2
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6514$as_echo_n "checking for $ac_word... " >&6; }
6515if ${ac_cv_path_ECHO+:} false; then :
6516  $as_echo_n "(cached) " >&6
6517else
6518  case $ECHO in
6519  [\\/]* | ?:[\\/]*)
6520  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6521  ;;
6522  *)
6523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6524for as_dir in $PATH
6525do
6526  IFS=$as_save_IFS
6527  test -z "$as_dir" && as_dir=.
6528    for ac_exec_ext in '' $ac_executable_extensions; do
6529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6530    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6532    break 2
6533  fi
6534done
6535  done
6536IFS=$as_save_IFS
6537
6538  ;;
6539esac
6540fi
6541ECHO=$ac_cv_path_ECHO
6542if test -n "$ECHO"; then
6543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6544$as_echo "$ECHO" >&6; }
6545else
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6547$as_echo "no" >&6; }
6548fi
6549
6550
6551  test -n "$ECHO" && break
6552done
6553
6554  else
6555    # The variable is set, but is it from the command line or the environment?
6556
6557    # Try to remove the string !ECHO! from our list.
6558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6560      # If it failed, the variable was not from the command line. Ignore it,
6561      # but warn the user (except for BASH, which is always set by the calling BASH).
6562      if test "xECHO" != xBASH; then
6563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6564$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6565      fi
6566      # Try to locate tool using the code snippet
6567      for ac_prog in echo
6568do
6569  # Extract the first word of "$ac_prog", so it can be a program name with args.
6570set dummy $ac_prog; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_path_ECHO+:} false; then :
6574  $as_echo_n "(cached) " >&6
6575else
6576  case $ECHO in
6577  [\\/]* | ?:[\\/]*)
6578  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6579  ;;
6580  *)
6581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in $PATH
6583do
6584  IFS=$as_save_IFS
6585  test -z "$as_dir" && as_dir=.
6586    for ac_exec_ext in '' $ac_executable_extensions; do
6587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6588    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590    break 2
6591  fi
6592done
6593  done
6594IFS=$as_save_IFS
6595
6596  ;;
6597esac
6598fi
6599ECHO=$ac_cv_path_ECHO
6600if test -n "$ECHO"; then
6601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6602$as_echo "$ECHO" >&6; }
6603else
6604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
6606fi
6607
6608
6609  test -n "$ECHO" && break
6610done
6611
6612    else
6613      # If it succeeded, then it was overridden by the user. We will use it
6614      # for the tool.
6615
6616      # First remove it from the list of overridden variables, so we can test
6617      # for unknown variables in the end.
6618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6619
6620      # Check if the provided tool contains a complete path.
6621      tool_specified="$ECHO"
6622      tool_basename="${tool_specified##*/}"
6623      if test "x$tool_basename" = "x$tool_specified"; then
6624        # A command without a complete path is provided, search $PATH.
6625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6626$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6627        # Extract the first word of "$tool_basename", so it can be a program name with args.
6628set dummy $tool_basename; ac_word=$2
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630$as_echo_n "checking for $ac_word... " >&6; }
6631if ${ac_cv_path_ECHO+:} false; then :
6632  $as_echo_n "(cached) " >&6
6633else
6634  case $ECHO in
6635  [\\/]* | ?:[\\/]*)
6636  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6637  ;;
6638  *)
6639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640for as_dir in $PATH
6641do
6642  IFS=$as_save_IFS
6643  test -z "$as_dir" && as_dir=.
6644    for ac_exec_ext in '' $ac_executable_extensions; do
6645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6646    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648    break 2
6649  fi
6650done
6651  done
6652IFS=$as_save_IFS
6653
6654  ;;
6655esac
6656fi
6657ECHO=$ac_cv_path_ECHO
6658if test -n "$ECHO"; then
6659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6660$as_echo "$ECHO" >&6; }
6661else
6662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663$as_echo "no" >&6; }
6664fi
6665
6666
6667        if test "x$ECHO" = x; then
6668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6669        fi
6670      else
6671        # Otherwise we believe it is a complete path. Use it as it is.
6672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6673$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6675$as_echo_n "checking for ECHO... " >&6; }
6676        if test ! -x "$tool_specified"; then
6677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6678$as_echo "not found" >&6; }
6679          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6680        fi
6681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6682$as_echo "$tool_specified" >&6; }
6683      fi
6684    fi
6685  fi
6686
6687
6688
6689  if test "x$ECHO" = x; then
6690    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6691  fi
6692
6693
6694
6695
6696
6697  # Publish this variable in the help.
6698
6699
6700  if test "x$EXPR" = x; then
6701    # The variable is not set by user, try to locate tool using the code snippet
6702    for ac_prog in expr
6703do
6704  # Extract the first word of "$ac_prog", so it can be a program name with args.
6705set dummy $ac_prog; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_EXPR+:} false; then :
6709  $as_echo_n "(cached) " >&6
6710else
6711  case $EXPR in
6712  [\\/]* | ?:[\\/]*)
6713  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6714  ;;
6715  *)
6716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in $PATH
6718do
6719  IFS=$as_save_IFS
6720  test -z "$as_dir" && as_dir=.
6721    for ac_exec_ext in '' $ac_executable_extensions; do
6722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725    break 2
6726  fi
6727done
6728  done
6729IFS=$as_save_IFS
6730
6731  ;;
6732esac
6733fi
6734EXPR=$ac_cv_path_EXPR
6735if test -n "$EXPR"; then
6736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6737$as_echo "$EXPR" >&6; }
6738else
6739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742
6743
6744  test -n "$EXPR" && break
6745done
6746
6747  else
6748    # The variable is set, but is it from the command line or the environment?
6749
6750    # Try to remove the string !EXPR! from our list.
6751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6753      # If it failed, the variable was not from the command line. Ignore it,
6754      # but warn the user (except for BASH, which is always set by the calling BASH).
6755      if test "xEXPR" != xBASH; then
6756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6757$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6758      fi
6759      # Try to locate tool using the code snippet
6760      for ac_prog in expr
6761do
6762  # Extract the first word of "$ac_prog", so it can be a program name with args.
6763set dummy $ac_prog; ac_word=$2
6764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6765$as_echo_n "checking for $ac_word... " >&6; }
6766if ${ac_cv_path_EXPR+:} false; then :
6767  $as_echo_n "(cached) " >&6
6768else
6769  case $EXPR in
6770  [\\/]* | ?:[\\/]*)
6771  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6772  ;;
6773  *)
6774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6775for as_dir in $PATH
6776do
6777  IFS=$as_save_IFS
6778  test -z "$as_dir" && as_dir=.
6779    for ac_exec_ext in '' $ac_executable_extensions; do
6780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6781    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6783    break 2
6784  fi
6785done
6786  done
6787IFS=$as_save_IFS
6788
6789  ;;
6790esac
6791fi
6792EXPR=$ac_cv_path_EXPR
6793if test -n "$EXPR"; then
6794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6795$as_echo "$EXPR" >&6; }
6796else
6797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6798$as_echo "no" >&6; }
6799fi
6800
6801
6802  test -n "$EXPR" && break
6803done
6804
6805    else
6806      # If it succeeded, then it was overridden by the user. We will use it
6807      # for the tool.
6808
6809      # First remove it from the list of overridden variables, so we can test
6810      # for unknown variables in the end.
6811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6812
6813      # Check if the provided tool contains a complete path.
6814      tool_specified="$EXPR"
6815      tool_basename="${tool_specified##*/}"
6816      if test "x$tool_basename" = "x$tool_specified"; then
6817        # A command without a complete path is provided, search $PATH.
6818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6819$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6820        # Extract the first word of "$tool_basename", so it can be a program name with args.
6821set dummy $tool_basename; ac_word=$2
6822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6823$as_echo_n "checking for $ac_word... " >&6; }
6824if ${ac_cv_path_EXPR+:} false; then :
6825  $as_echo_n "(cached) " >&6
6826else
6827  case $EXPR in
6828  [\\/]* | ?:[\\/]*)
6829  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6830  ;;
6831  *)
6832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6833for as_dir in $PATH
6834do
6835  IFS=$as_save_IFS
6836  test -z "$as_dir" && as_dir=.
6837    for ac_exec_ext in '' $ac_executable_extensions; do
6838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6839    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6841    break 2
6842  fi
6843done
6844  done
6845IFS=$as_save_IFS
6846
6847  ;;
6848esac
6849fi
6850EXPR=$ac_cv_path_EXPR
6851if test -n "$EXPR"; then
6852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6853$as_echo "$EXPR" >&6; }
6854else
6855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6856$as_echo "no" >&6; }
6857fi
6858
6859
6860        if test "x$EXPR" = x; then
6861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6862        fi
6863      else
6864        # Otherwise we believe it is a complete path. Use it as it is.
6865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6866$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6868$as_echo_n "checking for EXPR... " >&6; }
6869        if test ! -x "$tool_specified"; then
6870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6871$as_echo "not found" >&6; }
6872          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6873        fi
6874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6875$as_echo "$tool_specified" >&6; }
6876      fi
6877    fi
6878  fi
6879
6880
6881
6882  if test "x$EXPR" = x; then
6883    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6884  fi
6885
6886
6887
6888
6889
6890  # Publish this variable in the help.
6891
6892
6893  if test "x$FILE" = x; then
6894    # The variable is not set by user, try to locate tool using the code snippet
6895    for ac_prog in file
6896do
6897  # Extract the first word of "$ac_prog", so it can be a program name with args.
6898set dummy $ac_prog; ac_word=$2
6899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6900$as_echo_n "checking for $ac_word... " >&6; }
6901if ${ac_cv_path_FILE+:} false; then :
6902  $as_echo_n "(cached) " >&6
6903else
6904  case $FILE in
6905  [\\/]* | ?:[\\/]*)
6906  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6907  ;;
6908  *)
6909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6910for as_dir in $PATH
6911do
6912  IFS=$as_save_IFS
6913  test -z "$as_dir" && as_dir=.
6914    for ac_exec_ext in '' $ac_executable_extensions; do
6915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6916    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6918    break 2
6919  fi
6920done
6921  done
6922IFS=$as_save_IFS
6923
6924  ;;
6925esac
6926fi
6927FILE=$ac_cv_path_FILE
6928if test -n "$FILE"; then
6929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6930$as_echo "$FILE" >&6; }
6931else
6932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6933$as_echo "no" >&6; }
6934fi
6935
6936
6937  test -n "$FILE" && break
6938done
6939
6940  else
6941    # The variable is set, but is it from the command line or the environment?
6942
6943    # Try to remove the string !FILE! from our list.
6944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6946      # If it failed, the variable was not from the command line. Ignore it,
6947      # but warn the user (except for BASH, which is always set by the calling BASH).
6948      if test "xFILE" != xBASH; then
6949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6950$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6951      fi
6952      # Try to locate tool using the code snippet
6953      for ac_prog in file
6954do
6955  # Extract the first word of "$ac_prog", so it can be a program name with args.
6956set dummy $ac_prog; ac_word=$2
6957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6958$as_echo_n "checking for $ac_word... " >&6; }
6959if ${ac_cv_path_FILE+:} false; then :
6960  $as_echo_n "(cached) " >&6
6961else
6962  case $FILE in
6963  [\\/]* | ?:[\\/]*)
6964  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6965  ;;
6966  *)
6967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6968for as_dir in $PATH
6969do
6970  IFS=$as_save_IFS
6971  test -z "$as_dir" && as_dir=.
6972    for ac_exec_ext in '' $ac_executable_extensions; do
6973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6974    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6976    break 2
6977  fi
6978done
6979  done
6980IFS=$as_save_IFS
6981
6982  ;;
6983esac
6984fi
6985FILE=$ac_cv_path_FILE
6986if test -n "$FILE"; then
6987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6988$as_echo "$FILE" >&6; }
6989else
6990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6991$as_echo "no" >&6; }
6992fi
6993
6994
6995  test -n "$FILE" && break
6996done
6997
6998    else
6999      # If it succeeded, then it was overridden by the user. We will use it
7000      # for the tool.
7001
7002      # First remove it from the list of overridden variables, so we can test
7003      # for unknown variables in the end.
7004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7005
7006      # Check if the provided tool contains a complete path.
7007      tool_specified="$FILE"
7008      tool_basename="${tool_specified##*/}"
7009      if test "x$tool_basename" = "x$tool_specified"; then
7010        # A command without a complete path is provided, search $PATH.
7011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7012$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7013        # Extract the first word of "$tool_basename", so it can be a program name with args.
7014set dummy $tool_basename; ac_word=$2
7015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7016$as_echo_n "checking for $ac_word... " >&6; }
7017if ${ac_cv_path_FILE+:} false; then :
7018  $as_echo_n "(cached) " >&6
7019else
7020  case $FILE in
7021  [\\/]* | ?:[\\/]*)
7022  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7023  ;;
7024  *)
7025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7026for as_dir in $PATH
7027do
7028  IFS=$as_save_IFS
7029  test -z "$as_dir" && as_dir=.
7030    for ac_exec_ext in '' $ac_executable_extensions; do
7031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7032    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7034    break 2
7035  fi
7036done
7037  done
7038IFS=$as_save_IFS
7039
7040  ;;
7041esac
7042fi
7043FILE=$ac_cv_path_FILE
7044if test -n "$FILE"; then
7045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7046$as_echo "$FILE" >&6; }
7047else
7048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7049$as_echo "no" >&6; }
7050fi
7051
7052
7053        if test "x$FILE" = x; then
7054          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7055        fi
7056      else
7057        # Otherwise we believe it is a complete path. Use it as it is.
7058        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7059$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7061$as_echo_n "checking for FILE... " >&6; }
7062        if test ! -x "$tool_specified"; then
7063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7064$as_echo "not found" >&6; }
7065          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7066        fi
7067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7068$as_echo "$tool_specified" >&6; }
7069      fi
7070    fi
7071  fi
7072
7073
7074
7075  if test "x$FILE" = x; then
7076    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7077  fi
7078
7079
7080
7081
7082
7083  # Publish this variable in the help.
7084
7085
7086  if test "x$FIND" = x; then
7087    # The variable is not set by user, try to locate tool using the code snippet
7088    for ac_prog in find
7089do
7090  # Extract the first word of "$ac_prog", so it can be a program name with args.
7091set dummy $ac_prog; ac_word=$2
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7093$as_echo_n "checking for $ac_word... " >&6; }
7094if ${ac_cv_path_FIND+:} false; then :
7095  $as_echo_n "(cached) " >&6
7096else
7097  case $FIND in
7098  [\\/]* | ?:[\\/]*)
7099  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7100  ;;
7101  *)
7102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103for as_dir in $PATH
7104do
7105  IFS=$as_save_IFS
7106  test -z "$as_dir" && as_dir=.
7107    for ac_exec_ext in '' $ac_executable_extensions; do
7108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7109    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7111    break 2
7112  fi
7113done
7114  done
7115IFS=$as_save_IFS
7116
7117  ;;
7118esac
7119fi
7120FIND=$ac_cv_path_FIND
7121if test -n "$FIND"; then
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7123$as_echo "$FIND" >&6; }
7124else
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7126$as_echo "no" >&6; }
7127fi
7128
7129
7130  test -n "$FIND" && break
7131done
7132
7133  else
7134    # The variable is set, but is it from the command line or the environment?
7135
7136    # Try to remove the string !FIND! from our list.
7137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7139      # If it failed, the variable was not from the command line. Ignore it,
7140      # but warn the user (except for BASH, which is always set by the calling BASH).
7141      if test "xFIND" != xBASH; then
7142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7143$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7144      fi
7145      # Try to locate tool using the code snippet
7146      for ac_prog in find
7147do
7148  # Extract the first word of "$ac_prog", so it can be a program name with args.
7149set dummy $ac_prog; ac_word=$2
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151$as_echo_n "checking for $ac_word... " >&6; }
7152if ${ac_cv_path_FIND+:} false; then :
7153  $as_echo_n "(cached) " >&6
7154else
7155  case $FIND in
7156  [\\/]* | ?:[\\/]*)
7157  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7158  ;;
7159  *)
7160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7161for as_dir in $PATH
7162do
7163  IFS=$as_save_IFS
7164  test -z "$as_dir" && as_dir=.
7165    for ac_exec_ext in '' $ac_executable_extensions; do
7166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7167    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7169    break 2
7170  fi
7171done
7172  done
7173IFS=$as_save_IFS
7174
7175  ;;
7176esac
7177fi
7178FIND=$ac_cv_path_FIND
7179if test -n "$FIND"; then
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7181$as_echo "$FIND" >&6; }
7182else
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184$as_echo "no" >&6; }
7185fi
7186
7187
7188  test -n "$FIND" && break
7189done
7190
7191    else
7192      # If it succeeded, then it was overridden by the user. We will use it
7193      # for the tool.
7194
7195      # First remove it from the list of overridden variables, so we can test
7196      # for unknown variables in the end.
7197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7198
7199      # Check if the provided tool contains a complete path.
7200      tool_specified="$FIND"
7201      tool_basename="${tool_specified##*/}"
7202      if test "x$tool_basename" = "x$tool_specified"; then
7203        # A command without a complete path is provided, search $PATH.
7204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7205$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7206        # Extract the first word of "$tool_basename", so it can be a program name with args.
7207set dummy $tool_basename; ac_word=$2
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209$as_echo_n "checking for $ac_word... " >&6; }
7210if ${ac_cv_path_FIND+:} false; then :
7211  $as_echo_n "(cached) " >&6
7212else
7213  case $FIND in
7214  [\\/]* | ?:[\\/]*)
7215  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7216  ;;
7217  *)
7218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219for as_dir in $PATH
7220do
7221  IFS=$as_save_IFS
7222  test -z "$as_dir" && as_dir=.
7223    for ac_exec_ext in '' $ac_executable_extensions; do
7224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7225    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7227    break 2
7228  fi
7229done
7230  done
7231IFS=$as_save_IFS
7232
7233  ;;
7234esac
7235fi
7236FIND=$ac_cv_path_FIND
7237if test -n "$FIND"; then
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7239$as_echo "$FIND" >&6; }
7240else
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
7243fi
7244
7245
7246        if test "x$FIND" = x; then
7247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7248        fi
7249      else
7250        # Otherwise we believe it is a complete path. Use it as it is.
7251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7252$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7254$as_echo_n "checking for FIND... " >&6; }
7255        if test ! -x "$tool_specified"; then
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7257$as_echo "not found" >&6; }
7258          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7259        fi
7260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7261$as_echo "$tool_specified" >&6; }
7262      fi
7263    fi
7264  fi
7265
7266
7267
7268  if test "x$FIND" = x; then
7269    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7270  fi
7271
7272
7273
7274
7275
7276  # Publish this variable in the help.
7277
7278
7279  if test "x$HEAD" = x; then
7280    # The variable is not set by user, try to locate tool using the code snippet
7281    for ac_prog in head
7282do
7283  # Extract the first word of "$ac_prog", so it can be a program name with args.
7284set dummy $ac_prog; ac_word=$2
7285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7286$as_echo_n "checking for $ac_word... " >&6; }
7287if ${ac_cv_path_HEAD+:} false; then :
7288  $as_echo_n "(cached) " >&6
7289else
7290  case $HEAD in
7291  [\\/]* | ?:[\\/]*)
7292  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7293  ;;
7294  *)
7295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7296for as_dir in $PATH
7297do
7298  IFS=$as_save_IFS
7299  test -z "$as_dir" && as_dir=.
7300    for ac_exec_ext in '' $ac_executable_extensions; do
7301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7302    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7304    break 2
7305  fi
7306done
7307  done
7308IFS=$as_save_IFS
7309
7310  ;;
7311esac
7312fi
7313HEAD=$ac_cv_path_HEAD
7314if test -n "$HEAD"; then
7315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7316$as_echo "$HEAD" >&6; }
7317else
7318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7319$as_echo "no" >&6; }
7320fi
7321
7322
7323  test -n "$HEAD" && break
7324done
7325
7326  else
7327    # The variable is set, but is it from the command line or the environment?
7328
7329    # Try to remove the string !HEAD! from our list.
7330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7332      # If it failed, the variable was not from the command line. Ignore it,
7333      # but warn the user (except for BASH, which is always set by the calling BASH).
7334      if test "xHEAD" != xBASH; then
7335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7336$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7337      fi
7338      # Try to locate tool using the code snippet
7339      for ac_prog in head
7340do
7341  # Extract the first word of "$ac_prog", so it can be a program name with args.
7342set dummy $ac_prog; ac_word=$2
7343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7344$as_echo_n "checking for $ac_word... " >&6; }
7345if ${ac_cv_path_HEAD+:} false; then :
7346  $as_echo_n "(cached) " >&6
7347else
7348  case $HEAD in
7349  [\\/]* | ?:[\\/]*)
7350  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7351  ;;
7352  *)
7353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7354for as_dir in $PATH
7355do
7356  IFS=$as_save_IFS
7357  test -z "$as_dir" && as_dir=.
7358    for ac_exec_ext in '' $ac_executable_extensions; do
7359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7360    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7362    break 2
7363  fi
7364done
7365  done
7366IFS=$as_save_IFS
7367
7368  ;;
7369esac
7370fi
7371HEAD=$ac_cv_path_HEAD
7372if test -n "$HEAD"; then
7373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7374$as_echo "$HEAD" >&6; }
7375else
7376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7377$as_echo "no" >&6; }
7378fi
7379
7380
7381  test -n "$HEAD" && break
7382done
7383
7384    else
7385      # If it succeeded, then it was overridden by the user. We will use it
7386      # for the tool.
7387
7388      # First remove it from the list of overridden variables, so we can test
7389      # for unknown variables in the end.
7390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7391
7392      # Check if the provided tool contains a complete path.
7393      tool_specified="$HEAD"
7394      tool_basename="${tool_specified##*/}"
7395      if test "x$tool_basename" = "x$tool_specified"; then
7396        # A command without a complete path is provided, search $PATH.
7397        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7398$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7399        # Extract the first word of "$tool_basename", so it can be a program name with args.
7400set dummy $tool_basename; ac_word=$2
7401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7402$as_echo_n "checking for $ac_word... " >&6; }
7403if ${ac_cv_path_HEAD+:} false; then :
7404  $as_echo_n "(cached) " >&6
7405else
7406  case $HEAD in
7407  [\\/]* | ?:[\\/]*)
7408  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7409  ;;
7410  *)
7411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7412for as_dir in $PATH
7413do
7414  IFS=$as_save_IFS
7415  test -z "$as_dir" && as_dir=.
7416    for ac_exec_ext in '' $ac_executable_extensions; do
7417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7418    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7420    break 2
7421  fi
7422done
7423  done
7424IFS=$as_save_IFS
7425
7426  ;;
7427esac
7428fi
7429HEAD=$ac_cv_path_HEAD
7430if test -n "$HEAD"; then
7431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7432$as_echo "$HEAD" >&6; }
7433else
7434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7435$as_echo "no" >&6; }
7436fi
7437
7438
7439        if test "x$HEAD" = x; then
7440          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7441        fi
7442      else
7443        # Otherwise we believe it is a complete path. Use it as it is.
7444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7445$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7447$as_echo_n "checking for HEAD... " >&6; }
7448        if test ! -x "$tool_specified"; then
7449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7450$as_echo "not found" >&6; }
7451          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7452        fi
7453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7454$as_echo "$tool_specified" >&6; }
7455      fi
7456    fi
7457  fi
7458
7459
7460
7461  if test "x$HEAD" = x; then
7462    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7463  fi
7464
7465
7466
7467
7468
7469  # Publish this variable in the help.
7470
7471
7472  if test "x$LN" = x; then
7473    # The variable is not set by user, try to locate tool using the code snippet
7474    for ac_prog in ln
7475do
7476  # Extract the first word of "$ac_prog", so it can be a program name with args.
7477set dummy $ac_prog; ac_word=$2
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479$as_echo_n "checking for $ac_word... " >&6; }
7480if ${ac_cv_path_LN+:} false; then :
7481  $as_echo_n "(cached) " >&6
7482else
7483  case $LN in
7484  [\\/]* | ?:[\\/]*)
7485  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7486  ;;
7487  *)
7488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7489for as_dir in $PATH
7490do
7491  IFS=$as_save_IFS
7492  test -z "$as_dir" && as_dir=.
7493    for ac_exec_ext in '' $ac_executable_extensions; do
7494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7495    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7497    break 2
7498  fi
7499done
7500  done
7501IFS=$as_save_IFS
7502
7503  ;;
7504esac
7505fi
7506LN=$ac_cv_path_LN
7507if test -n "$LN"; then
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7509$as_echo "$LN" >&6; }
7510else
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513fi
7514
7515
7516  test -n "$LN" && break
7517done
7518
7519  else
7520    # The variable is set, but is it from the command line or the environment?
7521
7522    # Try to remove the string !LN! from our list.
7523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7525      # If it failed, the variable was not from the command line. Ignore it,
7526      # but warn the user (except for BASH, which is always set by the calling BASH).
7527      if test "xLN" != xBASH; then
7528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7529$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7530      fi
7531      # Try to locate tool using the code snippet
7532      for ac_prog in ln
7533do
7534  # Extract the first word of "$ac_prog", so it can be a program name with args.
7535set dummy $ac_prog; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_LN+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $LN in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564LN=$ac_cv_path_LN
7565if test -n "$LN"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7567$as_echo "$LN" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574  test -n "$LN" && break
7575done
7576
7577    else
7578      # If it succeeded, then it was overridden by the user. We will use it
7579      # for the tool.
7580
7581      # First remove it from the list of overridden variables, so we can test
7582      # for unknown variables in the end.
7583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7584
7585      # Check if the provided tool contains a complete path.
7586      tool_specified="$LN"
7587      tool_basename="${tool_specified##*/}"
7588      if test "x$tool_basename" = "x$tool_specified"; then
7589        # A command without a complete path is provided, search $PATH.
7590        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7591$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7592        # Extract the first word of "$tool_basename", so it can be a program name with args.
7593set dummy $tool_basename; ac_word=$2
7594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7595$as_echo_n "checking for $ac_word... " >&6; }
7596if ${ac_cv_path_LN+:} false; then :
7597  $as_echo_n "(cached) " >&6
7598else
7599  case $LN in
7600  [\\/]* | ?:[\\/]*)
7601  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7602  ;;
7603  *)
7604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7605for as_dir in $PATH
7606do
7607  IFS=$as_save_IFS
7608  test -z "$as_dir" && as_dir=.
7609    for ac_exec_ext in '' $ac_executable_extensions; do
7610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7611    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7613    break 2
7614  fi
7615done
7616  done
7617IFS=$as_save_IFS
7618
7619  ;;
7620esac
7621fi
7622LN=$ac_cv_path_LN
7623if test -n "$LN"; then
7624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7625$as_echo "$LN" >&6; }
7626else
7627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7628$as_echo "no" >&6; }
7629fi
7630
7631
7632        if test "x$LN" = x; then
7633          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7634        fi
7635      else
7636        # Otherwise we believe it is a complete path. Use it as it is.
7637        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7638$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7640$as_echo_n "checking for LN... " >&6; }
7641        if test ! -x "$tool_specified"; then
7642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7643$as_echo "not found" >&6; }
7644          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7645        fi
7646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7647$as_echo "$tool_specified" >&6; }
7648      fi
7649    fi
7650  fi
7651
7652
7653
7654  if test "x$LN" = x; then
7655    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7656  fi
7657
7658
7659
7660
7661
7662  # Publish this variable in the help.
7663
7664
7665  if test "x$LS" = x; then
7666    # The variable is not set by user, try to locate tool using the code snippet
7667    for ac_prog in ls
7668do
7669  # Extract the first word of "$ac_prog", so it can be a program name with args.
7670set dummy $ac_prog; ac_word=$2
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672$as_echo_n "checking for $ac_word... " >&6; }
7673if ${ac_cv_path_LS+:} false; then :
7674  $as_echo_n "(cached) " >&6
7675else
7676  case $LS in
7677  [\\/]* | ?:[\\/]*)
7678  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7679  ;;
7680  *)
7681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682for as_dir in $PATH
7683do
7684  IFS=$as_save_IFS
7685  test -z "$as_dir" && as_dir=.
7686    for ac_exec_ext in '' $ac_executable_extensions; do
7687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7688    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7690    break 2
7691  fi
7692done
7693  done
7694IFS=$as_save_IFS
7695
7696  ;;
7697esac
7698fi
7699LS=$ac_cv_path_LS
7700if test -n "$LS"; then
7701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7702$as_echo "$LS" >&6; }
7703else
7704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705$as_echo "no" >&6; }
7706fi
7707
7708
7709  test -n "$LS" && break
7710done
7711
7712  else
7713    # The variable is set, but is it from the command line or the environment?
7714
7715    # Try to remove the string !LS! from our list.
7716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7718      # If it failed, the variable was not from the command line. Ignore it,
7719      # but warn the user (except for BASH, which is always set by the calling BASH).
7720      if test "xLS" != xBASH; then
7721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7722$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7723      fi
7724      # Try to locate tool using the code snippet
7725      for ac_prog in ls
7726do
7727  # Extract the first word of "$ac_prog", so it can be a program name with args.
7728set dummy $ac_prog; ac_word=$2
7729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7730$as_echo_n "checking for $ac_word... " >&6; }
7731if ${ac_cv_path_LS+:} false; then :
7732  $as_echo_n "(cached) " >&6
7733else
7734  case $LS in
7735  [\\/]* | ?:[\\/]*)
7736  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7737  ;;
7738  *)
7739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7740for as_dir in $PATH
7741do
7742  IFS=$as_save_IFS
7743  test -z "$as_dir" && as_dir=.
7744    for ac_exec_ext in '' $ac_executable_extensions; do
7745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7746    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7748    break 2
7749  fi
7750done
7751  done
7752IFS=$as_save_IFS
7753
7754  ;;
7755esac
7756fi
7757LS=$ac_cv_path_LS
7758if test -n "$LS"; then
7759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7760$as_echo "$LS" >&6; }
7761else
7762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7763$as_echo "no" >&6; }
7764fi
7765
7766
7767  test -n "$LS" && break
7768done
7769
7770    else
7771      # If it succeeded, then it was overridden by the user. We will use it
7772      # for the tool.
7773
7774      # First remove it from the list of overridden variables, so we can test
7775      # for unknown variables in the end.
7776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7777
7778      # Check if the provided tool contains a complete path.
7779      tool_specified="$LS"
7780      tool_basename="${tool_specified##*/}"
7781      if test "x$tool_basename" = "x$tool_specified"; then
7782        # A command without a complete path is provided, search $PATH.
7783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7784$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7785        # Extract the first word of "$tool_basename", so it can be a program name with args.
7786set dummy $tool_basename; ac_word=$2
7787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7788$as_echo_n "checking for $ac_word... " >&6; }
7789if ${ac_cv_path_LS+:} false; then :
7790  $as_echo_n "(cached) " >&6
7791else
7792  case $LS in
7793  [\\/]* | ?:[\\/]*)
7794  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7795  ;;
7796  *)
7797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7798for as_dir in $PATH
7799do
7800  IFS=$as_save_IFS
7801  test -z "$as_dir" && as_dir=.
7802    for ac_exec_ext in '' $ac_executable_extensions; do
7803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7804    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7806    break 2
7807  fi
7808done
7809  done
7810IFS=$as_save_IFS
7811
7812  ;;
7813esac
7814fi
7815LS=$ac_cv_path_LS
7816if test -n "$LS"; then
7817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7818$as_echo "$LS" >&6; }
7819else
7820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7821$as_echo "no" >&6; }
7822fi
7823
7824
7825        if test "x$LS" = x; then
7826          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7827        fi
7828      else
7829        # Otherwise we believe it is a complete path. Use it as it is.
7830        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7831$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7833$as_echo_n "checking for LS... " >&6; }
7834        if test ! -x "$tool_specified"; then
7835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7836$as_echo "not found" >&6; }
7837          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7838        fi
7839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7840$as_echo "$tool_specified" >&6; }
7841      fi
7842    fi
7843  fi
7844
7845
7846
7847  if test "x$LS" = x; then
7848    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7849  fi
7850
7851
7852
7853
7854
7855  # Publish this variable in the help.
7856
7857
7858  if test "x$MKDIR" = x; then
7859    # The variable is not set by user, try to locate tool using the code snippet
7860    for ac_prog in mkdir
7861do
7862  # Extract the first word of "$ac_prog", so it can be a program name with args.
7863set dummy $ac_prog; ac_word=$2
7864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7865$as_echo_n "checking for $ac_word... " >&6; }
7866if ${ac_cv_path_MKDIR+:} false; then :
7867  $as_echo_n "(cached) " >&6
7868else
7869  case $MKDIR in
7870  [\\/]* | ?:[\\/]*)
7871  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7872  ;;
7873  *)
7874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7875for as_dir in $PATH
7876do
7877  IFS=$as_save_IFS
7878  test -z "$as_dir" && as_dir=.
7879    for ac_exec_ext in '' $ac_executable_extensions; do
7880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7881    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7883    break 2
7884  fi
7885done
7886  done
7887IFS=$as_save_IFS
7888
7889  ;;
7890esac
7891fi
7892MKDIR=$ac_cv_path_MKDIR
7893if test -n "$MKDIR"; then
7894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7895$as_echo "$MKDIR" >&6; }
7896else
7897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7898$as_echo "no" >&6; }
7899fi
7900
7901
7902  test -n "$MKDIR" && break
7903done
7904
7905  else
7906    # The variable is set, but is it from the command line or the environment?
7907
7908    # Try to remove the string !MKDIR! from our list.
7909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7911      # If it failed, the variable was not from the command line. Ignore it,
7912      # but warn the user (except for BASH, which is always set by the calling BASH).
7913      if test "xMKDIR" != xBASH; then
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7915$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7916      fi
7917      # Try to locate tool using the code snippet
7918      for ac_prog in mkdir
7919do
7920  # Extract the first word of "$ac_prog", so it can be a program name with args.
7921set dummy $ac_prog; ac_word=$2
7922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7923$as_echo_n "checking for $ac_word... " >&6; }
7924if ${ac_cv_path_MKDIR+:} false; then :
7925  $as_echo_n "(cached) " >&6
7926else
7927  case $MKDIR in
7928  [\\/]* | ?:[\\/]*)
7929  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7930  ;;
7931  *)
7932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7933for as_dir in $PATH
7934do
7935  IFS=$as_save_IFS
7936  test -z "$as_dir" && as_dir=.
7937    for ac_exec_ext in '' $ac_executable_extensions; do
7938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7939    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7941    break 2
7942  fi
7943done
7944  done
7945IFS=$as_save_IFS
7946
7947  ;;
7948esac
7949fi
7950MKDIR=$ac_cv_path_MKDIR
7951if test -n "$MKDIR"; then
7952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7953$as_echo "$MKDIR" >&6; }
7954else
7955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7956$as_echo "no" >&6; }
7957fi
7958
7959
7960  test -n "$MKDIR" && break
7961done
7962
7963    else
7964      # If it succeeded, then it was overridden by the user. We will use it
7965      # for the tool.
7966
7967      # First remove it from the list of overridden variables, so we can test
7968      # for unknown variables in the end.
7969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7970
7971      # Check if the provided tool contains a complete path.
7972      tool_specified="$MKDIR"
7973      tool_basename="${tool_specified##*/}"
7974      if test "x$tool_basename" = "x$tool_specified"; then
7975        # A command without a complete path is provided, search $PATH.
7976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7977$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7978        # Extract the first word of "$tool_basename", so it can be a program name with args.
7979set dummy $tool_basename; ac_word=$2
7980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7981$as_echo_n "checking for $ac_word... " >&6; }
7982if ${ac_cv_path_MKDIR+:} false; then :
7983  $as_echo_n "(cached) " >&6
7984else
7985  case $MKDIR in
7986  [\\/]* | ?:[\\/]*)
7987  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7988  ;;
7989  *)
7990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7991for as_dir in $PATH
7992do
7993  IFS=$as_save_IFS
7994  test -z "$as_dir" && as_dir=.
7995    for ac_exec_ext in '' $ac_executable_extensions; do
7996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7997    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7999    break 2
8000  fi
8001done
8002  done
8003IFS=$as_save_IFS
8004
8005  ;;
8006esac
8007fi
8008MKDIR=$ac_cv_path_MKDIR
8009if test -n "$MKDIR"; then
8010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8011$as_echo "$MKDIR" >&6; }
8012else
8013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8014$as_echo "no" >&6; }
8015fi
8016
8017
8018        if test "x$MKDIR" = x; then
8019          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8020        fi
8021      else
8022        # Otherwise we believe it is a complete path. Use it as it is.
8023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8024$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8026$as_echo_n "checking for MKDIR... " >&6; }
8027        if test ! -x "$tool_specified"; then
8028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8029$as_echo "not found" >&6; }
8030          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8031        fi
8032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8033$as_echo "$tool_specified" >&6; }
8034      fi
8035    fi
8036  fi
8037
8038
8039
8040  if test "x$MKDIR" = x; then
8041    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8042  fi
8043
8044
8045
8046
8047
8048  # Publish this variable in the help.
8049
8050
8051  if test "x$MKTEMP" = x; then
8052    # The variable is not set by user, try to locate tool using the code snippet
8053    for ac_prog in mktemp
8054do
8055  # Extract the first word of "$ac_prog", so it can be a program name with args.
8056set dummy $ac_prog; ac_word=$2
8057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058$as_echo_n "checking for $ac_word... " >&6; }
8059if ${ac_cv_path_MKTEMP+:} false; then :
8060  $as_echo_n "(cached) " >&6
8061else
8062  case $MKTEMP in
8063  [\\/]* | ?:[\\/]*)
8064  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8065  ;;
8066  *)
8067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068for as_dir in $PATH
8069do
8070  IFS=$as_save_IFS
8071  test -z "$as_dir" && as_dir=.
8072    for ac_exec_ext in '' $ac_executable_extensions; do
8073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8074    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8076    break 2
8077  fi
8078done
8079  done
8080IFS=$as_save_IFS
8081
8082  ;;
8083esac
8084fi
8085MKTEMP=$ac_cv_path_MKTEMP
8086if test -n "$MKTEMP"; then
8087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8088$as_echo "$MKTEMP" >&6; }
8089else
8090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091$as_echo "no" >&6; }
8092fi
8093
8094
8095  test -n "$MKTEMP" && break
8096done
8097
8098  else
8099    # The variable is set, but is it from the command line or the environment?
8100
8101    # Try to remove the string !MKTEMP! from our list.
8102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8104      # If it failed, the variable was not from the command line. Ignore it,
8105      # but warn the user (except for BASH, which is always set by the calling BASH).
8106      if test "xMKTEMP" != xBASH; then
8107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8108$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8109      fi
8110      # Try to locate tool using the code snippet
8111      for ac_prog in mktemp
8112do
8113  # Extract the first word of "$ac_prog", so it can be a program name with args.
8114set dummy $ac_prog; ac_word=$2
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8116$as_echo_n "checking for $ac_word... " >&6; }
8117if ${ac_cv_path_MKTEMP+:} false; then :
8118  $as_echo_n "(cached) " >&6
8119else
8120  case $MKTEMP in
8121  [\\/]* | ?:[\\/]*)
8122  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8123  ;;
8124  *)
8125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8126for as_dir in $PATH
8127do
8128  IFS=$as_save_IFS
8129  test -z "$as_dir" && as_dir=.
8130    for ac_exec_ext in '' $ac_executable_extensions; do
8131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8132    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8134    break 2
8135  fi
8136done
8137  done
8138IFS=$as_save_IFS
8139
8140  ;;
8141esac
8142fi
8143MKTEMP=$ac_cv_path_MKTEMP
8144if test -n "$MKTEMP"; then
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8146$as_echo "$MKTEMP" >&6; }
8147else
8148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
8150fi
8151
8152
8153  test -n "$MKTEMP" && break
8154done
8155
8156    else
8157      # If it succeeded, then it was overridden by the user. We will use it
8158      # for the tool.
8159
8160      # First remove it from the list of overridden variables, so we can test
8161      # for unknown variables in the end.
8162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8163
8164      # Check if the provided tool contains a complete path.
8165      tool_specified="$MKTEMP"
8166      tool_basename="${tool_specified##*/}"
8167      if test "x$tool_basename" = "x$tool_specified"; then
8168        # A command without a complete path is provided, search $PATH.
8169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8170$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8171        # Extract the first word of "$tool_basename", so it can be a program name with args.
8172set dummy $tool_basename; ac_word=$2
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8174$as_echo_n "checking for $ac_word... " >&6; }
8175if ${ac_cv_path_MKTEMP+:} false; then :
8176  $as_echo_n "(cached) " >&6
8177else
8178  case $MKTEMP in
8179  [\\/]* | ?:[\\/]*)
8180  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8181  ;;
8182  *)
8183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8184for as_dir in $PATH
8185do
8186  IFS=$as_save_IFS
8187  test -z "$as_dir" && as_dir=.
8188    for ac_exec_ext in '' $ac_executable_extensions; do
8189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8190    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8192    break 2
8193  fi
8194done
8195  done
8196IFS=$as_save_IFS
8197
8198  ;;
8199esac
8200fi
8201MKTEMP=$ac_cv_path_MKTEMP
8202if test -n "$MKTEMP"; then
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8204$as_echo "$MKTEMP" >&6; }
8205else
8206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8207$as_echo "no" >&6; }
8208fi
8209
8210
8211        if test "x$MKTEMP" = x; then
8212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8213        fi
8214      else
8215        # Otherwise we believe it is a complete path. Use it as it is.
8216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8217$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8219$as_echo_n "checking for MKTEMP... " >&6; }
8220        if test ! -x "$tool_specified"; then
8221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8222$as_echo "not found" >&6; }
8223          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8224        fi
8225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8226$as_echo "$tool_specified" >&6; }
8227      fi
8228    fi
8229  fi
8230
8231
8232
8233  if test "x$MKTEMP" = x; then
8234    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8235  fi
8236
8237
8238
8239
8240
8241  # Publish this variable in the help.
8242
8243
8244  if test "x$MV" = x; then
8245    # The variable is not set by user, try to locate tool using the code snippet
8246    for ac_prog in mv
8247do
8248  # Extract the first word of "$ac_prog", so it can be a program name with args.
8249set dummy $ac_prog; ac_word=$2
8250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8251$as_echo_n "checking for $ac_word... " >&6; }
8252if ${ac_cv_path_MV+:} false; then :
8253  $as_echo_n "(cached) " >&6
8254else
8255  case $MV in
8256  [\\/]* | ?:[\\/]*)
8257  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8258  ;;
8259  *)
8260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8261for as_dir in $PATH
8262do
8263  IFS=$as_save_IFS
8264  test -z "$as_dir" && as_dir=.
8265    for ac_exec_ext in '' $ac_executable_extensions; do
8266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8267    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8269    break 2
8270  fi
8271done
8272  done
8273IFS=$as_save_IFS
8274
8275  ;;
8276esac
8277fi
8278MV=$ac_cv_path_MV
8279if test -n "$MV"; then
8280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8281$as_echo "$MV" >&6; }
8282else
8283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284$as_echo "no" >&6; }
8285fi
8286
8287
8288  test -n "$MV" && break
8289done
8290
8291  else
8292    # The variable is set, but is it from the command line or the environment?
8293
8294    # Try to remove the string !MV! from our list.
8295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8297      # If it failed, the variable was not from the command line. Ignore it,
8298      # but warn the user (except for BASH, which is always set by the calling BASH).
8299      if test "xMV" != xBASH; then
8300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8301$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8302      fi
8303      # Try to locate tool using the code snippet
8304      for ac_prog in mv
8305do
8306  # Extract the first word of "$ac_prog", so it can be a program name with args.
8307set dummy $ac_prog; ac_word=$2
8308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8309$as_echo_n "checking for $ac_word... " >&6; }
8310if ${ac_cv_path_MV+:} false; then :
8311  $as_echo_n "(cached) " >&6
8312else
8313  case $MV in
8314  [\\/]* | ?:[\\/]*)
8315  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8316  ;;
8317  *)
8318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8319for as_dir in $PATH
8320do
8321  IFS=$as_save_IFS
8322  test -z "$as_dir" && as_dir=.
8323    for ac_exec_ext in '' $ac_executable_extensions; do
8324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8325    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8327    break 2
8328  fi
8329done
8330  done
8331IFS=$as_save_IFS
8332
8333  ;;
8334esac
8335fi
8336MV=$ac_cv_path_MV
8337if test -n "$MV"; then
8338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8339$as_echo "$MV" >&6; }
8340else
8341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8342$as_echo "no" >&6; }
8343fi
8344
8345
8346  test -n "$MV" && break
8347done
8348
8349    else
8350      # If it succeeded, then it was overridden by the user. We will use it
8351      # for the tool.
8352
8353      # First remove it from the list of overridden variables, so we can test
8354      # for unknown variables in the end.
8355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8356
8357      # Check if the provided tool contains a complete path.
8358      tool_specified="$MV"
8359      tool_basename="${tool_specified##*/}"
8360      if test "x$tool_basename" = "x$tool_specified"; then
8361        # A command without a complete path is provided, search $PATH.
8362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8363$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8364        # Extract the first word of "$tool_basename", so it can be a program name with args.
8365set dummy $tool_basename; ac_word=$2
8366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8367$as_echo_n "checking for $ac_word... " >&6; }
8368if ${ac_cv_path_MV+:} false; then :
8369  $as_echo_n "(cached) " >&6
8370else
8371  case $MV in
8372  [\\/]* | ?:[\\/]*)
8373  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8374  ;;
8375  *)
8376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8377for as_dir in $PATH
8378do
8379  IFS=$as_save_IFS
8380  test -z "$as_dir" && as_dir=.
8381    for ac_exec_ext in '' $ac_executable_extensions; do
8382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8383    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8385    break 2
8386  fi
8387done
8388  done
8389IFS=$as_save_IFS
8390
8391  ;;
8392esac
8393fi
8394MV=$ac_cv_path_MV
8395if test -n "$MV"; then
8396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8397$as_echo "$MV" >&6; }
8398else
8399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8400$as_echo "no" >&6; }
8401fi
8402
8403
8404        if test "x$MV" = x; then
8405          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8406        fi
8407      else
8408        # Otherwise we believe it is a complete path. Use it as it is.
8409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8410$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8412$as_echo_n "checking for MV... " >&6; }
8413        if test ! -x "$tool_specified"; then
8414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8415$as_echo "not found" >&6; }
8416          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8417        fi
8418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8419$as_echo "$tool_specified" >&6; }
8420      fi
8421    fi
8422  fi
8423
8424
8425
8426  if test "x$MV" = x; then
8427    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8428  fi
8429
8430
8431
8432
8433
8434  # Publish this variable in the help.
8435
8436
8437  if test "x$NAWK" = x; then
8438    # The variable is not set by user, try to locate tool using the code snippet
8439    for ac_prog in nawk gawk awk
8440do
8441  # Extract the first word of "$ac_prog", so it can be a program name with args.
8442set dummy $ac_prog; ac_word=$2
8443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8444$as_echo_n "checking for $ac_word... " >&6; }
8445if ${ac_cv_path_NAWK+:} false; then :
8446  $as_echo_n "(cached) " >&6
8447else
8448  case $NAWK in
8449  [\\/]* | ?:[\\/]*)
8450  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8451  ;;
8452  *)
8453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8454for as_dir in $PATH
8455do
8456  IFS=$as_save_IFS
8457  test -z "$as_dir" && as_dir=.
8458    for ac_exec_ext in '' $ac_executable_extensions; do
8459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8460    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8462    break 2
8463  fi
8464done
8465  done
8466IFS=$as_save_IFS
8467
8468  ;;
8469esac
8470fi
8471NAWK=$ac_cv_path_NAWK
8472if test -n "$NAWK"; then
8473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8474$as_echo "$NAWK" >&6; }
8475else
8476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8477$as_echo "no" >&6; }
8478fi
8479
8480
8481  test -n "$NAWK" && break
8482done
8483
8484  else
8485    # The variable is set, but is it from the command line or the environment?
8486
8487    # Try to remove the string !NAWK! from our list.
8488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8490      # If it failed, the variable was not from the command line. Ignore it,
8491      # but warn the user (except for BASH, which is always set by the calling BASH).
8492      if test "xNAWK" != xBASH; then
8493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8494$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8495      fi
8496      # Try to locate tool using the code snippet
8497      for ac_prog in nawk gawk awk
8498do
8499  # Extract the first word of "$ac_prog", so it can be a program name with args.
8500set dummy $ac_prog; ac_word=$2
8501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8502$as_echo_n "checking for $ac_word... " >&6; }
8503if ${ac_cv_path_NAWK+:} false; then :
8504  $as_echo_n "(cached) " >&6
8505else
8506  case $NAWK in
8507  [\\/]* | ?:[\\/]*)
8508  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8509  ;;
8510  *)
8511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8512for as_dir in $PATH
8513do
8514  IFS=$as_save_IFS
8515  test -z "$as_dir" && as_dir=.
8516    for ac_exec_ext in '' $ac_executable_extensions; do
8517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8518    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8520    break 2
8521  fi
8522done
8523  done
8524IFS=$as_save_IFS
8525
8526  ;;
8527esac
8528fi
8529NAWK=$ac_cv_path_NAWK
8530if test -n "$NAWK"; then
8531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8532$as_echo "$NAWK" >&6; }
8533else
8534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8535$as_echo "no" >&6; }
8536fi
8537
8538
8539  test -n "$NAWK" && break
8540done
8541
8542    else
8543      # If it succeeded, then it was overridden by the user. We will use it
8544      # for the tool.
8545
8546      # First remove it from the list of overridden variables, so we can test
8547      # for unknown variables in the end.
8548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8549
8550      # Check if the provided tool contains a complete path.
8551      tool_specified="$NAWK"
8552      tool_basename="${tool_specified##*/}"
8553      if test "x$tool_basename" = "x$tool_specified"; then
8554        # A command without a complete path is provided, search $PATH.
8555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8556$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8557        # Extract the first word of "$tool_basename", so it can be a program name with args.
8558set dummy $tool_basename; ac_word=$2
8559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8560$as_echo_n "checking for $ac_word... " >&6; }
8561if ${ac_cv_path_NAWK+:} false; then :
8562  $as_echo_n "(cached) " >&6
8563else
8564  case $NAWK in
8565  [\\/]* | ?:[\\/]*)
8566  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8567  ;;
8568  *)
8569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8570for as_dir in $PATH
8571do
8572  IFS=$as_save_IFS
8573  test -z "$as_dir" && as_dir=.
8574    for ac_exec_ext in '' $ac_executable_extensions; do
8575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8576    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8578    break 2
8579  fi
8580done
8581  done
8582IFS=$as_save_IFS
8583
8584  ;;
8585esac
8586fi
8587NAWK=$ac_cv_path_NAWK
8588if test -n "$NAWK"; then
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8590$as_echo "$NAWK" >&6; }
8591else
8592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8593$as_echo "no" >&6; }
8594fi
8595
8596
8597        if test "x$NAWK" = x; then
8598          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8599        fi
8600      else
8601        # Otherwise we believe it is a complete path. Use it as it is.
8602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8603$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8605$as_echo_n "checking for NAWK... " >&6; }
8606        if test ! -x "$tool_specified"; then
8607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8608$as_echo "not found" >&6; }
8609          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8610        fi
8611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8612$as_echo "$tool_specified" >&6; }
8613      fi
8614    fi
8615  fi
8616
8617
8618
8619  if test "x$NAWK" = x; then
8620    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8621  fi
8622
8623
8624
8625
8626
8627  # Publish this variable in the help.
8628
8629
8630  if test "x$PRINTF" = x; then
8631    # The variable is not set by user, try to locate tool using the code snippet
8632    for ac_prog in printf
8633do
8634  # Extract the first word of "$ac_prog", so it can be a program name with args.
8635set dummy $ac_prog; ac_word=$2
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8637$as_echo_n "checking for $ac_word... " >&6; }
8638if ${ac_cv_path_PRINTF+:} false; then :
8639  $as_echo_n "(cached) " >&6
8640else
8641  case $PRINTF in
8642  [\\/]* | ?:[\\/]*)
8643  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8644  ;;
8645  *)
8646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8647for as_dir in $PATH
8648do
8649  IFS=$as_save_IFS
8650  test -z "$as_dir" && as_dir=.
8651    for ac_exec_ext in '' $ac_executable_extensions; do
8652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8653    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8655    break 2
8656  fi
8657done
8658  done
8659IFS=$as_save_IFS
8660
8661  ;;
8662esac
8663fi
8664PRINTF=$ac_cv_path_PRINTF
8665if test -n "$PRINTF"; then
8666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8667$as_echo "$PRINTF" >&6; }
8668else
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670$as_echo "no" >&6; }
8671fi
8672
8673
8674  test -n "$PRINTF" && break
8675done
8676
8677  else
8678    # The variable is set, but is it from the command line or the environment?
8679
8680    # Try to remove the string !PRINTF! from our list.
8681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8683      # If it failed, the variable was not from the command line. Ignore it,
8684      # but warn the user (except for BASH, which is always set by the calling BASH).
8685      if test "xPRINTF" != xBASH; then
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8687$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8688      fi
8689      # Try to locate tool using the code snippet
8690      for ac_prog in printf
8691do
8692  # Extract the first word of "$ac_prog", so it can be a program name with args.
8693set dummy $ac_prog; ac_word=$2
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8695$as_echo_n "checking for $ac_word... " >&6; }
8696if ${ac_cv_path_PRINTF+:} false; then :
8697  $as_echo_n "(cached) " >&6
8698else
8699  case $PRINTF in
8700  [\\/]* | ?:[\\/]*)
8701  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8702  ;;
8703  *)
8704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8705for as_dir in $PATH
8706do
8707  IFS=$as_save_IFS
8708  test -z "$as_dir" && as_dir=.
8709    for ac_exec_ext in '' $ac_executable_extensions; do
8710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8711    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8713    break 2
8714  fi
8715done
8716  done
8717IFS=$as_save_IFS
8718
8719  ;;
8720esac
8721fi
8722PRINTF=$ac_cv_path_PRINTF
8723if test -n "$PRINTF"; then
8724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8725$as_echo "$PRINTF" >&6; }
8726else
8727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8728$as_echo "no" >&6; }
8729fi
8730
8731
8732  test -n "$PRINTF" && break
8733done
8734
8735    else
8736      # If it succeeded, then it was overridden by the user. We will use it
8737      # for the tool.
8738
8739      # First remove it from the list of overridden variables, so we can test
8740      # for unknown variables in the end.
8741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8742
8743      # Check if the provided tool contains a complete path.
8744      tool_specified="$PRINTF"
8745      tool_basename="${tool_specified##*/}"
8746      if test "x$tool_basename" = "x$tool_specified"; then
8747        # A command without a complete path is provided, search $PATH.
8748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8749$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8750        # Extract the first word of "$tool_basename", so it can be a program name with args.
8751set dummy $tool_basename; ac_word=$2
8752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8753$as_echo_n "checking for $ac_word... " >&6; }
8754if ${ac_cv_path_PRINTF+:} false; then :
8755  $as_echo_n "(cached) " >&6
8756else
8757  case $PRINTF in
8758  [\\/]* | ?:[\\/]*)
8759  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8760  ;;
8761  *)
8762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8763for as_dir in $PATH
8764do
8765  IFS=$as_save_IFS
8766  test -z "$as_dir" && as_dir=.
8767    for ac_exec_ext in '' $ac_executable_extensions; do
8768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8769    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8771    break 2
8772  fi
8773done
8774  done
8775IFS=$as_save_IFS
8776
8777  ;;
8778esac
8779fi
8780PRINTF=$ac_cv_path_PRINTF
8781if test -n "$PRINTF"; then
8782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8783$as_echo "$PRINTF" >&6; }
8784else
8785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8786$as_echo "no" >&6; }
8787fi
8788
8789
8790        if test "x$PRINTF" = x; then
8791          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8792        fi
8793      else
8794        # Otherwise we believe it is a complete path. Use it as it is.
8795        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8796$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8798$as_echo_n "checking for PRINTF... " >&6; }
8799        if test ! -x "$tool_specified"; then
8800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8801$as_echo "not found" >&6; }
8802          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8803        fi
8804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8805$as_echo "$tool_specified" >&6; }
8806      fi
8807    fi
8808  fi
8809
8810
8811
8812  if test "x$PRINTF" = x; then
8813    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8814  fi
8815
8816
8817
8818
8819
8820  # Publish this variable in the help.
8821
8822
8823  if test "x$RM" = x; then
8824    # The variable is not set by user, try to locate tool using the code snippet
8825    for ac_prog in rm
8826do
8827  # Extract the first word of "$ac_prog", so it can be a program name with args.
8828set dummy $ac_prog; ac_word=$2
8829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8830$as_echo_n "checking for $ac_word... " >&6; }
8831if ${ac_cv_path_RM+:} false; then :
8832  $as_echo_n "(cached) " >&6
8833else
8834  case $RM in
8835  [\\/]* | ?:[\\/]*)
8836  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8837  ;;
8838  *)
8839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8840for as_dir in $PATH
8841do
8842  IFS=$as_save_IFS
8843  test -z "$as_dir" && as_dir=.
8844    for ac_exec_ext in '' $ac_executable_extensions; do
8845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8846    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8848    break 2
8849  fi
8850done
8851  done
8852IFS=$as_save_IFS
8853
8854  ;;
8855esac
8856fi
8857RM=$ac_cv_path_RM
8858if test -n "$RM"; then
8859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8860$as_echo "$RM" >&6; }
8861else
8862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8863$as_echo "no" >&6; }
8864fi
8865
8866
8867  test -n "$RM" && break
8868done
8869
8870  else
8871    # The variable is set, but is it from the command line or the environment?
8872
8873    # Try to remove the string !RM! from our list.
8874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8876      # If it failed, the variable was not from the command line. Ignore it,
8877      # but warn the user (except for BASH, which is always set by the calling BASH).
8878      if test "xRM" != xBASH; then
8879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8880$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8881      fi
8882      # Try to locate tool using the code snippet
8883      for ac_prog in rm
8884do
8885  # Extract the first word of "$ac_prog", so it can be a program name with args.
8886set dummy $ac_prog; ac_word=$2
8887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8888$as_echo_n "checking for $ac_word... " >&6; }
8889if ${ac_cv_path_RM+:} false; then :
8890  $as_echo_n "(cached) " >&6
8891else
8892  case $RM in
8893  [\\/]* | ?:[\\/]*)
8894  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8895  ;;
8896  *)
8897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8898for as_dir in $PATH
8899do
8900  IFS=$as_save_IFS
8901  test -z "$as_dir" && as_dir=.
8902    for ac_exec_ext in '' $ac_executable_extensions; do
8903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8904    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8906    break 2
8907  fi
8908done
8909  done
8910IFS=$as_save_IFS
8911
8912  ;;
8913esac
8914fi
8915RM=$ac_cv_path_RM
8916if test -n "$RM"; then
8917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8918$as_echo "$RM" >&6; }
8919else
8920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8921$as_echo "no" >&6; }
8922fi
8923
8924
8925  test -n "$RM" && break
8926done
8927
8928    else
8929      # If it succeeded, then it was overridden by the user. We will use it
8930      # for the tool.
8931
8932      # First remove it from the list of overridden variables, so we can test
8933      # for unknown variables in the end.
8934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8935
8936      # Check if the provided tool contains a complete path.
8937      tool_specified="$RM"
8938      tool_basename="${tool_specified##*/}"
8939      if test "x$tool_basename" = "x$tool_specified"; then
8940        # A command without a complete path is provided, search $PATH.
8941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8942$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8943        # Extract the first word of "$tool_basename", so it can be a program name with args.
8944set dummy $tool_basename; ac_word=$2
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946$as_echo_n "checking for $ac_word... " >&6; }
8947if ${ac_cv_path_RM+:} false; then :
8948  $as_echo_n "(cached) " >&6
8949else
8950  case $RM in
8951  [\\/]* | ?:[\\/]*)
8952  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8953  ;;
8954  *)
8955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8956for as_dir in $PATH
8957do
8958  IFS=$as_save_IFS
8959  test -z "$as_dir" && as_dir=.
8960    for ac_exec_ext in '' $ac_executable_extensions; do
8961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8962    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8964    break 2
8965  fi
8966done
8967  done
8968IFS=$as_save_IFS
8969
8970  ;;
8971esac
8972fi
8973RM=$ac_cv_path_RM
8974if test -n "$RM"; then
8975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8976$as_echo "$RM" >&6; }
8977else
8978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979$as_echo "no" >&6; }
8980fi
8981
8982
8983        if test "x$RM" = x; then
8984          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8985        fi
8986      else
8987        # Otherwise we believe it is a complete path. Use it as it is.
8988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8989$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8991$as_echo_n "checking for RM... " >&6; }
8992        if test ! -x "$tool_specified"; then
8993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8994$as_echo "not found" >&6; }
8995          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8996        fi
8997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8998$as_echo "$tool_specified" >&6; }
8999      fi
9000    fi
9001  fi
9002
9003
9004
9005  if test "x$RM" = x; then
9006    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9007  fi
9008
9009
9010
9011
9012
9013  # Publish this variable in the help.
9014
9015
9016  if test "x$SH" = x; then
9017    # The variable is not set by user, try to locate tool using the code snippet
9018    for ac_prog in sh
9019do
9020  # Extract the first word of "$ac_prog", so it can be a program name with args.
9021set dummy $ac_prog; ac_word=$2
9022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9023$as_echo_n "checking for $ac_word... " >&6; }
9024if ${ac_cv_path_SH+:} false; then :
9025  $as_echo_n "(cached) " >&6
9026else
9027  case $SH in
9028  [\\/]* | ?:[\\/]*)
9029  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9030  ;;
9031  *)
9032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9033for as_dir in $PATH
9034do
9035  IFS=$as_save_IFS
9036  test -z "$as_dir" && as_dir=.
9037    for ac_exec_ext in '' $ac_executable_extensions; do
9038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9039    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9041    break 2
9042  fi
9043done
9044  done
9045IFS=$as_save_IFS
9046
9047  ;;
9048esac
9049fi
9050SH=$ac_cv_path_SH
9051if test -n "$SH"; then
9052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9053$as_echo "$SH" >&6; }
9054else
9055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056$as_echo "no" >&6; }
9057fi
9058
9059
9060  test -n "$SH" && break
9061done
9062
9063  else
9064    # The variable is set, but is it from the command line or the environment?
9065
9066    # Try to remove the string !SH! from our list.
9067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9069      # If it failed, the variable was not from the command line. Ignore it,
9070      # but warn the user (except for BASH, which is always set by the calling BASH).
9071      if test "xSH" != xBASH; then
9072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9073$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9074      fi
9075      # Try to locate tool using the code snippet
9076      for ac_prog in sh
9077do
9078  # Extract the first word of "$ac_prog", so it can be a program name with args.
9079set dummy $ac_prog; ac_word=$2
9080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9081$as_echo_n "checking for $ac_word... " >&6; }
9082if ${ac_cv_path_SH+:} false; then :
9083  $as_echo_n "(cached) " >&6
9084else
9085  case $SH in
9086  [\\/]* | ?:[\\/]*)
9087  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9088  ;;
9089  *)
9090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9091for as_dir in $PATH
9092do
9093  IFS=$as_save_IFS
9094  test -z "$as_dir" && as_dir=.
9095    for ac_exec_ext in '' $ac_executable_extensions; do
9096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9097    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9099    break 2
9100  fi
9101done
9102  done
9103IFS=$as_save_IFS
9104
9105  ;;
9106esac
9107fi
9108SH=$ac_cv_path_SH
9109if test -n "$SH"; then
9110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9111$as_echo "$SH" >&6; }
9112else
9113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9114$as_echo "no" >&6; }
9115fi
9116
9117
9118  test -n "$SH" && break
9119done
9120
9121    else
9122      # If it succeeded, then it was overridden by the user. We will use it
9123      # for the tool.
9124
9125      # First remove it from the list of overridden variables, so we can test
9126      # for unknown variables in the end.
9127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9128
9129      # Check if the provided tool contains a complete path.
9130      tool_specified="$SH"
9131      tool_basename="${tool_specified##*/}"
9132      if test "x$tool_basename" = "x$tool_specified"; then
9133        # A command without a complete path is provided, search $PATH.
9134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9135$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9136        # Extract the first word of "$tool_basename", so it can be a program name with args.
9137set dummy $tool_basename; ac_word=$2
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9139$as_echo_n "checking for $ac_word... " >&6; }
9140if ${ac_cv_path_SH+:} false; then :
9141  $as_echo_n "(cached) " >&6
9142else
9143  case $SH in
9144  [\\/]* | ?:[\\/]*)
9145  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9146  ;;
9147  *)
9148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9149for as_dir in $PATH
9150do
9151  IFS=$as_save_IFS
9152  test -z "$as_dir" && as_dir=.
9153    for ac_exec_ext in '' $ac_executable_extensions; do
9154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9155    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9157    break 2
9158  fi
9159done
9160  done
9161IFS=$as_save_IFS
9162
9163  ;;
9164esac
9165fi
9166SH=$ac_cv_path_SH
9167if test -n "$SH"; then
9168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9169$as_echo "$SH" >&6; }
9170else
9171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9172$as_echo "no" >&6; }
9173fi
9174
9175
9176        if test "x$SH" = x; then
9177          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9178        fi
9179      else
9180        # Otherwise we believe it is a complete path. Use it as it is.
9181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9182$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9184$as_echo_n "checking for SH... " >&6; }
9185        if test ! -x "$tool_specified"; then
9186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9187$as_echo "not found" >&6; }
9188          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9189        fi
9190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9191$as_echo "$tool_specified" >&6; }
9192      fi
9193    fi
9194  fi
9195
9196
9197
9198  if test "x$SH" = x; then
9199    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9200  fi
9201
9202
9203
9204
9205
9206  # Publish this variable in the help.
9207
9208
9209  if test "x$SORT" = x; then
9210    # The variable is not set by user, try to locate tool using the code snippet
9211    for ac_prog in sort
9212do
9213  # Extract the first word of "$ac_prog", so it can be a program name with args.
9214set dummy $ac_prog; ac_word=$2
9215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9216$as_echo_n "checking for $ac_word... " >&6; }
9217if ${ac_cv_path_SORT+:} false; then :
9218  $as_echo_n "(cached) " >&6
9219else
9220  case $SORT in
9221  [\\/]* | ?:[\\/]*)
9222  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9223  ;;
9224  *)
9225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9226for as_dir in $PATH
9227do
9228  IFS=$as_save_IFS
9229  test -z "$as_dir" && as_dir=.
9230    for ac_exec_ext in '' $ac_executable_extensions; do
9231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9232    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9234    break 2
9235  fi
9236done
9237  done
9238IFS=$as_save_IFS
9239
9240  ;;
9241esac
9242fi
9243SORT=$ac_cv_path_SORT
9244if test -n "$SORT"; then
9245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9246$as_echo "$SORT" >&6; }
9247else
9248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9249$as_echo "no" >&6; }
9250fi
9251
9252
9253  test -n "$SORT" && break
9254done
9255
9256  else
9257    # The variable is set, but is it from the command line or the environment?
9258
9259    # Try to remove the string !SORT! from our list.
9260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9262      # If it failed, the variable was not from the command line. Ignore it,
9263      # but warn the user (except for BASH, which is always set by the calling BASH).
9264      if test "xSORT" != xBASH; then
9265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9266$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9267      fi
9268      # Try to locate tool using the code snippet
9269      for ac_prog in sort
9270do
9271  # Extract the first word of "$ac_prog", so it can be a program name with args.
9272set dummy $ac_prog; ac_word=$2
9273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9274$as_echo_n "checking for $ac_word... " >&6; }
9275if ${ac_cv_path_SORT+:} false; then :
9276  $as_echo_n "(cached) " >&6
9277else
9278  case $SORT in
9279  [\\/]* | ?:[\\/]*)
9280  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9281  ;;
9282  *)
9283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9284for as_dir in $PATH
9285do
9286  IFS=$as_save_IFS
9287  test -z "$as_dir" && as_dir=.
9288    for ac_exec_ext in '' $ac_executable_extensions; do
9289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9290    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9292    break 2
9293  fi
9294done
9295  done
9296IFS=$as_save_IFS
9297
9298  ;;
9299esac
9300fi
9301SORT=$ac_cv_path_SORT
9302if test -n "$SORT"; then
9303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9304$as_echo "$SORT" >&6; }
9305else
9306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9307$as_echo "no" >&6; }
9308fi
9309
9310
9311  test -n "$SORT" && break
9312done
9313
9314    else
9315      # If it succeeded, then it was overridden by the user. We will use it
9316      # for the tool.
9317
9318      # First remove it from the list of overridden variables, so we can test
9319      # for unknown variables in the end.
9320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9321
9322      # Check if the provided tool contains a complete path.
9323      tool_specified="$SORT"
9324      tool_basename="${tool_specified##*/}"
9325      if test "x$tool_basename" = "x$tool_specified"; then
9326        # A command without a complete path is provided, search $PATH.
9327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9328$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9329        # Extract the first word of "$tool_basename", so it can be a program name with args.
9330set dummy $tool_basename; ac_word=$2
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9332$as_echo_n "checking for $ac_word... " >&6; }
9333if ${ac_cv_path_SORT+:} false; then :
9334  $as_echo_n "(cached) " >&6
9335else
9336  case $SORT in
9337  [\\/]* | ?:[\\/]*)
9338  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9339  ;;
9340  *)
9341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9342for as_dir in $PATH
9343do
9344  IFS=$as_save_IFS
9345  test -z "$as_dir" && as_dir=.
9346    for ac_exec_ext in '' $ac_executable_extensions; do
9347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9348    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9350    break 2
9351  fi
9352done
9353  done
9354IFS=$as_save_IFS
9355
9356  ;;
9357esac
9358fi
9359SORT=$ac_cv_path_SORT
9360if test -n "$SORT"; then
9361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9362$as_echo "$SORT" >&6; }
9363else
9364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365$as_echo "no" >&6; }
9366fi
9367
9368
9369        if test "x$SORT" = x; then
9370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9371        fi
9372      else
9373        # Otherwise we believe it is a complete path. Use it as it is.
9374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9375$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9377$as_echo_n "checking for SORT... " >&6; }
9378        if test ! -x "$tool_specified"; then
9379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9380$as_echo "not found" >&6; }
9381          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9382        fi
9383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9384$as_echo "$tool_specified" >&6; }
9385      fi
9386    fi
9387  fi
9388
9389
9390
9391  if test "x$SORT" = x; then
9392    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9393  fi
9394
9395
9396
9397
9398
9399  # Publish this variable in the help.
9400
9401
9402  if test "x$TAIL" = x; then
9403    # The variable is not set by user, try to locate tool using the code snippet
9404    for ac_prog in tail
9405do
9406  # Extract the first word of "$ac_prog", so it can be a program name with args.
9407set dummy $ac_prog; ac_word=$2
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9409$as_echo_n "checking for $ac_word... " >&6; }
9410if ${ac_cv_path_TAIL+:} false; then :
9411  $as_echo_n "(cached) " >&6
9412else
9413  case $TAIL in
9414  [\\/]* | ?:[\\/]*)
9415  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9416  ;;
9417  *)
9418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9419for as_dir in $PATH
9420do
9421  IFS=$as_save_IFS
9422  test -z "$as_dir" && as_dir=.
9423    for ac_exec_ext in '' $ac_executable_extensions; do
9424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9425    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9427    break 2
9428  fi
9429done
9430  done
9431IFS=$as_save_IFS
9432
9433  ;;
9434esac
9435fi
9436TAIL=$ac_cv_path_TAIL
9437if test -n "$TAIL"; then
9438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9439$as_echo "$TAIL" >&6; }
9440else
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9442$as_echo "no" >&6; }
9443fi
9444
9445
9446  test -n "$TAIL" && break
9447done
9448
9449  else
9450    # The variable is set, but is it from the command line or the environment?
9451
9452    # Try to remove the string !TAIL! from our list.
9453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9455      # If it failed, the variable was not from the command line. Ignore it,
9456      # but warn the user (except for BASH, which is always set by the calling BASH).
9457      if test "xTAIL" != xBASH; then
9458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9459$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9460      fi
9461      # Try to locate tool using the code snippet
9462      for ac_prog in tail
9463do
9464  # Extract the first word of "$ac_prog", so it can be a program name with args.
9465set dummy $ac_prog; ac_word=$2
9466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9467$as_echo_n "checking for $ac_word... " >&6; }
9468if ${ac_cv_path_TAIL+:} false; then :
9469  $as_echo_n "(cached) " >&6
9470else
9471  case $TAIL in
9472  [\\/]* | ?:[\\/]*)
9473  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9474  ;;
9475  *)
9476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9477for as_dir in $PATH
9478do
9479  IFS=$as_save_IFS
9480  test -z "$as_dir" && as_dir=.
9481    for ac_exec_ext in '' $ac_executable_extensions; do
9482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9483    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9485    break 2
9486  fi
9487done
9488  done
9489IFS=$as_save_IFS
9490
9491  ;;
9492esac
9493fi
9494TAIL=$ac_cv_path_TAIL
9495if test -n "$TAIL"; then
9496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9497$as_echo "$TAIL" >&6; }
9498else
9499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9500$as_echo "no" >&6; }
9501fi
9502
9503
9504  test -n "$TAIL" && break
9505done
9506
9507    else
9508      # If it succeeded, then it was overridden by the user. We will use it
9509      # for the tool.
9510
9511      # First remove it from the list of overridden variables, so we can test
9512      # for unknown variables in the end.
9513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9514
9515      # Check if the provided tool contains a complete path.
9516      tool_specified="$TAIL"
9517      tool_basename="${tool_specified##*/}"
9518      if test "x$tool_basename" = "x$tool_specified"; then
9519        # A command without a complete path is provided, search $PATH.
9520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9521$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9522        # Extract the first word of "$tool_basename", so it can be a program name with args.
9523set dummy $tool_basename; ac_word=$2
9524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9525$as_echo_n "checking for $ac_word... " >&6; }
9526if ${ac_cv_path_TAIL+:} false; then :
9527  $as_echo_n "(cached) " >&6
9528else
9529  case $TAIL in
9530  [\\/]* | ?:[\\/]*)
9531  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9532  ;;
9533  *)
9534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9535for as_dir in $PATH
9536do
9537  IFS=$as_save_IFS
9538  test -z "$as_dir" && as_dir=.
9539    for ac_exec_ext in '' $ac_executable_extensions; do
9540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9541    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9543    break 2
9544  fi
9545done
9546  done
9547IFS=$as_save_IFS
9548
9549  ;;
9550esac
9551fi
9552TAIL=$ac_cv_path_TAIL
9553if test -n "$TAIL"; then
9554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9555$as_echo "$TAIL" >&6; }
9556else
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9558$as_echo "no" >&6; }
9559fi
9560
9561
9562        if test "x$TAIL" = x; then
9563          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9564        fi
9565      else
9566        # Otherwise we believe it is a complete path. Use it as it is.
9567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9568$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9570$as_echo_n "checking for TAIL... " >&6; }
9571        if test ! -x "$tool_specified"; then
9572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9573$as_echo "not found" >&6; }
9574          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9575        fi
9576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9577$as_echo "$tool_specified" >&6; }
9578      fi
9579    fi
9580  fi
9581
9582
9583
9584  if test "x$TAIL" = x; then
9585    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9586  fi
9587
9588
9589
9590
9591
9592  # Publish this variable in the help.
9593
9594
9595  if test "x$TAR" = x; then
9596    # The variable is not set by user, try to locate tool using the code snippet
9597    for ac_prog in tar
9598do
9599  # Extract the first word of "$ac_prog", so it can be a program name with args.
9600set dummy $ac_prog; ac_word=$2
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9602$as_echo_n "checking for $ac_word... " >&6; }
9603if ${ac_cv_path_TAR+:} false; then :
9604  $as_echo_n "(cached) " >&6
9605else
9606  case $TAR in
9607  [\\/]* | ?:[\\/]*)
9608  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9609  ;;
9610  *)
9611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612for as_dir in $PATH
9613do
9614  IFS=$as_save_IFS
9615  test -z "$as_dir" && as_dir=.
9616    for ac_exec_ext in '' $ac_executable_extensions; do
9617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9618    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9620    break 2
9621  fi
9622done
9623  done
9624IFS=$as_save_IFS
9625
9626  ;;
9627esac
9628fi
9629TAR=$ac_cv_path_TAR
9630if test -n "$TAR"; then
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9632$as_echo "$TAR" >&6; }
9633else
9634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636fi
9637
9638
9639  test -n "$TAR" && break
9640done
9641
9642  else
9643    # The variable is set, but is it from the command line or the environment?
9644
9645    # Try to remove the string !TAR! from our list.
9646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9648      # If it failed, the variable was not from the command line. Ignore it,
9649      # but warn the user (except for BASH, which is always set by the calling BASH).
9650      if test "xTAR" != xBASH; then
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9652$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9653      fi
9654      # Try to locate tool using the code snippet
9655      for ac_prog in tar
9656do
9657  # Extract the first word of "$ac_prog", so it can be a program name with args.
9658set dummy $ac_prog; ac_word=$2
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9660$as_echo_n "checking for $ac_word... " >&6; }
9661if ${ac_cv_path_TAR+:} false; then :
9662  $as_echo_n "(cached) " >&6
9663else
9664  case $TAR in
9665  [\\/]* | ?:[\\/]*)
9666  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9667  ;;
9668  *)
9669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9670for as_dir in $PATH
9671do
9672  IFS=$as_save_IFS
9673  test -z "$as_dir" && as_dir=.
9674    for ac_exec_ext in '' $ac_executable_extensions; do
9675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9676    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9678    break 2
9679  fi
9680done
9681  done
9682IFS=$as_save_IFS
9683
9684  ;;
9685esac
9686fi
9687TAR=$ac_cv_path_TAR
9688if test -n "$TAR"; then
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9690$as_echo "$TAR" >&6; }
9691else
9692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9693$as_echo "no" >&6; }
9694fi
9695
9696
9697  test -n "$TAR" && break
9698done
9699
9700    else
9701      # If it succeeded, then it was overridden by the user. We will use it
9702      # for the tool.
9703
9704      # First remove it from the list of overridden variables, so we can test
9705      # for unknown variables in the end.
9706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9707
9708      # Check if the provided tool contains a complete path.
9709      tool_specified="$TAR"
9710      tool_basename="${tool_specified##*/}"
9711      if test "x$tool_basename" = "x$tool_specified"; then
9712        # A command without a complete path is provided, search $PATH.
9713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9714$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9715        # Extract the first word of "$tool_basename", so it can be a program name with args.
9716set dummy $tool_basename; ac_word=$2
9717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9718$as_echo_n "checking for $ac_word... " >&6; }
9719if ${ac_cv_path_TAR+:} false; then :
9720  $as_echo_n "(cached) " >&6
9721else
9722  case $TAR in
9723  [\\/]* | ?:[\\/]*)
9724  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9725  ;;
9726  *)
9727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9728for as_dir in $PATH
9729do
9730  IFS=$as_save_IFS
9731  test -z "$as_dir" && as_dir=.
9732    for ac_exec_ext in '' $ac_executable_extensions; do
9733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9734    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9736    break 2
9737  fi
9738done
9739  done
9740IFS=$as_save_IFS
9741
9742  ;;
9743esac
9744fi
9745TAR=$ac_cv_path_TAR
9746if test -n "$TAR"; then
9747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9748$as_echo "$TAR" >&6; }
9749else
9750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9751$as_echo "no" >&6; }
9752fi
9753
9754
9755        if test "x$TAR" = x; then
9756          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9757        fi
9758      else
9759        # Otherwise we believe it is a complete path. Use it as it is.
9760        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9761$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9763$as_echo_n "checking for TAR... " >&6; }
9764        if test ! -x "$tool_specified"; then
9765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9766$as_echo "not found" >&6; }
9767          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9768        fi
9769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9770$as_echo "$tool_specified" >&6; }
9771      fi
9772    fi
9773  fi
9774
9775
9776
9777  if test "x$TAR" = x; then
9778    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9779  fi
9780
9781
9782
9783
9784
9785  # Publish this variable in the help.
9786
9787
9788  if test "x$TEE" = x; then
9789    # The variable is not set by user, try to locate tool using the code snippet
9790    for ac_prog in tee
9791do
9792  # Extract the first word of "$ac_prog", so it can be a program name with args.
9793set dummy $ac_prog; ac_word=$2
9794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9795$as_echo_n "checking for $ac_word... " >&6; }
9796if ${ac_cv_path_TEE+:} false; then :
9797  $as_echo_n "(cached) " >&6
9798else
9799  case $TEE in
9800  [\\/]* | ?:[\\/]*)
9801  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9802  ;;
9803  *)
9804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9805for as_dir in $PATH
9806do
9807  IFS=$as_save_IFS
9808  test -z "$as_dir" && as_dir=.
9809    for ac_exec_ext in '' $ac_executable_extensions; do
9810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9811    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9813    break 2
9814  fi
9815done
9816  done
9817IFS=$as_save_IFS
9818
9819  ;;
9820esac
9821fi
9822TEE=$ac_cv_path_TEE
9823if test -n "$TEE"; then
9824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9825$as_echo "$TEE" >&6; }
9826else
9827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828$as_echo "no" >&6; }
9829fi
9830
9831
9832  test -n "$TEE" && break
9833done
9834
9835  else
9836    # The variable is set, but is it from the command line or the environment?
9837
9838    # Try to remove the string !TEE! from our list.
9839    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9840    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9841      # If it failed, the variable was not from the command line. Ignore it,
9842      # but warn the user (except for BASH, which is always set by the calling BASH).
9843      if test "xTEE" != xBASH; then
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9845$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9846      fi
9847      # Try to locate tool using the code snippet
9848      for ac_prog in tee
9849do
9850  # Extract the first word of "$ac_prog", so it can be a program name with args.
9851set dummy $ac_prog; ac_word=$2
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9853$as_echo_n "checking for $ac_word... " >&6; }
9854if ${ac_cv_path_TEE+:} false; then :
9855  $as_echo_n "(cached) " >&6
9856else
9857  case $TEE in
9858  [\\/]* | ?:[\\/]*)
9859  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9860  ;;
9861  *)
9862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9863for as_dir in $PATH
9864do
9865  IFS=$as_save_IFS
9866  test -z "$as_dir" && as_dir=.
9867    for ac_exec_ext in '' $ac_executable_extensions; do
9868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9869    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9871    break 2
9872  fi
9873done
9874  done
9875IFS=$as_save_IFS
9876
9877  ;;
9878esac
9879fi
9880TEE=$ac_cv_path_TEE
9881if test -n "$TEE"; then
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9883$as_echo "$TEE" >&6; }
9884else
9885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9886$as_echo "no" >&6; }
9887fi
9888
9889
9890  test -n "$TEE" && break
9891done
9892
9893    else
9894      # If it succeeded, then it was overridden by the user. We will use it
9895      # for the tool.
9896
9897      # First remove it from the list of overridden variables, so we can test
9898      # for unknown variables in the end.
9899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9900
9901      # Check if the provided tool contains a complete path.
9902      tool_specified="$TEE"
9903      tool_basename="${tool_specified##*/}"
9904      if test "x$tool_basename" = "x$tool_specified"; then
9905        # A command without a complete path is provided, search $PATH.
9906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9907$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9908        # Extract the first word of "$tool_basename", so it can be a program name with args.
9909set dummy $tool_basename; ac_word=$2
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911$as_echo_n "checking for $ac_word... " >&6; }
9912if ${ac_cv_path_TEE+:} false; then :
9913  $as_echo_n "(cached) " >&6
9914else
9915  case $TEE in
9916  [\\/]* | ?:[\\/]*)
9917  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9918  ;;
9919  *)
9920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9921for as_dir in $PATH
9922do
9923  IFS=$as_save_IFS
9924  test -z "$as_dir" && as_dir=.
9925    for ac_exec_ext in '' $ac_executable_extensions; do
9926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9927    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9929    break 2
9930  fi
9931done
9932  done
9933IFS=$as_save_IFS
9934
9935  ;;
9936esac
9937fi
9938TEE=$ac_cv_path_TEE
9939if test -n "$TEE"; then
9940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9941$as_echo "$TEE" >&6; }
9942else
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944$as_echo "no" >&6; }
9945fi
9946
9947
9948        if test "x$TEE" = x; then
9949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9950        fi
9951      else
9952        # Otherwise we believe it is a complete path. Use it as it is.
9953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9954$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9956$as_echo_n "checking for TEE... " >&6; }
9957        if test ! -x "$tool_specified"; then
9958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9959$as_echo "not found" >&6; }
9960          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9961        fi
9962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9963$as_echo "$tool_specified" >&6; }
9964      fi
9965    fi
9966  fi
9967
9968
9969
9970  if test "x$TEE" = x; then
9971    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9972  fi
9973
9974
9975
9976
9977
9978  # Publish this variable in the help.
9979
9980
9981  if test "x$TOUCH" = x; then
9982    # The variable is not set by user, try to locate tool using the code snippet
9983    for ac_prog in touch
9984do
9985  # Extract the first word of "$ac_prog", so it can be a program name with args.
9986set dummy $ac_prog; ac_word=$2
9987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9988$as_echo_n "checking for $ac_word... " >&6; }
9989if ${ac_cv_path_TOUCH+:} false; then :
9990  $as_echo_n "(cached) " >&6
9991else
9992  case $TOUCH in
9993  [\\/]* | ?:[\\/]*)
9994  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9995  ;;
9996  *)
9997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9998for as_dir in $PATH
9999do
10000  IFS=$as_save_IFS
10001  test -z "$as_dir" && as_dir=.
10002    for ac_exec_ext in '' $ac_executable_extensions; do
10003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10004    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10006    break 2
10007  fi
10008done
10009  done
10010IFS=$as_save_IFS
10011
10012  ;;
10013esac
10014fi
10015TOUCH=$ac_cv_path_TOUCH
10016if test -n "$TOUCH"; then
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10018$as_echo "$TOUCH" >&6; }
10019else
10020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021$as_echo "no" >&6; }
10022fi
10023
10024
10025  test -n "$TOUCH" && break
10026done
10027
10028  else
10029    # The variable is set, but is it from the command line or the environment?
10030
10031    # Try to remove the string !TOUCH! from our list.
10032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10034      # If it failed, the variable was not from the command line. Ignore it,
10035      # but warn the user (except for BASH, which is always set by the calling BASH).
10036      if test "xTOUCH" != xBASH; then
10037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10038$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10039      fi
10040      # Try to locate tool using the code snippet
10041      for ac_prog in touch
10042do
10043  # Extract the first word of "$ac_prog", so it can be a program name with args.
10044set dummy $ac_prog; ac_word=$2
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10046$as_echo_n "checking for $ac_word... " >&6; }
10047if ${ac_cv_path_TOUCH+:} false; then :
10048  $as_echo_n "(cached) " >&6
10049else
10050  case $TOUCH in
10051  [\\/]* | ?:[\\/]*)
10052  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10053  ;;
10054  *)
10055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10056for as_dir in $PATH
10057do
10058  IFS=$as_save_IFS
10059  test -z "$as_dir" && as_dir=.
10060    for ac_exec_ext in '' $ac_executable_extensions; do
10061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10062    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10064    break 2
10065  fi
10066done
10067  done
10068IFS=$as_save_IFS
10069
10070  ;;
10071esac
10072fi
10073TOUCH=$ac_cv_path_TOUCH
10074if test -n "$TOUCH"; then
10075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10076$as_echo "$TOUCH" >&6; }
10077else
10078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079$as_echo "no" >&6; }
10080fi
10081
10082
10083  test -n "$TOUCH" && break
10084done
10085
10086    else
10087      # If it succeeded, then it was overridden by the user. We will use it
10088      # for the tool.
10089
10090      # First remove it from the list of overridden variables, so we can test
10091      # for unknown variables in the end.
10092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10093
10094      # Check if the provided tool contains a complete path.
10095      tool_specified="$TOUCH"
10096      tool_basename="${tool_specified##*/}"
10097      if test "x$tool_basename" = "x$tool_specified"; then
10098        # A command without a complete path is provided, search $PATH.
10099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10100$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10101        # Extract the first word of "$tool_basename", so it can be a program name with args.
10102set dummy $tool_basename; ac_word=$2
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104$as_echo_n "checking for $ac_word... " >&6; }
10105if ${ac_cv_path_TOUCH+:} false; then :
10106  $as_echo_n "(cached) " >&6
10107else
10108  case $TOUCH in
10109  [\\/]* | ?:[\\/]*)
10110  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10111  ;;
10112  *)
10113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114for as_dir in $PATH
10115do
10116  IFS=$as_save_IFS
10117  test -z "$as_dir" && as_dir=.
10118    for ac_exec_ext in '' $ac_executable_extensions; do
10119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10120    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122    break 2
10123  fi
10124done
10125  done
10126IFS=$as_save_IFS
10127
10128  ;;
10129esac
10130fi
10131TOUCH=$ac_cv_path_TOUCH
10132if test -n "$TOUCH"; then
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10134$as_echo "$TOUCH" >&6; }
10135else
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137$as_echo "no" >&6; }
10138fi
10139
10140
10141        if test "x$TOUCH" = x; then
10142          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10143        fi
10144      else
10145        # Otherwise we believe it is a complete path. Use it as it is.
10146        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10147$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10149$as_echo_n "checking for TOUCH... " >&6; }
10150        if test ! -x "$tool_specified"; then
10151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10152$as_echo "not found" >&6; }
10153          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10154        fi
10155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10156$as_echo "$tool_specified" >&6; }
10157      fi
10158    fi
10159  fi
10160
10161
10162
10163  if test "x$TOUCH" = x; then
10164    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10165  fi
10166
10167
10168
10169
10170
10171  # Publish this variable in the help.
10172
10173
10174  if test "x$TR" = x; then
10175    # The variable is not set by user, try to locate tool using the code snippet
10176    for ac_prog in tr
10177do
10178  # Extract the first word of "$ac_prog", so it can be a program name with args.
10179set dummy $ac_prog; ac_word=$2
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10181$as_echo_n "checking for $ac_word... " >&6; }
10182if ${ac_cv_path_TR+:} false; then :
10183  $as_echo_n "(cached) " >&6
10184else
10185  case $TR in
10186  [\\/]* | ?:[\\/]*)
10187  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10188  ;;
10189  *)
10190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10191for as_dir in $PATH
10192do
10193  IFS=$as_save_IFS
10194  test -z "$as_dir" && as_dir=.
10195    for ac_exec_ext in '' $ac_executable_extensions; do
10196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10197    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10199    break 2
10200  fi
10201done
10202  done
10203IFS=$as_save_IFS
10204
10205  ;;
10206esac
10207fi
10208TR=$ac_cv_path_TR
10209if test -n "$TR"; then
10210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10211$as_echo "$TR" >&6; }
10212else
10213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10214$as_echo "no" >&6; }
10215fi
10216
10217
10218  test -n "$TR" && break
10219done
10220
10221  else
10222    # The variable is set, but is it from the command line or the environment?
10223
10224    # Try to remove the string !TR! from our list.
10225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10227      # If it failed, the variable was not from the command line. Ignore it,
10228      # but warn the user (except for BASH, which is always set by the calling BASH).
10229      if test "xTR" != xBASH; then
10230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10231$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10232      fi
10233      # Try to locate tool using the code snippet
10234      for ac_prog in tr
10235do
10236  # Extract the first word of "$ac_prog", so it can be a program name with args.
10237set dummy $ac_prog; ac_word=$2
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10239$as_echo_n "checking for $ac_word... " >&6; }
10240if ${ac_cv_path_TR+:} false; then :
10241  $as_echo_n "(cached) " >&6
10242else
10243  case $TR in
10244  [\\/]* | ?:[\\/]*)
10245  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10246  ;;
10247  *)
10248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10249for as_dir in $PATH
10250do
10251  IFS=$as_save_IFS
10252  test -z "$as_dir" && as_dir=.
10253    for ac_exec_ext in '' $ac_executable_extensions; do
10254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10255    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10257    break 2
10258  fi
10259done
10260  done
10261IFS=$as_save_IFS
10262
10263  ;;
10264esac
10265fi
10266TR=$ac_cv_path_TR
10267if test -n "$TR"; then
10268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10269$as_echo "$TR" >&6; }
10270else
10271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10272$as_echo "no" >&6; }
10273fi
10274
10275
10276  test -n "$TR" && break
10277done
10278
10279    else
10280      # If it succeeded, then it was overridden by the user. We will use it
10281      # for the tool.
10282
10283      # First remove it from the list of overridden variables, so we can test
10284      # for unknown variables in the end.
10285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10286
10287      # Check if the provided tool contains a complete path.
10288      tool_specified="$TR"
10289      tool_basename="${tool_specified##*/}"
10290      if test "x$tool_basename" = "x$tool_specified"; then
10291        # A command without a complete path is provided, search $PATH.
10292        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10293$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10294        # Extract the first word of "$tool_basename", so it can be a program name with args.
10295set dummy $tool_basename; ac_word=$2
10296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10297$as_echo_n "checking for $ac_word... " >&6; }
10298if ${ac_cv_path_TR+:} false; then :
10299  $as_echo_n "(cached) " >&6
10300else
10301  case $TR in
10302  [\\/]* | ?:[\\/]*)
10303  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10304  ;;
10305  *)
10306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10307for as_dir in $PATH
10308do
10309  IFS=$as_save_IFS
10310  test -z "$as_dir" && as_dir=.
10311    for ac_exec_ext in '' $ac_executable_extensions; do
10312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10313    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10315    break 2
10316  fi
10317done
10318  done
10319IFS=$as_save_IFS
10320
10321  ;;
10322esac
10323fi
10324TR=$ac_cv_path_TR
10325if test -n "$TR"; then
10326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10327$as_echo "$TR" >&6; }
10328else
10329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10330$as_echo "no" >&6; }
10331fi
10332
10333
10334        if test "x$TR" = x; then
10335          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10336        fi
10337      else
10338        # Otherwise we believe it is a complete path. Use it as it is.
10339        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10340$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10342$as_echo_n "checking for TR... " >&6; }
10343        if test ! -x "$tool_specified"; then
10344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10345$as_echo "not found" >&6; }
10346          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10347        fi
10348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10349$as_echo "$tool_specified" >&6; }
10350      fi
10351    fi
10352  fi
10353
10354
10355
10356  if test "x$TR" = x; then
10357    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10358  fi
10359
10360
10361
10362
10363
10364  # Publish this variable in the help.
10365
10366
10367  if test "x$UNAME" = x; then
10368    # The variable is not set by user, try to locate tool using the code snippet
10369    for ac_prog in uname
10370do
10371  # Extract the first word of "$ac_prog", so it can be a program name with args.
10372set dummy $ac_prog; ac_word=$2
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10374$as_echo_n "checking for $ac_word... " >&6; }
10375if ${ac_cv_path_UNAME+:} false; then :
10376  $as_echo_n "(cached) " >&6
10377else
10378  case $UNAME in
10379  [\\/]* | ?:[\\/]*)
10380  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10381  ;;
10382  *)
10383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10384for as_dir in $PATH
10385do
10386  IFS=$as_save_IFS
10387  test -z "$as_dir" && as_dir=.
10388    for ac_exec_ext in '' $ac_executable_extensions; do
10389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10390    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10392    break 2
10393  fi
10394done
10395  done
10396IFS=$as_save_IFS
10397
10398  ;;
10399esac
10400fi
10401UNAME=$ac_cv_path_UNAME
10402if test -n "$UNAME"; then
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10404$as_echo "$UNAME" >&6; }
10405else
10406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
10408fi
10409
10410
10411  test -n "$UNAME" && break
10412done
10413
10414  else
10415    # The variable is set, but is it from the command line or the environment?
10416
10417    # Try to remove the string !UNAME! from our list.
10418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10420      # If it failed, the variable was not from the command line. Ignore it,
10421      # but warn the user (except for BASH, which is always set by the calling BASH).
10422      if test "xUNAME" != xBASH; then
10423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10424$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10425      fi
10426      # Try to locate tool using the code snippet
10427      for ac_prog in uname
10428do
10429  # Extract the first word of "$ac_prog", so it can be a program name with args.
10430set dummy $ac_prog; ac_word=$2
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10432$as_echo_n "checking for $ac_word... " >&6; }
10433if ${ac_cv_path_UNAME+:} false; then :
10434  $as_echo_n "(cached) " >&6
10435else
10436  case $UNAME in
10437  [\\/]* | ?:[\\/]*)
10438  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10439  ;;
10440  *)
10441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10442for as_dir in $PATH
10443do
10444  IFS=$as_save_IFS
10445  test -z "$as_dir" && as_dir=.
10446    for ac_exec_ext in '' $ac_executable_extensions; do
10447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10448    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10450    break 2
10451  fi
10452done
10453  done
10454IFS=$as_save_IFS
10455
10456  ;;
10457esac
10458fi
10459UNAME=$ac_cv_path_UNAME
10460if test -n "$UNAME"; then
10461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10462$as_echo "$UNAME" >&6; }
10463else
10464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
10466fi
10467
10468
10469  test -n "$UNAME" && break
10470done
10471
10472    else
10473      # If it succeeded, then it was overridden by the user. We will use it
10474      # for the tool.
10475
10476      # First remove it from the list of overridden variables, so we can test
10477      # for unknown variables in the end.
10478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10479
10480      # Check if the provided tool contains a complete path.
10481      tool_specified="$UNAME"
10482      tool_basename="${tool_specified##*/}"
10483      if test "x$tool_basename" = "x$tool_specified"; then
10484        # A command without a complete path is provided, search $PATH.
10485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10486$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10487        # Extract the first word of "$tool_basename", so it can be a program name with args.
10488set dummy $tool_basename; ac_word=$2
10489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10490$as_echo_n "checking for $ac_word... " >&6; }
10491if ${ac_cv_path_UNAME+:} false; then :
10492  $as_echo_n "(cached) " >&6
10493else
10494  case $UNAME in
10495  [\\/]* | ?:[\\/]*)
10496  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10497  ;;
10498  *)
10499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10500for as_dir in $PATH
10501do
10502  IFS=$as_save_IFS
10503  test -z "$as_dir" && as_dir=.
10504    for ac_exec_ext in '' $ac_executable_extensions; do
10505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10506    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10508    break 2
10509  fi
10510done
10511  done
10512IFS=$as_save_IFS
10513
10514  ;;
10515esac
10516fi
10517UNAME=$ac_cv_path_UNAME
10518if test -n "$UNAME"; then
10519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10520$as_echo "$UNAME" >&6; }
10521else
10522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10523$as_echo "no" >&6; }
10524fi
10525
10526
10527        if test "x$UNAME" = x; then
10528          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10529        fi
10530      else
10531        # Otherwise we believe it is a complete path. Use it as it is.
10532        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10533$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10535$as_echo_n "checking for UNAME... " >&6; }
10536        if test ! -x "$tool_specified"; then
10537          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10538$as_echo "not found" >&6; }
10539          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10540        fi
10541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10542$as_echo "$tool_specified" >&6; }
10543      fi
10544    fi
10545  fi
10546
10547
10548
10549  if test "x$UNAME" = x; then
10550    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10551  fi
10552
10553
10554
10555
10556
10557  # Publish this variable in the help.
10558
10559
10560  if test "x$UNIQ" = x; then
10561    # The variable is not set by user, try to locate tool using the code snippet
10562    for ac_prog in uniq
10563do
10564  # Extract the first word of "$ac_prog", so it can be a program name with args.
10565set dummy $ac_prog; ac_word=$2
10566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10567$as_echo_n "checking for $ac_word... " >&6; }
10568if ${ac_cv_path_UNIQ+:} false; then :
10569  $as_echo_n "(cached) " >&6
10570else
10571  case $UNIQ in
10572  [\\/]* | ?:[\\/]*)
10573  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10574  ;;
10575  *)
10576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10577for as_dir in $PATH
10578do
10579  IFS=$as_save_IFS
10580  test -z "$as_dir" && as_dir=.
10581    for ac_exec_ext in '' $ac_executable_extensions; do
10582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10583    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10585    break 2
10586  fi
10587done
10588  done
10589IFS=$as_save_IFS
10590
10591  ;;
10592esac
10593fi
10594UNIQ=$ac_cv_path_UNIQ
10595if test -n "$UNIQ"; then
10596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10597$as_echo "$UNIQ" >&6; }
10598else
10599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10600$as_echo "no" >&6; }
10601fi
10602
10603
10604  test -n "$UNIQ" && break
10605done
10606
10607  else
10608    # The variable is set, but is it from the command line or the environment?
10609
10610    # Try to remove the string !UNIQ! from our list.
10611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10613      # If it failed, the variable was not from the command line. Ignore it,
10614      # but warn the user (except for BASH, which is always set by the calling BASH).
10615      if test "xUNIQ" != xBASH; then
10616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10617$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10618      fi
10619      # Try to locate tool using the code snippet
10620      for ac_prog in uniq
10621do
10622  # Extract the first word of "$ac_prog", so it can be a program name with args.
10623set dummy $ac_prog; ac_word=$2
10624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10625$as_echo_n "checking for $ac_word... " >&6; }
10626if ${ac_cv_path_UNIQ+:} false; then :
10627  $as_echo_n "(cached) " >&6
10628else
10629  case $UNIQ in
10630  [\\/]* | ?:[\\/]*)
10631  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10632  ;;
10633  *)
10634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10635for as_dir in $PATH
10636do
10637  IFS=$as_save_IFS
10638  test -z "$as_dir" && as_dir=.
10639    for ac_exec_ext in '' $ac_executable_extensions; do
10640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10641    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10643    break 2
10644  fi
10645done
10646  done
10647IFS=$as_save_IFS
10648
10649  ;;
10650esac
10651fi
10652UNIQ=$ac_cv_path_UNIQ
10653if test -n "$UNIQ"; then
10654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10655$as_echo "$UNIQ" >&6; }
10656else
10657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658$as_echo "no" >&6; }
10659fi
10660
10661
10662  test -n "$UNIQ" && break
10663done
10664
10665    else
10666      # If it succeeded, then it was overridden by the user. We will use it
10667      # for the tool.
10668
10669      # First remove it from the list of overridden variables, so we can test
10670      # for unknown variables in the end.
10671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10672
10673      # Check if the provided tool contains a complete path.
10674      tool_specified="$UNIQ"
10675      tool_basename="${tool_specified##*/}"
10676      if test "x$tool_basename" = "x$tool_specified"; then
10677        # A command without a complete path is provided, search $PATH.
10678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10679$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10680        # Extract the first word of "$tool_basename", so it can be a program name with args.
10681set dummy $tool_basename; ac_word=$2
10682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10683$as_echo_n "checking for $ac_word... " >&6; }
10684if ${ac_cv_path_UNIQ+:} false; then :
10685  $as_echo_n "(cached) " >&6
10686else
10687  case $UNIQ in
10688  [\\/]* | ?:[\\/]*)
10689  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10690  ;;
10691  *)
10692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10693for as_dir in $PATH
10694do
10695  IFS=$as_save_IFS
10696  test -z "$as_dir" && as_dir=.
10697    for ac_exec_ext in '' $ac_executable_extensions; do
10698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10699    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10701    break 2
10702  fi
10703done
10704  done
10705IFS=$as_save_IFS
10706
10707  ;;
10708esac
10709fi
10710UNIQ=$ac_cv_path_UNIQ
10711if test -n "$UNIQ"; then
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10713$as_echo "$UNIQ" >&6; }
10714else
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716$as_echo "no" >&6; }
10717fi
10718
10719
10720        if test "x$UNIQ" = x; then
10721          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10722        fi
10723      else
10724        # Otherwise we believe it is a complete path. Use it as it is.
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10726$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10728$as_echo_n "checking for UNIQ... " >&6; }
10729        if test ! -x "$tool_specified"; then
10730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10731$as_echo "not found" >&6; }
10732          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10733        fi
10734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10735$as_echo "$tool_specified" >&6; }
10736      fi
10737    fi
10738  fi
10739
10740
10741
10742  if test "x$UNIQ" = x; then
10743    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10744  fi
10745
10746
10747
10748
10749
10750  # Publish this variable in the help.
10751
10752
10753  if test "x$WC" = x; then
10754    # The variable is not set by user, try to locate tool using the code snippet
10755    for ac_prog in wc
10756do
10757  # Extract the first word of "$ac_prog", so it can be a program name with args.
10758set dummy $ac_prog; ac_word=$2
10759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10760$as_echo_n "checking for $ac_word... " >&6; }
10761if ${ac_cv_path_WC+:} false; then :
10762  $as_echo_n "(cached) " >&6
10763else
10764  case $WC in
10765  [\\/]* | ?:[\\/]*)
10766  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10767  ;;
10768  *)
10769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10770for as_dir in $PATH
10771do
10772  IFS=$as_save_IFS
10773  test -z "$as_dir" && as_dir=.
10774    for ac_exec_ext in '' $ac_executable_extensions; do
10775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10776    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10778    break 2
10779  fi
10780done
10781  done
10782IFS=$as_save_IFS
10783
10784  ;;
10785esac
10786fi
10787WC=$ac_cv_path_WC
10788if test -n "$WC"; then
10789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10790$as_echo "$WC" >&6; }
10791else
10792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793$as_echo "no" >&6; }
10794fi
10795
10796
10797  test -n "$WC" && break
10798done
10799
10800  else
10801    # The variable is set, but is it from the command line or the environment?
10802
10803    # Try to remove the string !WC! from our list.
10804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10806      # If it failed, the variable was not from the command line. Ignore it,
10807      # but warn the user (except for BASH, which is always set by the calling BASH).
10808      if test "xWC" != xBASH; then
10809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10810$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10811      fi
10812      # Try to locate tool using the code snippet
10813      for ac_prog in wc
10814do
10815  # Extract the first word of "$ac_prog", so it can be a program name with args.
10816set dummy $ac_prog; ac_word=$2
10817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10818$as_echo_n "checking for $ac_word... " >&6; }
10819if ${ac_cv_path_WC+:} false; then :
10820  $as_echo_n "(cached) " >&6
10821else
10822  case $WC in
10823  [\\/]* | ?:[\\/]*)
10824  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10825  ;;
10826  *)
10827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10828for as_dir in $PATH
10829do
10830  IFS=$as_save_IFS
10831  test -z "$as_dir" && as_dir=.
10832    for ac_exec_ext in '' $ac_executable_extensions; do
10833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10834    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10836    break 2
10837  fi
10838done
10839  done
10840IFS=$as_save_IFS
10841
10842  ;;
10843esac
10844fi
10845WC=$ac_cv_path_WC
10846if test -n "$WC"; then
10847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10848$as_echo "$WC" >&6; }
10849else
10850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10851$as_echo "no" >&6; }
10852fi
10853
10854
10855  test -n "$WC" && break
10856done
10857
10858    else
10859      # If it succeeded, then it was overridden by the user. We will use it
10860      # for the tool.
10861
10862      # First remove it from the list of overridden variables, so we can test
10863      # for unknown variables in the end.
10864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10865
10866      # Check if the provided tool contains a complete path.
10867      tool_specified="$WC"
10868      tool_basename="${tool_specified##*/}"
10869      if test "x$tool_basename" = "x$tool_specified"; then
10870        # A command without a complete path is provided, search $PATH.
10871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10872$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10873        # Extract the first word of "$tool_basename", so it can be a program name with args.
10874set dummy $tool_basename; ac_word=$2
10875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10876$as_echo_n "checking for $ac_word... " >&6; }
10877if ${ac_cv_path_WC+:} false; then :
10878  $as_echo_n "(cached) " >&6
10879else
10880  case $WC in
10881  [\\/]* | ?:[\\/]*)
10882  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10883  ;;
10884  *)
10885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10886for as_dir in $PATH
10887do
10888  IFS=$as_save_IFS
10889  test -z "$as_dir" && as_dir=.
10890    for ac_exec_ext in '' $ac_executable_extensions; do
10891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10892    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10894    break 2
10895  fi
10896done
10897  done
10898IFS=$as_save_IFS
10899
10900  ;;
10901esac
10902fi
10903WC=$ac_cv_path_WC
10904if test -n "$WC"; then
10905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10906$as_echo "$WC" >&6; }
10907else
10908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10909$as_echo "no" >&6; }
10910fi
10911
10912
10913        if test "x$WC" = x; then
10914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10915        fi
10916      else
10917        # Otherwise we believe it is a complete path. Use it as it is.
10918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10919$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10921$as_echo_n "checking for WC... " >&6; }
10922        if test ! -x "$tool_specified"; then
10923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10924$as_echo "not found" >&6; }
10925          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10926        fi
10927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10928$as_echo "$tool_specified" >&6; }
10929      fi
10930    fi
10931  fi
10932
10933
10934
10935  if test "x$WC" = x; then
10936    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10937  fi
10938
10939
10940
10941
10942
10943  # Publish this variable in the help.
10944
10945
10946  if test "x$WHICH" = x; then
10947    # The variable is not set by user, try to locate tool using the code snippet
10948    for ac_prog in which
10949do
10950  # Extract the first word of "$ac_prog", so it can be a program name with args.
10951set dummy $ac_prog; ac_word=$2
10952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10953$as_echo_n "checking for $ac_word... " >&6; }
10954if ${ac_cv_path_WHICH+:} false; then :
10955  $as_echo_n "(cached) " >&6
10956else
10957  case $WHICH in
10958  [\\/]* | ?:[\\/]*)
10959  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10960  ;;
10961  *)
10962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10963for as_dir in $PATH
10964do
10965  IFS=$as_save_IFS
10966  test -z "$as_dir" && as_dir=.
10967    for ac_exec_ext in '' $ac_executable_extensions; do
10968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10969    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10971    break 2
10972  fi
10973done
10974  done
10975IFS=$as_save_IFS
10976
10977  ;;
10978esac
10979fi
10980WHICH=$ac_cv_path_WHICH
10981if test -n "$WHICH"; then
10982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10983$as_echo "$WHICH" >&6; }
10984else
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
10987fi
10988
10989
10990  test -n "$WHICH" && break
10991done
10992
10993  else
10994    # The variable is set, but is it from the command line or the environment?
10995
10996    # Try to remove the string !WHICH! from our list.
10997    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10998    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10999      # If it failed, the variable was not from the command line. Ignore it,
11000      # but warn the user (except for BASH, which is always set by the calling BASH).
11001      if test "xWHICH" != xBASH; then
11002        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11003$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11004      fi
11005      # Try to locate tool using the code snippet
11006      for ac_prog in which
11007do
11008  # Extract the first word of "$ac_prog", so it can be a program name with args.
11009set dummy $ac_prog; ac_word=$2
11010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11011$as_echo_n "checking for $ac_word... " >&6; }
11012if ${ac_cv_path_WHICH+:} false; then :
11013  $as_echo_n "(cached) " >&6
11014else
11015  case $WHICH in
11016  [\\/]* | ?:[\\/]*)
11017  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11018  ;;
11019  *)
11020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11021for as_dir in $PATH
11022do
11023  IFS=$as_save_IFS
11024  test -z "$as_dir" && as_dir=.
11025    for ac_exec_ext in '' $ac_executable_extensions; do
11026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11027    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11029    break 2
11030  fi
11031done
11032  done
11033IFS=$as_save_IFS
11034
11035  ;;
11036esac
11037fi
11038WHICH=$ac_cv_path_WHICH
11039if test -n "$WHICH"; then
11040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11041$as_echo "$WHICH" >&6; }
11042else
11043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11044$as_echo "no" >&6; }
11045fi
11046
11047
11048  test -n "$WHICH" && break
11049done
11050
11051    else
11052      # If it succeeded, then it was overridden by the user. We will use it
11053      # for the tool.
11054
11055      # First remove it from the list of overridden variables, so we can test
11056      # for unknown variables in the end.
11057      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11058
11059      # Check if the provided tool contains a complete path.
11060      tool_specified="$WHICH"
11061      tool_basename="${tool_specified##*/}"
11062      if test "x$tool_basename" = "x$tool_specified"; then
11063        # A command without a complete path is provided, search $PATH.
11064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11065$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11066        # Extract the first word of "$tool_basename", so it can be a program name with args.
11067set dummy $tool_basename; ac_word=$2
11068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11069$as_echo_n "checking for $ac_word... " >&6; }
11070if ${ac_cv_path_WHICH+:} false; then :
11071  $as_echo_n "(cached) " >&6
11072else
11073  case $WHICH in
11074  [\\/]* | ?:[\\/]*)
11075  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11076  ;;
11077  *)
11078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11079for as_dir in $PATH
11080do
11081  IFS=$as_save_IFS
11082  test -z "$as_dir" && as_dir=.
11083    for ac_exec_ext in '' $ac_executable_extensions; do
11084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11085    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11087    break 2
11088  fi
11089done
11090  done
11091IFS=$as_save_IFS
11092
11093  ;;
11094esac
11095fi
11096WHICH=$ac_cv_path_WHICH
11097if test -n "$WHICH"; then
11098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11099$as_echo "$WHICH" >&6; }
11100else
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11102$as_echo "no" >&6; }
11103fi
11104
11105
11106        if test "x$WHICH" = x; then
11107          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11108        fi
11109      else
11110        # Otherwise we believe it is a complete path. Use it as it is.
11111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11112$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11114$as_echo_n "checking for WHICH... " >&6; }
11115        if test ! -x "$tool_specified"; then
11116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11117$as_echo "not found" >&6; }
11118          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11119        fi
11120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11121$as_echo "$tool_specified" >&6; }
11122      fi
11123    fi
11124  fi
11125
11126
11127
11128  if test "x$WHICH" = x; then
11129    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11130  fi
11131
11132
11133
11134
11135
11136  # Publish this variable in the help.
11137
11138
11139  if test "x$XARGS" = x; then
11140    # The variable is not set by user, try to locate tool using the code snippet
11141    for ac_prog in xargs
11142do
11143  # Extract the first word of "$ac_prog", so it can be a program name with args.
11144set dummy $ac_prog; ac_word=$2
11145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11146$as_echo_n "checking for $ac_word... " >&6; }
11147if ${ac_cv_path_XARGS+:} false; then :
11148  $as_echo_n "(cached) " >&6
11149else
11150  case $XARGS in
11151  [\\/]* | ?:[\\/]*)
11152  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11153  ;;
11154  *)
11155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11156for as_dir in $PATH
11157do
11158  IFS=$as_save_IFS
11159  test -z "$as_dir" && as_dir=.
11160    for ac_exec_ext in '' $ac_executable_extensions; do
11161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11162    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11164    break 2
11165  fi
11166done
11167  done
11168IFS=$as_save_IFS
11169
11170  ;;
11171esac
11172fi
11173XARGS=$ac_cv_path_XARGS
11174if test -n "$XARGS"; then
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11176$as_echo "$XARGS" >&6; }
11177else
11178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11179$as_echo "no" >&6; }
11180fi
11181
11182
11183  test -n "$XARGS" && break
11184done
11185
11186  else
11187    # The variable is set, but is it from the command line or the environment?
11188
11189    # Try to remove the string !XARGS! from our list.
11190    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11191    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11192      # If it failed, the variable was not from the command line. Ignore it,
11193      # but warn the user (except for BASH, which is always set by the calling BASH).
11194      if test "xXARGS" != xBASH; then
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11196$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11197      fi
11198      # Try to locate tool using the code snippet
11199      for ac_prog in xargs
11200do
11201  # Extract the first word of "$ac_prog", so it can be a program name with args.
11202set dummy $ac_prog; ac_word=$2
11203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11204$as_echo_n "checking for $ac_word... " >&6; }
11205if ${ac_cv_path_XARGS+:} false; then :
11206  $as_echo_n "(cached) " >&6
11207else
11208  case $XARGS in
11209  [\\/]* | ?:[\\/]*)
11210  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11211  ;;
11212  *)
11213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11214for as_dir in $PATH
11215do
11216  IFS=$as_save_IFS
11217  test -z "$as_dir" && as_dir=.
11218    for ac_exec_ext in '' $ac_executable_extensions; do
11219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11220    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11222    break 2
11223  fi
11224done
11225  done
11226IFS=$as_save_IFS
11227
11228  ;;
11229esac
11230fi
11231XARGS=$ac_cv_path_XARGS
11232if test -n "$XARGS"; then
11233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11234$as_echo "$XARGS" >&6; }
11235else
11236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11237$as_echo "no" >&6; }
11238fi
11239
11240
11241  test -n "$XARGS" && break
11242done
11243
11244    else
11245      # If it succeeded, then it was overridden by the user. We will use it
11246      # for the tool.
11247
11248      # First remove it from the list of overridden variables, so we can test
11249      # for unknown variables in the end.
11250      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11251
11252      # Check if the provided tool contains a complete path.
11253      tool_specified="$XARGS"
11254      tool_basename="${tool_specified##*/}"
11255      if test "x$tool_basename" = "x$tool_specified"; then
11256        # A command without a complete path is provided, search $PATH.
11257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11258$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11259        # Extract the first word of "$tool_basename", so it can be a program name with args.
11260set dummy $tool_basename; ac_word=$2
11261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11262$as_echo_n "checking for $ac_word... " >&6; }
11263if ${ac_cv_path_XARGS+:} false; then :
11264  $as_echo_n "(cached) " >&6
11265else
11266  case $XARGS in
11267  [\\/]* | ?:[\\/]*)
11268  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11269  ;;
11270  *)
11271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11272for as_dir in $PATH
11273do
11274  IFS=$as_save_IFS
11275  test -z "$as_dir" && as_dir=.
11276    for ac_exec_ext in '' $ac_executable_extensions; do
11277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11278    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11280    break 2
11281  fi
11282done
11283  done
11284IFS=$as_save_IFS
11285
11286  ;;
11287esac
11288fi
11289XARGS=$ac_cv_path_XARGS
11290if test -n "$XARGS"; then
11291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11292$as_echo "$XARGS" >&6; }
11293else
11294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11295$as_echo "no" >&6; }
11296fi
11297
11298
11299        if test "x$XARGS" = x; then
11300          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11301        fi
11302      else
11303        # Otherwise we believe it is a complete path. Use it as it is.
11304        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11305$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11307$as_echo_n "checking for XARGS... " >&6; }
11308        if test ! -x "$tool_specified"; then
11309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11310$as_echo "not found" >&6; }
11311          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11312        fi
11313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11314$as_echo "$tool_specified" >&6; }
11315      fi
11316    fi
11317  fi
11318
11319
11320
11321  if test "x$XARGS" = x; then
11322    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11323  fi
11324
11325
11326
11327  # Then required tools that require some special treatment.
11328
11329
11330  # Publish this variable in the help.
11331
11332
11333  if test "x$AWK" = x; then
11334    # The variable is not set by user, try to locate tool using the code snippet
11335    for ac_prog in gawk mawk nawk awk
11336do
11337  # Extract the first word of "$ac_prog", so it can be a program name with args.
11338set dummy $ac_prog; ac_word=$2
11339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11340$as_echo_n "checking for $ac_word... " >&6; }
11341if ${ac_cv_prog_AWK+:} false; then :
11342  $as_echo_n "(cached) " >&6
11343else
11344  if test -n "$AWK"; then
11345  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11346else
11347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11348for as_dir in $PATH
11349do
11350  IFS=$as_save_IFS
11351  test -z "$as_dir" && as_dir=.
11352    for ac_exec_ext in '' $ac_executable_extensions; do
11353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11354    ac_cv_prog_AWK="$ac_prog"
11355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11356    break 2
11357  fi
11358done
11359  done
11360IFS=$as_save_IFS
11361
11362fi
11363fi
11364AWK=$ac_cv_prog_AWK
11365if test -n "$AWK"; then
11366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11367$as_echo "$AWK" >&6; }
11368else
11369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11370$as_echo "no" >&6; }
11371fi
11372
11373
11374  test -n "$AWK" && break
11375done
11376
11377  else
11378    # The variable is set, but is it from the command line or the environment?
11379
11380    # Try to remove the string !AWK! from our list.
11381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11383      # If it failed, the variable was not from the command line. Ignore it,
11384      # but warn the user (except for BASH, which is always set by the calling BASH).
11385      if test "xAWK" != xBASH; then
11386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11387$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11388      fi
11389      # Try to locate tool using the code snippet
11390      for ac_prog in gawk mawk nawk awk
11391do
11392  # Extract the first word of "$ac_prog", so it can be a program name with args.
11393set dummy $ac_prog; ac_word=$2
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11395$as_echo_n "checking for $ac_word... " >&6; }
11396if ${ac_cv_prog_AWK+:} false; then :
11397  $as_echo_n "(cached) " >&6
11398else
11399  if test -n "$AWK"; then
11400  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11401else
11402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11403for as_dir in $PATH
11404do
11405  IFS=$as_save_IFS
11406  test -z "$as_dir" && as_dir=.
11407    for ac_exec_ext in '' $ac_executable_extensions; do
11408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11409    ac_cv_prog_AWK="$ac_prog"
11410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11411    break 2
11412  fi
11413done
11414  done
11415IFS=$as_save_IFS
11416
11417fi
11418fi
11419AWK=$ac_cv_prog_AWK
11420if test -n "$AWK"; then
11421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11422$as_echo "$AWK" >&6; }
11423else
11424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11425$as_echo "no" >&6; }
11426fi
11427
11428
11429  test -n "$AWK" && break
11430done
11431
11432    else
11433      # If it succeeded, then it was overridden by the user. We will use it
11434      # for the tool.
11435
11436      # First remove it from the list of overridden variables, so we can test
11437      # for unknown variables in the end.
11438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11439
11440      # Check if the provided tool contains a complete path.
11441      tool_specified="$AWK"
11442      tool_basename="${tool_specified##*/}"
11443      if test "x$tool_basename" = "x$tool_specified"; then
11444        # A command without a complete path is provided, search $PATH.
11445        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11446$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11447        # Extract the first word of "$tool_basename", so it can be a program name with args.
11448set dummy $tool_basename; ac_word=$2
11449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11450$as_echo_n "checking for $ac_word... " >&6; }
11451if ${ac_cv_path_AWK+:} false; then :
11452  $as_echo_n "(cached) " >&6
11453else
11454  case $AWK in
11455  [\\/]* | ?:[\\/]*)
11456  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11457  ;;
11458  *)
11459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11460for as_dir in $PATH
11461do
11462  IFS=$as_save_IFS
11463  test -z "$as_dir" && as_dir=.
11464    for ac_exec_ext in '' $ac_executable_extensions; do
11465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11466    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11468    break 2
11469  fi
11470done
11471  done
11472IFS=$as_save_IFS
11473
11474  ;;
11475esac
11476fi
11477AWK=$ac_cv_path_AWK
11478if test -n "$AWK"; then
11479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11480$as_echo "$AWK" >&6; }
11481else
11482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
11484fi
11485
11486
11487        if test "x$AWK" = x; then
11488          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11489        fi
11490      else
11491        # Otherwise we believe it is a complete path. Use it as it is.
11492        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11493$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11495$as_echo_n "checking for AWK... " >&6; }
11496        if test ! -x "$tool_specified"; then
11497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11498$as_echo "not found" >&6; }
11499          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11500        fi
11501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11502$as_echo "$tool_specified" >&6; }
11503      fi
11504    fi
11505  fi
11506
11507
11508  if test "x$AWK" = x; then
11509    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11510  fi
11511
11512
11513
11514
11515  # Publish this variable in the help.
11516
11517
11518  if test "x$GREP" = x; then
11519    # The variable is not set by user, try to locate tool using the code snippet
11520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11521$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11522if ${ac_cv_path_GREP+:} false; then :
11523  $as_echo_n "(cached) " >&6
11524else
11525  if test -z "$GREP"; then
11526  ac_path_GREP_found=false
11527  # Loop through the user's path and test for each of PROGNAME-LIST
11528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11529for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11530do
11531  IFS=$as_save_IFS
11532  test -z "$as_dir" && as_dir=.
11533    for ac_prog in grep ggrep; do
11534    for ac_exec_ext in '' $ac_executable_extensions; do
11535      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11536      as_fn_executable_p "$ac_path_GREP" || continue
11537# Check for GNU ac_path_GREP and select it if it is found.
11538  # Check for GNU $ac_path_GREP
11539case `"$ac_path_GREP" --version 2>&1` in
11540*GNU*)
11541  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11542*)
11543  ac_count=0
11544  $as_echo_n 0123456789 >"conftest.in"
11545  while :
11546  do
11547    cat "conftest.in" "conftest.in" >"conftest.tmp"
11548    mv "conftest.tmp" "conftest.in"
11549    cp "conftest.in" "conftest.nl"
11550    $as_echo 'GREP' >> "conftest.nl"
11551    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11552    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11553    as_fn_arith $ac_count + 1 && ac_count=$as_val
11554    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11555      # Best one so far, save it but keep looking for a better one
11556      ac_cv_path_GREP="$ac_path_GREP"
11557      ac_path_GREP_max=$ac_count
11558    fi
11559    # 10*(2^10) chars as input seems more than enough
11560    test $ac_count -gt 10 && break
11561  done
11562  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11563esac
11564
11565      $ac_path_GREP_found && break 3
11566    done
11567  done
11568  done
11569IFS=$as_save_IFS
11570  if test -z "$ac_cv_path_GREP"; then
11571    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11572  fi
11573else
11574  ac_cv_path_GREP=$GREP
11575fi
11576
11577fi
11578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11579$as_echo "$ac_cv_path_GREP" >&6; }
11580 GREP="$ac_cv_path_GREP"
11581
11582
11583  else
11584    # The variable is set, but is it from the command line or the environment?
11585
11586    # Try to remove the string !GREP! from our list.
11587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11589      # If it failed, the variable was not from the command line. Ignore it,
11590      # but warn the user (except for BASH, which is always set by the calling BASH).
11591      if test "xGREP" != xBASH; then
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11593$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11594      fi
11595      # Try to locate tool using the code snippet
11596      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11597$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11598if ${ac_cv_path_GREP+:} false; then :
11599  $as_echo_n "(cached) " >&6
11600else
11601  if test -z "$GREP"; then
11602  ac_path_GREP_found=false
11603  # Loop through the user's path and test for each of PROGNAME-LIST
11604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11605for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11606do
11607  IFS=$as_save_IFS
11608  test -z "$as_dir" && as_dir=.
11609    for ac_prog in grep ggrep; do
11610    for ac_exec_ext in '' $ac_executable_extensions; do
11611      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11612      as_fn_executable_p "$ac_path_GREP" || continue
11613# Check for GNU ac_path_GREP and select it if it is found.
11614  # Check for GNU $ac_path_GREP
11615case `"$ac_path_GREP" --version 2>&1` in
11616*GNU*)
11617  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11618*)
11619  ac_count=0
11620  $as_echo_n 0123456789 >"conftest.in"
11621  while :
11622  do
11623    cat "conftest.in" "conftest.in" >"conftest.tmp"
11624    mv "conftest.tmp" "conftest.in"
11625    cp "conftest.in" "conftest.nl"
11626    $as_echo 'GREP' >> "conftest.nl"
11627    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11628    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11629    as_fn_arith $ac_count + 1 && ac_count=$as_val
11630    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11631      # Best one so far, save it but keep looking for a better one
11632      ac_cv_path_GREP="$ac_path_GREP"
11633      ac_path_GREP_max=$ac_count
11634    fi
11635    # 10*(2^10) chars as input seems more than enough
11636    test $ac_count -gt 10 && break
11637  done
11638  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11639esac
11640
11641      $ac_path_GREP_found && break 3
11642    done
11643  done
11644  done
11645IFS=$as_save_IFS
11646  if test -z "$ac_cv_path_GREP"; then
11647    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11648  fi
11649else
11650  ac_cv_path_GREP=$GREP
11651fi
11652
11653fi
11654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11655$as_echo "$ac_cv_path_GREP" >&6; }
11656 GREP="$ac_cv_path_GREP"
11657
11658
11659    else
11660      # If it succeeded, then it was overridden by the user. We will use it
11661      # for the tool.
11662
11663      # First remove it from the list of overridden variables, so we can test
11664      # for unknown variables in the end.
11665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11666
11667      # Check if the provided tool contains a complete path.
11668      tool_specified="$GREP"
11669      tool_basename="${tool_specified##*/}"
11670      if test "x$tool_basename" = "x$tool_specified"; then
11671        # A command without a complete path is provided, search $PATH.
11672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11673$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11674        # Extract the first word of "$tool_basename", so it can be a program name with args.
11675set dummy $tool_basename; ac_word=$2
11676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11677$as_echo_n "checking for $ac_word... " >&6; }
11678if ${ac_cv_path_GREP+:} false; then :
11679  $as_echo_n "(cached) " >&6
11680else
11681  case $GREP in
11682  [\\/]* | ?:[\\/]*)
11683  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11684  ;;
11685  *)
11686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11687for as_dir in $PATH
11688do
11689  IFS=$as_save_IFS
11690  test -z "$as_dir" && as_dir=.
11691    for ac_exec_ext in '' $ac_executable_extensions; do
11692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11693    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11695    break 2
11696  fi
11697done
11698  done
11699IFS=$as_save_IFS
11700
11701  ;;
11702esac
11703fi
11704GREP=$ac_cv_path_GREP
11705if test -n "$GREP"; then
11706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11707$as_echo "$GREP" >&6; }
11708else
11709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
11711fi
11712
11713
11714        if test "x$GREP" = x; then
11715          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11716        fi
11717      else
11718        # Otherwise we believe it is a complete path. Use it as it is.
11719        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11720$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11722$as_echo_n "checking for GREP... " >&6; }
11723        if test ! -x "$tool_specified"; then
11724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11725$as_echo "not found" >&6; }
11726          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11727        fi
11728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11729$as_echo "$tool_specified" >&6; }
11730      fi
11731    fi
11732  fi
11733
11734
11735  if test "x$GREP" = x; then
11736    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11737  fi
11738
11739
11740
11741
11742  # Publish this variable in the help.
11743
11744
11745  if test "x$EGREP" = x; then
11746    # The variable is not set by user, try to locate tool using the code snippet
11747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11748$as_echo_n "checking for egrep... " >&6; }
11749if ${ac_cv_path_EGREP+:} false; then :
11750  $as_echo_n "(cached) " >&6
11751else
11752  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11753   then ac_cv_path_EGREP="$GREP -E"
11754   else
11755     if test -z "$EGREP"; then
11756  ac_path_EGREP_found=false
11757  # Loop through the user's path and test for each of PROGNAME-LIST
11758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11759for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11760do
11761  IFS=$as_save_IFS
11762  test -z "$as_dir" && as_dir=.
11763    for ac_prog in egrep; do
11764    for ac_exec_ext in '' $ac_executable_extensions; do
11765      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11766      as_fn_executable_p "$ac_path_EGREP" || continue
11767# Check for GNU ac_path_EGREP and select it if it is found.
11768  # Check for GNU $ac_path_EGREP
11769case `"$ac_path_EGREP" --version 2>&1` in
11770*GNU*)
11771  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11772*)
11773  ac_count=0
11774  $as_echo_n 0123456789 >"conftest.in"
11775  while :
11776  do
11777    cat "conftest.in" "conftest.in" >"conftest.tmp"
11778    mv "conftest.tmp" "conftest.in"
11779    cp "conftest.in" "conftest.nl"
11780    $as_echo 'EGREP' >> "conftest.nl"
11781    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11782    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11783    as_fn_arith $ac_count + 1 && ac_count=$as_val
11784    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11785      # Best one so far, save it but keep looking for a better one
11786      ac_cv_path_EGREP="$ac_path_EGREP"
11787      ac_path_EGREP_max=$ac_count
11788    fi
11789    # 10*(2^10) chars as input seems more than enough
11790    test $ac_count -gt 10 && break
11791  done
11792  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11793esac
11794
11795      $ac_path_EGREP_found && break 3
11796    done
11797  done
11798  done
11799IFS=$as_save_IFS
11800  if test -z "$ac_cv_path_EGREP"; then
11801    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11802  fi
11803else
11804  ac_cv_path_EGREP=$EGREP
11805fi
11806
11807   fi
11808fi
11809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11810$as_echo "$ac_cv_path_EGREP" >&6; }
11811 EGREP="$ac_cv_path_EGREP"
11812
11813
11814  else
11815    # The variable is set, but is it from the command line or the environment?
11816
11817    # Try to remove the string !EGREP! from our list.
11818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11820      # If it failed, the variable was not from the command line. Ignore it,
11821      # but warn the user (except for BASH, which is always set by the calling BASH).
11822      if test "xEGREP" != xBASH; then
11823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11824$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11825      fi
11826      # Try to locate tool using the code snippet
11827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11828$as_echo_n "checking for egrep... " >&6; }
11829if ${ac_cv_path_EGREP+:} false; then :
11830  $as_echo_n "(cached) " >&6
11831else
11832  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11833   then ac_cv_path_EGREP="$GREP -E"
11834   else
11835     if test -z "$EGREP"; then
11836  ac_path_EGREP_found=false
11837  # Loop through the user's path and test for each of PROGNAME-LIST
11838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11839for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11840do
11841  IFS=$as_save_IFS
11842  test -z "$as_dir" && as_dir=.
11843    for ac_prog in egrep; do
11844    for ac_exec_ext in '' $ac_executable_extensions; do
11845      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11846      as_fn_executable_p "$ac_path_EGREP" || continue
11847# Check for GNU ac_path_EGREP and select it if it is found.
11848  # Check for GNU $ac_path_EGREP
11849case `"$ac_path_EGREP" --version 2>&1` in
11850*GNU*)
11851  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11852*)
11853  ac_count=0
11854  $as_echo_n 0123456789 >"conftest.in"
11855  while :
11856  do
11857    cat "conftest.in" "conftest.in" >"conftest.tmp"
11858    mv "conftest.tmp" "conftest.in"
11859    cp "conftest.in" "conftest.nl"
11860    $as_echo 'EGREP' >> "conftest.nl"
11861    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11862    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11863    as_fn_arith $ac_count + 1 && ac_count=$as_val
11864    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11865      # Best one so far, save it but keep looking for a better one
11866      ac_cv_path_EGREP="$ac_path_EGREP"
11867      ac_path_EGREP_max=$ac_count
11868    fi
11869    # 10*(2^10) chars as input seems more than enough
11870    test $ac_count -gt 10 && break
11871  done
11872  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11873esac
11874
11875      $ac_path_EGREP_found && break 3
11876    done
11877  done
11878  done
11879IFS=$as_save_IFS
11880  if test -z "$ac_cv_path_EGREP"; then
11881    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11882  fi
11883else
11884  ac_cv_path_EGREP=$EGREP
11885fi
11886
11887   fi
11888fi
11889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11890$as_echo "$ac_cv_path_EGREP" >&6; }
11891 EGREP="$ac_cv_path_EGREP"
11892
11893
11894    else
11895      # If it succeeded, then it was overridden by the user. We will use it
11896      # for the tool.
11897
11898      # First remove it from the list of overridden variables, so we can test
11899      # for unknown variables in the end.
11900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11901
11902      # Check if the provided tool contains a complete path.
11903      tool_specified="$EGREP"
11904      tool_basename="${tool_specified##*/}"
11905      if test "x$tool_basename" = "x$tool_specified"; then
11906        # A command without a complete path is provided, search $PATH.
11907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11908$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11909        # Extract the first word of "$tool_basename", so it can be a program name with args.
11910set dummy $tool_basename; ac_word=$2
11911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11912$as_echo_n "checking for $ac_word... " >&6; }
11913if ${ac_cv_path_EGREP+:} false; then :
11914  $as_echo_n "(cached) " >&6
11915else
11916  case $EGREP in
11917  [\\/]* | ?:[\\/]*)
11918  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11919  ;;
11920  *)
11921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11922for as_dir in $PATH
11923do
11924  IFS=$as_save_IFS
11925  test -z "$as_dir" && as_dir=.
11926    for ac_exec_ext in '' $ac_executable_extensions; do
11927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11928    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11930    break 2
11931  fi
11932done
11933  done
11934IFS=$as_save_IFS
11935
11936  ;;
11937esac
11938fi
11939EGREP=$ac_cv_path_EGREP
11940if test -n "$EGREP"; then
11941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11942$as_echo "$EGREP" >&6; }
11943else
11944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11945$as_echo "no" >&6; }
11946fi
11947
11948
11949        if test "x$EGREP" = x; then
11950          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11951        fi
11952      else
11953        # Otherwise we believe it is a complete path. Use it as it is.
11954        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11955$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11956        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11957$as_echo_n "checking for EGREP... " >&6; }
11958        if test ! -x "$tool_specified"; then
11959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11960$as_echo "not found" >&6; }
11961          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11962        fi
11963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11964$as_echo "$tool_specified" >&6; }
11965      fi
11966    fi
11967  fi
11968
11969
11970  if test "x$EGREP" = x; then
11971    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11972  fi
11973
11974
11975
11976
11977  # Publish this variable in the help.
11978
11979
11980  if test "x$FGREP" = x; then
11981    # The variable is not set by user, try to locate tool using the code snippet
11982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11983$as_echo_n "checking for fgrep... " >&6; }
11984if ${ac_cv_path_FGREP+:} false; then :
11985  $as_echo_n "(cached) " >&6
11986else
11987  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11988   then ac_cv_path_FGREP="$GREP -F"
11989   else
11990     if test -z "$FGREP"; then
11991  ac_path_FGREP_found=false
11992  # Loop through the user's path and test for each of PROGNAME-LIST
11993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11994for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11995do
11996  IFS=$as_save_IFS
11997  test -z "$as_dir" && as_dir=.
11998    for ac_prog in fgrep; do
11999    for ac_exec_ext in '' $ac_executable_extensions; do
12000      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12001      as_fn_executable_p "$ac_path_FGREP" || continue
12002# Check for GNU ac_path_FGREP and select it if it is found.
12003  # Check for GNU $ac_path_FGREP
12004case `"$ac_path_FGREP" --version 2>&1` in
12005*GNU*)
12006  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12007*)
12008  ac_count=0
12009  $as_echo_n 0123456789 >"conftest.in"
12010  while :
12011  do
12012    cat "conftest.in" "conftest.in" >"conftest.tmp"
12013    mv "conftest.tmp" "conftest.in"
12014    cp "conftest.in" "conftest.nl"
12015    $as_echo 'FGREP' >> "conftest.nl"
12016    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12017    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12018    as_fn_arith $ac_count + 1 && ac_count=$as_val
12019    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12020      # Best one so far, save it but keep looking for a better one
12021      ac_cv_path_FGREP="$ac_path_FGREP"
12022      ac_path_FGREP_max=$ac_count
12023    fi
12024    # 10*(2^10) chars as input seems more than enough
12025    test $ac_count -gt 10 && break
12026  done
12027  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12028esac
12029
12030      $ac_path_FGREP_found && break 3
12031    done
12032  done
12033  done
12034IFS=$as_save_IFS
12035  if test -z "$ac_cv_path_FGREP"; then
12036    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12037  fi
12038else
12039  ac_cv_path_FGREP=$FGREP
12040fi
12041
12042   fi
12043fi
12044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12045$as_echo "$ac_cv_path_FGREP" >&6; }
12046 FGREP="$ac_cv_path_FGREP"
12047
12048
12049  else
12050    # The variable is set, but is it from the command line or the environment?
12051
12052    # Try to remove the string !FGREP! from our list.
12053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12055      # If it failed, the variable was not from the command line. Ignore it,
12056      # but warn the user (except for BASH, which is always set by the calling BASH).
12057      if test "xFGREP" != xBASH; then
12058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12059$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12060      fi
12061      # Try to locate tool using the code snippet
12062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12063$as_echo_n "checking for fgrep... " >&6; }
12064if ${ac_cv_path_FGREP+:} false; then :
12065  $as_echo_n "(cached) " >&6
12066else
12067  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12068   then ac_cv_path_FGREP="$GREP -F"
12069   else
12070     if test -z "$FGREP"; then
12071  ac_path_FGREP_found=false
12072  # Loop through the user's path and test for each of PROGNAME-LIST
12073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12074for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12075do
12076  IFS=$as_save_IFS
12077  test -z "$as_dir" && as_dir=.
12078    for ac_prog in fgrep; do
12079    for ac_exec_ext in '' $ac_executable_extensions; do
12080      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12081      as_fn_executable_p "$ac_path_FGREP" || continue
12082# Check for GNU ac_path_FGREP and select it if it is found.
12083  # Check for GNU $ac_path_FGREP
12084case `"$ac_path_FGREP" --version 2>&1` in
12085*GNU*)
12086  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12087*)
12088  ac_count=0
12089  $as_echo_n 0123456789 >"conftest.in"
12090  while :
12091  do
12092    cat "conftest.in" "conftest.in" >"conftest.tmp"
12093    mv "conftest.tmp" "conftest.in"
12094    cp "conftest.in" "conftest.nl"
12095    $as_echo 'FGREP' >> "conftest.nl"
12096    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12097    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12098    as_fn_arith $ac_count + 1 && ac_count=$as_val
12099    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12100      # Best one so far, save it but keep looking for a better one
12101      ac_cv_path_FGREP="$ac_path_FGREP"
12102      ac_path_FGREP_max=$ac_count
12103    fi
12104    # 10*(2^10) chars as input seems more than enough
12105    test $ac_count -gt 10 && break
12106  done
12107  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12108esac
12109
12110      $ac_path_FGREP_found && break 3
12111    done
12112  done
12113  done
12114IFS=$as_save_IFS
12115  if test -z "$ac_cv_path_FGREP"; then
12116    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12117  fi
12118else
12119  ac_cv_path_FGREP=$FGREP
12120fi
12121
12122   fi
12123fi
12124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12125$as_echo "$ac_cv_path_FGREP" >&6; }
12126 FGREP="$ac_cv_path_FGREP"
12127
12128
12129    else
12130      # If it succeeded, then it was overridden by the user. We will use it
12131      # for the tool.
12132
12133      # First remove it from the list of overridden variables, so we can test
12134      # for unknown variables in the end.
12135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12136
12137      # Check if the provided tool contains a complete path.
12138      tool_specified="$FGREP"
12139      tool_basename="${tool_specified##*/}"
12140      if test "x$tool_basename" = "x$tool_specified"; then
12141        # A command without a complete path is provided, search $PATH.
12142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12143$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12144        # Extract the first word of "$tool_basename", so it can be a program name with args.
12145set dummy $tool_basename; ac_word=$2
12146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12147$as_echo_n "checking for $ac_word... " >&6; }
12148if ${ac_cv_path_FGREP+:} false; then :
12149  $as_echo_n "(cached) " >&6
12150else
12151  case $FGREP in
12152  [\\/]* | ?:[\\/]*)
12153  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12154  ;;
12155  *)
12156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12157for as_dir in $PATH
12158do
12159  IFS=$as_save_IFS
12160  test -z "$as_dir" && as_dir=.
12161    for ac_exec_ext in '' $ac_executable_extensions; do
12162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12163    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12165    break 2
12166  fi
12167done
12168  done
12169IFS=$as_save_IFS
12170
12171  ;;
12172esac
12173fi
12174FGREP=$ac_cv_path_FGREP
12175if test -n "$FGREP"; then
12176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12177$as_echo "$FGREP" >&6; }
12178else
12179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12180$as_echo "no" >&6; }
12181fi
12182
12183
12184        if test "x$FGREP" = x; then
12185          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12186        fi
12187      else
12188        # Otherwise we believe it is a complete path. Use it as it is.
12189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12190$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12192$as_echo_n "checking for FGREP... " >&6; }
12193        if test ! -x "$tool_specified"; then
12194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12195$as_echo "not found" >&6; }
12196          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12197        fi
12198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12199$as_echo "$tool_specified" >&6; }
12200      fi
12201    fi
12202  fi
12203
12204
12205  if test "x$FGREP" = x; then
12206    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12207  fi
12208
12209
12210
12211
12212  # Publish this variable in the help.
12213
12214
12215  if test "x$SED" = x; then
12216    # The variable is not set by user, try to locate tool using the code snippet
12217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12218$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12219if ${ac_cv_path_SED+:} false; then :
12220  $as_echo_n "(cached) " >&6
12221else
12222            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12223     for ac_i in 1 2 3 4 5 6 7; do
12224       ac_script="$ac_script$as_nl$ac_script"
12225     done
12226     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12227     { ac_script=; unset ac_script;}
12228     if test -z "$SED"; then
12229  ac_path_SED_found=false
12230  # Loop through the user's path and test for each of PROGNAME-LIST
12231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12232for as_dir in $PATH
12233do
12234  IFS=$as_save_IFS
12235  test -z "$as_dir" && as_dir=.
12236    for ac_prog in sed gsed; do
12237    for ac_exec_ext in '' $ac_executable_extensions; do
12238      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12239      as_fn_executable_p "$ac_path_SED" || continue
12240# Check for GNU ac_path_SED and select it if it is found.
12241  # Check for GNU $ac_path_SED
12242case `"$ac_path_SED" --version 2>&1` in
12243*GNU*)
12244  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12245*)
12246  ac_count=0
12247  $as_echo_n 0123456789 >"conftest.in"
12248  while :
12249  do
12250    cat "conftest.in" "conftest.in" >"conftest.tmp"
12251    mv "conftest.tmp" "conftest.in"
12252    cp "conftest.in" "conftest.nl"
12253    $as_echo '' >> "conftest.nl"
12254    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12255    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12256    as_fn_arith $ac_count + 1 && ac_count=$as_val
12257    if test $ac_count -gt ${ac_path_SED_max-0}; then
12258      # Best one so far, save it but keep looking for a better one
12259      ac_cv_path_SED="$ac_path_SED"
12260      ac_path_SED_max=$ac_count
12261    fi
12262    # 10*(2^10) chars as input seems more than enough
12263    test $ac_count -gt 10 && break
12264  done
12265  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12266esac
12267
12268      $ac_path_SED_found && break 3
12269    done
12270  done
12271  done
12272IFS=$as_save_IFS
12273  if test -z "$ac_cv_path_SED"; then
12274    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12275  fi
12276else
12277  ac_cv_path_SED=$SED
12278fi
12279
12280fi
12281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12282$as_echo "$ac_cv_path_SED" >&6; }
12283 SED="$ac_cv_path_SED"
12284  rm -f conftest.sed
12285
12286  else
12287    # The variable is set, but is it from the command line or the environment?
12288
12289    # Try to remove the string !SED! from our list.
12290    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12291    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12292      # If it failed, the variable was not from the command line. Ignore it,
12293      # but warn the user (except for BASH, which is always set by the calling BASH).
12294      if test "xSED" != xBASH; then
12295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12296$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12297      fi
12298      # Try to locate tool using the code snippet
12299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12300$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12301if ${ac_cv_path_SED+:} false; then :
12302  $as_echo_n "(cached) " >&6
12303else
12304            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12305     for ac_i in 1 2 3 4 5 6 7; do
12306       ac_script="$ac_script$as_nl$ac_script"
12307     done
12308     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12309     { ac_script=; unset ac_script;}
12310     if test -z "$SED"; then
12311  ac_path_SED_found=false
12312  # Loop through the user's path and test for each of PROGNAME-LIST
12313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12314for as_dir in $PATH
12315do
12316  IFS=$as_save_IFS
12317  test -z "$as_dir" && as_dir=.
12318    for ac_prog in sed gsed; do
12319    for ac_exec_ext in '' $ac_executable_extensions; do
12320      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12321      as_fn_executable_p "$ac_path_SED" || continue
12322# Check for GNU ac_path_SED and select it if it is found.
12323  # Check for GNU $ac_path_SED
12324case `"$ac_path_SED" --version 2>&1` in
12325*GNU*)
12326  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12327*)
12328  ac_count=0
12329  $as_echo_n 0123456789 >"conftest.in"
12330  while :
12331  do
12332    cat "conftest.in" "conftest.in" >"conftest.tmp"
12333    mv "conftest.tmp" "conftest.in"
12334    cp "conftest.in" "conftest.nl"
12335    $as_echo '' >> "conftest.nl"
12336    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12337    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12338    as_fn_arith $ac_count + 1 && ac_count=$as_val
12339    if test $ac_count -gt ${ac_path_SED_max-0}; then
12340      # Best one so far, save it but keep looking for a better one
12341      ac_cv_path_SED="$ac_path_SED"
12342      ac_path_SED_max=$ac_count
12343    fi
12344    # 10*(2^10) chars as input seems more than enough
12345    test $ac_count -gt 10 && break
12346  done
12347  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12348esac
12349
12350      $ac_path_SED_found && break 3
12351    done
12352  done
12353  done
12354IFS=$as_save_IFS
12355  if test -z "$ac_cv_path_SED"; then
12356    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12357  fi
12358else
12359  ac_cv_path_SED=$SED
12360fi
12361
12362fi
12363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12364$as_echo "$ac_cv_path_SED" >&6; }
12365 SED="$ac_cv_path_SED"
12366  rm -f conftest.sed
12367
12368    else
12369      # If it succeeded, then it was overridden by the user. We will use it
12370      # for the tool.
12371
12372      # First remove it from the list of overridden variables, so we can test
12373      # for unknown variables in the end.
12374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12375
12376      # Check if the provided tool contains a complete path.
12377      tool_specified="$SED"
12378      tool_basename="${tool_specified##*/}"
12379      if test "x$tool_basename" = "x$tool_specified"; then
12380        # A command without a complete path is provided, search $PATH.
12381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12382$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12383        # Extract the first word of "$tool_basename", so it can be a program name with args.
12384set dummy $tool_basename; ac_word=$2
12385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12386$as_echo_n "checking for $ac_word... " >&6; }
12387if ${ac_cv_path_SED+:} false; then :
12388  $as_echo_n "(cached) " >&6
12389else
12390  case $SED in
12391  [\\/]* | ?:[\\/]*)
12392  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12393  ;;
12394  *)
12395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12396for as_dir in $PATH
12397do
12398  IFS=$as_save_IFS
12399  test -z "$as_dir" && as_dir=.
12400    for ac_exec_ext in '' $ac_executable_extensions; do
12401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12402    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12404    break 2
12405  fi
12406done
12407  done
12408IFS=$as_save_IFS
12409
12410  ;;
12411esac
12412fi
12413SED=$ac_cv_path_SED
12414if test -n "$SED"; then
12415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12416$as_echo "$SED" >&6; }
12417else
12418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12419$as_echo "no" >&6; }
12420fi
12421
12422
12423        if test "x$SED" = x; then
12424          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12425        fi
12426      else
12427        # Otherwise we believe it is a complete path. Use it as it is.
12428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12429$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12431$as_echo_n "checking for SED... " >&6; }
12432        if test ! -x "$tool_specified"; then
12433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12434$as_echo "not found" >&6; }
12435          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12436        fi
12437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12438$as_echo "$tool_specified" >&6; }
12439      fi
12440    fi
12441  fi
12442
12443
12444  if test "x$SED" = x; then
12445    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12446  fi
12447
12448
12449
12450  # Always force rm.
12451  RM="$RM -f"
12452
12453  # pwd behaves differently on various platforms and some don't support the -L flag.
12454  # Always use the bash builtin pwd to get uniform behavior.
12455  THEPWDCMD=pwd
12456
12457  # These are not required on all platforms
12458
12459
12460  # Publish this variable in the help.
12461
12462
12463  if test "x$CYGPATH" = x; then
12464    # The variable is not set by user, try to locate tool using the code snippet
12465    for ac_prog in cygpath
12466do
12467  # Extract the first word of "$ac_prog", so it can be a program name with args.
12468set dummy $ac_prog; ac_word=$2
12469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12470$as_echo_n "checking for $ac_word... " >&6; }
12471if ${ac_cv_path_CYGPATH+:} false; then :
12472  $as_echo_n "(cached) " >&6
12473else
12474  case $CYGPATH in
12475  [\\/]* | ?:[\\/]*)
12476  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12477  ;;
12478  *)
12479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12480for as_dir in $PATH
12481do
12482  IFS=$as_save_IFS
12483  test -z "$as_dir" && as_dir=.
12484    for ac_exec_ext in '' $ac_executable_extensions; do
12485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12486    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12488    break 2
12489  fi
12490done
12491  done
12492IFS=$as_save_IFS
12493
12494  ;;
12495esac
12496fi
12497CYGPATH=$ac_cv_path_CYGPATH
12498if test -n "$CYGPATH"; then
12499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12500$as_echo "$CYGPATH" >&6; }
12501else
12502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12503$as_echo "no" >&6; }
12504fi
12505
12506
12507  test -n "$CYGPATH" && break
12508done
12509
12510  else
12511    # The variable is set, but is it from the command line or the environment?
12512
12513    # Try to remove the string !CYGPATH! from our list.
12514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12516      # If it failed, the variable was not from the command line. Ignore it,
12517      # but warn the user (except for BASH, which is always set by the calling BASH).
12518      if test "xCYGPATH" != xBASH; then
12519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12520$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12521      fi
12522      # Try to locate tool using the code snippet
12523      for ac_prog in cygpath
12524do
12525  # Extract the first word of "$ac_prog", so it can be a program name with args.
12526set dummy $ac_prog; ac_word=$2
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12528$as_echo_n "checking for $ac_word... " >&6; }
12529if ${ac_cv_path_CYGPATH+:} false; then :
12530  $as_echo_n "(cached) " >&6
12531else
12532  case $CYGPATH in
12533  [\\/]* | ?:[\\/]*)
12534  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12535  ;;
12536  *)
12537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12538for as_dir in $PATH
12539do
12540  IFS=$as_save_IFS
12541  test -z "$as_dir" && as_dir=.
12542    for ac_exec_ext in '' $ac_executable_extensions; do
12543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12544    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12546    break 2
12547  fi
12548done
12549  done
12550IFS=$as_save_IFS
12551
12552  ;;
12553esac
12554fi
12555CYGPATH=$ac_cv_path_CYGPATH
12556if test -n "$CYGPATH"; then
12557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12558$as_echo "$CYGPATH" >&6; }
12559else
12560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12561$as_echo "no" >&6; }
12562fi
12563
12564
12565  test -n "$CYGPATH" && break
12566done
12567
12568    else
12569      # If it succeeded, then it was overridden by the user. We will use it
12570      # for the tool.
12571
12572      # First remove it from the list of overridden variables, so we can test
12573      # for unknown variables in the end.
12574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12575
12576      # Check if the provided tool contains a complete path.
12577      tool_specified="$CYGPATH"
12578      tool_basename="${tool_specified##*/}"
12579      if test "x$tool_basename" = "x$tool_specified"; then
12580        # A command without a complete path is provided, search $PATH.
12581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12582$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12583        # Extract the first word of "$tool_basename", so it can be a program name with args.
12584set dummy $tool_basename; ac_word=$2
12585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12586$as_echo_n "checking for $ac_word... " >&6; }
12587if ${ac_cv_path_CYGPATH+:} false; then :
12588  $as_echo_n "(cached) " >&6
12589else
12590  case $CYGPATH in
12591  [\\/]* | ?:[\\/]*)
12592  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12593  ;;
12594  *)
12595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12596for as_dir in $PATH
12597do
12598  IFS=$as_save_IFS
12599  test -z "$as_dir" && as_dir=.
12600    for ac_exec_ext in '' $ac_executable_extensions; do
12601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12602    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12604    break 2
12605  fi
12606done
12607  done
12608IFS=$as_save_IFS
12609
12610  ;;
12611esac
12612fi
12613CYGPATH=$ac_cv_path_CYGPATH
12614if test -n "$CYGPATH"; then
12615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12616$as_echo "$CYGPATH" >&6; }
12617else
12618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12619$as_echo "no" >&6; }
12620fi
12621
12622
12623        if test "x$CYGPATH" = x; then
12624          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12625        fi
12626      else
12627        # Otherwise we believe it is a complete path. Use it as it is.
12628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12629$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12631$as_echo_n "checking for CYGPATH... " >&6; }
12632        if test ! -x "$tool_specified"; then
12633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12634$as_echo "not found" >&6; }
12635          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12636        fi
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12638$as_echo "$tool_specified" >&6; }
12639      fi
12640    fi
12641  fi
12642
12643
12644
12645
12646  # Publish this variable in the help.
12647
12648
12649  if test "x$READLINK" = x; then
12650    # The variable is not set by user, try to locate tool using the code snippet
12651    for ac_prog in greadlink readlink
12652do
12653  # Extract the first word of "$ac_prog", so it can be a program name with args.
12654set dummy $ac_prog; ac_word=$2
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12656$as_echo_n "checking for $ac_word... " >&6; }
12657if ${ac_cv_path_READLINK+:} false; then :
12658  $as_echo_n "(cached) " >&6
12659else
12660  case $READLINK in
12661  [\\/]* | ?:[\\/]*)
12662  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12663  ;;
12664  *)
12665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12666for as_dir in $PATH
12667do
12668  IFS=$as_save_IFS
12669  test -z "$as_dir" && as_dir=.
12670    for ac_exec_ext in '' $ac_executable_extensions; do
12671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12672    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12674    break 2
12675  fi
12676done
12677  done
12678IFS=$as_save_IFS
12679
12680  ;;
12681esac
12682fi
12683READLINK=$ac_cv_path_READLINK
12684if test -n "$READLINK"; then
12685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12686$as_echo "$READLINK" >&6; }
12687else
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
12690fi
12691
12692
12693  test -n "$READLINK" && break
12694done
12695
12696  else
12697    # The variable is set, but is it from the command line or the environment?
12698
12699    # Try to remove the string !READLINK! from our list.
12700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12702      # If it failed, the variable was not from the command line. Ignore it,
12703      # but warn the user (except for BASH, which is always set by the calling BASH).
12704      if test "xREADLINK" != xBASH; then
12705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12706$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12707      fi
12708      # Try to locate tool using the code snippet
12709      for ac_prog in greadlink readlink
12710do
12711  # Extract the first word of "$ac_prog", so it can be a program name with args.
12712set dummy $ac_prog; ac_word=$2
12713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12714$as_echo_n "checking for $ac_word... " >&6; }
12715if ${ac_cv_path_READLINK+:} false; then :
12716  $as_echo_n "(cached) " >&6
12717else
12718  case $READLINK in
12719  [\\/]* | ?:[\\/]*)
12720  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12721  ;;
12722  *)
12723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12724for as_dir in $PATH
12725do
12726  IFS=$as_save_IFS
12727  test -z "$as_dir" && as_dir=.
12728    for ac_exec_ext in '' $ac_executable_extensions; do
12729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12730    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12732    break 2
12733  fi
12734done
12735  done
12736IFS=$as_save_IFS
12737
12738  ;;
12739esac
12740fi
12741READLINK=$ac_cv_path_READLINK
12742if test -n "$READLINK"; then
12743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12744$as_echo "$READLINK" >&6; }
12745else
12746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12747$as_echo "no" >&6; }
12748fi
12749
12750
12751  test -n "$READLINK" && break
12752done
12753
12754    else
12755      # If it succeeded, then it was overridden by the user. We will use it
12756      # for the tool.
12757
12758      # First remove it from the list of overridden variables, so we can test
12759      # for unknown variables in the end.
12760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12761
12762      # Check if the provided tool contains a complete path.
12763      tool_specified="$READLINK"
12764      tool_basename="${tool_specified##*/}"
12765      if test "x$tool_basename" = "x$tool_specified"; then
12766        # A command without a complete path is provided, search $PATH.
12767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12768$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12769        # Extract the first word of "$tool_basename", so it can be a program name with args.
12770set dummy $tool_basename; ac_word=$2
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12772$as_echo_n "checking for $ac_word... " >&6; }
12773if ${ac_cv_path_READLINK+:} false; then :
12774  $as_echo_n "(cached) " >&6
12775else
12776  case $READLINK in
12777  [\\/]* | ?:[\\/]*)
12778  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12779  ;;
12780  *)
12781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12782for as_dir in $PATH
12783do
12784  IFS=$as_save_IFS
12785  test -z "$as_dir" && as_dir=.
12786    for ac_exec_ext in '' $ac_executable_extensions; do
12787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12788    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12790    break 2
12791  fi
12792done
12793  done
12794IFS=$as_save_IFS
12795
12796  ;;
12797esac
12798fi
12799READLINK=$ac_cv_path_READLINK
12800if test -n "$READLINK"; then
12801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12802$as_echo "$READLINK" >&6; }
12803else
12804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12805$as_echo "no" >&6; }
12806fi
12807
12808
12809        if test "x$READLINK" = x; then
12810          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12811        fi
12812      else
12813        # Otherwise we believe it is a complete path. Use it as it is.
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12815$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12817$as_echo_n "checking for READLINK... " >&6; }
12818        if test ! -x "$tool_specified"; then
12819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12820$as_echo "not found" >&6; }
12821          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12822        fi
12823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12824$as_echo "$tool_specified" >&6; }
12825      fi
12826    fi
12827  fi
12828
12829
12830
12831
12832  # Publish this variable in the help.
12833
12834
12835  if test "x$DF" = x; then
12836    # The variable is not set by user, try to locate tool using the code snippet
12837    for ac_prog in df
12838do
12839  # Extract the first word of "$ac_prog", so it can be a program name with args.
12840set dummy $ac_prog; ac_word=$2
12841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842$as_echo_n "checking for $ac_word... " >&6; }
12843if ${ac_cv_path_DF+:} false; then :
12844  $as_echo_n "(cached) " >&6
12845else
12846  case $DF in
12847  [\\/]* | ?:[\\/]*)
12848  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12849  ;;
12850  *)
12851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852for as_dir in $PATH
12853do
12854  IFS=$as_save_IFS
12855  test -z "$as_dir" && as_dir=.
12856    for ac_exec_ext in '' $ac_executable_extensions; do
12857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860    break 2
12861  fi
12862done
12863  done
12864IFS=$as_save_IFS
12865
12866  ;;
12867esac
12868fi
12869DF=$ac_cv_path_DF
12870if test -n "$DF"; then
12871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12872$as_echo "$DF" >&6; }
12873else
12874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875$as_echo "no" >&6; }
12876fi
12877
12878
12879  test -n "$DF" && break
12880done
12881
12882  else
12883    # The variable is set, but is it from the command line or the environment?
12884
12885    # Try to remove the string !DF! from our list.
12886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12888      # If it failed, the variable was not from the command line. Ignore it,
12889      # but warn the user (except for BASH, which is always set by the calling BASH).
12890      if test "xDF" != xBASH; then
12891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12892$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12893      fi
12894      # Try to locate tool using the code snippet
12895      for ac_prog in df
12896do
12897  # Extract the first word of "$ac_prog", so it can be a program name with args.
12898set dummy $ac_prog; ac_word=$2
12899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12900$as_echo_n "checking for $ac_word... " >&6; }
12901if ${ac_cv_path_DF+:} false; then :
12902  $as_echo_n "(cached) " >&6
12903else
12904  case $DF in
12905  [\\/]* | ?:[\\/]*)
12906  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12907  ;;
12908  *)
12909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12910for as_dir in $PATH
12911do
12912  IFS=$as_save_IFS
12913  test -z "$as_dir" && as_dir=.
12914    for ac_exec_ext in '' $ac_executable_extensions; do
12915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12916    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12918    break 2
12919  fi
12920done
12921  done
12922IFS=$as_save_IFS
12923
12924  ;;
12925esac
12926fi
12927DF=$ac_cv_path_DF
12928if test -n "$DF"; then
12929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12930$as_echo "$DF" >&6; }
12931else
12932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12933$as_echo "no" >&6; }
12934fi
12935
12936
12937  test -n "$DF" && break
12938done
12939
12940    else
12941      # If it succeeded, then it was overridden by the user. We will use it
12942      # for the tool.
12943
12944      # First remove it from the list of overridden variables, so we can test
12945      # for unknown variables in the end.
12946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12947
12948      # Check if the provided tool contains a complete path.
12949      tool_specified="$DF"
12950      tool_basename="${tool_specified##*/}"
12951      if test "x$tool_basename" = "x$tool_specified"; then
12952        # A command without a complete path is provided, search $PATH.
12953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12954$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12955        # Extract the first word of "$tool_basename", so it can be a program name with args.
12956set dummy $tool_basename; ac_word=$2
12957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12958$as_echo_n "checking for $ac_word... " >&6; }
12959if ${ac_cv_path_DF+:} false; then :
12960  $as_echo_n "(cached) " >&6
12961else
12962  case $DF in
12963  [\\/]* | ?:[\\/]*)
12964  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12965  ;;
12966  *)
12967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12968for as_dir in $PATH
12969do
12970  IFS=$as_save_IFS
12971  test -z "$as_dir" && as_dir=.
12972    for ac_exec_ext in '' $ac_executable_extensions; do
12973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12974    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12976    break 2
12977  fi
12978done
12979  done
12980IFS=$as_save_IFS
12981
12982  ;;
12983esac
12984fi
12985DF=$ac_cv_path_DF
12986if test -n "$DF"; then
12987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12988$as_echo "$DF" >&6; }
12989else
12990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12991$as_echo "no" >&6; }
12992fi
12993
12994
12995        if test "x$DF" = x; then
12996          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12997        fi
12998      else
12999        # Otherwise we believe it is a complete path. Use it as it is.
13000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13001$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13003$as_echo_n "checking for DF... " >&6; }
13004        if test ! -x "$tool_specified"; then
13005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13006$as_echo "not found" >&6; }
13007          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13008        fi
13009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13010$as_echo "$tool_specified" >&6; }
13011      fi
13012    fi
13013  fi
13014
13015
13016
13017
13018  # Publish this variable in the help.
13019
13020
13021  if test "x$SETFILE" = x; then
13022    # The variable is not set by user, try to locate tool using the code snippet
13023    for ac_prog in SetFile
13024do
13025  # Extract the first word of "$ac_prog", so it can be a program name with args.
13026set dummy $ac_prog; ac_word=$2
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13028$as_echo_n "checking for $ac_word... " >&6; }
13029if ${ac_cv_path_SETFILE+:} false; then :
13030  $as_echo_n "(cached) " >&6
13031else
13032  case $SETFILE in
13033  [\\/]* | ?:[\\/]*)
13034  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13035  ;;
13036  *)
13037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13038for as_dir in $PATH
13039do
13040  IFS=$as_save_IFS
13041  test -z "$as_dir" && as_dir=.
13042    for ac_exec_ext in '' $ac_executable_extensions; do
13043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13044    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13046    break 2
13047  fi
13048done
13049  done
13050IFS=$as_save_IFS
13051
13052  ;;
13053esac
13054fi
13055SETFILE=$ac_cv_path_SETFILE
13056if test -n "$SETFILE"; then
13057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13058$as_echo "$SETFILE" >&6; }
13059else
13060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13061$as_echo "no" >&6; }
13062fi
13063
13064
13065  test -n "$SETFILE" && break
13066done
13067
13068  else
13069    # The variable is set, but is it from the command line or the environment?
13070
13071    # Try to remove the string !SETFILE! from our list.
13072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13074      # If it failed, the variable was not from the command line. Ignore it,
13075      # but warn the user (except for BASH, which is always set by the calling BASH).
13076      if test "xSETFILE" != xBASH; then
13077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13078$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13079      fi
13080      # Try to locate tool using the code snippet
13081      for ac_prog in SetFile
13082do
13083  # Extract the first word of "$ac_prog", so it can be a program name with args.
13084set dummy $ac_prog; ac_word=$2
13085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13086$as_echo_n "checking for $ac_word... " >&6; }
13087if ${ac_cv_path_SETFILE+:} false; then :
13088  $as_echo_n "(cached) " >&6
13089else
13090  case $SETFILE in
13091  [\\/]* | ?:[\\/]*)
13092  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13093  ;;
13094  *)
13095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13096for as_dir in $PATH
13097do
13098  IFS=$as_save_IFS
13099  test -z "$as_dir" && as_dir=.
13100    for ac_exec_ext in '' $ac_executable_extensions; do
13101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13102    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13104    break 2
13105  fi
13106done
13107  done
13108IFS=$as_save_IFS
13109
13110  ;;
13111esac
13112fi
13113SETFILE=$ac_cv_path_SETFILE
13114if test -n "$SETFILE"; then
13115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13116$as_echo "$SETFILE" >&6; }
13117else
13118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13119$as_echo "no" >&6; }
13120fi
13121
13122
13123  test -n "$SETFILE" && break
13124done
13125
13126    else
13127      # If it succeeded, then it was overridden by the user. We will use it
13128      # for the tool.
13129
13130      # First remove it from the list of overridden variables, so we can test
13131      # for unknown variables in the end.
13132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13133
13134      # Check if the provided tool contains a complete path.
13135      tool_specified="$SETFILE"
13136      tool_basename="${tool_specified##*/}"
13137      if test "x$tool_basename" = "x$tool_specified"; then
13138        # A command without a complete path is provided, search $PATH.
13139        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13140$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13141        # Extract the first word of "$tool_basename", so it can be a program name with args.
13142set dummy $tool_basename; ac_word=$2
13143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13144$as_echo_n "checking for $ac_word... " >&6; }
13145if ${ac_cv_path_SETFILE+:} false; then :
13146  $as_echo_n "(cached) " >&6
13147else
13148  case $SETFILE in
13149  [\\/]* | ?:[\\/]*)
13150  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13151  ;;
13152  *)
13153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13154for as_dir in $PATH
13155do
13156  IFS=$as_save_IFS
13157  test -z "$as_dir" && as_dir=.
13158    for ac_exec_ext in '' $ac_executable_extensions; do
13159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13160    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13162    break 2
13163  fi
13164done
13165  done
13166IFS=$as_save_IFS
13167
13168  ;;
13169esac
13170fi
13171SETFILE=$ac_cv_path_SETFILE
13172if test -n "$SETFILE"; then
13173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13174$as_echo "$SETFILE" >&6; }
13175else
13176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13177$as_echo "no" >&6; }
13178fi
13179
13180
13181        if test "x$SETFILE" = x; then
13182          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13183        fi
13184      else
13185        # Otherwise we believe it is a complete path. Use it as it is.
13186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13187$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13189$as_echo_n "checking for SETFILE... " >&6; }
13190        if test ! -x "$tool_specified"; then
13191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13192$as_echo "not found" >&6; }
13193          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13194        fi
13195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13196$as_echo "$tool_specified" >&6; }
13197      fi
13198    fi
13199  fi
13200
13201
13202
13203
13204  # Publish this variable in the help.
13205
13206
13207  if test "x$CPIO" = x; then
13208    # The variable is not set by user, try to locate tool using the code snippet
13209    for ac_prog in cpio bsdcpio
13210do
13211  # Extract the first word of "$ac_prog", so it can be a program name with args.
13212set dummy $ac_prog; ac_word=$2
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13214$as_echo_n "checking for $ac_word... " >&6; }
13215if ${ac_cv_path_CPIO+:} false; then :
13216  $as_echo_n "(cached) " >&6
13217else
13218  case $CPIO in
13219  [\\/]* | ?:[\\/]*)
13220  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13221  ;;
13222  *)
13223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13224for as_dir in $PATH
13225do
13226  IFS=$as_save_IFS
13227  test -z "$as_dir" && as_dir=.
13228    for ac_exec_ext in '' $ac_executable_extensions; do
13229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13230    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13232    break 2
13233  fi
13234done
13235  done
13236IFS=$as_save_IFS
13237
13238  ;;
13239esac
13240fi
13241CPIO=$ac_cv_path_CPIO
13242if test -n "$CPIO"; then
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13244$as_echo "$CPIO" >&6; }
13245else
13246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13247$as_echo "no" >&6; }
13248fi
13249
13250
13251  test -n "$CPIO" && break
13252done
13253
13254  else
13255    # The variable is set, but is it from the command line or the environment?
13256
13257    # Try to remove the string !CPIO! from our list.
13258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13260      # If it failed, the variable was not from the command line. Ignore it,
13261      # but warn the user (except for BASH, which is always set by the calling BASH).
13262      if test "xCPIO" != xBASH; then
13263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13264$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13265      fi
13266      # Try to locate tool using the code snippet
13267      for ac_prog in cpio bsdcpio
13268do
13269  # Extract the first word of "$ac_prog", so it can be a program name with args.
13270set dummy $ac_prog; ac_word=$2
13271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13272$as_echo_n "checking for $ac_word... " >&6; }
13273if ${ac_cv_path_CPIO+:} false; then :
13274  $as_echo_n "(cached) " >&6
13275else
13276  case $CPIO in
13277  [\\/]* | ?:[\\/]*)
13278  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13279  ;;
13280  *)
13281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13282for as_dir in $PATH
13283do
13284  IFS=$as_save_IFS
13285  test -z "$as_dir" && as_dir=.
13286    for ac_exec_ext in '' $ac_executable_extensions; do
13287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13288    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13290    break 2
13291  fi
13292done
13293  done
13294IFS=$as_save_IFS
13295
13296  ;;
13297esac
13298fi
13299CPIO=$ac_cv_path_CPIO
13300if test -n "$CPIO"; then
13301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13302$as_echo "$CPIO" >&6; }
13303else
13304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13305$as_echo "no" >&6; }
13306fi
13307
13308
13309  test -n "$CPIO" && break
13310done
13311
13312    else
13313      # If it succeeded, then it was overridden by the user. We will use it
13314      # for the tool.
13315
13316      # First remove it from the list of overridden variables, so we can test
13317      # for unknown variables in the end.
13318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13319
13320      # Check if the provided tool contains a complete path.
13321      tool_specified="$CPIO"
13322      tool_basename="${tool_specified##*/}"
13323      if test "x$tool_basename" = "x$tool_specified"; then
13324        # A command without a complete path is provided, search $PATH.
13325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13326$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13327        # Extract the first word of "$tool_basename", so it can be a program name with args.
13328set dummy $tool_basename; ac_word=$2
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13330$as_echo_n "checking for $ac_word... " >&6; }
13331if ${ac_cv_path_CPIO+:} false; then :
13332  $as_echo_n "(cached) " >&6
13333else
13334  case $CPIO in
13335  [\\/]* | ?:[\\/]*)
13336  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13337  ;;
13338  *)
13339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13340for as_dir in $PATH
13341do
13342  IFS=$as_save_IFS
13343  test -z "$as_dir" && as_dir=.
13344    for ac_exec_ext in '' $ac_executable_extensions; do
13345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13346    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13348    break 2
13349  fi
13350done
13351  done
13352IFS=$as_save_IFS
13353
13354  ;;
13355esac
13356fi
13357CPIO=$ac_cv_path_CPIO
13358if test -n "$CPIO"; then
13359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13360$as_echo "$CPIO" >&6; }
13361else
13362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13363$as_echo "no" >&6; }
13364fi
13365
13366
13367        if test "x$CPIO" = x; then
13368          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13369        fi
13370      else
13371        # Otherwise we believe it is a complete path. Use it as it is.
13372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13373$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13375$as_echo_n "checking for CPIO... " >&6; }
13376        if test ! -x "$tool_specified"; then
13377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13378$as_echo "not found" >&6; }
13379          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13380        fi
13381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13382$as_echo "$tool_specified" >&6; }
13383      fi
13384    fi
13385  fi
13386
13387
13388
13389
13390# Now we can determine OpenJDK build and target platforms. This is required to
13391# have early on.
13392# Make sure we can run config.sub.
13393$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13394  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13395
13396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13397$as_echo_n "checking build system type... " >&6; }
13398if ${ac_cv_build+:} false; then :
13399  $as_echo_n "(cached) " >&6
13400else
13401  ac_build_alias=$build_alias
13402test "x$ac_build_alias" = x &&
13403  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13404test "x$ac_build_alias" = x &&
13405  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13406ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13407  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13408
13409fi
13410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13411$as_echo "$ac_cv_build" >&6; }
13412case $ac_cv_build in
13413*-*-*) ;;
13414*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13415esac
13416build=$ac_cv_build
13417ac_save_IFS=$IFS; IFS='-'
13418set x $ac_cv_build
13419shift
13420build_cpu=$1
13421build_vendor=$2
13422shift; shift
13423# Remember, the first character of IFS is used to create $*,
13424# except with old shells:
13425build_os=$*
13426IFS=$ac_save_IFS
13427case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13428
13429
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13431$as_echo_n "checking host system type... " >&6; }
13432if ${ac_cv_host+:} false; then :
13433  $as_echo_n "(cached) " >&6
13434else
13435  if test "x$host_alias" = x; then
13436  ac_cv_host=$ac_cv_build
13437else
13438  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13439    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13440fi
13441
13442fi
13443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13444$as_echo "$ac_cv_host" >&6; }
13445case $ac_cv_host in
13446*-*-*) ;;
13447*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13448esac
13449host=$ac_cv_host
13450ac_save_IFS=$IFS; IFS='-'
13451set x $ac_cv_host
13452shift
13453host_cpu=$1
13454host_vendor=$2
13455shift; shift
13456# Remember, the first character of IFS is used to create $*,
13457# except with old shells:
13458host_os=$*
13459IFS=$ac_save_IFS
13460case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13461
13462
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13464$as_echo_n "checking target system type... " >&6; }
13465if ${ac_cv_target+:} false; then :
13466  $as_echo_n "(cached) " >&6
13467else
13468  if test "x$target_alias" = x; then
13469  ac_cv_target=$ac_cv_host
13470else
13471  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13472    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13473fi
13474
13475fi
13476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13477$as_echo "$ac_cv_target" >&6; }
13478case $ac_cv_target in
13479*-*-*) ;;
13480*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13481esac
13482target=$ac_cv_target
13483ac_save_IFS=$IFS; IFS='-'
13484set x $ac_cv_target
13485shift
13486target_cpu=$1
13487target_vendor=$2
13488shift; shift
13489# Remember, the first character of IFS is used to create $*,
13490# except with old shells:
13491target_os=$*
13492IFS=$ac_save_IFS
13493case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13494
13495
13496# The aliases save the names the user supplied, while $host etc.
13497# will get canonicalized.
13498test -n "$target_alias" &&
13499  test "$program_prefix$program_suffix$program_transform_name" = \
13500    NONENONEs,x,x, &&
13501  program_prefix=${target_alias}-
13502
13503  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13504  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13505  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13506  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13507  # to use the configure naming style.
13508
13509
13510
13511
13512
13513  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13514  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13515  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13516  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13517  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13518  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13519
13520
13521
13522  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13523
13524  case "$build_os" in
13525    *linux*)
13526      VAR_OS=linux
13527      VAR_OS_API=posix
13528      VAR_OS_ENV=linux
13529      ;;
13530    *solaris*)
13531      VAR_OS=solaris
13532      VAR_OS_API=posix
13533      VAR_OS_ENV=solaris
13534      ;;
13535    *darwin*)
13536      VAR_OS=macosx
13537      VAR_OS_API=posix
13538      VAR_OS_ENV=macosx
13539      ;;
13540    *bsd*)
13541      VAR_OS=bsd
13542      VAR_OS_API=posix
13543      VAR_OS_ENV=bsd
13544      ;;
13545    *cygwin*)
13546      VAR_OS=windows
13547      VAR_OS_API=winapi
13548      VAR_OS_ENV=windows.cygwin
13549      ;;
13550    *mingw*)
13551      VAR_OS=windows
13552      VAR_OS_API=winapi
13553      VAR_OS_ENV=windows.msys
13554      ;;
13555    *aix*)
13556      VAR_OS=aix
13557      VAR_OS_API=posix
13558      VAR_OS_ENV=aix
13559      ;;
13560    *)
13561      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13562      ;;
13563  esac
13564
13565
13566  # First argument is the cpu name from the trip/quad
13567  case "$build_cpu" in
13568    x86_64)
13569      VAR_CPU=x86_64
13570      VAR_CPU_ARCH=x86
13571      VAR_CPU_BITS=64
13572      VAR_CPU_ENDIAN=little
13573      ;;
13574    i?86)
13575      VAR_CPU=x86
13576      VAR_CPU_ARCH=x86
13577      VAR_CPU_BITS=32
13578      VAR_CPU_ENDIAN=little
13579      ;;
13580    arm*)
13581      VAR_CPU=arm
13582      VAR_CPU_ARCH=arm
13583      VAR_CPU_BITS=32
13584      VAR_CPU_ENDIAN=little
13585      ;;
13586    powerpc)
13587      VAR_CPU=ppc
13588      VAR_CPU_ARCH=ppc
13589      VAR_CPU_BITS=32
13590      VAR_CPU_ENDIAN=big
13591      ;;
13592    powerpc64)
13593      VAR_CPU=ppc64
13594      VAR_CPU_ARCH=ppc
13595      VAR_CPU_BITS=64
13596      VAR_CPU_ENDIAN=big
13597      ;;
13598    powerpc64le)
13599      VAR_CPU=ppc64
13600      VAR_CPU_ARCH=ppc
13601      VAR_CPU_BITS=64
13602      VAR_CPU_ENDIAN=little
13603      ;;
13604    s390)
13605      VAR_CPU=s390
13606      VAR_CPU_ARCH=s390
13607      VAR_CPU_BITS=32
13608      VAR_CPU_ENDIAN=big
13609      ;;
13610    s390x)
13611      VAR_CPU=s390x
13612      VAR_CPU_ARCH=s390
13613      VAR_CPU_BITS=64
13614      VAR_CPU_ENDIAN=big
13615      ;;
13616    sparc)
13617      VAR_CPU=sparc
13618      VAR_CPU_ARCH=sparc
13619      VAR_CPU_BITS=32
13620      VAR_CPU_ENDIAN=big
13621      ;;
13622    sparcv9|sparc64)
13623      VAR_CPU=sparcv9
13624      VAR_CPU_ARCH=sparc
13625      VAR_CPU_BITS=64
13626      VAR_CPU_ENDIAN=big
13627      ;;
13628    *)
13629      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13630      ;;
13631  esac
13632
13633  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13634  OPENJDK_BUILD_OS="$VAR_OS"
13635  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13636  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13637  OPENJDK_BUILD_CPU="$VAR_CPU"
13638  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13639  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13640  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13641
13642
13643
13644
13645
13646
13647
13648
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13650$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13652$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13653
13654  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13655
13656  case "$host_os" in
13657    *linux*)
13658      VAR_OS=linux
13659      VAR_OS_API=posix
13660      VAR_OS_ENV=linux
13661      ;;
13662    *solaris*)
13663      VAR_OS=solaris
13664      VAR_OS_API=posix
13665      VAR_OS_ENV=solaris
13666      ;;
13667    *darwin*)
13668      VAR_OS=macosx
13669      VAR_OS_API=posix
13670      VAR_OS_ENV=macosx
13671      ;;
13672    *bsd*)
13673      VAR_OS=bsd
13674      VAR_OS_API=posix
13675      VAR_OS_ENV=bsd
13676      ;;
13677    *cygwin*)
13678      VAR_OS=windows
13679      VAR_OS_API=winapi
13680      VAR_OS_ENV=windows.cygwin
13681      ;;
13682    *mingw*)
13683      VAR_OS=windows
13684      VAR_OS_API=winapi
13685      VAR_OS_ENV=windows.msys
13686      ;;
13687    *aix*)
13688      VAR_OS=aix
13689      VAR_OS_API=posix
13690      VAR_OS_ENV=aix
13691      ;;
13692    *)
13693      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13694      ;;
13695  esac
13696
13697
13698  # First argument is the cpu name from the trip/quad
13699  case "$host_cpu" in
13700    x86_64)
13701      VAR_CPU=x86_64
13702      VAR_CPU_ARCH=x86
13703      VAR_CPU_BITS=64
13704      VAR_CPU_ENDIAN=little
13705      ;;
13706    i?86)
13707      VAR_CPU=x86
13708      VAR_CPU_ARCH=x86
13709      VAR_CPU_BITS=32
13710      VAR_CPU_ENDIAN=little
13711      ;;
13712    arm*)
13713      VAR_CPU=arm
13714      VAR_CPU_ARCH=arm
13715      VAR_CPU_BITS=32
13716      VAR_CPU_ENDIAN=little
13717      ;;
13718    powerpc)
13719      VAR_CPU=ppc
13720      VAR_CPU_ARCH=ppc
13721      VAR_CPU_BITS=32
13722      VAR_CPU_ENDIAN=big
13723      ;;
13724    powerpc64)
13725      VAR_CPU=ppc64
13726      VAR_CPU_ARCH=ppc
13727      VAR_CPU_BITS=64
13728      VAR_CPU_ENDIAN=big
13729      ;;
13730    powerpc64le)
13731      VAR_CPU=ppc64
13732      VAR_CPU_ARCH=ppc
13733      VAR_CPU_BITS=64
13734      VAR_CPU_ENDIAN=little
13735      ;;
13736    s390)
13737      VAR_CPU=s390
13738      VAR_CPU_ARCH=s390
13739      VAR_CPU_BITS=32
13740      VAR_CPU_ENDIAN=big
13741      ;;
13742    s390x)
13743      VAR_CPU=s390x
13744      VAR_CPU_ARCH=s390
13745      VAR_CPU_BITS=64
13746      VAR_CPU_ENDIAN=big
13747      ;;
13748    sparc)
13749      VAR_CPU=sparc
13750      VAR_CPU_ARCH=sparc
13751      VAR_CPU_BITS=32
13752      VAR_CPU_ENDIAN=big
13753      ;;
13754    sparcv9|sparc64)
13755      VAR_CPU=sparcv9
13756      VAR_CPU_ARCH=sparc
13757      VAR_CPU_BITS=64
13758      VAR_CPU_ENDIAN=big
13759      ;;
13760    *)
13761      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13762      ;;
13763  esac
13764
13765  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13766  OPENJDK_TARGET_OS="$VAR_OS"
13767  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13768  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13769  OPENJDK_TARGET_CPU="$VAR_CPU"
13770  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13771  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13772  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13773
13774
13775
13776
13777
13778
13779
13780
13781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13782$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13784$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13785
13786
13787
13788# Check whether --with-target-bits was given.
13789if test "${with_target_bits+set}" = set; then :
13790  withval=$with_target_bits;
13791fi
13792
13793
13794  # We have three types of compiles:
13795  # native  == normal compilation, target system == build system
13796  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13797  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13798  #
13799  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13800    # We're doing a proper cross-compilation
13801    COMPILE_TYPE="cross"
13802  else
13803    COMPILE_TYPE="native"
13804  fi
13805
13806  if test "x$with_target_bits" != x; then
13807    if test "x$COMPILE_TYPE" = "xcross"; then
13808      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13809    fi
13810
13811    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13812      # A reduced build is requested
13813      COMPILE_TYPE="reduced"
13814      OPENJDK_TARGET_CPU_BITS=32
13815      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13816        OPENJDK_TARGET_CPU=x86
13817      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13818        OPENJDK_TARGET_CPU=sparc
13819      else
13820        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13821      fi
13822    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13823      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
13824    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13825      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13826$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13827    else
13828      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13829    fi
13830  fi
13831
13832
13833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13834$as_echo_n "checking compilation type... " >&6; }
13835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13836$as_echo "$COMPILE_TYPE" >&6; }
13837
13838
13839  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13840    REQUIRED_OS_NAME=SunOS
13841    REQUIRED_OS_VERSION=5.10
13842  fi
13843  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13844    REQUIRED_OS_NAME=Linux
13845    REQUIRED_OS_VERSION=2.6
13846  fi
13847  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13848    REQUIRED_OS_NAME=Windows
13849    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13850      REQUIRED_OS_VERSION=5.2
13851    else
13852      REQUIRED_OS_VERSION=5.1
13853    fi
13854  fi
13855  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13856    REQUIRED_OS_NAME=Darwin
13857    REQUIRED_OS_VERSION=11.2
13858  fi
13859
13860
13861
13862
13863
13864  # Also store the legacy naming of the cpu.
13865  # Ie i586 and amd64 instead of x86 and x86_64
13866  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13867  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13868    OPENJDK_TARGET_CPU_LEGACY="i586"
13869  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13870    # On all platforms except MacOSX replace x86_64 with amd64.
13871    OPENJDK_TARGET_CPU_LEGACY="amd64"
13872  fi
13873
13874
13875  # And the second legacy naming of the cpu.
13876  # Ie i386 and amd64 instead of x86 and x86_64.
13877  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13878  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13879    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13880  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13881    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13882  fi
13883
13884
13885  # This is the name of the cpu (but using i386 and amd64 instead of
13886  # x86 and x86_64, respectively), preceeded by a /, to be used when
13887  # locating libraries. On macosx, it's empty, though.
13888  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13889  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13890    OPENJDK_TARGET_CPU_LIBDIR=""
13891  fi
13892
13893
13894  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13895  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13896  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13897  OPENJDK_TARGET_CPU_ISADIR=""
13898  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13899    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13900      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13901    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13902      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13903    fi
13904  fi
13905
13906
13907  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13908  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13909  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13910    # On linux only, we replace x86 with i386.
13911    OPENJDK_TARGET_CPU_OSARCH="i386"
13912  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13913    # On all platforms except macosx, we replace x86_64 with amd64.
13914    OPENJDK_TARGET_CPU_OSARCH="amd64"
13915  fi
13916
13917
13918  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13919  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13920    OPENJDK_TARGET_CPU_JLI="i386"
13921  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13922    # On all platforms except macosx, we replace x86_64 with amd64.
13923    OPENJDK_TARGET_CPU_JLI="amd64"
13924  fi
13925  # Now setup the -D flags for building libjli.
13926  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13927  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13928    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13929      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13930    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13931      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13932    fi
13933  fi
13934
13935
13936  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13937  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13938    OPENJDK_TARGET_OS_API_DIR="unix"
13939  fi
13940  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13941    OPENJDK_TARGET_OS_API_DIR="windows"
13942  fi
13943
13944
13945  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13946      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13947  else
13948      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13949  fi
13950
13951
13952  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13953    A_LP64="LP64:="
13954    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13955    # unpack200.exe
13956    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13957      ADD_LP64="-D_LP64=1"
13958    fi
13959  fi
13960  LP64=$A_LP64
13961
13962
13963  if test "x$COMPILE_TYPE" = "xcross"; then
13964    # FIXME: ... or should this include reduced builds..?
13965    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13966  else
13967    DEFINE_CROSS_COMPILE_ARCH=""
13968  fi
13969
13970
13971  # ZERO_ARCHDEF is used to enable architecture-specific code
13972  case "${OPENJDK_TARGET_CPU}" in
13973    ppc*)    ZERO_ARCHDEF=PPC   ;;
13974    s390*)   ZERO_ARCHDEF=S390  ;;
13975    sparc*)  ZERO_ARCHDEF=SPARC ;;
13976    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13977    x86)     ZERO_ARCHDEF=IA32  ;;
13978    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13979  esac
13980
13981
13982
13983
13984# Continue setting up basic stuff. Most remaining code require fundamental tools.
13985
13986  # Save the current directory this script was started from
13987  CURDIR="$PWD"
13988
13989  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13990    PATH_SEP=";"
13991
13992  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13993  if test $SRC_ROOT_LENGTH -gt 100; then
13994    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13995  fi
13996
13997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13999$as_echo_n "checking cygwin release... " >&6; }
14000    CYGWIN_VERSION=`$UNAME -r`
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14002$as_echo "$CYGWIN_VERSION" >&6; }
14003    WINDOWS_ENV_VENDOR='cygwin'
14004    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14005
14006    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14007    if test "x$CYGWIN_VERSION_OK" = x; then
14008      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
14009$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
14010      as_fn_error $? "Cannot continue" "$LINENO" 5
14011    fi
14012    if test "x$CYGPATH" = x; then
14013      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14014    fi
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14016$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14017    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14018    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14019    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14020    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14022$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14023    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14024    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14025    if test "x$test_cygdrive_prefix" = x; then
14026      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14027    fi
14028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14030$as_echo_n "checking msys release... " >&6; }
14031    MSYS_VERSION=`$UNAME -r`
14032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14033$as_echo "$MSYS_VERSION" >&6; }
14034
14035    WINDOWS_ENV_VENDOR='msys'
14036    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14037
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14039$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14040    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14041    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14042
14043  windows_path="$MSYS_ROOT_PATH"
14044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14045    unix_path=`$CYGPATH -u "$windows_path"`
14046    MSYS_ROOT_PATH="$unix_path"
14047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14049    MSYS_ROOT_PATH="$unix_path"
14050  fi
14051
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14053$as_echo "$MSYS_ROOT_PATH" >&6; }
14054    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14055  else
14056    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14057  fi
14058
14059  # Test if windows or unix (cygwin/msys) find is first in path.
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14061$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14062  FIND_BINARY_OUTPUT=`find --version 2>&1`
14063  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14065$as_echo "unix style" >&6; }
14066  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14068$as_echo "Windows" >&6; }
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14070$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14071    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
14072$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14073    as_fn_error $? "Cannot continue" "$LINENO" 5
14074  else
14075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14076$as_echo "unknown" >&6; }
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14078$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14079  fi
14080
14081  else
14082    PATH_SEP=":"
14083  fi
14084
14085
14086  # We get the top-level directory from the supporting wrappers.
14087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14088$as_echo_n "checking for top-level directory... " >&6; }
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14090$as_echo "$TOPDIR" >&6; }
14091
14092
14093  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14094
14095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14096
14097  # Input might be given as Windows format, start by converting to
14098  # unix format.
14099  path="$CURDIR"
14100  new_path=`$CYGPATH -u "$path"`
14101
14102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14105  # "foo.exe" is OK but "foo" is an error.
14106  #
14107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14108  # It is also a way to make sure we got the proper file name for the real test later on.
14109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14110  if test "x$test_shortpath" = x; then
14111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14112$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14113    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14114  fi
14115
14116  # Call helper function which possibly converts this using DOS-style short mode.
14117  # If so, the updated path is stored in $new_path.
14118
14119  input_path="$new_path"
14120  # Check if we need to convert this using DOS-style short mode. If the path
14121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14122  # take no chances and rewrite it.
14123  # Note: m4 eats our [], so we need to use [ and ] instead.
14124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14125  if test "x$has_forbidden_chars" != x; then
14126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14130      # Going to short mode and back again did indeed matter. Since short mode is
14131      # case insensitive, let's make it lowercase to improve readability.
14132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14133      # Now convert it back to Unix-stile (cygpath)
14134      input_path=`$CYGPATH -u "$shortmode_path"`
14135      new_path="$input_path"
14136    fi
14137  fi
14138
14139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14140  if test "x$test_cygdrive_prefix" = x; then
14141    # As a simple fix, exclude /usr/bin since it's not a real path.
14142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14144      # a path prefixed by /cygdrive for fixpath to work.
14145      new_path="$CYGWIN_ROOT_PATH$input_path"
14146    fi
14147  fi
14148
14149
14150  if test "x$path" != "x$new_path"; then
14151    CURDIR="$new_path"
14152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14153$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14154  fi
14155
14156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14157
14158  path="$CURDIR"
14159  has_colon=`$ECHO $path | $GREP ^.:`
14160  new_path="$path"
14161  if test "x$has_colon" = x; then
14162    # Not in mixed or Windows style, start by that.
14163    new_path=`cmd //c echo $path`
14164  fi
14165
14166
14167  input_path="$new_path"
14168  # Check if we need to convert this using DOS-style short mode. If the path
14169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14170  # take no chances and rewrite it.
14171  # Note: m4 eats our [], so we need to use [ and ] instead.
14172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14173  if test "x$has_forbidden_chars" != x; then
14174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14176  fi
14177
14178
14179  windows_path="$new_path"
14180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14181    unix_path=`$CYGPATH -u "$windows_path"`
14182    new_path="$unix_path"
14183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14185    new_path="$unix_path"
14186  fi
14187
14188  if test "x$path" != "x$new_path"; then
14189    CURDIR="$new_path"
14190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14191$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14192  fi
14193
14194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14196
14197  else
14198    # We're on a posix platform. Hooray! :)
14199    path="$CURDIR"
14200    has_space=`$ECHO "$path" | $GREP " "`
14201    if test "x$has_space" != x; then
14202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14203$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14204      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14205    fi
14206
14207    # Use eval to expand a potential ~
14208    eval path="$path"
14209    if test ! -f "$path" && test ! -d "$path"; then
14210      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14211    fi
14212
14213    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14214  fi
14215
14216
14217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14218
14219  # Input might be given as Windows format, start by converting to
14220  # unix format.
14221  path="$TOPDIR"
14222  new_path=`$CYGPATH -u "$path"`
14223
14224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14227  # "foo.exe" is OK but "foo" is an error.
14228  #
14229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14230  # It is also a way to make sure we got the proper file name for the real test later on.
14231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14232  if test "x$test_shortpath" = x; then
14233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14234$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14235    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14236  fi
14237
14238  # Call helper function which possibly converts this using DOS-style short mode.
14239  # If so, the updated path is stored in $new_path.
14240
14241  input_path="$new_path"
14242  # Check if we need to convert this using DOS-style short mode. If the path
14243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14244  # take no chances and rewrite it.
14245  # Note: m4 eats our [], so we need to use [ and ] instead.
14246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14247  if test "x$has_forbidden_chars" != x; then
14248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14252      # Going to short mode and back again did indeed matter. Since short mode is
14253      # case insensitive, let's make it lowercase to improve readability.
14254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14255      # Now convert it back to Unix-stile (cygpath)
14256      input_path=`$CYGPATH -u "$shortmode_path"`
14257      new_path="$input_path"
14258    fi
14259  fi
14260
14261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14262  if test "x$test_cygdrive_prefix" = x; then
14263    # As a simple fix, exclude /usr/bin since it's not a real path.
14264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14266      # a path prefixed by /cygdrive for fixpath to work.
14267      new_path="$CYGWIN_ROOT_PATH$input_path"
14268    fi
14269  fi
14270
14271
14272  if test "x$path" != "x$new_path"; then
14273    TOPDIR="$new_path"
14274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14275$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14276  fi
14277
14278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14279
14280  path="$TOPDIR"
14281  has_colon=`$ECHO $path | $GREP ^.:`
14282  new_path="$path"
14283  if test "x$has_colon" = x; then
14284    # Not in mixed or Windows style, start by that.
14285    new_path=`cmd //c echo $path`
14286  fi
14287
14288
14289  input_path="$new_path"
14290  # Check if we need to convert this using DOS-style short mode. If the path
14291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14292  # take no chances and rewrite it.
14293  # Note: m4 eats our [], so we need to use [ and ] instead.
14294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14295  if test "x$has_forbidden_chars" != x; then
14296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14298  fi
14299
14300
14301  windows_path="$new_path"
14302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14303    unix_path=`$CYGPATH -u "$windows_path"`
14304    new_path="$unix_path"
14305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14307    new_path="$unix_path"
14308  fi
14309
14310  if test "x$path" != "x$new_path"; then
14311    TOPDIR="$new_path"
14312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14313$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14314  fi
14315
14316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14318
14319  else
14320    # We're on a posix platform. Hooray! :)
14321    path="$TOPDIR"
14322    has_space=`$ECHO "$path" | $GREP " "`
14323    if test "x$has_space" != x; then
14324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14325$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14326      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14327    fi
14328
14329    # Use eval to expand a potential ~
14330    eval path="$path"
14331    if test ! -f "$path" && test ! -d "$path"; then
14332      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14333    fi
14334
14335    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14336  fi
14337
14338  # SRC_ROOT is a traditional alias for TOPDIR.
14339  SRC_ROOT=$TOPDIR
14340
14341  # Locate the directory of this script.
14342  AUTOCONF_DIR=$TOPDIR/common/autoconf
14343
14344
14345  # Setup default logging of stdout and stderr to build.log in the output root.
14346  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14347  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14348  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14349
14350
14351
14352
14353
14354# Check if it's a pure open build or if custom sources are to be used.
14355
14356  # Check whether --enable-openjdk-only was given.
14357if test "${enable_openjdk_only+set}" = set; then :
14358  enableval=$enable_openjdk_only;
14359else
14360  enable_openjdk_only="no"
14361fi
14362
14363
14364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14365$as_echo_n "checking for presence of closed sources... " >&6; }
14366  if test -d "$SRC_ROOT/jdk/src/closed"; then
14367    CLOSED_SOURCE_PRESENT=yes
14368  else
14369    CLOSED_SOURCE_PRESENT=no
14370  fi
14371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14372$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14373
14374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14375$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14376  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14378$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14379
14380  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14381    OPENJDK=true
14382    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14383      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14384$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14385    fi
14386  else
14387    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14388      OPENJDK=true
14389    else
14390      OPENJDK=false
14391    fi
14392  fi
14393
14394  if test "x$OPENJDK" = "xtrue"; then
14395    SET_OPENJDK="OPENJDK=true"
14396  fi
14397
14398
14399
14400  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14401  # the IncludeCustomExtension macro.
14402
14403
14404# Check whether --with-custom-make-dir was given.
14405if test "${with_custom_make_dir+set}" = set; then :
14406  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14407$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14408fi
14409
14410
14411
14412
14413# These are needed to be able to create a configuration name (and thus the output directory)
14414
14415  ###############################################################################
14416  #
14417  # Check which variant of the JDK that we want to build.
14418  # Currently we have:
14419  #    normal:   standard edition
14420  # but the custom make system may add other variants
14421  #
14422  # Effectively the JDK variant gives a name to a specific set of
14423  # modules to compile into the JDK. In the future, these modules
14424  # might even be Jigsaw modules.
14425  #
14426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14427$as_echo_n "checking which variant of the JDK to build... " >&6; }
14428
14429# Check whether --with-jdk-variant was given.
14430if test "${with_jdk_variant+set}" = set; then :
14431  withval=$with_jdk_variant;
14432fi
14433
14434
14435  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14436    JDK_VARIANT="normal"
14437  else
14438    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14439  fi
14440
14441
14442
14443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14444$as_echo "$JDK_VARIANT" >&6; }
14445
14446
14447###############################################################################
14448#
14449# Check which interpreter of the JVM we want to build.
14450# Currently we have:
14451#    template: Template interpreter (the default)
14452#    cpp     : C++ interpreter
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14454$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14455
14456# Check whether --with-jvm-interpreter was given.
14457if test "${with_jvm_interpreter+set}" = set; then :
14458  withval=$with_jvm_interpreter;
14459fi
14460
14461
14462if test "x$with_jvm_interpreter" = x; then
14463     with_jvm_interpreter="template"
14464fi
14465
14466JVM_INTERPRETER="$with_jvm_interpreter"
14467
14468if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14469   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14470fi
14471
14472
14473
14474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14475$as_echo "$with_jvm_interpreter" >&6; }
14476
14477
14478
14479  ###############################################################################
14480  #
14481  # Check which variants of the JVM that we want to build.
14482  # Currently we have:
14483  #    server: normal interpreter and a tiered C1/C2 compiler
14484  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14485  #    minimal1: reduced form of client with optional VM services and features stripped out
14486  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14487  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14488  #    zero: no machine code interpreter, no compiler
14489  #    zeroshark: zero interpreter and shark/llvm compiler backend
14490#    core: interpreter only, no compiler (only works on some platforms)
14491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14492$as_echo_n "checking which variants of the JVM to build... " >&6; }
14493
14494# Check whether --with-jvm-variants was given.
14495if test "${with_jvm_variants+set}" = set; then :
14496  withval=$with_jvm_variants;
14497fi
14498
14499
14500  if test "x$with_jvm_variants" = x; then
14501    with_jvm_variants="server"
14502  fi
14503
14504  JVM_VARIANTS=",$with_jvm_variants,"
14505  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14506
14507  if test "x$TEST_VARIANTS" != "x,"; then
14508     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14509  fi
14510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14511$as_echo "$with_jvm_variants" >&6; }
14512
14513  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14514  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14515  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14516  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14517  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14518  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14519  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14520
14521  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14522    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14523      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14524    fi
14525  fi
14526  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14527    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14528      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14529    fi
14530  fi
14531  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14532    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14533      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14534    fi
14535  fi
14536
14537  # Replace the commas with AND for use in the build directory name.
14538  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14539  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14540  if test "x$COUNT_VARIANTS" != "x,1"; then
14541    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14542  else
14543    BUILDING_MULTIPLE_JVM_VARIANTS=no
14544  fi
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555  INCLUDE_SA=true
14556  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14557    INCLUDE_SA=false
14558  fi
14559  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14560    INCLUDE_SA=false
14561  fi
14562  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14563    INCLUDE_SA=false
14564  fi
14565
14566
14567  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14568    MACOSX_UNIVERSAL="true"
14569  fi
14570
14571
14572
14573
14574  ###############################################################################
14575  #
14576  # Set the debug level
14577  #    release: no debug information, all optimizations, no asserts.
14578  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14579  #    fastdebug: debug information (-g), all optimizations, all asserts
14580  #    slowdebug: debug information (-g), no optimizations, all asserts
14581  #
14582  DEBUG_LEVEL="release"
14583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14584$as_echo_n "checking which debug level to use... " >&6; }
14585  # Check whether --enable-debug was given.
14586if test "${enable_debug+set}" = set; then :
14587  enableval=$enable_debug;
14588        ENABLE_DEBUG="${enableval}"
14589        DEBUG_LEVEL="fastdebug"
14590
14591else
14592  ENABLE_DEBUG="no"
14593fi
14594
14595
14596
14597# Check whether --with-debug-level was given.
14598if test "${with_debug_level+set}" = set; then :
14599  withval=$with_debug_level;
14600        DEBUG_LEVEL="${withval}"
14601        if test "x$ENABLE_DEBUG" = xyes; then
14602          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14603        fi
14604
14605fi
14606
14607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14608$as_echo "$DEBUG_LEVEL" >&6; }
14609
14610  if test "x$DEBUG_LEVEL" != xrelease && \
14611      test "x$DEBUG_LEVEL" != xoptimized && \
14612      test "x$DEBUG_LEVEL" != xfastdebug && \
14613      test "x$DEBUG_LEVEL" != xslowdebug; then
14614    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14615  fi
14616
14617
14618  ###############################################################################
14619  #
14620  # Setup legacy vars/targets and new vars to deal with different debug levels.
14621  #
14622
14623  case $DEBUG_LEVEL in
14624    release )
14625      VARIANT="OPT"
14626      FASTDEBUG="false"
14627      DEBUG_CLASSFILES="false"
14628      BUILD_VARIANT_RELEASE=""
14629      HOTSPOT_DEBUG_LEVEL="product"
14630      HOTSPOT_EXPORT="product"
14631      ;;
14632    fastdebug )
14633      VARIANT="DBG"
14634      FASTDEBUG="true"
14635      DEBUG_CLASSFILES="true"
14636      BUILD_VARIANT_RELEASE="-fastdebug"
14637      HOTSPOT_DEBUG_LEVEL="fastdebug"
14638      HOTSPOT_EXPORT="fastdebug"
14639      ;;
14640    slowdebug )
14641      VARIANT="DBG"
14642      FASTDEBUG="false"
14643      DEBUG_CLASSFILES="true"
14644      BUILD_VARIANT_RELEASE="-debug"
14645      HOTSPOT_DEBUG_LEVEL="jvmg"
14646      HOTSPOT_EXPORT="debug"
14647      ;;
14648    optimized )
14649      VARIANT="OPT"
14650      FASTDEBUG="false"
14651      DEBUG_CLASSFILES="false"
14652      BUILD_VARIANT_RELEASE="-optimized"
14653      HOTSPOT_DEBUG_LEVEL="optimized"
14654      HOTSPOT_EXPORT="optimized"
14655      ;;
14656  esac
14657
14658  # The debug level 'optimized' is a little special because it is currently only
14659  # applicable to the HotSpot build where it means to build a completely
14660  # optimized version of the VM without any debugging code (like for the
14661  # 'release' debug level which is called 'product' in the HotSpot build) but
14662  # with the exception that it can contain additional code which is otherwise
14663  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14664  # test new and/or experimental features which are not intended for customer
14665  # shipment. Because these new features need to be tested and benchmarked in
14666  # real world scenarios, we want to build the containing JDK at the 'release'
14667  # debug level.
14668  if test "x$DEBUG_LEVEL" = xoptimized; then
14669    DEBUG_LEVEL="release"
14670  fi
14671
14672  #####
14673  # Generate the legacy makefile targets for hotspot.
14674  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14675  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14676  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14677  # But until then ...
14678  HOTSPOT_TARGET=""
14679
14680  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14681    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14682  fi
14683
14684  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14685    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14686  fi
14687
14688  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14689    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14690  fi
14691
14692  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14693    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14694  fi
14695
14696  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14698  fi
14699
14700  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14701    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14702  fi
14703
14704  if test "x$JVM_VARIANT_CORE" = xtrue; then
14705    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14706  fi
14707
14708  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14709
14710  # On Macosx universal binaries are produced, but they only contain
14711  # 64 bit intel. This invalidates control of which jvms are built
14712  # from configure, but only server is valid anyway. Fix this
14713  # when hotspot makefiles are rewritten.
14714  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14715    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14716  fi
14717
14718  #####
14719
14720
14721
14722
14723
14724
14725
14726
14727# With basic setup done, call the custom early hook.
14728
14729
14730# Check if we have devkits, extra paths or sysroot set.
14731
14732
14733# Check whether --with-devkit was given.
14734if test "${with_devkit+set}" = set; then :
14735  withval=$with_devkit;
14736
14737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14738
14739  # Input might be given as Windows format, start by converting to
14740  # unix format.
14741  path="$with_devkit"
14742  new_path=`$CYGPATH -u "$path"`
14743
14744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14747  # "foo.exe" is OK but "foo" is an error.
14748  #
14749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14750  # It is also a way to make sure we got the proper file name for the real test later on.
14751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14752  if test "x$test_shortpath" = x; then
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14754$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14755    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14756  fi
14757
14758  # Call helper function which possibly converts this using DOS-style short mode.
14759  # If so, the updated path is stored in $new_path.
14760
14761  input_path="$new_path"
14762  # Check if we need to convert this using DOS-style short mode. If the path
14763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14764  # take no chances and rewrite it.
14765  # Note: m4 eats our [], so we need to use [ and ] instead.
14766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14767  if test "x$has_forbidden_chars" != x; then
14768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14772      # Going to short mode and back again did indeed matter. Since short mode is
14773      # case insensitive, let's make it lowercase to improve readability.
14774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14775      # Now convert it back to Unix-stile (cygpath)
14776      input_path=`$CYGPATH -u "$shortmode_path"`
14777      new_path="$input_path"
14778    fi
14779  fi
14780
14781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14782  if test "x$test_cygdrive_prefix" = x; then
14783    # As a simple fix, exclude /usr/bin since it's not a real path.
14784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14786      # a path prefixed by /cygdrive for fixpath to work.
14787      new_path="$CYGWIN_ROOT_PATH$input_path"
14788    fi
14789  fi
14790
14791
14792  if test "x$path" != "x$new_path"; then
14793    with_devkit="$new_path"
14794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14795$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14796  fi
14797
14798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14799
14800  path="$with_devkit"
14801  has_colon=`$ECHO $path | $GREP ^.:`
14802  new_path="$path"
14803  if test "x$has_colon" = x; then
14804    # Not in mixed or Windows style, start by that.
14805    new_path=`cmd //c echo $path`
14806  fi
14807
14808
14809  input_path="$new_path"
14810  # Check if we need to convert this using DOS-style short mode. If the path
14811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14812  # take no chances and rewrite it.
14813  # Note: m4 eats our [], so we need to use [ and ] instead.
14814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14815  if test "x$has_forbidden_chars" != x; then
14816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14818  fi
14819
14820
14821  windows_path="$new_path"
14822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14823    unix_path=`$CYGPATH -u "$windows_path"`
14824    new_path="$unix_path"
14825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14827    new_path="$unix_path"
14828  fi
14829
14830  if test "x$path" != "x$new_path"; then
14831    with_devkit="$new_path"
14832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14833$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14834  fi
14835
14836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14838
14839  else
14840    # We're on a posix platform. Hooray! :)
14841    path="$with_devkit"
14842    has_space=`$ECHO "$path" | $GREP " "`
14843    if test "x$has_space" != x; then
14844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14845$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14846      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14847    fi
14848
14849    # Use eval to expand a potential ~
14850    eval path="$path"
14851    if test ! -f "$path" && test ! -d "$path"; then
14852      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14853    fi
14854
14855    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14856  fi
14857
14858        DEVKIT_ROOT="$with_devkit"
14859        # Check for a meta data info file in the root of the devkit
14860        if test -f "$DEVKIT_ROOT/devkit.info"; then
14861          # This potentially sets the following:
14862          # DEVKIT_NAME: A descriptive name of the devkit
14863          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14864          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14865          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14866          . $DEVKIT_ROOT/devkit.info
14867        fi
14868
14869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14870$as_echo_n "checking for devkit... " >&6; }
14871        if test "x$DEVKIT_NAME" != x; then
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14873$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14874        else
14875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14876$as_echo "$DEVKIT_ROOT" >&6; }
14877        fi
14878
14879        if test "x$DEVKIT_EXTRA_PATH" != x; then
14880
14881  if test "x$DEVKIT_EXTRA_PATH" != x; then
14882    if test "x$EXTRA_PATH" = x; then
14883      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14884    else
14885      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14886    fi
14887  fi
14888
14889        fi
14890
14891        # Fallback default of just /bin if DEVKIT_PATH is not defined
14892        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14893          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14894        fi
14895
14896  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14897    if test "x$TOOLCHAIN_PATH" = x; then
14898      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14899    else
14900      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14901    fi
14902  fi
14903
14904
14905        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14906        # places for backwards compatiblity.
14907        if test "x$DEVKIT_SYSROOT" != x; then
14908          SYSROOT="$DEVKIT_SYSROOT"
14909        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14910          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14911        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14912          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14913        fi
14914
14915
14916fi
14917
14918
14919  # You can force the sysroot if the sysroot encoded into the compiler tools
14920  # is not correct.
14921
14922# Check whether --with-sys-root was given.
14923if test "${with_sys_root+set}" = set; then :
14924  withval=$with_sys_root; SYSROOT=$with_sys_root
14925
14926fi
14927
14928
14929
14930# Check whether --with-sysroot was given.
14931if test "${with_sysroot+set}" = set; then :
14932  withval=$with_sysroot; SYSROOT=$with_sysroot
14933
14934fi
14935
14936
14937
14938# Check whether --with-tools-dir was given.
14939if test "${with_tools_dir+set}" = set; then :
14940  withval=$with_tools_dir;
14941  if test "x$with_tools_dir" != x; then
14942    if test "x$TOOLCHAIN_PATH" = x; then
14943      TOOLCHAIN_PATH="$with_tools_dir"
14944    else
14945      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14946    fi
14947  fi
14948
14949
14950fi
14951
14952
14953
14954# Check whether --with-toolchain-path was given.
14955if test "${with_toolchain_path+set}" = set; then :
14956  withval=$with_toolchain_path;
14957  if test "x$with_toolchain_path" != x; then
14958    if test "x$TOOLCHAIN_PATH" = x; then
14959      TOOLCHAIN_PATH="$with_toolchain_path"
14960    else
14961      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14962    fi
14963  fi
14964
14965
14966fi
14967
14968
14969
14970# Check whether --with-extra-path was given.
14971if test "${with_extra_path+set}" = set; then :
14972  withval=$with_extra_path;
14973  if test "x$with_extra_path" != x; then
14974    if test "x$EXTRA_PATH" = x; then
14975      EXTRA_PATH="$with_extra_path"
14976    else
14977      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14978    fi
14979  fi
14980
14981
14982fi
14983
14984
14985  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14986    # detect if Xcode is installed by running xcodebuild -version
14987    # if no Xcode installed, xcodebuild exits with 1
14988    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14989    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14990      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14991      # fall back on the stub binary in /usr/bin/xcodebuild
14992      # Extract the first word of "xcodebuild", so it can be a program name with args.
14993set dummy xcodebuild; ac_word=$2
14994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14995$as_echo_n "checking for $ac_word... " >&6; }
14996if ${ac_cv_path_XCODEBUILD+:} false; then :
14997  $as_echo_n "(cached) " >&6
14998else
14999  case $XCODEBUILD in
15000  [\\/]* | ?:[\\/]*)
15001  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15002  ;;
15003  *)
15004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15005for as_dir in $TOOLCHAIN_PATH
15006do
15007  IFS=$as_save_IFS
15008  test -z "$as_dir" && as_dir=.
15009    for ac_exec_ext in '' $ac_executable_extensions; do
15010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15011    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15013    break 2
15014  fi
15015done
15016  done
15017IFS=$as_save_IFS
15018
15019  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15020  ;;
15021esac
15022fi
15023XCODEBUILD=$ac_cv_path_XCODEBUILD
15024if test -n "$XCODEBUILD"; then
15025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15026$as_echo "$XCODEBUILD" >&6; }
15027else
15028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15029$as_echo "no" >&6; }
15030fi
15031
15032
15033    else
15034      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15035      # when only the command line tools are installed there are no SDKs, so headers
15036      # are copied into the system frameworks
15037      XCODEBUILD=
15038
15039    fi
15040
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15042$as_echo_n "checking for sdk name... " >&6; }
15043
15044# Check whether --with-sdk-name was given.
15045if test "${with_sdk_name+set}" = set; then :
15046  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15047
15048fi
15049
15050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15051$as_echo "$SDKNAME" >&6; }
15052
15053    # if toolchain path is specified then don't rely on system headers, they may not compile
15054    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15055    test -z "$TOOLCHAIN_PATH" && \
15056      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15057
15058    if test -z "$SYSROOT"; then
15059      if test -n "$XCODEBUILD"; then
15060        # if we don't have system headers, use default SDK name (last resort)
15061        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15062          SDKNAME=${SDKNAME:-macosx}
15063        fi
15064
15065        if test -n "$SDKNAME"; then
15066          # Call xcodebuild to determine SYSROOT
15067          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15068        fi
15069      else
15070        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15071          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15072        fi
15073      fi
15074    else
15075      # warn user if --with-sdk-name was also set
15076      if test -n "$with_sdk_name"; then
15077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15078$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15079      fi
15080    fi
15081
15082    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15083      # If no system framework headers, then SYSROOT must be set, or we won't build
15084      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15085    fi
15086
15087    # Perform a basic sanity test
15088    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15089      if test -z "$SYSROOT"; then
15090        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15091      else
15092        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15093      fi
15094    fi
15095
15096    # set SDKROOT too, Xcode tools will pick it up
15097    SDKROOT=$SYSROOT
15098
15099  fi
15100
15101  # Prepend the extra path to the global path
15102
15103  if test "x$EXTRA_PATH" != x; then
15104    if test "x$PATH" = x; then
15105      PATH="$EXTRA_PATH"
15106    else
15107      PATH="$EXTRA_PATH:$PATH"
15108    fi
15109  fi
15110
15111
15112  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15113    # Add extra search paths on solaris for utilities like ar and as etc...
15114    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15115  fi
15116
15117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15118$as_echo_n "checking for sysroot... " >&6; }
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15120$as_echo "$SYSROOT" >&6; }
15121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15122$as_echo_n "checking for toolchain path... " >&6; }
15123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15124$as_echo "$TOOLCHAIN_PATH" >&6; }
15125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15126$as_echo_n "checking for extra path... " >&6; }
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15128$as_echo "$EXTRA_PATH" >&6; }
15129
15130
15131# To properly create a configuration name, we need to have the OpenJDK target
15132# and options (variants and debug level) parsed.
15133
15134
15135
15136# Check whether --with-conf-name was given.
15137if test "${with_conf_name+set}" = set; then :
15138  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15139fi
15140
15141
15142  # Test from where we are running configure, in or outside of src root.
15143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15144$as_echo_n "checking where to store configuration... " >&6; }
15145  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15146      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15147      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15148    # We are running configure from the src root.
15149    # Create a default ./build/target-variant-debuglevel output root.
15150    if test "x${CONF_NAME}" = x; then
15151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15152$as_echo "in default location" >&6; }
15153      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15154    else
15155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15156$as_echo "in build directory with custom name" >&6; }
15157    fi
15158    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15159    $MKDIR -p "$OUTPUT_ROOT"
15160    if test ! -d "$OUTPUT_ROOT"; then
15161      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15162    fi
15163  else
15164    # We are running configure from outside of the src dir.
15165    # Then use the current directory as output dir!
15166    # If configuration is situated in normal build directory, just use the build
15167    # directory name as configuration name, otherwise use the complete path.
15168    if test "x${CONF_NAME}" = x; then
15169      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15170    fi
15171    OUTPUT_ROOT="$CURDIR"
15172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15173$as_echo "in current directory" >&6; }
15174
15175    # WARNING: This might be a bad thing to do. You need to be sure you want to
15176    # have a configuration in this directory. Do some sanity checks!
15177
15178    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15179      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15180      # other files
15181      files_present=`$LS $OUTPUT_ROOT`
15182      # Configure has already touched config.log and confdefs.h in the current dir when this check
15183      # is performed.
15184      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15185      | $TR -d '\n'`
15186      if test "x$filtered_files" != x; then
15187        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15188$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15189        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15190$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15191        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15192$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15193        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15194$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15195        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15196$as_echo "$as_me: seriously mess up just about everything." >&6;}
15197        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15198$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15199        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15200$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15201        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15202      fi
15203    fi
15204  fi
15205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15206$as_echo_n "checking what configuration name to use... " >&6; }
15207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15208$as_echo "$CONF_NAME" >&6; }
15209
15210
15211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15212
15213  # Input might be given as Windows format, start by converting to
15214  # unix format.
15215  path="$OUTPUT_ROOT"
15216  new_path=`$CYGPATH -u "$path"`
15217
15218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15221  # "foo.exe" is OK but "foo" is an error.
15222  #
15223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15224  # It is also a way to make sure we got the proper file name for the real test later on.
15225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15226  if test "x$test_shortpath" = x; then
15227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15228$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15229    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15230  fi
15231
15232  # Call helper function which possibly converts this using DOS-style short mode.
15233  # If so, the updated path is stored in $new_path.
15234
15235  input_path="$new_path"
15236  # Check if we need to convert this using DOS-style short mode. If the path
15237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15238  # take no chances and rewrite it.
15239  # Note: m4 eats our [], so we need to use [ and ] instead.
15240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15241  if test "x$has_forbidden_chars" != x; then
15242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15246      # Going to short mode and back again did indeed matter. Since short mode is
15247      # case insensitive, let's make it lowercase to improve readability.
15248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249      # Now convert it back to Unix-stile (cygpath)
15250      input_path=`$CYGPATH -u "$shortmode_path"`
15251      new_path="$input_path"
15252    fi
15253  fi
15254
15255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15256  if test "x$test_cygdrive_prefix" = x; then
15257    # As a simple fix, exclude /usr/bin since it's not a real path.
15258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15260      # a path prefixed by /cygdrive for fixpath to work.
15261      new_path="$CYGWIN_ROOT_PATH$input_path"
15262    fi
15263  fi
15264
15265
15266  if test "x$path" != "x$new_path"; then
15267    OUTPUT_ROOT="$new_path"
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15269$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15270  fi
15271
15272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15273
15274  path="$OUTPUT_ROOT"
15275  has_colon=`$ECHO $path | $GREP ^.:`
15276  new_path="$path"
15277  if test "x$has_colon" = x; then
15278    # Not in mixed or Windows style, start by that.
15279    new_path=`cmd //c echo $path`
15280  fi
15281
15282
15283  input_path="$new_path"
15284  # Check if we need to convert this using DOS-style short mode. If the path
15285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15286  # take no chances and rewrite it.
15287  # Note: m4 eats our [], so we need to use [ and ] instead.
15288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15289  if test "x$has_forbidden_chars" != x; then
15290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15292  fi
15293
15294
15295  windows_path="$new_path"
15296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15297    unix_path=`$CYGPATH -u "$windows_path"`
15298    new_path="$unix_path"
15299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15301    new_path="$unix_path"
15302  fi
15303
15304  if test "x$path" != "x$new_path"; then
15305    OUTPUT_ROOT="$new_path"
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15307$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15308  fi
15309
15310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15312
15313  else
15314    # We're on a posix platform. Hooray! :)
15315    path="$OUTPUT_ROOT"
15316    has_space=`$ECHO "$path" | $GREP " "`
15317    if test "x$has_space" != x; then
15318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15319$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15320      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15321    fi
15322
15323    # Use eval to expand a potential ~
15324    eval path="$path"
15325    if test ! -f "$path" && test ! -d "$path"; then
15326      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15327    fi
15328
15329    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15330  fi
15331
15332
15333  SPEC=$OUTPUT_ROOT/spec.gmk
15334
15335  CONF_NAME=$CONF_NAME
15336
15337  OUTPUT_ROOT=$OUTPUT_ROOT
15338
15339
15340  # Most of the probed defines are put into config.h
15341  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15342
15343  # The spec.gmk file contains all variables for the make system.
15344  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15345
15346  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15348
15349  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15350  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15351
15352  # The compare.sh is used to compare the build output to other builds.
15353  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15354
15355  # Spec.sh is currently used by compare-objects.sh
15356  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15357
15358  # The generated Makefile knows where the spec.gmk is and where the source is.
15359  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15360  # which will look for generated configurations
15361  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15362
15363
15364
15365# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15366
15367  for ac_prog in apt-get yum port pkgutil pkgadd
15368do
15369  # Extract the first word of "$ac_prog", so it can be a program name with args.
15370set dummy $ac_prog; ac_word=$2
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15372$as_echo_n "checking for $ac_word... " >&6; }
15373if ${ac_cv_prog_PKGHANDLER+:} false; then :
15374  $as_echo_n "(cached) " >&6
15375else
15376  if test -n "$PKGHANDLER"; then
15377  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15378else
15379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15380for as_dir in $PATH
15381do
15382  IFS=$as_save_IFS
15383  test -z "$as_dir" && as_dir=.
15384    for ac_exec_ext in '' $ac_executable_extensions; do
15385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15386    ac_cv_prog_PKGHANDLER="$ac_prog"
15387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15388    break 2
15389  fi
15390done
15391  done
15392IFS=$as_save_IFS
15393
15394fi
15395fi
15396PKGHANDLER=$ac_cv_prog_PKGHANDLER
15397if test -n "$PKGHANDLER"; then
15398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15399$as_echo "$PKGHANDLER" >&6; }
15400else
15401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15402$as_echo "no" >&6; }
15403fi
15404
15405
15406  test -n "$PKGHANDLER" && break
15407done
15408
15409
15410
15411# Setup tools that requires more complex handling, or that is not needed by the configure script.
15412
15413
15414  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15415  if test "x$MAKE" != x; then
15416    # User has supplied a make, test it.
15417    if test ! -f "$MAKE"; then
15418      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15419    fi
15420
15421  MAKE_CANDIDATE=""$MAKE""
15422  DESCRIPTION="user supplied MAKE=$MAKE"
15423  if test "x$MAKE_CANDIDATE" != x; then
15424    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15425$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15426    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15427    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15428    if test "x$IS_GNU_MAKE" = x; then
15429      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15430$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15431    else
15432      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15433      if test "x$IS_MODERN_MAKE" = x; then
15434        { $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
15435$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;}
15436      else
15437        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15438          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15439            MAKE_EXPECTED_ENV='cygwin'
15440          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15441            MAKE_EXPECTED_ENV='msys'
15442          else
15443            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15444          fi
15445          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15446          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15447        else
15448          # Not relevant for non-Windows
15449          IS_MAKE_CORRECT_ENV=true
15450        fi
15451        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15452          { $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
15453$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;}
15454        else
15455          FOUND_MAKE=$MAKE_CANDIDATE
15456
15457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15458
15459  # First separate the path from the arguments. This will split at the first
15460  # space.
15461  complete="$FOUND_MAKE"
15462  path="${complete%% *}"
15463  tmp="$complete EOL"
15464  arguments="${tmp#* }"
15465
15466  # Input might be given as Windows format, start by converting to
15467  # unix format.
15468  new_path=`$CYGPATH -u "$path"`
15469
15470  # Now try to locate executable using which
15471  new_path=`$WHICH "$new_path" 2> /dev/null`
15472  # bat and cmd files are not always considered executable in cygwin causing which
15473  # to not find them
15474  if test "x$new_path" = x \
15475      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15476      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15477    new_path=`$CYGPATH -u "$path"`
15478  fi
15479  if test "x$new_path" = x; then
15480    # Oops. Which didn't find the executable.
15481    # The splitting of arguments from the executable at a space might have been incorrect,
15482    # since paths with space are more likely in Windows. Give it another try with the whole
15483    # argument.
15484    path="$complete"
15485    arguments="EOL"
15486    new_path=`$CYGPATH -u "$path"`
15487    new_path=`$WHICH "$new_path" 2> /dev/null`
15488    # bat and cmd files are not always considered executable in cygwin causing which
15489    # to not find them
15490    if test "x$new_path" = x \
15491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15493      new_path=`$CYGPATH -u "$path"`
15494    fi
15495    if test "x$new_path" = x; then
15496      # It's still not found. Now this is an unrecoverable error.
15497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15498$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15499      has_space=`$ECHO "$complete" | $GREP " "`
15500      if test "x$has_space" != x; then
15501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15503      fi
15504      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15505    fi
15506  fi
15507
15508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15511  # "foo.exe" is OK but "foo" is an error.
15512  #
15513  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15514  # It is also a way to make sure we got the proper file name for the real test later on.
15515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15516  if test "x$test_shortpath" = x; then
15517    # Short path failed, file does not exist as specified.
15518    # Try adding .exe or .cmd
15519    if test -f "${new_path}.exe"; then
15520      input_to_shortpath="${new_path}.exe"
15521    elif test -f "${new_path}.cmd"; then
15522      input_to_shortpath="${new_path}.cmd"
15523    else
15524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15525$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15528      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15529    fi
15530  else
15531    input_to_shortpath="$new_path"
15532  fi
15533
15534  # Call helper function which possibly converts this using DOS-style short mode.
15535  # If so, the updated path is stored in $new_path.
15536  new_path="$input_to_shortpath"
15537
15538  input_path="$input_to_shortpath"
15539  # Check if we need to convert this using DOS-style short mode. If the path
15540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15541  # take no chances and rewrite it.
15542  # Note: m4 eats our [], so we need to use [ and ] instead.
15543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15544  if test "x$has_forbidden_chars" != x; then
15545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15549      # Going to short mode and back again did indeed matter. Since short mode is
15550      # case insensitive, let's make it lowercase to improve readability.
15551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15552      # Now convert it back to Unix-stile (cygpath)
15553      input_path=`$CYGPATH -u "$shortmode_path"`
15554      new_path="$input_path"
15555    fi
15556  fi
15557
15558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15559  if test "x$test_cygdrive_prefix" = x; then
15560    # As a simple fix, exclude /usr/bin since it's not a real path.
15561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15563      # a path prefixed by /cygdrive for fixpath to work.
15564      new_path="$CYGWIN_ROOT_PATH$input_path"
15565    fi
15566  fi
15567
15568  # remove trailing .exe if any
15569  new_path="${new_path/%.exe/}"
15570
15571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15572
15573  # First separate the path from the arguments. This will split at the first
15574  # space.
15575  complete="$FOUND_MAKE"
15576  path="${complete%% *}"
15577  tmp="$complete EOL"
15578  arguments="${tmp#* }"
15579
15580  # Input might be given as Windows format, start by converting to
15581  # unix format.
15582  new_path="$path"
15583
15584  windows_path="$new_path"
15585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15586    unix_path=`$CYGPATH -u "$windows_path"`
15587    new_path="$unix_path"
15588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15590    new_path="$unix_path"
15591  fi
15592
15593
15594  # Now try to locate executable using which
15595  new_path=`$WHICH "$new_path" 2> /dev/null`
15596
15597  if test "x$new_path" = x; then
15598    # Oops. Which didn't find the executable.
15599    # The splitting of arguments from the executable at a space might have been incorrect,
15600    # since paths with space are more likely in Windows. Give it another try with the whole
15601    # argument.
15602    path="$complete"
15603    arguments="EOL"
15604    new_path="$path"
15605
15606  windows_path="$new_path"
15607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15608    unix_path=`$CYGPATH -u "$windows_path"`
15609    new_path="$unix_path"
15610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15612    new_path="$unix_path"
15613  fi
15614
15615
15616    new_path=`$WHICH "$new_path" 2> /dev/null`
15617    # bat and cmd files are not always considered executable in MSYS causing which
15618    # to not find them
15619    if test "x$new_path" = x \
15620        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15621        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15622      new_path="$path"
15623
15624  windows_path="$new_path"
15625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15626    unix_path=`$CYGPATH -u "$windows_path"`
15627    new_path="$unix_path"
15628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15630    new_path="$unix_path"
15631  fi
15632
15633    fi
15634
15635    if test "x$new_path" = x; then
15636      # It's still not found. Now this is an unrecoverable error.
15637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15638$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15639      has_space=`$ECHO "$complete" | $GREP " "`
15640      if test "x$has_space" != x; then
15641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15643      fi
15644      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15645    fi
15646  fi
15647
15648  # Now new_path has a complete unix path to the binary
15649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15650    # Keep paths in /bin as-is, but remove trailing .exe if any
15651    new_path="${new_path/%.exe/}"
15652    # Do not save /bin paths to all_fixpath_prefixes!
15653  else
15654    # Not in mixed or Windows style, start by that.
15655    new_path=`cmd //c echo $new_path`
15656
15657  input_path="$new_path"
15658  # Check if we need to convert this using DOS-style short mode. If the path
15659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15660  # take no chances and rewrite it.
15661  # Note: m4 eats our [], so we need to use [ and ] instead.
15662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15663  if test "x$has_forbidden_chars" != x; then
15664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15666  fi
15667
15668    # Output is in $new_path
15669
15670  windows_path="$new_path"
15671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15672    unix_path=`$CYGPATH -u "$windows_path"`
15673    new_path="$unix_path"
15674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15676    new_path="$unix_path"
15677  fi
15678
15679    # remove trailing .exe if any
15680    new_path="${new_path/%.exe/}"
15681
15682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15684  fi
15685
15686  else
15687    # We're on a posix platform. Hooray! :)
15688    # First separate the path from the arguments. This will split at the first
15689    # space.
15690    complete="$FOUND_MAKE"
15691    path="${complete%% *}"
15692    tmp="$complete EOL"
15693    arguments="${tmp#* }"
15694
15695    # Cannot rely on the command "which" here since it doesn't always work.
15696    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15697    if test -z "$is_absolute_path"; then
15698      # Path to executable is not absolute. Find it.
15699      IFS_save="$IFS"
15700      IFS=:
15701      for p in $PATH; do
15702        if test -f "$p/$path" && test -x "$p/$path"; then
15703          new_path="$p/$path"
15704          break
15705        fi
15706      done
15707      IFS="$IFS_save"
15708    else
15709      # This is an absolute path, we can use it without further modifications.
15710      new_path="$path"
15711    fi
15712
15713    if test "x$new_path" = x; then
15714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15716      has_space=`$ECHO "$complete" | $GREP " "`
15717      if test "x$has_space" != x; then
15718        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15719$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15720      fi
15721      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15722    fi
15723  fi
15724
15725  # Now join together the path and the arguments once again
15726  if test "x$arguments" != xEOL; then
15727    new_complete="$new_path ${arguments% *}"
15728  else
15729    new_complete="$new_path"
15730  fi
15731
15732  if test "x$complete" != "x$new_complete"; then
15733    FOUND_MAKE="$new_complete"
15734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15735$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15736  fi
15737
15738        fi
15739      fi
15740    fi
15741  fi
15742
15743    if test "x$FOUND_MAKE" = x; then
15744      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15745    fi
15746  else
15747    # Try our hardest to locate a correct version of GNU make
15748    for ac_prog in gmake
15749do
15750  # Extract the first word of "$ac_prog", so it can be a program name with args.
15751set dummy $ac_prog; ac_word=$2
15752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15753$as_echo_n "checking for $ac_word... " >&6; }
15754if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15755  $as_echo_n "(cached) " >&6
15756else
15757  case $CHECK_GMAKE in
15758  [\\/]* | ?:[\\/]*)
15759  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15760  ;;
15761  *)
15762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15763for as_dir in $PATH
15764do
15765  IFS=$as_save_IFS
15766  test -z "$as_dir" && as_dir=.
15767    for ac_exec_ext in '' $ac_executable_extensions; do
15768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15769    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15771    break 2
15772  fi
15773done
15774  done
15775IFS=$as_save_IFS
15776
15777  ;;
15778esac
15779fi
15780CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15781if test -n "$CHECK_GMAKE"; then
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15783$as_echo "$CHECK_GMAKE" >&6; }
15784else
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15786$as_echo "no" >&6; }
15787fi
15788
15789
15790  test -n "$CHECK_GMAKE" && break
15791done
15792
15793
15794  MAKE_CANDIDATE=""$CHECK_GMAKE""
15795  DESCRIPTION="gmake in PATH"
15796  if test "x$MAKE_CANDIDATE" != x; then
15797    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15798$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15799    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15800    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15801    if test "x$IS_GNU_MAKE" = x; then
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15803$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15804    else
15805      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15806      if test "x$IS_MODERN_MAKE" = x; then
15807        { $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
15808$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;}
15809      else
15810        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15811          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15812            MAKE_EXPECTED_ENV='cygwin'
15813          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15814            MAKE_EXPECTED_ENV='msys'
15815          else
15816            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15817          fi
15818          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15819          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15820        else
15821          # Not relevant for non-Windows
15822          IS_MAKE_CORRECT_ENV=true
15823        fi
15824        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15825          { $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
15826$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;}
15827        else
15828          FOUND_MAKE=$MAKE_CANDIDATE
15829
15830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15831
15832  # First separate the path from the arguments. This will split at the first
15833  # space.
15834  complete="$FOUND_MAKE"
15835  path="${complete%% *}"
15836  tmp="$complete EOL"
15837  arguments="${tmp#* }"
15838
15839  # Input might be given as Windows format, start by converting to
15840  # unix format.
15841  new_path=`$CYGPATH -u "$path"`
15842
15843  # Now try to locate executable using which
15844  new_path=`$WHICH "$new_path" 2> /dev/null`
15845  # bat and cmd files are not always considered executable in cygwin causing which
15846  # to not find them
15847  if test "x$new_path" = x \
15848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15850    new_path=`$CYGPATH -u "$path"`
15851  fi
15852  if test "x$new_path" = x; then
15853    # Oops. Which didn't find the executable.
15854    # The splitting of arguments from the executable at a space might have been incorrect,
15855    # since paths with space are more likely in Windows. Give it another try with the whole
15856    # argument.
15857    path="$complete"
15858    arguments="EOL"
15859    new_path=`$CYGPATH -u "$path"`
15860    new_path=`$WHICH "$new_path" 2> /dev/null`
15861    # bat and cmd files are not always considered executable in cygwin causing which
15862    # to not find them
15863    if test "x$new_path" = x \
15864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15866      new_path=`$CYGPATH -u "$path"`
15867    fi
15868    if test "x$new_path" = x; then
15869      # It's still not found. Now this is an unrecoverable error.
15870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15871$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15872      has_space=`$ECHO "$complete" | $GREP " "`
15873      if test "x$has_space" != x; then
15874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15876      fi
15877      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15878    fi
15879  fi
15880
15881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15884  # "foo.exe" is OK but "foo" is an error.
15885  #
15886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15887  # It is also a way to make sure we got the proper file name for the real test later on.
15888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15889  if test "x$test_shortpath" = x; then
15890    # Short path failed, file does not exist as specified.
15891    # Try adding .exe or .cmd
15892    if test -f "${new_path}.exe"; then
15893      input_to_shortpath="${new_path}.exe"
15894    elif test -f "${new_path}.cmd"; then
15895      input_to_shortpath="${new_path}.cmd"
15896    else
15897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15901      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15902    fi
15903  else
15904    input_to_shortpath="$new_path"
15905  fi
15906
15907  # Call helper function which possibly converts this using DOS-style short mode.
15908  # If so, the updated path is stored in $new_path.
15909  new_path="$input_to_shortpath"
15910
15911  input_path="$input_to_shortpath"
15912  # Check if we need to convert this using DOS-style short mode. If the path
15913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15914  # take no chances and rewrite it.
15915  # Note: m4 eats our [], so we need to use [ and ] instead.
15916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15917  if test "x$has_forbidden_chars" != x; then
15918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15922      # Going to short mode and back again did indeed matter. Since short mode is
15923      # case insensitive, let's make it lowercase to improve readability.
15924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15925      # Now convert it back to Unix-stile (cygpath)
15926      input_path=`$CYGPATH -u "$shortmode_path"`
15927      new_path="$input_path"
15928    fi
15929  fi
15930
15931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15932  if test "x$test_cygdrive_prefix" = x; then
15933    # As a simple fix, exclude /usr/bin since it's not a real path.
15934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15936      # a path prefixed by /cygdrive for fixpath to work.
15937      new_path="$CYGWIN_ROOT_PATH$input_path"
15938    fi
15939  fi
15940
15941  # remove trailing .exe if any
15942  new_path="${new_path/%.exe/}"
15943
15944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15945
15946  # First separate the path from the arguments. This will split at the first
15947  # space.
15948  complete="$FOUND_MAKE"
15949  path="${complete%% *}"
15950  tmp="$complete EOL"
15951  arguments="${tmp#* }"
15952
15953  # Input might be given as Windows format, start by converting to
15954  # unix format.
15955  new_path="$path"
15956
15957  windows_path="$new_path"
15958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15959    unix_path=`$CYGPATH -u "$windows_path"`
15960    new_path="$unix_path"
15961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15963    new_path="$unix_path"
15964  fi
15965
15966
15967  # Now try to locate executable using which
15968  new_path=`$WHICH "$new_path" 2> /dev/null`
15969
15970  if test "x$new_path" = x; then
15971    # Oops. Which didn't find the executable.
15972    # The splitting of arguments from the executable at a space might have been incorrect,
15973    # since paths with space are more likely in Windows. Give it another try with the whole
15974    # argument.
15975    path="$complete"
15976    arguments="EOL"
15977    new_path="$path"
15978
15979  windows_path="$new_path"
15980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15981    unix_path=`$CYGPATH -u "$windows_path"`
15982    new_path="$unix_path"
15983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15985    new_path="$unix_path"
15986  fi
15987
15988
15989    new_path=`$WHICH "$new_path" 2> /dev/null`
15990    # bat and cmd files are not always considered executable in MSYS causing which
15991    # to not find them
15992    if test "x$new_path" = x \
15993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15995      new_path="$path"
15996
15997  windows_path="$new_path"
15998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15999    unix_path=`$CYGPATH -u "$windows_path"`
16000    new_path="$unix_path"
16001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16003    new_path="$unix_path"
16004  fi
16005
16006    fi
16007
16008    if test "x$new_path" = x; then
16009      # It's still not found. Now this is an unrecoverable error.
16010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16011$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16012      has_space=`$ECHO "$complete" | $GREP " "`
16013      if test "x$has_space" != x; then
16014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16016      fi
16017      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16018    fi
16019  fi
16020
16021  # Now new_path has a complete unix path to the binary
16022  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16023    # Keep paths in /bin as-is, but remove trailing .exe if any
16024    new_path="${new_path/%.exe/}"
16025    # Do not save /bin paths to all_fixpath_prefixes!
16026  else
16027    # Not in mixed or Windows style, start by that.
16028    new_path=`cmd //c echo $new_path`
16029
16030  input_path="$new_path"
16031  # Check if we need to convert this using DOS-style short mode. If the path
16032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16033  # take no chances and rewrite it.
16034  # Note: m4 eats our [], so we need to use [ and ] instead.
16035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16036  if test "x$has_forbidden_chars" != x; then
16037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16039  fi
16040
16041    # Output is in $new_path
16042
16043  windows_path="$new_path"
16044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16045    unix_path=`$CYGPATH -u "$windows_path"`
16046    new_path="$unix_path"
16047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16049    new_path="$unix_path"
16050  fi
16051
16052    # remove trailing .exe if any
16053    new_path="${new_path/%.exe/}"
16054
16055    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16056    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16057  fi
16058
16059  else
16060    # We're on a posix platform. Hooray! :)
16061    # First separate the path from the arguments. This will split at the first
16062    # space.
16063    complete="$FOUND_MAKE"
16064    path="${complete%% *}"
16065    tmp="$complete EOL"
16066    arguments="${tmp#* }"
16067
16068    # Cannot rely on the command "which" here since it doesn't always work.
16069    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16070    if test -z "$is_absolute_path"; then
16071      # Path to executable is not absolute. Find it.
16072      IFS_save="$IFS"
16073      IFS=:
16074      for p in $PATH; do
16075        if test -f "$p/$path" && test -x "$p/$path"; then
16076          new_path="$p/$path"
16077          break
16078        fi
16079      done
16080      IFS="$IFS_save"
16081    else
16082      # This is an absolute path, we can use it without further modifications.
16083      new_path="$path"
16084    fi
16085
16086    if test "x$new_path" = x; then
16087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16089      has_space=`$ECHO "$complete" | $GREP " "`
16090      if test "x$has_space" != x; then
16091        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16092$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16093      fi
16094      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16095    fi
16096  fi
16097
16098  # Now join together the path and the arguments once again
16099  if test "x$arguments" != xEOL; then
16100    new_complete="$new_path ${arguments% *}"
16101  else
16102    new_complete="$new_path"
16103  fi
16104
16105  if test "x$complete" != "x$new_complete"; then
16106    FOUND_MAKE="$new_complete"
16107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16108$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16109  fi
16110
16111        fi
16112      fi
16113    fi
16114  fi
16115
16116
16117    if test "x$FOUND_MAKE" = x; then
16118      for ac_prog in make
16119do
16120  # Extract the first word of "$ac_prog", so it can be a program name with args.
16121set dummy $ac_prog; ac_word=$2
16122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16123$as_echo_n "checking for $ac_word... " >&6; }
16124if ${ac_cv_path_CHECK_MAKE+:} false; then :
16125  $as_echo_n "(cached) " >&6
16126else
16127  case $CHECK_MAKE in
16128  [\\/]* | ?:[\\/]*)
16129  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16130  ;;
16131  *)
16132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16133for as_dir in $PATH
16134do
16135  IFS=$as_save_IFS
16136  test -z "$as_dir" && as_dir=.
16137    for ac_exec_ext in '' $ac_executable_extensions; do
16138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16139    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16141    break 2
16142  fi
16143done
16144  done
16145IFS=$as_save_IFS
16146
16147  ;;
16148esac
16149fi
16150CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16151if test -n "$CHECK_MAKE"; then
16152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16153$as_echo "$CHECK_MAKE" >&6; }
16154else
16155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16156$as_echo "no" >&6; }
16157fi
16158
16159
16160  test -n "$CHECK_MAKE" && break
16161done
16162
16163
16164  MAKE_CANDIDATE=""$CHECK_MAKE""
16165  DESCRIPTION="make in PATH"
16166  if test "x$MAKE_CANDIDATE" != x; then
16167    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16168$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16169    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16170    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16171    if test "x$IS_GNU_MAKE" = x; then
16172      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16173$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16174    else
16175      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16176      if test "x$IS_MODERN_MAKE" = x; then
16177        { $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
16178$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;}
16179      else
16180        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16181          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16182            MAKE_EXPECTED_ENV='cygwin'
16183          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16184            MAKE_EXPECTED_ENV='msys'
16185          else
16186            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16187          fi
16188          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16189          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16190        else
16191          # Not relevant for non-Windows
16192          IS_MAKE_CORRECT_ENV=true
16193        fi
16194        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16195          { $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
16196$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;}
16197        else
16198          FOUND_MAKE=$MAKE_CANDIDATE
16199
16200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16201
16202  # First separate the path from the arguments. This will split at the first
16203  # space.
16204  complete="$FOUND_MAKE"
16205  path="${complete%% *}"
16206  tmp="$complete EOL"
16207  arguments="${tmp#* }"
16208
16209  # Input might be given as Windows format, start by converting to
16210  # unix format.
16211  new_path=`$CYGPATH -u "$path"`
16212
16213  # Now try to locate executable using which
16214  new_path=`$WHICH "$new_path" 2> /dev/null`
16215  # bat and cmd files are not always considered executable in cygwin causing which
16216  # to not find them
16217  if test "x$new_path" = x \
16218      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16219      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16220    new_path=`$CYGPATH -u "$path"`
16221  fi
16222  if test "x$new_path" = x; then
16223    # Oops. Which didn't find the executable.
16224    # The splitting of arguments from the executable at a space might have been incorrect,
16225    # since paths with space are more likely in Windows. Give it another try with the whole
16226    # argument.
16227    path="$complete"
16228    arguments="EOL"
16229    new_path=`$CYGPATH -u "$path"`
16230    new_path=`$WHICH "$new_path" 2> /dev/null`
16231    # bat and cmd files are not always considered executable in cygwin causing which
16232    # to not find them
16233    if test "x$new_path" = x \
16234        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16235        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16236      new_path=`$CYGPATH -u "$path"`
16237    fi
16238    if test "x$new_path" = x; then
16239      # It's still not found. Now this is an unrecoverable error.
16240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16241$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16242      has_space=`$ECHO "$complete" | $GREP " "`
16243      if test "x$has_space" != x; then
16244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16246      fi
16247      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16248    fi
16249  fi
16250
16251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16254  # "foo.exe" is OK but "foo" is an error.
16255  #
16256  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16257  # It is also a way to make sure we got the proper file name for the real test later on.
16258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16259  if test "x$test_shortpath" = x; then
16260    # Short path failed, file does not exist as specified.
16261    # Try adding .exe or .cmd
16262    if test -f "${new_path}.exe"; then
16263      input_to_shortpath="${new_path}.exe"
16264    elif test -f "${new_path}.cmd"; then
16265      input_to_shortpath="${new_path}.cmd"
16266    else
16267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16269      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16270$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16271      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16272    fi
16273  else
16274    input_to_shortpath="$new_path"
16275  fi
16276
16277  # Call helper function which possibly converts this using DOS-style short mode.
16278  # If so, the updated path is stored in $new_path.
16279  new_path="$input_to_shortpath"
16280
16281  input_path="$input_to_shortpath"
16282  # Check if we need to convert this using DOS-style short mode. If the path
16283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16284  # take no chances and rewrite it.
16285  # Note: m4 eats our [], so we need to use [ and ] instead.
16286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16287  if test "x$has_forbidden_chars" != x; then
16288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16292      # Going to short mode and back again did indeed matter. Since short mode is
16293      # case insensitive, let's make it lowercase to improve readability.
16294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16295      # Now convert it back to Unix-stile (cygpath)
16296      input_path=`$CYGPATH -u "$shortmode_path"`
16297      new_path="$input_path"
16298    fi
16299  fi
16300
16301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16302  if test "x$test_cygdrive_prefix" = x; then
16303    # As a simple fix, exclude /usr/bin since it's not a real path.
16304    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16306      # a path prefixed by /cygdrive for fixpath to work.
16307      new_path="$CYGWIN_ROOT_PATH$input_path"
16308    fi
16309  fi
16310
16311  # remove trailing .exe if any
16312  new_path="${new_path/%.exe/}"
16313
16314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16315
16316  # First separate the path from the arguments. This will split at the first
16317  # space.
16318  complete="$FOUND_MAKE"
16319  path="${complete%% *}"
16320  tmp="$complete EOL"
16321  arguments="${tmp#* }"
16322
16323  # Input might be given as Windows format, start by converting to
16324  # unix format.
16325  new_path="$path"
16326
16327  windows_path="$new_path"
16328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16329    unix_path=`$CYGPATH -u "$windows_path"`
16330    new_path="$unix_path"
16331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16333    new_path="$unix_path"
16334  fi
16335
16336
16337  # Now try to locate executable using which
16338  new_path=`$WHICH "$new_path" 2> /dev/null`
16339
16340  if test "x$new_path" = x; then
16341    # Oops. Which didn't find the executable.
16342    # The splitting of arguments from the executable at a space might have been incorrect,
16343    # since paths with space are more likely in Windows. Give it another try with the whole
16344    # argument.
16345    path="$complete"
16346    arguments="EOL"
16347    new_path="$path"
16348
16349  windows_path="$new_path"
16350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16351    unix_path=`$CYGPATH -u "$windows_path"`
16352    new_path="$unix_path"
16353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16355    new_path="$unix_path"
16356  fi
16357
16358
16359    new_path=`$WHICH "$new_path" 2> /dev/null`
16360    # bat and cmd files are not always considered executable in MSYS causing which
16361    # to not find them
16362    if test "x$new_path" = x \
16363        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16364        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16365      new_path="$path"
16366
16367  windows_path="$new_path"
16368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16369    unix_path=`$CYGPATH -u "$windows_path"`
16370    new_path="$unix_path"
16371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16373    new_path="$unix_path"
16374  fi
16375
16376    fi
16377
16378    if test "x$new_path" = x; then
16379      # It's still not found. Now this is an unrecoverable error.
16380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16381$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16382      has_space=`$ECHO "$complete" | $GREP " "`
16383      if test "x$has_space" != x; then
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16386      fi
16387      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16388    fi
16389  fi
16390
16391  # Now new_path has a complete unix path to the binary
16392  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16393    # Keep paths in /bin as-is, but remove trailing .exe if any
16394    new_path="${new_path/%.exe/}"
16395    # Do not save /bin paths to all_fixpath_prefixes!
16396  else
16397    # Not in mixed or Windows style, start by that.
16398    new_path=`cmd //c echo $new_path`
16399
16400  input_path="$new_path"
16401  # Check if we need to convert this using DOS-style short mode. If the path
16402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16403  # take no chances and rewrite it.
16404  # Note: m4 eats our [], so we need to use [ and ] instead.
16405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16406  if test "x$has_forbidden_chars" != x; then
16407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16409  fi
16410
16411    # Output is in $new_path
16412
16413  windows_path="$new_path"
16414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16415    unix_path=`$CYGPATH -u "$windows_path"`
16416    new_path="$unix_path"
16417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16419    new_path="$unix_path"
16420  fi
16421
16422    # remove trailing .exe if any
16423    new_path="${new_path/%.exe/}"
16424
16425    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16426    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16427  fi
16428
16429  else
16430    # We're on a posix platform. Hooray! :)
16431    # First separate the path from the arguments. This will split at the first
16432    # space.
16433    complete="$FOUND_MAKE"
16434    path="${complete%% *}"
16435    tmp="$complete EOL"
16436    arguments="${tmp#* }"
16437
16438    # Cannot rely on the command "which" here since it doesn't always work.
16439    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16440    if test -z "$is_absolute_path"; then
16441      # Path to executable is not absolute. Find it.
16442      IFS_save="$IFS"
16443      IFS=:
16444      for p in $PATH; do
16445        if test -f "$p/$path" && test -x "$p/$path"; then
16446          new_path="$p/$path"
16447          break
16448        fi
16449      done
16450      IFS="$IFS_save"
16451    else
16452      # This is an absolute path, we can use it without further modifications.
16453      new_path="$path"
16454    fi
16455
16456    if test "x$new_path" = x; then
16457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16458$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16459      has_space=`$ECHO "$complete" | $GREP " "`
16460      if test "x$has_space" != x; then
16461        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16462$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16463      fi
16464      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16465    fi
16466  fi
16467
16468  # Now join together the path and the arguments once again
16469  if test "x$arguments" != xEOL; then
16470    new_complete="$new_path ${arguments% *}"
16471  else
16472    new_complete="$new_path"
16473  fi
16474
16475  if test "x$complete" != "x$new_complete"; then
16476    FOUND_MAKE="$new_complete"
16477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16478$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16479  fi
16480
16481        fi
16482      fi
16483    fi
16484  fi
16485
16486    fi
16487
16488    if test "x$FOUND_MAKE" = x; then
16489      if test "x$TOOLCHAIN_PATH" != x; then
16490        # We have a toolchain path, check that as well before giving up.
16491        OLD_PATH=$PATH
16492        PATH=$TOOLCHAIN_PATH:$PATH
16493        for ac_prog in gmake
16494do
16495  # Extract the first word of "$ac_prog", so it can be a program name with args.
16496set dummy $ac_prog; ac_word=$2
16497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16498$as_echo_n "checking for $ac_word... " >&6; }
16499if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16500  $as_echo_n "(cached) " >&6
16501else
16502  case $CHECK_TOOLSDIR_GMAKE in
16503  [\\/]* | ?:[\\/]*)
16504  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16505  ;;
16506  *)
16507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16508for as_dir in $PATH
16509do
16510  IFS=$as_save_IFS
16511  test -z "$as_dir" && as_dir=.
16512    for ac_exec_ext in '' $ac_executable_extensions; do
16513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16514    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16516    break 2
16517  fi
16518done
16519  done
16520IFS=$as_save_IFS
16521
16522  ;;
16523esac
16524fi
16525CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16526if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16528$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16529else
16530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16531$as_echo "no" >&6; }
16532fi
16533
16534
16535  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16536done
16537
16538
16539  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16540  DESCRIPTION="gmake in tools-dir"
16541  if test "x$MAKE_CANDIDATE" != x; then
16542    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16543$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16544    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16545    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16546    if test "x$IS_GNU_MAKE" = x; then
16547      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16548$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16549    else
16550      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16551      if test "x$IS_MODERN_MAKE" = x; then
16552        { $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
16553$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;}
16554      else
16555        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16556          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16557            MAKE_EXPECTED_ENV='cygwin'
16558          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16559            MAKE_EXPECTED_ENV='msys'
16560          else
16561            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16562          fi
16563          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16564          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16565        else
16566          # Not relevant for non-Windows
16567          IS_MAKE_CORRECT_ENV=true
16568        fi
16569        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16570          { $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
16571$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;}
16572        else
16573          FOUND_MAKE=$MAKE_CANDIDATE
16574
16575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16576
16577  # First separate the path from the arguments. This will split at the first
16578  # space.
16579  complete="$FOUND_MAKE"
16580  path="${complete%% *}"
16581  tmp="$complete EOL"
16582  arguments="${tmp#* }"
16583
16584  # Input might be given as Windows format, start by converting to
16585  # unix format.
16586  new_path=`$CYGPATH -u "$path"`
16587
16588  # Now try to locate executable using which
16589  new_path=`$WHICH "$new_path" 2> /dev/null`
16590  # bat and cmd files are not always considered executable in cygwin causing which
16591  # to not find them
16592  if test "x$new_path" = x \
16593      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16594      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16595    new_path=`$CYGPATH -u "$path"`
16596  fi
16597  if test "x$new_path" = x; then
16598    # Oops. Which didn't find the executable.
16599    # The splitting of arguments from the executable at a space might have been incorrect,
16600    # since paths with space are more likely in Windows. Give it another try with the whole
16601    # argument.
16602    path="$complete"
16603    arguments="EOL"
16604    new_path=`$CYGPATH -u "$path"`
16605    new_path=`$WHICH "$new_path" 2> /dev/null`
16606    # bat and cmd files are not always considered executable in cygwin causing which
16607    # to not find them
16608    if test "x$new_path" = x \
16609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16611      new_path=`$CYGPATH -u "$path"`
16612    fi
16613    if test "x$new_path" = x; then
16614      # It's still not found. Now this is an unrecoverable error.
16615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16616$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16617      has_space=`$ECHO "$complete" | $GREP " "`
16618      if test "x$has_space" != x; then
16619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16621      fi
16622      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16623    fi
16624  fi
16625
16626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16629  # "foo.exe" is OK but "foo" is an error.
16630  #
16631  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16632  # It is also a way to make sure we got the proper file name for the real test later on.
16633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16634  if test "x$test_shortpath" = x; then
16635    # Short path failed, file does not exist as specified.
16636    # Try adding .exe or .cmd
16637    if test -f "${new_path}.exe"; then
16638      input_to_shortpath="${new_path}.exe"
16639    elif test -f "${new_path}.cmd"; then
16640      input_to_shortpath="${new_path}.cmd"
16641    else
16642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16643$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16644      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16645$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16646      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16647    fi
16648  else
16649    input_to_shortpath="$new_path"
16650  fi
16651
16652  # Call helper function which possibly converts this using DOS-style short mode.
16653  # If so, the updated path is stored in $new_path.
16654  new_path="$input_to_shortpath"
16655
16656  input_path="$input_to_shortpath"
16657  # Check if we need to convert this using DOS-style short mode. If the path
16658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16659  # take no chances and rewrite it.
16660  # Note: m4 eats our [], so we need to use [ and ] instead.
16661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16662  if test "x$has_forbidden_chars" != x; then
16663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16667      # Going to short mode and back again did indeed matter. Since short mode is
16668      # case insensitive, let's make it lowercase to improve readability.
16669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16670      # Now convert it back to Unix-stile (cygpath)
16671      input_path=`$CYGPATH -u "$shortmode_path"`
16672      new_path="$input_path"
16673    fi
16674  fi
16675
16676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16677  if test "x$test_cygdrive_prefix" = x; then
16678    # As a simple fix, exclude /usr/bin since it's not a real path.
16679    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16681      # a path prefixed by /cygdrive for fixpath to work.
16682      new_path="$CYGWIN_ROOT_PATH$input_path"
16683    fi
16684  fi
16685
16686  # remove trailing .exe if any
16687  new_path="${new_path/%.exe/}"
16688
16689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16690
16691  # First separate the path from the arguments. This will split at the first
16692  # space.
16693  complete="$FOUND_MAKE"
16694  path="${complete%% *}"
16695  tmp="$complete EOL"
16696  arguments="${tmp#* }"
16697
16698  # Input might be given as Windows format, start by converting to
16699  # unix format.
16700  new_path="$path"
16701
16702  windows_path="$new_path"
16703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16704    unix_path=`$CYGPATH -u "$windows_path"`
16705    new_path="$unix_path"
16706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16708    new_path="$unix_path"
16709  fi
16710
16711
16712  # Now try to locate executable using which
16713  new_path=`$WHICH "$new_path" 2> /dev/null`
16714
16715  if test "x$new_path" = x; then
16716    # Oops. Which didn't find the executable.
16717    # The splitting of arguments from the executable at a space might have been incorrect,
16718    # since paths with space are more likely in Windows. Give it another try with the whole
16719    # argument.
16720    path="$complete"
16721    arguments="EOL"
16722    new_path="$path"
16723
16724  windows_path="$new_path"
16725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16726    unix_path=`$CYGPATH -u "$windows_path"`
16727    new_path="$unix_path"
16728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16730    new_path="$unix_path"
16731  fi
16732
16733
16734    new_path=`$WHICH "$new_path" 2> /dev/null`
16735    # bat and cmd files are not always considered executable in MSYS causing which
16736    # to not find them
16737    if test "x$new_path" = x \
16738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16740      new_path="$path"
16741
16742  windows_path="$new_path"
16743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16744    unix_path=`$CYGPATH -u "$windows_path"`
16745    new_path="$unix_path"
16746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16748    new_path="$unix_path"
16749  fi
16750
16751    fi
16752
16753    if test "x$new_path" = x; then
16754      # It's still not found. Now this is an unrecoverable error.
16755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16756$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16757      has_space=`$ECHO "$complete" | $GREP " "`
16758      if test "x$has_space" != x; then
16759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16761      fi
16762      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16763    fi
16764  fi
16765
16766  # Now new_path has a complete unix path to the binary
16767  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16768    # Keep paths in /bin as-is, but remove trailing .exe if any
16769    new_path="${new_path/%.exe/}"
16770    # Do not save /bin paths to all_fixpath_prefixes!
16771  else
16772    # Not in mixed or Windows style, start by that.
16773    new_path=`cmd //c echo $new_path`
16774
16775  input_path="$new_path"
16776  # Check if we need to convert this using DOS-style short mode. If the path
16777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16778  # take no chances and rewrite it.
16779  # Note: m4 eats our [], so we need to use [ and ] instead.
16780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16781  if test "x$has_forbidden_chars" != x; then
16782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16784  fi
16785
16786    # Output is in $new_path
16787
16788  windows_path="$new_path"
16789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16790    unix_path=`$CYGPATH -u "$windows_path"`
16791    new_path="$unix_path"
16792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16794    new_path="$unix_path"
16795  fi
16796
16797    # remove trailing .exe if any
16798    new_path="${new_path/%.exe/}"
16799
16800    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16801    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16802  fi
16803
16804  else
16805    # We're on a posix platform. Hooray! :)
16806    # First separate the path from the arguments. This will split at the first
16807    # space.
16808    complete="$FOUND_MAKE"
16809    path="${complete%% *}"
16810    tmp="$complete EOL"
16811    arguments="${tmp#* }"
16812
16813    # Cannot rely on the command "which" here since it doesn't always work.
16814    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16815    if test -z "$is_absolute_path"; then
16816      # Path to executable is not absolute. Find it.
16817      IFS_save="$IFS"
16818      IFS=:
16819      for p in $PATH; do
16820        if test -f "$p/$path" && test -x "$p/$path"; then
16821          new_path="$p/$path"
16822          break
16823        fi
16824      done
16825      IFS="$IFS_save"
16826    else
16827      # This is an absolute path, we can use it without further modifications.
16828      new_path="$path"
16829    fi
16830
16831    if test "x$new_path" = x; then
16832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16834      has_space=`$ECHO "$complete" | $GREP " "`
16835      if test "x$has_space" != x; then
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16838      fi
16839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16840    fi
16841  fi
16842
16843  # Now join together the path and the arguments once again
16844  if test "x$arguments" != xEOL; then
16845    new_complete="$new_path ${arguments% *}"
16846  else
16847    new_complete="$new_path"
16848  fi
16849
16850  if test "x$complete" != "x$new_complete"; then
16851    FOUND_MAKE="$new_complete"
16852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16853$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16854  fi
16855
16856        fi
16857      fi
16858    fi
16859  fi
16860
16861        if test "x$FOUND_MAKE" = x; then
16862          for ac_prog in make
16863do
16864  # Extract the first word of "$ac_prog", so it can be a program name with args.
16865set dummy $ac_prog; ac_word=$2
16866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16867$as_echo_n "checking for $ac_word... " >&6; }
16868if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16869  $as_echo_n "(cached) " >&6
16870else
16871  case $CHECK_TOOLSDIR_MAKE in
16872  [\\/]* | ?:[\\/]*)
16873  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16874  ;;
16875  *)
16876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16877for as_dir in $PATH
16878do
16879  IFS=$as_save_IFS
16880  test -z "$as_dir" && as_dir=.
16881    for ac_exec_ext in '' $ac_executable_extensions; do
16882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16883    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16885    break 2
16886  fi
16887done
16888  done
16889IFS=$as_save_IFS
16890
16891  ;;
16892esac
16893fi
16894CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16895if test -n "$CHECK_TOOLSDIR_MAKE"; then
16896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16897$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16898else
16899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16900$as_echo "no" >&6; }
16901fi
16902
16903
16904  test -n "$CHECK_TOOLSDIR_MAKE" && break
16905done
16906
16907
16908  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16909  DESCRIPTION="make in tools-dir"
16910  if test "x$MAKE_CANDIDATE" != x; then
16911    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16912$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16913    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16914    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16915    if test "x$IS_GNU_MAKE" = x; then
16916      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16917$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16918    else
16919      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16920      if test "x$IS_MODERN_MAKE" = x; then
16921        { $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
16922$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;}
16923      else
16924        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16925          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16926            MAKE_EXPECTED_ENV='cygwin'
16927          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16928            MAKE_EXPECTED_ENV='msys'
16929          else
16930            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16931          fi
16932          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16933          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16934        else
16935          # Not relevant for non-Windows
16936          IS_MAKE_CORRECT_ENV=true
16937        fi
16938        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16939          { $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
16940$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;}
16941        else
16942          FOUND_MAKE=$MAKE_CANDIDATE
16943
16944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16945
16946  # First separate the path from the arguments. This will split at the first
16947  # space.
16948  complete="$FOUND_MAKE"
16949  path="${complete%% *}"
16950  tmp="$complete EOL"
16951  arguments="${tmp#* }"
16952
16953  # Input might be given as Windows format, start by converting to
16954  # unix format.
16955  new_path=`$CYGPATH -u "$path"`
16956
16957  # Now try to locate executable using which
16958  new_path=`$WHICH "$new_path" 2> /dev/null`
16959  # bat and cmd files are not always considered executable in cygwin causing which
16960  # to not find them
16961  if test "x$new_path" = x \
16962      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16963      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16964    new_path=`$CYGPATH -u "$path"`
16965  fi
16966  if test "x$new_path" = x; then
16967    # Oops. Which didn't find the executable.
16968    # The splitting of arguments from the executable at a space might have been incorrect,
16969    # since paths with space are more likely in Windows. Give it another try with the whole
16970    # argument.
16971    path="$complete"
16972    arguments="EOL"
16973    new_path=`$CYGPATH -u "$path"`
16974    new_path=`$WHICH "$new_path" 2> /dev/null`
16975    # bat and cmd files are not always considered executable in cygwin causing which
16976    # to not find them
16977    if test "x$new_path" = x \
16978        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16979        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16980      new_path=`$CYGPATH -u "$path"`
16981    fi
16982    if test "x$new_path" = x; then
16983      # It's still not found. Now this is an unrecoverable error.
16984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16985$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16986      has_space=`$ECHO "$complete" | $GREP " "`
16987      if test "x$has_space" != x; then
16988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16990      fi
16991      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16992    fi
16993  fi
16994
16995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16998  # "foo.exe" is OK but "foo" is an error.
16999  #
17000  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17001  # It is also a way to make sure we got the proper file name for the real test later on.
17002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17003  if test "x$test_shortpath" = x; then
17004    # Short path failed, file does not exist as specified.
17005    # Try adding .exe or .cmd
17006    if test -f "${new_path}.exe"; then
17007      input_to_shortpath="${new_path}.exe"
17008    elif test -f "${new_path}.cmd"; then
17009      input_to_shortpath="${new_path}.cmd"
17010    else
17011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17012$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17013      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17015      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17016    fi
17017  else
17018    input_to_shortpath="$new_path"
17019  fi
17020
17021  # Call helper function which possibly converts this using DOS-style short mode.
17022  # If so, the updated path is stored in $new_path.
17023  new_path="$input_to_shortpath"
17024
17025  input_path="$input_to_shortpath"
17026  # Check if we need to convert this using DOS-style short mode. If the path
17027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17028  # take no chances and rewrite it.
17029  # Note: m4 eats our [], so we need to use [ and ] instead.
17030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17031  if test "x$has_forbidden_chars" != x; then
17032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17036      # Going to short mode and back again did indeed matter. Since short mode is
17037      # case insensitive, let's make it lowercase to improve readability.
17038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17039      # Now convert it back to Unix-stile (cygpath)
17040      input_path=`$CYGPATH -u "$shortmode_path"`
17041      new_path="$input_path"
17042    fi
17043  fi
17044
17045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17046  if test "x$test_cygdrive_prefix" = x; then
17047    # As a simple fix, exclude /usr/bin since it's not a real path.
17048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17050      # a path prefixed by /cygdrive for fixpath to work.
17051      new_path="$CYGWIN_ROOT_PATH$input_path"
17052    fi
17053  fi
17054
17055  # remove trailing .exe if any
17056  new_path="${new_path/%.exe/}"
17057
17058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17059
17060  # First separate the path from the arguments. This will split at the first
17061  # space.
17062  complete="$FOUND_MAKE"
17063  path="${complete%% *}"
17064  tmp="$complete EOL"
17065  arguments="${tmp#* }"
17066
17067  # Input might be given as Windows format, start by converting to
17068  # unix format.
17069  new_path="$path"
17070
17071  windows_path="$new_path"
17072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17073    unix_path=`$CYGPATH -u "$windows_path"`
17074    new_path="$unix_path"
17075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17077    new_path="$unix_path"
17078  fi
17079
17080
17081  # Now try to locate executable using which
17082  new_path=`$WHICH "$new_path" 2> /dev/null`
17083
17084  if test "x$new_path" = x; then
17085    # Oops. Which didn't find the executable.
17086    # The splitting of arguments from the executable at a space might have been incorrect,
17087    # since paths with space are more likely in Windows. Give it another try with the whole
17088    # argument.
17089    path="$complete"
17090    arguments="EOL"
17091    new_path="$path"
17092
17093  windows_path="$new_path"
17094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17095    unix_path=`$CYGPATH -u "$windows_path"`
17096    new_path="$unix_path"
17097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17099    new_path="$unix_path"
17100  fi
17101
17102
17103    new_path=`$WHICH "$new_path" 2> /dev/null`
17104    # bat and cmd files are not always considered executable in MSYS causing which
17105    # to not find them
17106    if test "x$new_path" = x \
17107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17109      new_path="$path"
17110
17111  windows_path="$new_path"
17112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17113    unix_path=`$CYGPATH -u "$windows_path"`
17114    new_path="$unix_path"
17115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17117    new_path="$unix_path"
17118  fi
17119
17120    fi
17121
17122    if test "x$new_path" = x; then
17123      # It's still not found. Now this is an unrecoverable error.
17124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17125$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17126      has_space=`$ECHO "$complete" | $GREP " "`
17127      if test "x$has_space" != x; then
17128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17130      fi
17131      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17132    fi
17133  fi
17134
17135  # Now new_path has a complete unix path to the binary
17136  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17137    # Keep paths in /bin as-is, but remove trailing .exe if any
17138    new_path="${new_path/%.exe/}"
17139    # Do not save /bin paths to all_fixpath_prefixes!
17140  else
17141    # Not in mixed or Windows style, start by that.
17142    new_path=`cmd //c echo $new_path`
17143
17144  input_path="$new_path"
17145  # Check if we need to convert this using DOS-style short mode. If the path
17146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17147  # take no chances and rewrite it.
17148  # Note: m4 eats our [], so we need to use [ and ] instead.
17149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17150  if test "x$has_forbidden_chars" != x; then
17151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17153  fi
17154
17155    # Output is in $new_path
17156
17157  windows_path="$new_path"
17158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17159    unix_path=`$CYGPATH -u "$windows_path"`
17160    new_path="$unix_path"
17161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17163    new_path="$unix_path"
17164  fi
17165
17166    # remove trailing .exe if any
17167    new_path="${new_path/%.exe/}"
17168
17169    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17170    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17171  fi
17172
17173  else
17174    # We're on a posix platform. Hooray! :)
17175    # First separate the path from the arguments. This will split at the first
17176    # space.
17177    complete="$FOUND_MAKE"
17178    path="${complete%% *}"
17179    tmp="$complete EOL"
17180    arguments="${tmp#* }"
17181
17182    # Cannot rely on the command "which" here since it doesn't always work.
17183    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17184    if test -z "$is_absolute_path"; then
17185      # Path to executable is not absolute. Find it.
17186      IFS_save="$IFS"
17187      IFS=:
17188      for p in $PATH; do
17189        if test -f "$p/$path" && test -x "$p/$path"; then
17190          new_path="$p/$path"
17191          break
17192        fi
17193      done
17194      IFS="$IFS_save"
17195    else
17196      # This is an absolute path, we can use it without further modifications.
17197      new_path="$path"
17198    fi
17199
17200    if test "x$new_path" = x; then
17201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17202$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17203      has_space=`$ECHO "$complete" | $GREP " "`
17204      if test "x$has_space" != x; then
17205        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17206$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17207      fi
17208      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17209    fi
17210  fi
17211
17212  # Now join together the path and the arguments once again
17213  if test "x$arguments" != xEOL; then
17214    new_complete="$new_path ${arguments% *}"
17215  else
17216    new_complete="$new_path"
17217  fi
17218
17219  if test "x$complete" != "x$new_complete"; then
17220    FOUND_MAKE="$new_complete"
17221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17222$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17223  fi
17224
17225        fi
17226      fi
17227    fi
17228  fi
17229
17230        fi
17231        PATH=$OLD_PATH
17232      fi
17233    fi
17234
17235    if test "x$FOUND_MAKE" = x; then
17236      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
17237    fi
17238  fi
17239
17240  MAKE=$FOUND_MAKE
17241
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17243$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17244
17245
17246  # Check if make supports the output sync option and if so, setup using it.
17247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17248$as_echo_n "checking if make --output-sync is supported... " >&6; }
17249  if $MAKE --version -O > /dev/null 2>&1; then
17250    OUTPUT_SYNC_SUPPORTED=true
17251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17252$as_echo "yes" >&6; }
17253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17254$as_echo_n "checking for output-sync value... " >&6; }
17255
17256# Check whether --with-output-sync was given.
17257if test "${with_output_sync+set}" = set; then :
17258  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17259fi
17260
17261    if test "x$OUTPUT_SYNC" = "x"; then
17262      OUTPUT_SYNC=none
17263    fi
17264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17265$as_echo "$OUTPUT_SYNC" >&6; }
17266    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17267      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17268    fi
17269  else
17270    OUTPUT_SYNC_SUPPORTED=false
17271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17272$as_echo "no" >&6; }
17273  fi
17274
17275
17276
17277
17278
17279
17280  # Test if find supports -delete
17281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17282$as_echo_n "checking if find supports -delete... " >&6; }
17283  FIND_DELETE="-delete"
17284
17285  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17286
17287  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17288
17289  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17290  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17291    # No, it does not.
17292    rm $DELETEDIR/TestIfFindSupportsDelete
17293    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17294      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17295      FIND_DELETE="-print | xargs rm"
17296    else
17297      FIND_DELETE="-exec rm \{\} \+"
17298    fi
17299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17300$as_echo "no" >&6; }
17301  else
17302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17303$as_echo "yes" >&6; }
17304  fi
17305  rmdir $DELETEDIR
17306
17307
17308
17309  # These tools might not be installed by default,
17310  # need hint on how to install them.
17311
17312
17313
17314  # Publish this variable in the help.
17315
17316
17317  if test "x$UNZIP" = x; then
17318    # The variable is not set by user, try to locate tool using the code snippet
17319    for ac_prog in unzip
17320do
17321  # Extract the first word of "$ac_prog", so it can be a program name with args.
17322set dummy $ac_prog; ac_word=$2
17323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17324$as_echo_n "checking for $ac_word... " >&6; }
17325if ${ac_cv_path_UNZIP+:} false; then :
17326  $as_echo_n "(cached) " >&6
17327else
17328  case $UNZIP in
17329  [\\/]* | ?:[\\/]*)
17330  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17331  ;;
17332  *)
17333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17334for as_dir in $PATH
17335do
17336  IFS=$as_save_IFS
17337  test -z "$as_dir" && as_dir=.
17338    for ac_exec_ext in '' $ac_executable_extensions; do
17339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17340    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17342    break 2
17343  fi
17344done
17345  done
17346IFS=$as_save_IFS
17347
17348  ;;
17349esac
17350fi
17351UNZIP=$ac_cv_path_UNZIP
17352if test -n "$UNZIP"; then
17353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17354$as_echo "$UNZIP" >&6; }
17355else
17356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17357$as_echo "no" >&6; }
17358fi
17359
17360
17361  test -n "$UNZIP" && break
17362done
17363
17364  else
17365    # The variable is set, but is it from the command line or the environment?
17366
17367    # Try to remove the string !UNZIP! from our list.
17368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17370      # If it failed, the variable was not from the command line. Ignore it,
17371      # but warn the user (except for BASH, which is always set by the calling BASH).
17372      if test "xUNZIP" != xBASH; then
17373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17374$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17375      fi
17376      # Try to locate tool using the code snippet
17377      for ac_prog in unzip
17378do
17379  # Extract the first word of "$ac_prog", so it can be a program name with args.
17380set dummy $ac_prog; ac_word=$2
17381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17382$as_echo_n "checking for $ac_word... " >&6; }
17383if ${ac_cv_path_UNZIP+:} false; then :
17384  $as_echo_n "(cached) " >&6
17385else
17386  case $UNZIP in
17387  [\\/]* | ?:[\\/]*)
17388  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17389  ;;
17390  *)
17391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17392for as_dir in $PATH
17393do
17394  IFS=$as_save_IFS
17395  test -z "$as_dir" && as_dir=.
17396    for ac_exec_ext in '' $ac_executable_extensions; do
17397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17398    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17400    break 2
17401  fi
17402done
17403  done
17404IFS=$as_save_IFS
17405
17406  ;;
17407esac
17408fi
17409UNZIP=$ac_cv_path_UNZIP
17410if test -n "$UNZIP"; then
17411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17412$as_echo "$UNZIP" >&6; }
17413else
17414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17415$as_echo "no" >&6; }
17416fi
17417
17418
17419  test -n "$UNZIP" && break
17420done
17421
17422    else
17423      # If it succeeded, then it was overridden by the user. We will use it
17424      # for the tool.
17425
17426      # First remove it from the list of overridden variables, so we can test
17427      # for unknown variables in the end.
17428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17429
17430      # Check if the provided tool contains a complete path.
17431      tool_specified="$UNZIP"
17432      tool_basename="${tool_specified##*/}"
17433      if test "x$tool_basename" = "x$tool_specified"; then
17434        # A command without a complete path is provided, search $PATH.
17435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17436$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17437        # Extract the first word of "$tool_basename", so it can be a program name with args.
17438set dummy $tool_basename; ac_word=$2
17439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17440$as_echo_n "checking for $ac_word... " >&6; }
17441if ${ac_cv_path_UNZIP+:} false; then :
17442  $as_echo_n "(cached) " >&6
17443else
17444  case $UNZIP in
17445  [\\/]* | ?:[\\/]*)
17446  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17447  ;;
17448  *)
17449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17450for as_dir in $PATH
17451do
17452  IFS=$as_save_IFS
17453  test -z "$as_dir" && as_dir=.
17454    for ac_exec_ext in '' $ac_executable_extensions; do
17455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17456    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17458    break 2
17459  fi
17460done
17461  done
17462IFS=$as_save_IFS
17463
17464  ;;
17465esac
17466fi
17467UNZIP=$ac_cv_path_UNZIP
17468if test -n "$UNZIP"; then
17469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17470$as_echo "$UNZIP" >&6; }
17471else
17472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17473$as_echo "no" >&6; }
17474fi
17475
17476
17477        if test "x$UNZIP" = x; then
17478          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17479        fi
17480      else
17481        # Otherwise we believe it is a complete path. Use it as it is.
17482        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17483$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17485$as_echo_n "checking for UNZIP... " >&6; }
17486        if test ! -x "$tool_specified"; then
17487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17488$as_echo "not found" >&6; }
17489          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17490        fi
17491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17492$as_echo "$tool_specified" >&6; }
17493      fi
17494    fi
17495  fi
17496
17497
17498
17499  if test "x$UNZIP" = x; then
17500    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17501  fi
17502
17503
17504
17505
17506
17507  # Publish this variable in the help.
17508
17509
17510  if test "x$ZIP" = x; then
17511    # The variable is not set by user, try to locate tool using the code snippet
17512    for ac_prog in zip
17513do
17514  # Extract the first word of "$ac_prog", so it can be a program name with args.
17515set dummy $ac_prog; ac_word=$2
17516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17517$as_echo_n "checking for $ac_word... " >&6; }
17518if ${ac_cv_path_ZIP+:} false; then :
17519  $as_echo_n "(cached) " >&6
17520else
17521  case $ZIP in
17522  [\\/]* | ?:[\\/]*)
17523  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17524  ;;
17525  *)
17526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17527for as_dir in $PATH
17528do
17529  IFS=$as_save_IFS
17530  test -z "$as_dir" && as_dir=.
17531    for ac_exec_ext in '' $ac_executable_extensions; do
17532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17533    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17535    break 2
17536  fi
17537done
17538  done
17539IFS=$as_save_IFS
17540
17541  ;;
17542esac
17543fi
17544ZIP=$ac_cv_path_ZIP
17545if test -n "$ZIP"; then
17546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17547$as_echo "$ZIP" >&6; }
17548else
17549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17550$as_echo "no" >&6; }
17551fi
17552
17553
17554  test -n "$ZIP" && break
17555done
17556
17557  else
17558    # The variable is set, but is it from the command line or the environment?
17559
17560    # Try to remove the string !ZIP! from our list.
17561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17563      # If it failed, the variable was not from the command line. Ignore it,
17564      # but warn the user (except for BASH, which is always set by the calling BASH).
17565      if test "xZIP" != xBASH; then
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17567$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17568      fi
17569      # Try to locate tool using the code snippet
17570      for ac_prog in zip
17571do
17572  # Extract the first word of "$ac_prog", so it can be a program name with args.
17573set dummy $ac_prog; ac_word=$2
17574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17575$as_echo_n "checking for $ac_word... " >&6; }
17576if ${ac_cv_path_ZIP+:} false; then :
17577  $as_echo_n "(cached) " >&6
17578else
17579  case $ZIP in
17580  [\\/]* | ?:[\\/]*)
17581  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17582  ;;
17583  *)
17584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17585for as_dir in $PATH
17586do
17587  IFS=$as_save_IFS
17588  test -z "$as_dir" && as_dir=.
17589    for ac_exec_ext in '' $ac_executable_extensions; do
17590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17591    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17593    break 2
17594  fi
17595done
17596  done
17597IFS=$as_save_IFS
17598
17599  ;;
17600esac
17601fi
17602ZIP=$ac_cv_path_ZIP
17603if test -n "$ZIP"; then
17604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17605$as_echo "$ZIP" >&6; }
17606else
17607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17608$as_echo "no" >&6; }
17609fi
17610
17611
17612  test -n "$ZIP" && break
17613done
17614
17615    else
17616      # If it succeeded, then it was overridden by the user. We will use it
17617      # for the tool.
17618
17619      # First remove it from the list of overridden variables, so we can test
17620      # for unknown variables in the end.
17621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17622
17623      # Check if the provided tool contains a complete path.
17624      tool_specified="$ZIP"
17625      tool_basename="${tool_specified##*/}"
17626      if test "x$tool_basename" = "x$tool_specified"; then
17627        # A command without a complete path is provided, search $PATH.
17628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17629$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17630        # Extract the first word of "$tool_basename", so it can be a program name with args.
17631set dummy $tool_basename; ac_word=$2
17632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17633$as_echo_n "checking for $ac_word... " >&6; }
17634if ${ac_cv_path_ZIP+:} false; then :
17635  $as_echo_n "(cached) " >&6
17636else
17637  case $ZIP in
17638  [\\/]* | ?:[\\/]*)
17639  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17640  ;;
17641  *)
17642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17643for as_dir in $PATH
17644do
17645  IFS=$as_save_IFS
17646  test -z "$as_dir" && as_dir=.
17647    for ac_exec_ext in '' $ac_executable_extensions; do
17648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17649    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17651    break 2
17652  fi
17653done
17654  done
17655IFS=$as_save_IFS
17656
17657  ;;
17658esac
17659fi
17660ZIP=$ac_cv_path_ZIP
17661if test -n "$ZIP"; then
17662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17663$as_echo "$ZIP" >&6; }
17664else
17665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17666$as_echo "no" >&6; }
17667fi
17668
17669
17670        if test "x$ZIP" = x; then
17671          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17672        fi
17673      else
17674        # Otherwise we believe it is a complete path. Use it as it is.
17675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17676$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17678$as_echo_n "checking for ZIP... " >&6; }
17679        if test ! -x "$tool_specified"; then
17680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17681$as_echo "not found" >&6; }
17682          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17683        fi
17684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17685$as_echo "$tool_specified" >&6; }
17686      fi
17687    fi
17688  fi
17689
17690
17691
17692  if test "x$ZIP" = x; then
17693    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17694  fi
17695
17696
17697
17698  # Non-required basic tools
17699
17700
17701
17702  # Publish this variable in the help.
17703
17704
17705  if test "x$LDD" = x; then
17706    # The variable is not set by user, try to locate tool using the code snippet
17707    for ac_prog in ldd
17708do
17709  # Extract the first word of "$ac_prog", so it can be a program name with args.
17710set dummy $ac_prog; ac_word=$2
17711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17712$as_echo_n "checking for $ac_word... " >&6; }
17713if ${ac_cv_path_LDD+:} false; then :
17714  $as_echo_n "(cached) " >&6
17715else
17716  case $LDD in
17717  [\\/]* | ?:[\\/]*)
17718  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17719  ;;
17720  *)
17721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17722for as_dir in $PATH
17723do
17724  IFS=$as_save_IFS
17725  test -z "$as_dir" && as_dir=.
17726    for ac_exec_ext in '' $ac_executable_extensions; do
17727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17728    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17730    break 2
17731  fi
17732done
17733  done
17734IFS=$as_save_IFS
17735
17736  ;;
17737esac
17738fi
17739LDD=$ac_cv_path_LDD
17740if test -n "$LDD"; then
17741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17742$as_echo "$LDD" >&6; }
17743else
17744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17745$as_echo "no" >&6; }
17746fi
17747
17748
17749  test -n "$LDD" && break
17750done
17751
17752  else
17753    # The variable is set, but is it from the command line or the environment?
17754
17755    # Try to remove the string !LDD! from our list.
17756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17758      # If it failed, the variable was not from the command line. Ignore it,
17759      # but warn the user (except for BASH, which is always set by the calling BASH).
17760      if test "xLDD" != xBASH; then
17761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17762$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17763      fi
17764      # Try to locate tool using the code snippet
17765      for ac_prog in ldd
17766do
17767  # Extract the first word of "$ac_prog", so it can be a program name with args.
17768set dummy $ac_prog; ac_word=$2
17769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17770$as_echo_n "checking for $ac_word... " >&6; }
17771if ${ac_cv_path_LDD+:} false; then :
17772  $as_echo_n "(cached) " >&6
17773else
17774  case $LDD in
17775  [\\/]* | ?:[\\/]*)
17776  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17777  ;;
17778  *)
17779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17780for as_dir in $PATH
17781do
17782  IFS=$as_save_IFS
17783  test -z "$as_dir" && as_dir=.
17784    for ac_exec_ext in '' $ac_executable_extensions; do
17785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17786    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17788    break 2
17789  fi
17790done
17791  done
17792IFS=$as_save_IFS
17793
17794  ;;
17795esac
17796fi
17797LDD=$ac_cv_path_LDD
17798if test -n "$LDD"; then
17799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17800$as_echo "$LDD" >&6; }
17801else
17802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17803$as_echo "no" >&6; }
17804fi
17805
17806
17807  test -n "$LDD" && break
17808done
17809
17810    else
17811      # If it succeeded, then it was overridden by the user. We will use it
17812      # for the tool.
17813
17814      # First remove it from the list of overridden variables, so we can test
17815      # for unknown variables in the end.
17816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17817
17818      # Check if the provided tool contains a complete path.
17819      tool_specified="$LDD"
17820      tool_basename="${tool_specified##*/}"
17821      if test "x$tool_basename" = "x$tool_specified"; then
17822        # A command without a complete path is provided, search $PATH.
17823        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17824$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17825        # Extract the first word of "$tool_basename", so it can be a program name with args.
17826set dummy $tool_basename; ac_word=$2
17827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17828$as_echo_n "checking for $ac_word... " >&6; }
17829if ${ac_cv_path_LDD+:} false; then :
17830  $as_echo_n "(cached) " >&6
17831else
17832  case $LDD in
17833  [\\/]* | ?:[\\/]*)
17834  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17835  ;;
17836  *)
17837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17838for as_dir in $PATH
17839do
17840  IFS=$as_save_IFS
17841  test -z "$as_dir" && as_dir=.
17842    for ac_exec_ext in '' $ac_executable_extensions; do
17843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17844    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17846    break 2
17847  fi
17848done
17849  done
17850IFS=$as_save_IFS
17851
17852  ;;
17853esac
17854fi
17855LDD=$ac_cv_path_LDD
17856if test -n "$LDD"; then
17857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17858$as_echo "$LDD" >&6; }
17859else
17860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17861$as_echo "no" >&6; }
17862fi
17863
17864
17865        if test "x$LDD" = x; then
17866          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17867        fi
17868      else
17869        # Otherwise we believe it is a complete path. Use it as it is.
17870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17871$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17873$as_echo_n "checking for LDD... " >&6; }
17874        if test ! -x "$tool_specified"; then
17875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17876$as_echo "not found" >&6; }
17877          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17878        fi
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17880$as_echo "$tool_specified" >&6; }
17881      fi
17882    fi
17883  fi
17884
17885
17886  if test "x$LDD" = "x"; then
17887    # List shared lib dependencies is used for
17888    # debug output and checking for forbidden dependencies.
17889    # We can build without it.
17890    LDD="true"
17891  fi
17892
17893
17894  # Publish this variable in the help.
17895
17896
17897  if test "x$OTOOL" = x; then
17898    # The variable is not set by user, try to locate tool using the code snippet
17899    for ac_prog in otool
17900do
17901  # Extract the first word of "$ac_prog", so it can be a program name with args.
17902set dummy $ac_prog; ac_word=$2
17903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17904$as_echo_n "checking for $ac_word... " >&6; }
17905if ${ac_cv_path_OTOOL+:} false; then :
17906  $as_echo_n "(cached) " >&6
17907else
17908  case $OTOOL in
17909  [\\/]* | ?:[\\/]*)
17910  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17911  ;;
17912  *)
17913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17914for as_dir in $PATH
17915do
17916  IFS=$as_save_IFS
17917  test -z "$as_dir" && as_dir=.
17918    for ac_exec_ext in '' $ac_executable_extensions; do
17919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17920    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17922    break 2
17923  fi
17924done
17925  done
17926IFS=$as_save_IFS
17927
17928  ;;
17929esac
17930fi
17931OTOOL=$ac_cv_path_OTOOL
17932if test -n "$OTOOL"; then
17933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17934$as_echo "$OTOOL" >&6; }
17935else
17936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17937$as_echo "no" >&6; }
17938fi
17939
17940
17941  test -n "$OTOOL" && break
17942done
17943
17944  else
17945    # The variable is set, but is it from the command line or the environment?
17946
17947    # Try to remove the string !OTOOL! from our list.
17948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17950      # If it failed, the variable was not from the command line. Ignore it,
17951      # but warn the user (except for BASH, which is always set by the calling BASH).
17952      if test "xOTOOL" != xBASH; then
17953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17954$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17955      fi
17956      # Try to locate tool using the code snippet
17957      for ac_prog in otool
17958do
17959  # Extract the first word of "$ac_prog", so it can be a program name with args.
17960set dummy $ac_prog; ac_word=$2
17961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17962$as_echo_n "checking for $ac_word... " >&6; }
17963if ${ac_cv_path_OTOOL+:} false; then :
17964  $as_echo_n "(cached) " >&6
17965else
17966  case $OTOOL in
17967  [\\/]* | ?:[\\/]*)
17968  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17969  ;;
17970  *)
17971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17972for as_dir in $PATH
17973do
17974  IFS=$as_save_IFS
17975  test -z "$as_dir" && as_dir=.
17976    for ac_exec_ext in '' $ac_executable_extensions; do
17977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17978    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17980    break 2
17981  fi
17982done
17983  done
17984IFS=$as_save_IFS
17985
17986  ;;
17987esac
17988fi
17989OTOOL=$ac_cv_path_OTOOL
17990if test -n "$OTOOL"; then
17991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17992$as_echo "$OTOOL" >&6; }
17993else
17994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17995$as_echo "no" >&6; }
17996fi
17997
17998
17999  test -n "$OTOOL" && break
18000done
18001
18002    else
18003      # If it succeeded, then it was overridden by the user. We will use it
18004      # for the tool.
18005
18006      # First remove it from the list of overridden variables, so we can test
18007      # for unknown variables in the end.
18008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18009
18010      # Check if the provided tool contains a complete path.
18011      tool_specified="$OTOOL"
18012      tool_basename="${tool_specified##*/}"
18013      if test "x$tool_basename" = "x$tool_specified"; then
18014        # A command without a complete path is provided, search $PATH.
18015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18016$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18017        # Extract the first word of "$tool_basename", so it can be a program name with args.
18018set dummy $tool_basename; ac_word=$2
18019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18020$as_echo_n "checking for $ac_word... " >&6; }
18021if ${ac_cv_path_OTOOL+:} false; then :
18022  $as_echo_n "(cached) " >&6
18023else
18024  case $OTOOL in
18025  [\\/]* | ?:[\\/]*)
18026  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18027  ;;
18028  *)
18029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18030for as_dir in $PATH
18031do
18032  IFS=$as_save_IFS
18033  test -z "$as_dir" && as_dir=.
18034    for ac_exec_ext in '' $ac_executable_extensions; do
18035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18036    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18038    break 2
18039  fi
18040done
18041  done
18042IFS=$as_save_IFS
18043
18044  ;;
18045esac
18046fi
18047OTOOL=$ac_cv_path_OTOOL
18048if test -n "$OTOOL"; then
18049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18050$as_echo "$OTOOL" >&6; }
18051else
18052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18053$as_echo "no" >&6; }
18054fi
18055
18056
18057        if test "x$OTOOL" = x; then
18058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18059        fi
18060      else
18061        # Otherwise we believe it is a complete path. Use it as it is.
18062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18063$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18065$as_echo_n "checking for OTOOL... " >&6; }
18066        if test ! -x "$tool_specified"; then
18067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18068$as_echo "not found" >&6; }
18069          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18070        fi
18071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18072$as_echo "$tool_specified" >&6; }
18073      fi
18074    fi
18075  fi
18076
18077
18078  if test "x$OTOOL" = "x"; then
18079    OTOOL="true"
18080  fi
18081
18082
18083  # Publish this variable in the help.
18084
18085
18086  if test "x$READELF" = x; then
18087    # The variable is not set by user, try to locate tool using the code snippet
18088    for ac_prog in greadelf readelf
18089do
18090  # Extract the first word of "$ac_prog", so it can be a program name with args.
18091set dummy $ac_prog; ac_word=$2
18092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18093$as_echo_n "checking for $ac_word... " >&6; }
18094if ${ac_cv_path_READELF+:} false; then :
18095  $as_echo_n "(cached) " >&6
18096else
18097  case $READELF in
18098  [\\/]* | ?:[\\/]*)
18099  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18100  ;;
18101  *)
18102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18103for as_dir in $PATH
18104do
18105  IFS=$as_save_IFS
18106  test -z "$as_dir" && as_dir=.
18107    for ac_exec_ext in '' $ac_executable_extensions; do
18108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18109    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18111    break 2
18112  fi
18113done
18114  done
18115IFS=$as_save_IFS
18116
18117  ;;
18118esac
18119fi
18120READELF=$ac_cv_path_READELF
18121if test -n "$READELF"; then
18122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18123$as_echo "$READELF" >&6; }
18124else
18125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18126$as_echo "no" >&6; }
18127fi
18128
18129
18130  test -n "$READELF" && break
18131done
18132
18133  else
18134    # The variable is set, but is it from the command line or the environment?
18135
18136    # Try to remove the string !READELF! from our list.
18137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18139      # If it failed, the variable was not from the command line. Ignore it,
18140      # but warn the user (except for BASH, which is always set by the calling BASH).
18141      if test "xREADELF" != xBASH; then
18142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18143$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18144      fi
18145      # Try to locate tool using the code snippet
18146      for ac_prog in greadelf readelf
18147do
18148  # Extract the first word of "$ac_prog", so it can be a program name with args.
18149set dummy $ac_prog; ac_word=$2
18150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18151$as_echo_n "checking for $ac_word... " >&6; }
18152if ${ac_cv_path_READELF+:} false; then :
18153  $as_echo_n "(cached) " >&6
18154else
18155  case $READELF in
18156  [\\/]* | ?:[\\/]*)
18157  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18158  ;;
18159  *)
18160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18161for as_dir in $PATH
18162do
18163  IFS=$as_save_IFS
18164  test -z "$as_dir" && as_dir=.
18165    for ac_exec_ext in '' $ac_executable_extensions; do
18166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18167    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18169    break 2
18170  fi
18171done
18172  done
18173IFS=$as_save_IFS
18174
18175  ;;
18176esac
18177fi
18178READELF=$ac_cv_path_READELF
18179if test -n "$READELF"; then
18180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18181$as_echo "$READELF" >&6; }
18182else
18183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18184$as_echo "no" >&6; }
18185fi
18186
18187
18188  test -n "$READELF" && break
18189done
18190
18191    else
18192      # If it succeeded, then it was overridden by the user. We will use it
18193      # for the tool.
18194
18195      # First remove it from the list of overridden variables, so we can test
18196      # for unknown variables in the end.
18197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18198
18199      # Check if the provided tool contains a complete path.
18200      tool_specified="$READELF"
18201      tool_basename="${tool_specified##*/}"
18202      if test "x$tool_basename" = "x$tool_specified"; then
18203        # A command without a complete path is provided, search $PATH.
18204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18205$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18206        # Extract the first word of "$tool_basename", so it can be a program name with args.
18207set dummy $tool_basename; ac_word=$2
18208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18209$as_echo_n "checking for $ac_word... " >&6; }
18210if ${ac_cv_path_READELF+:} false; then :
18211  $as_echo_n "(cached) " >&6
18212else
18213  case $READELF in
18214  [\\/]* | ?:[\\/]*)
18215  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18216  ;;
18217  *)
18218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18219for as_dir in $PATH
18220do
18221  IFS=$as_save_IFS
18222  test -z "$as_dir" && as_dir=.
18223    for ac_exec_ext in '' $ac_executable_extensions; do
18224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18225    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18227    break 2
18228  fi
18229done
18230  done
18231IFS=$as_save_IFS
18232
18233  ;;
18234esac
18235fi
18236READELF=$ac_cv_path_READELF
18237if test -n "$READELF"; then
18238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18239$as_echo "$READELF" >&6; }
18240else
18241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18242$as_echo "no" >&6; }
18243fi
18244
18245
18246        if test "x$READELF" = x; then
18247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18248        fi
18249      else
18250        # Otherwise we believe it is a complete path. Use it as it is.
18251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18252$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18254$as_echo_n "checking for READELF... " >&6; }
18255        if test ! -x "$tool_specified"; then
18256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18257$as_echo "not found" >&6; }
18258          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18259        fi
18260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18261$as_echo "$tool_specified" >&6; }
18262      fi
18263    fi
18264  fi
18265
18266
18267
18268
18269  # Publish this variable in the help.
18270
18271
18272  if test "x$HG" = x; then
18273    # The variable is not set by user, try to locate tool using the code snippet
18274    for ac_prog in hg
18275do
18276  # Extract the first word of "$ac_prog", so it can be a program name with args.
18277set dummy $ac_prog; ac_word=$2
18278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18279$as_echo_n "checking for $ac_word... " >&6; }
18280if ${ac_cv_path_HG+:} false; then :
18281  $as_echo_n "(cached) " >&6
18282else
18283  case $HG in
18284  [\\/]* | ?:[\\/]*)
18285  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18286  ;;
18287  *)
18288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18289for as_dir in $PATH
18290do
18291  IFS=$as_save_IFS
18292  test -z "$as_dir" && as_dir=.
18293    for ac_exec_ext in '' $ac_executable_extensions; do
18294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18295    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18297    break 2
18298  fi
18299done
18300  done
18301IFS=$as_save_IFS
18302
18303  ;;
18304esac
18305fi
18306HG=$ac_cv_path_HG
18307if test -n "$HG"; then
18308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18309$as_echo "$HG" >&6; }
18310else
18311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18312$as_echo "no" >&6; }
18313fi
18314
18315
18316  test -n "$HG" && break
18317done
18318
18319  else
18320    # The variable is set, but is it from the command line or the environment?
18321
18322    # Try to remove the string !HG! from our list.
18323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18325      # If it failed, the variable was not from the command line. Ignore it,
18326      # but warn the user (except for BASH, which is always set by the calling BASH).
18327      if test "xHG" != xBASH; then
18328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18329$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18330      fi
18331      # Try to locate tool using the code snippet
18332      for ac_prog in hg
18333do
18334  # Extract the first word of "$ac_prog", so it can be a program name with args.
18335set dummy $ac_prog; ac_word=$2
18336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18337$as_echo_n "checking for $ac_word... " >&6; }
18338if ${ac_cv_path_HG+:} false; then :
18339  $as_echo_n "(cached) " >&6
18340else
18341  case $HG in
18342  [\\/]* | ?:[\\/]*)
18343  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18344  ;;
18345  *)
18346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18347for as_dir in $PATH
18348do
18349  IFS=$as_save_IFS
18350  test -z "$as_dir" && as_dir=.
18351    for ac_exec_ext in '' $ac_executable_extensions; do
18352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18353    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18355    break 2
18356  fi
18357done
18358  done
18359IFS=$as_save_IFS
18360
18361  ;;
18362esac
18363fi
18364HG=$ac_cv_path_HG
18365if test -n "$HG"; then
18366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18367$as_echo "$HG" >&6; }
18368else
18369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18370$as_echo "no" >&6; }
18371fi
18372
18373
18374  test -n "$HG" && break
18375done
18376
18377    else
18378      # If it succeeded, then it was overridden by the user. We will use it
18379      # for the tool.
18380
18381      # First remove it from the list of overridden variables, so we can test
18382      # for unknown variables in the end.
18383      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18384
18385      # Check if the provided tool contains a complete path.
18386      tool_specified="$HG"
18387      tool_basename="${tool_specified##*/}"
18388      if test "x$tool_basename" = "x$tool_specified"; then
18389        # A command without a complete path is provided, search $PATH.
18390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18391$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18392        # Extract the first word of "$tool_basename", so it can be a program name with args.
18393set dummy $tool_basename; ac_word=$2
18394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18395$as_echo_n "checking for $ac_word... " >&6; }
18396if ${ac_cv_path_HG+:} false; then :
18397  $as_echo_n "(cached) " >&6
18398else
18399  case $HG in
18400  [\\/]* | ?:[\\/]*)
18401  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18402  ;;
18403  *)
18404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18405for as_dir in $PATH
18406do
18407  IFS=$as_save_IFS
18408  test -z "$as_dir" && as_dir=.
18409    for ac_exec_ext in '' $ac_executable_extensions; do
18410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18411    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18413    break 2
18414  fi
18415done
18416  done
18417IFS=$as_save_IFS
18418
18419  ;;
18420esac
18421fi
18422HG=$ac_cv_path_HG
18423if test -n "$HG"; then
18424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18425$as_echo "$HG" >&6; }
18426else
18427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18428$as_echo "no" >&6; }
18429fi
18430
18431
18432        if test "x$HG" = x; then
18433          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18434        fi
18435      else
18436        # Otherwise we believe it is a complete path. Use it as it is.
18437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18438$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18440$as_echo_n "checking for HG... " >&6; }
18441        if test ! -x "$tool_specified"; then
18442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18443$as_echo "not found" >&6; }
18444          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18445        fi
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18447$as_echo "$tool_specified" >&6; }
18448      fi
18449    fi
18450  fi
18451
18452
18453
18454
18455  # Publish this variable in the help.
18456
18457
18458  if test "x$STAT" = x; then
18459    # The variable is not set by user, try to locate tool using the code snippet
18460    for ac_prog in stat
18461do
18462  # Extract the first word of "$ac_prog", so it can be a program name with args.
18463set dummy $ac_prog; ac_word=$2
18464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18465$as_echo_n "checking for $ac_word... " >&6; }
18466if ${ac_cv_path_STAT+:} false; then :
18467  $as_echo_n "(cached) " >&6
18468else
18469  case $STAT in
18470  [\\/]* | ?:[\\/]*)
18471  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18472  ;;
18473  *)
18474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18475for as_dir in $PATH
18476do
18477  IFS=$as_save_IFS
18478  test -z "$as_dir" && as_dir=.
18479    for ac_exec_ext in '' $ac_executable_extensions; do
18480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18481    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18483    break 2
18484  fi
18485done
18486  done
18487IFS=$as_save_IFS
18488
18489  ;;
18490esac
18491fi
18492STAT=$ac_cv_path_STAT
18493if test -n "$STAT"; then
18494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18495$as_echo "$STAT" >&6; }
18496else
18497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18498$as_echo "no" >&6; }
18499fi
18500
18501
18502  test -n "$STAT" && break
18503done
18504
18505  else
18506    # The variable is set, but is it from the command line or the environment?
18507
18508    # Try to remove the string !STAT! from our list.
18509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18511      # If it failed, the variable was not from the command line. Ignore it,
18512      # but warn the user (except for BASH, which is always set by the calling BASH).
18513      if test "xSTAT" != xBASH; then
18514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18515$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18516      fi
18517      # Try to locate tool using the code snippet
18518      for ac_prog in stat
18519do
18520  # Extract the first word of "$ac_prog", so it can be a program name with args.
18521set dummy $ac_prog; ac_word=$2
18522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18523$as_echo_n "checking for $ac_word... " >&6; }
18524if ${ac_cv_path_STAT+:} false; then :
18525  $as_echo_n "(cached) " >&6
18526else
18527  case $STAT in
18528  [\\/]* | ?:[\\/]*)
18529  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18530  ;;
18531  *)
18532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18533for as_dir in $PATH
18534do
18535  IFS=$as_save_IFS
18536  test -z "$as_dir" && as_dir=.
18537    for ac_exec_ext in '' $ac_executable_extensions; do
18538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18539    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18541    break 2
18542  fi
18543done
18544  done
18545IFS=$as_save_IFS
18546
18547  ;;
18548esac
18549fi
18550STAT=$ac_cv_path_STAT
18551if test -n "$STAT"; then
18552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18553$as_echo "$STAT" >&6; }
18554else
18555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18556$as_echo "no" >&6; }
18557fi
18558
18559
18560  test -n "$STAT" && break
18561done
18562
18563    else
18564      # If it succeeded, then it was overridden by the user. We will use it
18565      # for the tool.
18566
18567      # First remove it from the list of overridden variables, so we can test
18568      # for unknown variables in the end.
18569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18570
18571      # Check if the provided tool contains a complete path.
18572      tool_specified="$STAT"
18573      tool_basename="${tool_specified##*/}"
18574      if test "x$tool_basename" = "x$tool_specified"; then
18575        # A command without a complete path is provided, search $PATH.
18576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18577$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18578        # Extract the first word of "$tool_basename", so it can be a program name with args.
18579set dummy $tool_basename; ac_word=$2
18580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18581$as_echo_n "checking for $ac_word... " >&6; }
18582if ${ac_cv_path_STAT+:} false; then :
18583  $as_echo_n "(cached) " >&6
18584else
18585  case $STAT in
18586  [\\/]* | ?:[\\/]*)
18587  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18588  ;;
18589  *)
18590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18591for as_dir in $PATH
18592do
18593  IFS=$as_save_IFS
18594  test -z "$as_dir" && as_dir=.
18595    for ac_exec_ext in '' $ac_executable_extensions; do
18596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18597    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18599    break 2
18600  fi
18601done
18602  done
18603IFS=$as_save_IFS
18604
18605  ;;
18606esac
18607fi
18608STAT=$ac_cv_path_STAT
18609if test -n "$STAT"; then
18610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18611$as_echo "$STAT" >&6; }
18612else
18613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18614$as_echo "no" >&6; }
18615fi
18616
18617
18618        if test "x$STAT" = x; then
18619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18620        fi
18621      else
18622        # Otherwise we believe it is a complete path. Use it as it is.
18623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18624$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18626$as_echo_n "checking for STAT... " >&6; }
18627        if test ! -x "$tool_specified"; then
18628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18629$as_echo "not found" >&6; }
18630          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18631        fi
18632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18633$as_echo "$tool_specified" >&6; }
18634      fi
18635    fi
18636  fi
18637
18638
18639
18640
18641  # Publish this variable in the help.
18642
18643
18644  if test "x$TIME" = x; then
18645    # The variable is not set by user, try to locate tool using the code snippet
18646    for ac_prog in time
18647do
18648  # Extract the first word of "$ac_prog", so it can be a program name with args.
18649set dummy $ac_prog; ac_word=$2
18650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18651$as_echo_n "checking for $ac_word... " >&6; }
18652if ${ac_cv_path_TIME+:} false; then :
18653  $as_echo_n "(cached) " >&6
18654else
18655  case $TIME in
18656  [\\/]* | ?:[\\/]*)
18657  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18658  ;;
18659  *)
18660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18661for as_dir in $PATH
18662do
18663  IFS=$as_save_IFS
18664  test -z "$as_dir" && as_dir=.
18665    for ac_exec_ext in '' $ac_executable_extensions; do
18666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18667    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18669    break 2
18670  fi
18671done
18672  done
18673IFS=$as_save_IFS
18674
18675  ;;
18676esac
18677fi
18678TIME=$ac_cv_path_TIME
18679if test -n "$TIME"; then
18680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18681$as_echo "$TIME" >&6; }
18682else
18683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18684$as_echo "no" >&6; }
18685fi
18686
18687
18688  test -n "$TIME" && break
18689done
18690
18691  else
18692    # The variable is set, but is it from the command line or the environment?
18693
18694    # Try to remove the string !TIME! from our list.
18695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18697      # If it failed, the variable was not from the command line. Ignore it,
18698      # but warn the user (except for BASH, which is always set by the calling BASH).
18699      if test "xTIME" != xBASH; then
18700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18701$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18702      fi
18703      # Try to locate tool using the code snippet
18704      for ac_prog in time
18705do
18706  # Extract the first word of "$ac_prog", so it can be a program name with args.
18707set dummy $ac_prog; ac_word=$2
18708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18709$as_echo_n "checking for $ac_word... " >&6; }
18710if ${ac_cv_path_TIME+:} false; then :
18711  $as_echo_n "(cached) " >&6
18712else
18713  case $TIME in
18714  [\\/]* | ?:[\\/]*)
18715  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18716  ;;
18717  *)
18718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18719for as_dir in $PATH
18720do
18721  IFS=$as_save_IFS
18722  test -z "$as_dir" && as_dir=.
18723    for ac_exec_ext in '' $ac_executable_extensions; do
18724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18725    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18727    break 2
18728  fi
18729done
18730  done
18731IFS=$as_save_IFS
18732
18733  ;;
18734esac
18735fi
18736TIME=$ac_cv_path_TIME
18737if test -n "$TIME"; then
18738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18739$as_echo "$TIME" >&6; }
18740else
18741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18742$as_echo "no" >&6; }
18743fi
18744
18745
18746  test -n "$TIME" && break
18747done
18748
18749    else
18750      # If it succeeded, then it was overridden by the user. We will use it
18751      # for the tool.
18752
18753      # First remove it from the list of overridden variables, so we can test
18754      # for unknown variables in the end.
18755      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18756
18757      # Check if the provided tool contains a complete path.
18758      tool_specified="$TIME"
18759      tool_basename="${tool_specified##*/}"
18760      if test "x$tool_basename" = "x$tool_specified"; then
18761        # A command without a complete path is provided, search $PATH.
18762        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18763$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18764        # Extract the first word of "$tool_basename", so it can be a program name with args.
18765set dummy $tool_basename; ac_word=$2
18766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18767$as_echo_n "checking for $ac_word... " >&6; }
18768if ${ac_cv_path_TIME+:} false; then :
18769  $as_echo_n "(cached) " >&6
18770else
18771  case $TIME in
18772  [\\/]* | ?:[\\/]*)
18773  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18774  ;;
18775  *)
18776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18777for as_dir in $PATH
18778do
18779  IFS=$as_save_IFS
18780  test -z "$as_dir" && as_dir=.
18781    for ac_exec_ext in '' $ac_executable_extensions; do
18782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18783    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18785    break 2
18786  fi
18787done
18788  done
18789IFS=$as_save_IFS
18790
18791  ;;
18792esac
18793fi
18794TIME=$ac_cv_path_TIME
18795if test -n "$TIME"; then
18796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18797$as_echo "$TIME" >&6; }
18798else
18799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18800$as_echo "no" >&6; }
18801fi
18802
18803
18804        if test "x$TIME" = x; then
18805          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18806        fi
18807      else
18808        # Otherwise we believe it is a complete path. Use it as it is.
18809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18810$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18812$as_echo_n "checking for TIME... " >&6; }
18813        if test ! -x "$tool_specified"; then
18814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18815$as_echo "not found" >&6; }
18816          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18817        fi
18818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18819$as_echo "$tool_specified" >&6; }
18820      fi
18821    fi
18822  fi
18823
18824
18825  # Check if it's GNU time
18826  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18827  if test "x$IS_GNU_TIME" != x; then
18828    IS_GNU_TIME=yes
18829  else
18830    IS_GNU_TIME=no
18831  fi
18832
18833
18834  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18835
18836
18837
18838  # Publish this variable in the help.
18839
18840
18841  if test "x$COMM" = x; then
18842    # The variable is not set by user, try to locate tool using the code snippet
18843    for ac_prog in comm
18844do
18845  # Extract the first word of "$ac_prog", so it can be a program name with args.
18846set dummy $ac_prog; ac_word=$2
18847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18848$as_echo_n "checking for $ac_word... " >&6; }
18849if ${ac_cv_path_COMM+:} false; then :
18850  $as_echo_n "(cached) " >&6
18851else
18852  case $COMM in
18853  [\\/]* | ?:[\\/]*)
18854  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18855  ;;
18856  *)
18857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18858for as_dir in $PATH
18859do
18860  IFS=$as_save_IFS
18861  test -z "$as_dir" && as_dir=.
18862    for ac_exec_ext in '' $ac_executable_extensions; do
18863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18864    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18866    break 2
18867  fi
18868done
18869  done
18870IFS=$as_save_IFS
18871
18872  ;;
18873esac
18874fi
18875COMM=$ac_cv_path_COMM
18876if test -n "$COMM"; then
18877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18878$as_echo "$COMM" >&6; }
18879else
18880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18881$as_echo "no" >&6; }
18882fi
18883
18884
18885  test -n "$COMM" && break
18886done
18887
18888  else
18889    # The variable is set, but is it from the command line or the environment?
18890
18891    # Try to remove the string !COMM! from our list.
18892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18894      # If it failed, the variable was not from the command line. Ignore it,
18895      # but warn the user (except for BASH, which is always set by the calling BASH).
18896      if test "xCOMM" != xBASH; then
18897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18898$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18899      fi
18900      # Try to locate tool using the code snippet
18901      for ac_prog in comm
18902do
18903  # Extract the first word of "$ac_prog", so it can be a program name with args.
18904set dummy $ac_prog; ac_word=$2
18905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18906$as_echo_n "checking for $ac_word... " >&6; }
18907if ${ac_cv_path_COMM+:} false; then :
18908  $as_echo_n "(cached) " >&6
18909else
18910  case $COMM in
18911  [\\/]* | ?:[\\/]*)
18912  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18913  ;;
18914  *)
18915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18916for as_dir in $PATH
18917do
18918  IFS=$as_save_IFS
18919  test -z "$as_dir" && as_dir=.
18920    for ac_exec_ext in '' $ac_executable_extensions; do
18921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18922    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18924    break 2
18925  fi
18926done
18927  done
18928IFS=$as_save_IFS
18929
18930  ;;
18931esac
18932fi
18933COMM=$ac_cv_path_COMM
18934if test -n "$COMM"; then
18935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18936$as_echo "$COMM" >&6; }
18937else
18938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18939$as_echo "no" >&6; }
18940fi
18941
18942
18943  test -n "$COMM" && break
18944done
18945
18946    else
18947      # If it succeeded, then it was overridden by the user. We will use it
18948      # for the tool.
18949
18950      # First remove it from the list of overridden variables, so we can test
18951      # for unknown variables in the end.
18952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18953
18954      # Check if the provided tool contains a complete path.
18955      tool_specified="$COMM"
18956      tool_basename="${tool_specified##*/}"
18957      if test "x$tool_basename" = "x$tool_specified"; then
18958        # A command without a complete path is provided, search $PATH.
18959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18960$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18961        # Extract the first word of "$tool_basename", so it can be a program name with args.
18962set dummy $tool_basename; ac_word=$2
18963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18964$as_echo_n "checking for $ac_word... " >&6; }
18965if ${ac_cv_path_COMM+:} false; then :
18966  $as_echo_n "(cached) " >&6
18967else
18968  case $COMM in
18969  [\\/]* | ?:[\\/]*)
18970  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18971  ;;
18972  *)
18973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18974for as_dir in $PATH
18975do
18976  IFS=$as_save_IFS
18977  test -z "$as_dir" && as_dir=.
18978    for ac_exec_ext in '' $ac_executable_extensions; do
18979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18980    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18982    break 2
18983  fi
18984done
18985  done
18986IFS=$as_save_IFS
18987
18988  ;;
18989esac
18990fi
18991COMM=$ac_cv_path_COMM
18992if test -n "$COMM"; then
18993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18994$as_echo "$COMM" >&6; }
18995else
18996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18997$as_echo "no" >&6; }
18998fi
18999
19000
19001        if test "x$COMM" = x; then
19002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19003        fi
19004      else
19005        # Otherwise we believe it is a complete path. Use it as it is.
19006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19007$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19009$as_echo_n "checking for COMM... " >&6; }
19010        if test ! -x "$tool_specified"; then
19011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19012$as_echo "not found" >&6; }
19013          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19014        fi
19015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19016$as_echo "$tool_specified" >&6; }
19017      fi
19018    fi
19019  fi
19020
19021
19022
19023  if test "x$COMM" = x; then
19024    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19025  fi
19026
19027
19028  fi
19029
19030  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19031
19032
19033
19034  # Publish this variable in the help.
19035
19036
19037  if test "x$DSYMUTIL" = x; then
19038    # The variable is not set by user, try to locate tool using the code snippet
19039    for ac_prog in dsymutil
19040do
19041  # Extract the first word of "$ac_prog", so it can be a program name with args.
19042set dummy $ac_prog; ac_word=$2
19043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19044$as_echo_n "checking for $ac_word... " >&6; }
19045if ${ac_cv_path_DSYMUTIL+:} false; then :
19046  $as_echo_n "(cached) " >&6
19047else
19048  case $DSYMUTIL in
19049  [\\/]* | ?:[\\/]*)
19050  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19051  ;;
19052  *)
19053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19054for as_dir in $PATH
19055do
19056  IFS=$as_save_IFS
19057  test -z "$as_dir" && as_dir=.
19058    for ac_exec_ext in '' $ac_executable_extensions; do
19059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19060    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19062    break 2
19063  fi
19064done
19065  done
19066IFS=$as_save_IFS
19067
19068  ;;
19069esac
19070fi
19071DSYMUTIL=$ac_cv_path_DSYMUTIL
19072if test -n "$DSYMUTIL"; then
19073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19074$as_echo "$DSYMUTIL" >&6; }
19075else
19076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19077$as_echo "no" >&6; }
19078fi
19079
19080
19081  test -n "$DSYMUTIL" && break
19082done
19083
19084  else
19085    # The variable is set, but is it from the command line or the environment?
19086
19087    # Try to remove the string !DSYMUTIL! from our list.
19088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19090      # If it failed, the variable was not from the command line. Ignore it,
19091      # but warn the user (except for BASH, which is always set by the calling BASH).
19092      if test "xDSYMUTIL" != xBASH; then
19093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19094$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19095      fi
19096      # Try to locate tool using the code snippet
19097      for ac_prog in dsymutil
19098do
19099  # Extract the first word of "$ac_prog", so it can be a program name with args.
19100set dummy $ac_prog; ac_word=$2
19101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19102$as_echo_n "checking for $ac_word... " >&6; }
19103if ${ac_cv_path_DSYMUTIL+:} false; then :
19104  $as_echo_n "(cached) " >&6
19105else
19106  case $DSYMUTIL in
19107  [\\/]* | ?:[\\/]*)
19108  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19109  ;;
19110  *)
19111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19112for as_dir in $PATH
19113do
19114  IFS=$as_save_IFS
19115  test -z "$as_dir" && as_dir=.
19116    for ac_exec_ext in '' $ac_executable_extensions; do
19117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19118    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19120    break 2
19121  fi
19122done
19123  done
19124IFS=$as_save_IFS
19125
19126  ;;
19127esac
19128fi
19129DSYMUTIL=$ac_cv_path_DSYMUTIL
19130if test -n "$DSYMUTIL"; then
19131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19132$as_echo "$DSYMUTIL" >&6; }
19133else
19134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19135$as_echo "no" >&6; }
19136fi
19137
19138
19139  test -n "$DSYMUTIL" && break
19140done
19141
19142    else
19143      # If it succeeded, then it was overridden by the user. We will use it
19144      # for the tool.
19145
19146      # First remove it from the list of overridden variables, so we can test
19147      # for unknown variables in the end.
19148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19149
19150      # Check if the provided tool contains a complete path.
19151      tool_specified="$DSYMUTIL"
19152      tool_basename="${tool_specified##*/}"
19153      if test "x$tool_basename" = "x$tool_specified"; then
19154        # A command without a complete path is provided, search $PATH.
19155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19156$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19157        # Extract the first word of "$tool_basename", so it can be a program name with args.
19158set dummy $tool_basename; ac_word=$2
19159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19160$as_echo_n "checking for $ac_word... " >&6; }
19161if ${ac_cv_path_DSYMUTIL+:} false; then :
19162  $as_echo_n "(cached) " >&6
19163else
19164  case $DSYMUTIL in
19165  [\\/]* | ?:[\\/]*)
19166  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19167  ;;
19168  *)
19169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19170for as_dir in $PATH
19171do
19172  IFS=$as_save_IFS
19173  test -z "$as_dir" && as_dir=.
19174    for ac_exec_ext in '' $ac_executable_extensions; do
19175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19176    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19178    break 2
19179  fi
19180done
19181  done
19182IFS=$as_save_IFS
19183
19184  ;;
19185esac
19186fi
19187DSYMUTIL=$ac_cv_path_DSYMUTIL
19188if test -n "$DSYMUTIL"; then
19189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19190$as_echo "$DSYMUTIL" >&6; }
19191else
19192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19193$as_echo "no" >&6; }
19194fi
19195
19196
19197        if test "x$DSYMUTIL" = x; then
19198          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19199        fi
19200      else
19201        # Otherwise we believe it is a complete path. Use it as it is.
19202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19203$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19205$as_echo_n "checking for DSYMUTIL... " >&6; }
19206        if test ! -x "$tool_specified"; then
19207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19208$as_echo "not found" >&6; }
19209          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19210        fi
19211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19212$as_echo "$tool_specified" >&6; }
19213      fi
19214    fi
19215  fi
19216
19217
19218
19219  if test "x$DSYMUTIL" = x; then
19220    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19221  fi
19222
19223
19224
19225
19226
19227  # Publish this variable in the help.
19228
19229
19230  if test "x$XATTR" = x; then
19231    # The variable is not set by user, try to locate tool using the code snippet
19232    for ac_prog in xattr
19233do
19234  # Extract the first word of "$ac_prog", so it can be a program name with args.
19235set dummy $ac_prog; ac_word=$2
19236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19237$as_echo_n "checking for $ac_word... " >&6; }
19238if ${ac_cv_path_XATTR+:} false; then :
19239  $as_echo_n "(cached) " >&6
19240else
19241  case $XATTR in
19242  [\\/]* | ?:[\\/]*)
19243  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19244  ;;
19245  *)
19246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19247for as_dir in $PATH
19248do
19249  IFS=$as_save_IFS
19250  test -z "$as_dir" && as_dir=.
19251    for ac_exec_ext in '' $ac_executable_extensions; do
19252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19253    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19255    break 2
19256  fi
19257done
19258  done
19259IFS=$as_save_IFS
19260
19261  ;;
19262esac
19263fi
19264XATTR=$ac_cv_path_XATTR
19265if test -n "$XATTR"; then
19266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19267$as_echo "$XATTR" >&6; }
19268else
19269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19270$as_echo "no" >&6; }
19271fi
19272
19273
19274  test -n "$XATTR" && break
19275done
19276
19277  else
19278    # The variable is set, but is it from the command line or the environment?
19279
19280    # Try to remove the string !XATTR! from our list.
19281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19283      # If it failed, the variable was not from the command line. Ignore it,
19284      # but warn the user (except for BASH, which is always set by the calling BASH).
19285      if test "xXATTR" != xBASH; then
19286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19287$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19288      fi
19289      # Try to locate tool using the code snippet
19290      for ac_prog in xattr
19291do
19292  # Extract the first word of "$ac_prog", so it can be a program name with args.
19293set dummy $ac_prog; ac_word=$2
19294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19295$as_echo_n "checking for $ac_word... " >&6; }
19296if ${ac_cv_path_XATTR+:} false; then :
19297  $as_echo_n "(cached) " >&6
19298else
19299  case $XATTR in
19300  [\\/]* | ?:[\\/]*)
19301  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19302  ;;
19303  *)
19304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19305for as_dir in $PATH
19306do
19307  IFS=$as_save_IFS
19308  test -z "$as_dir" && as_dir=.
19309    for ac_exec_ext in '' $ac_executable_extensions; do
19310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19311    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19313    break 2
19314  fi
19315done
19316  done
19317IFS=$as_save_IFS
19318
19319  ;;
19320esac
19321fi
19322XATTR=$ac_cv_path_XATTR
19323if test -n "$XATTR"; then
19324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19325$as_echo "$XATTR" >&6; }
19326else
19327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19328$as_echo "no" >&6; }
19329fi
19330
19331
19332  test -n "$XATTR" && break
19333done
19334
19335    else
19336      # If it succeeded, then it was overridden by the user. We will use it
19337      # for the tool.
19338
19339      # First remove it from the list of overridden variables, so we can test
19340      # for unknown variables in the end.
19341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19342
19343      # Check if the provided tool contains a complete path.
19344      tool_specified="$XATTR"
19345      tool_basename="${tool_specified##*/}"
19346      if test "x$tool_basename" = "x$tool_specified"; then
19347        # A command without a complete path is provided, search $PATH.
19348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19349$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19350        # Extract the first word of "$tool_basename", so it can be a program name with args.
19351set dummy $tool_basename; ac_word=$2
19352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19353$as_echo_n "checking for $ac_word... " >&6; }
19354if ${ac_cv_path_XATTR+:} false; then :
19355  $as_echo_n "(cached) " >&6
19356else
19357  case $XATTR in
19358  [\\/]* | ?:[\\/]*)
19359  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19360  ;;
19361  *)
19362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19363for as_dir in $PATH
19364do
19365  IFS=$as_save_IFS
19366  test -z "$as_dir" && as_dir=.
19367    for ac_exec_ext in '' $ac_executable_extensions; do
19368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19369    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19371    break 2
19372  fi
19373done
19374  done
19375IFS=$as_save_IFS
19376
19377  ;;
19378esac
19379fi
19380XATTR=$ac_cv_path_XATTR
19381if test -n "$XATTR"; then
19382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19383$as_echo "$XATTR" >&6; }
19384else
19385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19386$as_echo "no" >&6; }
19387fi
19388
19389
19390        if test "x$XATTR" = x; then
19391          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19392        fi
19393      else
19394        # Otherwise we believe it is a complete path. Use it as it is.
19395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19396$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19398$as_echo_n "checking for XATTR... " >&6; }
19399        if test ! -x "$tool_specified"; then
19400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19401$as_echo "not found" >&6; }
19402          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19403        fi
19404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19405$as_echo "$tool_specified" >&6; }
19406      fi
19407    fi
19408  fi
19409
19410
19411
19412  if test "x$XATTR" = x; then
19413    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19414  fi
19415
19416
19417
19418
19419  # Publish this variable in the help.
19420
19421
19422  if test "x$CODESIGN" = x; then
19423    # The variable is not set by user, try to locate tool using the code snippet
19424    for ac_prog in codesign
19425do
19426  # Extract the first word of "$ac_prog", so it can be a program name with args.
19427set dummy $ac_prog; ac_word=$2
19428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19429$as_echo_n "checking for $ac_word... " >&6; }
19430if ${ac_cv_path_CODESIGN+:} false; then :
19431  $as_echo_n "(cached) " >&6
19432else
19433  case $CODESIGN in
19434  [\\/]* | ?:[\\/]*)
19435  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19436  ;;
19437  *)
19438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19439for as_dir in $PATH
19440do
19441  IFS=$as_save_IFS
19442  test -z "$as_dir" && as_dir=.
19443    for ac_exec_ext in '' $ac_executable_extensions; do
19444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19445    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19447    break 2
19448  fi
19449done
19450  done
19451IFS=$as_save_IFS
19452
19453  ;;
19454esac
19455fi
19456CODESIGN=$ac_cv_path_CODESIGN
19457if test -n "$CODESIGN"; then
19458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19459$as_echo "$CODESIGN" >&6; }
19460else
19461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19462$as_echo "no" >&6; }
19463fi
19464
19465
19466  test -n "$CODESIGN" && break
19467done
19468
19469  else
19470    # The variable is set, but is it from the command line or the environment?
19471
19472    # Try to remove the string !CODESIGN! from our list.
19473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19475      # If it failed, the variable was not from the command line. Ignore it,
19476      # but warn the user (except for BASH, which is always set by the calling BASH).
19477      if test "xCODESIGN" != xBASH; then
19478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19479$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19480      fi
19481      # Try to locate tool using the code snippet
19482      for ac_prog in codesign
19483do
19484  # Extract the first word of "$ac_prog", so it can be a program name with args.
19485set dummy $ac_prog; ac_word=$2
19486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19487$as_echo_n "checking for $ac_word... " >&6; }
19488if ${ac_cv_path_CODESIGN+:} false; then :
19489  $as_echo_n "(cached) " >&6
19490else
19491  case $CODESIGN in
19492  [\\/]* | ?:[\\/]*)
19493  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19494  ;;
19495  *)
19496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19497for as_dir in $PATH
19498do
19499  IFS=$as_save_IFS
19500  test -z "$as_dir" && as_dir=.
19501    for ac_exec_ext in '' $ac_executable_extensions; do
19502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19503    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19505    break 2
19506  fi
19507done
19508  done
19509IFS=$as_save_IFS
19510
19511  ;;
19512esac
19513fi
19514CODESIGN=$ac_cv_path_CODESIGN
19515if test -n "$CODESIGN"; then
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19517$as_echo "$CODESIGN" >&6; }
19518else
19519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19520$as_echo "no" >&6; }
19521fi
19522
19523
19524  test -n "$CODESIGN" && break
19525done
19526
19527    else
19528      # If it succeeded, then it was overridden by the user. We will use it
19529      # for the tool.
19530
19531      # First remove it from the list of overridden variables, so we can test
19532      # for unknown variables in the end.
19533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19534
19535      # Check if the provided tool contains a complete path.
19536      tool_specified="$CODESIGN"
19537      tool_basename="${tool_specified##*/}"
19538      if test "x$tool_basename" = "x$tool_specified"; then
19539        # A command without a complete path is provided, search $PATH.
19540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19541$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19542        # Extract the first word of "$tool_basename", so it can be a program name with args.
19543set dummy $tool_basename; ac_word=$2
19544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19545$as_echo_n "checking for $ac_word... " >&6; }
19546if ${ac_cv_path_CODESIGN+:} false; then :
19547  $as_echo_n "(cached) " >&6
19548else
19549  case $CODESIGN in
19550  [\\/]* | ?:[\\/]*)
19551  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19552  ;;
19553  *)
19554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19555for as_dir in $PATH
19556do
19557  IFS=$as_save_IFS
19558  test -z "$as_dir" && as_dir=.
19559    for ac_exec_ext in '' $ac_executable_extensions; do
19560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19561    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19563    break 2
19564  fi
19565done
19566  done
19567IFS=$as_save_IFS
19568
19569  ;;
19570esac
19571fi
19572CODESIGN=$ac_cv_path_CODESIGN
19573if test -n "$CODESIGN"; then
19574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19575$as_echo "$CODESIGN" >&6; }
19576else
19577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19578$as_echo "no" >&6; }
19579fi
19580
19581
19582        if test "x$CODESIGN" = x; then
19583          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19584        fi
19585      else
19586        # Otherwise we believe it is a complete path. Use it as it is.
19587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19588$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19590$as_echo_n "checking for CODESIGN... " >&6; }
19591        if test ! -x "$tool_specified"; then
19592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19593$as_echo "not found" >&6; }
19594          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19595        fi
19596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19597$as_echo "$tool_specified" >&6; }
19598      fi
19599    fi
19600  fi
19601
19602
19603    if test "x$CODESIGN" != "x"; then
19604      # Verify that the openjdk_codesign certificate is present
19605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19606$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19607      rm -f codesign-testfile
19608      touch codesign-testfile
19609      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19610      rm -f codesign-testfile
19611      if test "x$CODESIGN" = x; then
19612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19613$as_echo "no" >&6; }
19614      else
19615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19616$as_echo "yes" >&6; }
19617      fi
19618    fi
19619  fi
19620
19621
19622# Check if pkg-config is available.
19623
19624
19625if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19626	if test -n "$ac_tool_prefix"; then
19627  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19628set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19630$as_echo_n "checking for $ac_word... " >&6; }
19631if ${ac_cv_path_PKG_CONFIG+:} false; then :
19632  $as_echo_n "(cached) " >&6
19633else
19634  case $PKG_CONFIG in
19635  [\\/]* | ?:[\\/]*)
19636  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19637  ;;
19638  *)
19639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19640for as_dir in $PATH
19641do
19642  IFS=$as_save_IFS
19643  test -z "$as_dir" && as_dir=.
19644    for ac_exec_ext in '' $ac_executable_extensions; do
19645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19646    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19648    break 2
19649  fi
19650done
19651  done
19652IFS=$as_save_IFS
19653
19654  ;;
19655esac
19656fi
19657PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19658if test -n "$PKG_CONFIG"; then
19659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19660$as_echo "$PKG_CONFIG" >&6; }
19661else
19662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19663$as_echo "no" >&6; }
19664fi
19665
19666
19667fi
19668if test -z "$ac_cv_path_PKG_CONFIG"; then
19669  ac_pt_PKG_CONFIG=$PKG_CONFIG
19670  # Extract the first word of "pkg-config", so it can be a program name with args.
19671set dummy pkg-config; ac_word=$2
19672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19673$as_echo_n "checking for $ac_word... " >&6; }
19674if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19675  $as_echo_n "(cached) " >&6
19676else
19677  case $ac_pt_PKG_CONFIG in
19678  [\\/]* | ?:[\\/]*)
19679  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19680  ;;
19681  *)
19682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19683for as_dir in $PATH
19684do
19685  IFS=$as_save_IFS
19686  test -z "$as_dir" && as_dir=.
19687    for ac_exec_ext in '' $ac_executable_extensions; do
19688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19689    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19691    break 2
19692  fi
19693done
19694  done
19695IFS=$as_save_IFS
19696
19697  ;;
19698esac
19699fi
19700ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19701if test -n "$ac_pt_PKG_CONFIG"; then
19702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19703$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19704else
19705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19706$as_echo "no" >&6; }
19707fi
19708
19709  if test "x$ac_pt_PKG_CONFIG" = x; then
19710    PKG_CONFIG=""
19711  else
19712    case $cross_compiling:$ac_tool_warned in
19713yes:)
19714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19716ac_tool_warned=yes ;;
19717esac
19718    PKG_CONFIG=$ac_pt_PKG_CONFIG
19719  fi
19720else
19721  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19722fi
19723
19724fi
19725if test -n "$PKG_CONFIG"; then
19726	_pkg_min_version=0.9.0
19727	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19728$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19729	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19730		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19731$as_echo "yes" >&6; }
19732	else
19733		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19734$as_echo "no" >&6; }
19735		PKG_CONFIG=""
19736	fi
19737
19738fi
19739
19740# After basic tools have been setup, we can check build os specific details.
19741
19742  ###############################################################################
19743
19744  # Note that this is the build platform OS version!
19745
19746  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19747  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19748  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19749  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19750
19751
19752
19753
19754
19755# Setup builddeps, for automatic downloading of tools we need.
19756# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19757# boot-jdk setup, but we need to have basic tools setup first.
19758
19759
19760# Check whether --with-builddeps-conf was given.
19761if test "${with_builddeps_conf+set}" = set; then :
19762  withval=$with_builddeps_conf;
19763fi
19764
19765
19766
19767# Check whether --with-builddeps-server was given.
19768if test "${with_builddeps_server+set}" = set; then :
19769  withval=$with_builddeps_server;
19770fi
19771
19772
19773
19774# Check whether --with-builddeps-dir was given.
19775if test "${with_builddeps_dir+set}" = set; then :
19776  withval=$with_builddeps_dir;
19777else
19778  with_builddeps_dir=/localhome/builddeps
19779fi
19780
19781
19782
19783# Check whether --with-builddeps-group was given.
19784if test "${with_builddeps_group+set}" = set; then :
19785  withval=$with_builddeps_group;
19786fi
19787
19788
19789
19790
19791  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19792    if test "x$with_builddeps_conf" != x; then
19793      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19794$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19795      builddepsfile=$with_builddeps_conf
19796      if test -s $builddepsfile; then
19797        . $builddepsfile
19798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19799$as_echo "loaded!" >&6; }
19800      else
19801        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19802      fi
19803    else
19804      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19805$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19806      builddepsfile=`mktemp`
19807      touch $builddepsfile
19808      # Put all found confs into a single file.
19809      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19810      # Source the file to acquire the variables
19811      if test -s $builddepsfile; then
19812        . $builddepsfile
19813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19814$as_echo "found at least one!" >&6; }
19815      else
19816        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19817      fi
19818    fi
19819    # Create build and target names that use _ instead of "-" and ".".
19820    # This is necessary to use them in variable names.
19821    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19822    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19823    # Extract rewrite information for build and target
19824    eval rewritten_build=\${REWRITE_${build_var}}
19825    if test "x$rewritten_build" = x; then
19826      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19827      echo Build stays the same $rewritten_build
19828    else
19829      echo Rewriting build for builddeps into $rewritten_build
19830    fi
19831    eval rewritten_target=\${REWRITE_${target_var}}
19832    if test "x$rewritten_target" = x; then
19833      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19834      echo Target stays the same $rewritten_target
19835    else
19836      echo Rewriting target for builddeps into $rewritten_target
19837    fi
19838    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19839    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19840  fi
19841  for ac_prog in 7z unzip
19842do
19843  # Extract the first word of "$ac_prog", so it can be a program name with args.
19844set dummy $ac_prog; ac_word=$2
19845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19846$as_echo_n "checking for $ac_word... " >&6; }
19847if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19848  $as_echo_n "(cached) " >&6
19849else
19850  if test -n "$BDEPS_UNZIP"; then
19851  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19852else
19853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19854for as_dir in $PATH
19855do
19856  IFS=$as_save_IFS
19857  test -z "$as_dir" && as_dir=.
19858    for ac_exec_ext in '' $ac_executable_extensions; do
19859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19860    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19862    break 2
19863  fi
19864done
19865  done
19866IFS=$as_save_IFS
19867
19868fi
19869fi
19870BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19871if test -n "$BDEPS_UNZIP"; then
19872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19873$as_echo "$BDEPS_UNZIP" >&6; }
19874else
19875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19876$as_echo "no" >&6; }
19877fi
19878
19879
19880  test -n "$BDEPS_UNZIP" && break
19881done
19882
19883  if test "x$BDEPS_UNZIP" = x7z; then
19884    BDEPS_UNZIP="7z x"
19885  fi
19886
19887  for ac_prog in wget lftp ftp
19888do
19889  # Extract the first word of "$ac_prog", so it can be a program name with args.
19890set dummy $ac_prog; ac_word=$2
19891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19892$as_echo_n "checking for $ac_word... " >&6; }
19893if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19894  $as_echo_n "(cached) " >&6
19895else
19896  if test -n "$BDEPS_FTP"; then
19897  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19898else
19899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19900for as_dir in $PATH
19901do
19902  IFS=$as_save_IFS
19903  test -z "$as_dir" && as_dir=.
19904    for ac_exec_ext in '' $ac_executable_extensions; do
19905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19906    ac_cv_prog_BDEPS_FTP="$ac_prog"
19907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19908    break 2
19909  fi
19910done
19911  done
19912IFS=$as_save_IFS
19913
19914fi
19915fi
19916BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19917if test -n "$BDEPS_FTP"; then
19918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19919$as_echo "$BDEPS_FTP" >&6; }
19920else
19921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19922$as_echo "no" >&6; }
19923fi
19924
19925
19926  test -n "$BDEPS_FTP" && break
19927done
19928
19929
19930
19931###############################################################################
19932#
19933# Determine OpenJDK variants, options and version numbers.
19934#
19935###############################################################################
19936
19937# We need build & target for this.
19938
19939
19940  ###############################################################################
19941  #
19942  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19943  # We always build headless support.
19944  #
19945  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19946$as_echo_n "checking headful support... " >&6; }
19947  # Check whether --enable-headful was given.
19948if test "${enable_headful+set}" = set; then :
19949  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19950else
19951  SUPPORT_HEADFUL=yes
19952fi
19953
19954
19955  SUPPORT_HEADLESS=yes
19956  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19957
19958  if test "x$SUPPORT_HEADFUL" = xyes; then
19959    # We are building both headful and headless.
19960    headful_msg="include support for both headful and headless"
19961  fi
19962
19963  if test "x$SUPPORT_HEADFUL" = xno; then
19964    # Thus we are building headless only.
19965    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19966    headful_msg="headless only"
19967  fi
19968
19969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19970$as_echo "$headful_msg" >&6; }
19971
19972
19973
19974
19975
19976  # Control wether Hotspot runs Queens test after build.
19977  # Check whether --enable-hotspot-test-in-build was given.
19978if test "${enable_hotspot_test_in_build+set}" = set; then :
19979  enableval=$enable_hotspot_test_in_build;
19980else
19981  enable_hotspot_test_in_build=no
19982fi
19983
19984  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19985    TEST_IN_BUILD=true
19986  else
19987    TEST_IN_BUILD=false
19988  fi
19989
19990
19991  ###############################################################################
19992  #
19993  # Choose cacerts source file
19994  #
19995
19996# Check whether --with-cacerts-file was given.
19997if test "${with_cacerts_file+set}" = set; then :
19998  withval=$with_cacerts_file;
19999fi
20000
20001  if test "x$with_cacerts_file" != x; then
20002    CACERTS_FILE=$with_cacerts_file
20003  fi
20004
20005
20006  ###############################################################################
20007  #
20008  # Enable or disable unlimited crypto
20009  #
20010  # Check whether --enable-unlimited-crypto was given.
20011if test "${enable_unlimited_crypto+set}" = set; then :
20012  enableval=$enable_unlimited_crypto;
20013else
20014  enable_unlimited_crypto=no
20015fi
20016
20017  if test "x$enable_unlimited_crypto" = "xyes"; then
20018    UNLIMITED_CRYPTO=true
20019  else
20020    UNLIMITED_CRYPTO=false
20021  fi
20022
20023
20024  ###############################################################################
20025  #
20026  # Enable or disable the elliptic curve crypto implementation
20027  #
20028
20029
20030  ###############################################################################
20031  #
20032  # --enable-rmiconnector-iiop
20033  #
20034  # Check whether --enable-rmiconnector-iiop was given.
20035if test "${enable_rmiconnector_iiop+set}" = set; then :
20036  enableval=$enable_rmiconnector_iiop;
20037fi
20038
20039  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20040    RMICONNECTOR_IIOP=true
20041  else
20042    RMICONNECTOR_IIOP=false
20043  fi
20044
20045
20046  ###############################################################################
20047  #
20048  # Compress jars
20049  #
20050  COMPRESS_JARS=false
20051
20052
20053
20054
20055  # Source the version numbers
20056  . $AUTOCONF_DIR/version-numbers
20057
20058  # Get the settings from parameters
20059
20060# Check whether --with-milestone was given.
20061if test "${with_milestone+set}" = set; then :
20062  withval=$with_milestone;
20063fi
20064
20065  if test "x$with_milestone" = xyes; then
20066    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20067  elif test "x$with_milestone" != x; then
20068    MILESTONE="$with_milestone"
20069  fi
20070  if test "x$MILESTONE" = x; then
20071    MILESTONE=internal
20072  fi
20073
20074
20075# Check whether --with-update-version was given.
20076if test "${with_update_version+set}" = set; then :
20077  withval=$with_update_version;
20078fi
20079
20080  if test "x$with_update_version" = xyes; then
20081    as_fn_error $? "Update version must have a value" "$LINENO" 5
20082  elif test "x$with_update_version" != x; then
20083    JDK_UPDATE_VERSION="$with_update_version"
20084    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20085    # to a bug in expr (which reduces it to just X). To work around this, we
20086    # always add a 0 to one digit update versions.
20087    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20088      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20089    fi
20090  fi
20091
20092
20093# Check whether --with-user-release-suffix was given.
20094if test "${with_user_release_suffix+set}" = set; then :
20095  withval=$with_user_release_suffix;
20096fi
20097
20098  if test "x$with_user_release_suffix" = xyes; then
20099    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20100  elif test "x$with_user_release_suffix" != x; then
20101    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20102  fi
20103
20104
20105# Check whether --with-build-number was given.
20106if test "${with_build_number+set}" = set; then :
20107  withval=$with_build_number;
20108fi
20109
20110  if test "x$with_build_number" = xyes; then
20111    as_fn_error $? "Build number must have a value" "$LINENO" 5
20112  elif test "x$with_build_number" != x; then
20113    JDK_BUILD_NUMBER="$with_build_number"
20114  fi
20115  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20116  if test "x$JDK_BUILD_NUMBER" = x; then
20117    JDK_BUILD_NUMBER=b00
20118    if test "x$USER_RELEASE_SUFFIX" = x; then
20119      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20120      # Avoid [:alnum:] since it depends on the locale.
20121      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20122      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20123    fi
20124  fi
20125
20126  # Now set the JDK version, milestone, build number etc.
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142  COPYRIGHT_YEAR=`date +'%Y'`
20143
20144
20145  if test "x$JDK_UPDATE_VERSION" != x; then
20146    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20147  else
20148    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20149  fi
20150
20151
20152  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20153
20154
20155
20156###############################################################################
20157#
20158# Setup BootJDK, used to bootstrap the build.
20159#
20160###############################################################################
20161
20162
20163  BOOT_JDK_FOUND=no
20164
20165# Check whether --with-boot-jdk was given.
20166if test "${with_boot_jdk+set}" = set; then :
20167  withval=$with_boot_jdk;
20168fi
20169
20170
20171  # We look for the Boot JDK through various means, going from more certain to
20172  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20173  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20174  # must check if this is indeed valid; otherwise we'll continue looking.
20175
20176  # Test: Is bootjdk explicitely set by command line arguments?
20177
20178  if test "x$BOOT_JDK_FOUND" = xno; then
20179    # Now execute the test
20180
20181  if test "x$with_boot_jdk" != x; then
20182    BOOT_JDK=$with_boot_jdk
20183    BOOT_JDK_FOUND=maybe
20184    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20185$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20186  fi
20187
20188
20189    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20190    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20191      # Do we have a bin/java?
20192      if test ! -x "$BOOT_JDK/bin/java"; then
20193        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20195        BOOT_JDK_FOUND=no
20196      else
20197        # Do we have a bin/javac?
20198        if test ! -x "$BOOT_JDK/bin/javac"; then
20199          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20201          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20202$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20203          BOOT_JDK_FOUND=no
20204        else
20205          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20206          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20209            BOOT_JDK_FOUND=no
20210          else
20211            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20212            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20213
20214            # Extra M4 quote needed to protect [] in grep expression.
20215            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20216            if test "x$FOUND_CORRECT_VERSION" = x; then
20217              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20219              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20220$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20221              BOOT_JDK_FOUND=no
20222            else
20223              # We're done! :-)
20224              BOOT_JDK_FOUND=yes
20225
20226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20227
20228  # Input might be given as Windows format, start by converting to
20229  # unix format.
20230  path="$BOOT_JDK"
20231  new_path=`$CYGPATH -u "$path"`
20232
20233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20236  # "foo.exe" is OK but "foo" is an error.
20237  #
20238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20239  # It is also a way to make sure we got the proper file name for the real test later on.
20240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20241  if test "x$test_shortpath" = x; then
20242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20245  fi
20246
20247  # Call helper function which possibly converts this using DOS-style short mode.
20248  # If so, the updated path is stored in $new_path.
20249
20250  input_path="$new_path"
20251  # Check if we need to convert this using DOS-style short mode. If the path
20252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20253  # take no chances and rewrite it.
20254  # Note: m4 eats our [], so we need to use [ and ] instead.
20255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20256  if test "x$has_forbidden_chars" != x; then
20257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20261      # Going to short mode and back again did indeed matter. Since short mode is
20262      # case insensitive, let's make it lowercase to improve readability.
20263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20264      # Now convert it back to Unix-stile (cygpath)
20265      input_path=`$CYGPATH -u "$shortmode_path"`
20266      new_path="$input_path"
20267    fi
20268  fi
20269
20270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20271  if test "x$test_cygdrive_prefix" = x; then
20272    # As a simple fix, exclude /usr/bin since it's not a real path.
20273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20275      # a path prefixed by /cygdrive for fixpath to work.
20276      new_path="$CYGWIN_ROOT_PATH$input_path"
20277    fi
20278  fi
20279
20280
20281  if test "x$path" != "x$new_path"; then
20282    BOOT_JDK="$new_path"
20283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20285  fi
20286
20287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20288
20289  path="$BOOT_JDK"
20290  has_colon=`$ECHO $path | $GREP ^.:`
20291  new_path="$path"
20292  if test "x$has_colon" = x; then
20293    # Not in mixed or Windows style, start by that.
20294    new_path=`cmd //c echo $path`
20295  fi
20296
20297
20298  input_path="$new_path"
20299  # Check if we need to convert this using DOS-style short mode. If the path
20300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20301  # take no chances and rewrite it.
20302  # Note: m4 eats our [], so we need to use [ and ] instead.
20303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20304  if test "x$has_forbidden_chars" != x; then
20305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20307  fi
20308
20309
20310  windows_path="$new_path"
20311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20312    unix_path=`$CYGPATH -u "$windows_path"`
20313    new_path="$unix_path"
20314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20316    new_path="$unix_path"
20317  fi
20318
20319  if test "x$path" != "x$new_path"; then
20320    BOOT_JDK="$new_path"
20321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20323  fi
20324
20325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20327
20328  else
20329    # We're on a posix platform. Hooray! :)
20330    path="$BOOT_JDK"
20331    has_space=`$ECHO "$path" | $GREP " "`
20332    if test "x$has_space" != x; then
20333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20336    fi
20337
20338    # Use eval to expand a potential ~
20339    eval path="$path"
20340    if test ! -f "$path" && test ! -d "$path"; then
20341      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20342    fi
20343
20344    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20345  fi
20346
20347              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20348$as_echo_n "checking for Boot JDK... " >&6; }
20349              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20350$as_echo "$BOOT_JDK" >&6; }
20351              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20352$as_echo_n "checking Boot JDK version... " >&6; }
20353              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20354              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20355$as_echo "$BOOT_JDK_VERSION" >&6; }
20356            fi # end check jdk version
20357          fi # end check rt.jar
20358        fi # end check javac
20359      fi # end check java
20360    fi # end check boot jdk found
20361  fi
20362
20363  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20364    # Having specified an argument which is incorrect will produce an instant failure;
20365    # we should not go on looking
20366    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20367  fi
20368
20369  # Test: Is bootjdk available from builddeps?
20370
20371  if test "x$BOOT_JDK_FOUND" = xno; then
20372    # Now execute the test
20373
20374
20375
20376  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20377    # Source the builddeps file again, to make sure it uses the latest variables!
20378    . $builddepsfile
20379    # Look for a target and build machine specific resource!
20380    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20381    if test "x$resource" = x; then
20382      # Ok, lets instead look for a target specific resource
20383      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20384    fi
20385    if test "x$resource" = x; then
20386      # Ok, lets instead look for a build specific resource
20387      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20388    fi
20389    if test "x$resource" = x; then
20390      # Ok, lets instead look for a generic resource
20391      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20392      resource=${builddep_bootjdk}
20393    fi
20394    if test "x$resource" != x; then
20395      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20396$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20397      # If the resource in the builddeps.conf file is an existing directory,
20398      # for example /java/linux/cups
20399      if test -d ${resource}; then
20400        depdir=${resource}
20401      else
20402
20403  # bootjdk is for example mymodule
20404  # $resource is for example libs/general/libmymod_1_2_3.zip
20405  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20406  # $with_builddeps_dir is for example /localhome/builddeps
20407  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20408  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20409  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20410  filename=`basename $resource`
20411  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20412  filebase=${filename%%.*}
20413  extension=${filename#*.}
20414  installdir=$with_builddeps_dir/$filebase
20415  if test ! -f $installdir/$filename.unpacked; then
20416    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20417$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20418    if test ! -d $installdir; then
20419      mkdir -p $installdir
20420    fi
20421    if test ! -d $installdir; then
20422      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20423    fi
20424    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20425    touch $tmpfile
20426    if test ! -f $tmpfile; then
20427      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20428    fi
20429
20430  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20431  # $tmpfile is the local file name for the downloaded file.
20432  VALID_TOOL=no
20433  if test "x$BDEPS_FTP" = xwget; then
20434    VALID_TOOL=yes
20435    wget -O $tmpfile $with_builddeps_server/$resource
20436  fi
20437  if test "x$BDEPS_FTP" = xlftp; then
20438    VALID_TOOL=yes
20439    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20440  fi
20441  if test "x$BDEPS_FTP" = xftp; then
20442    VALID_TOOL=yes
20443    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20444    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20445    FTPUSERPWD=${FTPSERVER%%@*}
20446    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20447      FTPUSER=${userpwd%%:*}
20448      FTPPWD=${userpwd#*@}
20449      FTPSERVER=${FTPSERVER#*@}
20450    else
20451      FTPUSER=ftp
20452      FTPPWD=ftp
20453    fi
20454    # the "pass" command does not work on some
20455    # ftp clients (read ftp.exe) but if it works,
20456    # passive mode is better!
20457    ( \
20458        echo "user $FTPUSER $FTPPWD"        ; \
20459        echo "pass"                         ; \
20460        echo "bin"                          ; \
20461        echo "get $FTPPATH $tmpfile"              ; \
20462    ) | ftp -in $FTPSERVER
20463  fi
20464  if test "x$VALID_TOOL" != xyes; then
20465    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20466  fi
20467
20468    mv $tmpfile $installdir/$filename
20469    if test ! -s $installdir/$filename; then
20470      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20471    fi
20472    case "$extension" in
20473      zip)  echo "Unzipping $installdir/$filename..."
20474        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20475        ;;
20476      tar.gz) echo "Untaring $installdir/$filename..."
20477        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20478        ;;
20479      tgz) echo "Untaring $installdir/$filename..."
20480        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20481        ;;
20482      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20483        ;;
20484    esac
20485  fi
20486  if test -f $installdir/$filename.unpacked; then
20487    depdir=$installdir
20488  fi
20489
20490      fi
20491      # Source the builddeps file again, because in the previous command, the depdir
20492      # was updated to point at the current build dependency install directory.
20493      . $builddepsfile
20494      # Now extract variables from the builddeps.conf files.
20495      theroot=${builddep_bootjdk_ROOT}
20496      thecflags=${builddep_bootjdk_CFLAGS}
20497      thelibs=${builddep_bootjdk_LIBS}
20498      if test "x$depdir" = x; then
20499        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20500      fi
20501      BOOT_JDK=$depdir
20502      if test "x$theroot" != x; then
20503        BOOT_JDK="$theroot"
20504      fi
20505      if test "x$thecflags" != x; then
20506        BOOT_JDK_CFLAGS="$thecflags"
20507      fi
20508      if test "x$thelibs" != x; then
20509        BOOT_JDK_LIBS="$thelibs"
20510      fi
20511      BOOT_JDK_FOUND=maybe
20512      else BOOT_JDK_FOUND=no
20513
20514    fi
20515    else BOOT_JDK_FOUND=no
20516
20517  fi
20518
20519
20520
20521    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20522    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20523      # Do we have a bin/java?
20524      if test ! -x "$BOOT_JDK/bin/java"; then
20525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20527        BOOT_JDK_FOUND=no
20528      else
20529        # Do we have a bin/javac?
20530        if test ! -x "$BOOT_JDK/bin/javac"; then
20531          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20533          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20534$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20535          BOOT_JDK_FOUND=no
20536        else
20537          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20538          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20541            BOOT_JDK_FOUND=no
20542          else
20543            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20544            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20545
20546            # Extra M4 quote needed to protect [] in grep expression.
20547            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20548            if test "x$FOUND_CORRECT_VERSION" = x; then
20549              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20551              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20552$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20553              BOOT_JDK_FOUND=no
20554            else
20555              # We're done! :-)
20556              BOOT_JDK_FOUND=yes
20557
20558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559
20560  # Input might be given as Windows format, start by converting to
20561  # unix format.
20562  path="$BOOT_JDK"
20563  new_path=`$CYGPATH -u "$path"`
20564
20565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20568  # "foo.exe" is OK but "foo" is an error.
20569  #
20570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20571  # It is also a way to make sure we got the proper file name for the real test later on.
20572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20573  if test "x$test_shortpath" = x; then
20574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20577  fi
20578
20579  # Call helper function which possibly converts this using DOS-style short mode.
20580  # If so, the updated path is stored in $new_path.
20581
20582  input_path="$new_path"
20583  # Check if we need to convert this using DOS-style short mode. If the path
20584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20585  # take no chances and rewrite it.
20586  # Note: m4 eats our [], so we need to use [ and ] instead.
20587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20588  if test "x$has_forbidden_chars" != x; then
20589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20593      # Going to short mode and back again did indeed matter. Since short mode is
20594      # case insensitive, let's make it lowercase to improve readability.
20595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20596      # Now convert it back to Unix-stile (cygpath)
20597      input_path=`$CYGPATH -u "$shortmode_path"`
20598      new_path="$input_path"
20599    fi
20600  fi
20601
20602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20603  if test "x$test_cygdrive_prefix" = x; then
20604    # As a simple fix, exclude /usr/bin since it's not a real path.
20605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20607      # a path prefixed by /cygdrive for fixpath to work.
20608      new_path="$CYGWIN_ROOT_PATH$input_path"
20609    fi
20610  fi
20611
20612
20613  if test "x$path" != "x$new_path"; then
20614    BOOT_JDK="$new_path"
20615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20617  fi
20618
20619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20620
20621  path="$BOOT_JDK"
20622  has_colon=`$ECHO $path | $GREP ^.:`
20623  new_path="$path"
20624  if test "x$has_colon" = x; then
20625    # Not in mixed or Windows style, start by that.
20626    new_path=`cmd //c echo $path`
20627  fi
20628
20629
20630  input_path="$new_path"
20631  # Check if we need to convert this using DOS-style short mode. If the path
20632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20633  # take no chances and rewrite it.
20634  # Note: m4 eats our [], so we need to use [ and ] instead.
20635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20636  if test "x$has_forbidden_chars" != x; then
20637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20639  fi
20640
20641
20642  windows_path="$new_path"
20643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20644    unix_path=`$CYGPATH -u "$windows_path"`
20645    new_path="$unix_path"
20646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20648    new_path="$unix_path"
20649  fi
20650
20651  if test "x$path" != "x$new_path"; then
20652    BOOT_JDK="$new_path"
20653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20655  fi
20656
20657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20659
20660  else
20661    # We're on a posix platform. Hooray! :)
20662    path="$BOOT_JDK"
20663    has_space=`$ECHO "$path" | $GREP " "`
20664    if test "x$has_space" != x; then
20665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20667      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20668    fi
20669
20670    # Use eval to expand a potential ~
20671    eval path="$path"
20672    if test ! -f "$path" && test ! -d "$path"; then
20673      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20674    fi
20675
20676    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20677  fi
20678
20679              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20680$as_echo_n "checking for Boot JDK... " >&6; }
20681              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20682$as_echo "$BOOT_JDK" >&6; }
20683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20684$as_echo_n "checking Boot JDK version... " >&6; }
20685              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20687$as_echo "$BOOT_JDK_VERSION" >&6; }
20688            fi # end check jdk version
20689          fi # end check rt.jar
20690        fi # end check javac
20691      fi # end check java
20692    fi # end check boot jdk found
20693  fi
20694
20695
20696  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20697
20698  if test "x$BOOT_JDK_FOUND" = xno; then
20699    # Now execute the test
20700
20701  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20702    # First check at user selected default
20703
20704  if test "x$BOOT_JDK_FOUND" = xno; then
20705    # Now execute the test
20706
20707  if test -x /usr/libexec/java_home; then
20708    BOOT_JDK=`/usr/libexec/java_home `
20709    BOOT_JDK_FOUND=maybe
20710    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20711$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20712  fi
20713
20714
20715    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20716    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20717      # Do we have a bin/java?
20718      if test ! -x "$BOOT_JDK/bin/java"; then
20719        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20721        BOOT_JDK_FOUND=no
20722      else
20723        # Do we have a bin/javac?
20724        if test ! -x "$BOOT_JDK/bin/javac"; then
20725          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20727          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20728$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20729          BOOT_JDK_FOUND=no
20730        else
20731          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20732          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20735            BOOT_JDK_FOUND=no
20736          else
20737            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20738            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20739
20740            # Extra M4 quote needed to protect [] in grep expression.
20741            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20742            if test "x$FOUND_CORRECT_VERSION" = x; then
20743              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20745              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20746$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20747              BOOT_JDK_FOUND=no
20748            else
20749              # We're done! :-)
20750              BOOT_JDK_FOUND=yes
20751
20752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20753
20754  # Input might be given as Windows format, start by converting to
20755  # unix format.
20756  path="$BOOT_JDK"
20757  new_path=`$CYGPATH -u "$path"`
20758
20759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20762  # "foo.exe" is OK but "foo" is an error.
20763  #
20764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20765  # It is also a way to make sure we got the proper file name for the real test later on.
20766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20767  if test "x$test_shortpath" = x; then
20768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20770    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20771  fi
20772
20773  # Call helper function which possibly converts this using DOS-style short mode.
20774  # If so, the updated path is stored in $new_path.
20775
20776  input_path="$new_path"
20777  # Check if we need to convert this using DOS-style short mode. If the path
20778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20779  # take no chances and rewrite it.
20780  # Note: m4 eats our [], so we need to use [ and ] instead.
20781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20782  if test "x$has_forbidden_chars" != x; then
20783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20787      # Going to short mode and back again did indeed matter. Since short mode is
20788      # case insensitive, let's make it lowercase to improve readability.
20789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20790      # Now convert it back to Unix-stile (cygpath)
20791      input_path=`$CYGPATH -u "$shortmode_path"`
20792      new_path="$input_path"
20793    fi
20794  fi
20795
20796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20797  if test "x$test_cygdrive_prefix" = x; then
20798    # As a simple fix, exclude /usr/bin since it's not a real path.
20799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20801      # a path prefixed by /cygdrive for fixpath to work.
20802      new_path="$CYGWIN_ROOT_PATH$input_path"
20803    fi
20804  fi
20805
20806
20807  if test "x$path" != "x$new_path"; then
20808    BOOT_JDK="$new_path"
20809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20811  fi
20812
20813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20814
20815  path="$BOOT_JDK"
20816  has_colon=`$ECHO $path | $GREP ^.:`
20817  new_path="$path"
20818  if test "x$has_colon" = x; then
20819    # Not in mixed or Windows style, start by that.
20820    new_path=`cmd //c echo $path`
20821  fi
20822
20823
20824  input_path="$new_path"
20825  # Check if we need to convert this using DOS-style short mode. If the path
20826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20827  # take no chances and rewrite it.
20828  # Note: m4 eats our [], so we need to use [ and ] instead.
20829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20830  if test "x$has_forbidden_chars" != x; then
20831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20833  fi
20834
20835
20836  windows_path="$new_path"
20837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20838    unix_path=`$CYGPATH -u "$windows_path"`
20839    new_path="$unix_path"
20840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20842    new_path="$unix_path"
20843  fi
20844
20845  if test "x$path" != "x$new_path"; then
20846    BOOT_JDK="$new_path"
20847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20849  fi
20850
20851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20853
20854  else
20855    # We're on a posix platform. Hooray! :)
20856    path="$BOOT_JDK"
20857    has_space=`$ECHO "$path" | $GREP " "`
20858    if test "x$has_space" != x; then
20859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20861      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20862    fi
20863
20864    # Use eval to expand a potential ~
20865    eval path="$path"
20866    if test ! -f "$path" && test ! -d "$path"; then
20867      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20868    fi
20869
20870    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20871  fi
20872
20873              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20874$as_echo_n "checking for Boot JDK... " >&6; }
20875              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20876$as_echo "$BOOT_JDK" >&6; }
20877              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20878$as_echo_n "checking Boot JDK version... " >&6; }
20879              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20880              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20881$as_echo "$BOOT_JDK_VERSION" >&6; }
20882            fi # end check jdk version
20883          fi # end check rt.jar
20884        fi # end check javac
20885      fi # end check java
20886    fi # end check boot jdk found
20887  fi
20888
20889    # If that did not work out (e.g. too old), try explicit versions instead
20890
20891  if test "x$BOOT_JDK_FOUND" = xno; then
20892    # Now execute the test
20893
20894  if test -x /usr/libexec/java_home; then
20895    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20896    BOOT_JDK_FOUND=maybe
20897    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20898$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20899  fi
20900
20901
20902    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20903    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20904      # Do we have a bin/java?
20905      if test ! -x "$BOOT_JDK/bin/java"; then
20906        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20908        BOOT_JDK_FOUND=no
20909      else
20910        # Do we have a bin/javac?
20911        if test ! -x "$BOOT_JDK/bin/javac"; then
20912          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20914          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20915$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20916          BOOT_JDK_FOUND=no
20917        else
20918          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20919          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20920            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20922            BOOT_JDK_FOUND=no
20923          else
20924            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20925            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20926
20927            # Extra M4 quote needed to protect [] in grep expression.
20928            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20929            if test "x$FOUND_CORRECT_VERSION" = x; then
20930              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20932              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20933$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20934              BOOT_JDK_FOUND=no
20935            else
20936              # We're done! :-)
20937              BOOT_JDK_FOUND=yes
20938
20939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20940
20941  # Input might be given as Windows format, start by converting to
20942  # unix format.
20943  path="$BOOT_JDK"
20944  new_path=`$CYGPATH -u "$path"`
20945
20946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20949  # "foo.exe" is OK but "foo" is an error.
20950  #
20951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20952  # It is also a way to make sure we got the proper file name for the real test later on.
20953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20954  if test "x$test_shortpath" = x; then
20955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20957    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20958  fi
20959
20960  # Call helper function which possibly converts this using DOS-style short mode.
20961  # If so, the updated path is stored in $new_path.
20962
20963  input_path="$new_path"
20964  # Check if we need to convert this using DOS-style short mode. If the path
20965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20966  # take no chances and rewrite it.
20967  # Note: m4 eats our [], so we need to use [ and ] instead.
20968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20969  if test "x$has_forbidden_chars" != x; then
20970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20974      # Going to short mode and back again did indeed matter. Since short mode is
20975      # case insensitive, let's make it lowercase to improve readability.
20976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20977      # Now convert it back to Unix-stile (cygpath)
20978      input_path=`$CYGPATH -u "$shortmode_path"`
20979      new_path="$input_path"
20980    fi
20981  fi
20982
20983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20984  if test "x$test_cygdrive_prefix" = x; then
20985    # As a simple fix, exclude /usr/bin since it's not a real path.
20986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20988      # a path prefixed by /cygdrive for fixpath to work.
20989      new_path="$CYGWIN_ROOT_PATH$input_path"
20990    fi
20991  fi
20992
20993
20994  if test "x$path" != "x$new_path"; then
20995    BOOT_JDK="$new_path"
20996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20998  fi
20999
21000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21001
21002  path="$BOOT_JDK"
21003  has_colon=`$ECHO $path | $GREP ^.:`
21004  new_path="$path"
21005  if test "x$has_colon" = x; then
21006    # Not in mixed or Windows style, start by that.
21007    new_path=`cmd //c echo $path`
21008  fi
21009
21010
21011  input_path="$new_path"
21012  # Check if we need to convert this using DOS-style short mode. If the path
21013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21014  # take no chances and rewrite it.
21015  # Note: m4 eats our [], so we need to use [ and ] instead.
21016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21017  if test "x$has_forbidden_chars" != x; then
21018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21020  fi
21021
21022
21023  windows_path="$new_path"
21024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21025    unix_path=`$CYGPATH -u "$windows_path"`
21026    new_path="$unix_path"
21027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21029    new_path="$unix_path"
21030  fi
21031
21032  if test "x$path" != "x$new_path"; then
21033    BOOT_JDK="$new_path"
21034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21036  fi
21037
21038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21040
21041  else
21042    # We're on a posix platform. Hooray! :)
21043    path="$BOOT_JDK"
21044    has_space=`$ECHO "$path" | $GREP " "`
21045    if test "x$has_space" != x; then
21046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21048      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21049    fi
21050
21051    # Use eval to expand a potential ~
21052    eval path="$path"
21053    if test ! -f "$path" && test ! -d "$path"; then
21054      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21055    fi
21056
21057    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21058  fi
21059
21060              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21061$as_echo_n "checking for Boot JDK... " >&6; }
21062              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21063$as_echo "$BOOT_JDK" >&6; }
21064              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21065$as_echo_n "checking Boot JDK version... " >&6; }
21066              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21067              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21068$as_echo "$BOOT_JDK_VERSION" >&6; }
21069            fi # end check jdk version
21070          fi # end check rt.jar
21071        fi # end check javac
21072      fi # end check java
21073    fi # end check boot jdk found
21074  fi
21075
21076
21077  if test "x$BOOT_JDK_FOUND" = xno; then
21078    # Now execute the test
21079
21080  if test -x /usr/libexec/java_home; then
21081    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21082    BOOT_JDK_FOUND=maybe
21083    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21084$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21085  fi
21086
21087
21088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21090      # Do we have a bin/java?
21091      if test ! -x "$BOOT_JDK/bin/java"; then
21092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21094        BOOT_JDK_FOUND=no
21095      else
21096        # Do we have a bin/javac?
21097        if test ! -x "$BOOT_JDK/bin/javac"; then
21098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21102          BOOT_JDK_FOUND=no
21103        else
21104          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21105          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21106            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21108            BOOT_JDK_FOUND=no
21109          else
21110            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21111            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21112
21113            # Extra M4 quote needed to protect [] in grep expression.
21114            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21115            if test "x$FOUND_CORRECT_VERSION" = x; then
21116              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21118              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21119$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21120              BOOT_JDK_FOUND=no
21121            else
21122              # We're done! :-)
21123              BOOT_JDK_FOUND=yes
21124
21125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21126
21127  # Input might be given as Windows format, start by converting to
21128  # unix format.
21129  path="$BOOT_JDK"
21130  new_path=`$CYGPATH -u "$path"`
21131
21132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21135  # "foo.exe" is OK but "foo" is an error.
21136  #
21137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21138  # It is also a way to make sure we got the proper file name for the real test later on.
21139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21140  if test "x$test_shortpath" = x; then
21141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21142$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21143    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21144  fi
21145
21146  # Call helper function which possibly converts this using DOS-style short mode.
21147  # If so, the updated path is stored in $new_path.
21148
21149  input_path="$new_path"
21150  # Check if we need to convert this using DOS-style short mode. If the path
21151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21152  # take no chances and rewrite it.
21153  # Note: m4 eats our [], so we need to use [ and ] instead.
21154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21155  if test "x$has_forbidden_chars" != x; then
21156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21160      # Going to short mode and back again did indeed matter. Since short mode is
21161      # case insensitive, let's make it lowercase to improve readability.
21162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21163      # Now convert it back to Unix-stile (cygpath)
21164      input_path=`$CYGPATH -u "$shortmode_path"`
21165      new_path="$input_path"
21166    fi
21167  fi
21168
21169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21170  if test "x$test_cygdrive_prefix" = x; then
21171    # As a simple fix, exclude /usr/bin since it's not a real path.
21172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21174      # a path prefixed by /cygdrive for fixpath to work.
21175      new_path="$CYGWIN_ROOT_PATH$input_path"
21176    fi
21177  fi
21178
21179
21180  if test "x$path" != "x$new_path"; then
21181    BOOT_JDK="$new_path"
21182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21184  fi
21185
21186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21187
21188  path="$BOOT_JDK"
21189  has_colon=`$ECHO $path | $GREP ^.:`
21190  new_path="$path"
21191  if test "x$has_colon" = x; then
21192    # Not in mixed or Windows style, start by that.
21193    new_path=`cmd //c echo $path`
21194  fi
21195
21196
21197  input_path="$new_path"
21198  # Check if we need to convert this using DOS-style short mode. If the path
21199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21200  # take no chances and rewrite it.
21201  # Note: m4 eats our [], so we need to use [ and ] instead.
21202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21203  if test "x$has_forbidden_chars" != x; then
21204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21206  fi
21207
21208
21209  windows_path="$new_path"
21210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21211    unix_path=`$CYGPATH -u "$windows_path"`
21212    new_path="$unix_path"
21213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21215    new_path="$unix_path"
21216  fi
21217
21218  if test "x$path" != "x$new_path"; then
21219    BOOT_JDK="$new_path"
21220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21222  fi
21223
21224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21226
21227  else
21228    # We're on a posix platform. Hooray! :)
21229    path="$BOOT_JDK"
21230    has_space=`$ECHO "$path" | $GREP " "`
21231    if test "x$has_space" != x; then
21232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21234      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21235    fi
21236
21237    # Use eval to expand a potential ~
21238    eval path="$path"
21239    if test ! -f "$path" && test ! -d "$path"; then
21240      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21241    fi
21242
21243    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21244  fi
21245
21246              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21247$as_echo_n "checking for Boot JDK... " >&6; }
21248              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21249$as_echo "$BOOT_JDK" >&6; }
21250              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21251$as_echo_n "checking Boot JDK version... " >&6; }
21252              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21253              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21254$as_echo "$BOOT_JDK_VERSION" >&6; }
21255            fi # end check jdk version
21256          fi # end check rt.jar
21257        fi # end check javac
21258      fi # end check java
21259    fi # end check boot jdk found
21260  fi
21261
21262
21263  if test "x$BOOT_JDK_FOUND" = xno; then
21264    # Now execute the test
21265
21266  if test -x /usr/libexec/java_home; then
21267    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21268    BOOT_JDK_FOUND=maybe
21269    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21270$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21271  fi
21272
21273
21274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21276      # Do we have a bin/java?
21277      if test ! -x "$BOOT_JDK/bin/java"; then
21278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21280        BOOT_JDK_FOUND=no
21281      else
21282        # Do we have a bin/javac?
21283        if test ! -x "$BOOT_JDK/bin/javac"; then
21284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21288          BOOT_JDK_FOUND=no
21289        else
21290          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21291          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21292            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21294            BOOT_JDK_FOUND=no
21295          else
21296            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21297            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21298
21299            # Extra M4 quote needed to protect [] in grep expression.
21300            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21301            if test "x$FOUND_CORRECT_VERSION" = x; then
21302              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21304              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21305$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21306              BOOT_JDK_FOUND=no
21307            else
21308              # We're done! :-)
21309              BOOT_JDK_FOUND=yes
21310
21311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21312
21313  # Input might be given as Windows format, start by converting to
21314  # unix format.
21315  path="$BOOT_JDK"
21316  new_path=`$CYGPATH -u "$path"`
21317
21318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21321  # "foo.exe" is OK but "foo" is an error.
21322  #
21323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21324  # It is also a way to make sure we got the proper file name for the real test later on.
21325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21326  if test "x$test_shortpath" = x; then
21327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21328$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21329    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21330  fi
21331
21332  # Call helper function which possibly converts this using DOS-style short mode.
21333  # If so, the updated path is stored in $new_path.
21334
21335  input_path="$new_path"
21336  # Check if we need to convert this using DOS-style short mode. If the path
21337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21338  # take no chances and rewrite it.
21339  # Note: m4 eats our [], so we need to use [ and ] instead.
21340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21341  if test "x$has_forbidden_chars" != x; then
21342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21346      # Going to short mode and back again did indeed matter. Since short mode is
21347      # case insensitive, let's make it lowercase to improve readability.
21348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21349      # Now convert it back to Unix-stile (cygpath)
21350      input_path=`$CYGPATH -u "$shortmode_path"`
21351      new_path="$input_path"
21352    fi
21353  fi
21354
21355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21356  if test "x$test_cygdrive_prefix" = x; then
21357    # As a simple fix, exclude /usr/bin since it's not a real path.
21358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21360      # a path prefixed by /cygdrive for fixpath to work.
21361      new_path="$CYGWIN_ROOT_PATH$input_path"
21362    fi
21363  fi
21364
21365
21366  if test "x$path" != "x$new_path"; then
21367    BOOT_JDK="$new_path"
21368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21370  fi
21371
21372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21373
21374  path="$BOOT_JDK"
21375  has_colon=`$ECHO $path | $GREP ^.:`
21376  new_path="$path"
21377  if test "x$has_colon" = x; then
21378    # Not in mixed or Windows style, start by that.
21379    new_path=`cmd //c echo $path`
21380  fi
21381
21382
21383  input_path="$new_path"
21384  # Check if we need to convert this using DOS-style short mode. If the path
21385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21386  # take no chances and rewrite it.
21387  # Note: m4 eats our [], so we need to use [ and ] instead.
21388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21389  if test "x$has_forbidden_chars" != x; then
21390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21392  fi
21393
21394
21395  windows_path="$new_path"
21396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21397    unix_path=`$CYGPATH -u "$windows_path"`
21398    new_path="$unix_path"
21399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21401    new_path="$unix_path"
21402  fi
21403
21404  if test "x$path" != "x$new_path"; then
21405    BOOT_JDK="$new_path"
21406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21408  fi
21409
21410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21412
21413  else
21414    # We're on a posix platform. Hooray! :)
21415    path="$BOOT_JDK"
21416    has_space=`$ECHO "$path" | $GREP " "`
21417    if test "x$has_space" != x; then
21418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21420      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21421    fi
21422
21423    # Use eval to expand a potential ~
21424    eval path="$path"
21425    if test ! -f "$path" && test ! -d "$path"; then
21426      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21427    fi
21428
21429    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21430  fi
21431
21432              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21433$as_echo_n "checking for Boot JDK... " >&6; }
21434              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21435$as_echo "$BOOT_JDK" >&6; }
21436              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21437$as_echo_n "checking Boot JDK version... " >&6; }
21438              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21439              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21440$as_echo "$BOOT_JDK_VERSION" >&6; }
21441            fi # end check jdk version
21442          fi # end check rt.jar
21443        fi # end check javac
21444      fi # end check java
21445    fi # end check boot jdk found
21446  fi
21447
21448  fi
21449
21450
21451    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21452    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21453      # Do we have a bin/java?
21454      if test ! -x "$BOOT_JDK/bin/java"; then
21455        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21457        BOOT_JDK_FOUND=no
21458      else
21459        # Do we have a bin/javac?
21460        if test ! -x "$BOOT_JDK/bin/javac"; then
21461          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21463          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21464$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21465          BOOT_JDK_FOUND=no
21466        else
21467          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21468          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21469            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21471            BOOT_JDK_FOUND=no
21472          else
21473            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21474            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21475
21476            # Extra M4 quote needed to protect [] in grep expression.
21477            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21478            if test "x$FOUND_CORRECT_VERSION" = x; then
21479              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21481              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21482$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21483              BOOT_JDK_FOUND=no
21484            else
21485              # We're done! :-)
21486              BOOT_JDK_FOUND=yes
21487
21488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21489
21490  # Input might be given as Windows format, start by converting to
21491  # unix format.
21492  path="$BOOT_JDK"
21493  new_path=`$CYGPATH -u "$path"`
21494
21495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21498  # "foo.exe" is OK but "foo" is an error.
21499  #
21500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21501  # It is also a way to make sure we got the proper file name for the real test later on.
21502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21503  if test "x$test_shortpath" = x; then
21504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21505$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21506    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21507  fi
21508
21509  # Call helper function which possibly converts this using DOS-style short mode.
21510  # If so, the updated path is stored in $new_path.
21511
21512  input_path="$new_path"
21513  # Check if we need to convert this using DOS-style short mode. If the path
21514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21515  # take no chances and rewrite it.
21516  # Note: m4 eats our [], so we need to use [ and ] instead.
21517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21518  if test "x$has_forbidden_chars" != x; then
21519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21523      # Going to short mode and back again did indeed matter. Since short mode is
21524      # case insensitive, let's make it lowercase to improve readability.
21525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21526      # Now convert it back to Unix-stile (cygpath)
21527      input_path=`$CYGPATH -u "$shortmode_path"`
21528      new_path="$input_path"
21529    fi
21530  fi
21531
21532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21533  if test "x$test_cygdrive_prefix" = x; then
21534    # As a simple fix, exclude /usr/bin since it's not a real path.
21535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21537      # a path prefixed by /cygdrive for fixpath to work.
21538      new_path="$CYGWIN_ROOT_PATH$input_path"
21539    fi
21540  fi
21541
21542
21543  if test "x$path" != "x$new_path"; then
21544    BOOT_JDK="$new_path"
21545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21546$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21547  fi
21548
21549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21550
21551  path="$BOOT_JDK"
21552  has_colon=`$ECHO $path | $GREP ^.:`
21553  new_path="$path"
21554  if test "x$has_colon" = x; then
21555    # Not in mixed or Windows style, start by that.
21556    new_path=`cmd //c echo $path`
21557  fi
21558
21559
21560  input_path="$new_path"
21561  # Check if we need to convert this using DOS-style short mode. If the path
21562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21563  # take no chances and rewrite it.
21564  # Note: m4 eats our [], so we need to use [ and ] instead.
21565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21566  if test "x$has_forbidden_chars" != x; then
21567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21569  fi
21570
21571
21572  windows_path="$new_path"
21573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21574    unix_path=`$CYGPATH -u "$windows_path"`
21575    new_path="$unix_path"
21576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21578    new_path="$unix_path"
21579  fi
21580
21581  if test "x$path" != "x$new_path"; then
21582    BOOT_JDK="$new_path"
21583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21584$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21585  fi
21586
21587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21589
21590  else
21591    # We're on a posix platform. Hooray! :)
21592    path="$BOOT_JDK"
21593    has_space=`$ECHO "$path" | $GREP " "`
21594    if test "x$has_space" != x; then
21595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21597      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21598    fi
21599
21600    # Use eval to expand a potential ~
21601    eval path="$path"
21602    if test ! -f "$path" && test ! -d "$path"; then
21603      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21604    fi
21605
21606    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21607  fi
21608
21609              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21610$as_echo_n "checking for Boot JDK... " >&6; }
21611              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21612$as_echo "$BOOT_JDK" >&6; }
21613              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21614$as_echo_n "checking Boot JDK version... " >&6; }
21615              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21616              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21617$as_echo "$BOOT_JDK_VERSION" >&6; }
21618            fi # end check jdk version
21619          fi # end check rt.jar
21620        fi # end check javac
21621      fi # end check java
21622    fi # end check boot jdk found
21623  fi
21624
21625
21626  # Test: Is $JAVA_HOME set?
21627
21628  if test "x$BOOT_JDK_FOUND" = xno; then
21629    # Now execute the test
21630
21631  if test "x$JAVA_HOME" != x; then
21632    JAVA_HOME_PROCESSED="$JAVA_HOME"
21633
21634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21635
21636  # Input might be given as Windows format, start by converting to
21637  # unix format.
21638  path="$JAVA_HOME_PROCESSED"
21639  new_path=`$CYGPATH -u "$path"`
21640
21641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21644  # "foo.exe" is OK but "foo" is an error.
21645  #
21646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21647  # It is also a way to make sure we got the proper file name for the real test later on.
21648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21649  if test "x$test_shortpath" = x; then
21650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21651$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21652    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21653  fi
21654
21655  # Call helper function which possibly converts this using DOS-style short mode.
21656  # If so, the updated path is stored in $new_path.
21657
21658  input_path="$new_path"
21659  # Check if we need to convert this using DOS-style short mode. If the path
21660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21661  # take no chances and rewrite it.
21662  # Note: m4 eats our [], so we need to use [ and ] instead.
21663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21664  if test "x$has_forbidden_chars" != x; then
21665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21669      # Going to short mode and back again did indeed matter. Since short mode is
21670      # case insensitive, let's make it lowercase to improve readability.
21671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21672      # Now convert it back to Unix-stile (cygpath)
21673      input_path=`$CYGPATH -u "$shortmode_path"`
21674      new_path="$input_path"
21675    fi
21676  fi
21677
21678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21679  if test "x$test_cygdrive_prefix" = x; then
21680    # As a simple fix, exclude /usr/bin since it's not a real path.
21681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21683      # a path prefixed by /cygdrive for fixpath to work.
21684      new_path="$CYGWIN_ROOT_PATH$input_path"
21685    fi
21686  fi
21687
21688
21689  if test "x$path" != "x$new_path"; then
21690    JAVA_HOME_PROCESSED="$new_path"
21691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21692$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21693  fi
21694
21695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21696
21697  path="$JAVA_HOME_PROCESSED"
21698  has_colon=`$ECHO $path | $GREP ^.:`
21699  new_path="$path"
21700  if test "x$has_colon" = x; then
21701    # Not in mixed or Windows style, start by that.
21702    new_path=`cmd //c echo $path`
21703  fi
21704
21705
21706  input_path="$new_path"
21707  # Check if we need to convert this using DOS-style short mode. If the path
21708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21709  # take no chances and rewrite it.
21710  # Note: m4 eats our [], so we need to use [ and ] instead.
21711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21712  if test "x$has_forbidden_chars" != x; then
21713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21715  fi
21716
21717
21718  windows_path="$new_path"
21719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21720    unix_path=`$CYGPATH -u "$windows_path"`
21721    new_path="$unix_path"
21722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21724    new_path="$unix_path"
21725  fi
21726
21727  if test "x$path" != "x$new_path"; then
21728    JAVA_HOME_PROCESSED="$new_path"
21729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21730$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21731  fi
21732
21733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21735
21736  else
21737    # We're on a posix platform. Hooray! :)
21738    path="$JAVA_HOME_PROCESSED"
21739    has_space=`$ECHO "$path" | $GREP " "`
21740    if test "x$has_space" != x; then
21741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21742$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21743      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21744    fi
21745
21746    # Use eval to expand a potential ~
21747    eval path="$path"
21748    if test ! -f "$path" && test ! -d "$path"; then
21749      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21750    fi
21751
21752    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21753  fi
21754
21755    if test ! -d "$JAVA_HOME_PROCESSED"; then
21756      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21757$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21758    else
21759      # Aha, the user has set a JAVA_HOME
21760      # let us use that as the Boot JDK.
21761      BOOT_JDK="$JAVA_HOME_PROCESSED"
21762      BOOT_JDK_FOUND=maybe
21763      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21764$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21765    fi
21766  fi
21767
21768
21769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21771      # Do we have a bin/java?
21772      if test ! -x "$BOOT_JDK/bin/java"; then
21773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21775        BOOT_JDK_FOUND=no
21776      else
21777        # Do we have a bin/javac?
21778        if test ! -x "$BOOT_JDK/bin/javac"; then
21779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21783          BOOT_JDK_FOUND=no
21784        else
21785          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21786          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21789            BOOT_JDK_FOUND=no
21790          else
21791            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21793
21794            # Extra M4 quote needed to protect [] in grep expression.
21795            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21796            if test "x$FOUND_CORRECT_VERSION" = x; then
21797              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21799              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21800$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21801              BOOT_JDK_FOUND=no
21802            else
21803              # We're done! :-)
21804              BOOT_JDK_FOUND=yes
21805
21806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21807
21808  # Input might be given as Windows format, start by converting to
21809  # unix format.
21810  path="$BOOT_JDK"
21811  new_path=`$CYGPATH -u "$path"`
21812
21813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21816  # "foo.exe" is OK but "foo" is an error.
21817  #
21818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21819  # It is also a way to make sure we got the proper file name for the real test later on.
21820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21821  if test "x$test_shortpath" = x; then
21822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21825  fi
21826
21827  # Call helper function which possibly converts this using DOS-style short mode.
21828  # If so, the updated path is stored in $new_path.
21829
21830  input_path="$new_path"
21831  # Check if we need to convert this using DOS-style short mode. If the path
21832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21833  # take no chances and rewrite it.
21834  # Note: m4 eats our [], so we need to use [ and ] instead.
21835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21836  if test "x$has_forbidden_chars" != x; then
21837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21841      # Going to short mode and back again did indeed matter. Since short mode is
21842      # case insensitive, let's make it lowercase to improve readability.
21843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21844      # Now convert it back to Unix-stile (cygpath)
21845      input_path=`$CYGPATH -u "$shortmode_path"`
21846      new_path="$input_path"
21847    fi
21848  fi
21849
21850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21851  if test "x$test_cygdrive_prefix" = x; then
21852    # As a simple fix, exclude /usr/bin since it's not a real path.
21853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21855      # a path prefixed by /cygdrive for fixpath to work.
21856      new_path="$CYGWIN_ROOT_PATH$input_path"
21857    fi
21858  fi
21859
21860
21861  if test "x$path" != "x$new_path"; then
21862    BOOT_JDK="$new_path"
21863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21865  fi
21866
21867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21868
21869  path="$BOOT_JDK"
21870  has_colon=`$ECHO $path | $GREP ^.:`
21871  new_path="$path"
21872  if test "x$has_colon" = x; then
21873    # Not in mixed or Windows style, start by that.
21874    new_path=`cmd //c echo $path`
21875  fi
21876
21877
21878  input_path="$new_path"
21879  # Check if we need to convert this using DOS-style short mode. If the path
21880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21881  # take no chances and rewrite it.
21882  # Note: m4 eats our [], so we need to use [ and ] instead.
21883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21884  if test "x$has_forbidden_chars" != x; then
21885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21887  fi
21888
21889
21890  windows_path="$new_path"
21891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21892    unix_path=`$CYGPATH -u "$windows_path"`
21893    new_path="$unix_path"
21894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21896    new_path="$unix_path"
21897  fi
21898
21899  if test "x$path" != "x$new_path"; then
21900    BOOT_JDK="$new_path"
21901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21903  fi
21904
21905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21907
21908  else
21909    # We're on a posix platform. Hooray! :)
21910    path="$BOOT_JDK"
21911    has_space=`$ECHO "$path" | $GREP " "`
21912    if test "x$has_space" != x; then
21913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21915      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21916    fi
21917
21918    # Use eval to expand a potential ~
21919    eval path="$path"
21920    if test ! -f "$path" && test ! -d "$path"; then
21921      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21922    fi
21923
21924    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21925  fi
21926
21927              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21928$as_echo_n "checking for Boot JDK... " >&6; }
21929              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21930$as_echo "$BOOT_JDK" >&6; }
21931              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21932$as_echo_n "checking Boot JDK version... " >&6; }
21933              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21934              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21935$as_echo "$BOOT_JDK_VERSION" >&6; }
21936            fi # end check jdk version
21937          fi # end check rt.jar
21938        fi # end check javac
21939      fi # end check java
21940    fi # end check boot jdk found
21941  fi
21942
21943
21944  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21945
21946  if test "x$BOOT_JDK_FOUND" = xno; then
21947    # Now execute the test
21948
21949  # Extract the first word of "javac", so it can be a program name with args.
21950set dummy javac; ac_word=$2
21951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21952$as_echo_n "checking for $ac_word... " >&6; }
21953if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21954  $as_echo_n "(cached) " >&6
21955else
21956  case $JAVAC_CHECK in
21957  [\\/]* | ?:[\\/]*)
21958  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21959  ;;
21960  *)
21961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21962for as_dir in $PATH
21963do
21964  IFS=$as_save_IFS
21965  test -z "$as_dir" && as_dir=.
21966    for ac_exec_ext in '' $ac_executable_extensions; do
21967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21968    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21970    break 2
21971  fi
21972done
21973  done
21974IFS=$as_save_IFS
21975
21976  ;;
21977esac
21978fi
21979JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21980if test -n "$JAVAC_CHECK"; then
21981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21982$as_echo "$JAVAC_CHECK" >&6; }
21983else
21984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21985$as_echo "no" >&6; }
21986fi
21987
21988
21989  # Extract the first word of "java", so it can be a program name with args.
21990set dummy java; ac_word=$2
21991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21992$as_echo_n "checking for $ac_word... " >&6; }
21993if ${ac_cv_path_JAVA_CHECK+:} false; then :
21994  $as_echo_n "(cached) " >&6
21995else
21996  case $JAVA_CHECK in
21997  [\\/]* | ?:[\\/]*)
21998  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21999  ;;
22000  *)
22001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22002for as_dir in $PATH
22003do
22004  IFS=$as_save_IFS
22005  test -z "$as_dir" && as_dir=.
22006    for ac_exec_ext in '' $ac_executable_extensions; do
22007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22008    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22010    break 2
22011  fi
22012done
22013  done
22014IFS=$as_save_IFS
22015
22016  ;;
22017esac
22018fi
22019JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22020if test -n "$JAVA_CHECK"; then
22021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22022$as_echo "$JAVA_CHECK" >&6; }
22023else
22024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22025$as_echo "no" >&6; }
22026fi
22027
22028
22029  BINARY="$JAVAC_CHECK"
22030  if test "x$JAVAC_CHECK" = x; then
22031    BINARY="$JAVA_CHECK"
22032  fi
22033  if test "x$BINARY" != x; then
22034    # So there is a java(c) binary, it might be part of a JDK.
22035    # Lets find the JDK/JRE directory by following symbolic links.
22036    # Linux/GNU systems often have links from /usr/bin/java to
22037    # /etc/alternatives/java to the real JDK binary.
22038
22039  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22040    # Follow a chain of symbolic links. Use readlink
22041    # where it exists, else fall back to horribly
22042    # complicated shell code.
22043    if test "x$READLINK_TESTED" != yes; then
22044      # On MacOSX there is a readlink tool with a different
22045      # purpose than the GNU readlink tool. Check the found readlink.
22046      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22047      if test "x$ISGNU" = x; then
22048        # A readlink that we do not know how to use.
22049        # Are there other non-GNU readlinks out there?
22050        READLINK_TESTED=yes
22051        READLINK=
22052      fi
22053    fi
22054
22055    if test "x$READLINK" != x; then
22056      BINARY=`$READLINK -f $BINARY`
22057    else
22058      # Save the current directory for restoring afterwards
22059      STARTDIR=$PWD
22060      COUNTER=0
22061      sym_link_dir=`$DIRNAME $BINARY`
22062      sym_link_file=`$BASENAME $BINARY`
22063      cd $sym_link_dir
22064      # Use -P flag to resolve symlinks in directories.
22065      cd `$THEPWDCMD -P`
22066      sym_link_dir=`$THEPWDCMD -P`
22067      # Resolve file symlinks
22068      while test $COUNTER -lt 20; do
22069        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22070        if test "x$ISLINK" == x; then
22071          # This is not a symbolic link! We are done!
22072          break
22073        fi
22074        # Again resolve directory symlinks since the target of the just found
22075        # link could be in a different directory
22076        cd `$DIRNAME $ISLINK`
22077        sym_link_dir=`$THEPWDCMD -P`
22078        sym_link_file=`$BASENAME $ISLINK`
22079        let COUNTER=COUNTER+1
22080      done
22081      cd $STARTDIR
22082      BINARY=$sym_link_dir/$sym_link_file
22083    fi
22084  fi
22085
22086    BOOT_JDK=`dirname "$BINARY"`
22087    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22088    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22089      # Looks like we found ourselves an JDK
22090      BOOT_JDK_FOUND=maybe
22091      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22092$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22093    fi
22094  fi
22095
22096
22097    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22098    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22099      # Do we have a bin/java?
22100      if test ! -x "$BOOT_JDK/bin/java"; then
22101        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22103        BOOT_JDK_FOUND=no
22104      else
22105        # Do we have a bin/javac?
22106        if test ! -x "$BOOT_JDK/bin/javac"; then
22107          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22109          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22110$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22111          BOOT_JDK_FOUND=no
22112        else
22113          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22114          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22115            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22117            BOOT_JDK_FOUND=no
22118          else
22119            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22120            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22121
22122            # Extra M4 quote needed to protect [] in grep expression.
22123            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22124            if test "x$FOUND_CORRECT_VERSION" = x; then
22125              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22127              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22128$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22129              BOOT_JDK_FOUND=no
22130            else
22131              # We're done! :-)
22132              BOOT_JDK_FOUND=yes
22133
22134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22135
22136  # Input might be given as Windows format, start by converting to
22137  # unix format.
22138  path="$BOOT_JDK"
22139  new_path=`$CYGPATH -u "$path"`
22140
22141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22144  # "foo.exe" is OK but "foo" is an error.
22145  #
22146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22147  # It is also a way to make sure we got the proper file name for the real test later on.
22148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22149  if test "x$test_shortpath" = x; then
22150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22152    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22153  fi
22154
22155  # Call helper function which possibly converts this using DOS-style short mode.
22156  # If so, the updated path is stored in $new_path.
22157
22158  input_path="$new_path"
22159  # Check if we need to convert this using DOS-style short mode. If the path
22160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22161  # take no chances and rewrite it.
22162  # Note: m4 eats our [], so we need to use [ and ] instead.
22163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22164  if test "x$has_forbidden_chars" != x; then
22165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22169      # Going to short mode and back again did indeed matter. Since short mode is
22170      # case insensitive, let's make it lowercase to improve readability.
22171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22172      # Now convert it back to Unix-stile (cygpath)
22173      input_path=`$CYGPATH -u "$shortmode_path"`
22174      new_path="$input_path"
22175    fi
22176  fi
22177
22178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22179  if test "x$test_cygdrive_prefix" = x; then
22180    # As a simple fix, exclude /usr/bin since it's not a real path.
22181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22183      # a path prefixed by /cygdrive for fixpath to work.
22184      new_path="$CYGWIN_ROOT_PATH$input_path"
22185    fi
22186  fi
22187
22188
22189  if test "x$path" != "x$new_path"; then
22190    BOOT_JDK="$new_path"
22191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22193  fi
22194
22195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22196
22197  path="$BOOT_JDK"
22198  has_colon=`$ECHO $path | $GREP ^.:`
22199  new_path="$path"
22200  if test "x$has_colon" = x; then
22201    # Not in mixed or Windows style, start by that.
22202    new_path=`cmd //c echo $path`
22203  fi
22204
22205
22206  input_path="$new_path"
22207  # Check if we need to convert this using DOS-style short mode. If the path
22208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22209  # take no chances and rewrite it.
22210  # Note: m4 eats our [], so we need to use [ and ] instead.
22211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22212  if test "x$has_forbidden_chars" != x; then
22213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22215  fi
22216
22217
22218  windows_path="$new_path"
22219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22220    unix_path=`$CYGPATH -u "$windows_path"`
22221    new_path="$unix_path"
22222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22224    new_path="$unix_path"
22225  fi
22226
22227  if test "x$path" != "x$new_path"; then
22228    BOOT_JDK="$new_path"
22229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22231  fi
22232
22233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22235
22236  else
22237    # We're on a posix platform. Hooray! :)
22238    path="$BOOT_JDK"
22239    has_space=`$ECHO "$path" | $GREP " "`
22240    if test "x$has_space" != x; then
22241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22243      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22244    fi
22245
22246    # Use eval to expand a potential ~
22247    eval path="$path"
22248    if test ! -f "$path" && test ! -d "$path"; then
22249      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22250    fi
22251
22252    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22253  fi
22254
22255              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22256$as_echo_n "checking for Boot JDK... " >&6; }
22257              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22258$as_echo "$BOOT_JDK" >&6; }
22259              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22260$as_echo_n "checking Boot JDK version... " >&6; }
22261              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22262              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22263$as_echo "$BOOT_JDK_VERSION" >&6; }
22264            fi # end check jdk version
22265          fi # end check rt.jar
22266        fi # end check javac
22267      fi # end check java
22268    fi # end check boot jdk found
22269  fi
22270
22271
22272  # Test: Is there a JDK installed in default, well-known locations?
22273
22274  if test "x$BOOT_JDK_FOUND" = xno; then
22275    # Now execute the test
22276
22277  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22278
22279  if test "x$BOOT_JDK_FOUND" = xno; then
22280    # Now execute the test
22281
22282  if test "x$ProgramW6432" != x; then
22283    VIRTUAL_DIR="$ProgramW6432/Java"
22284
22285  windows_path="$VIRTUAL_DIR"
22286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22287    unix_path=`$CYGPATH -u "$windows_path"`
22288    VIRTUAL_DIR="$unix_path"
22289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22291    VIRTUAL_DIR="$unix_path"
22292  fi
22293
22294
22295  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22296  BOOT_JDK_SUFFIX=""
22297  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22298  if test "x$ALL_JDKS_FOUND" != x; then
22299    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22300
22301  if test "x$BOOT_JDK_FOUND" = xno; then
22302    # Now execute the test
22303
22304        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22305        if test -d "$BOOT_JDK"; then
22306          BOOT_JDK_FOUND=maybe
22307          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22308$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22309        fi
22310
22311
22312    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22313    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22314      # Do we have a bin/java?
22315      if test ! -x "$BOOT_JDK/bin/java"; then
22316        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22318        BOOT_JDK_FOUND=no
22319      else
22320        # Do we have a bin/javac?
22321        if test ! -x "$BOOT_JDK/bin/javac"; then
22322          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22324          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22325$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22326          BOOT_JDK_FOUND=no
22327        else
22328          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22329          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22330            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22332            BOOT_JDK_FOUND=no
22333          else
22334            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22335            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22336
22337            # Extra M4 quote needed to protect [] in grep expression.
22338            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22339            if test "x$FOUND_CORRECT_VERSION" = x; then
22340              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22342              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22343$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22344              BOOT_JDK_FOUND=no
22345            else
22346              # We're done! :-)
22347              BOOT_JDK_FOUND=yes
22348
22349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22350
22351  # Input might be given as Windows format, start by converting to
22352  # unix format.
22353  path="$BOOT_JDK"
22354  new_path=`$CYGPATH -u "$path"`
22355
22356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22359  # "foo.exe" is OK but "foo" is an error.
22360  #
22361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22362  # It is also a way to make sure we got the proper file name for the real test later on.
22363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22364  if test "x$test_shortpath" = x; then
22365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22367    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22368  fi
22369
22370  # Call helper function which possibly converts this using DOS-style short mode.
22371  # If so, the updated path is stored in $new_path.
22372
22373  input_path="$new_path"
22374  # Check if we need to convert this using DOS-style short mode. If the path
22375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22376  # take no chances and rewrite it.
22377  # Note: m4 eats our [], so we need to use [ and ] instead.
22378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22379  if test "x$has_forbidden_chars" != x; then
22380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22384      # Going to short mode and back again did indeed matter. Since short mode is
22385      # case insensitive, let's make it lowercase to improve readability.
22386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22387      # Now convert it back to Unix-stile (cygpath)
22388      input_path=`$CYGPATH -u "$shortmode_path"`
22389      new_path="$input_path"
22390    fi
22391  fi
22392
22393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22394  if test "x$test_cygdrive_prefix" = x; then
22395    # As a simple fix, exclude /usr/bin since it's not a real path.
22396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22398      # a path prefixed by /cygdrive for fixpath to work.
22399      new_path="$CYGWIN_ROOT_PATH$input_path"
22400    fi
22401  fi
22402
22403
22404  if test "x$path" != "x$new_path"; then
22405    BOOT_JDK="$new_path"
22406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22408  fi
22409
22410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22411
22412  path="$BOOT_JDK"
22413  has_colon=`$ECHO $path | $GREP ^.:`
22414  new_path="$path"
22415  if test "x$has_colon" = x; then
22416    # Not in mixed or Windows style, start by that.
22417    new_path=`cmd //c echo $path`
22418  fi
22419
22420
22421  input_path="$new_path"
22422  # Check if we need to convert this using DOS-style short mode. If the path
22423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22424  # take no chances and rewrite it.
22425  # Note: m4 eats our [], so we need to use [ and ] instead.
22426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22427  if test "x$has_forbidden_chars" != x; then
22428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22430  fi
22431
22432
22433  windows_path="$new_path"
22434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22435    unix_path=`$CYGPATH -u "$windows_path"`
22436    new_path="$unix_path"
22437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22439    new_path="$unix_path"
22440  fi
22441
22442  if test "x$path" != "x$new_path"; then
22443    BOOT_JDK="$new_path"
22444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22446  fi
22447
22448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22450
22451  else
22452    # We're on a posix platform. Hooray! :)
22453    path="$BOOT_JDK"
22454    has_space=`$ECHO "$path" | $GREP " "`
22455    if test "x$has_space" != x; then
22456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22458      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22459    fi
22460
22461    # Use eval to expand a potential ~
22462    eval path="$path"
22463    if test ! -f "$path" && test ! -d "$path"; then
22464      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22465    fi
22466
22467    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22468  fi
22469
22470              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22471$as_echo_n "checking for Boot JDK... " >&6; }
22472              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22473$as_echo "$BOOT_JDK" >&6; }
22474              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22475$as_echo_n "checking Boot JDK version... " >&6; }
22476              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22477              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22478$as_echo "$BOOT_JDK_VERSION" >&6; }
22479            fi # end check jdk version
22480          fi # end check rt.jar
22481        fi # end check javac
22482      fi # end check java
22483    fi # end check boot jdk found
22484  fi
22485
22486    done
22487  fi
22488
22489  fi
22490
22491
22492    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22493    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22494      # Do we have a bin/java?
22495      if test ! -x "$BOOT_JDK/bin/java"; then
22496        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22498        BOOT_JDK_FOUND=no
22499      else
22500        # Do we have a bin/javac?
22501        if test ! -x "$BOOT_JDK/bin/javac"; then
22502          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22504          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22505$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22506          BOOT_JDK_FOUND=no
22507        else
22508          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22509          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22510            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22512            BOOT_JDK_FOUND=no
22513          else
22514            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22515            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22516
22517            # Extra M4 quote needed to protect [] in grep expression.
22518            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22519            if test "x$FOUND_CORRECT_VERSION" = x; then
22520              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22522              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22523$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22524              BOOT_JDK_FOUND=no
22525            else
22526              # We're done! :-)
22527              BOOT_JDK_FOUND=yes
22528
22529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22530
22531  # Input might be given as Windows format, start by converting to
22532  # unix format.
22533  path="$BOOT_JDK"
22534  new_path=`$CYGPATH -u "$path"`
22535
22536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22539  # "foo.exe" is OK but "foo" is an error.
22540  #
22541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22542  # It is also a way to make sure we got the proper file name for the real test later on.
22543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22544  if test "x$test_shortpath" = x; then
22545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22547    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22548  fi
22549
22550  # Call helper function which possibly converts this using DOS-style short mode.
22551  # If so, the updated path is stored in $new_path.
22552
22553  input_path="$new_path"
22554  # Check if we need to convert this using DOS-style short mode. If the path
22555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22556  # take no chances and rewrite it.
22557  # Note: m4 eats our [], so we need to use [ and ] instead.
22558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22559  if test "x$has_forbidden_chars" != x; then
22560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22564      # Going to short mode and back again did indeed matter. Since short mode is
22565      # case insensitive, let's make it lowercase to improve readability.
22566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22567      # Now convert it back to Unix-stile (cygpath)
22568      input_path=`$CYGPATH -u "$shortmode_path"`
22569      new_path="$input_path"
22570    fi
22571  fi
22572
22573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22574  if test "x$test_cygdrive_prefix" = x; then
22575    # As a simple fix, exclude /usr/bin since it's not a real path.
22576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22578      # a path prefixed by /cygdrive for fixpath to work.
22579      new_path="$CYGWIN_ROOT_PATH$input_path"
22580    fi
22581  fi
22582
22583
22584  if test "x$path" != "x$new_path"; then
22585    BOOT_JDK="$new_path"
22586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22587$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22588  fi
22589
22590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22591
22592  path="$BOOT_JDK"
22593  has_colon=`$ECHO $path | $GREP ^.:`
22594  new_path="$path"
22595  if test "x$has_colon" = x; then
22596    # Not in mixed or Windows style, start by that.
22597    new_path=`cmd //c echo $path`
22598  fi
22599
22600
22601  input_path="$new_path"
22602  # Check if we need to convert this using DOS-style short mode. If the path
22603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22604  # take no chances and rewrite it.
22605  # Note: m4 eats our [], so we need to use [ and ] instead.
22606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22607  if test "x$has_forbidden_chars" != x; then
22608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22610  fi
22611
22612
22613  windows_path="$new_path"
22614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22615    unix_path=`$CYGPATH -u "$windows_path"`
22616    new_path="$unix_path"
22617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22619    new_path="$unix_path"
22620  fi
22621
22622  if test "x$path" != "x$new_path"; then
22623    BOOT_JDK="$new_path"
22624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22626  fi
22627
22628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22630
22631  else
22632    # We're on a posix platform. Hooray! :)
22633    path="$BOOT_JDK"
22634    has_space=`$ECHO "$path" | $GREP " "`
22635    if test "x$has_space" != x; then
22636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22638      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22639    fi
22640
22641    # Use eval to expand a potential ~
22642    eval path="$path"
22643    if test ! -f "$path" && test ! -d "$path"; then
22644      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22645    fi
22646
22647    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22648  fi
22649
22650              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22651$as_echo_n "checking for Boot JDK... " >&6; }
22652              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22653$as_echo "$BOOT_JDK" >&6; }
22654              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22655$as_echo_n "checking Boot JDK version... " >&6; }
22656              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22658$as_echo "$BOOT_JDK_VERSION" >&6; }
22659            fi # end check jdk version
22660          fi # end check rt.jar
22661        fi # end check javac
22662      fi # end check java
22663    fi # end check boot jdk found
22664  fi
22665
22666
22667  if test "x$BOOT_JDK_FOUND" = xno; then
22668    # Now execute the test
22669
22670  if test "x$PROGRAMW6432" != x; then
22671    VIRTUAL_DIR="$PROGRAMW6432/Java"
22672
22673  windows_path="$VIRTUAL_DIR"
22674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22675    unix_path=`$CYGPATH -u "$windows_path"`
22676    VIRTUAL_DIR="$unix_path"
22677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22679    VIRTUAL_DIR="$unix_path"
22680  fi
22681
22682
22683  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22684  BOOT_JDK_SUFFIX=""
22685  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22686  if test "x$ALL_JDKS_FOUND" != x; then
22687    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22688
22689  if test "x$BOOT_JDK_FOUND" = xno; then
22690    # Now execute the test
22691
22692        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22693        if test -d "$BOOT_JDK"; then
22694          BOOT_JDK_FOUND=maybe
22695          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22696$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22697        fi
22698
22699
22700    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22701    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22702      # Do we have a bin/java?
22703      if test ! -x "$BOOT_JDK/bin/java"; then
22704        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22706        BOOT_JDK_FOUND=no
22707      else
22708        # Do we have a bin/javac?
22709        if test ! -x "$BOOT_JDK/bin/javac"; then
22710          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22712          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22713$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22714          BOOT_JDK_FOUND=no
22715        else
22716          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22717          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22718            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22720            BOOT_JDK_FOUND=no
22721          else
22722            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22724
22725            # Extra M4 quote needed to protect [] in grep expression.
22726            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22727            if test "x$FOUND_CORRECT_VERSION" = x; then
22728              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22730              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22731$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22732              BOOT_JDK_FOUND=no
22733            else
22734              # We're done! :-)
22735              BOOT_JDK_FOUND=yes
22736
22737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22738
22739  # Input might be given as Windows format, start by converting to
22740  # unix format.
22741  path="$BOOT_JDK"
22742  new_path=`$CYGPATH -u "$path"`
22743
22744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22747  # "foo.exe" is OK but "foo" is an error.
22748  #
22749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22750  # It is also a way to make sure we got the proper file name for the real test later on.
22751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22752  if test "x$test_shortpath" = x; then
22753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22755    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22756  fi
22757
22758  # Call helper function which possibly converts this using DOS-style short mode.
22759  # If so, the updated path is stored in $new_path.
22760
22761  input_path="$new_path"
22762  # Check if we need to convert this using DOS-style short mode. If the path
22763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22764  # take no chances and rewrite it.
22765  # Note: m4 eats our [], so we need to use [ and ] instead.
22766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22767  if test "x$has_forbidden_chars" != x; then
22768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22772      # Going to short mode and back again did indeed matter. Since short mode is
22773      # case insensitive, let's make it lowercase to improve readability.
22774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22775      # Now convert it back to Unix-stile (cygpath)
22776      input_path=`$CYGPATH -u "$shortmode_path"`
22777      new_path="$input_path"
22778    fi
22779  fi
22780
22781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22782  if test "x$test_cygdrive_prefix" = x; then
22783    # As a simple fix, exclude /usr/bin since it's not a real path.
22784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22786      # a path prefixed by /cygdrive for fixpath to work.
22787      new_path="$CYGWIN_ROOT_PATH$input_path"
22788    fi
22789  fi
22790
22791
22792  if test "x$path" != "x$new_path"; then
22793    BOOT_JDK="$new_path"
22794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22796  fi
22797
22798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22799
22800  path="$BOOT_JDK"
22801  has_colon=`$ECHO $path | $GREP ^.:`
22802  new_path="$path"
22803  if test "x$has_colon" = x; then
22804    # Not in mixed or Windows style, start by that.
22805    new_path=`cmd //c echo $path`
22806  fi
22807
22808
22809  input_path="$new_path"
22810  # Check if we need to convert this using DOS-style short mode. If the path
22811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22812  # take no chances and rewrite it.
22813  # Note: m4 eats our [], so we need to use [ and ] instead.
22814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22815  if test "x$has_forbidden_chars" != x; then
22816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22818  fi
22819
22820
22821  windows_path="$new_path"
22822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22823    unix_path=`$CYGPATH -u "$windows_path"`
22824    new_path="$unix_path"
22825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22827    new_path="$unix_path"
22828  fi
22829
22830  if test "x$path" != "x$new_path"; then
22831    BOOT_JDK="$new_path"
22832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22834  fi
22835
22836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22838
22839  else
22840    # We're on a posix platform. Hooray! :)
22841    path="$BOOT_JDK"
22842    has_space=`$ECHO "$path" | $GREP " "`
22843    if test "x$has_space" != x; then
22844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22846      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22847    fi
22848
22849    # Use eval to expand a potential ~
22850    eval path="$path"
22851    if test ! -f "$path" && test ! -d "$path"; then
22852      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22853    fi
22854
22855    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22856  fi
22857
22858              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22859$as_echo_n "checking for Boot JDK... " >&6; }
22860              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22861$as_echo "$BOOT_JDK" >&6; }
22862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22863$as_echo_n "checking Boot JDK version... " >&6; }
22864              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22865              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22866$as_echo "$BOOT_JDK_VERSION" >&6; }
22867            fi # end check jdk version
22868          fi # end check rt.jar
22869        fi # end check javac
22870      fi # end check java
22871    fi # end check boot jdk found
22872  fi
22873
22874    done
22875  fi
22876
22877  fi
22878
22879
22880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22882      # Do we have a bin/java?
22883      if test ! -x "$BOOT_JDK/bin/java"; then
22884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22886        BOOT_JDK_FOUND=no
22887      else
22888        # Do we have a bin/javac?
22889        if test ! -x "$BOOT_JDK/bin/javac"; then
22890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22894          BOOT_JDK_FOUND=no
22895        else
22896          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22897          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22898            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22900            BOOT_JDK_FOUND=no
22901          else
22902            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22904
22905            # Extra M4 quote needed to protect [] in grep expression.
22906            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22907            if test "x$FOUND_CORRECT_VERSION" = x; then
22908              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22910              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22911$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22912              BOOT_JDK_FOUND=no
22913            else
22914              # We're done! :-)
22915              BOOT_JDK_FOUND=yes
22916
22917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22918
22919  # Input might be given as Windows format, start by converting to
22920  # unix format.
22921  path="$BOOT_JDK"
22922  new_path=`$CYGPATH -u "$path"`
22923
22924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22927  # "foo.exe" is OK but "foo" is an error.
22928  #
22929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22930  # It is also a way to make sure we got the proper file name for the real test later on.
22931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22932  if test "x$test_shortpath" = x; then
22933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22935    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22936  fi
22937
22938  # Call helper function which possibly converts this using DOS-style short mode.
22939  # If so, the updated path is stored in $new_path.
22940
22941  input_path="$new_path"
22942  # Check if we need to convert this using DOS-style short mode. If the path
22943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22944  # take no chances and rewrite it.
22945  # Note: m4 eats our [], so we need to use [ and ] instead.
22946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22947  if test "x$has_forbidden_chars" != x; then
22948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22952      # Going to short mode and back again did indeed matter. Since short mode is
22953      # case insensitive, let's make it lowercase to improve readability.
22954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22955      # Now convert it back to Unix-stile (cygpath)
22956      input_path=`$CYGPATH -u "$shortmode_path"`
22957      new_path="$input_path"
22958    fi
22959  fi
22960
22961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22962  if test "x$test_cygdrive_prefix" = x; then
22963    # As a simple fix, exclude /usr/bin since it's not a real path.
22964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22966      # a path prefixed by /cygdrive for fixpath to work.
22967      new_path="$CYGWIN_ROOT_PATH$input_path"
22968    fi
22969  fi
22970
22971
22972  if test "x$path" != "x$new_path"; then
22973    BOOT_JDK="$new_path"
22974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22975$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22976  fi
22977
22978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22979
22980  path="$BOOT_JDK"
22981  has_colon=`$ECHO $path | $GREP ^.:`
22982  new_path="$path"
22983  if test "x$has_colon" = x; then
22984    # Not in mixed or Windows style, start by that.
22985    new_path=`cmd //c echo $path`
22986  fi
22987
22988
22989  input_path="$new_path"
22990  # Check if we need to convert this using DOS-style short mode. If the path
22991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22992  # take no chances and rewrite it.
22993  # Note: m4 eats our [], so we need to use [ and ] instead.
22994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22995  if test "x$has_forbidden_chars" != x; then
22996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22998  fi
22999
23000
23001  windows_path="$new_path"
23002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23003    unix_path=`$CYGPATH -u "$windows_path"`
23004    new_path="$unix_path"
23005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23007    new_path="$unix_path"
23008  fi
23009
23010  if test "x$path" != "x$new_path"; then
23011    BOOT_JDK="$new_path"
23012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23014  fi
23015
23016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23018
23019  else
23020    # We're on a posix platform. Hooray! :)
23021    path="$BOOT_JDK"
23022    has_space=`$ECHO "$path" | $GREP " "`
23023    if test "x$has_space" != x; then
23024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23026      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23027    fi
23028
23029    # Use eval to expand a potential ~
23030    eval path="$path"
23031    if test ! -f "$path" && test ! -d "$path"; then
23032      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23033    fi
23034
23035    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23036  fi
23037
23038              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23039$as_echo_n "checking for Boot JDK... " >&6; }
23040              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23041$as_echo "$BOOT_JDK" >&6; }
23042              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23043$as_echo_n "checking Boot JDK version... " >&6; }
23044              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23045              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23046$as_echo "$BOOT_JDK_VERSION" >&6; }
23047            fi # end check jdk version
23048          fi # end check rt.jar
23049        fi # end check javac
23050      fi # end check java
23051    fi # end check boot jdk found
23052  fi
23053
23054
23055  if test "x$BOOT_JDK_FOUND" = xno; then
23056    # Now execute the test
23057
23058  if test "x$PROGRAMFILES" != x; then
23059    VIRTUAL_DIR="$PROGRAMFILES/Java"
23060
23061  windows_path="$VIRTUAL_DIR"
23062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23063    unix_path=`$CYGPATH -u "$windows_path"`
23064    VIRTUAL_DIR="$unix_path"
23065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23067    VIRTUAL_DIR="$unix_path"
23068  fi
23069
23070
23071  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23072  BOOT_JDK_SUFFIX=""
23073  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23074  if test "x$ALL_JDKS_FOUND" != x; then
23075    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23076
23077  if test "x$BOOT_JDK_FOUND" = xno; then
23078    # Now execute the test
23079
23080        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23081        if test -d "$BOOT_JDK"; then
23082          BOOT_JDK_FOUND=maybe
23083          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23084$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23085        fi
23086
23087
23088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23090      # Do we have a bin/java?
23091      if test ! -x "$BOOT_JDK/bin/java"; then
23092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23094        BOOT_JDK_FOUND=no
23095      else
23096        # Do we have a bin/javac?
23097        if test ! -x "$BOOT_JDK/bin/javac"; then
23098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23102          BOOT_JDK_FOUND=no
23103        else
23104          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23105          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23106            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23108            BOOT_JDK_FOUND=no
23109          else
23110            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23111            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23112
23113            # Extra M4 quote needed to protect [] in grep expression.
23114            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23115            if test "x$FOUND_CORRECT_VERSION" = x; then
23116              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23118              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23119$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23120              BOOT_JDK_FOUND=no
23121            else
23122              # We're done! :-)
23123              BOOT_JDK_FOUND=yes
23124
23125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23126
23127  # Input might be given as Windows format, start by converting to
23128  # unix format.
23129  path="$BOOT_JDK"
23130  new_path=`$CYGPATH -u "$path"`
23131
23132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23135  # "foo.exe" is OK but "foo" is an error.
23136  #
23137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23138  # It is also a way to make sure we got the proper file name for the real test later on.
23139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23140  if test "x$test_shortpath" = x; then
23141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23142$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23143    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23144  fi
23145
23146  # Call helper function which possibly converts this using DOS-style short mode.
23147  # If so, the updated path is stored in $new_path.
23148
23149  input_path="$new_path"
23150  # Check if we need to convert this using DOS-style short mode. If the path
23151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23152  # take no chances and rewrite it.
23153  # Note: m4 eats our [], so we need to use [ and ] instead.
23154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23155  if test "x$has_forbidden_chars" != x; then
23156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23160      # Going to short mode and back again did indeed matter. Since short mode is
23161      # case insensitive, let's make it lowercase to improve readability.
23162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23163      # Now convert it back to Unix-stile (cygpath)
23164      input_path=`$CYGPATH -u "$shortmode_path"`
23165      new_path="$input_path"
23166    fi
23167  fi
23168
23169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23170  if test "x$test_cygdrive_prefix" = x; then
23171    # As a simple fix, exclude /usr/bin since it's not a real path.
23172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23174      # a path prefixed by /cygdrive for fixpath to work.
23175      new_path="$CYGWIN_ROOT_PATH$input_path"
23176    fi
23177  fi
23178
23179
23180  if test "x$path" != "x$new_path"; then
23181    BOOT_JDK="$new_path"
23182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23184  fi
23185
23186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23187
23188  path="$BOOT_JDK"
23189  has_colon=`$ECHO $path | $GREP ^.:`
23190  new_path="$path"
23191  if test "x$has_colon" = x; then
23192    # Not in mixed or Windows style, start by that.
23193    new_path=`cmd //c echo $path`
23194  fi
23195
23196
23197  input_path="$new_path"
23198  # Check if we need to convert this using DOS-style short mode. If the path
23199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23200  # take no chances and rewrite it.
23201  # Note: m4 eats our [], so we need to use [ and ] instead.
23202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23203  if test "x$has_forbidden_chars" != x; then
23204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23206  fi
23207
23208
23209  windows_path="$new_path"
23210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23211    unix_path=`$CYGPATH -u "$windows_path"`
23212    new_path="$unix_path"
23213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23215    new_path="$unix_path"
23216  fi
23217
23218  if test "x$path" != "x$new_path"; then
23219    BOOT_JDK="$new_path"
23220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23222  fi
23223
23224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23226
23227  else
23228    # We're on a posix platform. Hooray! :)
23229    path="$BOOT_JDK"
23230    has_space=`$ECHO "$path" | $GREP " "`
23231    if test "x$has_space" != x; then
23232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23234      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23235    fi
23236
23237    # Use eval to expand a potential ~
23238    eval path="$path"
23239    if test ! -f "$path" && test ! -d "$path"; then
23240      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23241    fi
23242
23243    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23244  fi
23245
23246              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23247$as_echo_n "checking for Boot JDK... " >&6; }
23248              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23249$as_echo "$BOOT_JDK" >&6; }
23250              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23251$as_echo_n "checking Boot JDK version... " >&6; }
23252              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23253              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23254$as_echo "$BOOT_JDK_VERSION" >&6; }
23255            fi # end check jdk version
23256          fi # end check rt.jar
23257        fi # end check javac
23258      fi # end check java
23259    fi # end check boot jdk found
23260  fi
23261
23262    done
23263  fi
23264
23265  fi
23266
23267
23268    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23269    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23270      # Do we have a bin/java?
23271      if test ! -x "$BOOT_JDK/bin/java"; then
23272        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23274        BOOT_JDK_FOUND=no
23275      else
23276        # Do we have a bin/javac?
23277        if test ! -x "$BOOT_JDK/bin/javac"; then
23278          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23280          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23281$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23282          BOOT_JDK_FOUND=no
23283        else
23284          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23285          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23288            BOOT_JDK_FOUND=no
23289          else
23290            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23292
23293            # Extra M4 quote needed to protect [] in grep expression.
23294            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23295            if test "x$FOUND_CORRECT_VERSION" = x; then
23296              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23298              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23300              BOOT_JDK_FOUND=no
23301            else
23302              # We're done! :-)
23303              BOOT_JDK_FOUND=yes
23304
23305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23306
23307  # Input might be given as Windows format, start by converting to
23308  # unix format.
23309  path="$BOOT_JDK"
23310  new_path=`$CYGPATH -u "$path"`
23311
23312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23315  # "foo.exe" is OK but "foo" is an error.
23316  #
23317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23318  # It is also a way to make sure we got the proper file name for the real test later on.
23319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23320  if test "x$test_shortpath" = x; then
23321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23323    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23324  fi
23325
23326  # Call helper function which possibly converts this using DOS-style short mode.
23327  # If so, the updated path is stored in $new_path.
23328
23329  input_path="$new_path"
23330  # Check if we need to convert this using DOS-style short mode. If the path
23331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23332  # take no chances and rewrite it.
23333  # Note: m4 eats our [], so we need to use [ and ] instead.
23334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23335  if test "x$has_forbidden_chars" != x; then
23336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23340      # Going to short mode and back again did indeed matter. Since short mode is
23341      # case insensitive, let's make it lowercase to improve readability.
23342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23343      # Now convert it back to Unix-stile (cygpath)
23344      input_path=`$CYGPATH -u "$shortmode_path"`
23345      new_path="$input_path"
23346    fi
23347  fi
23348
23349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23350  if test "x$test_cygdrive_prefix" = x; then
23351    # As a simple fix, exclude /usr/bin since it's not a real path.
23352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23354      # a path prefixed by /cygdrive for fixpath to work.
23355      new_path="$CYGWIN_ROOT_PATH$input_path"
23356    fi
23357  fi
23358
23359
23360  if test "x$path" != "x$new_path"; then
23361    BOOT_JDK="$new_path"
23362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23364  fi
23365
23366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23367
23368  path="$BOOT_JDK"
23369  has_colon=`$ECHO $path | $GREP ^.:`
23370  new_path="$path"
23371  if test "x$has_colon" = x; then
23372    # Not in mixed or Windows style, start by that.
23373    new_path=`cmd //c echo $path`
23374  fi
23375
23376
23377  input_path="$new_path"
23378  # Check if we need to convert this using DOS-style short mode. If the path
23379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23380  # take no chances and rewrite it.
23381  # Note: m4 eats our [], so we need to use [ and ] instead.
23382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23383  if test "x$has_forbidden_chars" != x; then
23384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23386  fi
23387
23388
23389  windows_path="$new_path"
23390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23391    unix_path=`$CYGPATH -u "$windows_path"`
23392    new_path="$unix_path"
23393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23395    new_path="$unix_path"
23396  fi
23397
23398  if test "x$path" != "x$new_path"; then
23399    BOOT_JDK="$new_path"
23400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23402  fi
23403
23404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23406
23407  else
23408    # We're on a posix platform. Hooray! :)
23409    path="$BOOT_JDK"
23410    has_space=`$ECHO "$path" | $GREP " "`
23411    if test "x$has_space" != x; then
23412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23414      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23415    fi
23416
23417    # Use eval to expand a potential ~
23418    eval path="$path"
23419    if test ! -f "$path" && test ! -d "$path"; then
23420      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23421    fi
23422
23423    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23424  fi
23425
23426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23427$as_echo_n "checking for Boot JDK... " >&6; }
23428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23429$as_echo "$BOOT_JDK" >&6; }
23430              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23431$as_echo_n "checking Boot JDK version... " >&6; }
23432              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23433              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23434$as_echo "$BOOT_JDK_VERSION" >&6; }
23435            fi # end check jdk version
23436          fi # end check rt.jar
23437        fi # end check javac
23438      fi # end check java
23439    fi # end check boot jdk found
23440  fi
23441
23442
23443  if test "x$BOOT_JDK_FOUND" = xno; then
23444    # Now execute the test
23445
23446  if test "x$ProgramFiles" != x; then
23447    VIRTUAL_DIR="$ProgramFiles/Java"
23448
23449  windows_path="$VIRTUAL_DIR"
23450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23451    unix_path=`$CYGPATH -u "$windows_path"`
23452    VIRTUAL_DIR="$unix_path"
23453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23455    VIRTUAL_DIR="$unix_path"
23456  fi
23457
23458
23459  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23460  BOOT_JDK_SUFFIX=""
23461  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23462  if test "x$ALL_JDKS_FOUND" != x; then
23463    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23464
23465  if test "x$BOOT_JDK_FOUND" = xno; then
23466    # Now execute the test
23467
23468        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23469        if test -d "$BOOT_JDK"; then
23470          BOOT_JDK_FOUND=maybe
23471          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23472$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23473        fi
23474
23475
23476    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23477    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23478      # Do we have a bin/java?
23479      if test ! -x "$BOOT_JDK/bin/java"; then
23480        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23482        BOOT_JDK_FOUND=no
23483      else
23484        # Do we have a bin/javac?
23485        if test ! -x "$BOOT_JDK/bin/javac"; then
23486          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23488          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23489$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23490          BOOT_JDK_FOUND=no
23491        else
23492          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23493          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23494            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23496            BOOT_JDK_FOUND=no
23497          else
23498            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23499            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23500
23501            # Extra M4 quote needed to protect [] in grep expression.
23502            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23503            if test "x$FOUND_CORRECT_VERSION" = x; then
23504              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23506              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23507$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23508              BOOT_JDK_FOUND=no
23509            else
23510              # We're done! :-)
23511              BOOT_JDK_FOUND=yes
23512
23513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23514
23515  # Input might be given as Windows format, start by converting to
23516  # unix format.
23517  path="$BOOT_JDK"
23518  new_path=`$CYGPATH -u "$path"`
23519
23520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23523  # "foo.exe" is OK but "foo" is an error.
23524  #
23525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23526  # It is also a way to make sure we got the proper file name for the real test later on.
23527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23528  if test "x$test_shortpath" = x; then
23529    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23531    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23532  fi
23533
23534  # Call helper function which possibly converts this using DOS-style short mode.
23535  # If so, the updated path is stored in $new_path.
23536
23537  input_path="$new_path"
23538  # Check if we need to convert this using DOS-style short mode. If the path
23539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23540  # take no chances and rewrite it.
23541  # Note: m4 eats our [], so we need to use [ and ] instead.
23542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23543  if test "x$has_forbidden_chars" != x; then
23544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23548      # Going to short mode and back again did indeed matter. Since short mode is
23549      # case insensitive, let's make it lowercase to improve readability.
23550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23551      # Now convert it back to Unix-stile (cygpath)
23552      input_path=`$CYGPATH -u "$shortmode_path"`
23553      new_path="$input_path"
23554    fi
23555  fi
23556
23557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23558  if test "x$test_cygdrive_prefix" = x; then
23559    # As a simple fix, exclude /usr/bin since it's not a real path.
23560    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23562      # a path prefixed by /cygdrive for fixpath to work.
23563      new_path="$CYGWIN_ROOT_PATH$input_path"
23564    fi
23565  fi
23566
23567
23568  if test "x$path" != "x$new_path"; then
23569    BOOT_JDK="$new_path"
23570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23572  fi
23573
23574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23575
23576  path="$BOOT_JDK"
23577  has_colon=`$ECHO $path | $GREP ^.:`
23578  new_path="$path"
23579  if test "x$has_colon" = x; then
23580    # Not in mixed or Windows style, start by that.
23581    new_path=`cmd //c echo $path`
23582  fi
23583
23584
23585  input_path="$new_path"
23586  # Check if we need to convert this using DOS-style short mode. If the path
23587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23588  # take no chances and rewrite it.
23589  # Note: m4 eats our [], so we need to use [ and ] instead.
23590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23591  if test "x$has_forbidden_chars" != x; then
23592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23594  fi
23595
23596
23597  windows_path="$new_path"
23598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23599    unix_path=`$CYGPATH -u "$windows_path"`
23600    new_path="$unix_path"
23601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23603    new_path="$unix_path"
23604  fi
23605
23606  if test "x$path" != "x$new_path"; then
23607    BOOT_JDK="$new_path"
23608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23610  fi
23611
23612  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23613  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23614
23615  else
23616    # We're on a posix platform. Hooray! :)
23617    path="$BOOT_JDK"
23618    has_space=`$ECHO "$path" | $GREP " "`
23619    if test "x$has_space" != x; then
23620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23622      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23623    fi
23624
23625    # Use eval to expand a potential ~
23626    eval path="$path"
23627    if test ! -f "$path" && test ! -d "$path"; then
23628      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23629    fi
23630
23631    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23632  fi
23633
23634              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23635$as_echo_n "checking for Boot JDK... " >&6; }
23636              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23637$as_echo "$BOOT_JDK" >&6; }
23638              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23639$as_echo_n "checking Boot JDK version... " >&6; }
23640              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23641              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23642$as_echo "$BOOT_JDK_VERSION" >&6; }
23643            fi # end check jdk version
23644          fi # end check rt.jar
23645        fi # end check javac
23646      fi # end check java
23647    fi # end check boot jdk found
23648  fi
23649
23650    done
23651  fi
23652
23653  fi
23654
23655
23656    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23657    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23658      # Do we have a bin/java?
23659      if test ! -x "$BOOT_JDK/bin/java"; then
23660        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23662        BOOT_JDK_FOUND=no
23663      else
23664        # Do we have a bin/javac?
23665        if test ! -x "$BOOT_JDK/bin/javac"; then
23666          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23668          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23669$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23670          BOOT_JDK_FOUND=no
23671        else
23672          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23673          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23674            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23676            BOOT_JDK_FOUND=no
23677          else
23678            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23680
23681            # Extra M4 quote needed to protect [] in grep expression.
23682            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23683            if test "x$FOUND_CORRECT_VERSION" = x; then
23684              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23686              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23687$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23688              BOOT_JDK_FOUND=no
23689            else
23690              # We're done! :-)
23691              BOOT_JDK_FOUND=yes
23692
23693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23694
23695  # Input might be given as Windows format, start by converting to
23696  # unix format.
23697  path="$BOOT_JDK"
23698  new_path=`$CYGPATH -u "$path"`
23699
23700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23703  # "foo.exe" is OK but "foo" is an error.
23704  #
23705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23706  # It is also a way to make sure we got the proper file name for the real test later on.
23707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23708  if test "x$test_shortpath" = x; then
23709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23711    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23712  fi
23713
23714  # Call helper function which possibly converts this using DOS-style short mode.
23715  # If so, the updated path is stored in $new_path.
23716
23717  input_path="$new_path"
23718  # Check if we need to convert this using DOS-style short mode. If the path
23719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23720  # take no chances and rewrite it.
23721  # Note: m4 eats our [], so we need to use [ and ] instead.
23722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23723  if test "x$has_forbidden_chars" != x; then
23724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23728      # Going to short mode and back again did indeed matter. Since short mode is
23729      # case insensitive, let's make it lowercase to improve readability.
23730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23731      # Now convert it back to Unix-stile (cygpath)
23732      input_path=`$CYGPATH -u "$shortmode_path"`
23733      new_path="$input_path"
23734    fi
23735  fi
23736
23737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23738  if test "x$test_cygdrive_prefix" = x; then
23739    # As a simple fix, exclude /usr/bin since it's not a real path.
23740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23742      # a path prefixed by /cygdrive for fixpath to work.
23743      new_path="$CYGWIN_ROOT_PATH$input_path"
23744    fi
23745  fi
23746
23747
23748  if test "x$path" != "x$new_path"; then
23749    BOOT_JDK="$new_path"
23750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23752  fi
23753
23754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23755
23756  path="$BOOT_JDK"
23757  has_colon=`$ECHO $path | $GREP ^.:`
23758  new_path="$path"
23759  if test "x$has_colon" = x; then
23760    # Not in mixed or Windows style, start by that.
23761    new_path=`cmd //c echo $path`
23762  fi
23763
23764
23765  input_path="$new_path"
23766  # Check if we need to convert this using DOS-style short mode. If the path
23767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23768  # take no chances and rewrite it.
23769  # Note: m4 eats our [], so we need to use [ and ] instead.
23770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23771  if test "x$has_forbidden_chars" != x; then
23772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23774  fi
23775
23776
23777  windows_path="$new_path"
23778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23779    unix_path=`$CYGPATH -u "$windows_path"`
23780    new_path="$unix_path"
23781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23783    new_path="$unix_path"
23784  fi
23785
23786  if test "x$path" != "x$new_path"; then
23787    BOOT_JDK="$new_path"
23788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23790  fi
23791
23792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23794
23795  else
23796    # We're on a posix platform. Hooray! :)
23797    path="$BOOT_JDK"
23798    has_space=`$ECHO "$path" | $GREP " "`
23799    if test "x$has_space" != x; then
23800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23802      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23803    fi
23804
23805    # Use eval to expand a potential ~
23806    eval path="$path"
23807    if test ! -f "$path" && test ! -d "$path"; then
23808      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23809    fi
23810
23811    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23812  fi
23813
23814              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23815$as_echo_n "checking for Boot JDK... " >&6; }
23816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23817$as_echo "$BOOT_JDK" >&6; }
23818              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23819$as_echo_n "checking Boot JDK version... " >&6; }
23820              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23821              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23822$as_echo "$BOOT_JDK_VERSION" >&6; }
23823            fi # end check jdk version
23824          fi # end check rt.jar
23825        fi # end check javac
23826      fi # end check java
23827    fi # end check boot jdk found
23828  fi
23829
23830
23831  if test "x$BOOT_JDK_FOUND" = xno; then
23832    # Now execute the test
23833
23834  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23835  BOOT_JDK_SUFFIX=""
23836  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23837  if test "x$ALL_JDKS_FOUND" != x; then
23838    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23839
23840  if test "x$BOOT_JDK_FOUND" = xno; then
23841    # Now execute the test
23842
23843        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23844        if test -d "$BOOT_JDK"; then
23845          BOOT_JDK_FOUND=maybe
23846          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23847$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23848        fi
23849
23850
23851    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23852    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23853      # Do we have a bin/java?
23854      if test ! -x "$BOOT_JDK/bin/java"; then
23855        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23857        BOOT_JDK_FOUND=no
23858      else
23859        # Do we have a bin/javac?
23860        if test ! -x "$BOOT_JDK/bin/javac"; then
23861          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23863          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23864$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23865          BOOT_JDK_FOUND=no
23866        else
23867          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23868          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23869            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23871            BOOT_JDK_FOUND=no
23872          else
23873            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23874            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23875
23876            # Extra M4 quote needed to protect [] in grep expression.
23877            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23878            if test "x$FOUND_CORRECT_VERSION" = x; then
23879              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23881              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23882$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23883              BOOT_JDK_FOUND=no
23884            else
23885              # We're done! :-)
23886              BOOT_JDK_FOUND=yes
23887
23888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23889
23890  # Input might be given as Windows format, start by converting to
23891  # unix format.
23892  path="$BOOT_JDK"
23893  new_path=`$CYGPATH -u "$path"`
23894
23895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23898  # "foo.exe" is OK but "foo" is an error.
23899  #
23900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23901  # It is also a way to make sure we got the proper file name for the real test later on.
23902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23903  if test "x$test_shortpath" = x; then
23904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23906    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23907  fi
23908
23909  # Call helper function which possibly converts this using DOS-style short mode.
23910  # If so, the updated path is stored in $new_path.
23911
23912  input_path="$new_path"
23913  # Check if we need to convert this using DOS-style short mode. If the path
23914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23915  # take no chances and rewrite it.
23916  # Note: m4 eats our [], so we need to use [ and ] instead.
23917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23918  if test "x$has_forbidden_chars" != x; then
23919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23923      # Going to short mode and back again did indeed matter. Since short mode is
23924      # case insensitive, let's make it lowercase to improve readability.
23925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23926      # Now convert it back to Unix-stile (cygpath)
23927      input_path=`$CYGPATH -u "$shortmode_path"`
23928      new_path="$input_path"
23929    fi
23930  fi
23931
23932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23933  if test "x$test_cygdrive_prefix" = x; then
23934    # As a simple fix, exclude /usr/bin since it's not a real path.
23935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23937      # a path prefixed by /cygdrive for fixpath to work.
23938      new_path="$CYGWIN_ROOT_PATH$input_path"
23939    fi
23940  fi
23941
23942
23943  if test "x$path" != "x$new_path"; then
23944    BOOT_JDK="$new_path"
23945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23947  fi
23948
23949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23950
23951  path="$BOOT_JDK"
23952  has_colon=`$ECHO $path | $GREP ^.:`
23953  new_path="$path"
23954  if test "x$has_colon" = x; then
23955    # Not in mixed or Windows style, start by that.
23956    new_path=`cmd //c echo $path`
23957  fi
23958
23959
23960  input_path="$new_path"
23961  # Check if we need to convert this using DOS-style short mode. If the path
23962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23963  # take no chances and rewrite it.
23964  # Note: m4 eats our [], so we need to use [ and ] instead.
23965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23966  if test "x$has_forbidden_chars" != x; then
23967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23969  fi
23970
23971
23972  windows_path="$new_path"
23973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23974    unix_path=`$CYGPATH -u "$windows_path"`
23975    new_path="$unix_path"
23976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23978    new_path="$unix_path"
23979  fi
23980
23981  if test "x$path" != "x$new_path"; then
23982    BOOT_JDK="$new_path"
23983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23985  fi
23986
23987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23989
23990  else
23991    # We're on a posix platform. Hooray! :)
23992    path="$BOOT_JDK"
23993    has_space=`$ECHO "$path" | $GREP " "`
23994    if test "x$has_space" != x; then
23995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23998    fi
23999
24000    # Use eval to expand a potential ~
24001    eval path="$path"
24002    if test ! -f "$path" && test ! -d "$path"; then
24003      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24004    fi
24005
24006    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24007  fi
24008
24009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24010$as_echo_n "checking for Boot JDK... " >&6; }
24011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24012$as_echo "$BOOT_JDK" >&6; }
24013              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24014$as_echo_n "checking Boot JDK version... " >&6; }
24015              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24016              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24017$as_echo "$BOOT_JDK_VERSION" >&6; }
24018            fi # end check jdk version
24019          fi # end check rt.jar
24020        fi # end check javac
24021      fi # end check java
24022    fi # end check boot jdk found
24023  fi
24024
24025    done
24026  fi
24027
24028
24029    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24030    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24031      # Do we have a bin/java?
24032      if test ! -x "$BOOT_JDK/bin/java"; then
24033        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24035        BOOT_JDK_FOUND=no
24036      else
24037        # Do we have a bin/javac?
24038        if test ! -x "$BOOT_JDK/bin/javac"; then
24039          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24041          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24042$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24043          BOOT_JDK_FOUND=no
24044        else
24045          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24046          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24047            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24049            BOOT_JDK_FOUND=no
24050          else
24051            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24052            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24053
24054            # Extra M4 quote needed to protect [] in grep expression.
24055            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24056            if test "x$FOUND_CORRECT_VERSION" = x; then
24057              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24059              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24060$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24061              BOOT_JDK_FOUND=no
24062            else
24063              # We're done! :-)
24064              BOOT_JDK_FOUND=yes
24065
24066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24067
24068  # Input might be given as Windows format, start by converting to
24069  # unix format.
24070  path="$BOOT_JDK"
24071  new_path=`$CYGPATH -u "$path"`
24072
24073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24076  # "foo.exe" is OK but "foo" is an error.
24077  #
24078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24079  # It is also a way to make sure we got the proper file name for the real test later on.
24080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24081  if test "x$test_shortpath" = x; then
24082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24084    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24085  fi
24086
24087  # Call helper function which possibly converts this using DOS-style short mode.
24088  # If so, the updated path is stored in $new_path.
24089
24090  input_path="$new_path"
24091  # Check if we need to convert this using DOS-style short mode. If the path
24092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24093  # take no chances and rewrite it.
24094  # Note: m4 eats our [], so we need to use [ and ] instead.
24095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24096  if test "x$has_forbidden_chars" != x; then
24097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24101      # Going to short mode and back again did indeed matter. Since short mode is
24102      # case insensitive, let's make it lowercase to improve readability.
24103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24104      # Now convert it back to Unix-stile (cygpath)
24105      input_path=`$CYGPATH -u "$shortmode_path"`
24106      new_path="$input_path"
24107    fi
24108  fi
24109
24110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24111  if test "x$test_cygdrive_prefix" = x; then
24112    # As a simple fix, exclude /usr/bin since it's not a real path.
24113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24115      # a path prefixed by /cygdrive for fixpath to work.
24116      new_path="$CYGWIN_ROOT_PATH$input_path"
24117    fi
24118  fi
24119
24120
24121  if test "x$path" != "x$new_path"; then
24122    BOOT_JDK="$new_path"
24123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24125  fi
24126
24127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24128
24129  path="$BOOT_JDK"
24130  has_colon=`$ECHO $path | $GREP ^.:`
24131  new_path="$path"
24132  if test "x$has_colon" = x; then
24133    # Not in mixed or Windows style, start by that.
24134    new_path=`cmd //c echo $path`
24135  fi
24136
24137
24138  input_path="$new_path"
24139  # Check if we need to convert this using DOS-style short mode. If the path
24140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24141  # take no chances and rewrite it.
24142  # Note: m4 eats our [], so we need to use [ and ] instead.
24143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24144  if test "x$has_forbidden_chars" != x; then
24145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24147  fi
24148
24149
24150  windows_path="$new_path"
24151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24152    unix_path=`$CYGPATH -u "$windows_path"`
24153    new_path="$unix_path"
24154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24156    new_path="$unix_path"
24157  fi
24158
24159  if test "x$path" != "x$new_path"; then
24160    BOOT_JDK="$new_path"
24161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24163  fi
24164
24165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24167
24168  else
24169    # We're on a posix platform. Hooray! :)
24170    path="$BOOT_JDK"
24171    has_space=`$ECHO "$path" | $GREP " "`
24172    if test "x$has_space" != x; then
24173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24175      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24176    fi
24177
24178    # Use eval to expand a potential ~
24179    eval path="$path"
24180    if test ! -f "$path" && test ! -d "$path"; then
24181      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24182    fi
24183
24184    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24185  fi
24186
24187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24188$as_echo_n "checking for Boot JDK... " >&6; }
24189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24190$as_echo "$BOOT_JDK" >&6; }
24191              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24192$as_echo_n "checking Boot JDK version... " >&6; }
24193              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24194              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24195$as_echo "$BOOT_JDK_VERSION" >&6; }
24196            fi # end check jdk version
24197          fi # end check rt.jar
24198        fi # end check javac
24199      fi # end check java
24200    fi # end check boot jdk found
24201  fi
24202
24203  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24204
24205  if test "x$BOOT_JDK_FOUND" = xno; then
24206    # Now execute the test
24207
24208  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24209  BOOT_JDK_SUFFIX="/Contents/Home"
24210  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24211  if test "x$ALL_JDKS_FOUND" != x; then
24212    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24213
24214  if test "x$BOOT_JDK_FOUND" = xno; then
24215    # Now execute the test
24216
24217        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24218        if test -d "$BOOT_JDK"; then
24219          BOOT_JDK_FOUND=maybe
24220          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24221$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24222        fi
24223
24224
24225    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24226    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24227      # Do we have a bin/java?
24228      if test ! -x "$BOOT_JDK/bin/java"; then
24229        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24231        BOOT_JDK_FOUND=no
24232      else
24233        # Do we have a bin/javac?
24234        if test ! -x "$BOOT_JDK/bin/javac"; then
24235          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24237          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24238$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24239          BOOT_JDK_FOUND=no
24240        else
24241          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24242          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24243            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24245            BOOT_JDK_FOUND=no
24246          else
24247            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24248            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24249
24250            # Extra M4 quote needed to protect [] in grep expression.
24251            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24252            if test "x$FOUND_CORRECT_VERSION" = x; then
24253              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24255              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24256$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24257              BOOT_JDK_FOUND=no
24258            else
24259              # We're done! :-)
24260              BOOT_JDK_FOUND=yes
24261
24262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24263
24264  # Input might be given as Windows format, start by converting to
24265  # unix format.
24266  path="$BOOT_JDK"
24267  new_path=`$CYGPATH -u "$path"`
24268
24269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24272  # "foo.exe" is OK but "foo" is an error.
24273  #
24274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24275  # It is also a way to make sure we got the proper file name for the real test later on.
24276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24277  if test "x$test_shortpath" = x; then
24278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24280    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24281  fi
24282
24283  # Call helper function which possibly converts this using DOS-style short mode.
24284  # If so, the updated path is stored in $new_path.
24285
24286  input_path="$new_path"
24287  # Check if we need to convert this using DOS-style short mode. If the path
24288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24289  # take no chances and rewrite it.
24290  # Note: m4 eats our [], so we need to use [ and ] instead.
24291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24292  if test "x$has_forbidden_chars" != x; then
24293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24297      # Going to short mode and back again did indeed matter. Since short mode is
24298      # case insensitive, let's make it lowercase to improve readability.
24299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24300      # Now convert it back to Unix-stile (cygpath)
24301      input_path=`$CYGPATH -u "$shortmode_path"`
24302      new_path="$input_path"
24303    fi
24304  fi
24305
24306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24307  if test "x$test_cygdrive_prefix" = x; then
24308    # As a simple fix, exclude /usr/bin since it's not a real path.
24309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24311      # a path prefixed by /cygdrive for fixpath to work.
24312      new_path="$CYGWIN_ROOT_PATH$input_path"
24313    fi
24314  fi
24315
24316
24317  if test "x$path" != "x$new_path"; then
24318    BOOT_JDK="$new_path"
24319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24321  fi
24322
24323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24324
24325  path="$BOOT_JDK"
24326  has_colon=`$ECHO $path | $GREP ^.:`
24327  new_path="$path"
24328  if test "x$has_colon" = x; then
24329    # Not in mixed or Windows style, start by that.
24330    new_path=`cmd //c echo $path`
24331  fi
24332
24333
24334  input_path="$new_path"
24335  # Check if we need to convert this using DOS-style short mode. If the path
24336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24337  # take no chances and rewrite it.
24338  # Note: m4 eats our [], so we need to use [ and ] instead.
24339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24340  if test "x$has_forbidden_chars" != x; then
24341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24343  fi
24344
24345
24346  windows_path="$new_path"
24347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24348    unix_path=`$CYGPATH -u "$windows_path"`
24349    new_path="$unix_path"
24350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24352    new_path="$unix_path"
24353  fi
24354
24355  if test "x$path" != "x$new_path"; then
24356    BOOT_JDK="$new_path"
24357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24359  fi
24360
24361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24363
24364  else
24365    # We're on a posix platform. Hooray! :)
24366    path="$BOOT_JDK"
24367    has_space=`$ECHO "$path" | $GREP " "`
24368    if test "x$has_space" != x; then
24369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24372    fi
24373
24374    # Use eval to expand a potential ~
24375    eval path="$path"
24376    if test ! -f "$path" && test ! -d "$path"; then
24377      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24378    fi
24379
24380    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24381  fi
24382
24383              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24384$as_echo_n "checking for Boot JDK... " >&6; }
24385              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24386$as_echo "$BOOT_JDK" >&6; }
24387              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24388$as_echo_n "checking Boot JDK version... " >&6; }
24389              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24390              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24391$as_echo "$BOOT_JDK_VERSION" >&6; }
24392            fi # end check jdk version
24393          fi # end check rt.jar
24394        fi # end check javac
24395      fi # end check java
24396    fi # end check boot jdk found
24397  fi
24398
24399    done
24400  fi
24401
24402
24403    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24404    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24405      # Do we have a bin/java?
24406      if test ! -x "$BOOT_JDK/bin/java"; then
24407        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24409        BOOT_JDK_FOUND=no
24410      else
24411        # Do we have a bin/javac?
24412        if test ! -x "$BOOT_JDK/bin/javac"; then
24413          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24415          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24416$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24417          BOOT_JDK_FOUND=no
24418        else
24419          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24420          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24421            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24423            BOOT_JDK_FOUND=no
24424          else
24425            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24426            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24427
24428            # Extra M4 quote needed to protect [] in grep expression.
24429            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24430            if test "x$FOUND_CORRECT_VERSION" = x; then
24431              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24433              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24434$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24435              BOOT_JDK_FOUND=no
24436            else
24437              # We're done! :-)
24438              BOOT_JDK_FOUND=yes
24439
24440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24441
24442  # Input might be given as Windows format, start by converting to
24443  # unix format.
24444  path="$BOOT_JDK"
24445  new_path=`$CYGPATH -u "$path"`
24446
24447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24450  # "foo.exe" is OK but "foo" is an error.
24451  #
24452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24453  # It is also a way to make sure we got the proper file name for the real test later on.
24454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24455  if test "x$test_shortpath" = x; then
24456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24458    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24459  fi
24460
24461  # Call helper function which possibly converts this using DOS-style short mode.
24462  # If so, the updated path is stored in $new_path.
24463
24464  input_path="$new_path"
24465  # Check if we need to convert this using DOS-style short mode. If the path
24466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24467  # take no chances and rewrite it.
24468  # Note: m4 eats our [], so we need to use [ and ] instead.
24469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24470  if test "x$has_forbidden_chars" != x; then
24471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24475      # Going to short mode and back again did indeed matter. Since short mode is
24476      # case insensitive, let's make it lowercase to improve readability.
24477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24478      # Now convert it back to Unix-stile (cygpath)
24479      input_path=`$CYGPATH -u "$shortmode_path"`
24480      new_path="$input_path"
24481    fi
24482  fi
24483
24484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24485  if test "x$test_cygdrive_prefix" = x; then
24486    # As a simple fix, exclude /usr/bin since it's not a real path.
24487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24489      # a path prefixed by /cygdrive for fixpath to work.
24490      new_path="$CYGWIN_ROOT_PATH$input_path"
24491    fi
24492  fi
24493
24494
24495  if test "x$path" != "x$new_path"; then
24496    BOOT_JDK="$new_path"
24497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24499  fi
24500
24501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24502
24503  path="$BOOT_JDK"
24504  has_colon=`$ECHO $path | $GREP ^.:`
24505  new_path="$path"
24506  if test "x$has_colon" = x; then
24507    # Not in mixed or Windows style, start by that.
24508    new_path=`cmd //c echo $path`
24509  fi
24510
24511
24512  input_path="$new_path"
24513  # Check if we need to convert this using DOS-style short mode. If the path
24514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24515  # take no chances and rewrite it.
24516  # Note: m4 eats our [], so we need to use [ and ] instead.
24517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24518  if test "x$has_forbidden_chars" != x; then
24519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24521  fi
24522
24523
24524  windows_path="$new_path"
24525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24526    unix_path=`$CYGPATH -u "$windows_path"`
24527    new_path="$unix_path"
24528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24530    new_path="$unix_path"
24531  fi
24532
24533  if test "x$path" != "x$new_path"; then
24534    BOOT_JDK="$new_path"
24535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24537  fi
24538
24539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24541
24542  else
24543    # We're on a posix platform. Hooray! :)
24544    path="$BOOT_JDK"
24545    has_space=`$ECHO "$path" | $GREP " "`
24546    if test "x$has_space" != x; then
24547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24549      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24550    fi
24551
24552    # Use eval to expand a potential ~
24553    eval path="$path"
24554    if test ! -f "$path" && test ! -d "$path"; then
24555      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24556    fi
24557
24558    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24559  fi
24560
24561              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24562$as_echo_n "checking for Boot JDK... " >&6; }
24563              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24564$as_echo "$BOOT_JDK" >&6; }
24565              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24566$as_echo_n "checking Boot JDK version... " >&6; }
24567              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24568              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24569$as_echo "$BOOT_JDK_VERSION" >&6; }
24570            fi # end check jdk version
24571          fi # end check rt.jar
24572        fi # end check javac
24573      fi # end check java
24574    fi # end check boot jdk found
24575  fi
24576
24577
24578  if test "x$BOOT_JDK_FOUND" = xno; then
24579    # Now execute the test
24580
24581  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24582  BOOT_JDK_SUFFIX="/Contents/Home"
24583  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24584  if test "x$ALL_JDKS_FOUND" != x; then
24585    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24586
24587  if test "x$BOOT_JDK_FOUND" = xno; then
24588    # Now execute the test
24589
24590        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24591        if test -d "$BOOT_JDK"; then
24592          BOOT_JDK_FOUND=maybe
24593          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24594$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24595        fi
24596
24597
24598    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24599    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24600      # Do we have a bin/java?
24601      if test ! -x "$BOOT_JDK/bin/java"; then
24602        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24604        BOOT_JDK_FOUND=no
24605      else
24606        # Do we have a bin/javac?
24607        if test ! -x "$BOOT_JDK/bin/javac"; then
24608          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24610          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24611$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24612          BOOT_JDK_FOUND=no
24613        else
24614          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24615          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24618            BOOT_JDK_FOUND=no
24619          else
24620            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24621            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24622
24623            # Extra M4 quote needed to protect [] in grep expression.
24624            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24625            if test "x$FOUND_CORRECT_VERSION" = x; then
24626              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24628              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24629$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24630              BOOT_JDK_FOUND=no
24631            else
24632              # We're done! :-)
24633              BOOT_JDK_FOUND=yes
24634
24635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24636
24637  # Input might be given as Windows format, start by converting to
24638  # unix format.
24639  path="$BOOT_JDK"
24640  new_path=`$CYGPATH -u "$path"`
24641
24642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24645  # "foo.exe" is OK but "foo" is an error.
24646  #
24647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24648  # It is also a way to make sure we got the proper file name for the real test later on.
24649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24650  if test "x$test_shortpath" = x; then
24651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24654  fi
24655
24656  # Call helper function which possibly converts this using DOS-style short mode.
24657  # If so, the updated path is stored in $new_path.
24658
24659  input_path="$new_path"
24660  # Check if we need to convert this using DOS-style short mode. If the path
24661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24662  # take no chances and rewrite it.
24663  # Note: m4 eats our [], so we need to use [ and ] instead.
24664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24665  if test "x$has_forbidden_chars" != x; then
24666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24670      # Going to short mode and back again did indeed matter. Since short mode is
24671      # case insensitive, let's make it lowercase to improve readability.
24672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24673      # Now convert it back to Unix-stile (cygpath)
24674      input_path=`$CYGPATH -u "$shortmode_path"`
24675      new_path="$input_path"
24676    fi
24677  fi
24678
24679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24680  if test "x$test_cygdrive_prefix" = x; then
24681    # As a simple fix, exclude /usr/bin since it's not a real path.
24682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24684      # a path prefixed by /cygdrive for fixpath to work.
24685      new_path="$CYGWIN_ROOT_PATH$input_path"
24686    fi
24687  fi
24688
24689
24690  if test "x$path" != "x$new_path"; then
24691    BOOT_JDK="$new_path"
24692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24694  fi
24695
24696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24697
24698  path="$BOOT_JDK"
24699  has_colon=`$ECHO $path | $GREP ^.:`
24700  new_path="$path"
24701  if test "x$has_colon" = x; then
24702    # Not in mixed or Windows style, start by that.
24703    new_path=`cmd //c echo $path`
24704  fi
24705
24706
24707  input_path="$new_path"
24708  # Check if we need to convert this using DOS-style short mode. If the path
24709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24710  # take no chances and rewrite it.
24711  # Note: m4 eats our [], so we need to use [ and ] instead.
24712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24713  if test "x$has_forbidden_chars" != x; then
24714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24716  fi
24717
24718
24719  windows_path="$new_path"
24720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24721    unix_path=`$CYGPATH -u "$windows_path"`
24722    new_path="$unix_path"
24723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24725    new_path="$unix_path"
24726  fi
24727
24728  if test "x$path" != "x$new_path"; then
24729    BOOT_JDK="$new_path"
24730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24732  fi
24733
24734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24736
24737  else
24738    # We're on a posix platform. Hooray! :)
24739    path="$BOOT_JDK"
24740    has_space=`$ECHO "$path" | $GREP " "`
24741    if test "x$has_space" != x; then
24742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24744      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24745    fi
24746
24747    # Use eval to expand a potential ~
24748    eval path="$path"
24749    if test ! -f "$path" && test ! -d "$path"; then
24750      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24751    fi
24752
24753    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24754  fi
24755
24756              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24757$as_echo_n "checking for Boot JDK... " >&6; }
24758              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24759$as_echo "$BOOT_JDK" >&6; }
24760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24761$as_echo_n "checking Boot JDK version... " >&6; }
24762              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24764$as_echo "$BOOT_JDK_VERSION" >&6; }
24765            fi # end check jdk version
24766          fi # end check rt.jar
24767        fi # end check javac
24768      fi # end check java
24769    fi # end check boot jdk found
24770  fi
24771
24772    done
24773  fi
24774
24775
24776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24778      # Do we have a bin/java?
24779      if test ! -x "$BOOT_JDK/bin/java"; then
24780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24782        BOOT_JDK_FOUND=no
24783      else
24784        # Do we have a bin/javac?
24785        if test ! -x "$BOOT_JDK/bin/javac"; then
24786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24790          BOOT_JDK_FOUND=no
24791        else
24792          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24793          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24794            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24796            BOOT_JDK_FOUND=no
24797          else
24798            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24800
24801            # Extra M4 quote needed to protect [] in grep expression.
24802            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24803            if test "x$FOUND_CORRECT_VERSION" = x; then
24804              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24806              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24807$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24808              BOOT_JDK_FOUND=no
24809            else
24810              # We're done! :-)
24811              BOOT_JDK_FOUND=yes
24812
24813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24814
24815  # Input might be given as Windows format, start by converting to
24816  # unix format.
24817  path="$BOOT_JDK"
24818  new_path=`$CYGPATH -u "$path"`
24819
24820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24823  # "foo.exe" is OK but "foo" is an error.
24824  #
24825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24826  # It is also a way to make sure we got the proper file name for the real test later on.
24827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24828  if test "x$test_shortpath" = x; then
24829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24832  fi
24833
24834  # Call helper function which possibly converts this using DOS-style short mode.
24835  # If so, the updated path is stored in $new_path.
24836
24837  input_path="$new_path"
24838  # Check if we need to convert this using DOS-style short mode. If the path
24839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24840  # take no chances and rewrite it.
24841  # Note: m4 eats our [], so we need to use [ and ] instead.
24842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24843  if test "x$has_forbidden_chars" != x; then
24844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24848      # Going to short mode and back again did indeed matter. Since short mode is
24849      # case insensitive, let's make it lowercase to improve readability.
24850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24851      # Now convert it back to Unix-stile (cygpath)
24852      input_path=`$CYGPATH -u "$shortmode_path"`
24853      new_path="$input_path"
24854    fi
24855  fi
24856
24857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24858  if test "x$test_cygdrive_prefix" = x; then
24859    # As a simple fix, exclude /usr/bin since it's not a real path.
24860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24862      # a path prefixed by /cygdrive for fixpath to work.
24863      new_path="$CYGWIN_ROOT_PATH$input_path"
24864    fi
24865  fi
24866
24867
24868  if test "x$path" != "x$new_path"; then
24869    BOOT_JDK="$new_path"
24870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24872  fi
24873
24874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24875
24876  path="$BOOT_JDK"
24877  has_colon=`$ECHO $path | $GREP ^.:`
24878  new_path="$path"
24879  if test "x$has_colon" = x; then
24880    # Not in mixed or Windows style, start by that.
24881    new_path=`cmd //c echo $path`
24882  fi
24883
24884
24885  input_path="$new_path"
24886  # Check if we need to convert this using DOS-style short mode. If the path
24887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24888  # take no chances and rewrite it.
24889  # Note: m4 eats our [], so we need to use [ and ] instead.
24890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24891  if test "x$has_forbidden_chars" != x; then
24892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24894  fi
24895
24896
24897  windows_path="$new_path"
24898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24899    unix_path=`$CYGPATH -u "$windows_path"`
24900    new_path="$unix_path"
24901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24903    new_path="$unix_path"
24904  fi
24905
24906  if test "x$path" != "x$new_path"; then
24907    BOOT_JDK="$new_path"
24908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24910  fi
24911
24912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24914
24915  else
24916    # We're on a posix platform. Hooray! :)
24917    path="$BOOT_JDK"
24918    has_space=`$ECHO "$path" | $GREP " "`
24919    if test "x$has_space" != x; then
24920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24922      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24923    fi
24924
24925    # Use eval to expand a potential ~
24926    eval path="$path"
24927    if test ! -f "$path" && test ! -d "$path"; then
24928      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24929    fi
24930
24931    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24932  fi
24933
24934              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24935$as_echo_n "checking for Boot JDK... " >&6; }
24936              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24937$as_echo "$BOOT_JDK" >&6; }
24938              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24939$as_echo_n "checking Boot JDK version... " >&6; }
24940              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24941              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24942$as_echo "$BOOT_JDK_VERSION" >&6; }
24943            fi # end check jdk version
24944          fi # end check rt.jar
24945        fi # end check javac
24946      fi # end check java
24947    fi # end check boot jdk found
24948  fi
24949
24950  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24951
24952  if test "x$BOOT_JDK_FOUND" = xno; then
24953    # Now execute the test
24954
24955  BOOT_JDK_PREFIX="/usr/lib/jvm"
24956  BOOT_JDK_SUFFIX=""
24957  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24958  if test "x$ALL_JDKS_FOUND" != x; then
24959    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24960
24961  if test "x$BOOT_JDK_FOUND" = xno; then
24962    # Now execute the test
24963
24964        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24965        if test -d "$BOOT_JDK"; then
24966          BOOT_JDK_FOUND=maybe
24967          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24968$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24969        fi
24970
24971
24972    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24973    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24974      # Do we have a bin/java?
24975      if test ! -x "$BOOT_JDK/bin/java"; then
24976        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24978        BOOT_JDK_FOUND=no
24979      else
24980        # Do we have a bin/javac?
24981        if test ! -x "$BOOT_JDK/bin/javac"; then
24982          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24984          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24985$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24986          BOOT_JDK_FOUND=no
24987        else
24988          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24989          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24990            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24992            BOOT_JDK_FOUND=no
24993          else
24994            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24995            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24996
24997            # Extra M4 quote needed to protect [] in grep expression.
24998            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24999            if test "x$FOUND_CORRECT_VERSION" = x; then
25000              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25002              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25004              BOOT_JDK_FOUND=no
25005            else
25006              # We're done! :-)
25007              BOOT_JDK_FOUND=yes
25008
25009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25010
25011  # Input might be given as Windows format, start by converting to
25012  # unix format.
25013  path="$BOOT_JDK"
25014  new_path=`$CYGPATH -u "$path"`
25015
25016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25019  # "foo.exe" is OK but "foo" is an error.
25020  #
25021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25022  # It is also a way to make sure we got the proper file name for the real test later on.
25023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25024  if test "x$test_shortpath" = x; then
25025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25027    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25028  fi
25029
25030  # Call helper function which possibly converts this using DOS-style short mode.
25031  # If so, the updated path is stored in $new_path.
25032
25033  input_path="$new_path"
25034  # Check if we need to convert this using DOS-style short mode. If the path
25035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25036  # take no chances and rewrite it.
25037  # Note: m4 eats our [], so we need to use [ and ] instead.
25038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25039  if test "x$has_forbidden_chars" != x; then
25040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25044      # Going to short mode and back again did indeed matter. Since short mode is
25045      # case insensitive, let's make it lowercase to improve readability.
25046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25047      # Now convert it back to Unix-stile (cygpath)
25048      input_path=`$CYGPATH -u "$shortmode_path"`
25049      new_path="$input_path"
25050    fi
25051  fi
25052
25053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25054  if test "x$test_cygdrive_prefix" = x; then
25055    # As a simple fix, exclude /usr/bin since it's not a real path.
25056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25058      # a path prefixed by /cygdrive for fixpath to work.
25059      new_path="$CYGWIN_ROOT_PATH$input_path"
25060    fi
25061  fi
25062
25063
25064  if test "x$path" != "x$new_path"; then
25065    BOOT_JDK="$new_path"
25066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25068  fi
25069
25070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071
25072  path="$BOOT_JDK"
25073  has_colon=`$ECHO $path | $GREP ^.:`
25074  new_path="$path"
25075  if test "x$has_colon" = x; then
25076    # Not in mixed or Windows style, start by that.
25077    new_path=`cmd //c echo $path`
25078  fi
25079
25080
25081  input_path="$new_path"
25082  # Check if we need to convert this using DOS-style short mode. If the path
25083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25084  # take no chances and rewrite it.
25085  # Note: m4 eats our [], so we need to use [ and ] instead.
25086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25087  if test "x$has_forbidden_chars" != x; then
25088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25090  fi
25091
25092
25093  windows_path="$new_path"
25094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095    unix_path=`$CYGPATH -u "$windows_path"`
25096    new_path="$unix_path"
25097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25099    new_path="$unix_path"
25100  fi
25101
25102  if test "x$path" != "x$new_path"; then
25103    BOOT_JDK="$new_path"
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25106  fi
25107
25108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25110
25111  else
25112    # We're on a posix platform. Hooray! :)
25113    path="$BOOT_JDK"
25114    has_space=`$ECHO "$path" | $GREP " "`
25115    if test "x$has_space" != x; then
25116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25118      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25119    fi
25120
25121    # Use eval to expand a potential ~
25122    eval path="$path"
25123    if test ! -f "$path" && test ! -d "$path"; then
25124      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25125    fi
25126
25127    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25128  fi
25129
25130              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25131$as_echo_n "checking for Boot JDK... " >&6; }
25132              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25133$as_echo "$BOOT_JDK" >&6; }
25134              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25135$as_echo_n "checking Boot JDK version... " >&6; }
25136              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25137              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25138$as_echo "$BOOT_JDK_VERSION" >&6; }
25139            fi # end check jdk version
25140          fi # end check rt.jar
25141        fi # end check javac
25142      fi # end check java
25143    fi # end check boot jdk found
25144  fi
25145
25146    done
25147  fi
25148
25149
25150    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25151    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25152      # Do we have a bin/java?
25153      if test ! -x "$BOOT_JDK/bin/java"; then
25154        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25156        BOOT_JDK_FOUND=no
25157      else
25158        # Do we have a bin/javac?
25159        if test ! -x "$BOOT_JDK/bin/javac"; then
25160          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25162          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25163$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25164          BOOT_JDK_FOUND=no
25165        else
25166          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25167          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25168            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25170            BOOT_JDK_FOUND=no
25171          else
25172            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25173            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25174
25175            # Extra M4 quote needed to protect [] in grep expression.
25176            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25177            if test "x$FOUND_CORRECT_VERSION" = x; then
25178              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25180              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25181$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25182              BOOT_JDK_FOUND=no
25183            else
25184              # We're done! :-)
25185              BOOT_JDK_FOUND=yes
25186
25187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25188
25189  # Input might be given as Windows format, start by converting to
25190  # unix format.
25191  path="$BOOT_JDK"
25192  new_path=`$CYGPATH -u "$path"`
25193
25194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25197  # "foo.exe" is OK but "foo" is an error.
25198  #
25199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25200  # It is also a way to make sure we got the proper file name for the real test later on.
25201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25202  if test "x$test_shortpath" = x; then
25203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25205    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25206  fi
25207
25208  # Call helper function which possibly converts this using DOS-style short mode.
25209  # If so, the updated path is stored in $new_path.
25210
25211  input_path="$new_path"
25212  # Check if we need to convert this using DOS-style short mode. If the path
25213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25214  # take no chances and rewrite it.
25215  # Note: m4 eats our [], so we need to use [ and ] instead.
25216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25217  if test "x$has_forbidden_chars" != x; then
25218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25222      # Going to short mode and back again did indeed matter. Since short mode is
25223      # case insensitive, let's make it lowercase to improve readability.
25224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25225      # Now convert it back to Unix-stile (cygpath)
25226      input_path=`$CYGPATH -u "$shortmode_path"`
25227      new_path="$input_path"
25228    fi
25229  fi
25230
25231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25232  if test "x$test_cygdrive_prefix" = x; then
25233    # As a simple fix, exclude /usr/bin since it's not a real path.
25234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25236      # a path prefixed by /cygdrive for fixpath to work.
25237      new_path="$CYGWIN_ROOT_PATH$input_path"
25238    fi
25239  fi
25240
25241
25242  if test "x$path" != "x$new_path"; then
25243    BOOT_JDK="$new_path"
25244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25246  fi
25247
25248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25249
25250  path="$BOOT_JDK"
25251  has_colon=`$ECHO $path | $GREP ^.:`
25252  new_path="$path"
25253  if test "x$has_colon" = x; then
25254    # Not in mixed or Windows style, start by that.
25255    new_path=`cmd //c echo $path`
25256  fi
25257
25258
25259  input_path="$new_path"
25260  # Check if we need to convert this using DOS-style short mode. If the path
25261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25262  # take no chances and rewrite it.
25263  # Note: m4 eats our [], so we need to use [ and ] instead.
25264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25265  if test "x$has_forbidden_chars" != x; then
25266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25268  fi
25269
25270
25271  windows_path="$new_path"
25272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25273    unix_path=`$CYGPATH -u "$windows_path"`
25274    new_path="$unix_path"
25275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25277    new_path="$unix_path"
25278  fi
25279
25280  if test "x$path" != "x$new_path"; then
25281    BOOT_JDK="$new_path"
25282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25284  fi
25285
25286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25288
25289  else
25290    # We're on a posix platform. Hooray! :)
25291    path="$BOOT_JDK"
25292    has_space=`$ECHO "$path" | $GREP " "`
25293    if test "x$has_space" != x; then
25294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25296      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25297    fi
25298
25299    # Use eval to expand a potential ~
25300    eval path="$path"
25301    if test ! -f "$path" && test ! -d "$path"; then
25302      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25303    fi
25304
25305    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25306  fi
25307
25308              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25309$as_echo_n "checking for Boot JDK... " >&6; }
25310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25311$as_echo "$BOOT_JDK" >&6; }
25312              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25313$as_echo_n "checking Boot JDK version... " >&6; }
25314              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25315              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25316$as_echo "$BOOT_JDK_VERSION" >&6; }
25317            fi # end check jdk version
25318          fi # end check rt.jar
25319        fi # end check javac
25320      fi # end check java
25321    fi # end check boot jdk found
25322  fi
25323
25324  fi
25325
25326
25327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25329      # Do we have a bin/java?
25330      if test ! -x "$BOOT_JDK/bin/java"; then
25331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25333        BOOT_JDK_FOUND=no
25334      else
25335        # Do we have a bin/javac?
25336        if test ! -x "$BOOT_JDK/bin/javac"; then
25337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25341          BOOT_JDK_FOUND=no
25342        else
25343          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25344          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25345            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25347            BOOT_JDK_FOUND=no
25348          else
25349            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25350            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25351
25352            # Extra M4 quote needed to protect [] in grep expression.
25353            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25354            if test "x$FOUND_CORRECT_VERSION" = x; then
25355              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25357              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25359              BOOT_JDK_FOUND=no
25360            else
25361              # We're done! :-)
25362              BOOT_JDK_FOUND=yes
25363
25364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25365
25366  # Input might be given as Windows format, start by converting to
25367  # unix format.
25368  path="$BOOT_JDK"
25369  new_path=`$CYGPATH -u "$path"`
25370
25371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25374  # "foo.exe" is OK but "foo" is an error.
25375  #
25376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25377  # It is also a way to make sure we got the proper file name for the real test later on.
25378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25379  if test "x$test_shortpath" = x; then
25380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25383  fi
25384
25385  # Call helper function which possibly converts this using DOS-style short mode.
25386  # If so, the updated path is stored in $new_path.
25387
25388  input_path="$new_path"
25389  # Check if we need to convert this using DOS-style short mode. If the path
25390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25391  # take no chances and rewrite it.
25392  # Note: m4 eats our [], so we need to use [ and ] instead.
25393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25394  if test "x$has_forbidden_chars" != x; then
25395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25399      # Going to short mode and back again did indeed matter. Since short mode is
25400      # case insensitive, let's make it lowercase to improve readability.
25401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25402      # Now convert it back to Unix-stile (cygpath)
25403      input_path=`$CYGPATH -u "$shortmode_path"`
25404      new_path="$input_path"
25405    fi
25406  fi
25407
25408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25409  if test "x$test_cygdrive_prefix" = x; then
25410    # As a simple fix, exclude /usr/bin since it's not a real path.
25411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25413      # a path prefixed by /cygdrive for fixpath to work.
25414      new_path="$CYGWIN_ROOT_PATH$input_path"
25415    fi
25416  fi
25417
25418
25419  if test "x$path" != "x$new_path"; then
25420    BOOT_JDK="$new_path"
25421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25423  fi
25424
25425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25426
25427  path="$BOOT_JDK"
25428  has_colon=`$ECHO $path | $GREP ^.:`
25429  new_path="$path"
25430  if test "x$has_colon" = x; then
25431    # Not in mixed or Windows style, start by that.
25432    new_path=`cmd //c echo $path`
25433  fi
25434
25435
25436  input_path="$new_path"
25437  # Check if we need to convert this using DOS-style short mode. If the path
25438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25439  # take no chances and rewrite it.
25440  # Note: m4 eats our [], so we need to use [ and ] instead.
25441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25442  if test "x$has_forbidden_chars" != x; then
25443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25445  fi
25446
25447
25448  windows_path="$new_path"
25449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25450    unix_path=`$CYGPATH -u "$windows_path"`
25451    new_path="$unix_path"
25452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25454    new_path="$unix_path"
25455  fi
25456
25457  if test "x$path" != "x$new_path"; then
25458    BOOT_JDK="$new_path"
25459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25461  fi
25462
25463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25465
25466  else
25467    # We're on a posix platform. Hooray! :)
25468    path="$BOOT_JDK"
25469    has_space=`$ECHO "$path" | $GREP " "`
25470    if test "x$has_space" != x; then
25471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25473      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25474    fi
25475
25476    # Use eval to expand a potential ~
25477    eval path="$path"
25478    if test ! -f "$path" && test ! -d "$path"; then
25479      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25480    fi
25481
25482    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25483  fi
25484
25485              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25486$as_echo_n "checking for Boot JDK... " >&6; }
25487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25488$as_echo "$BOOT_JDK" >&6; }
25489              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25490$as_echo_n "checking Boot JDK version... " >&6; }
25491              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25493$as_echo "$BOOT_JDK_VERSION" >&6; }
25494            fi # end check jdk version
25495          fi # end check rt.jar
25496        fi # end check javac
25497      fi # end check java
25498    fi # end check boot jdk found
25499  fi
25500
25501
25502  # If we haven't found anything yet, we've truly lost. Give up.
25503  if test "x$BOOT_JDK_FOUND" = xno; then
25504
25505  # Print a helpful message on how to acquire the necessary build dependency.
25506  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25507  MISSING_DEPENDENCY=openjdk
25508
25509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25510    cygwin_help $MISSING_DEPENDENCY
25511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25512    msys_help $MISSING_DEPENDENCY
25513  else
25514    PKGHANDLER_COMMAND=
25515
25516    case $PKGHANDLER in
25517      apt-get)
25518        apt_help     $MISSING_DEPENDENCY ;;
25519      yum)
25520        yum_help     $MISSING_DEPENDENCY ;;
25521      port)
25522        port_help    $MISSING_DEPENDENCY ;;
25523      pkgutil)
25524        pkgutil_help $MISSING_DEPENDENCY ;;
25525      pkgadd)
25526        pkgadd_help  $MISSING_DEPENDENCY ;;
25527    esac
25528
25529    if test "x$PKGHANDLER_COMMAND" != x; then
25530      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25531    fi
25532  fi
25533
25534    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25535$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25536    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25537$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25538    as_fn_error $? "Cannot continue" "$LINENO" 5
25539  fi
25540
25541  # Setup proper paths for what we found
25542  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25543  if test ! -f "$BOOT_RTJAR"; then
25544    # On MacOSX it is called classes.jar
25545    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25546    if test -f "$BOOT_RTJAR"; then
25547      # Remove the ..
25548      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25549    fi
25550  fi
25551  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25552  BOOT_JDK="$BOOT_JDK"
25553
25554
25555
25556
25557  # Setup tools from the Boot JDK.
25558
25559  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25560
25561  # Publish this variable in the help.
25562
25563
25564  if test "x$JAVA" = x; then
25565    # The variable is not set by user, try to locate tool using the code snippet
25566
25567      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25568$as_echo_n "checking for java in Boot JDK... " >&6; }
25569      JAVA=$BOOT_JDK/bin/java
25570      if test ! -x $JAVA; then
25571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25572$as_echo "not found" >&6; }
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25574$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25575        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25576      fi
25577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25578$as_echo "ok" >&6; }
25579
25580
25581  else
25582    # The variable is set, but is it from the command line or the environment?
25583
25584    # Try to remove the string !JAVA! from our list.
25585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25587      # If it failed, the variable was not from the command line. Ignore it,
25588      # but warn the user (except for BASH, which is always set by the calling BASH).
25589      if test "xJAVA" != xBASH; then
25590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25591$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25592      fi
25593      # Try to locate tool using the code snippet
25594
25595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25596$as_echo_n "checking for java in Boot JDK... " >&6; }
25597      JAVA=$BOOT_JDK/bin/java
25598      if test ! -x $JAVA; then
25599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25600$as_echo "not found" >&6; }
25601        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25602$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25603        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25604      fi
25605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25606$as_echo "ok" >&6; }
25607
25608
25609    else
25610      # If it succeeded, then it was overridden by the user. We will use it
25611      # for the tool.
25612
25613      # First remove it from the list of overridden variables, so we can test
25614      # for unknown variables in the end.
25615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25616
25617      # Check if the provided tool contains a complete path.
25618      tool_specified="$JAVA"
25619      tool_basename="${tool_specified##*/}"
25620      if test "x$tool_basename" = "x$tool_specified"; then
25621        # A command without a complete path is provided, search $PATH.
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25623$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25624        # Extract the first word of "$tool_basename", so it can be a program name with args.
25625set dummy $tool_basename; ac_word=$2
25626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25627$as_echo_n "checking for $ac_word... " >&6; }
25628if ${ac_cv_path_JAVA+:} false; then :
25629  $as_echo_n "(cached) " >&6
25630else
25631  case $JAVA in
25632  [\\/]* | ?:[\\/]*)
25633  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25634  ;;
25635  *)
25636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25637for as_dir in $PATH
25638do
25639  IFS=$as_save_IFS
25640  test -z "$as_dir" && as_dir=.
25641    for ac_exec_ext in '' $ac_executable_extensions; do
25642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25643    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25645    break 2
25646  fi
25647done
25648  done
25649IFS=$as_save_IFS
25650
25651  ;;
25652esac
25653fi
25654JAVA=$ac_cv_path_JAVA
25655if test -n "$JAVA"; then
25656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25657$as_echo "$JAVA" >&6; }
25658else
25659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25660$as_echo "no" >&6; }
25661fi
25662
25663
25664        if test "x$JAVA" = x; then
25665          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25666        fi
25667      else
25668        # Otherwise we believe it is a complete path. Use it as it is.
25669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25670$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25672$as_echo_n "checking for JAVA... " >&6; }
25673        if test ! -x "$tool_specified"; then
25674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25675$as_echo "not found" >&6; }
25676          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25677        fi
25678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25679$as_echo "$tool_specified" >&6; }
25680      fi
25681    fi
25682  fi
25683
25684
25685
25686  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25687
25688  # Publish this variable in the help.
25689
25690
25691  if test "x$JAVAC" = x; then
25692    # The variable is not set by user, try to locate tool using the code snippet
25693
25694      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25695$as_echo_n "checking for javac in Boot JDK... " >&6; }
25696      JAVAC=$BOOT_JDK/bin/javac
25697      if test ! -x $JAVAC; then
25698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25699$as_echo "not found" >&6; }
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25701$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25702        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25703      fi
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25705$as_echo "ok" >&6; }
25706
25707
25708  else
25709    # The variable is set, but is it from the command line or the environment?
25710
25711    # Try to remove the string !JAVAC! from our list.
25712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25714      # If it failed, the variable was not from the command line. Ignore it,
25715      # but warn the user (except for BASH, which is always set by the calling BASH).
25716      if test "xJAVAC" != xBASH; then
25717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25718$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25719      fi
25720      # Try to locate tool using the code snippet
25721
25722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25723$as_echo_n "checking for javac in Boot JDK... " >&6; }
25724      JAVAC=$BOOT_JDK/bin/javac
25725      if test ! -x $JAVAC; then
25726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25727$as_echo "not found" >&6; }
25728        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25729$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25730        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25731      fi
25732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25733$as_echo "ok" >&6; }
25734
25735
25736    else
25737      # If it succeeded, then it was overridden by the user. We will use it
25738      # for the tool.
25739
25740      # First remove it from the list of overridden variables, so we can test
25741      # for unknown variables in the end.
25742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25743
25744      # Check if the provided tool contains a complete path.
25745      tool_specified="$JAVAC"
25746      tool_basename="${tool_specified##*/}"
25747      if test "x$tool_basename" = "x$tool_specified"; then
25748        # A command without a complete path is provided, search $PATH.
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25750$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25751        # Extract the first word of "$tool_basename", so it can be a program name with args.
25752set dummy $tool_basename; ac_word=$2
25753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25754$as_echo_n "checking for $ac_word... " >&6; }
25755if ${ac_cv_path_JAVAC+:} false; then :
25756  $as_echo_n "(cached) " >&6
25757else
25758  case $JAVAC in
25759  [\\/]* | ?:[\\/]*)
25760  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25761  ;;
25762  *)
25763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25764for as_dir in $PATH
25765do
25766  IFS=$as_save_IFS
25767  test -z "$as_dir" && as_dir=.
25768    for ac_exec_ext in '' $ac_executable_extensions; do
25769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25770    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25772    break 2
25773  fi
25774done
25775  done
25776IFS=$as_save_IFS
25777
25778  ;;
25779esac
25780fi
25781JAVAC=$ac_cv_path_JAVAC
25782if test -n "$JAVAC"; then
25783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25784$as_echo "$JAVAC" >&6; }
25785else
25786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25787$as_echo "no" >&6; }
25788fi
25789
25790
25791        if test "x$JAVAC" = x; then
25792          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25793        fi
25794      else
25795        # Otherwise we believe it is a complete path. Use it as it is.
25796        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25797$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25799$as_echo_n "checking for JAVAC... " >&6; }
25800        if test ! -x "$tool_specified"; then
25801          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25802$as_echo "not found" >&6; }
25803          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25804        fi
25805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25806$as_echo "$tool_specified" >&6; }
25807      fi
25808    fi
25809  fi
25810
25811
25812
25813  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25814
25815  # Publish this variable in the help.
25816
25817
25818  if test "x$JAVAH" = x; then
25819    # The variable is not set by user, try to locate tool using the code snippet
25820
25821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25822$as_echo_n "checking for javah in Boot JDK... " >&6; }
25823      JAVAH=$BOOT_JDK/bin/javah
25824      if test ! -x $JAVAH; then
25825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25826$as_echo "not found" >&6; }
25827        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25828$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25829        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25830      fi
25831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25832$as_echo "ok" >&6; }
25833
25834
25835  else
25836    # The variable is set, but is it from the command line or the environment?
25837
25838    # Try to remove the string !JAVAH! from our list.
25839    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25840    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25841      # If it failed, the variable was not from the command line. Ignore it,
25842      # but warn the user (except for BASH, which is always set by the calling BASH).
25843      if test "xJAVAH" != xBASH; then
25844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25845$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25846      fi
25847      # Try to locate tool using the code snippet
25848
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25850$as_echo_n "checking for javah in Boot JDK... " >&6; }
25851      JAVAH=$BOOT_JDK/bin/javah
25852      if test ! -x $JAVAH; then
25853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25854$as_echo "not found" >&6; }
25855        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25856$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25857        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25858      fi
25859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25860$as_echo "ok" >&6; }
25861
25862
25863    else
25864      # If it succeeded, then it was overridden by the user. We will use it
25865      # for the tool.
25866
25867      # First remove it from the list of overridden variables, so we can test
25868      # for unknown variables in the end.
25869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25870
25871      # Check if the provided tool contains a complete path.
25872      tool_specified="$JAVAH"
25873      tool_basename="${tool_specified##*/}"
25874      if test "x$tool_basename" = "x$tool_specified"; then
25875        # A command without a complete path is provided, search $PATH.
25876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25877$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25878        # Extract the first word of "$tool_basename", so it can be a program name with args.
25879set dummy $tool_basename; ac_word=$2
25880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25881$as_echo_n "checking for $ac_word... " >&6; }
25882if ${ac_cv_path_JAVAH+:} false; then :
25883  $as_echo_n "(cached) " >&6
25884else
25885  case $JAVAH in
25886  [\\/]* | ?:[\\/]*)
25887  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25888  ;;
25889  *)
25890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25891for as_dir in $PATH
25892do
25893  IFS=$as_save_IFS
25894  test -z "$as_dir" && as_dir=.
25895    for ac_exec_ext in '' $ac_executable_extensions; do
25896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25897    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25899    break 2
25900  fi
25901done
25902  done
25903IFS=$as_save_IFS
25904
25905  ;;
25906esac
25907fi
25908JAVAH=$ac_cv_path_JAVAH
25909if test -n "$JAVAH"; then
25910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25911$as_echo "$JAVAH" >&6; }
25912else
25913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25914$as_echo "no" >&6; }
25915fi
25916
25917
25918        if test "x$JAVAH" = x; then
25919          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25920        fi
25921      else
25922        # Otherwise we believe it is a complete path. Use it as it is.
25923        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25924$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25926$as_echo_n "checking for JAVAH... " >&6; }
25927        if test ! -x "$tool_specified"; then
25928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25929$as_echo "not found" >&6; }
25930          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25931        fi
25932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25933$as_echo "$tool_specified" >&6; }
25934      fi
25935    fi
25936  fi
25937
25938
25939
25940  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25941
25942  # Publish this variable in the help.
25943
25944
25945  if test "x$JAR" = x; then
25946    # The variable is not set by user, try to locate tool using the code snippet
25947
25948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25949$as_echo_n "checking for jar in Boot JDK... " >&6; }
25950      JAR=$BOOT_JDK/bin/jar
25951      if test ! -x $JAR; then
25952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25953$as_echo "not found" >&6; }
25954        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25955$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25956        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25957      fi
25958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25959$as_echo "ok" >&6; }
25960
25961
25962  else
25963    # The variable is set, but is it from the command line or the environment?
25964
25965    # Try to remove the string !JAR! from our list.
25966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25968      # If it failed, the variable was not from the command line. Ignore it,
25969      # but warn the user (except for BASH, which is always set by the calling BASH).
25970      if test "xJAR" != xBASH; then
25971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25972$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25973      fi
25974      # Try to locate tool using the code snippet
25975
25976      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25977$as_echo_n "checking for jar in Boot JDK... " >&6; }
25978      JAR=$BOOT_JDK/bin/jar
25979      if test ! -x $JAR; then
25980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25981$as_echo "not found" >&6; }
25982        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25983$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25984        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25985      fi
25986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25987$as_echo "ok" >&6; }
25988
25989
25990    else
25991      # If it succeeded, then it was overridden by the user. We will use it
25992      # for the tool.
25993
25994      # First remove it from the list of overridden variables, so we can test
25995      # for unknown variables in the end.
25996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25997
25998      # Check if the provided tool contains a complete path.
25999      tool_specified="$JAR"
26000      tool_basename="${tool_specified##*/}"
26001      if test "x$tool_basename" = "x$tool_specified"; then
26002        # A command without a complete path is provided, search $PATH.
26003        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26004$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26005        # Extract the first word of "$tool_basename", so it can be a program name with args.
26006set dummy $tool_basename; ac_word=$2
26007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26008$as_echo_n "checking for $ac_word... " >&6; }
26009if ${ac_cv_path_JAR+:} false; then :
26010  $as_echo_n "(cached) " >&6
26011else
26012  case $JAR in
26013  [\\/]* | ?:[\\/]*)
26014  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26015  ;;
26016  *)
26017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26018for as_dir in $PATH
26019do
26020  IFS=$as_save_IFS
26021  test -z "$as_dir" && as_dir=.
26022    for ac_exec_ext in '' $ac_executable_extensions; do
26023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26024    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26026    break 2
26027  fi
26028done
26029  done
26030IFS=$as_save_IFS
26031
26032  ;;
26033esac
26034fi
26035JAR=$ac_cv_path_JAR
26036if test -n "$JAR"; then
26037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26038$as_echo "$JAR" >&6; }
26039else
26040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26041$as_echo "no" >&6; }
26042fi
26043
26044
26045        if test "x$JAR" = x; then
26046          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26047        fi
26048      else
26049        # Otherwise we believe it is a complete path. Use it as it is.
26050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26051$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26053$as_echo_n "checking for JAR... " >&6; }
26054        if test ! -x "$tool_specified"; then
26055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26056$as_echo "not found" >&6; }
26057          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26058        fi
26059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26060$as_echo "$tool_specified" >&6; }
26061      fi
26062    fi
26063  fi
26064
26065
26066
26067  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26068
26069  # Publish this variable in the help.
26070
26071
26072  if test "x$NATIVE2ASCII" = x; then
26073    # The variable is not set by user, try to locate tool using the code snippet
26074
26075      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26076$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26077      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26078      if test ! -x $NATIVE2ASCII; then
26079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26080$as_echo "not found" >&6; }
26081        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26082$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26083        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26084      fi
26085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26086$as_echo "ok" >&6; }
26087
26088
26089  else
26090    # The variable is set, but is it from the command line or the environment?
26091
26092    # Try to remove the string !NATIVE2ASCII! from our list.
26093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26095      # If it failed, the variable was not from the command line. Ignore it,
26096      # but warn the user (except for BASH, which is always set by the calling BASH).
26097      if test "xNATIVE2ASCII" != xBASH; then
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26099$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26100      fi
26101      # Try to locate tool using the code snippet
26102
26103      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26104$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26105      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26106      if test ! -x $NATIVE2ASCII; then
26107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26108$as_echo "not found" >&6; }
26109        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26110$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26111        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26112      fi
26113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26114$as_echo "ok" >&6; }
26115
26116
26117    else
26118      # If it succeeded, then it was overridden by the user. We will use it
26119      # for the tool.
26120
26121      # First remove it from the list of overridden variables, so we can test
26122      # for unknown variables in the end.
26123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26124
26125      # Check if the provided tool contains a complete path.
26126      tool_specified="$NATIVE2ASCII"
26127      tool_basename="${tool_specified##*/}"
26128      if test "x$tool_basename" = "x$tool_specified"; then
26129        # A command without a complete path is provided, search $PATH.
26130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26131$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26132        # Extract the first word of "$tool_basename", so it can be a program name with args.
26133set dummy $tool_basename; ac_word=$2
26134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26135$as_echo_n "checking for $ac_word... " >&6; }
26136if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26137  $as_echo_n "(cached) " >&6
26138else
26139  case $NATIVE2ASCII in
26140  [\\/]* | ?:[\\/]*)
26141  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26142  ;;
26143  *)
26144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26145for as_dir in $PATH
26146do
26147  IFS=$as_save_IFS
26148  test -z "$as_dir" && as_dir=.
26149    for ac_exec_ext in '' $ac_executable_extensions; do
26150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26151    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26153    break 2
26154  fi
26155done
26156  done
26157IFS=$as_save_IFS
26158
26159  ;;
26160esac
26161fi
26162NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26163if test -n "$NATIVE2ASCII"; then
26164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26165$as_echo "$NATIVE2ASCII" >&6; }
26166else
26167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26168$as_echo "no" >&6; }
26169fi
26170
26171
26172        if test "x$NATIVE2ASCII" = x; then
26173          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26174        fi
26175      else
26176        # Otherwise we believe it is a complete path. Use it as it is.
26177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26178$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26180$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26181        if test ! -x "$tool_specified"; then
26182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26183$as_echo "not found" >&6; }
26184          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26185        fi
26186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26187$as_echo "$tool_specified" >&6; }
26188      fi
26189    fi
26190  fi
26191
26192
26193
26194  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26195
26196  # Publish this variable in the help.
26197
26198
26199  if test "x$JARSIGNER" = x; then
26200    # The variable is not set by user, try to locate tool using the code snippet
26201
26202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26203$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26204      JARSIGNER=$BOOT_JDK/bin/jarsigner
26205      if test ! -x $JARSIGNER; then
26206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26207$as_echo "not found" >&6; }
26208        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26209$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26210        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26211      fi
26212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26213$as_echo "ok" >&6; }
26214
26215
26216  else
26217    # The variable is set, but is it from the command line or the environment?
26218
26219    # Try to remove the string !JARSIGNER! from our list.
26220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26222      # If it failed, the variable was not from the command line. Ignore it,
26223      # but warn the user (except for BASH, which is always set by the calling BASH).
26224      if test "xJARSIGNER" != xBASH; then
26225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26226$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26227      fi
26228      # Try to locate tool using the code snippet
26229
26230      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26231$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26232      JARSIGNER=$BOOT_JDK/bin/jarsigner
26233      if test ! -x $JARSIGNER; then
26234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26235$as_echo "not found" >&6; }
26236        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26237$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26238        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26239      fi
26240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26241$as_echo "ok" >&6; }
26242
26243
26244    else
26245      # If it succeeded, then it was overridden by the user. We will use it
26246      # for the tool.
26247
26248      # First remove it from the list of overridden variables, so we can test
26249      # for unknown variables in the end.
26250      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26251
26252      # Check if the provided tool contains a complete path.
26253      tool_specified="$JARSIGNER"
26254      tool_basename="${tool_specified##*/}"
26255      if test "x$tool_basename" = "x$tool_specified"; then
26256        # A command without a complete path is provided, search $PATH.
26257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26258$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26259        # Extract the first word of "$tool_basename", so it can be a program name with args.
26260set dummy $tool_basename; ac_word=$2
26261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26262$as_echo_n "checking for $ac_word... " >&6; }
26263if ${ac_cv_path_JARSIGNER+:} false; then :
26264  $as_echo_n "(cached) " >&6
26265else
26266  case $JARSIGNER in
26267  [\\/]* | ?:[\\/]*)
26268  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26269  ;;
26270  *)
26271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26272for as_dir in $PATH
26273do
26274  IFS=$as_save_IFS
26275  test -z "$as_dir" && as_dir=.
26276    for ac_exec_ext in '' $ac_executable_extensions; do
26277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26278    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26280    break 2
26281  fi
26282done
26283  done
26284IFS=$as_save_IFS
26285
26286  ;;
26287esac
26288fi
26289JARSIGNER=$ac_cv_path_JARSIGNER
26290if test -n "$JARSIGNER"; then
26291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26292$as_echo "$JARSIGNER" >&6; }
26293else
26294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26295$as_echo "no" >&6; }
26296fi
26297
26298
26299        if test "x$JARSIGNER" = x; then
26300          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26301        fi
26302      else
26303        # Otherwise we believe it is a complete path. Use it as it is.
26304        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26305$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26307$as_echo_n "checking for JARSIGNER... " >&6; }
26308        if test ! -x "$tool_specified"; then
26309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26310$as_echo "not found" >&6; }
26311          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26312        fi
26313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26314$as_echo "$tool_specified" >&6; }
26315      fi
26316    fi
26317  fi
26318
26319
26320
26321  # Finally, set some other options...
26322
26323  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26324  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26325
26326
26327
26328
26329###############################################################################
26330#
26331# Configure the sources to use. We can add or override individual directories.
26332#
26333###############################################################################
26334
26335
26336  # Where are the sources. Any of these can be overridden
26337  # using --with-override-corba and the likes.
26338  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26339  CORBA_TOPDIR="$SRC_ROOT/corba"
26340  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26341  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26342  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26343  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26344  JDK_TOPDIR="$SRC_ROOT/jdk"
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355  ###############################################################################
26356  #
26357  # Pickup additional source for a component from outside of the source root
26358  # or override source for a component.
26359  #
26360
26361# Check whether --with-add-source-root was given.
26362if test "${with_add_source_root+set}" = set; then :
26363  withval=$with_add_source_root;
26364fi
26365
26366
26367
26368# Check whether --with-override-source-root was given.
26369if test "${with_override_source_root+set}" = set; then :
26370  withval=$with_override_source_root;
26371fi
26372
26373
26374
26375# Check whether --with-adds-and-overrides was given.
26376if test "${with_adds_and_overrides+set}" = set; then :
26377  withval=$with_adds_and_overrides;
26378fi
26379
26380
26381  if test "x$with_adds_and_overrides" != x; then
26382    with_add_source_root="$with_adds_and_overrides/adds"
26383    with_override_source_root="$with_adds_and_overrides/overrides"
26384  fi
26385
26386  if test "x$with_add_source_root" != x; then
26387    if ! test -d $with_add_source_root; then
26388      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26389    fi
26390    CURDIR="$PWD"
26391    cd "$with_add_source_root"
26392    ADD_SRC_ROOT="`pwd`"
26393    cd "$CURDIR"
26394    # Verify that the addon source root does not have any root makefiles.
26395    # If it does, then it is usually an error, prevent this.
26396    if test -f $with_add_source_root/langtools/make/Makefile; then
26397      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
26398    fi
26399    if test -f $with_add_source_root/corba/make/Makefile; then
26400      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
26401    fi
26402    if test -f $with_add_source_root/jaxp/make/Makefile; then
26403      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
26404    fi
26405    if test -f $with_add_source_root/jaxws/make/Makefile; then
26406      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
26407    fi
26408    if test -f $with_add_source_root/hotspot/make/Makefile; then
26409      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
26410    fi
26411    if test -f $with_add_source_root/nashorn/make/Makefile; then
26412      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
26413    fi
26414    if test -f $with_add_source_root/jdk/make/Makefile; then
26415      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
26416    fi
26417  fi
26418
26419
26420  if test "x$with_override_source_root" != x; then
26421    if ! test -d $with_override_source_root; then
26422      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26423    fi
26424    CURDIR="$PWD"
26425    cd "$with_override_source_root"
26426    OVERRIDE_SRC_ROOT="`pwd`"
26427    cd "$CURDIR"
26428    if test -f $with_override_source_root/langtools/make/Makefile; then
26429      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
26430    fi
26431    if test -f $with_override_source_root/corba/make/Makefile; then
26432      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
26433    fi
26434    if test -f $with_override_source_root/jaxp/make/Makefile; then
26435      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
26436    fi
26437    if test -f $with_override_source_root/jaxws/make/Makefile; then
26438      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
26439    fi
26440    if test -f $with_override_source_root/hotspot/make/Makefile; then
26441      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
26442    fi
26443    if test -f $with_override_source_root/nashorn/make/Makefile; then
26444      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
26445    fi
26446    if test -f $with_override_source_root/jdk/make/Makefile; then
26447      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
26448    fi
26449  fi
26450
26451
26452  ###############################################################################
26453  #
26454  # Override a repo completely, this is used for example when you have 3 small
26455  # development sandboxes of the langtools sources and want to avoid having 3 full
26456  # OpenJDK sources checked out on disk.
26457  #
26458  # Assuming that the 3 langtools sandboxes are located here:
26459  # /home/fredrik/sandbox1/langtools
26460  # /home/fredrik/sandbox2/langtools
26461  # /home/fredrik/sandbox3/langtools
26462  #
26463  # From the source root you create build subdirs manually:
26464  #     mkdir -p build1 build2 build3
26465  # in each build directory run:
26466  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26467  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26468  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26469  #
26470
26471
26472# Check whether --with-override-langtools was given.
26473if test "${with_override_langtools+set}" = set; then :
26474  withval=$with_override_langtools;
26475fi
26476
26477
26478
26479# Check whether --with-override-corba was given.
26480if test "${with_override_corba+set}" = set; then :
26481  withval=$with_override_corba;
26482fi
26483
26484
26485
26486# Check whether --with-override-jaxp was given.
26487if test "${with_override_jaxp+set}" = set; then :
26488  withval=$with_override_jaxp;
26489fi
26490
26491
26492
26493# Check whether --with-override-jaxws was given.
26494if test "${with_override_jaxws+set}" = set; then :
26495  withval=$with_override_jaxws;
26496fi
26497
26498
26499
26500# Check whether --with-override-hotspot was given.
26501if test "${with_override_hotspot+set}" = set; then :
26502  withval=$with_override_hotspot;
26503fi
26504
26505
26506
26507# Check whether --with-override-nashorn was given.
26508if test "${with_override_nashorn+set}" = set; then :
26509  withval=$with_override_nashorn;
26510fi
26511
26512
26513
26514# Check whether --with-override-jdk was given.
26515if test "${with_override_jdk+set}" = set; then :
26516  withval=$with_override_jdk;
26517fi
26518
26519
26520  if test "x$with_override_langtools" != x; then
26521    CURDIR="$PWD"
26522    cd "$with_override_langtools"
26523    LANGTOOLS_TOPDIR="`pwd`"
26524    cd "$CURDIR"
26525    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26526      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26527    fi
26528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26529$as_echo_n "checking if langtools should be overridden... " >&6; }
26530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26531$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26532  fi
26533  if test "x$with_override_corba" != x; then
26534    CURDIR="$PWD"
26535    cd "$with_override_corba"
26536    CORBA_TOPDIR="`pwd`"
26537    cd "$CURDIR"
26538    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26539      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26540    fi
26541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26542$as_echo_n "checking if corba should be overridden... " >&6; }
26543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26544$as_echo "yes with $CORBA_TOPDIR" >&6; }
26545  fi
26546  if test "x$with_override_jaxp" != x; then
26547    CURDIR="$PWD"
26548    cd "$with_override_jaxp"
26549    JAXP_TOPDIR="`pwd`"
26550    cd "$CURDIR"
26551    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26552      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26553    fi
26554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26555$as_echo_n "checking if jaxp should be overridden... " >&6; }
26556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26557$as_echo "yes with $JAXP_TOPDIR" >&6; }
26558  fi
26559  if test "x$with_override_jaxws" != x; then
26560    CURDIR="$PWD"
26561    cd "$with_override_jaxws"
26562    JAXWS_TOPDIR="`pwd`"
26563    cd "$CURDIR"
26564    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26565      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26566    fi
26567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26568$as_echo_n "checking if jaxws should be overridden... " >&6; }
26569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26570$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26571  fi
26572  if test "x$with_override_hotspot" != x; then
26573    CURDIR="$PWD"
26574    cd "$with_override_hotspot"
26575    HOTSPOT_TOPDIR="`pwd`"
26576    cd "$CURDIR"
26577    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26578      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26579    fi
26580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26581$as_echo_n "checking if hotspot should be overridden... " >&6; }
26582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26583$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26584  fi
26585  if test "x$with_override_nashorn" != x; then
26586    CURDIR="$PWD"
26587    cd "$with_override_nashorn"
26588    NASHORN_TOPDIR="`pwd`"
26589    cd "$CURDIR"
26590    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26591      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26592    fi
26593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26594$as_echo_n "checking if nashorn should be overridden... " >&6; }
26595    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26596$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26597  fi
26598  if test "x$with_override_jdk" != x; then
26599    CURDIR="$PWD"
26600    cd "$with_override_jdk"
26601    JDK_TOPDIR="`pwd`"
26602    cd "$CURDIR"
26603    if ! test -f $JDK_TOPDIR/make/Makefile; then
26604      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26605    fi
26606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26607$as_echo_n "checking if JDK should be overridden... " >&6; }
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26609$as_echo "yes with $JDK_TOPDIR" >&6; }
26610  fi
26611
26612
26613  BUILD_OUTPUT="$OUTPUT_ROOT"
26614
26615
26616  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26617  BUILD_HOTSPOT=true
26618
26619
26620
26621# Check whether --with-import-hotspot was given.
26622if test "${with_import_hotspot+set}" = set; then :
26623  withval=$with_import_hotspot;
26624fi
26625
26626  if test "x$with_import_hotspot" != x; then
26627    CURDIR="$PWD"
26628    cd "$with_import_hotspot"
26629    HOTSPOT_DIST="`pwd`"
26630    cd "$CURDIR"
26631    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26632      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26633    fi
26634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26635$as_echo_n "checking if hotspot should be imported... " >&6; }
26636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26637$as_echo "yes from $HOTSPOT_DIST" >&6; }
26638    BUILD_HOTSPOT=false
26639  fi
26640
26641  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26642
26643
26644###############################################################################
26645#
26646# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26647# native code.
26648#
26649###############################################################################
26650
26651# First determine the toolchain type (compiler family)
26652
26653
26654# Check whether --with-toolchain-type was given.
26655if test "${with_toolchain_type+set}" = set; then :
26656  withval=$with_toolchain_type;
26657fi
26658
26659
26660  # Use indirect variable referencing
26661  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26662  VALID_TOOLCHAINS=${!toolchain_var_name}
26663
26664  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26665    if test -n "$XCODEBUILD"; then
26666      # On Mac OS X, default toolchain to clang after Xcode 5
26667      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26668      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26669      if test $? -ne 0; then
26670        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26671      fi
26672      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26673          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26674          $CUT -f 1 -d .`
26675      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26676$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26677      if test $XCODE_MAJOR_VERSION -ge 5; then
26678          DEFAULT_TOOLCHAIN="clang"
26679      else
26680          DEFAULT_TOOLCHAIN="gcc"
26681      fi
26682    else
26683      # If Xcode is not installed, but the command line tools are
26684      # then we can't run xcodebuild. On these systems we should
26685      # default to clang
26686      DEFAULT_TOOLCHAIN="clang"
26687    fi
26688  else
26689    # First toolchain type in the list is the default
26690    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26691  fi
26692
26693  if test "x$with_toolchain_type" = xlist; then
26694    # List all toolchains
26695    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26696$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26697    for toolchain in $VALID_TOOLCHAINS; do
26698      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26699      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26700      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26701    done
26702
26703    exit 0
26704  elif test "x$with_toolchain_type" != x; then
26705    # User override; check that it is valid
26706    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26707      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26708$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26709      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26710$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26711      as_fn_error $? "Cannot continue." "$LINENO" 5
26712    fi
26713    TOOLCHAIN_TYPE=$with_toolchain_type
26714  else
26715    # No flag given, use default
26716    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26717  fi
26718
26719
26720  TOOLCHAIN_CC_BINARY_clang="clang"
26721  TOOLCHAIN_CC_BINARY_gcc="gcc"
26722  TOOLCHAIN_CC_BINARY_microsoft="cl"
26723  TOOLCHAIN_CC_BINARY_solstudio="cc"
26724  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26725
26726  TOOLCHAIN_CXX_BINARY_clang="clang++"
26727  TOOLCHAIN_CXX_BINARY_gcc="g++"
26728  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26729  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26730  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26731
26732  # Use indirect variable referencing
26733  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26734  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26735  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26736  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26737  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26738  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26739
26740
26741  # Define filename patterns
26742  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26743    LIBRARY_PREFIX=
26744    SHARED_LIBRARY_SUFFIX='.dll'
26745    STATIC_LIBRARY_SUFFIX='.lib'
26746    SHARED_LIBRARY='$1.dll'
26747    STATIC_LIBRARY='$1.lib'
26748    OBJ_SUFFIX='.obj'
26749    EXE_SUFFIX='.exe'
26750  else
26751    LIBRARY_PREFIX=lib
26752    SHARED_LIBRARY_SUFFIX='.so'
26753    STATIC_LIBRARY_SUFFIX='.a'
26754    SHARED_LIBRARY='lib$1.so'
26755    STATIC_LIBRARY='lib$1.a'
26756    OBJ_SUFFIX='.o'
26757    EXE_SUFFIX=''
26758    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26759      SHARED_LIBRARY='lib$1.dylib'
26760      SHARED_LIBRARY_SUFFIX='.dylib'
26761    fi
26762  fi
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26774    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26775$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26776  else
26777    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26778$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26779  fi
26780
26781
26782# Then detect the actual binaries needed
26783
26784  # FIXME: Is this needed?
26785  ac_ext=cpp
26786ac_cpp='$CXXCPP $CPPFLAGS'
26787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26790
26791
26792  # Store the CFLAGS etc passed to the configure script.
26793  ORG_CFLAGS="$CFLAGS"
26794  ORG_CXXFLAGS="$CXXFLAGS"
26795  ORG_OBJCFLAGS="$OBJCFLAGS"
26796
26797  # On Windows, we need to detect the visual studio installation first.
26798  # This will change the PATH, but we need to keep that new PATH even
26799  # after toolchain detection is done, since the compiler (on x86) uses
26800  # it for DLL resolution in runtime.
26801  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26802
26803  # Store path to cygwin link.exe to help excluding it when searching for
26804  # VS linker. This must be done before changing the PATH when looking for VS.
26805  # Extract the first word of "link", so it can be a program name with args.
26806set dummy link; ac_word=$2
26807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26808$as_echo_n "checking for $ac_word... " >&6; }
26809if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26810  $as_echo_n "(cached) " >&6
26811else
26812  case $CYGWIN_LINK in
26813  [\\/]* | ?:[\\/]*)
26814  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26815  ;;
26816  *)
26817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26818for as_dir in $PATH
26819do
26820  IFS=$as_save_IFS
26821  test -z "$as_dir" && as_dir=.
26822    for ac_exec_ext in '' $ac_executable_extensions; do
26823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26824    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26826    break 2
26827  fi
26828done
26829  done
26830IFS=$as_save_IFS
26831
26832  ;;
26833esac
26834fi
26835CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26836if test -n "$CYGWIN_LINK"; then
26837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26838$as_echo "$CYGWIN_LINK" >&6; }
26839else
26840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26841$as_echo "no" >&6; }
26842fi
26843
26844
26845  if test "x$CYGWIN_LINK" != x; then
26846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26847$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26848    "$CYGWIN_LINK" --version > /dev/null
26849    if test $? -eq 0 ; then
26850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26851$as_echo "yes" >&6; }
26852    else
26853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26854$as_echo "no" >&6; }
26855      # This might be the VS linker. Don't exclude it later on.
26856      CYGWIN_LINK=""
26857    fi
26858  fi
26859
26860  # First-hand choice is to locate and run the vsvars bat file.
26861
26862  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26863    VCVARSFILE="vc/bin/vcvars32.bat"
26864  else
26865    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26866  fi
26867
26868  VS_ENV_CMD=""
26869  VS_ENV_ARGS=""
26870  if test "x$with_toolsdir" != x; then
26871
26872  if test "x$VS_ENV_CMD" = x; then
26873    VS100BASE="$with_toolsdir/../.."
26874    METHOD="--with-tools-dir"
26875
26876  windows_path="$VS100BASE"
26877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26878    unix_path=`$CYGPATH -u "$windows_path"`
26879    VS100BASE="$unix_path"
26880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26882    VS100BASE="$unix_path"
26883  fi
26884
26885    if test -d "$VS100BASE"; then
26886      if test -f "$VS100BASE/$VCVARSFILE"; then
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26888$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26889        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26890        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26891        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26892        # TODO: improve detection for other versions of VS
26893        PLATFORM_TOOLSET="v100"
26894      else
26895        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26896$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26897        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26898$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26899      fi
26900    fi
26901  fi
26902
26903  fi
26904
26905  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26906    # Having specified an argument which is incorrect will produce an instant failure;
26907    # we should not go on looking
26908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26909$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26910    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26911$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26912    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26913  fi
26914
26915  if test "x$VS100COMNTOOLS" != x; then
26916
26917  if test "x$VS_ENV_CMD" = x; then
26918    VS100BASE="$VS100COMNTOOLS/../.."
26919    METHOD="VS100COMNTOOLS variable"
26920
26921  windows_path="$VS100BASE"
26922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26923    unix_path=`$CYGPATH -u "$windows_path"`
26924    VS100BASE="$unix_path"
26925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26927    VS100BASE="$unix_path"
26928  fi
26929
26930    if test -d "$VS100BASE"; then
26931      if test -f "$VS100BASE/$VCVARSFILE"; then
26932        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26933$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26934        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26935        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26936        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26937        # TODO: improve detection for other versions of VS
26938        PLATFORM_TOOLSET="v100"
26939      else
26940        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26941$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26942        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26943$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26944      fi
26945    fi
26946  fi
26947
26948  fi
26949  if test "x$PROGRAMFILES" != x; then
26950
26951  if test "x$VS_ENV_CMD" = x; then
26952    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26953    METHOD="well-known name"
26954
26955  windows_path="$VS100BASE"
26956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26957    unix_path=`$CYGPATH -u "$windows_path"`
26958    VS100BASE="$unix_path"
26959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26961    VS100BASE="$unix_path"
26962  fi
26963
26964    if test -d "$VS100BASE"; then
26965      if test -f "$VS100BASE/$VCVARSFILE"; then
26966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26967$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26968        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26969        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26970        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26971        # TODO: improve detection for other versions of VS
26972        PLATFORM_TOOLSET="v100"
26973      else
26974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26975$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26977$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26978      fi
26979    fi
26980  fi
26981
26982  fi
26983
26984  if test "x$VS_ENV_CMD" = x; then
26985    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26986    METHOD="well-known name"
26987
26988  windows_path="$VS100BASE"
26989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26990    unix_path=`$CYGPATH -u "$windows_path"`
26991    VS100BASE="$unix_path"
26992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26994    VS100BASE="$unix_path"
26995  fi
26996
26997    if test -d "$VS100BASE"; then
26998      if test -f "$VS100BASE/$VCVARSFILE"; then
26999        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27000$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27001        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27002        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27003        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27004        # TODO: improve detection for other versions of VS
27005        PLATFORM_TOOLSET="v100"
27006      else
27007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27008$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27009        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27010$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27011      fi
27012    fi
27013  fi
27014
27015
27016  if test "x$VS_ENV_CMD" = x; then
27017    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27018    METHOD="well-known name"
27019
27020  windows_path="$VS100BASE"
27021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27022    unix_path=`$CYGPATH -u "$windows_path"`
27023    VS100BASE="$unix_path"
27024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27026    VS100BASE="$unix_path"
27027  fi
27028
27029    if test -d "$VS100BASE"; then
27030      if test -f "$VS100BASE/$VCVARSFILE"; then
27031        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27032$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27033        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27034        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27035        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27036        # TODO: improve detection for other versions of VS
27037        PLATFORM_TOOLSET="v100"
27038      else
27039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27040$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27041        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27042$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27043      fi
27044    fi
27045  fi
27046
27047
27048  if test "x$ProgramW6432" != x; then
27049
27050  if test "x$VS_ENV_CMD" = x; then
27051    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27052    METHOD="well-known name"
27053
27054  windows_path="$WIN_SDK_BASE"
27055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27056    unix_path=`$CYGPATH -u "$windows_path"`
27057    WIN_SDK_BASE="$unix_path"
27058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27060    WIN_SDK_BASE="$unix_path"
27061  fi
27062
27063    if test -d "$WIN_SDK_BASE"; then
27064      # There have been cases of partial or broken SDK installations. A missing
27065      # lib dir is not going to work.
27066      if test ! -d "$WIN_SDK_BASE/../lib"; then
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27069        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27070$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27071      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27073$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27074        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27075        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27076          VS_ENV_ARGS="/x86"
27077        else
27078          VS_ENV_ARGS="/x64"
27079        fi
27080        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27081        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27082        # TODO: improve detection for other versions of SDK
27083        PLATFORM_TOOLSET="Windows7.1SDK"
27084      else
27085        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27086$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27087        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27088$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27089      fi
27090    fi
27091  fi
27092
27093  fi
27094  if test "x$PROGRAMW6432" != x; then
27095
27096  if test "x$VS_ENV_CMD" = x; then
27097    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27098    METHOD="well-known name"
27099
27100  windows_path="$WIN_SDK_BASE"
27101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27102    unix_path=`$CYGPATH -u "$windows_path"`
27103    WIN_SDK_BASE="$unix_path"
27104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27106    WIN_SDK_BASE="$unix_path"
27107  fi
27108
27109    if test -d "$WIN_SDK_BASE"; then
27110      # There have been cases of partial or broken SDK installations. A missing
27111      # lib dir is not going to work.
27112      if test ! -d "$WIN_SDK_BASE/../lib"; then
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27114$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27115        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27116$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27117      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27120        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27121        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27122          VS_ENV_ARGS="/x86"
27123        else
27124          VS_ENV_ARGS="/x64"
27125        fi
27126        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27127        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27128        # TODO: improve detection for other versions of SDK
27129        PLATFORM_TOOLSET="Windows7.1SDK"
27130      else
27131        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27132$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27133        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27134$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27135      fi
27136    fi
27137  fi
27138
27139  fi
27140  if test "x$PROGRAMFILES" != x; then
27141
27142  if test "x$VS_ENV_CMD" = x; then
27143    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27144    METHOD="well-known name"
27145
27146  windows_path="$WIN_SDK_BASE"
27147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27148    unix_path=`$CYGPATH -u "$windows_path"`
27149    WIN_SDK_BASE="$unix_path"
27150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27152    WIN_SDK_BASE="$unix_path"
27153  fi
27154
27155    if test -d "$WIN_SDK_BASE"; then
27156      # There have been cases of partial or broken SDK installations. A missing
27157      # lib dir is not going to work.
27158      if test ! -d "$WIN_SDK_BASE/../lib"; then
27159        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27160$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27161        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27162$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27163      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27165$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27166        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27167        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27168          VS_ENV_ARGS="/x86"
27169        else
27170          VS_ENV_ARGS="/x64"
27171        fi
27172        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27173        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27174        # TODO: improve detection for other versions of SDK
27175        PLATFORM_TOOLSET="Windows7.1SDK"
27176      else
27177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27179        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27180$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27181      fi
27182    fi
27183  fi
27184
27185  fi
27186
27187  if test "x$VS_ENV_CMD" = x; then
27188    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27189    METHOD="well-known name"
27190
27191  windows_path="$WIN_SDK_BASE"
27192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27193    unix_path=`$CYGPATH -u "$windows_path"`
27194    WIN_SDK_BASE="$unix_path"
27195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27197    WIN_SDK_BASE="$unix_path"
27198  fi
27199
27200    if test -d "$WIN_SDK_BASE"; then
27201      # There have been cases of partial or broken SDK installations. A missing
27202      # lib dir is not going to work.
27203      if test ! -d "$WIN_SDK_BASE/../lib"; then
27204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27205$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27206        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27207$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27208      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27210$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27211        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27212        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27213          VS_ENV_ARGS="/x86"
27214        else
27215          VS_ENV_ARGS="/x64"
27216        fi
27217        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27218        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27219        # TODO: improve detection for other versions of SDK
27220        PLATFORM_TOOLSET="Windows7.1SDK"
27221      else
27222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27224        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27225$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27226      fi
27227    fi
27228  fi
27229
27230
27231  if test "x$VS_ENV_CMD" = x; then
27232    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27233    METHOD="well-known name"
27234
27235  windows_path="$WIN_SDK_BASE"
27236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27237    unix_path=`$CYGPATH -u "$windows_path"`
27238    WIN_SDK_BASE="$unix_path"
27239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27241    WIN_SDK_BASE="$unix_path"
27242  fi
27243
27244    if test -d "$WIN_SDK_BASE"; then
27245      # There have been cases of partial or broken SDK installations. A missing
27246      # lib dir is not going to work.
27247      if test ! -d "$WIN_SDK_BASE/../lib"; then
27248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27251$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27252      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27255        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27256        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27257          VS_ENV_ARGS="/x86"
27258        else
27259          VS_ENV_ARGS="/x64"
27260        fi
27261        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27262        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27263        # TODO: improve detection for other versions of SDK
27264        PLATFORM_TOOLSET="Windows7.1SDK"
27265      else
27266        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27267$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27268        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27269$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27270      fi
27271    fi
27272  fi
27273
27274
27275  if test "x$VS_ENV_CMD" != x; then
27276    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27277
27278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27279
27280  # First separate the path from the arguments. This will split at the first
27281  # space.
27282  complete="$VS_ENV_CMD"
27283  path="${complete%% *}"
27284  tmp="$complete EOL"
27285  arguments="${tmp#* }"
27286
27287  # Input might be given as Windows format, start by converting to
27288  # unix format.
27289  new_path=`$CYGPATH -u "$path"`
27290
27291  # Now try to locate executable using which
27292  new_path=`$WHICH "$new_path" 2> /dev/null`
27293  # bat and cmd files are not always considered executable in cygwin causing which
27294  # to not find them
27295  if test "x$new_path" = x \
27296      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27297      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27298    new_path=`$CYGPATH -u "$path"`
27299  fi
27300  if test "x$new_path" = x; then
27301    # Oops. Which didn't find the executable.
27302    # The splitting of arguments from the executable at a space might have been incorrect,
27303    # since paths with space are more likely in Windows. Give it another try with the whole
27304    # argument.
27305    path="$complete"
27306    arguments="EOL"
27307    new_path=`$CYGPATH -u "$path"`
27308    new_path=`$WHICH "$new_path" 2> /dev/null`
27309    # bat and cmd files are not always considered executable in cygwin causing which
27310    # to not find them
27311    if test "x$new_path" = x \
27312        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27313        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27314      new_path=`$CYGPATH -u "$path"`
27315    fi
27316    if test "x$new_path" = x; then
27317      # It's still not found. Now this is an unrecoverable error.
27318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27319$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27320      has_space=`$ECHO "$complete" | $GREP " "`
27321      if test "x$has_space" != x; then
27322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27324      fi
27325      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27326    fi
27327  fi
27328
27329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27332  # "foo.exe" is OK but "foo" is an error.
27333  #
27334  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27335  # It is also a way to make sure we got the proper file name for the real test later on.
27336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27337  if test "x$test_shortpath" = x; then
27338    # Short path failed, file does not exist as specified.
27339    # Try adding .exe or .cmd
27340    if test -f "${new_path}.exe"; then
27341      input_to_shortpath="${new_path}.exe"
27342    elif test -f "${new_path}.cmd"; then
27343      input_to_shortpath="${new_path}.cmd"
27344    else
27345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27346$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27349      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27350    fi
27351  else
27352    input_to_shortpath="$new_path"
27353  fi
27354
27355  # Call helper function which possibly converts this using DOS-style short mode.
27356  # If so, the updated path is stored in $new_path.
27357  new_path="$input_to_shortpath"
27358
27359  input_path="$input_to_shortpath"
27360  # Check if we need to convert this using DOS-style short mode. If the path
27361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27362  # take no chances and rewrite it.
27363  # Note: m4 eats our [], so we need to use [ and ] instead.
27364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27365  if test "x$has_forbidden_chars" != x; then
27366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27370      # Going to short mode and back again did indeed matter. Since short mode is
27371      # case insensitive, let's make it lowercase to improve readability.
27372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27373      # Now convert it back to Unix-stile (cygpath)
27374      input_path=`$CYGPATH -u "$shortmode_path"`
27375      new_path="$input_path"
27376    fi
27377  fi
27378
27379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27380  if test "x$test_cygdrive_prefix" = x; then
27381    # As a simple fix, exclude /usr/bin since it's not a real path.
27382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27384      # a path prefixed by /cygdrive for fixpath to work.
27385      new_path="$CYGWIN_ROOT_PATH$input_path"
27386    fi
27387  fi
27388
27389  # remove trailing .exe if any
27390  new_path="${new_path/%.exe/}"
27391
27392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27393
27394  # First separate the path from the arguments. This will split at the first
27395  # space.
27396  complete="$VS_ENV_CMD"
27397  path="${complete%% *}"
27398  tmp="$complete EOL"
27399  arguments="${tmp#* }"
27400
27401  # Input might be given as Windows format, start by converting to
27402  # unix format.
27403  new_path="$path"
27404
27405  windows_path="$new_path"
27406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27407    unix_path=`$CYGPATH -u "$windows_path"`
27408    new_path="$unix_path"
27409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27411    new_path="$unix_path"
27412  fi
27413
27414
27415  # Now try to locate executable using which
27416  new_path=`$WHICH "$new_path" 2> /dev/null`
27417
27418  if test "x$new_path" = x; then
27419    # Oops. Which didn't find the executable.
27420    # The splitting of arguments from the executable at a space might have been incorrect,
27421    # since paths with space are more likely in Windows. Give it another try with the whole
27422    # argument.
27423    path="$complete"
27424    arguments="EOL"
27425    new_path="$path"
27426
27427  windows_path="$new_path"
27428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27429    unix_path=`$CYGPATH -u "$windows_path"`
27430    new_path="$unix_path"
27431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27433    new_path="$unix_path"
27434  fi
27435
27436
27437    new_path=`$WHICH "$new_path" 2> /dev/null`
27438    # bat and cmd files are not always considered executable in MSYS causing which
27439    # to not find them
27440    if test "x$new_path" = x \
27441        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27442        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27443      new_path="$path"
27444
27445  windows_path="$new_path"
27446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447    unix_path=`$CYGPATH -u "$windows_path"`
27448    new_path="$unix_path"
27449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27451    new_path="$unix_path"
27452  fi
27453
27454    fi
27455
27456    if test "x$new_path" = x; then
27457      # It's still not found. Now this is an unrecoverable error.
27458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27459$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27460      has_space=`$ECHO "$complete" | $GREP " "`
27461      if test "x$has_space" != x; then
27462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27464      fi
27465      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27466    fi
27467  fi
27468
27469  # Now new_path has a complete unix path to the binary
27470  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27471    # Keep paths in /bin as-is, but remove trailing .exe if any
27472    new_path="${new_path/%.exe/}"
27473    # Do not save /bin paths to all_fixpath_prefixes!
27474  else
27475    # Not in mixed or Windows style, start by that.
27476    new_path=`cmd //c echo $new_path`
27477
27478  input_path="$new_path"
27479  # Check if we need to convert this using DOS-style short mode. If the path
27480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27481  # take no chances and rewrite it.
27482  # Note: m4 eats our [], so we need to use [ and ] instead.
27483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27484  if test "x$has_forbidden_chars" != x; then
27485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27487  fi
27488
27489    # Output is in $new_path
27490
27491  windows_path="$new_path"
27492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27493    unix_path=`$CYGPATH -u "$windows_path"`
27494    new_path="$unix_path"
27495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27497    new_path="$unix_path"
27498  fi
27499
27500    # remove trailing .exe if any
27501    new_path="${new_path/%.exe/}"
27502
27503    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27504    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27505  fi
27506
27507  else
27508    # We're on a posix platform. Hooray! :)
27509    # First separate the path from the arguments. This will split at the first
27510    # space.
27511    complete="$VS_ENV_CMD"
27512    path="${complete%% *}"
27513    tmp="$complete EOL"
27514    arguments="${tmp#* }"
27515
27516    # Cannot rely on the command "which" here since it doesn't always work.
27517    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27518    if test -z "$is_absolute_path"; then
27519      # Path to executable is not absolute. Find it.
27520      IFS_save="$IFS"
27521      IFS=:
27522      for p in $PATH; do
27523        if test -f "$p/$path" && test -x "$p/$path"; then
27524          new_path="$p/$path"
27525          break
27526        fi
27527      done
27528      IFS="$IFS_save"
27529    else
27530      # This is an absolute path, we can use it without further modifications.
27531      new_path="$path"
27532    fi
27533
27534    if test "x$new_path" = x; then
27535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27536$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27537      has_space=`$ECHO "$complete" | $GREP " "`
27538      if test "x$has_space" != x; then
27539        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27540$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27541      fi
27542      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27543    fi
27544  fi
27545
27546  # Now join together the path and the arguments once again
27547  if test "x$arguments" != xEOL; then
27548    new_complete="$new_path ${arguments% *}"
27549  else
27550    new_complete="$new_path"
27551  fi
27552
27553  if test "x$complete" != "x$new_complete"; then
27554    VS_ENV_CMD="$new_complete"
27555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27556$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27557  fi
27558
27559
27560    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27561    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27562$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27563
27564    # We need to create a couple of temporary files.
27565    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27566    $MKDIR -p $VS_ENV_TMP_DIR
27567
27568    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27569    # Instead create a shell script which will set the relevant variables when run.
27570    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27571
27572  unix_path="$WINPATH_VS_ENV_CMD"
27573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27574    windows_path=`$CYGPATH -m "$unix_path"`
27575    WINPATH_VS_ENV_CMD="$windows_path"
27576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27577    windows_path=`cmd //c echo $unix_path`
27578    WINPATH_VS_ENV_CMD="$windows_path"
27579  fi
27580
27581    WINPATH_BASH="$BASH"
27582
27583  unix_path="$WINPATH_BASH"
27584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27585    windows_path=`$CYGPATH -m "$unix_path"`
27586    WINPATH_BASH="$windows_path"
27587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27588    windows_path=`cmd //c echo $unix_path`
27589    WINPATH_BASH="$windows_path"
27590  fi
27591
27592
27593    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27594    # script (executable by bash) that will setup the important variables.
27595    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27596    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27597    # This will end up something like:
27598    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27599    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27600    # These will end up something like:
27601    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27602    # The trailing space for everyone except PATH is no typo, but is needed due
27603    # to trailing \ in the Windows paths. These will be stripped later.
27604    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27605    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27606    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27607    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27608    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27609    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27610
27611    # Now execute the newly created bat file.
27612    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27613    # Change directory so we don't need to mess with Windows paths in redirects.
27614    cd $VS_ENV_TMP_DIR
27615    cmd /c extract-vs-env.bat | $CAT
27616    cd $CURDIR
27617
27618    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27619      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27620$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27621      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27622$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27623      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27624$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27625      as_fn_error $? "Cannot continue" "$LINENO" 5
27626    fi
27627
27628    # Now set all paths and other env variables. This will allow the rest of
27629    # the configure script to find and run the compiler in the proper way.
27630    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27631$as_echo "$as_me: Setting extracted environment variables" >&6;}
27632    . $VS_ENV_TMP_DIR/set-vs-env.sh
27633    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27634    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27635  else
27636    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27637    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27638$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27639  fi
27640
27641  # At this point, we should have correct variables in the environment, or we can't continue.
27642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27643$as_echo_n "checking for Visual Studio variables... " >&6; }
27644
27645  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27646    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27648$as_echo "present but broken" >&6; }
27649      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27650    else
27651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27652$as_echo "ok" >&6; }
27653      # Remove any trailing "\" and " " from the variables.
27654      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27655      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27656      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27657      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27658      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27659      # Remove any paths containing # (typically F#) as that messes up make. This
27660      # is needed if visual studio was installed with F# support.
27661      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27662
27663
27664
27665
27666    fi
27667  else
27668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27669$as_echo "not found" >&6; }
27670
27671    if test "x$VS_ENV_CMD" = x; then
27672      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27673$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27674      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27675$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27676    else
27677      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27678$as_echo "$as_me: Running the extraction script failed." >&6;}
27679    fi
27680    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27681$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27682    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27683$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27684    as_fn_error $? "Cannot continue" "$LINENO" 5
27685  fi
27686
27687    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27688    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27689    PATH="$VS_PATH"
27690    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27691    export INCLUDE="$VS_INCLUDE"
27692    export LIB="$VS_LIB"
27693  fi
27694
27695  # autoconf magic only relies on PATH, so update it if tools dir is specified
27696  OLD_PATH="$PATH"
27697
27698  # For solaris we really need solaris tools, and not the GNU equivalent.
27699  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27700  # so add that to path before starting to probe.
27701  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27702  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27703    PATH="/usr/ccs/bin:$PATH"
27704  fi
27705
27706  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27707  # override all other locations.
27708  if test "x$TOOLCHAIN_PATH" != x; then
27709    PATH=$TOOLCHAIN_PATH:$PATH
27710  fi
27711
27712
27713  #
27714  # Setup the compilers (CC and CXX)
27715  #
27716
27717  COMPILER_NAME=C
27718  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27719
27720  if test "x$CC" != x; then
27721    # User has supplied compiler name already, always let that override.
27722    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27723$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27724    if test "x`basename $CC`" = "x$CC"; then
27725      # A command without a complete path is provided, search $PATH.
27726
27727      for ac_prog in $CC
27728do
27729  # Extract the first word of "$ac_prog", so it can be a program name with args.
27730set dummy $ac_prog; ac_word=$2
27731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27732$as_echo_n "checking for $ac_word... " >&6; }
27733if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27734  $as_echo_n "(cached) " >&6
27735else
27736  case $POTENTIAL_CC in
27737  [\\/]* | ?:[\\/]*)
27738  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27739  ;;
27740  *)
27741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27742for as_dir in $PATH
27743do
27744  IFS=$as_save_IFS
27745  test -z "$as_dir" && as_dir=.
27746    for ac_exec_ext in '' $ac_executable_extensions; do
27747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27748    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27750    break 2
27751  fi
27752done
27753  done
27754IFS=$as_save_IFS
27755
27756  ;;
27757esac
27758fi
27759POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27760if test -n "$POTENTIAL_CC"; then
27761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27762$as_echo "$POTENTIAL_CC" >&6; }
27763else
27764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27765$as_echo "no" >&6; }
27766fi
27767
27768
27769  test -n "$POTENTIAL_CC" && break
27770done
27771
27772      if test "x$POTENTIAL_CC" != x; then
27773        CC=$POTENTIAL_CC
27774      else
27775        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27776      fi
27777    else
27778      # Otherwise it might already be a complete path
27779      if test ! -x "$CC"; then
27780        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27781      fi
27782    fi
27783  else
27784    # No user supplied value. Locate compiler ourselves.
27785
27786    # If we are cross compiling, assume cross compilation tools follows the
27787    # cross compilation standard where they are prefixed with the autoconf
27788    # standard name for the target. For example the binary
27789    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27790    # If we are not cross compiling, then the default compiler name will be
27791    # used.
27792
27793    CC=
27794    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27795    # before checking the rest of the PATH.
27796    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27797    # step, this should not be necessary.
27798    if test -n "$TOOLCHAIN_PATH"; then
27799      PATH_save="$PATH"
27800      PATH="$TOOLCHAIN_PATH"
27801      for ac_prog in $SEARCH_LIST
27802do
27803  # Extract the first word of "$ac_prog", so it can be a program name with args.
27804set dummy $ac_prog; ac_word=$2
27805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27806$as_echo_n "checking for $ac_word... " >&6; }
27807if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27808  $as_echo_n "(cached) " >&6
27809else
27810  case $TOOLCHAIN_PATH_CC in
27811  [\\/]* | ?:[\\/]*)
27812  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27813  ;;
27814  *)
27815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27816for as_dir in $PATH
27817do
27818  IFS=$as_save_IFS
27819  test -z "$as_dir" && as_dir=.
27820    for ac_exec_ext in '' $ac_executable_extensions; do
27821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27822    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27824    break 2
27825  fi
27826done
27827  done
27828IFS=$as_save_IFS
27829
27830  ;;
27831esac
27832fi
27833TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27834if test -n "$TOOLCHAIN_PATH_CC"; then
27835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27836$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27837else
27838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27839$as_echo "no" >&6; }
27840fi
27841
27842
27843  test -n "$TOOLCHAIN_PATH_CC" && break
27844done
27845
27846      CC=$TOOLCHAIN_PATH_CC
27847      PATH="$PATH_save"
27848    fi
27849
27850    # AC_PATH_PROGS can't be run multiple times with the same variable,
27851    # so create a new name for this run.
27852    if test "x$CC" = x; then
27853      for ac_prog in $SEARCH_LIST
27854do
27855  # Extract the first word of "$ac_prog", so it can be a program name with args.
27856set dummy $ac_prog; ac_word=$2
27857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27858$as_echo_n "checking for $ac_word... " >&6; }
27859if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27860  $as_echo_n "(cached) " >&6
27861else
27862  case $POTENTIAL_CC in
27863  [\\/]* | ?:[\\/]*)
27864  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27865  ;;
27866  *)
27867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27868for as_dir in $PATH
27869do
27870  IFS=$as_save_IFS
27871  test -z "$as_dir" && as_dir=.
27872    for ac_exec_ext in '' $ac_executable_extensions; do
27873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27874    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27876    break 2
27877  fi
27878done
27879  done
27880IFS=$as_save_IFS
27881
27882  ;;
27883esac
27884fi
27885POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27886if test -n "$POTENTIAL_CC"; then
27887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27888$as_echo "$POTENTIAL_CC" >&6; }
27889else
27890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27891$as_echo "no" >&6; }
27892fi
27893
27894
27895  test -n "$POTENTIAL_CC" && break
27896done
27897
27898      CC=$POTENTIAL_CC
27899    fi
27900
27901    if test "x$CC" = x; then
27902
27903  # Print a helpful message on how to acquire the necessary build dependency.
27904  # devkit is the help tag: freetype, cups, pulse, alsa etc
27905  MISSING_DEPENDENCY=devkit
27906
27907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27908    cygwin_help $MISSING_DEPENDENCY
27909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27910    msys_help $MISSING_DEPENDENCY
27911  else
27912    PKGHANDLER_COMMAND=
27913
27914    case $PKGHANDLER in
27915      apt-get)
27916        apt_help     $MISSING_DEPENDENCY ;;
27917      yum)
27918        yum_help     $MISSING_DEPENDENCY ;;
27919      port)
27920        port_help    $MISSING_DEPENDENCY ;;
27921      pkgutil)
27922        pkgutil_help $MISSING_DEPENDENCY ;;
27923      pkgadd)
27924        pkgadd_help  $MISSING_DEPENDENCY ;;
27925    esac
27926
27927    if test "x$PKGHANDLER_COMMAND" != x; then
27928      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27929    fi
27930  fi
27931
27932      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27933    fi
27934  fi
27935
27936  # Now we have a compiler binary in CC. Make sure it's okay.
27937
27938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27939
27940  # First separate the path from the arguments. This will split at the first
27941  # space.
27942  complete="$CC"
27943  path="${complete%% *}"
27944  tmp="$complete EOL"
27945  arguments="${tmp#* }"
27946
27947  # Input might be given as Windows format, start by converting to
27948  # unix format.
27949  new_path=`$CYGPATH -u "$path"`
27950
27951  # Now try to locate executable using which
27952  new_path=`$WHICH "$new_path" 2> /dev/null`
27953  # bat and cmd files are not always considered executable in cygwin causing which
27954  # to not find them
27955  if test "x$new_path" = x \
27956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27958    new_path=`$CYGPATH -u "$path"`
27959  fi
27960  if test "x$new_path" = x; then
27961    # Oops. Which didn't find the executable.
27962    # The splitting of arguments from the executable at a space might have been incorrect,
27963    # since paths with space are more likely in Windows. Give it another try with the whole
27964    # argument.
27965    path="$complete"
27966    arguments="EOL"
27967    new_path=`$CYGPATH -u "$path"`
27968    new_path=`$WHICH "$new_path" 2> /dev/null`
27969    # bat and cmd files are not always considered executable in cygwin causing which
27970    # to not find them
27971    if test "x$new_path" = x \
27972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27974      new_path=`$CYGPATH -u "$path"`
27975    fi
27976    if test "x$new_path" = x; then
27977      # It's still not found. Now this is an unrecoverable error.
27978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27979$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27980      has_space=`$ECHO "$complete" | $GREP " "`
27981      if test "x$has_space" != x; then
27982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27984      fi
27985      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27986    fi
27987  fi
27988
27989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27992  # "foo.exe" is OK but "foo" is an error.
27993  #
27994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27995  # It is also a way to make sure we got the proper file name for the real test later on.
27996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27997  if test "x$test_shortpath" = x; then
27998    # Short path failed, file does not exist as specified.
27999    # Try adding .exe or .cmd
28000    if test -f "${new_path}.exe"; then
28001      input_to_shortpath="${new_path}.exe"
28002    elif test -f "${new_path}.cmd"; then
28003      input_to_shortpath="${new_path}.cmd"
28004    else
28005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28006$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28009      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28010    fi
28011  else
28012    input_to_shortpath="$new_path"
28013  fi
28014
28015  # Call helper function which possibly converts this using DOS-style short mode.
28016  # If so, the updated path is stored in $new_path.
28017  new_path="$input_to_shortpath"
28018
28019  input_path="$input_to_shortpath"
28020  # Check if we need to convert this using DOS-style short mode. If the path
28021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28022  # take no chances and rewrite it.
28023  # Note: m4 eats our [], so we need to use [ and ] instead.
28024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28025  if test "x$has_forbidden_chars" != x; then
28026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28030      # Going to short mode and back again did indeed matter. Since short mode is
28031      # case insensitive, let's make it lowercase to improve readability.
28032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28033      # Now convert it back to Unix-stile (cygpath)
28034      input_path=`$CYGPATH -u "$shortmode_path"`
28035      new_path="$input_path"
28036    fi
28037  fi
28038
28039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28040  if test "x$test_cygdrive_prefix" = x; then
28041    # As a simple fix, exclude /usr/bin since it's not a real path.
28042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28044      # a path prefixed by /cygdrive for fixpath to work.
28045      new_path="$CYGWIN_ROOT_PATH$input_path"
28046    fi
28047  fi
28048
28049  # remove trailing .exe if any
28050  new_path="${new_path/%.exe/}"
28051
28052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28053
28054  # First separate the path from the arguments. This will split at the first
28055  # space.
28056  complete="$CC"
28057  path="${complete%% *}"
28058  tmp="$complete EOL"
28059  arguments="${tmp#* }"
28060
28061  # Input might be given as Windows format, start by converting to
28062  # unix format.
28063  new_path="$path"
28064
28065  windows_path="$new_path"
28066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28067    unix_path=`$CYGPATH -u "$windows_path"`
28068    new_path="$unix_path"
28069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28071    new_path="$unix_path"
28072  fi
28073
28074
28075  # Now try to locate executable using which
28076  new_path=`$WHICH "$new_path" 2> /dev/null`
28077
28078  if test "x$new_path" = x; then
28079    # Oops. Which didn't find the executable.
28080    # The splitting of arguments from the executable at a space might have been incorrect,
28081    # since paths with space are more likely in Windows. Give it another try with the whole
28082    # argument.
28083    path="$complete"
28084    arguments="EOL"
28085    new_path="$path"
28086
28087  windows_path="$new_path"
28088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28089    unix_path=`$CYGPATH -u "$windows_path"`
28090    new_path="$unix_path"
28091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28093    new_path="$unix_path"
28094  fi
28095
28096
28097    new_path=`$WHICH "$new_path" 2> /dev/null`
28098    # bat and cmd files are not always considered executable in MSYS causing which
28099    # to not find them
28100    if test "x$new_path" = x \
28101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28103      new_path="$path"
28104
28105  windows_path="$new_path"
28106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28107    unix_path=`$CYGPATH -u "$windows_path"`
28108    new_path="$unix_path"
28109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28111    new_path="$unix_path"
28112  fi
28113
28114    fi
28115
28116    if test "x$new_path" = x; then
28117      # It's still not found. Now this is an unrecoverable error.
28118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28119$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28120      has_space=`$ECHO "$complete" | $GREP " "`
28121      if test "x$has_space" != x; then
28122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28124      fi
28125      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28126    fi
28127  fi
28128
28129  # Now new_path has a complete unix path to the binary
28130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28131    # Keep paths in /bin as-is, but remove trailing .exe if any
28132    new_path="${new_path/%.exe/}"
28133    # Do not save /bin paths to all_fixpath_prefixes!
28134  else
28135    # Not in mixed or Windows style, start by that.
28136    new_path=`cmd //c echo $new_path`
28137
28138  input_path="$new_path"
28139  # Check if we need to convert this using DOS-style short mode. If the path
28140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28141  # take no chances and rewrite it.
28142  # Note: m4 eats our [], so we need to use [ and ] instead.
28143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28144  if test "x$has_forbidden_chars" != x; then
28145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28147  fi
28148
28149    # Output is in $new_path
28150
28151  windows_path="$new_path"
28152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28153    unix_path=`$CYGPATH -u "$windows_path"`
28154    new_path="$unix_path"
28155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28157    new_path="$unix_path"
28158  fi
28159
28160    # remove trailing .exe if any
28161    new_path="${new_path/%.exe/}"
28162
28163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28165  fi
28166
28167  else
28168    # We're on a posix platform. Hooray! :)
28169    # First separate the path from the arguments. This will split at the first
28170    # space.
28171    complete="$CC"
28172    path="${complete%% *}"
28173    tmp="$complete EOL"
28174    arguments="${tmp#* }"
28175
28176    # Cannot rely on the command "which" here since it doesn't always work.
28177    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28178    if test -z "$is_absolute_path"; then
28179      # Path to executable is not absolute. Find it.
28180      IFS_save="$IFS"
28181      IFS=:
28182      for p in $PATH; do
28183        if test -f "$p/$path" && test -x "$p/$path"; then
28184          new_path="$p/$path"
28185          break
28186        fi
28187      done
28188      IFS="$IFS_save"
28189    else
28190      # This is an absolute path, we can use it without further modifications.
28191      new_path="$path"
28192    fi
28193
28194    if test "x$new_path" = x; then
28195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28196$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28197      has_space=`$ECHO "$complete" | $GREP " "`
28198      if test "x$has_space" != x; then
28199        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28201      fi
28202      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28203    fi
28204  fi
28205
28206  # Now join together the path and the arguments once again
28207  if test "x$arguments" != xEOL; then
28208    new_complete="$new_path ${arguments% *}"
28209  else
28210    new_complete="$new_path"
28211  fi
28212
28213  if test "x$complete" != "x$new_complete"; then
28214    CC="$new_complete"
28215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28216$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28217  fi
28218
28219  TEST_COMPILER="$CC"
28220  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28221  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28222  if test "x$OPENJDK_BUILD_OS" != xaix; then
28223    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28225$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28226
28227  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28228    # Follow a chain of symbolic links. Use readlink
28229    # where it exists, else fall back to horribly
28230    # complicated shell code.
28231    if test "x$READLINK_TESTED" != yes; then
28232      # On MacOSX there is a readlink tool with a different
28233      # purpose than the GNU readlink tool. Check the found readlink.
28234      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28235      if test "x$ISGNU" = x; then
28236        # A readlink that we do not know how to use.
28237        # Are there other non-GNU readlinks out there?
28238        READLINK_TESTED=yes
28239        READLINK=
28240      fi
28241    fi
28242
28243    if test "x$READLINK" != x; then
28244      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28245    else
28246      # Save the current directory for restoring afterwards
28247      STARTDIR=$PWD
28248      COUNTER=0
28249      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28250      sym_link_file=`$BASENAME $TEST_COMPILER`
28251      cd $sym_link_dir
28252      # Use -P flag to resolve symlinks in directories.
28253      cd `$THEPWDCMD -P`
28254      sym_link_dir=`$THEPWDCMD -P`
28255      # Resolve file symlinks
28256      while test $COUNTER -lt 20; do
28257        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28258        if test "x$ISLINK" == x; then
28259          # This is not a symbolic link! We are done!
28260          break
28261        fi
28262        # Again resolve directory symlinks since the target of the just found
28263        # link could be in a different directory
28264        cd `$DIRNAME $ISLINK`
28265        sym_link_dir=`$THEPWDCMD -P`
28266        sym_link_file=`$BASENAME $ISLINK`
28267        let COUNTER=COUNTER+1
28268      done
28269      cd $STARTDIR
28270      TEST_COMPILER=$sym_link_dir/$sym_link_file
28271    fi
28272  fi
28273
28274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28275$as_echo "$TEST_COMPILER" >&6; }
28276  fi
28277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28278$as_echo_n "checking if CC is disguised ccache... " >&6; }
28279
28280  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28281  if test "x$COMPILER_BASENAME" = "xccache"; then
28282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28283$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28284    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28285    # We want to control ccache invocation ourselves, so ignore this cc and try
28286    # searching again.
28287
28288    # Remove the path to the fake ccache cc from the PATH
28289    RETRY_COMPILER_SAVED_PATH="$PATH"
28290    COMPILER_DIRNAME=`$DIRNAME $CC`
28291    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28292
28293    # Try again looking for our compiler
28294    if test -n "$ac_tool_prefix"; then
28295  for ac_prog in $TOOLCHAIN_CC_BINARY
28296  do
28297    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28298set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28300$as_echo_n "checking for $ac_word... " >&6; }
28301if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28302  $as_echo_n "(cached) " >&6
28303else
28304  if test -n "$PROPER_COMPILER_CC"; then
28305  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28306else
28307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28308for as_dir in $PATH
28309do
28310  IFS=$as_save_IFS
28311  test -z "$as_dir" && as_dir=.
28312    for ac_exec_ext in '' $ac_executable_extensions; do
28313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28314    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28316    break 2
28317  fi
28318done
28319  done
28320IFS=$as_save_IFS
28321
28322fi
28323fi
28324PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28325if test -n "$PROPER_COMPILER_CC"; then
28326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28327$as_echo "$PROPER_COMPILER_CC" >&6; }
28328else
28329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28330$as_echo "no" >&6; }
28331fi
28332
28333
28334    test -n "$PROPER_COMPILER_CC" && break
28335  done
28336fi
28337if test -z "$PROPER_COMPILER_CC"; then
28338  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28339  for ac_prog in $TOOLCHAIN_CC_BINARY
28340do
28341  # Extract the first word of "$ac_prog", so it can be a program name with args.
28342set dummy $ac_prog; ac_word=$2
28343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28344$as_echo_n "checking for $ac_word... " >&6; }
28345if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28346  $as_echo_n "(cached) " >&6
28347else
28348  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28349  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28350else
28351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28352for as_dir in $PATH
28353do
28354  IFS=$as_save_IFS
28355  test -z "$as_dir" && as_dir=.
28356    for ac_exec_ext in '' $ac_executable_extensions; do
28357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28358    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28360    break 2
28361  fi
28362done
28363  done
28364IFS=$as_save_IFS
28365
28366fi
28367fi
28368ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28369if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28371$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28372else
28373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28374$as_echo "no" >&6; }
28375fi
28376
28377
28378  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28379done
28380
28381  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28382    PROPER_COMPILER_CC=""
28383  else
28384    case $cross_compiling:$ac_tool_warned in
28385yes:)
28386{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28387$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28388ac_tool_warned=yes ;;
28389esac
28390    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28391  fi
28392fi
28393
28394
28395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28396
28397  # First separate the path from the arguments. This will split at the first
28398  # space.
28399  complete="$PROPER_COMPILER_CC"
28400  path="${complete%% *}"
28401  tmp="$complete EOL"
28402  arguments="${tmp#* }"
28403
28404  # Input might be given as Windows format, start by converting to
28405  # unix format.
28406  new_path=`$CYGPATH -u "$path"`
28407
28408  # Now try to locate executable using which
28409  new_path=`$WHICH "$new_path" 2> /dev/null`
28410  # bat and cmd files are not always considered executable in cygwin causing which
28411  # to not find them
28412  if test "x$new_path" = x \
28413      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28414      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28415    new_path=`$CYGPATH -u "$path"`
28416  fi
28417  if test "x$new_path" = x; then
28418    # Oops. Which didn't find the executable.
28419    # The splitting of arguments from the executable at a space might have been incorrect,
28420    # since paths with space are more likely in Windows. Give it another try with the whole
28421    # argument.
28422    path="$complete"
28423    arguments="EOL"
28424    new_path=`$CYGPATH -u "$path"`
28425    new_path=`$WHICH "$new_path" 2> /dev/null`
28426    # bat and cmd files are not always considered executable in cygwin causing which
28427    # to not find them
28428    if test "x$new_path" = x \
28429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28431      new_path=`$CYGPATH -u "$path"`
28432    fi
28433    if test "x$new_path" = x; then
28434      # It's still not found. Now this is an unrecoverable error.
28435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28436$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28437      has_space=`$ECHO "$complete" | $GREP " "`
28438      if test "x$has_space" != x; then
28439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28441      fi
28442      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28443    fi
28444  fi
28445
28446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28449  # "foo.exe" is OK but "foo" is an error.
28450  #
28451  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28452  # It is also a way to make sure we got the proper file name for the real test later on.
28453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28454  if test "x$test_shortpath" = x; then
28455    # Short path failed, file does not exist as specified.
28456    # Try adding .exe or .cmd
28457    if test -f "${new_path}.exe"; then
28458      input_to_shortpath="${new_path}.exe"
28459    elif test -f "${new_path}.cmd"; then
28460      input_to_shortpath="${new_path}.cmd"
28461    else
28462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28463$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28464      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28465$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28466      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28467    fi
28468  else
28469    input_to_shortpath="$new_path"
28470  fi
28471
28472  # Call helper function which possibly converts this using DOS-style short mode.
28473  # If so, the updated path is stored in $new_path.
28474  new_path="$input_to_shortpath"
28475
28476  input_path="$input_to_shortpath"
28477  # Check if we need to convert this using DOS-style short mode. If the path
28478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28479  # take no chances and rewrite it.
28480  # Note: m4 eats our [], so we need to use [ and ] instead.
28481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28482  if test "x$has_forbidden_chars" != x; then
28483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28487      # Going to short mode and back again did indeed matter. Since short mode is
28488      # case insensitive, let's make it lowercase to improve readability.
28489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28490      # Now convert it back to Unix-stile (cygpath)
28491      input_path=`$CYGPATH -u "$shortmode_path"`
28492      new_path="$input_path"
28493    fi
28494  fi
28495
28496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28497  if test "x$test_cygdrive_prefix" = x; then
28498    # As a simple fix, exclude /usr/bin since it's not a real path.
28499    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28501      # a path prefixed by /cygdrive for fixpath to work.
28502      new_path="$CYGWIN_ROOT_PATH$input_path"
28503    fi
28504  fi
28505
28506  # remove trailing .exe if any
28507  new_path="${new_path/%.exe/}"
28508
28509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28510
28511  # First separate the path from the arguments. This will split at the first
28512  # space.
28513  complete="$PROPER_COMPILER_CC"
28514  path="${complete%% *}"
28515  tmp="$complete EOL"
28516  arguments="${tmp#* }"
28517
28518  # Input might be given as Windows format, start by converting to
28519  # unix format.
28520  new_path="$path"
28521
28522  windows_path="$new_path"
28523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28524    unix_path=`$CYGPATH -u "$windows_path"`
28525    new_path="$unix_path"
28526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28528    new_path="$unix_path"
28529  fi
28530
28531
28532  # Now try to locate executable using which
28533  new_path=`$WHICH "$new_path" 2> /dev/null`
28534
28535  if test "x$new_path" = x; then
28536    # Oops. Which didn't find the executable.
28537    # The splitting of arguments from the executable at a space might have been incorrect,
28538    # since paths with space are more likely in Windows. Give it another try with the whole
28539    # argument.
28540    path="$complete"
28541    arguments="EOL"
28542    new_path="$path"
28543
28544  windows_path="$new_path"
28545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28546    unix_path=`$CYGPATH -u "$windows_path"`
28547    new_path="$unix_path"
28548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28550    new_path="$unix_path"
28551  fi
28552
28553
28554    new_path=`$WHICH "$new_path" 2> /dev/null`
28555    # bat and cmd files are not always considered executable in MSYS causing which
28556    # to not find them
28557    if test "x$new_path" = x \
28558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28560      new_path="$path"
28561
28562  windows_path="$new_path"
28563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28564    unix_path=`$CYGPATH -u "$windows_path"`
28565    new_path="$unix_path"
28566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28568    new_path="$unix_path"
28569  fi
28570
28571    fi
28572
28573    if test "x$new_path" = x; then
28574      # It's still not found. Now this is an unrecoverable error.
28575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28576$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28577      has_space=`$ECHO "$complete" | $GREP " "`
28578      if test "x$has_space" != x; then
28579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28581      fi
28582      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28583    fi
28584  fi
28585
28586  # Now new_path has a complete unix path to the binary
28587  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28588    # Keep paths in /bin as-is, but remove trailing .exe if any
28589    new_path="${new_path/%.exe/}"
28590    # Do not save /bin paths to all_fixpath_prefixes!
28591  else
28592    # Not in mixed or Windows style, start by that.
28593    new_path=`cmd //c echo $new_path`
28594
28595  input_path="$new_path"
28596  # Check if we need to convert this using DOS-style short mode. If the path
28597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28598  # take no chances and rewrite it.
28599  # Note: m4 eats our [], so we need to use [ and ] instead.
28600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28601  if test "x$has_forbidden_chars" != x; then
28602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28604  fi
28605
28606    # Output is in $new_path
28607
28608  windows_path="$new_path"
28609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28610    unix_path=`$CYGPATH -u "$windows_path"`
28611    new_path="$unix_path"
28612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28614    new_path="$unix_path"
28615  fi
28616
28617    # remove trailing .exe if any
28618    new_path="${new_path/%.exe/}"
28619
28620    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28621    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28622  fi
28623
28624  else
28625    # We're on a posix platform. Hooray! :)
28626    # First separate the path from the arguments. This will split at the first
28627    # space.
28628    complete="$PROPER_COMPILER_CC"
28629    path="${complete%% *}"
28630    tmp="$complete EOL"
28631    arguments="${tmp#* }"
28632
28633    # Cannot rely on the command "which" here since it doesn't always work.
28634    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28635    if test -z "$is_absolute_path"; then
28636      # Path to executable is not absolute. Find it.
28637      IFS_save="$IFS"
28638      IFS=:
28639      for p in $PATH; do
28640        if test -f "$p/$path" && test -x "$p/$path"; then
28641          new_path="$p/$path"
28642          break
28643        fi
28644      done
28645      IFS="$IFS_save"
28646    else
28647      # This is an absolute path, we can use it without further modifications.
28648      new_path="$path"
28649    fi
28650
28651    if test "x$new_path" = x; then
28652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28653$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28654      has_space=`$ECHO "$complete" | $GREP " "`
28655      if test "x$has_space" != x; then
28656        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28657$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28658      fi
28659      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28660    fi
28661  fi
28662
28663  # Now join together the path and the arguments once again
28664  if test "x$arguments" != xEOL; then
28665    new_complete="$new_path ${arguments% *}"
28666  else
28667    new_complete="$new_path"
28668  fi
28669
28670  if test "x$complete" != "x$new_complete"; then
28671    PROPER_COMPILER_CC="$new_complete"
28672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28673$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28674  fi
28675
28676    PATH="$RETRY_COMPILER_SAVED_PATH"
28677
28678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28679$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28680
28681  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28682    # Follow a chain of symbolic links. Use readlink
28683    # where it exists, else fall back to horribly
28684    # complicated shell code.
28685    if test "x$READLINK_TESTED" != yes; then
28686      # On MacOSX there is a readlink tool with a different
28687      # purpose than the GNU readlink tool. Check the found readlink.
28688      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28689      if test "x$ISGNU" = x; then
28690        # A readlink that we do not know how to use.
28691        # Are there other non-GNU readlinks out there?
28692        READLINK_TESTED=yes
28693        READLINK=
28694      fi
28695    fi
28696
28697    if test "x$READLINK" != x; then
28698      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28699    else
28700      # Save the current directory for restoring afterwards
28701      STARTDIR=$PWD
28702      COUNTER=0
28703      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28704      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28705      cd $sym_link_dir
28706      # Use -P flag to resolve symlinks in directories.
28707      cd `$THEPWDCMD -P`
28708      sym_link_dir=`$THEPWDCMD -P`
28709      # Resolve file symlinks
28710      while test $COUNTER -lt 20; do
28711        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28712        if test "x$ISLINK" == x; then
28713          # This is not a symbolic link! We are done!
28714          break
28715        fi
28716        # Again resolve directory symlinks since the target of the just found
28717        # link could be in a different directory
28718        cd `$DIRNAME $ISLINK`
28719        sym_link_dir=`$THEPWDCMD -P`
28720        sym_link_file=`$BASENAME $ISLINK`
28721        let COUNTER=COUNTER+1
28722      done
28723      cd $STARTDIR
28724      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28725    fi
28726  fi
28727
28728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28729$as_echo "$PROPER_COMPILER_CC" >&6; }
28730    CC="$PROPER_COMPILER_CC"
28731  else
28732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28733$as_echo "no, keeping CC" >&6; }
28734  fi
28735
28736
28737  COMPILER=$CC
28738  COMPILER_NAME=$COMPILER_NAME
28739
28740  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28741    # cc -V output typically looks like
28742    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28743    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28744    # Check that this is likely to be the Solaris Studio cc.
28745    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28746    if test $? -ne 0; then
28747      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28748      { $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
28749$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28750      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28751$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28752      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28753$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28754      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28755    fi
28756    # Remove usage instructions (if present), and
28757    # collapse compiler output into a single line
28758    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28759        $SED -e 's/ *[Uu]sage:.*//'`
28760    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28761        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28762  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28763    # xlc -qversion output typically looks like
28764    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28765    #     Version: 11.01.0000.0015
28766    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28767    # Check that this is likely to be the IBM XL C compiler.
28768    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28769    if test $? -ne 0; then
28770      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28771      { $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
28772$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28773      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28774$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28775      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28776$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28777      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28778    fi
28779    # Collapse compiler output into a single line
28780    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28781    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28782        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28783  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28784    # There is no specific version flag, but all output starts with a version string.
28785    # First line typically looks something like:
28786    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28787    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28788    # Check that this is likely to be Microsoft CL.EXE.
28789    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28790    if test $? -ne 0; then
28791      { $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
28792$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28793      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28794$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28795      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28796    fi
28797    # Collapse compiler output into a single line
28798    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28799    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28800        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28801  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28802    # gcc --version output typically looks like
28803    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28804    #     Copyright (C) 2013 Free Software Foundation, Inc.
28805    #     This is free software; see the source for copying conditions.  There is NO
28806    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28807    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28808    # Check that this is likely to be GCC.
28809    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28810    if test $? -ne 0; then
28811      { $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
28812$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28813      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28814$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28815      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28816    fi
28817    # Remove Copyright and legalese from version string, and
28818    # collapse into a single line
28819    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28820        $SED -e 's/ *Copyright .*//'`
28821    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28822        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28823  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28824    # clang --version output typically looks like
28825    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28826    #    clang version 3.3 (tags/RELEASE_33/final)
28827    # or
28828    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28829    #    Target: x86_64-pc-linux-gnu
28830    #    Thread model: posix
28831    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28832    # Check that this is likely to be clang
28833    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28834    if test $? -ne 0; then
28835      { $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
28836$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28837      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28838$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28839      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28840    fi
28841    # Collapse compiler output into a single line
28842    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28843    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28844        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28845  else
28846      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28847  fi
28848  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28849  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28850  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28851  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28852
28853  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28854$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28855
28856
28857  # Now that we have resolved CC ourself, let autoconf have its go at it
28858  ac_ext=c
28859ac_cpp='$CPP $CPPFLAGS'
28860ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28861ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28862ac_compiler_gnu=$ac_cv_c_compiler_gnu
28863if test -n "$ac_tool_prefix"; then
28864  for ac_prog in $CC
28865  do
28866    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28867set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28869$as_echo_n "checking for $ac_word... " >&6; }
28870if ${ac_cv_prog_CC+:} false; then :
28871  $as_echo_n "(cached) " >&6
28872else
28873  if test -n "$CC"; then
28874  ac_cv_prog_CC="$CC" # Let the user override the test.
28875else
28876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28877for as_dir in $PATH
28878do
28879  IFS=$as_save_IFS
28880  test -z "$as_dir" && as_dir=.
28881    for ac_exec_ext in '' $ac_executable_extensions; do
28882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28883    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28885    break 2
28886  fi
28887done
28888  done
28889IFS=$as_save_IFS
28890
28891fi
28892fi
28893CC=$ac_cv_prog_CC
28894if test -n "$CC"; then
28895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28896$as_echo "$CC" >&6; }
28897else
28898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28899$as_echo "no" >&6; }
28900fi
28901
28902
28903    test -n "$CC" && break
28904  done
28905fi
28906if test -z "$CC"; then
28907  ac_ct_CC=$CC
28908  for ac_prog in $CC
28909do
28910  # Extract the first word of "$ac_prog", so it can be a program name with args.
28911set dummy $ac_prog; ac_word=$2
28912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28913$as_echo_n "checking for $ac_word... " >&6; }
28914if ${ac_cv_prog_ac_ct_CC+:} false; then :
28915  $as_echo_n "(cached) " >&6
28916else
28917  if test -n "$ac_ct_CC"; then
28918  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28919else
28920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28921for as_dir in $PATH
28922do
28923  IFS=$as_save_IFS
28924  test -z "$as_dir" && as_dir=.
28925    for ac_exec_ext in '' $ac_executable_extensions; do
28926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28927    ac_cv_prog_ac_ct_CC="$ac_prog"
28928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28929    break 2
28930  fi
28931done
28932  done
28933IFS=$as_save_IFS
28934
28935fi
28936fi
28937ac_ct_CC=$ac_cv_prog_ac_ct_CC
28938if test -n "$ac_ct_CC"; then
28939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28940$as_echo "$ac_ct_CC" >&6; }
28941else
28942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28943$as_echo "no" >&6; }
28944fi
28945
28946
28947  test -n "$ac_ct_CC" && break
28948done
28949
28950  if test "x$ac_ct_CC" = x; then
28951    CC=""
28952  else
28953    case $cross_compiling:$ac_tool_warned in
28954yes:)
28955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28957ac_tool_warned=yes ;;
28958esac
28959    CC=$ac_ct_CC
28960  fi
28961fi
28962
28963
28964test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28966as_fn_error $? "no acceptable C compiler found in \$PATH
28967See \`config.log' for more details" "$LINENO" 5; }
28968
28969# Provide some information about the compiler.
28970$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28971set X $ac_compile
28972ac_compiler=$2
28973for ac_option in --version -v -V -qversion; do
28974  { { ac_try="$ac_compiler $ac_option >&5"
28975case "(($ac_try" in
28976  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28977  *) ac_try_echo=$ac_try;;
28978esac
28979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28980$as_echo "$ac_try_echo"; } >&5
28981  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28982  ac_status=$?
28983  if test -s conftest.err; then
28984    sed '10a\
28985... rest of stderr output deleted ...
28986         10q' conftest.err >conftest.er1
28987    cat conftest.er1 >&5
28988  fi
28989  rm -f conftest.er1 conftest.err
28990  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28991  test $ac_status = 0; }
28992done
28993
28994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28995/* end confdefs.h.  */
28996
28997int
28998main ()
28999{
29000
29001  ;
29002  return 0;
29003}
29004_ACEOF
29005ac_clean_files_save=$ac_clean_files
29006ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29007# Try to create an executable without -o first, disregard a.out.
29008# It will help us diagnose broken compilers, and finding out an intuition
29009# of exeext.
29010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29011$as_echo_n "checking whether the C compiler works... " >&6; }
29012ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29013
29014# The possible output files:
29015ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29016
29017ac_rmfiles=
29018for ac_file in $ac_files
29019do
29020  case $ac_file in
29021    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29022    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29023  esac
29024done
29025rm -f $ac_rmfiles
29026
29027if { { ac_try="$ac_link_default"
29028case "(($ac_try" in
29029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29030  *) ac_try_echo=$ac_try;;
29031esac
29032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29033$as_echo "$ac_try_echo"; } >&5
29034  (eval "$ac_link_default") 2>&5
29035  ac_status=$?
29036  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29037  test $ac_status = 0; }; then :
29038  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29039# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29040# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29041# so that the user can short-circuit this test for compilers unknown to
29042# Autoconf.
29043for ac_file in $ac_files ''
29044do
29045  test -f "$ac_file" || continue
29046  case $ac_file in
29047    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29048	;;
29049    [ab].out )
29050	# We found the default executable, but exeext='' is most
29051	# certainly right.
29052	break;;
29053    *.* )
29054	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29055	then :; else
29056	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29057	fi
29058	# We set ac_cv_exeext here because the later test for it is not
29059	# safe: cross compilers may not add the suffix if given an `-o'
29060	# argument, so we may need to know it at that point already.
29061	# Even if this section looks crufty: it has the advantage of
29062	# actually working.
29063	break;;
29064    * )
29065	break;;
29066  esac
29067done
29068test "$ac_cv_exeext" = no && ac_cv_exeext=
29069
29070else
29071  ac_file=''
29072fi
29073if test -z "$ac_file"; then :
29074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29075$as_echo "no" >&6; }
29076$as_echo "$as_me: failed program was:" >&5
29077sed 's/^/| /' conftest.$ac_ext >&5
29078
29079{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29081as_fn_error 77 "C compiler cannot create executables
29082See \`config.log' for more details" "$LINENO" 5; }
29083else
29084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29085$as_echo "yes" >&6; }
29086fi
29087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29088$as_echo_n "checking for C compiler default output file name... " >&6; }
29089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29090$as_echo "$ac_file" >&6; }
29091ac_exeext=$ac_cv_exeext
29092
29093rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29094ac_clean_files=$ac_clean_files_save
29095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29096$as_echo_n "checking for suffix of executables... " >&6; }
29097if { { ac_try="$ac_link"
29098case "(($ac_try" in
29099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29100  *) ac_try_echo=$ac_try;;
29101esac
29102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29103$as_echo "$ac_try_echo"; } >&5
29104  (eval "$ac_link") 2>&5
29105  ac_status=$?
29106  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29107  test $ac_status = 0; }; then :
29108  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29109# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29110# work properly (i.e., refer to `conftest.exe'), while it won't with
29111# `rm'.
29112for ac_file in conftest.exe conftest conftest.*; do
29113  test -f "$ac_file" || continue
29114  case $ac_file in
29115    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29116    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29117	  break;;
29118    * ) break;;
29119  esac
29120done
29121else
29122  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29124as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29125See \`config.log' for more details" "$LINENO" 5; }
29126fi
29127rm -f conftest conftest$ac_cv_exeext
29128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29129$as_echo "$ac_cv_exeext" >&6; }
29130
29131rm -f conftest.$ac_ext
29132EXEEXT=$ac_cv_exeext
29133ac_exeext=$EXEEXT
29134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29135/* end confdefs.h.  */
29136#include <stdio.h>
29137int
29138main ()
29139{
29140FILE *f = fopen ("conftest.out", "w");
29141 return ferror (f) || fclose (f) != 0;
29142
29143  ;
29144  return 0;
29145}
29146_ACEOF
29147ac_clean_files="$ac_clean_files conftest.out"
29148# Check that the compiler produces executables we can run.  If not, either
29149# the compiler is broken, or we cross compile.
29150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29151$as_echo_n "checking whether we are cross compiling... " >&6; }
29152if test "$cross_compiling" != yes; then
29153  { { ac_try="$ac_link"
29154case "(($ac_try" in
29155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29156  *) ac_try_echo=$ac_try;;
29157esac
29158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29159$as_echo "$ac_try_echo"; } >&5
29160  (eval "$ac_link") 2>&5
29161  ac_status=$?
29162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29163  test $ac_status = 0; }
29164  if { ac_try='./conftest$ac_cv_exeext'
29165  { { case "(($ac_try" in
29166  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29167  *) ac_try_echo=$ac_try;;
29168esac
29169eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29170$as_echo "$ac_try_echo"; } >&5
29171  (eval "$ac_try") 2>&5
29172  ac_status=$?
29173  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29174  test $ac_status = 0; }; }; then
29175    cross_compiling=no
29176  else
29177    if test "$cross_compiling" = maybe; then
29178	cross_compiling=yes
29179    else
29180	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29182as_fn_error $? "cannot run C compiled programs.
29183If you meant to cross compile, use \`--host'.
29184See \`config.log' for more details" "$LINENO" 5; }
29185    fi
29186  fi
29187fi
29188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29189$as_echo "$cross_compiling" >&6; }
29190
29191rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29192ac_clean_files=$ac_clean_files_save
29193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29194$as_echo_n "checking for suffix of object files... " >&6; }
29195if ${ac_cv_objext+:} false; then :
29196  $as_echo_n "(cached) " >&6
29197else
29198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29199/* end confdefs.h.  */
29200
29201int
29202main ()
29203{
29204
29205  ;
29206  return 0;
29207}
29208_ACEOF
29209rm -f conftest.o conftest.obj
29210if { { ac_try="$ac_compile"
29211case "(($ac_try" in
29212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29213  *) ac_try_echo=$ac_try;;
29214esac
29215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29216$as_echo "$ac_try_echo"; } >&5
29217  (eval "$ac_compile") 2>&5
29218  ac_status=$?
29219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29220  test $ac_status = 0; }; then :
29221  for ac_file in conftest.o conftest.obj conftest.*; do
29222  test -f "$ac_file" || continue;
29223  case $ac_file in
29224    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29225    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29226       break;;
29227  esac
29228done
29229else
29230  $as_echo "$as_me: failed program was:" >&5
29231sed 's/^/| /' conftest.$ac_ext >&5
29232
29233{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29235as_fn_error $? "cannot compute suffix of object files: cannot compile
29236See \`config.log' for more details" "$LINENO" 5; }
29237fi
29238rm -f conftest.$ac_cv_objext conftest.$ac_ext
29239fi
29240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29241$as_echo "$ac_cv_objext" >&6; }
29242OBJEXT=$ac_cv_objext
29243ac_objext=$OBJEXT
29244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29245$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29246if ${ac_cv_c_compiler_gnu+:} false; then :
29247  $as_echo_n "(cached) " >&6
29248else
29249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29250/* end confdefs.h.  */
29251
29252int
29253main ()
29254{
29255#ifndef __GNUC__
29256       choke me
29257#endif
29258
29259  ;
29260  return 0;
29261}
29262_ACEOF
29263if ac_fn_c_try_compile "$LINENO"; then :
29264  ac_compiler_gnu=yes
29265else
29266  ac_compiler_gnu=no
29267fi
29268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29269ac_cv_c_compiler_gnu=$ac_compiler_gnu
29270
29271fi
29272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29273$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29274if test $ac_compiler_gnu = yes; then
29275  GCC=yes
29276else
29277  GCC=
29278fi
29279ac_test_CFLAGS=${CFLAGS+set}
29280ac_save_CFLAGS=$CFLAGS
29281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29282$as_echo_n "checking whether $CC accepts -g... " >&6; }
29283if ${ac_cv_prog_cc_g+:} false; then :
29284  $as_echo_n "(cached) " >&6
29285else
29286  ac_save_c_werror_flag=$ac_c_werror_flag
29287   ac_c_werror_flag=yes
29288   ac_cv_prog_cc_g=no
29289   CFLAGS="-g"
29290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29291/* end confdefs.h.  */
29292
29293int
29294main ()
29295{
29296
29297  ;
29298  return 0;
29299}
29300_ACEOF
29301if ac_fn_c_try_compile "$LINENO"; then :
29302  ac_cv_prog_cc_g=yes
29303else
29304  CFLAGS=""
29305      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29306/* end confdefs.h.  */
29307
29308int
29309main ()
29310{
29311
29312  ;
29313  return 0;
29314}
29315_ACEOF
29316if ac_fn_c_try_compile "$LINENO"; then :
29317
29318else
29319  ac_c_werror_flag=$ac_save_c_werror_flag
29320	 CFLAGS="-g"
29321	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29322/* end confdefs.h.  */
29323
29324int
29325main ()
29326{
29327
29328  ;
29329  return 0;
29330}
29331_ACEOF
29332if ac_fn_c_try_compile "$LINENO"; then :
29333  ac_cv_prog_cc_g=yes
29334fi
29335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29336fi
29337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29338fi
29339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29340   ac_c_werror_flag=$ac_save_c_werror_flag
29341fi
29342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29343$as_echo "$ac_cv_prog_cc_g" >&6; }
29344if test "$ac_test_CFLAGS" = set; then
29345  CFLAGS=$ac_save_CFLAGS
29346elif test $ac_cv_prog_cc_g = yes; then
29347  if test "$GCC" = yes; then
29348    CFLAGS="-g -O2"
29349  else
29350    CFLAGS="-g"
29351  fi
29352else
29353  if test "$GCC" = yes; then
29354    CFLAGS="-O2"
29355  else
29356    CFLAGS=
29357  fi
29358fi
29359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29360$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29361if ${ac_cv_prog_cc_c89+:} false; then :
29362  $as_echo_n "(cached) " >&6
29363else
29364  ac_cv_prog_cc_c89=no
29365ac_save_CC=$CC
29366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29367/* end confdefs.h.  */
29368#include <stdarg.h>
29369#include <stdio.h>
29370struct stat;
29371/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29372struct buf { int x; };
29373FILE * (*rcsopen) (struct buf *, struct stat *, int);
29374static char *e (p, i)
29375     char **p;
29376     int i;
29377{
29378  return p[i];
29379}
29380static char *f (char * (*g) (char **, int), char **p, ...)
29381{
29382  char *s;
29383  va_list v;
29384  va_start (v,p);
29385  s = g (p, va_arg (v,int));
29386  va_end (v);
29387  return s;
29388}
29389
29390/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29391   function prototypes and stuff, but not '\xHH' hex character constants.
29392   These don't provoke an error unfortunately, instead are silently treated
29393   as 'x'.  The following induces an error, until -std is added to get
29394   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29395   array size at least.  It's necessary to write '\x00'==0 to get something
29396   that's true only with -std.  */
29397int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29398
29399/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29400   inside strings and character constants.  */
29401#define FOO(x) 'x'
29402int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29403
29404int test (int i, double x);
29405struct s1 {int (*f) (int a);};
29406struct s2 {int (*f) (double a);};
29407int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29408int argc;
29409char **argv;
29410int
29411main ()
29412{
29413return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29414  ;
29415  return 0;
29416}
29417_ACEOF
29418for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29419	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29420do
29421  CC="$ac_save_CC $ac_arg"
29422  if ac_fn_c_try_compile "$LINENO"; then :
29423  ac_cv_prog_cc_c89=$ac_arg
29424fi
29425rm -f core conftest.err conftest.$ac_objext
29426  test "x$ac_cv_prog_cc_c89" != "xno" && break
29427done
29428rm -f conftest.$ac_ext
29429CC=$ac_save_CC
29430
29431fi
29432# AC_CACHE_VAL
29433case "x$ac_cv_prog_cc_c89" in
29434  x)
29435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29436$as_echo "none needed" >&6; } ;;
29437  xno)
29438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29439$as_echo "unsupported" >&6; } ;;
29440  *)
29441    CC="$CC $ac_cv_prog_cc_c89"
29442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29443$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29444esac
29445if test "x$ac_cv_prog_cc_c89" != xno; then :
29446
29447fi
29448
29449ac_ext=cpp
29450ac_cpp='$CXXCPP $CPPFLAGS'
29451ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29452ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29453ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29454
29455
29456
29457  COMPILER_NAME=C++
29458  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29459
29460  if test "x$CXX" != x; then
29461    # User has supplied compiler name already, always let that override.
29462    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29463$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29464    if test "x`basename $CXX`" = "x$CXX"; then
29465      # A command without a complete path is provided, search $PATH.
29466
29467      for ac_prog in $CXX
29468do
29469  # Extract the first word of "$ac_prog", so it can be a program name with args.
29470set dummy $ac_prog; ac_word=$2
29471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29472$as_echo_n "checking for $ac_word... " >&6; }
29473if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29474  $as_echo_n "(cached) " >&6
29475else
29476  case $POTENTIAL_CXX in
29477  [\\/]* | ?:[\\/]*)
29478  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29479  ;;
29480  *)
29481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29482for as_dir in $PATH
29483do
29484  IFS=$as_save_IFS
29485  test -z "$as_dir" && as_dir=.
29486    for ac_exec_ext in '' $ac_executable_extensions; do
29487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29488    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29490    break 2
29491  fi
29492done
29493  done
29494IFS=$as_save_IFS
29495
29496  ;;
29497esac
29498fi
29499POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29500if test -n "$POTENTIAL_CXX"; then
29501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29502$as_echo "$POTENTIAL_CXX" >&6; }
29503else
29504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29505$as_echo "no" >&6; }
29506fi
29507
29508
29509  test -n "$POTENTIAL_CXX" && break
29510done
29511
29512      if test "x$POTENTIAL_CXX" != x; then
29513        CXX=$POTENTIAL_CXX
29514      else
29515        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29516      fi
29517    else
29518      # Otherwise it might already be a complete path
29519      if test ! -x "$CXX"; then
29520        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29521      fi
29522    fi
29523  else
29524    # No user supplied value. Locate compiler ourselves.
29525
29526    # If we are cross compiling, assume cross compilation tools follows the
29527    # cross compilation standard where they are prefixed with the autoconf
29528    # standard name for the target. For example the binary
29529    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29530    # If we are not cross compiling, then the default compiler name will be
29531    # used.
29532
29533    CXX=
29534    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29535    # before checking the rest of the PATH.
29536    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29537    # step, this should not be necessary.
29538    if test -n "$TOOLCHAIN_PATH"; then
29539      PATH_save="$PATH"
29540      PATH="$TOOLCHAIN_PATH"
29541      for ac_prog in $SEARCH_LIST
29542do
29543  # Extract the first word of "$ac_prog", so it can be a program name with args.
29544set dummy $ac_prog; ac_word=$2
29545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29546$as_echo_n "checking for $ac_word... " >&6; }
29547if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29548  $as_echo_n "(cached) " >&6
29549else
29550  case $TOOLCHAIN_PATH_CXX in
29551  [\\/]* | ?:[\\/]*)
29552  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29553  ;;
29554  *)
29555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29556for as_dir in $PATH
29557do
29558  IFS=$as_save_IFS
29559  test -z "$as_dir" && as_dir=.
29560    for ac_exec_ext in '' $ac_executable_extensions; do
29561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29562    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29564    break 2
29565  fi
29566done
29567  done
29568IFS=$as_save_IFS
29569
29570  ;;
29571esac
29572fi
29573TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29574if test -n "$TOOLCHAIN_PATH_CXX"; then
29575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29576$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29577else
29578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29579$as_echo "no" >&6; }
29580fi
29581
29582
29583  test -n "$TOOLCHAIN_PATH_CXX" && break
29584done
29585
29586      CXX=$TOOLCHAIN_PATH_CXX
29587      PATH="$PATH_save"
29588    fi
29589
29590    # AC_PATH_PROGS can't be run multiple times with the same variable,
29591    # so create a new name for this run.
29592    if test "x$CXX" = x; then
29593      for ac_prog in $SEARCH_LIST
29594do
29595  # Extract the first word of "$ac_prog", so it can be a program name with args.
29596set dummy $ac_prog; ac_word=$2
29597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29598$as_echo_n "checking for $ac_word... " >&6; }
29599if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29600  $as_echo_n "(cached) " >&6
29601else
29602  case $POTENTIAL_CXX in
29603  [\\/]* | ?:[\\/]*)
29604  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29605  ;;
29606  *)
29607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29608for as_dir in $PATH
29609do
29610  IFS=$as_save_IFS
29611  test -z "$as_dir" && as_dir=.
29612    for ac_exec_ext in '' $ac_executable_extensions; do
29613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29614    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29616    break 2
29617  fi
29618done
29619  done
29620IFS=$as_save_IFS
29621
29622  ;;
29623esac
29624fi
29625POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29626if test -n "$POTENTIAL_CXX"; then
29627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29628$as_echo "$POTENTIAL_CXX" >&6; }
29629else
29630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29631$as_echo "no" >&6; }
29632fi
29633
29634
29635  test -n "$POTENTIAL_CXX" && break
29636done
29637
29638      CXX=$POTENTIAL_CXX
29639    fi
29640
29641    if test "x$CXX" = x; then
29642
29643  # Print a helpful message on how to acquire the necessary build dependency.
29644  # devkit is the help tag: freetype, cups, pulse, alsa etc
29645  MISSING_DEPENDENCY=devkit
29646
29647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29648    cygwin_help $MISSING_DEPENDENCY
29649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29650    msys_help $MISSING_DEPENDENCY
29651  else
29652    PKGHANDLER_COMMAND=
29653
29654    case $PKGHANDLER in
29655      apt-get)
29656        apt_help     $MISSING_DEPENDENCY ;;
29657      yum)
29658        yum_help     $MISSING_DEPENDENCY ;;
29659      port)
29660        port_help    $MISSING_DEPENDENCY ;;
29661      pkgutil)
29662        pkgutil_help $MISSING_DEPENDENCY ;;
29663      pkgadd)
29664        pkgadd_help  $MISSING_DEPENDENCY ;;
29665    esac
29666
29667    if test "x$PKGHANDLER_COMMAND" != x; then
29668      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29669    fi
29670  fi
29671
29672      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29673    fi
29674  fi
29675
29676  # Now we have a compiler binary in CXX. Make sure it's okay.
29677
29678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29679
29680  # First separate the path from the arguments. This will split at the first
29681  # space.
29682  complete="$CXX"
29683  path="${complete%% *}"
29684  tmp="$complete EOL"
29685  arguments="${tmp#* }"
29686
29687  # Input might be given as Windows format, start by converting to
29688  # unix format.
29689  new_path=`$CYGPATH -u "$path"`
29690
29691  # Now try to locate executable using which
29692  new_path=`$WHICH "$new_path" 2> /dev/null`
29693  # bat and cmd files are not always considered executable in cygwin causing which
29694  # to not find them
29695  if test "x$new_path" = x \
29696      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29697      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29698    new_path=`$CYGPATH -u "$path"`
29699  fi
29700  if test "x$new_path" = x; then
29701    # Oops. Which didn't find the executable.
29702    # The splitting of arguments from the executable at a space might have been incorrect,
29703    # since paths with space are more likely in Windows. Give it another try with the whole
29704    # argument.
29705    path="$complete"
29706    arguments="EOL"
29707    new_path=`$CYGPATH -u "$path"`
29708    new_path=`$WHICH "$new_path" 2> /dev/null`
29709    # bat and cmd files are not always considered executable in cygwin causing which
29710    # to not find them
29711    if test "x$new_path" = x \
29712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29714      new_path=`$CYGPATH -u "$path"`
29715    fi
29716    if test "x$new_path" = x; then
29717      # It's still not found. Now this is an unrecoverable error.
29718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29719$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29720      has_space=`$ECHO "$complete" | $GREP " "`
29721      if test "x$has_space" != x; then
29722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29724      fi
29725      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29726    fi
29727  fi
29728
29729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29732  # "foo.exe" is OK but "foo" is an error.
29733  #
29734  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29735  # It is also a way to make sure we got the proper file name for the real test later on.
29736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29737  if test "x$test_shortpath" = x; then
29738    # Short path failed, file does not exist as specified.
29739    # Try adding .exe or .cmd
29740    if test -f "${new_path}.exe"; then
29741      input_to_shortpath="${new_path}.exe"
29742    elif test -f "${new_path}.cmd"; then
29743      input_to_shortpath="${new_path}.cmd"
29744    else
29745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29746$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29749      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29750    fi
29751  else
29752    input_to_shortpath="$new_path"
29753  fi
29754
29755  # Call helper function which possibly converts this using DOS-style short mode.
29756  # If so, the updated path is stored in $new_path.
29757  new_path="$input_to_shortpath"
29758
29759  input_path="$input_to_shortpath"
29760  # Check if we need to convert this using DOS-style short mode. If the path
29761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29762  # take no chances and rewrite it.
29763  # Note: m4 eats our [], so we need to use [ and ] instead.
29764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29765  if test "x$has_forbidden_chars" != x; then
29766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29770      # Going to short mode and back again did indeed matter. Since short mode is
29771      # case insensitive, let's make it lowercase to improve readability.
29772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29773      # Now convert it back to Unix-stile (cygpath)
29774      input_path=`$CYGPATH -u "$shortmode_path"`
29775      new_path="$input_path"
29776    fi
29777  fi
29778
29779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29780  if test "x$test_cygdrive_prefix" = x; then
29781    # As a simple fix, exclude /usr/bin since it's not a real path.
29782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29784      # a path prefixed by /cygdrive for fixpath to work.
29785      new_path="$CYGWIN_ROOT_PATH$input_path"
29786    fi
29787  fi
29788
29789  # remove trailing .exe if any
29790  new_path="${new_path/%.exe/}"
29791
29792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29793
29794  # First separate the path from the arguments. This will split at the first
29795  # space.
29796  complete="$CXX"
29797  path="${complete%% *}"
29798  tmp="$complete EOL"
29799  arguments="${tmp#* }"
29800
29801  # Input might be given as Windows format, start by converting to
29802  # unix format.
29803  new_path="$path"
29804
29805  windows_path="$new_path"
29806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29807    unix_path=`$CYGPATH -u "$windows_path"`
29808    new_path="$unix_path"
29809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29811    new_path="$unix_path"
29812  fi
29813
29814
29815  # Now try to locate executable using which
29816  new_path=`$WHICH "$new_path" 2> /dev/null`
29817
29818  if test "x$new_path" = x; then
29819    # Oops. Which didn't find the executable.
29820    # The splitting of arguments from the executable at a space might have been incorrect,
29821    # since paths with space are more likely in Windows. Give it another try with the whole
29822    # argument.
29823    path="$complete"
29824    arguments="EOL"
29825    new_path="$path"
29826
29827  windows_path="$new_path"
29828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29829    unix_path=`$CYGPATH -u "$windows_path"`
29830    new_path="$unix_path"
29831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29833    new_path="$unix_path"
29834  fi
29835
29836
29837    new_path=`$WHICH "$new_path" 2> /dev/null`
29838    # bat and cmd files are not always considered executable in MSYS causing which
29839    # to not find them
29840    if test "x$new_path" = x \
29841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29843      new_path="$path"
29844
29845  windows_path="$new_path"
29846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29847    unix_path=`$CYGPATH -u "$windows_path"`
29848    new_path="$unix_path"
29849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29851    new_path="$unix_path"
29852  fi
29853
29854    fi
29855
29856    if test "x$new_path" = x; then
29857      # It's still not found. Now this is an unrecoverable error.
29858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29859$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29860      has_space=`$ECHO "$complete" | $GREP " "`
29861      if test "x$has_space" != x; then
29862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29864      fi
29865      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29866    fi
29867  fi
29868
29869  # Now new_path has a complete unix path to the binary
29870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29871    # Keep paths in /bin as-is, but remove trailing .exe if any
29872    new_path="${new_path/%.exe/}"
29873    # Do not save /bin paths to all_fixpath_prefixes!
29874  else
29875    # Not in mixed or Windows style, start by that.
29876    new_path=`cmd //c echo $new_path`
29877
29878  input_path="$new_path"
29879  # Check if we need to convert this using DOS-style short mode. If the path
29880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29881  # take no chances and rewrite it.
29882  # Note: m4 eats our [], so we need to use [ and ] instead.
29883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29884  if test "x$has_forbidden_chars" != x; then
29885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29887  fi
29888
29889    # Output is in $new_path
29890
29891  windows_path="$new_path"
29892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29893    unix_path=`$CYGPATH -u "$windows_path"`
29894    new_path="$unix_path"
29895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29897    new_path="$unix_path"
29898  fi
29899
29900    # remove trailing .exe if any
29901    new_path="${new_path/%.exe/}"
29902
29903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29905  fi
29906
29907  else
29908    # We're on a posix platform. Hooray! :)
29909    # First separate the path from the arguments. This will split at the first
29910    # space.
29911    complete="$CXX"
29912    path="${complete%% *}"
29913    tmp="$complete EOL"
29914    arguments="${tmp#* }"
29915
29916    # Cannot rely on the command "which" here since it doesn't always work.
29917    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29918    if test -z "$is_absolute_path"; then
29919      # Path to executable is not absolute. Find it.
29920      IFS_save="$IFS"
29921      IFS=:
29922      for p in $PATH; do
29923        if test -f "$p/$path" && test -x "$p/$path"; then
29924          new_path="$p/$path"
29925          break
29926        fi
29927      done
29928      IFS="$IFS_save"
29929    else
29930      # This is an absolute path, we can use it without further modifications.
29931      new_path="$path"
29932    fi
29933
29934    if test "x$new_path" = x; then
29935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29936$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29937      has_space=`$ECHO "$complete" | $GREP " "`
29938      if test "x$has_space" != x; then
29939        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29941      fi
29942      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29943    fi
29944  fi
29945
29946  # Now join together the path and the arguments once again
29947  if test "x$arguments" != xEOL; then
29948    new_complete="$new_path ${arguments% *}"
29949  else
29950    new_complete="$new_path"
29951  fi
29952
29953  if test "x$complete" != "x$new_complete"; then
29954    CXX="$new_complete"
29955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29956$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29957  fi
29958
29959  TEST_COMPILER="$CXX"
29960  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29961  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29962  if test "x$OPENJDK_BUILD_OS" != xaix; then
29963    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29965$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29966
29967  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29968    # Follow a chain of symbolic links. Use readlink
29969    # where it exists, else fall back to horribly
29970    # complicated shell code.
29971    if test "x$READLINK_TESTED" != yes; then
29972      # On MacOSX there is a readlink tool with a different
29973      # purpose than the GNU readlink tool. Check the found readlink.
29974      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29975      if test "x$ISGNU" = x; then
29976        # A readlink that we do not know how to use.
29977        # Are there other non-GNU readlinks out there?
29978        READLINK_TESTED=yes
29979        READLINK=
29980      fi
29981    fi
29982
29983    if test "x$READLINK" != x; then
29984      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29985    else
29986      # Save the current directory for restoring afterwards
29987      STARTDIR=$PWD
29988      COUNTER=0
29989      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29990      sym_link_file=`$BASENAME $TEST_COMPILER`
29991      cd $sym_link_dir
29992      # Use -P flag to resolve symlinks in directories.
29993      cd `$THEPWDCMD -P`
29994      sym_link_dir=`$THEPWDCMD -P`
29995      # Resolve file symlinks
29996      while test $COUNTER -lt 20; do
29997        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29998        if test "x$ISLINK" == x; then
29999          # This is not a symbolic link! We are done!
30000          break
30001        fi
30002        # Again resolve directory symlinks since the target of the just found
30003        # link could be in a different directory
30004        cd `$DIRNAME $ISLINK`
30005        sym_link_dir=`$THEPWDCMD -P`
30006        sym_link_file=`$BASENAME $ISLINK`
30007        let COUNTER=COUNTER+1
30008      done
30009      cd $STARTDIR
30010      TEST_COMPILER=$sym_link_dir/$sym_link_file
30011    fi
30012  fi
30013
30014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30015$as_echo "$TEST_COMPILER" >&6; }
30016  fi
30017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30018$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30019
30020  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30021  if test "x$COMPILER_BASENAME" = "xccache"; then
30022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30023$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30024    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30025    # We want to control ccache invocation ourselves, so ignore this cc and try
30026    # searching again.
30027
30028    # Remove the path to the fake ccache cc from the PATH
30029    RETRY_COMPILER_SAVED_PATH="$PATH"
30030    COMPILER_DIRNAME=`$DIRNAME $CXX`
30031    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30032
30033    # Try again looking for our compiler
30034    if test -n "$ac_tool_prefix"; then
30035  for ac_prog in $TOOLCHAIN_CXX_BINARY
30036  do
30037    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30038set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30040$as_echo_n "checking for $ac_word... " >&6; }
30041if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30042  $as_echo_n "(cached) " >&6
30043else
30044  if test -n "$PROPER_COMPILER_CXX"; then
30045  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30046else
30047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30048for as_dir in $PATH
30049do
30050  IFS=$as_save_IFS
30051  test -z "$as_dir" && as_dir=.
30052    for ac_exec_ext in '' $ac_executable_extensions; do
30053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30054    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30056    break 2
30057  fi
30058done
30059  done
30060IFS=$as_save_IFS
30061
30062fi
30063fi
30064PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30065if test -n "$PROPER_COMPILER_CXX"; then
30066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30067$as_echo "$PROPER_COMPILER_CXX" >&6; }
30068else
30069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30070$as_echo "no" >&6; }
30071fi
30072
30073
30074    test -n "$PROPER_COMPILER_CXX" && break
30075  done
30076fi
30077if test -z "$PROPER_COMPILER_CXX"; then
30078  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30079  for ac_prog in $TOOLCHAIN_CXX_BINARY
30080do
30081  # Extract the first word of "$ac_prog", so it can be a program name with args.
30082set dummy $ac_prog; ac_word=$2
30083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30084$as_echo_n "checking for $ac_word... " >&6; }
30085if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30086  $as_echo_n "(cached) " >&6
30087else
30088  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30089  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30090else
30091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30092for as_dir in $PATH
30093do
30094  IFS=$as_save_IFS
30095  test -z "$as_dir" && as_dir=.
30096    for ac_exec_ext in '' $ac_executable_extensions; do
30097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30098    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30100    break 2
30101  fi
30102done
30103  done
30104IFS=$as_save_IFS
30105
30106fi
30107fi
30108ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30109if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30111$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30112else
30113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30114$as_echo "no" >&6; }
30115fi
30116
30117
30118  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30119done
30120
30121  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30122    PROPER_COMPILER_CXX=""
30123  else
30124    case $cross_compiling:$ac_tool_warned in
30125yes:)
30126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30128ac_tool_warned=yes ;;
30129esac
30130    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30131  fi
30132fi
30133
30134
30135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30136
30137  # First separate the path from the arguments. This will split at the first
30138  # space.
30139  complete="$PROPER_COMPILER_CXX"
30140  path="${complete%% *}"
30141  tmp="$complete EOL"
30142  arguments="${tmp#* }"
30143
30144  # Input might be given as Windows format, start by converting to
30145  # unix format.
30146  new_path=`$CYGPATH -u "$path"`
30147
30148  # Now try to locate executable using which
30149  new_path=`$WHICH "$new_path" 2> /dev/null`
30150  # bat and cmd files are not always considered executable in cygwin causing which
30151  # to not find them
30152  if test "x$new_path" = x \
30153      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30154      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30155    new_path=`$CYGPATH -u "$path"`
30156  fi
30157  if test "x$new_path" = x; then
30158    # Oops. Which didn't find the executable.
30159    # The splitting of arguments from the executable at a space might have been incorrect,
30160    # since paths with space are more likely in Windows. Give it another try with the whole
30161    # argument.
30162    path="$complete"
30163    arguments="EOL"
30164    new_path=`$CYGPATH -u "$path"`
30165    new_path=`$WHICH "$new_path" 2> /dev/null`
30166    # bat and cmd files are not always considered executable in cygwin causing which
30167    # to not find them
30168    if test "x$new_path" = x \
30169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30171      new_path=`$CYGPATH -u "$path"`
30172    fi
30173    if test "x$new_path" = x; then
30174      # It's still not found. Now this is an unrecoverable error.
30175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30176$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30177      has_space=`$ECHO "$complete" | $GREP " "`
30178      if test "x$has_space" != x; then
30179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30181      fi
30182      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30183    fi
30184  fi
30185
30186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30189  # "foo.exe" is OK but "foo" is an error.
30190  #
30191  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30192  # It is also a way to make sure we got the proper file name for the real test later on.
30193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30194  if test "x$test_shortpath" = x; then
30195    # Short path failed, file does not exist as specified.
30196    # Try adding .exe or .cmd
30197    if test -f "${new_path}.exe"; then
30198      input_to_shortpath="${new_path}.exe"
30199    elif test -f "${new_path}.cmd"; then
30200      input_to_shortpath="${new_path}.cmd"
30201    else
30202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30203$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30204      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30205$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30206      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30207    fi
30208  else
30209    input_to_shortpath="$new_path"
30210  fi
30211
30212  # Call helper function which possibly converts this using DOS-style short mode.
30213  # If so, the updated path is stored in $new_path.
30214  new_path="$input_to_shortpath"
30215
30216  input_path="$input_to_shortpath"
30217  # Check if we need to convert this using DOS-style short mode. If the path
30218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30219  # take no chances and rewrite it.
30220  # Note: m4 eats our [], so we need to use [ and ] instead.
30221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30222  if test "x$has_forbidden_chars" != x; then
30223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30227      # Going to short mode and back again did indeed matter. Since short mode is
30228      # case insensitive, let's make it lowercase to improve readability.
30229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30230      # Now convert it back to Unix-stile (cygpath)
30231      input_path=`$CYGPATH -u "$shortmode_path"`
30232      new_path="$input_path"
30233    fi
30234  fi
30235
30236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30237  if test "x$test_cygdrive_prefix" = x; then
30238    # As a simple fix, exclude /usr/bin since it's not a real path.
30239    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30241      # a path prefixed by /cygdrive for fixpath to work.
30242      new_path="$CYGWIN_ROOT_PATH$input_path"
30243    fi
30244  fi
30245
30246  # remove trailing .exe if any
30247  new_path="${new_path/%.exe/}"
30248
30249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30250
30251  # First separate the path from the arguments. This will split at the first
30252  # space.
30253  complete="$PROPER_COMPILER_CXX"
30254  path="${complete%% *}"
30255  tmp="$complete EOL"
30256  arguments="${tmp#* }"
30257
30258  # Input might be given as Windows format, start by converting to
30259  # unix format.
30260  new_path="$path"
30261
30262  windows_path="$new_path"
30263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30264    unix_path=`$CYGPATH -u "$windows_path"`
30265    new_path="$unix_path"
30266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30268    new_path="$unix_path"
30269  fi
30270
30271
30272  # Now try to locate executable using which
30273  new_path=`$WHICH "$new_path" 2> /dev/null`
30274
30275  if test "x$new_path" = x; then
30276    # Oops. Which didn't find the executable.
30277    # The splitting of arguments from the executable at a space might have been incorrect,
30278    # since paths with space are more likely in Windows. Give it another try with the whole
30279    # argument.
30280    path="$complete"
30281    arguments="EOL"
30282    new_path="$path"
30283
30284  windows_path="$new_path"
30285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30286    unix_path=`$CYGPATH -u "$windows_path"`
30287    new_path="$unix_path"
30288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30290    new_path="$unix_path"
30291  fi
30292
30293
30294    new_path=`$WHICH "$new_path" 2> /dev/null`
30295    # bat and cmd files are not always considered executable in MSYS causing which
30296    # to not find them
30297    if test "x$new_path" = x \
30298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30300      new_path="$path"
30301
30302  windows_path="$new_path"
30303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30304    unix_path=`$CYGPATH -u "$windows_path"`
30305    new_path="$unix_path"
30306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30308    new_path="$unix_path"
30309  fi
30310
30311    fi
30312
30313    if test "x$new_path" = x; then
30314      # It's still not found. Now this is an unrecoverable error.
30315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30316$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30317      has_space=`$ECHO "$complete" | $GREP " "`
30318      if test "x$has_space" != x; then
30319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30321      fi
30322      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30323    fi
30324  fi
30325
30326  # Now new_path has a complete unix path to the binary
30327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30328    # Keep paths in /bin as-is, but remove trailing .exe if any
30329    new_path="${new_path/%.exe/}"
30330    # Do not save /bin paths to all_fixpath_prefixes!
30331  else
30332    # Not in mixed or Windows style, start by that.
30333    new_path=`cmd //c echo $new_path`
30334
30335  input_path="$new_path"
30336  # Check if we need to convert this using DOS-style short mode. If the path
30337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30338  # take no chances and rewrite it.
30339  # Note: m4 eats our [], so we need to use [ and ] instead.
30340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30341  if test "x$has_forbidden_chars" != x; then
30342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30344  fi
30345
30346    # Output is in $new_path
30347
30348  windows_path="$new_path"
30349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30350    unix_path=`$CYGPATH -u "$windows_path"`
30351    new_path="$unix_path"
30352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30354    new_path="$unix_path"
30355  fi
30356
30357    # remove trailing .exe if any
30358    new_path="${new_path/%.exe/}"
30359
30360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30362  fi
30363
30364  else
30365    # We're on a posix platform. Hooray! :)
30366    # First separate the path from the arguments. This will split at the first
30367    # space.
30368    complete="$PROPER_COMPILER_CXX"
30369    path="${complete%% *}"
30370    tmp="$complete EOL"
30371    arguments="${tmp#* }"
30372
30373    # Cannot rely on the command "which" here since it doesn't always work.
30374    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30375    if test -z "$is_absolute_path"; then
30376      # Path to executable is not absolute. Find it.
30377      IFS_save="$IFS"
30378      IFS=:
30379      for p in $PATH; do
30380        if test -f "$p/$path" && test -x "$p/$path"; then
30381          new_path="$p/$path"
30382          break
30383        fi
30384      done
30385      IFS="$IFS_save"
30386    else
30387      # This is an absolute path, we can use it without further modifications.
30388      new_path="$path"
30389    fi
30390
30391    if test "x$new_path" = x; then
30392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30393$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30394      has_space=`$ECHO "$complete" | $GREP " "`
30395      if test "x$has_space" != x; then
30396        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30398      fi
30399      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30400    fi
30401  fi
30402
30403  # Now join together the path and the arguments once again
30404  if test "x$arguments" != xEOL; then
30405    new_complete="$new_path ${arguments% *}"
30406  else
30407    new_complete="$new_path"
30408  fi
30409
30410  if test "x$complete" != "x$new_complete"; then
30411    PROPER_COMPILER_CXX="$new_complete"
30412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30413$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30414  fi
30415
30416    PATH="$RETRY_COMPILER_SAVED_PATH"
30417
30418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30419$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30420
30421  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30422    # Follow a chain of symbolic links. Use readlink
30423    # where it exists, else fall back to horribly
30424    # complicated shell code.
30425    if test "x$READLINK_TESTED" != yes; then
30426      # On MacOSX there is a readlink tool with a different
30427      # purpose than the GNU readlink tool. Check the found readlink.
30428      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30429      if test "x$ISGNU" = x; then
30430        # A readlink that we do not know how to use.
30431        # Are there other non-GNU readlinks out there?
30432        READLINK_TESTED=yes
30433        READLINK=
30434      fi
30435    fi
30436
30437    if test "x$READLINK" != x; then
30438      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30439    else
30440      # Save the current directory for restoring afterwards
30441      STARTDIR=$PWD
30442      COUNTER=0
30443      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30444      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30445      cd $sym_link_dir
30446      # Use -P flag to resolve symlinks in directories.
30447      cd `$THEPWDCMD -P`
30448      sym_link_dir=`$THEPWDCMD -P`
30449      # Resolve file symlinks
30450      while test $COUNTER -lt 20; do
30451        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30452        if test "x$ISLINK" == x; then
30453          # This is not a symbolic link! We are done!
30454          break
30455        fi
30456        # Again resolve directory symlinks since the target of the just found
30457        # link could be in a different directory
30458        cd `$DIRNAME $ISLINK`
30459        sym_link_dir=`$THEPWDCMD -P`
30460        sym_link_file=`$BASENAME $ISLINK`
30461        let COUNTER=COUNTER+1
30462      done
30463      cd $STARTDIR
30464      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30465    fi
30466  fi
30467
30468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30469$as_echo "$PROPER_COMPILER_CXX" >&6; }
30470    CXX="$PROPER_COMPILER_CXX"
30471  else
30472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30473$as_echo "no, keeping CXX" >&6; }
30474  fi
30475
30476
30477  COMPILER=$CXX
30478  COMPILER_NAME=$COMPILER_NAME
30479
30480  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30481    # cc -V output typically looks like
30482    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30483    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30484    # Check that this is likely to be the Solaris Studio cc.
30485    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30486    if test $? -ne 0; then
30487      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30488      { $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
30489$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30490      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30491$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30493$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30494      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30495    fi
30496    # Remove usage instructions (if present), and
30497    # collapse compiler output into a single line
30498    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30499        $SED -e 's/ *[Uu]sage:.*//'`
30500    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30501        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30502  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30503    # xlc -qversion output typically looks like
30504    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30505    #     Version: 11.01.0000.0015
30506    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30507    # Check that this is likely to be the IBM XL C compiler.
30508    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30509    if test $? -ne 0; then
30510      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30511      { $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
30512$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30513      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30514$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30515      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30516$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30517      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30518    fi
30519    # Collapse compiler output into a single line
30520    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30521    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30522        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30523  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30524    # There is no specific version flag, but all output starts with a version string.
30525    # First line typically looks something like:
30526    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30527    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30528    # Check that this is likely to be Microsoft CL.EXE.
30529    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30530    if test $? -ne 0; then
30531      { $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
30532$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30533      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30534$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30535      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30536    fi
30537    # Collapse compiler output into a single line
30538    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30539    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30540        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30541  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30542    # gcc --version output typically looks like
30543    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30544    #     Copyright (C) 2013 Free Software Foundation, Inc.
30545    #     This is free software; see the source for copying conditions.  There is NO
30546    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30547    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30548    # Check that this is likely to be GCC.
30549    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30550    if test $? -ne 0; then
30551      { $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
30552$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30553      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30554$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30555      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30556    fi
30557    # Remove Copyright and legalese from version string, and
30558    # collapse into a single line
30559    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30560        $SED -e 's/ *Copyright .*//'`
30561    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30562        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30563  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30564    # clang --version output typically looks like
30565    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30566    #    clang version 3.3 (tags/RELEASE_33/final)
30567    # or
30568    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30569    #    Target: x86_64-pc-linux-gnu
30570    #    Thread model: posix
30571    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30572    # Check that this is likely to be clang
30573    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30574    if test $? -ne 0; then
30575      { $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
30576$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30577      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30578$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30579      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30580    fi
30581    # Collapse compiler output into a single line
30582    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30583    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30584        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30585  else
30586      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30587  fi
30588  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30589  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30590  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30591  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30592
30593  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30594$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30595
30596
30597  # Now that we have resolved CXX ourself, let autoconf have its go at it
30598  ac_ext=cpp
30599ac_cpp='$CXXCPP $CPPFLAGS'
30600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30603if test -z "$CXX"; then
30604  if test -n "$CCC"; then
30605    CXX=$CCC
30606  else
30607    if test -n "$ac_tool_prefix"; then
30608  for ac_prog in $CXX
30609  do
30610    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30611set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30613$as_echo_n "checking for $ac_word... " >&6; }
30614if ${ac_cv_prog_CXX+:} false; then :
30615  $as_echo_n "(cached) " >&6
30616else
30617  if test -n "$CXX"; then
30618  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30619else
30620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30621for as_dir in $PATH
30622do
30623  IFS=$as_save_IFS
30624  test -z "$as_dir" && as_dir=.
30625    for ac_exec_ext in '' $ac_executable_extensions; do
30626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30627    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30629    break 2
30630  fi
30631done
30632  done
30633IFS=$as_save_IFS
30634
30635fi
30636fi
30637CXX=$ac_cv_prog_CXX
30638if test -n "$CXX"; then
30639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30640$as_echo "$CXX" >&6; }
30641else
30642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30643$as_echo "no" >&6; }
30644fi
30645
30646
30647    test -n "$CXX" && break
30648  done
30649fi
30650if test -z "$CXX"; then
30651  ac_ct_CXX=$CXX
30652  for ac_prog in $CXX
30653do
30654  # Extract the first word of "$ac_prog", so it can be a program name with args.
30655set dummy $ac_prog; ac_word=$2
30656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30657$as_echo_n "checking for $ac_word... " >&6; }
30658if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30659  $as_echo_n "(cached) " >&6
30660else
30661  if test -n "$ac_ct_CXX"; then
30662  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30663else
30664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30665for as_dir in $PATH
30666do
30667  IFS=$as_save_IFS
30668  test -z "$as_dir" && as_dir=.
30669    for ac_exec_ext in '' $ac_executable_extensions; do
30670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30671    ac_cv_prog_ac_ct_CXX="$ac_prog"
30672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30673    break 2
30674  fi
30675done
30676  done
30677IFS=$as_save_IFS
30678
30679fi
30680fi
30681ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30682if test -n "$ac_ct_CXX"; then
30683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30684$as_echo "$ac_ct_CXX" >&6; }
30685else
30686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30687$as_echo "no" >&6; }
30688fi
30689
30690
30691  test -n "$ac_ct_CXX" && break
30692done
30693
30694  if test "x$ac_ct_CXX" = x; then
30695    CXX="g++"
30696  else
30697    case $cross_compiling:$ac_tool_warned in
30698yes:)
30699{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30700$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30701ac_tool_warned=yes ;;
30702esac
30703    CXX=$ac_ct_CXX
30704  fi
30705fi
30706
30707  fi
30708fi
30709# Provide some information about the compiler.
30710$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30711set X $ac_compile
30712ac_compiler=$2
30713for ac_option in --version -v -V -qversion; do
30714  { { ac_try="$ac_compiler $ac_option >&5"
30715case "(($ac_try" in
30716  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30717  *) ac_try_echo=$ac_try;;
30718esac
30719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30720$as_echo "$ac_try_echo"; } >&5
30721  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30722  ac_status=$?
30723  if test -s conftest.err; then
30724    sed '10a\
30725... rest of stderr output deleted ...
30726         10q' conftest.err >conftest.er1
30727    cat conftest.er1 >&5
30728  fi
30729  rm -f conftest.er1 conftest.err
30730  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30731  test $ac_status = 0; }
30732done
30733
30734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30735$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30736if ${ac_cv_cxx_compiler_gnu+:} false; then :
30737  $as_echo_n "(cached) " >&6
30738else
30739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30740/* end confdefs.h.  */
30741
30742int
30743main ()
30744{
30745#ifndef __GNUC__
30746       choke me
30747#endif
30748
30749  ;
30750  return 0;
30751}
30752_ACEOF
30753if ac_fn_cxx_try_compile "$LINENO"; then :
30754  ac_compiler_gnu=yes
30755else
30756  ac_compiler_gnu=no
30757fi
30758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30759ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30760
30761fi
30762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30763$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30764if test $ac_compiler_gnu = yes; then
30765  GXX=yes
30766else
30767  GXX=
30768fi
30769ac_test_CXXFLAGS=${CXXFLAGS+set}
30770ac_save_CXXFLAGS=$CXXFLAGS
30771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30772$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30773if ${ac_cv_prog_cxx_g+:} false; then :
30774  $as_echo_n "(cached) " >&6
30775else
30776  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30777   ac_cxx_werror_flag=yes
30778   ac_cv_prog_cxx_g=no
30779   CXXFLAGS="-g"
30780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30781/* end confdefs.h.  */
30782
30783int
30784main ()
30785{
30786
30787  ;
30788  return 0;
30789}
30790_ACEOF
30791if ac_fn_cxx_try_compile "$LINENO"; then :
30792  ac_cv_prog_cxx_g=yes
30793else
30794  CXXFLAGS=""
30795      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30796/* end confdefs.h.  */
30797
30798int
30799main ()
30800{
30801
30802  ;
30803  return 0;
30804}
30805_ACEOF
30806if ac_fn_cxx_try_compile "$LINENO"; then :
30807
30808else
30809  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30810	 CXXFLAGS="-g"
30811	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30812/* end confdefs.h.  */
30813
30814int
30815main ()
30816{
30817
30818  ;
30819  return 0;
30820}
30821_ACEOF
30822if ac_fn_cxx_try_compile "$LINENO"; then :
30823  ac_cv_prog_cxx_g=yes
30824fi
30825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30826fi
30827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30828fi
30829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30830   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30831fi
30832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30833$as_echo "$ac_cv_prog_cxx_g" >&6; }
30834if test "$ac_test_CXXFLAGS" = set; then
30835  CXXFLAGS=$ac_save_CXXFLAGS
30836elif test $ac_cv_prog_cxx_g = yes; then
30837  if test "$GXX" = yes; then
30838    CXXFLAGS="-g -O2"
30839  else
30840    CXXFLAGS="-g"
30841  fi
30842else
30843  if test "$GXX" = yes; then
30844    CXXFLAGS="-O2"
30845  else
30846    CXXFLAGS=
30847  fi
30848fi
30849ac_ext=cpp
30850ac_cpp='$CXXCPP $CPPFLAGS'
30851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30854
30855
30856  #
30857  # Setup the preprocessor (CPP and CXXCPP)
30858  #
30859  ac_ext=c
30860ac_cpp='$CPP $CPPFLAGS'
30861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30863ac_compiler_gnu=$ac_cv_c_compiler_gnu
30864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30865$as_echo_n "checking how to run the C preprocessor... " >&6; }
30866# On Suns, sometimes $CPP names a directory.
30867if test -n "$CPP" && test -d "$CPP"; then
30868  CPP=
30869fi
30870if test -z "$CPP"; then
30871  if ${ac_cv_prog_CPP+:} false; then :
30872  $as_echo_n "(cached) " >&6
30873else
30874      # Double quotes because CPP needs to be expanded
30875    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30876    do
30877      ac_preproc_ok=false
30878for ac_c_preproc_warn_flag in '' yes
30879do
30880  # Use a header file that comes with gcc, so configuring glibc
30881  # with a fresh cross-compiler works.
30882  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30883  # <limits.h> exists even on freestanding compilers.
30884  # On the NeXT, cc -E runs the code through the compiler's parser,
30885  # not just through cpp. "Syntax error" is here to catch this case.
30886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30887/* end confdefs.h.  */
30888#ifdef __STDC__
30889# include <limits.h>
30890#else
30891# include <assert.h>
30892#endif
30893		     Syntax error
30894_ACEOF
30895if ac_fn_c_try_cpp "$LINENO"; then :
30896
30897else
30898  # Broken: fails on valid input.
30899continue
30900fi
30901rm -f conftest.err conftest.i conftest.$ac_ext
30902
30903  # OK, works on sane cases.  Now check whether nonexistent headers
30904  # can be detected and how.
30905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30906/* end confdefs.h.  */
30907#include <ac_nonexistent.h>
30908_ACEOF
30909if ac_fn_c_try_cpp "$LINENO"; then :
30910  # Broken: success on invalid input.
30911continue
30912else
30913  # Passes both tests.
30914ac_preproc_ok=:
30915break
30916fi
30917rm -f conftest.err conftest.i conftest.$ac_ext
30918
30919done
30920# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30921rm -f conftest.i conftest.err conftest.$ac_ext
30922if $ac_preproc_ok; then :
30923  break
30924fi
30925
30926    done
30927    ac_cv_prog_CPP=$CPP
30928
30929fi
30930  CPP=$ac_cv_prog_CPP
30931else
30932  ac_cv_prog_CPP=$CPP
30933fi
30934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30935$as_echo "$CPP" >&6; }
30936ac_preproc_ok=false
30937for ac_c_preproc_warn_flag in '' yes
30938do
30939  # Use a header file that comes with gcc, so configuring glibc
30940  # with a fresh cross-compiler works.
30941  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30942  # <limits.h> exists even on freestanding compilers.
30943  # On the NeXT, cc -E runs the code through the compiler's parser,
30944  # not just through cpp. "Syntax error" is here to catch this case.
30945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30946/* end confdefs.h.  */
30947#ifdef __STDC__
30948# include <limits.h>
30949#else
30950# include <assert.h>
30951#endif
30952		     Syntax error
30953_ACEOF
30954if ac_fn_c_try_cpp "$LINENO"; then :
30955
30956else
30957  # Broken: fails on valid input.
30958continue
30959fi
30960rm -f conftest.err conftest.i conftest.$ac_ext
30961
30962  # OK, works on sane cases.  Now check whether nonexistent headers
30963  # can be detected and how.
30964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30965/* end confdefs.h.  */
30966#include <ac_nonexistent.h>
30967_ACEOF
30968if ac_fn_c_try_cpp "$LINENO"; then :
30969  # Broken: success on invalid input.
30970continue
30971else
30972  # Passes both tests.
30973ac_preproc_ok=:
30974break
30975fi
30976rm -f conftest.err conftest.i conftest.$ac_ext
30977
30978done
30979# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30980rm -f conftest.i conftest.err conftest.$ac_ext
30981if $ac_preproc_ok; then :
30982
30983else
30984  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30986as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30987See \`config.log' for more details" "$LINENO" 5; }
30988fi
30989
30990ac_ext=cpp
30991ac_cpp='$CXXCPP $CPPFLAGS'
30992ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30993ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30994ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30995
30996
30997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30998
30999  # First separate the path from the arguments. This will split at the first
31000  # space.
31001  complete="$CPP"
31002  path="${complete%% *}"
31003  tmp="$complete EOL"
31004  arguments="${tmp#* }"
31005
31006  # Input might be given as Windows format, start by converting to
31007  # unix format.
31008  new_path=`$CYGPATH -u "$path"`
31009
31010  # Now try to locate executable using which
31011  new_path=`$WHICH "$new_path" 2> /dev/null`
31012  # bat and cmd files are not always considered executable in cygwin causing which
31013  # to not find them
31014  if test "x$new_path" = x \
31015      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31016      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31017    new_path=`$CYGPATH -u "$path"`
31018  fi
31019  if test "x$new_path" = x; then
31020    # Oops. Which didn't find the executable.
31021    # The splitting of arguments from the executable at a space might have been incorrect,
31022    # since paths with space are more likely in Windows. Give it another try with the whole
31023    # argument.
31024    path="$complete"
31025    arguments="EOL"
31026    new_path=`$CYGPATH -u "$path"`
31027    new_path=`$WHICH "$new_path" 2> /dev/null`
31028    # bat and cmd files are not always considered executable in cygwin causing which
31029    # to not find them
31030    if test "x$new_path" = x \
31031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31033      new_path=`$CYGPATH -u "$path"`
31034    fi
31035    if test "x$new_path" = x; then
31036      # It's still not found. Now this is an unrecoverable error.
31037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31038$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31039      has_space=`$ECHO "$complete" | $GREP " "`
31040      if test "x$has_space" != x; then
31041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31043      fi
31044      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31045    fi
31046  fi
31047
31048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31051  # "foo.exe" is OK but "foo" is an error.
31052  #
31053  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31054  # It is also a way to make sure we got the proper file name for the real test later on.
31055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31056  if test "x$test_shortpath" = x; then
31057    # Short path failed, file does not exist as specified.
31058    # Try adding .exe or .cmd
31059    if test -f "${new_path}.exe"; then
31060      input_to_shortpath="${new_path}.exe"
31061    elif test -f "${new_path}.cmd"; then
31062      input_to_shortpath="${new_path}.cmd"
31063    else
31064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31065$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31068      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31069    fi
31070  else
31071    input_to_shortpath="$new_path"
31072  fi
31073
31074  # Call helper function which possibly converts this using DOS-style short mode.
31075  # If so, the updated path is stored in $new_path.
31076  new_path="$input_to_shortpath"
31077
31078  input_path="$input_to_shortpath"
31079  # Check if we need to convert this using DOS-style short mode. If the path
31080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31081  # take no chances and rewrite it.
31082  # Note: m4 eats our [], so we need to use [ and ] instead.
31083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31084  if test "x$has_forbidden_chars" != x; then
31085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31089      # Going to short mode and back again did indeed matter. Since short mode is
31090      # case insensitive, let's make it lowercase to improve readability.
31091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31092      # Now convert it back to Unix-stile (cygpath)
31093      input_path=`$CYGPATH -u "$shortmode_path"`
31094      new_path="$input_path"
31095    fi
31096  fi
31097
31098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31099  if test "x$test_cygdrive_prefix" = x; then
31100    # As a simple fix, exclude /usr/bin since it's not a real path.
31101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31103      # a path prefixed by /cygdrive for fixpath to work.
31104      new_path="$CYGWIN_ROOT_PATH$input_path"
31105    fi
31106  fi
31107
31108  # remove trailing .exe if any
31109  new_path="${new_path/%.exe/}"
31110
31111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31112
31113  # First separate the path from the arguments. This will split at the first
31114  # space.
31115  complete="$CPP"
31116  path="${complete%% *}"
31117  tmp="$complete EOL"
31118  arguments="${tmp#* }"
31119
31120  # Input might be given as Windows format, start by converting to
31121  # unix format.
31122  new_path="$path"
31123
31124  windows_path="$new_path"
31125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31126    unix_path=`$CYGPATH -u "$windows_path"`
31127    new_path="$unix_path"
31128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31130    new_path="$unix_path"
31131  fi
31132
31133
31134  # Now try to locate executable using which
31135  new_path=`$WHICH "$new_path" 2> /dev/null`
31136
31137  if test "x$new_path" = x; then
31138    # Oops. Which didn't find the executable.
31139    # The splitting of arguments from the executable at a space might have been incorrect,
31140    # since paths with space are more likely in Windows. Give it another try with the whole
31141    # argument.
31142    path="$complete"
31143    arguments="EOL"
31144    new_path="$path"
31145
31146  windows_path="$new_path"
31147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31148    unix_path=`$CYGPATH -u "$windows_path"`
31149    new_path="$unix_path"
31150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31152    new_path="$unix_path"
31153  fi
31154
31155
31156    new_path=`$WHICH "$new_path" 2> /dev/null`
31157    # bat and cmd files are not always considered executable in MSYS causing which
31158    # to not find them
31159    if test "x$new_path" = x \
31160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31162      new_path="$path"
31163
31164  windows_path="$new_path"
31165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31166    unix_path=`$CYGPATH -u "$windows_path"`
31167    new_path="$unix_path"
31168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31170    new_path="$unix_path"
31171  fi
31172
31173    fi
31174
31175    if test "x$new_path" = x; then
31176      # It's still not found. Now this is an unrecoverable error.
31177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31178$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31179      has_space=`$ECHO "$complete" | $GREP " "`
31180      if test "x$has_space" != x; then
31181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31183      fi
31184      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31185    fi
31186  fi
31187
31188  # Now new_path has a complete unix path to the binary
31189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31190    # Keep paths in /bin as-is, but remove trailing .exe if any
31191    new_path="${new_path/%.exe/}"
31192    # Do not save /bin paths to all_fixpath_prefixes!
31193  else
31194    # Not in mixed or Windows style, start by that.
31195    new_path=`cmd //c echo $new_path`
31196
31197  input_path="$new_path"
31198  # Check if we need to convert this using DOS-style short mode. If the path
31199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31200  # take no chances and rewrite it.
31201  # Note: m4 eats our [], so we need to use [ and ] instead.
31202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31203  if test "x$has_forbidden_chars" != x; then
31204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31206  fi
31207
31208    # Output is in $new_path
31209
31210  windows_path="$new_path"
31211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31212    unix_path=`$CYGPATH -u "$windows_path"`
31213    new_path="$unix_path"
31214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31216    new_path="$unix_path"
31217  fi
31218
31219    # remove trailing .exe if any
31220    new_path="${new_path/%.exe/}"
31221
31222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31224  fi
31225
31226  else
31227    # We're on a posix platform. Hooray! :)
31228    # First separate the path from the arguments. This will split at the first
31229    # space.
31230    complete="$CPP"
31231    path="${complete%% *}"
31232    tmp="$complete EOL"
31233    arguments="${tmp#* }"
31234
31235    # Cannot rely on the command "which" here since it doesn't always work.
31236    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31237    if test -z "$is_absolute_path"; then
31238      # Path to executable is not absolute. Find it.
31239      IFS_save="$IFS"
31240      IFS=:
31241      for p in $PATH; do
31242        if test -f "$p/$path" && test -x "$p/$path"; then
31243          new_path="$p/$path"
31244          break
31245        fi
31246      done
31247      IFS="$IFS_save"
31248    else
31249      # This is an absolute path, we can use it without further modifications.
31250      new_path="$path"
31251    fi
31252
31253    if test "x$new_path" = x; then
31254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31255$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31256      has_space=`$ECHO "$complete" | $GREP " "`
31257      if test "x$has_space" != x; then
31258        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31260      fi
31261      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31262    fi
31263  fi
31264
31265  # Now join together the path and the arguments once again
31266  if test "x$arguments" != xEOL; then
31267    new_complete="$new_path ${arguments% *}"
31268  else
31269    new_complete="$new_path"
31270  fi
31271
31272  if test "x$complete" != "x$new_complete"; then
31273    CPP="$new_complete"
31274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31275$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31276  fi
31277
31278  ac_ext=cpp
31279ac_cpp='$CXXCPP $CPPFLAGS'
31280ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31281ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31282ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31284$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31285if test -z "$CXXCPP"; then
31286  if ${ac_cv_prog_CXXCPP+:} false; then :
31287  $as_echo_n "(cached) " >&6
31288else
31289      # Double quotes because CXXCPP needs to be expanded
31290    for CXXCPP in "$CXX -E" "/lib/cpp"
31291    do
31292      ac_preproc_ok=false
31293for ac_cxx_preproc_warn_flag in '' yes
31294do
31295  # Use a header file that comes with gcc, so configuring glibc
31296  # with a fresh cross-compiler works.
31297  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31298  # <limits.h> exists even on freestanding compilers.
31299  # On the NeXT, cc -E runs the code through the compiler's parser,
31300  # not just through cpp. "Syntax error" is here to catch this case.
31301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31302/* end confdefs.h.  */
31303#ifdef __STDC__
31304# include <limits.h>
31305#else
31306# include <assert.h>
31307#endif
31308		     Syntax error
31309_ACEOF
31310if ac_fn_cxx_try_cpp "$LINENO"; then :
31311
31312else
31313  # Broken: fails on valid input.
31314continue
31315fi
31316rm -f conftest.err conftest.i conftest.$ac_ext
31317
31318  # OK, works on sane cases.  Now check whether nonexistent headers
31319  # can be detected and how.
31320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31321/* end confdefs.h.  */
31322#include <ac_nonexistent.h>
31323_ACEOF
31324if ac_fn_cxx_try_cpp "$LINENO"; then :
31325  # Broken: success on invalid input.
31326continue
31327else
31328  # Passes both tests.
31329ac_preproc_ok=:
31330break
31331fi
31332rm -f conftest.err conftest.i conftest.$ac_ext
31333
31334done
31335# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31336rm -f conftest.i conftest.err conftest.$ac_ext
31337if $ac_preproc_ok; then :
31338  break
31339fi
31340
31341    done
31342    ac_cv_prog_CXXCPP=$CXXCPP
31343
31344fi
31345  CXXCPP=$ac_cv_prog_CXXCPP
31346else
31347  ac_cv_prog_CXXCPP=$CXXCPP
31348fi
31349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31350$as_echo "$CXXCPP" >&6; }
31351ac_preproc_ok=false
31352for ac_cxx_preproc_warn_flag in '' yes
31353do
31354  # Use a header file that comes with gcc, so configuring glibc
31355  # with a fresh cross-compiler works.
31356  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31357  # <limits.h> exists even on freestanding compilers.
31358  # On the NeXT, cc -E runs the code through the compiler's parser,
31359  # not just through cpp. "Syntax error" is here to catch this case.
31360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31361/* end confdefs.h.  */
31362#ifdef __STDC__
31363# include <limits.h>
31364#else
31365# include <assert.h>
31366#endif
31367		     Syntax error
31368_ACEOF
31369if ac_fn_cxx_try_cpp "$LINENO"; then :
31370
31371else
31372  # Broken: fails on valid input.
31373continue
31374fi
31375rm -f conftest.err conftest.i conftest.$ac_ext
31376
31377  # OK, works on sane cases.  Now check whether nonexistent headers
31378  # can be detected and how.
31379  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31380/* end confdefs.h.  */
31381#include <ac_nonexistent.h>
31382_ACEOF
31383if ac_fn_cxx_try_cpp "$LINENO"; then :
31384  # Broken: success on invalid input.
31385continue
31386else
31387  # Passes both tests.
31388ac_preproc_ok=:
31389break
31390fi
31391rm -f conftest.err conftest.i conftest.$ac_ext
31392
31393done
31394# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31395rm -f conftest.i conftest.err conftest.$ac_ext
31396if $ac_preproc_ok; then :
31397
31398else
31399  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31401as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31402See \`config.log' for more details" "$LINENO" 5; }
31403fi
31404
31405ac_ext=cpp
31406ac_cpp='$CXXCPP $CPPFLAGS'
31407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31410
31411
31412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31413
31414  # First separate the path from the arguments. This will split at the first
31415  # space.
31416  complete="$CXXCPP"
31417  path="${complete%% *}"
31418  tmp="$complete EOL"
31419  arguments="${tmp#* }"
31420
31421  # Input might be given as Windows format, start by converting to
31422  # unix format.
31423  new_path=`$CYGPATH -u "$path"`
31424
31425  # Now try to locate executable using which
31426  new_path=`$WHICH "$new_path" 2> /dev/null`
31427  # bat and cmd files are not always considered executable in cygwin causing which
31428  # to not find them
31429  if test "x$new_path" = x \
31430      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31431      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31432    new_path=`$CYGPATH -u "$path"`
31433  fi
31434  if test "x$new_path" = x; then
31435    # Oops. Which didn't find the executable.
31436    # The splitting of arguments from the executable at a space might have been incorrect,
31437    # since paths with space are more likely in Windows. Give it another try with the whole
31438    # argument.
31439    path="$complete"
31440    arguments="EOL"
31441    new_path=`$CYGPATH -u "$path"`
31442    new_path=`$WHICH "$new_path" 2> /dev/null`
31443    # bat and cmd files are not always considered executable in cygwin causing which
31444    # to not find them
31445    if test "x$new_path" = x \
31446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31448      new_path=`$CYGPATH -u "$path"`
31449    fi
31450    if test "x$new_path" = x; then
31451      # It's still not found. Now this is an unrecoverable error.
31452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31453$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31454      has_space=`$ECHO "$complete" | $GREP " "`
31455      if test "x$has_space" != x; then
31456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31458      fi
31459      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31460    fi
31461  fi
31462
31463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31466  # "foo.exe" is OK but "foo" is an error.
31467  #
31468  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31469  # It is also a way to make sure we got the proper file name for the real test later on.
31470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31471  if test "x$test_shortpath" = x; then
31472    # Short path failed, file does not exist as specified.
31473    # Try adding .exe or .cmd
31474    if test -f "${new_path}.exe"; then
31475      input_to_shortpath="${new_path}.exe"
31476    elif test -f "${new_path}.cmd"; then
31477      input_to_shortpath="${new_path}.cmd"
31478    else
31479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31480$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31481      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31482$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31483      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31484    fi
31485  else
31486    input_to_shortpath="$new_path"
31487  fi
31488
31489  # Call helper function which possibly converts this using DOS-style short mode.
31490  # If so, the updated path is stored in $new_path.
31491  new_path="$input_to_shortpath"
31492
31493  input_path="$input_to_shortpath"
31494  # Check if we need to convert this using DOS-style short mode. If the path
31495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31496  # take no chances and rewrite it.
31497  # Note: m4 eats our [], so we need to use [ and ] instead.
31498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31499  if test "x$has_forbidden_chars" != x; then
31500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31504      # Going to short mode and back again did indeed matter. Since short mode is
31505      # case insensitive, let's make it lowercase to improve readability.
31506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31507      # Now convert it back to Unix-stile (cygpath)
31508      input_path=`$CYGPATH -u "$shortmode_path"`
31509      new_path="$input_path"
31510    fi
31511  fi
31512
31513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31514  if test "x$test_cygdrive_prefix" = x; then
31515    # As a simple fix, exclude /usr/bin since it's not a real path.
31516    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31518      # a path prefixed by /cygdrive for fixpath to work.
31519      new_path="$CYGWIN_ROOT_PATH$input_path"
31520    fi
31521  fi
31522
31523  # remove trailing .exe if any
31524  new_path="${new_path/%.exe/}"
31525
31526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31527
31528  # First separate the path from the arguments. This will split at the first
31529  # space.
31530  complete="$CXXCPP"
31531  path="${complete%% *}"
31532  tmp="$complete EOL"
31533  arguments="${tmp#* }"
31534
31535  # Input might be given as Windows format, start by converting to
31536  # unix format.
31537  new_path="$path"
31538
31539  windows_path="$new_path"
31540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31541    unix_path=`$CYGPATH -u "$windows_path"`
31542    new_path="$unix_path"
31543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31545    new_path="$unix_path"
31546  fi
31547
31548
31549  # Now try to locate executable using which
31550  new_path=`$WHICH "$new_path" 2> /dev/null`
31551
31552  if test "x$new_path" = x; then
31553    # Oops. Which didn't find the executable.
31554    # The splitting of arguments from the executable at a space might have been incorrect,
31555    # since paths with space are more likely in Windows. Give it another try with the whole
31556    # argument.
31557    path="$complete"
31558    arguments="EOL"
31559    new_path="$path"
31560
31561  windows_path="$new_path"
31562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31563    unix_path=`$CYGPATH -u "$windows_path"`
31564    new_path="$unix_path"
31565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31567    new_path="$unix_path"
31568  fi
31569
31570
31571    new_path=`$WHICH "$new_path" 2> /dev/null`
31572    # bat and cmd files are not always considered executable in MSYS causing which
31573    # to not find them
31574    if test "x$new_path" = x \
31575        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31576        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31577      new_path="$path"
31578
31579  windows_path="$new_path"
31580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31581    unix_path=`$CYGPATH -u "$windows_path"`
31582    new_path="$unix_path"
31583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31585    new_path="$unix_path"
31586  fi
31587
31588    fi
31589
31590    if test "x$new_path" = x; then
31591      # It's still not found. Now this is an unrecoverable error.
31592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31593$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31594      has_space=`$ECHO "$complete" | $GREP " "`
31595      if test "x$has_space" != x; then
31596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31598      fi
31599      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31600    fi
31601  fi
31602
31603  # Now new_path has a complete unix path to the binary
31604  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31605    # Keep paths in /bin as-is, but remove trailing .exe if any
31606    new_path="${new_path/%.exe/}"
31607    # Do not save /bin paths to all_fixpath_prefixes!
31608  else
31609    # Not in mixed or Windows style, start by that.
31610    new_path=`cmd //c echo $new_path`
31611
31612  input_path="$new_path"
31613  # Check if we need to convert this using DOS-style short mode. If the path
31614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31615  # take no chances and rewrite it.
31616  # Note: m4 eats our [], so we need to use [ and ] instead.
31617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31618  if test "x$has_forbidden_chars" != x; then
31619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31621  fi
31622
31623    # Output is in $new_path
31624
31625  windows_path="$new_path"
31626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31627    unix_path=`$CYGPATH -u "$windows_path"`
31628    new_path="$unix_path"
31629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31631    new_path="$unix_path"
31632  fi
31633
31634    # remove trailing .exe if any
31635    new_path="${new_path/%.exe/}"
31636
31637    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31638    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31639  fi
31640
31641  else
31642    # We're on a posix platform. Hooray! :)
31643    # First separate the path from the arguments. This will split at the first
31644    # space.
31645    complete="$CXXCPP"
31646    path="${complete%% *}"
31647    tmp="$complete EOL"
31648    arguments="${tmp#* }"
31649
31650    # Cannot rely on the command "which" here since it doesn't always work.
31651    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31652    if test -z "$is_absolute_path"; then
31653      # Path to executable is not absolute. Find it.
31654      IFS_save="$IFS"
31655      IFS=:
31656      for p in $PATH; do
31657        if test -f "$p/$path" && test -x "$p/$path"; then
31658          new_path="$p/$path"
31659          break
31660        fi
31661      done
31662      IFS="$IFS_save"
31663    else
31664      # This is an absolute path, we can use it without further modifications.
31665      new_path="$path"
31666    fi
31667
31668    if test "x$new_path" = x; then
31669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31670$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31671      has_space=`$ECHO "$complete" | $GREP " "`
31672      if test "x$has_space" != x; then
31673        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31674$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31675      fi
31676      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31677    fi
31678  fi
31679
31680  # Now join together the path and the arguments once again
31681  if test "x$arguments" != xEOL; then
31682    new_complete="$new_path ${arguments% *}"
31683  else
31684    new_complete="$new_path"
31685  fi
31686
31687  if test "x$complete" != "x$new_complete"; then
31688    CXXCPP="$new_complete"
31689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31690$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31691  fi
31692
31693
31694  #
31695  # Setup the linker (LD)
31696  #
31697  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31698    # In the Microsoft toolchain we have a separate LD command "link".
31699    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31700    # a cygwin program for something completely different.
31701    # Extract the first word of "link", so it can be a program name with args.
31702set dummy link; ac_word=$2
31703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31704$as_echo_n "checking for $ac_word... " >&6; }
31705if ${ac_cv_prog_LD+:} false; then :
31706  $as_echo_n "(cached) " >&6
31707else
31708  if test -n "$LD"; then
31709  ac_cv_prog_LD="$LD" # Let the user override the test.
31710else
31711  ac_prog_rejected=no
31712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31713for as_dir in $PATH
31714do
31715  IFS=$as_save_IFS
31716  test -z "$as_dir" && as_dir=.
31717    for ac_exec_ext in '' $ac_executable_extensions; do
31718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31719    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31720       ac_prog_rejected=yes
31721       continue
31722     fi
31723    ac_cv_prog_LD="link"
31724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31725    break 2
31726  fi
31727done
31728  done
31729IFS=$as_save_IFS
31730
31731if test $ac_prog_rejected = yes; then
31732  # We found a bogon in the path, so make sure we never use it.
31733  set dummy $ac_cv_prog_LD
31734  shift
31735  if test $# != 0; then
31736    # We chose a different compiler from the bogus one.
31737    # However, it has the same basename, so the bogon will be chosen
31738    # first if we set LD to just the basename; use the full file name.
31739    shift
31740    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31741  fi
31742fi
31743fi
31744fi
31745LD=$ac_cv_prog_LD
31746if test -n "$LD"; then
31747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31748$as_echo "$LD" >&6; }
31749else
31750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31751$as_echo "no" >&6; }
31752fi
31753
31754
31755
31756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31757
31758  # First separate the path from the arguments. This will split at the first
31759  # space.
31760  complete="$LD"
31761  path="${complete%% *}"
31762  tmp="$complete EOL"
31763  arguments="${tmp#* }"
31764
31765  # Input might be given as Windows format, start by converting to
31766  # unix format.
31767  new_path=`$CYGPATH -u "$path"`
31768
31769  # Now try to locate executable using which
31770  new_path=`$WHICH "$new_path" 2> /dev/null`
31771  # bat and cmd files are not always considered executable in cygwin causing which
31772  # to not find them
31773  if test "x$new_path" = x \
31774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31776    new_path=`$CYGPATH -u "$path"`
31777  fi
31778  if test "x$new_path" = x; then
31779    # Oops. Which didn't find the executable.
31780    # The splitting of arguments from the executable at a space might have been incorrect,
31781    # since paths with space are more likely in Windows. Give it another try with the whole
31782    # argument.
31783    path="$complete"
31784    arguments="EOL"
31785    new_path=`$CYGPATH -u "$path"`
31786    new_path=`$WHICH "$new_path" 2> /dev/null`
31787    # bat and cmd files are not always considered executable in cygwin causing which
31788    # to not find them
31789    if test "x$new_path" = x \
31790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31792      new_path=`$CYGPATH -u "$path"`
31793    fi
31794    if test "x$new_path" = x; then
31795      # It's still not found. Now this is an unrecoverable error.
31796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31797$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31798      has_space=`$ECHO "$complete" | $GREP " "`
31799      if test "x$has_space" != x; then
31800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31802      fi
31803      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31804    fi
31805  fi
31806
31807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31810  # "foo.exe" is OK but "foo" is an error.
31811  #
31812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31813  # It is also a way to make sure we got the proper file name for the real test later on.
31814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31815  if test "x$test_shortpath" = x; then
31816    # Short path failed, file does not exist as specified.
31817    # Try adding .exe or .cmd
31818    if test -f "${new_path}.exe"; then
31819      input_to_shortpath="${new_path}.exe"
31820    elif test -f "${new_path}.cmd"; then
31821      input_to_shortpath="${new_path}.cmd"
31822    else
31823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31824$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31827      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31828    fi
31829  else
31830    input_to_shortpath="$new_path"
31831  fi
31832
31833  # Call helper function which possibly converts this using DOS-style short mode.
31834  # If so, the updated path is stored in $new_path.
31835  new_path="$input_to_shortpath"
31836
31837  input_path="$input_to_shortpath"
31838  # Check if we need to convert this using DOS-style short mode. If the path
31839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31840  # take no chances and rewrite it.
31841  # Note: m4 eats our [], so we need to use [ and ] instead.
31842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31843  if test "x$has_forbidden_chars" != x; then
31844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31848      # Going to short mode and back again did indeed matter. Since short mode is
31849      # case insensitive, let's make it lowercase to improve readability.
31850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31851      # Now convert it back to Unix-stile (cygpath)
31852      input_path=`$CYGPATH -u "$shortmode_path"`
31853      new_path="$input_path"
31854    fi
31855  fi
31856
31857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31858  if test "x$test_cygdrive_prefix" = x; then
31859    # As a simple fix, exclude /usr/bin since it's not a real path.
31860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31862      # a path prefixed by /cygdrive for fixpath to work.
31863      new_path="$CYGWIN_ROOT_PATH$input_path"
31864    fi
31865  fi
31866
31867  # remove trailing .exe if any
31868  new_path="${new_path/%.exe/}"
31869
31870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31871
31872  # First separate the path from the arguments. This will split at the first
31873  # space.
31874  complete="$LD"
31875  path="${complete%% *}"
31876  tmp="$complete EOL"
31877  arguments="${tmp#* }"
31878
31879  # Input might be given as Windows format, start by converting to
31880  # unix format.
31881  new_path="$path"
31882
31883  windows_path="$new_path"
31884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31885    unix_path=`$CYGPATH -u "$windows_path"`
31886    new_path="$unix_path"
31887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31889    new_path="$unix_path"
31890  fi
31891
31892
31893  # Now try to locate executable using which
31894  new_path=`$WHICH "$new_path" 2> /dev/null`
31895
31896  if test "x$new_path" = x; then
31897    # Oops. Which didn't find the executable.
31898    # The splitting of arguments from the executable at a space might have been incorrect,
31899    # since paths with space are more likely in Windows. Give it another try with the whole
31900    # argument.
31901    path="$complete"
31902    arguments="EOL"
31903    new_path="$path"
31904
31905  windows_path="$new_path"
31906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31907    unix_path=`$CYGPATH -u "$windows_path"`
31908    new_path="$unix_path"
31909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31911    new_path="$unix_path"
31912  fi
31913
31914
31915    new_path=`$WHICH "$new_path" 2> /dev/null`
31916    # bat and cmd files are not always considered executable in MSYS causing which
31917    # to not find them
31918    if test "x$new_path" = x \
31919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31921      new_path="$path"
31922
31923  windows_path="$new_path"
31924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31925    unix_path=`$CYGPATH -u "$windows_path"`
31926    new_path="$unix_path"
31927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31929    new_path="$unix_path"
31930  fi
31931
31932    fi
31933
31934    if test "x$new_path" = x; then
31935      # It's still not found. Now this is an unrecoverable error.
31936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31937$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31938      has_space=`$ECHO "$complete" | $GREP " "`
31939      if test "x$has_space" != x; then
31940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31942      fi
31943      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31944    fi
31945  fi
31946
31947  # Now new_path has a complete unix path to the binary
31948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31949    # Keep paths in /bin as-is, but remove trailing .exe if any
31950    new_path="${new_path/%.exe/}"
31951    # Do not save /bin paths to all_fixpath_prefixes!
31952  else
31953    # Not in mixed or Windows style, start by that.
31954    new_path=`cmd //c echo $new_path`
31955
31956  input_path="$new_path"
31957  # Check if we need to convert this using DOS-style short mode. If the path
31958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31959  # take no chances and rewrite it.
31960  # Note: m4 eats our [], so we need to use [ and ] instead.
31961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31962  if test "x$has_forbidden_chars" != x; then
31963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31965  fi
31966
31967    # Output is in $new_path
31968
31969  windows_path="$new_path"
31970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31971    unix_path=`$CYGPATH -u "$windows_path"`
31972    new_path="$unix_path"
31973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31975    new_path="$unix_path"
31976  fi
31977
31978    # remove trailing .exe if any
31979    new_path="${new_path/%.exe/}"
31980
31981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31983  fi
31984
31985  else
31986    # We're on a posix platform. Hooray! :)
31987    # First separate the path from the arguments. This will split at the first
31988    # space.
31989    complete="$LD"
31990    path="${complete%% *}"
31991    tmp="$complete EOL"
31992    arguments="${tmp#* }"
31993
31994    # Cannot rely on the command "which" here since it doesn't always work.
31995    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31996    if test -z "$is_absolute_path"; then
31997      # Path to executable is not absolute. Find it.
31998      IFS_save="$IFS"
31999      IFS=:
32000      for p in $PATH; do
32001        if test -f "$p/$path" && test -x "$p/$path"; then
32002          new_path="$p/$path"
32003          break
32004        fi
32005      done
32006      IFS="$IFS_save"
32007    else
32008      # This is an absolute path, we can use it without further modifications.
32009      new_path="$path"
32010    fi
32011
32012    if test "x$new_path" = x; then
32013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32014$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32015      has_space=`$ECHO "$complete" | $GREP " "`
32016      if test "x$has_space" != x; then
32017        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32019      fi
32020      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32021    fi
32022  fi
32023
32024  # Now join together the path and the arguments once again
32025  if test "x$arguments" != xEOL; then
32026    new_complete="$new_path ${arguments% *}"
32027  else
32028    new_complete="$new_path"
32029  fi
32030
32031  if test "x$complete" != "x$new_complete"; then
32032    LD="$new_complete"
32033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32034$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32035  fi
32036
32037    # Verify that we indeed succeeded with this trick.
32038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32039$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32040    "$LD" --version > /dev/null
32041    if test $? -eq 0 ; then
32042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32043$as_echo "no" >&6; }
32044      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32045    else
32046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32047$as_echo "yes" >&6; }
32048    fi
32049    LDCXX="$LD"
32050  else
32051    # All other toolchains use the compiler to link.
32052    LD="$CC"
32053    LDCXX="$CXX"
32054  fi
32055
32056  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32057
32058
32059  #
32060  # Setup the assembler (AS)
32061  #
32062  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32063    # FIXME: should this really be solaris, or solstudio?
32064
32065
32066  # Publish this variable in the help.
32067
32068
32069  if test "x$AS" = x; then
32070    # The variable is not set by user, try to locate tool using the code snippet
32071    for ac_prog in as
32072do
32073  # Extract the first word of "$ac_prog", so it can be a program name with args.
32074set dummy $ac_prog; ac_word=$2
32075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32076$as_echo_n "checking for $ac_word... " >&6; }
32077if ${ac_cv_path_AS+:} false; then :
32078  $as_echo_n "(cached) " >&6
32079else
32080  case $AS in
32081  [\\/]* | ?:[\\/]*)
32082  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32083  ;;
32084  *)
32085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32086for as_dir in $PATH
32087do
32088  IFS=$as_save_IFS
32089  test -z "$as_dir" && as_dir=.
32090    for ac_exec_ext in '' $ac_executable_extensions; do
32091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32092    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32094    break 2
32095  fi
32096done
32097  done
32098IFS=$as_save_IFS
32099
32100  ;;
32101esac
32102fi
32103AS=$ac_cv_path_AS
32104if test -n "$AS"; then
32105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32106$as_echo "$AS" >&6; }
32107else
32108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32109$as_echo "no" >&6; }
32110fi
32111
32112
32113  test -n "$AS" && break
32114done
32115
32116  else
32117    # The variable is set, but is it from the command line or the environment?
32118
32119    # Try to remove the string !AS! from our list.
32120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32122      # If it failed, the variable was not from the command line. Ignore it,
32123      # but warn the user (except for BASH, which is always set by the calling BASH).
32124      if test "xAS" != xBASH; then
32125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32126$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32127      fi
32128      # Try to locate tool using the code snippet
32129      for ac_prog in as
32130do
32131  # Extract the first word of "$ac_prog", so it can be a program name with args.
32132set dummy $ac_prog; ac_word=$2
32133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32134$as_echo_n "checking for $ac_word... " >&6; }
32135if ${ac_cv_path_AS+:} false; then :
32136  $as_echo_n "(cached) " >&6
32137else
32138  case $AS in
32139  [\\/]* | ?:[\\/]*)
32140  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32141  ;;
32142  *)
32143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32144for as_dir in $PATH
32145do
32146  IFS=$as_save_IFS
32147  test -z "$as_dir" && as_dir=.
32148    for ac_exec_ext in '' $ac_executable_extensions; do
32149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32150    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32152    break 2
32153  fi
32154done
32155  done
32156IFS=$as_save_IFS
32157
32158  ;;
32159esac
32160fi
32161AS=$ac_cv_path_AS
32162if test -n "$AS"; then
32163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32164$as_echo "$AS" >&6; }
32165else
32166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32167$as_echo "no" >&6; }
32168fi
32169
32170
32171  test -n "$AS" && break
32172done
32173
32174    else
32175      # If it succeeded, then it was overridden by the user. We will use it
32176      # for the tool.
32177
32178      # First remove it from the list of overridden variables, so we can test
32179      # for unknown variables in the end.
32180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32181
32182      # Check if the provided tool contains a complete path.
32183      tool_specified="$AS"
32184      tool_basename="${tool_specified##*/}"
32185      if test "x$tool_basename" = "x$tool_specified"; then
32186        # A command without a complete path is provided, search $PATH.
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32188$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32189        # Extract the first word of "$tool_basename", so it can be a program name with args.
32190set dummy $tool_basename; ac_word=$2
32191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32192$as_echo_n "checking for $ac_word... " >&6; }
32193if ${ac_cv_path_AS+:} false; then :
32194  $as_echo_n "(cached) " >&6
32195else
32196  case $AS in
32197  [\\/]* | ?:[\\/]*)
32198  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32199  ;;
32200  *)
32201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32202for as_dir in $PATH
32203do
32204  IFS=$as_save_IFS
32205  test -z "$as_dir" && as_dir=.
32206    for ac_exec_ext in '' $ac_executable_extensions; do
32207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32208    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32210    break 2
32211  fi
32212done
32213  done
32214IFS=$as_save_IFS
32215
32216  ;;
32217esac
32218fi
32219AS=$ac_cv_path_AS
32220if test -n "$AS"; then
32221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32222$as_echo "$AS" >&6; }
32223else
32224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32225$as_echo "no" >&6; }
32226fi
32227
32228
32229        if test "x$AS" = x; then
32230          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32231        fi
32232      else
32233        # Otherwise we believe it is a complete path. Use it as it is.
32234        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32235$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32236        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32237$as_echo_n "checking for AS... " >&6; }
32238        if test ! -x "$tool_specified"; then
32239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32240$as_echo "not found" >&6; }
32241          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32242        fi
32243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32244$as_echo "$tool_specified" >&6; }
32245      fi
32246    fi
32247  fi
32248
32249
32250
32251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32252
32253  # First separate the path from the arguments. This will split at the first
32254  # space.
32255  complete="$AS"
32256  path="${complete%% *}"
32257  tmp="$complete EOL"
32258  arguments="${tmp#* }"
32259
32260  # Input might be given as Windows format, start by converting to
32261  # unix format.
32262  new_path=`$CYGPATH -u "$path"`
32263
32264  # Now try to locate executable using which
32265  new_path=`$WHICH "$new_path" 2> /dev/null`
32266  # bat and cmd files are not always considered executable in cygwin causing which
32267  # to not find them
32268  if test "x$new_path" = x \
32269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32271    new_path=`$CYGPATH -u "$path"`
32272  fi
32273  if test "x$new_path" = x; then
32274    # Oops. Which didn't find the executable.
32275    # The splitting of arguments from the executable at a space might have been incorrect,
32276    # since paths with space are more likely in Windows. Give it another try with the whole
32277    # argument.
32278    path="$complete"
32279    arguments="EOL"
32280    new_path=`$CYGPATH -u "$path"`
32281    new_path=`$WHICH "$new_path" 2> /dev/null`
32282    # bat and cmd files are not always considered executable in cygwin causing which
32283    # to not find them
32284    if test "x$new_path" = x \
32285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32287      new_path=`$CYGPATH -u "$path"`
32288    fi
32289    if test "x$new_path" = x; then
32290      # It's still not found. Now this is an unrecoverable error.
32291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32292$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32293      has_space=`$ECHO "$complete" | $GREP " "`
32294      if test "x$has_space" != x; then
32295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32297      fi
32298      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32299    fi
32300  fi
32301
32302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32305  # "foo.exe" is OK but "foo" is an error.
32306  #
32307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32308  # It is also a way to make sure we got the proper file name for the real test later on.
32309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32310  if test "x$test_shortpath" = x; then
32311    # Short path failed, file does not exist as specified.
32312    # Try adding .exe or .cmd
32313    if test -f "${new_path}.exe"; then
32314      input_to_shortpath="${new_path}.exe"
32315    elif test -f "${new_path}.cmd"; then
32316      input_to_shortpath="${new_path}.cmd"
32317    else
32318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32319$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32322      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32323    fi
32324  else
32325    input_to_shortpath="$new_path"
32326  fi
32327
32328  # Call helper function which possibly converts this using DOS-style short mode.
32329  # If so, the updated path is stored in $new_path.
32330  new_path="$input_to_shortpath"
32331
32332  input_path="$input_to_shortpath"
32333  # Check if we need to convert this using DOS-style short mode. If the path
32334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32335  # take no chances and rewrite it.
32336  # Note: m4 eats our [], so we need to use [ and ] instead.
32337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32338  if test "x$has_forbidden_chars" != x; then
32339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32343      # Going to short mode and back again did indeed matter. Since short mode is
32344      # case insensitive, let's make it lowercase to improve readability.
32345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32346      # Now convert it back to Unix-stile (cygpath)
32347      input_path=`$CYGPATH -u "$shortmode_path"`
32348      new_path="$input_path"
32349    fi
32350  fi
32351
32352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32353  if test "x$test_cygdrive_prefix" = x; then
32354    # As a simple fix, exclude /usr/bin since it's not a real path.
32355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32357      # a path prefixed by /cygdrive for fixpath to work.
32358      new_path="$CYGWIN_ROOT_PATH$input_path"
32359    fi
32360  fi
32361
32362  # remove trailing .exe if any
32363  new_path="${new_path/%.exe/}"
32364
32365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32366
32367  # First separate the path from the arguments. This will split at the first
32368  # space.
32369  complete="$AS"
32370  path="${complete%% *}"
32371  tmp="$complete EOL"
32372  arguments="${tmp#* }"
32373
32374  # Input might be given as Windows format, start by converting to
32375  # unix format.
32376  new_path="$path"
32377
32378  windows_path="$new_path"
32379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32380    unix_path=`$CYGPATH -u "$windows_path"`
32381    new_path="$unix_path"
32382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32384    new_path="$unix_path"
32385  fi
32386
32387
32388  # Now try to locate executable using which
32389  new_path=`$WHICH "$new_path" 2> /dev/null`
32390
32391  if test "x$new_path" = x; then
32392    # Oops. Which didn't find the executable.
32393    # The splitting of arguments from the executable at a space might have been incorrect,
32394    # since paths with space are more likely in Windows. Give it another try with the whole
32395    # argument.
32396    path="$complete"
32397    arguments="EOL"
32398    new_path="$path"
32399
32400  windows_path="$new_path"
32401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32402    unix_path=`$CYGPATH -u "$windows_path"`
32403    new_path="$unix_path"
32404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32406    new_path="$unix_path"
32407  fi
32408
32409
32410    new_path=`$WHICH "$new_path" 2> /dev/null`
32411    # bat and cmd files are not always considered executable in MSYS causing which
32412    # to not find them
32413    if test "x$new_path" = x \
32414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32416      new_path="$path"
32417
32418  windows_path="$new_path"
32419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420    unix_path=`$CYGPATH -u "$windows_path"`
32421    new_path="$unix_path"
32422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424    new_path="$unix_path"
32425  fi
32426
32427    fi
32428
32429    if test "x$new_path" = x; then
32430      # It's still not found. Now this is an unrecoverable error.
32431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32432$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32433      has_space=`$ECHO "$complete" | $GREP " "`
32434      if test "x$has_space" != x; then
32435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32437      fi
32438      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32439    fi
32440  fi
32441
32442  # Now new_path has a complete unix path to the binary
32443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32444    # Keep paths in /bin as-is, but remove trailing .exe if any
32445    new_path="${new_path/%.exe/}"
32446    # Do not save /bin paths to all_fixpath_prefixes!
32447  else
32448    # Not in mixed or Windows style, start by that.
32449    new_path=`cmd //c echo $new_path`
32450
32451  input_path="$new_path"
32452  # Check if we need to convert this using DOS-style short mode. If the path
32453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32454  # take no chances and rewrite it.
32455  # Note: m4 eats our [], so we need to use [ and ] instead.
32456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32457  if test "x$has_forbidden_chars" != x; then
32458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32460  fi
32461
32462    # Output is in $new_path
32463
32464  windows_path="$new_path"
32465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32466    unix_path=`$CYGPATH -u "$windows_path"`
32467    new_path="$unix_path"
32468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32470    new_path="$unix_path"
32471  fi
32472
32473    # remove trailing .exe if any
32474    new_path="${new_path/%.exe/}"
32475
32476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32478  fi
32479
32480  else
32481    # We're on a posix platform. Hooray! :)
32482    # First separate the path from the arguments. This will split at the first
32483    # space.
32484    complete="$AS"
32485    path="${complete%% *}"
32486    tmp="$complete EOL"
32487    arguments="${tmp#* }"
32488
32489    # Cannot rely on the command "which" here since it doesn't always work.
32490    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32491    if test -z "$is_absolute_path"; then
32492      # Path to executable is not absolute. Find it.
32493      IFS_save="$IFS"
32494      IFS=:
32495      for p in $PATH; do
32496        if test -f "$p/$path" && test -x "$p/$path"; then
32497          new_path="$p/$path"
32498          break
32499        fi
32500      done
32501      IFS="$IFS_save"
32502    else
32503      # This is an absolute path, we can use it without further modifications.
32504      new_path="$path"
32505    fi
32506
32507    if test "x$new_path" = x; then
32508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32509$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32510      has_space=`$ECHO "$complete" | $GREP " "`
32511      if test "x$has_space" != x; then
32512        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32514      fi
32515      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32516    fi
32517  fi
32518
32519  # Now join together the path and the arguments once again
32520  if test "x$arguments" != xEOL; then
32521    new_complete="$new_path ${arguments% *}"
32522  else
32523    new_complete="$new_path"
32524  fi
32525
32526  if test "x$complete" != "x$new_complete"; then
32527    AS="$new_complete"
32528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32529$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32530  fi
32531
32532  else
32533    # FIXME: is this correct for microsoft?
32534    AS="$CC -c"
32535  fi
32536
32537
32538  #
32539  # Setup the archiver (AR)
32540  #
32541  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32542    # The corresponding ar tool is lib.exe (used to create static libraries)
32543    # Extract the first word of "lib", so it can be a program name with args.
32544set dummy lib; ac_word=$2
32545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32546$as_echo_n "checking for $ac_word... " >&6; }
32547if ${ac_cv_prog_AR+:} false; then :
32548  $as_echo_n "(cached) " >&6
32549else
32550  if test -n "$AR"; then
32551  ac_cv_prog_AR="$AR" # Let the user override the test.
32552else
32553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32554for as_dir in $PATH
32555do
32556  IFS=$as_save_IFS
32557  test -z "$as_dir" && as_dir=.
32558    for ac_exec_ext in '' $ac_executable_extensions; do
32559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32560    ac_cv_prog_AR="lib"
32561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32562    break 2
32563  fi
32564done
32565  done
32566IFS=$as_save_IFS
32567
32568fi
32569fi
32570AR=$ac_cv_prog_AR
32571if test -n "$AR"; then
32572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32573$as_echo "$AR" >&6; }
32574else
32575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32576$as_echo "no" >&6; }
32577fi
32578
32579
32580  else
32581
32582
32583  # Publish this variable in the help.
32584
32585
32586  if test "x$AR" = x; then
32587    # The variable is not set by user, try to locate tool using the code snippet
32588    if test -n "$ac_tool_prefix"; then
32589  for ac_prog in ar
32590  do
32591    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32592set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32594$as_echo_n "checking for $ac_word... " >&6; }
32595if ${ac_cv_prog_AR+:} false; then :
32596  $as_echo_n "(cached) " >&6
32597else
32598  if test -n "$AR"; then
32599  ac_cv_prog_AR="$AR" # Let the user override the test.
32600else
32601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32602for as_dir in $PATH
32603do
32604  IFS=$as_save_IFS
32605  test -z "$as_dir" && as_dir=.
32606    for ac_exec_ext in '' $ac_executable_extensions; do
32607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32608    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32610    break 2
32611  fi
32612done
32613  done
32614IFS=$as_save_IFS
32615
32616fi
32617fi
32618AR=$ac_cv_prog_AR
32619if test -n "$AR"; then
32620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32621$as_echo "$AR" >&6; }
32622else
32623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32624$as_echo "no" >&6; }
32625fi
32626
32627
32628    test -n "$AR" && break
32629  done
32630fi
32631if test -z "$AR"; then
32632  ac_ct_AR=$AR
32633  for ac_prog in ar
32634do
32635  # Extract the first word of "$ac_prog", so it can be a program name with args.
32636set dummy $ac_prog; ac_word=$2
32637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32638$as_echo_n "checking for $ac_word... " >&6; }
32639if ${ac_cv_prog_ac_ct_AR+:} false; then :
32640  $as_echo_n "(cached) " >&6
32641else
32642  if test -n "$ac_ct_AR"; then
32643  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32644else
32645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32646for as_dir in $PATH
32647do
32648  IFS=$as_save_IFS
32649  test -z "$as_dir" && as_dir=.
32650    for ac_exec_ext in '' $ac_executable_extensions; do
32651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32652    ac_cv_prog_ac_ct_AR="$ac_prog"
32653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32654    break 2
32655  fi
32656done
32657  done
32658IFS=$as_save_IFS
32659
32660fi
32661fi
32662ac_ct_AR=$ac_cv_prog_ac_ct_AR
32663if test -n "$ac_ct_AR"; then
32664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32665$as_echo "$ac_ct_AR" >&6; }
32666else
32667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32668$as_echo "no" >&6; }
32669fi
32670
32671
32672  test -n "$ac_ct_AR" && break
32673done
32674
32675  if test "x$ac_ct_AR" = x; then
32676    AR=""
32677  else
32678    case $cross_compiling:$ac_tool_warned in
32679yes:)
32680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32682ac_tool_warned=yes ;;
32683esac
32684    AR=$ac_ct_AR
32685  fi
32686fi
32687
32688  else
32689    # The variable is set, but is it from the command line or the environment?
32690
32691    # Try to remove the string !AR! from our list.
32692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32694      # If it failed, the variable was not from the command line. Ignore it,
32695      # but warn the user (except for BASH, which is always set by the calling BASH).
32696      if test "xAR" != xBASH; then
32697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32698$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32699      fi
32700      # Try to locate tool using the code snippet
32701      if test -n "$ac_tool_prefix"; then
32702  for ac_prog in ar
32703  do
32704    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32705set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32707$as_echo_n "checking for $ac_word... " >&6; }
32708if ${ac_cv_prog_AR+:} false; then :
32709  $as_echo_n "(cached) " >&6
32710else
32711  if test -n "$AR"; then
32712  ac_cv_prog_AR="$AR" # Let the user override the test.
32713else
32714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32715for as_dir in $PATH
32716do
32717  IFS=$as_save_IFS
32718  test -z "$as_dir" && as_dir=.
32719    for ac_exec_ext in '' $ac_executable_extensions; do
32720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32721    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32723    break 2
32724  fi
32725done
32726  done
32727IFS=$as_save_IFS
32728
32729fi
32730fi
32731AR=$ac_cv_prog_AR
32732if test -n "$AR"; then
32733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32734$as_echo "$AR" >&6; }
32735else
32736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32737$as_echo "no" >&6; }
32738fi
32739
32740
32741    test -n "$AR" && break
32742  done
32743fi
32744if test -z "$AR"; then
32745  ac_ct_AR=$AR
32746  for ac_prog in ar
32747do
32748  # Extract the first word of "$ac_prog", so it can be a program name with args.
32749set dummy $ac_prog; ac_word=$2
32750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32751$as_echo_n "checking for $ac_word... " >&6; }
32752if ${ac_cv_prog_ac_ct_AR+:} false; then :
32753  $as_echo_n "(cached) " >&6
32754else
32755  if test -n "$ac_ct_AR"; then
32756  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32757else
32758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32759for as_dir in $PATH
32760do
32761  IFS=$as_save_IFS
32762  test -z "$as_dir" && as_dir=.
32763    for ac_exec_ext in '' $ac_executable_extensions; do
32764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32765    ac_cv_prog_ac_ct_AR="$ac_prog"
32766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32767    break 2
32768  fi
32769done
32770  done
32771IFS=$as_save_IFS
32772
32773fi
32774fi
32775ac_ct_AR=$ac_cv_prog_ac_ct_AR
32776if test -n "$ac_ct_AR"; then
32777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32778$as_echo "$ac_ct_AR" >&6; }
32779else
32780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32781$as_echo "no" >&6; }
32782fi
32783
32784
32785  test -n "$ac_ct_AR" && break
32786done
32787
32788  if test "x$ac_ct_AR" = x; then
32789    AR=""
32790  else
32791    case $cross_compiling:$ac_tool_warned in
32792yes:)
32793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32795ac_tool_warned=yes ;;
32796esac
32797    AR=$ac_ct_AR
32798  fi
32799fi
32800
32801    else
32802      # If it succeeded, then it was overridden by the user. We will use it
32803      # for the tool.
32804
32805      # First remove it from the list of overridden variables, so we can test
32806      # for unknown variables in the end.
32807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32808
32809      # Check if the provided tool contains a complete path.
32810      tool_specified="$AR"
32811      tool_basename="${tool_specified##*/}"
32812      if test "x$tool_basename" = "x$tool_specified"; then
32813        # A command without a complete path is provided, search $PATH.
32814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32815$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32816        # Extract the first word of "$tool_basename", so it can be a program name with args.
32817set dummy $tool_basename; ac_word=$2
32818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32819$as_echo_n "checking for $ac_word... " >&6; }
32820if ${ac_cv_path_AR+:} false; then :
32821  $as_echo_n "(cached) " >&6
32822else
32823  case $AR in
32824  [\\/]* | ?:[\\/]*)
32825  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32826  ;;
32827  *)
32828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32829for as_dir in $PATH
32830do
32831  IFS=$as_save_IFS
32832  test -z "$as_dir" && as_dir=.
32833    for ac_exec_ext in '' $ac_executable_extensions; do
32834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32835    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32837    break 2
32838  fi
32839done
32840  done
32841IFS=$as_save_IFS
32842
32843  ;;
32844esac
32845fi
32846AR=$ac_cv_path_AR
32847if test -n "$AR"; then
32848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32849$as_echo "$AR" >&6; }
32850else
32851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32852$as_echo "no" >&6; }
32853fi
32854
32855
32856        if test "x$AR" = x; then
32857          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32858        fi
32859      else
32860        # Otherwise we believe it is a complete path. Use it as it is.
32861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32862$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32864$as_echo_n "checking for AR... " >&6; }
32865        if test ! -x "$tool_specified"; then
32866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32867$as_echo "not found" >&6; }
32868          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32869        fi
32870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32871$as_echo "$tool_specified" >&6; }
32872      fi
32873    fi
32874  fi
32875
32876
32877  fi
32878
32879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32880
32881  # First separate the path from the arguments. This will split at the first
32882  # space.
32883  complete="$AR"
32884  path="${complete%% *}"
32885  tmp="$complete EOL"
32886  arguments="${tmp#* }"
32887
32888  # Input might be given as Windows format, start by converting to
32889  # unix format.
32890  new_path=`$CYGPATH -u "$path"`
32891
32892  # Now try to locate executable using which
32893  new_path=`$WHICH "$new_path" 2> /dev/null`
32894  # bat and cmd files are not always considered executable in cygwin causing which
32895  # to not find them
32896  if test "x$new_path" = x \
32897      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32898      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32899    new_path=`$CYGPATH -u "$path"`
32900  fi
32901  if test "x$new_path" = x; then
32902    # Oops. Which didn't find the executable.
32903    # The splitting of arguments from the executable at a space might have been incorrect,
32904    # since paths with space are more likely in Windows. Give it another try with the whole
32905    # argument.
32906    path="$complete"
32907    arguments="EOL"
32908    new_path=`$CYGPATH -u "$path"`
32909    new_path=`$WHICH "$new_path" 2> /dev/null`
32910    # bat and cmd files are not always considered executable in cygwin causing which
32911    # to not find them
32912    if test "x$new_path" = x \
32913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32915      new_path=`$CYGPATH -u "$path"`
32916    fi
32917    if test "x$new_path" = x; then
32918      # It's still not found. Now this is an unrecoverable error.
32919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32920$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32921      has_space=`$ECHO "$complete" | $GREP " "`
32922      if test "x$has_space" != x; then
32923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32925      fi
32926      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32927    fi
32928  fi
32929
32930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32933  # "foo.exe" is OK but "foo" is an error.
32934  #
32935  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32936  # It is also a way to make sure we got the proper file name for the real test later on.
32937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32938  if test "x$test_shortpath" = x; then
32939    # Short path failed, file does not exist as specified.
32940    # Try adding .exe or .cmd
32941    if test -f "${new_path}.exe"; then
32942      input_to_shortpath="${new_path}.exe"
32943    elif test -f "${new_path}.cmd"; then
32944      input_to_shortpath="${new_path}.cmd"
32945    else
32946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32947$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32948      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32949$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32950      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32951    fi
32952  else
32953    input_to_shortpath="$new_path"
32954  fi
32955
32956  # Call helper function which possibly converts this using DOS-style short mode.
32957  # If so, the updated path is stored in $new_path.
32958  new_path="$input_to_shortpath"
32959
32960  input_path="$input_to_shortpath"
32961  # Check if we need to convert this using DOS-style short mode. If the path
32962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32963  # take no chances and rewrite it.
32964  # Note: m4 eats our [], so we need to use [ and ] instead.
32965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32966  if test "x$has_forbidden_chars" != x; then
32967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32971      # Going to short mode and back again did indeed matter. Since short mode is
32972      # case insensitive, let's make it lowercase to improve readability.
32973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32974      # Now convert it back to Unix-stile (cygpath)
32975      input_path=`$CYGPATH -u "$shortmode_path"`
32976      new_path="$input_path"
32977    fi
32978  fi
32979
32980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32981  if test "x$test_cygdrive_prefix" = x; then
32982    # As a simple fix, exclude /usr/bin since it's not a real path.
32983    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32985      # a path prefixed by /cygdrive for fixpath to work.
32986      new_path="$CYGWIN_ROOT_PATH$input_path"
32987    fi
32988  fi
32989
32990  # remove trailing .exe if any
32991  new_path="${new_path/%.exe/}"
32992
32993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32994
32995  # First separate the path from the arguments. This will split at the first
32996  # space.
32997  complete="$AR"
32998  path="${complete%% *}"
32999  tmp="$complete EOL"
33000  arguments="${tmp#* }"
33001
33002  # Input might be given as Windows format, start by converting to
33003  # unix format.
33004  new_path="$path"
33005
33006  windows_path="$new_path"
33007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33008    unix_path=`$CYGPATH -u "$windows_path"`
33009    new_path="$unix_path"
33010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33012    new_path="$unix_path"
33013  fi
33014
33015
33016  # Now try to locate executable using which
33017  new_path=`$WHICH "$new_path" 2> /dev/null`
33018
33019  if test "x$new_path" = x; then
33020    # Oops. Which didn't find the executable.
33021    # The splitting of arguments from the executable at a space might have been incorrect,
33022    # since paths with space are more likely in Windows. Give it another try with the whole
33023    # argument.
33024    path="$complete"
33025    arguments="EOL"
33026    new_path="$path"
33027
33028  windows_path="$new_path"
33029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33030    unix_path=`$CYGPATH -u "$windows_path"`
33031    new_path="$unix_path"
33032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33034    new_path="$unix_path"
33035  fi
33036
33037
33038    new_path=`$WHICH "$new_path" 2> /dev/null`
33039    # bat and cmd files are not always considered executable in MSYS causing which
33040    # to not find them
33041    if test "x$new_path" = x \
33042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33044      new_path="$path"
33045
33046  windows_path="$new_path"
33047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33048    unix_path=`$CYGPATH -u "$windows_path"`
33049    new_path="$unix_path"
33050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33052    new_path="$unix_path"
33053  fi
33054
33055    fi
33056
33057    if test "x$new_path" = x; then
33058      # It's still not found. Now this is an unrecoverable error.
33059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33060$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33061      has_space=`$ECHO "$complete" | $GREP " "`
33062      if test "x$has_space" != x; then
33063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33065      fi
33066      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33067    fi
33068  fi
33069
33070  # Now new_path has a complete unix path to the binary
33071  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33072    # Keep paths in /bin as-is, but remove trailing .exe if any
33073    new_path="${new_path/%.exe/}"
33074    # Do not save /bin paths to all_fixpath_prefixes!
33075  else
33076    # Not in mixed or Windows style, start by that.
33077    new_path=`cmd //c echo $new_path`
33078
33079  input_path="$new_path"
33080  # Check if we need to convert this using DOS-style short mode. If the path
33081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33082  # take no chances and rewrite it.
33083  # Note: m4 eats our [], so we need to use [ and ] instead.
33084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33085  if test "x$has_forbidden_chars" != x; then
33086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33088  fi
33089
33090    # Output is in $new_path
33091
33092  windows_path="$new_path"
33093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33094    unix_path=`$CYGPATH -u "$windows_path"`
33095    new_path="$unix_path"
33096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33098    new_path="$unix_path"
33099  fi
33100
33101    # remove trailing .exe if any
33102    new_path="${new_path/%.exe/}"
33103
33104    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33105    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33106  fi
33107
33108  else
33109    # We're on a posix platform. Hooray! :)
33110    # First separate the path from the arguments. This will split at the first
33111    # space.
33112    complete="$AR"
33113    path="${complete%% *}"
33114    tmp="$complete EOL"
33115    arguments="${tmp#* }"
33116
33117    # Cannot rely on the command "which" here since it doesn't always work.
33118    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33119    if test -z "$is_absolute_path"; then
33120      # Path to executable is not absolute. Find it.
33121      IFS_save="$IFS"
33122      IFS=:
33123      for p in $PATH; do
33124        if test -f "$p/$path" && test -x "$p/$path"; then
33125          new_path="$p/$path"
33126          break
33127        fi
33128      done
33129      IFS="$IFS_save"
33130    else
33131      # This is an absolute path, we can use it without further modifications.
33132      new_path="$path"
33133    fi
33134
33135    if test "x$new_path" = x; then
33136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33137$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33138      has_space=`$ECHO "$complete" | $GREP " "`
33139      if test "x$has_space" != x; then
33140        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33141$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33142      fi
33143      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33144    fi
33145  fi
33146
33147  # Now join together the path and the arguments once again
33148  if test "x$arguments" != xEOL; then
33149    new_complete="$new_path ${arguments% *}"
33150  else
33151    new_complete="$new_path"
33152  fi
33153
33154  if test "x$complete" != "x$new_complete"; then
33155    AR="$new_complete"
33156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33157$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33158  fi
33159
33160
33161
33162  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33163    ac_ext=m
33164ac_cpp='$OBJCPP $CPPFLAGS'
33165ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33166ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33167ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33168if test -n "$ac_tool_prefix"; then
33169  for ac_prog in gcc objcc objc cc CC
33170  do
33171    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33174$as_echo_n "checking for $ac_word... " >&6; }
33175if ${ac_cv_prog_OBJC+:} false; then :
33176  $as_echo_n "(cached) " >&6
33177else
33178  if test -n "$OBJC"; then
33179  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33180else
33181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33182for as_dir in $PATH
33183do
33184  IFS=$as_save_IFS
33185  test -z "$as_dir" && as_dir=.
33186    for ac_exec_ext in '' $ac_executable_extensions; do
33187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33188    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33190    break 2
33191  fi
33192done
33193  done
33194IFS=$as_save_IFS
33195
33196fi
33197fi
33198OBJC=$ac_cv_prog_OBJC
33199if test -n "$OBJC"; then
33200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33201$as_echo "$OBJC" >&6; }
33202else
33203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33204$as_echo "no" >&6; }
33205fi
33206
33207
33208    test -n "$OBJC" && break
33209  done
33210fi
33211if test -z "$OBJC"; then
33212  ac_ct_OBJC=$OBJC
33213  for ac_prog in gcc objcc objc cc CC
33214do
33215  # Extract the first word of "$ac_prog", so it can be a program name with args.
33216set dummy $ac_prog; ac_word=$2
33217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33218$as_echo_n "checking for $ac_word... " >&6; }
33219if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33220  $as_echo_n "(cached) " >&6
33221else
33222  if test -n "$ac_ct_OBJC"; then
33223  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33224else
33225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33226for as_dir in $PATH
33227do
33228  IFS=$as_save_IFS
33229  test -z "$as_dir" && as_dir=.
33230    for ac_exec_ext in '' $ac_executable_extensions; do
33231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33232    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33234    break 2
33235  fi
33236done
33237  done
33238IFS=$as_save_IFS
33239
33240fi
33241fi
33242ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33243if test -n "$ac_ct_OBJC"; then
33244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33245$as_echo "$ac_ct_OBJC" >&6; }
33246else
33247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33248$as_echo "no" >&6; }
33249fi
33250
33251
33252  test -n "$ac_ct_OBJC" && break
33253done
33254
33255  if test "x$ac_ct_OBJC" = x; then
33256    OBJC="gcc"
33257  else
33258    case $cross_compiling:$ac_tool_warned in
33259yes:)
33260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33262ac_tool_warned=yes ;;
33263esac
33264    OBJC=$ac_ct_OBJC
33265  fi
33266fi
33267
33268# Provide some information about the compiler.
33269$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33270set X $ac_compile
33271ac_compiler=$2
33272for ac_option in --version -v -V -qversion; do
33273  { { ac_try="$ac_compiler $ac_option >&5"
33274case "(($ac_try" in
33275  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33276  *) ac_try_echo=$ac_try;;
33277esac
33278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33279$as_echo "$ac_try_echo"; } >&5
33280  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33281  ac_status=$?
33282  if test -s conftest.err; then
33283    sed '10a\
33284... rest of stderr output deleted ...
33285         10q' conftest.err >conftest.er1
33286    cat conftest.er1 >&5
33287  fi
33288  rm -f conftest.er1 conftest.err
33289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33290  test $ac_status = 0; }
33291done
33292
33293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33294$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33295if ${ac_cv_objc_compiler_gnu+:} false; then :
33296  $as_echo_n "(cached) " >&6
33297else
33298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33299/* end confdefs.h.  */
33300
33301int
33302main ()
33303{
33304#ifndef __GNUC__
33305       choke me
33306#endif
33307
33308  ;
33309  return 0;
33310}
33311_ACEOF
33312if ac_fn_objc_try_compile "$LINENO"; then :
33313  ac_compiler_gnu=yes
33314else
33315  ac_compiler_gnu=no
33316fi
33317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33318ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33319
33320fi
33321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33322$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33323if test $ac_compiler_gnu = yes; then
33324  GOBJC=yes
33325else
33326  GOBJC=
33327fi
33328ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33329ac_save_OBJCFLAGS=$OBJCFLAGS
33330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33331$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33332if ${ac_cv_prog_objc_g+:} false; then :
33333  $as_echo_n "(cached) " >&6
33334else
33335  ac_save_objc_werror_flag=$ac_objc_werror_flag
33336   ac_objc_werror_flag=yes
33337   ac_cv_prog_objc_g=no
33338   OBJCFLAGS="-g"
33339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33340/* end confdefs.h.  */
33341
33342int
33343main ()
33344{
33345
33346  ;
33347  return 0;
33348}
33349_ACEOF
33350if ac_fn_objc_try_compile "$LINENO"; then :
33351  ac_cv_prog_objc_g=yes
33352else
33353  OBJCFLAGS=""
33354      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33355/* end confdefs.h.  */
33356
33357int
33358main ()
33359{
33360
33361  ;
33362  return 0;
33363}
33364_ACEOF
33365if ac_fn_objc_try_compile "$LINENO"; then :
33366
33367else
33368  ac_objc_werror_flag=$ac_save_objc_werror_flag
33369	 OBJCFLAGS="-g"
33370	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33371/* end confdefs.h.  */
33372
33373int
33374main ()
33375{
33376
33377  ;
33378  return 0;
33379}
33380_ACEOF
33381if ac_fn_objc_try_compile "$LINENO"; then :
33382  ac_cv_prog_objc_g=yes
33383fi
33384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33385fi
33386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33387fi
33388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33389   ac_objc_werror_flag=$ac_save_objc_werror_flag
33390fi
33391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33392$as_echo "$ac_cv_prog_objc_g" >&6; }
33393if test "$ac_test_OBJCFLAGS" = set; then
33394  OBJCFLAGS=$ac_save_OBJCFLAGS
33395elif test $ac_cv_prog_objc_g = yes; then
33396  if test "$GOBJC" = yes; then
33397    OBJCFLAGS="-g -O2"
33398  else
33399    OBJCFLAGS="-g"
33400  fi
33401else
33402  if test "$GOBJC" = yes; then
33403    OBJCFLAGS="-O2"
33404  else
33405    OBJCFLAGS=
33406  fi
33407fi
33408ac_ext=cpp
33409ac_cpp='$CXXCPP $CPPFLAGS'
33410ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33411ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33412ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33413
33414
33415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33416
33417  # First separate the path from the arguments. This will split at the first
33418  # space.
33419  complete="$OBJC"
33420  path="${complete%% *}"
33421  tmp="$complete EOL"
33422  arguments="${tmp#* }"
33423
33424  # Input might be given as Windows format, start by converting to
33425  # unix format.
33426  new_path=`$CYGPATH -u "$path"`
33427
33428  # Now try to locate executable using which
33429  new_path=`$WHICH "$new_path" 2> /dev/null`
33430  # bat and cmd files are not always considered executable in cygwin causing which
33431  # to not find them
33432  if test "x$new_path" = x \
33433      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33434      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33435    new_path=`$CYGPATH -u "$path"`
33436  fi
33437  if test "x$new_path" = x; then
33438    # Oops. Which didn't find the executable.
33439    # The splitting of arguments from the executable at a space might have been incorrect,
33440    # since paths with space are more likely in Windows. Give it another try with the whole
33441    # argument.
33442    path="$complete"
33443    arguments="EOL"
33444    new_path=`$CYGPATH -u "$path"`
33445    new_path=`$WHICH "$new_path" 2> /dev/null`
33446    # bat and cmd files are not always considered executable in cygwin causing which
33447    # to not find them
33448    if test "x$new_path" = x \
33449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33451      new_path=`$CYGPATH -u "$path"`
33452    fi
33453    if test "x$new_path" = x; then
33454      # It's still not found. Now this is an unrecoverable error.
33455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33456$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33457      has_space=`$ECHO "$complete" | $GREP " "`
33458      if test "x$has_space" != x; then
33459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33461      fi
33462      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33463    fi
33464  fi
33465
33466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33469  # "foo.exe" is OK but "foo" is an error.
33470  #
33471  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33472  # It is also a way to make sure we got the proper file name for the real test later on.
33473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33474  if test "x$test_shortpath" = x; then
33475    # Short path failed, file does not exist as specified.
33476    # Try adding .exe or .cmd
33477    if test -f "${new_path}.exe"; then
33478      input_to_shortpath="${new_path}.exe"
33479    elif test -f "${new_path}.cmd"; then
33480      input_to_shortpath="${new_path}.cmd"
33481    else
33482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33483$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33484      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33485$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33486      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33487    fi
33488  else
33489    input_to_shortpath="$new_path"
33490  fi
33491
33492  # Call helper function which possibly converts this using DOS-style short mode.
33493  # If so, the updated path is stored in $new_path.
33494  new_path="$input_to_shortpath"
33495
33496  input_path="$input_to_shortpath"
33497  # Check if we need to convert this using DOS-style short mode. If the path
33498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33499  # take no chances and rewrite it.
33500  # Note: m4 eats our [], so we need to use [ and ] instead.
33501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33502  if test "x$has_forbidden_chars" != x; then
33503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33507      # Going to short mode and back again did indeed matter. Since short mode is
33508      # case insensitive, let's make it lowercase to improve readability.
33509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33510      # Now convert it back to Unix-stile (cygpath)
33511      input_path=`$CYGPATH -u "$shortmode_path"`
33512      new_path="$input_path"
33513    fi
33514  fi
33515
33516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33517  if test "x$test_cygdrive_prefix" = x; then
33518    # As a simple fix, exclude /usr/bin since it's not a real path.
33519    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33521      # a path prefixed by /cygdrive for fixpath to work.
33522      new_path="$CYGWIN_ROOT_PATH$input_path"
33523    fi
33524  fi
33525
33526  # remove trailing .exe if any
33527  new_path="${new_path/%.exe/}"
33528
33529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33530
33531  # First separate the path from the arguments. This will split at the first
33532  # space.
33533  complete="$OBJC"
33534  path="${complete%% *}"
33535  tmp="$complete EOL"
33536  arguments="${tmp#* }"
33537
33538  # Input might be given as Windows format, start by converting to
33539  # unix format.
33540  new_path="$path"
33541
33542  windows_path="$new_path"
33543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33544    unix_path=`$CYGPATH -u "$windows_path"`
33545    new_path="$unix_path"
33546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33548    new_path="$unix_path"
33549  fi
33550
33551
33552  # Now try to locate executable using which
33553  new_path=`$WHICH "$new_path" 2> /dev/null`
33554
33555  if test "x$new_path" = x; then
33556    # Oops. Which didn't find the executable.
33557    # The splitting of arguments from the executable at a space might have been incorrect,
33558    # since paths with space are more likely in Windows. Give it another try with the whole
33559    # argument.
33560    path="$complete"
33561    arguments="EOL"
33562    new_path="$path"
33563
33564  windows_path="$new_path"
33565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33566    unix_path=`$CYGPATH -u "$windows_path"`
33567    new_path="$unix_path"
33568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33570    new_path="$unix_path"
33571  fi
33572
33573
33574    new_path=`$WHICH "$new_path" 2> /dev/null`
33575    # bat and cmd files are not always considered executable in MSYS causing which
33576    # to not find them
33577    if test "x$new_path" = x \
33578        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33579        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33580      new_path="$path"
33581
33582  windows_path="$new_path"
33583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33584    unix_path=`$CYGPATH -u "$windows_path"`
33585    new_path="$unix_path"
33586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33588    new_path="$unix_path"
33589  fi
33590
33591    fi
33592
33593    if test "x$new_path" = x; then
33594      # It's still not found. Now this is an unrecoverable error.
33595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33596$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33597      has_space=`$ECHO "$complete" | $GREP " "`
33598      if test "x$has_space" != x; then
33599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33601      fi
33602      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33603    fi
33604  fi
33605
33606  # Now new_path has a complete unix path to the binary
33607  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33608    # Keep paths in /bin as-is, but remove trailing .exe if any
33609    new_path="${new_path/%.exe/}"
33610    # Do not save /bin paths to all_fixpath_prefixes!
33611  else
33612    # Not in mixed or Windows style, start by that.
33613    new_path=`cmd //c echo $new_path`
33614
33615  input_path="$new_path"
33616  # Check if we need to convert this using DOS-style short mode. If the path
33617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33618  # take no chances and rewrite it.
33619  # Note: m4 eats our [], so we need to use [ and ] instead.
33620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33621  if test "x$has_forbidden_chars" != x; then
33622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33624  fi
33625
33626    # Output is in $new_path
33627
33628  windows_path="$new_path"
33629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33630    unix_path=`$CYGPATH -u "$windows_path"`
33631    new_path="$unix_path"
33632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33634    new_path="$unix_path"
33635  fi
33636
33637    # remove trailing .exe if any
33638    new_path="${new_path/%.exe/}"
33639
33640    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33641    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33642  fi
33643
33644  else
33645    # We're on a posix platform. Hooray! :)
33646    # First separate the path from the arguments. This will split at the first
33647    # space.
33648    complete="$OBJC"
33649    path="${complete%% *}"
33650    tmp="$complete EOL"
33651    arguments="${tmp#* }"
33652
33653    # Cannot rely on the command "which" here since it doesn't always work.
33654    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33655    if test -z "$is_absolute_path"; then
33656      # Path to executable is not absolute. Find it.
33657      IFS_save="$IFS"
33658      IFS=:
33659      for p in $PATH; do
33660        if test -f "$p/$path" && test -x "$p/$path"; then
33661          new_path="$p/$path"
33662          break
33663        fi
33664      done
33665      IFS="$IFS_save"
33666    else
33667      # This is an absolute path, we can use it without further modifications.
33668      new_path="$path"
33669    fi
33670
33671    if test "x$new_path" = x; then
33672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33673$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33674      has_space=`$ECHO "$complete" | $GREP " "`
33675      if test "x$has_space" != x; then
33676        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33677$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33678      fi
33679      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33680    fi
33681  fi
33682
33683  # Now join together the path and the arguments once again
33684  if test "x$arguments" != xEOL; then
33685    new_complete="$new_path ${arguments% *}"
33686  else
33687    new_complete="$new_path"
33688  fi
33689
33690  if test "x$complete" != "x$new_complete"; then
33691    OBJC="$new_complete"
33692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33693$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33694  fi
33695
33696
33697
33698  # Publish this variable in the help.
33699
33700
33701  if test "x$LIPO" = x; then
33702    # The variable is not set by user, try to locate tool using the code snippet
33703    for ac_prog in lipo
33704do
33705  # Extract the first word of "$ac_prog", so it can be a program name with args.
33706set dummy $ac_prog; ac_word=$2
33707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33708$as_echo_n "checking for $ac_word... " >&6; }
33709if ${ac_cv_path_LIPO+:} false; then :
33710  $as_echo_n "(cached) " >&6
33711else
33712  case $LIPO in
33713  [\\/]* | ?:[\\/]*)
33714  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33715  ;;
33716  *)
33717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33718for as_dir in $PATH
33719do
33720  IFS=$as_save_IFS
33721  test -z "$as_dir" && as_dir=.
33722    for ac_exec_ext in '' $ac_executable_extensions; do
33723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33724    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33726    break 2
33727  fi
33728done
33729  done
33730IFS=$as_save_IFS
33731
33732  ;;
33733esac
33734fi
33735LIPO=$ac_cv_path_LIPO
33736if test -n "$LIPO"; then
33737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33738$as_echo "$LIPO" >&6; }
33739else
33740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33741$as_echo "no" >&6; }
33742fi
33743
33744
33745  test -n "$LIPO" && break
33746done
33747
33748  else
33749    # The variable is set, but is it from the command line or the environment?
33750
33751    # Try to remove the string !LIPO! from our list.
33752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33754      # If it failed, the variable was not from the command line. Ignore it,
33755      # but warn the user (except for BASH, which is always set by the calling BASH).
33756      if test "xLIPO" != xBASH; then
33757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33758$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33759      fi
33760      # Try to locate tool using the code snippet
33761      for ac_prog in lipo
33762do
33763  # Extract the first word of "$ac_prog", so it can be a program name with args.
33764set dummy $ac_prog; ac_word=$2
33765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33766$as_echo_n "checking for $ac_word... " >&6; }
33767if ${ac_cv_path_LIPO+:} false; then :
33768  $as_echo_n "(cached) " >&6
33769else
33770  case $LIPO in
33771  [\\/]* | ?:[\\/]*)
33772  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33773  ;;
33774  *)
33775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33776for as_dir in $PATH
33777do
33778  IFS=$as_save_IFS
33779  test -z "$as_dir" && as_dir=.
33780    for ac_exec_ext in '' $ac_executable_extensions; do
33781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33782    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33784    break 2
33785  fi
33786done
33787  done
33788IFS=$as_save_IFS
33789
33790  ;;
33791esac
33792fi
33793LIPO=$ac_cv_path_LIPO
33794if test -n "$LIPO"; then
33795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33796$as_echo "$LIPO" >&6; }
33797else
33798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33799$as_echo "no" >&6; }
33800fi
33801
33802
33803  test -n "$LIPO" && break
33804done
33805
33806    else
33807      # If it succeeded, then it was overridden by the user. We will use it
33808      # for the tool.
33809
33810      # First remove it from the list of overridden variables, so we can test
33811      # for unknown variables in the end.
33812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33813
33814      # Check if the provided tool contains a complete path.
33815      tool_specified="$LIPO"
33816      tool_basename="${tool_specified##*/}"
33817      if test "x$tool_basename" = "x$tool_specified"; then
33818        # A command without a complete path is provided, search $PATH.
33819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33820$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33821        # Extract the first word of "$tool_basename", so it can be a program name with args.
33822set dummy $tool_basename; ac_word=$2
33823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33824$as_echo_n "checking for $ac_word... " >&6; }
33825if ${ac_cv_path_LIPO+:} false; then :
33826  $as_echo_n "(cached) " >&6
33827else
33828  case $LIPO in
33829  [\\/]* | ?:[\\/]*)
33830  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33831  ;;
33832  *)
33833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33834for as_dir in $PATH
33835do
33836  IFS=$as_save_IFS
33837  test -z "$as_dir" && as_dir=.
33838    for ac_exec_ext in '' $ac_executable_extensions; do
33839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33840    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33842    break 2
33843  fi
33844done
33845  done
33846IFS=$as_save_IFS
33847
33848  ;;
33849esac
33850fi
33851LIPO=$ac_cv_path_LIPO
33852if test -n "$LIPO"; then
33853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33854$as_echo "$LIPO" >&6; }
33855else
33856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33857$as_echo "no" >&6; }
33858fi
33859
33860
33861        if test "x$LIPO" = x; then
33862          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33863        fi
33864      else
33865        # Otherwise we believe it is a complete path. Use it as it is.
33866        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33867$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33869$as_echo_n "checking for LIPO... " >&6; }
33870        if test ! -x "$tool_specified"; then
33871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33872$as_echo "not found" >&6; }
33873          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33874        fi
33875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33876$as_echo "$tool_specified" >&6; }
33877      fi
33878    fi
33879  fi
33880
33881
33882
33883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33884
33885  # First separate the path from the arguments. This will split at the first
33886  # space.
33887  complete="$LIPO"
33888  path="${complete%% *}"
33889  tmp="$complete EOL"
33890  arguments="${tmp#* }"
33891
33892  # Input might be given as Windows format, start by converting to
33893  # unix format.
33894  new_path=`$CYGPATH -u "$path"`
33895
33896  # Now try to locate executable using which
33897  new_path=`$WHICH "$new_path" 2> /dev/null`
33898  # bat and cmd files are not always considered executable in cygwin causing which
33899  # to not find them
33900  if test "x$new_path" = x \
33901      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33902      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33903    new_path=`$CYGPATH -u "$path"`
33904  fi
33905  if test "x$new_path" = x; then
33906    # Oops. Which didn't find the executable.
33907    # The splitting of arguments from the executable at a space might have been incorrect,
33908    # since paths with space are more likely in Windows. Give it another try with the whole
33909    # argument.
33910    path="$complete"
33911    arguments="EOL"
33912    new_path=`$CYGPATH -u "$path"`
33913    new_path=`$WHICH "$new_path" 2> /dev/null`
33914    # bat and cmd files are not always considered executable in cygwin causing which
33915    # to not find them
33916    if test "x$new_path" = x \
33917        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33918        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33919      new_path=`$CYGPATH -u "$path"`
33920    fi
33921    if test "x$new_path" = x; then
33922      # It's still not found. Now this is an unrecoverable error.
33923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33924$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33925      has_space=`$ECHO "$complete" | $GREP " "`
33926      if test "x$has_space" != x; then
33927        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33928$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33929      fi
33930      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33931    fi
33932  fi
33933
33934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33937  # "foo.exe" is OK but "foo" is an error.
33938  #
33939  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33940  # It is also a way to make sure we got the proper file name for the real test later on.
33941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33942  if test "x$test_shortpath" = x; then
33943    # Short path failed, file does not exist as specified.
33944    # Try adding .exe or .cmd
33945    if test -f "${new_path}.exe"; then
33946      input_to_shortpath="${new_path}.exe"
33947    elif test -f "${new_path}.cmd"; then
33948      input_to_shortpath="${new_path}.cmd"
33949    else
33950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33951$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33952      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33953$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33954      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33955    fi
33956  else
33957    input_to_shortpath="$new_path"
33958  fi
33959
33960  # Call helper function which possibly converts this using DOS-style short mode.
33961  # If so, the updated path is stored in $new_path.
33962  new_path="$input_to_shortpath"
33963
33964  input_path="$input_to_shortpath"
33965  # Check if we need to convert this using DOS-style short mode. If the path
33966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33967  # take no chances and rewrite it.
33968  # Note: m4 eats our [], so we need to use [ and ] instead.
33969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33970  if test "x$has_forbidden_chars" != x; then
33971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33975      # Going to short mode and back again did indeed matter. Since short mode is
33976      # case insensitive, let's make it lowercase to improve readability.
33977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33978      # Now convert it back to Unix-stile (cygpath)
33979      input_path=`$CYGPATH -u "$shortmode_path"`
33980      new_path="$input_path"
33981    fi
33982  fi
33983
33984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33985  if test "x$test_cygdrive_prefix" = x; then
33986    # As a simple fix, exclude /usr/bin since it's not a real path.
33987    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33989      # a path prefixed by /cygdrive for fixpath to work.
33990      new_path="$CYGWIN_ROOT_PATH$input_path"
33991    fi
33992  fi
33993
33994  # remove trailing .exe if any
33995  new_path="${new_path/%.exe/}"
33996
33997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33998
33999  # First separate the path from the arguments. This will split at the first
34000  # space.
34001  complete="$LIPO"
34002  path="${complete%% *}"
34003  tmp="$complete EOL"
34004  arguments="${tmp#* }"
34005
34006  # Input might be given as Windows format, start by converting to
34007  # unix format.
34008  new_path="$path"
34009
34010  windows_path="$new_path"
34011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34012    unix_path=`$CYGPATH -u "$windows_path"`
34013    new_path="$unix_path"
34014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34016    new_path="$unix_path"
34017  fi
34018
34019
34020  # Now try to locate executable using which
34021  new_path=`$WHICH "$new_path" 2> /dev/null`
34022
34023  if test "x$new_path" = x; then
34024    # Oops. Which didn't find the executable.
34025    # The splitting of arguments from the executable at a space might have been incorrect,
34026    # since paths with space are more likely in Windows. Give it another try with the whole
34027    # argument.
34028    path="$complete"
34029    arguments="EOL"
34030    new_path="$path"
34031
34032  windows_path="$new_path"
34033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34034    unix_path=`$CYGPATH -u "$windows_path"`
34035    new_path="$unix_path"
34036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34038    new_path="$unix_path"
34039  fi
34040
34041
34042    new_path=`$WHICH "$new_path" 2> /dev/null`
34043    # bat and cmd files are not always considered executable in MSYS causing which
34044    # to not find them
34045    if test "x$new_path" = x \
34046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34048      new_path="$path"
34049
34050  windows_path="$new_path"
34051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34052    unix_path=`$CYGPATH -u "$windows_path"`
34053    new_path="$unix_path"
34054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34056    new_path="$unix_path"
34057  fi
34058
34059    fi
34060
34061    if test "x$new_path" = x; then
34062      # It's still not found. Now this is an unrecoverable error.
34063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34064$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34065      has_space=`$ECHO "$complete" | $GREP " "`
34066      if test "x$has_space" != x; then
34067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34069      fi
34070      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34071    fi
34072  fi
34073
34074  # Now new_path has a complete unix path to the binary
34075  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34076    # Keep paths in /bin as-is, but remove trailing .exe if any
34077    new_path="${new_path/%.exe/}"
34078    # Do not save /bin paths to all_fixpath_prefixes!
34079  else
34080    # Not in mixed or Windows style, start by that.
34081    new_path=`cmd //c echo $new_path`
34082
34083  input_path="$new_path"
34084  # Check if we need to convert this using DOS-style short mode. If the path
34085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34086  # take no chances and rewrite it.
34087  # Note: m4 eats our [], so we need to use [ and ] instead.
34088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34089  if test "x$has_forbidden_chars" != x; then
34090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34092  fi
34093
34094    # Output is in $new_path
34095
34096  windows_path="$new_path"
34097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34098    unix_path=`$CYGPATH -u "$windows_path"`
34099    new_path="$unix_path"
34100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34102    new_path="$unix_path"
34103  fi
34104
34105    # remove trailing .exe if any
34106    new_path="${new_path/%.exe/}"
34107
34108    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34109    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34110  fi
34111
34112  else
34113    # We're on a posix platform. Hooray! :)
34114    # First separate the path from the arguments. This will split at the first
34115    # space.
34116    complete="$LIPO"
34117    path="${complete%% *}"
34118    tmp="$complete EOL"
34119    arguments="${tmp#* }"
34120
34121    # Cannot rely on the command "which" here since it doesn't always work.
34122    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34123    if test -z "$is_absolute_path"; then
34124      # Path to executable is not absolute. Find it.
34125      IFS_save="$IFS"
34126      IFS=:
34127      for p in $PATH; do
34128        if test -f "$p/$path" && test -x "$p/$path"; then
34129          new_path="$p/$path"
34130          break
34131        fi
34132      done
34133      IFS="$IFS_save"
34134    else
34135      # This is an absolute path, we can use it without further modifications.
34136      new_path="$path"
34137    fi
34138
34139    if test "x$new_path" = x; then
34140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34141$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34142      has_space=`$ECHO "$complete" | $GREP " "`
34143      if test "x$has_space" != x; then
34144        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34145$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34146      fi
34147      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34148    fi
34149  fi
34150
34151  # Now join together the path and the arguments once again
34152  if test "x$arguments" != xEOL; then
34153    new_complete="$new_path ${arguments% *}"
34154  else
34155    new_complete="$new_path"
34156  fi
34157
34158  if test "x$complete" != "x$new_complete"; then
34159    LIPO="$new_complete"
34160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34161$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34162  fi
34163
34164  else
34165    OBJC=
34166  fi
34167
34168  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34169    # Extract the first word of "mt", so it can be a program name with args.
34170set dummy mt; ac_word=$2
34171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34172$as_echo_n "checking for $ac_word... " >&6; }
34173if ${ac_cv_prog_MT+:} false; then :
34174  $as_echo_n "(cached) " >&6
34175else
34176  if test -n "$MT"; then
34177  ac_cv_prog_MT="$MT" # Let the user override the test.
34178else
34179  ac_prog_rejected=no
34180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34181for as_dir in $PATH
34182do
34183  IFS=$as_save_IFS
34184  test -z "$as_dir" && as_dir=.
34185    for ac_exec_ext in '' $ac_executable_extensions; do
34186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34187    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34188       ac_prog_rejected=yes
34189       continue
34190     fi
34191    ac_cv_prog_MT="mt"
34192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34193    break 2
34194  fi
34195done
34196  done
34197IFS=$as_save_IFS
34198
34199if test $ac_prog_rejected = yes; then
34200  # We found a bogon in the path, so make sure we never use it.
34201  set dummy $ac_cv_prog_MT
34202  shift
34203  if test $# != 0; then
34204    # We chose a different compiler from the bogus one.
34205    # However, it has the same basename, so the bogon will be chosen
34206    # first if we set MT to just the basename; use the full file name.
34207    shift
34208    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34209  fi
34210fi
34211fi
34212fi
34213MT=$ac_cv_prog_MT
34214if test -n "$MT"; then
34215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34216$as_echo "$MT" >&6; }
34217else
34218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34219$as_echo "no" >&6; }
34220fi
34221
34222
34223
34224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34225
34226  # First separate the path from the arguments. This will split at the first
34227  # space.
34228  complete="$MT"
34229  path="${complete%% *}"
34230  tmp="$complete EOL"
34231  arguments="${tmp#* }"
34232
34233  # Input might be given as Windows format, start by converting to
34234  # unix format.
34235  new_path=`$CYGPATH -u "$path"`
34236
34237  # Now try to locate executable using which
34238  new_path=`$WHICH "$new_path" 2> /dev/null`
34239  # bat and cmd files are not always considered executable in cygwin causing which
34240  # to not find them
34241  if test "x$new_path" = x \
34242      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34243      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34244    new_path=`$CYGPATH -u "$path"`
34245  fi
34246  if test "x$new_path" = x; then
34247    # Oops. Which didn't find the executable.
34248    # The splitting of arguments from the executable at a space might have been incorrect,
34249    # since paths with space are more likely in Windows. Give it another try with the whole
34250    # argument.
34251    path="$complete"
34252    arguments="EOL"
34253    new_path=`$CYGPATH -u "$path"`
34254    new_path=`$WHICH "$new_path" 2> /dev/null`
34255    # bat and cmd files are not always considered executable in cygwin causing which
34256    # to not find them
34257    if test "x$new_path" = x \
34258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34260      new_path=`$CYGPATH -u "$path"`
34261    fi
34262    if test "x$new_path" = x; then
34263      # It's still not found. Now this is an unrecoverable error.
34264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34265$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34266      has_space=`$ECHO "$complete" | $GREP " "`
34267      if test "x$has_space" != x; then
34268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34270      fi
34271      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34272    fi
34273  fi
34274
34275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34278  # "foo.exe" is OK but "foo" is an error.
34279  #
34280  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34281  # It is also a way to make sure we got the proper file name for the real test later on.
34282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34283  if test "x$test_shortpath" = x; then
34284    # Short path failed, file does not exist as specified.
34285    # Try adding .exe or .cmd
34286    if test -f "${new_path}.exe"; then
34287      input_to_shortpath="${new_path}.exe"
34288    elif test -f "${new_path}.cmd"; then
34289      input_to_shortpath="${new_path}.cmd"
34290    else
34291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34292$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34295      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34296    fi
34297  else
34298    input_to_shortpath="$new_path"
34299  fi
34300
34301  # Call helper function which possibly converts this using DOS-style short mode.
34302  # If so, the updated path is stored in $new_path.
34303  new_path="$input_to_shortpath"
34304
34305  input_path="$input_to_shortpath"
34306  # Check if we need to convert this using DOS-style short mode. If the path
34307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34308  # take no chances and rewrite it.
34309  # Note: m4 eats our [], so we need to use [ and ] instead.
34310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34311  if test "x$has_forbidden_chars" != x; then
34312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34316      # Going to short mode and back again did indeed matter. Since short mode is
34317      # case insensitive, let's make it lowercase to improve readability.
34318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34319      # Now convert it back to Unix-stile (cygpath)
34320      input_path=`$CYGPATH -u "$shortmode_path"`
34321      new_path="$input_path"
34322    fi
34323  fi
34324
34325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34326  if test "x$test_cygdrive_prefix" = x; then
34327    # As a simple fix, exclude /usr/bin since it's not a real path.
34328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34330      # a path prefixed by /cygdrive for fixpath to work.
34331      new_path="$CYGWIN_ROOT_PATH$input_path"
34332    fi
34333  fi
34334
34335  # remove trailing .exe if any
34336  new_path="${new_path/%.exe/}"
34337
34338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34339
34340  # First separate the path from the arguments. This will split at the first
34341  # space.
34342  complete="$MT"
34343  path="${complete%% *}"
34344  tmp="$complete EOL"
34345  arguments="${tmp#* }"
34346
34347  # Input might be given as Windows format, start by converting to
34348  # unix format.
34349  new_path="$path"
34350
34351  windows_path="$new_path"
34352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34353    unix_path=`$CYGPATH -u "$windows_path"`
34354    new_path="$unix_path"
34355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34357    new_path="$unix_path"
34358  fi
34359
34360
34361  # Now try to locate executable using which
34362  new_path=`$WHICH "$new_path" 2> /dev/null`
34363
34364  if test "x$new_path" = x; then
34365    # Oops. Which didn't find the executable.
34366    # The splitting of arguments from the executable at a space might have been incorrect,
34367    # since paths with space are more likely in Windows. Give it another try with the whole
34368    # argument.
34369    path="$complete"
34370    arguments="EOL"
34371    new_path="$path"
34372
34373  windows_path="$new_path"
34374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34375    unix_path=`$CYGPATH -u "$windows_path"`
34376    new_path="$unix_path"
34377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34379    new_path="$unix_path"
34380  fi
34381
34382
34383    new_path=`$WHICH "$new_path" 2> /dev/null`
34384    # bat and cmd files are not always considered executable in MSYS causing which
34385    # to not find them
34386    if test "x$new_path" = x \
34387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34389      new_path="$path"
34390
34391  windows_path="$new_path"
34392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34393    unix_path=`$CYGPATH -u "$windows_path"`
34394    new_path="$unix_path"
34395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34397    new_path="$unix_path"
34398  fi
34399
34400    fi
34401
34402    if test "x$new_path" = x; then
34403      # It's still not found. Now this is an unrecoverable error.
34404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34405$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34406      has_space=`$ECHO "$complete" | $GREP " "`
34407      if test "x$has_space" != x; then
34408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34410      fi
34411      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34412    fi
34413  fi
34414
34415  # Now new_path has a complete unix path to the binary
34416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34417    # Keep paths in /bin as-is, but remove trailing .exe if any
34418    new_path="${new_path/%.exe/}"
34419    # Do not save /bin paths to all_fixpath_prefixes!
34420  else
34421    # Not in mixed or Windows style, start by that.
34422    new_path=`cmd //c echo $new_path`
34423
34424  input_path="$new_path"
34425  # Check if we need to convert this using DOS-style short mode. If the path
34426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34427  # take no chances and rewrite it.
34428  # Note: m4 eats our [], so we need to use [ and ] instead.
34429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34430  if test "x$has_forbidden_chars" != x; then
34431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34433  fi
34434
34435    # Output is in $new_path
34436
34437  windows_path="$new_path"
34438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34439    unix_path=`$CYGPATH -u "$windows_path"`
34440    new_path="$unix_path"
34441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34443    new_path="$unix_path"
34444  fi
34445
34446    # remove trailing .exe if any
34447    new_path="${new_path/%.exe/}"
34448
34449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34451  fi
34452
34453  else
34454    # We're on a posix platform. Hooray! :)
34455    # First separate the path from the arguments. This will split at the first
34456    # space.
34457    complete="$MT"
34458    path="${complete%% *}"
34459    tmp="$complete EOL"
34460    arguments="${tmp#* }"
34461
34462    # Cannot rely on the command "which" here since it doesn't always work.
34463    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34464    if test -z "$is_absolute_path"; then
34465      # Path to executable is not absolute. Find it.
34466      IFS_save="$IFS"
34467      IFS=:
34468      for p in $PATH; do
34469        if test -f "$p/$path" && test -x "$p/$path"; then
34470          new_path="$p/$path"
34471          break
34472        fi
34473      done
34474      IFS="$IFS_save"
34475    else
34476      # This is an absolute path, we can use it without further modifications.
34477      new_path="$path"
34478    fi
34479
34480    if test "x$new_path" = x; then
34481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34482$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34483      has_space=`$ECHO "$complete" | $GREP " "`
34484      if test "x$has_space" != x; then
34485        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34487      fi
34488      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34489    fi
34490  fi
34491
34492  # Now join together the path and the arguments once again
34493  if test "x$arguments" != xEOL; then
34494    new_complete="$new_path ${arguments% *}"
34495  else
34496    new_complete="$new_path"
34497  fi
34498
34499  if test "x$complete" != "x$new_complete"; then
34500    MT="$new_complete"
34501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34502$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34503  fi
34504
34505    # Setup the resource compiler (RC)
34506    # Extract the first word of "rc", so it can be a program name with args.
34507set dummy rc; ac_word=$2
34508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34509$as_echo_n "checking for $ac_word... " >&6; }
34510if ${ac_cv_prog_RC+:} false; then :
34511  $as_echo_n "(cached) " >&6
34512else
34513  if test -n "$RC"; then
34514  ac_cv_prog_RC="$RC" # Let the user override the test.
34515else
34516  ac_prog_rejected=no
34517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34518for as_dir in $PATH
34519do
34520  IFS=$as_save_IFS
34521  test -z "$as_dir" && as_dir=.
34522    for ac_exec_ext in '' $ac_executable_extensions; do
34523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34524    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34525       ac_prog_rejected=yes
34526       continue
34527     fi
34528    ac_cv_prog_RC="rc"
34529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34530    break 2
34531  fi
34532done
34533  done
34534IFS=$as_save_IFS
34535
34536if test $ac_prog_rejected = yes; then
34537  # We found a bogon in the path, so make sure we never use it.
34538  set dummy $ac_cv_prog_RC
34539  shift
34540  if test $# != 0; then
34541    # We chose a different compiler from the bogus one.
34542    # However, it has the same basename, so the bogon will be chosen
34543    # first if we set RC to just the basename; use the full file name.
34544    shift
34545    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34546  fi
34547fi
34548fi
34549fi
34550RC=$ac_cv_prog_RC
34551if test -n "$RC"; then
34552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34553$as_echo "$RC" >&6; }
34554else
34555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34556$as_echo "no" >&6; }
34557fi
34558
34559
34560
34561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34562
34563  # First separate the path from the arguments. This will split at the first
34564  # space.
34565  complete="$RC"
34566  path="${complete%% *}"
34567  tmp="$complete EOL"
34568  arguments="${tmp#* }"
34569
34570  # Input might be given as Windows format, start by converting to
34571  # unix format.
34572  new_path=`$CYGPATH -u "$path"`
34573
34574  # Now try to locate executable using which
34575  new_path=`$WHICH "$new_path" 2> /dev/null`
34576  # bat and cmd files are not always considered executable in cygwin causing which
34577  # to not find them
34578  if test "x$new_path" = x \
34579      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34580      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34581    new_path=`$CYGPATH -u "$path"`
34582  fi
34583  if test "x$new_path" = x; then
34584    # Oops. Which didn't find the executable.
34585    # The splitting of arguments from the executable at a space might have been incorrect,
34586    # since paths with space are more likely in Windows. Give it another try with the whole
34587    # argument.
34588    path="$complete"
34589    arguments="EOL"
34590    new_path=`$CYGPATH -u "$path"`
34591    new_path=`$WHICH "$new_path" 2> /dev/null`
34592    # bat and cmd files are not always considered executable in cygwin causing which
34593    # to not find them
34594    if test "x$new_path" = x \
34595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34597      new_path=`$CYGPATH -u "$path"`
34598    fi
34599    if test "x$new_path" = x; then
34600      # It's still not found. Now this is an unrecoverable error.
34601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34602$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34603      has_space=`$ECHO "$complete" | $GREP " "`
34604      if test "x$has_space" != x; then
34605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34607      fi
34608      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34609    fi
34610  fi
34611
34612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34615  # "foo.exe" is OK but "foo" is an error.
34616  #
34617  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34618  # It is also a way to make sure we got the proper file name for the real test later on.
34619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34620  if test "x$test_shortpath" = x; then
34621    # Short path failed, file does not exist as specified.
34622    # Try adding .exe or .cmd
34623    if test -f "${new_path}.exe"; then
34624      input_to_shortpath="${new_path}.exe"
34625    elif test -f "${new_path}.cmd"; then
34626      input_to_shortpath="${new_path}.cmd"
34627    else
34628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34629$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34630      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34632      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34633    fi
34634  else
34635    input_to_shortpath="$new_path"
34636  fi
34637
34638  # Call helper function which possibly converts this using DOS-style short mode.
34639  # If so, the updated path is stored in $new_path.
34640  new_path="$input_to_shortpath"
34641
34642  input_path="$input_to_shortpath"
34643  # Check if we need to convert this using DOS-style short mode. If the path
34644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34645  # take no chances and rewrite it.
34646  # Note: m4 eats our [], so we need to use [ and ] instead.
34647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34648  if test "x$has_forbidden_chars" != x; then
34649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34653      # Going to short mode and back again did indeed matter. Since short mode is
34654      # case insensitive, let's make it lowercase to improve readability.
34655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34656      # Now convert it back to Unix-stile (cygpath)
34657      input_path=`$CYGPATH -u "$shortmode_path"`
34658      new_path="$input_path"
34659    fi
34660  fi
34661
34662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34663  if test "x$test_cygdrive_prefix" = x; then
34664    # As a simple fix, exclude /usr/bin since it's not a real path.
34665    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34667      # a path prefixed by /cygdrive for fixpath to work.
34668      new_path="$CYGWIN_ROOT_PATH$input_path"
34669    fi
34670  fi
34671
34672  # remove trailing .exe if any
34673  new_path="${new_path/%.exe/}"
34674
34675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34676
34677  # First separate the path from the arguments. This will split at the first
34678  # space.
34679  complete="$RC"
34680  path="${complete%% *}"
34681  tmp="$complete EOL"
34682  arguments="${tmp#* }"
34683
34684  # Input might be given as Windows format, start by converting to
34685  # unix format.
34686  new_path="$path"
34687
34688  windows_path="$new_path"
34689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34690    unix_path=`$CYGPATH -u "$windows_path"`
34691    new_path="$unix_path"
34692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34694    new_path="$unix_path"
34695  fi
34696
34697
34698  # Now try to locate executable using which
34699  new_path=`$WHICH "$new_path" 2> /dev/null`
34700
34701  if test "x$new_path" = x; then
34702    # Oops. Which didn't find the executable.
34703    # The splitting of arguments from the executable at a space might have been incorrect,
34704    # since paths with space are more likely in Windows. Give it another try with the whole
34705    # argument.
34706    path="$complete"
34707    arguments="EOL"
34708    new_path="$path"
34709
34710  windows_path="$new_path"
34711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34712    unix_path=`$CYGPATH -u "$windows_path"`
34713    new_path="$unix_path"
34714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34716    new_path="$unix_path"
34717  fi
34718
34719
34720    new_path=`$WHICH "$new_path" 2> /dev/null`
34721    # bat and cmd files are not always considered executable in MSYS causing which
34722    # to not find them
34723    if test "x$new_path" = x \
34724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34726      new_path="$path"
34727
34728  windows_path="$new_path"
34729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34730    unix_path=`$CYGPATH -u "$windows_path"`
34731    new_path="$unix_path"
34732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34734    new_path="$unix_path"
34735  fi
34736
34737    fi
34738
34739    if test "x$new_path" = x; then
34740      # It's still not found. Now this is an unrecoverable error.
34741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34742$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34743      has_space=`$ECHO "$complete" | $GREP " "`
34744      if test "x$has_space" != x; then
34745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34747      fi
34748      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34749    fi
34750  fi
34751
34752  # Now new_path has a complete unix path to the binary
34753  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34754    # Keep paths in /bin as-is, but remove trailing .exe if any
34755    new_path="${new_path/%.exe/}"
34756    # Do not save /bin paths to all_fixpath_prefixes!
34757  else
34758    # Not in mixed or Windows style, start by that.
34759    new_path=`cmd //c echo $new_path`
34760
34761  input_path="$new_path"
34762  # Check if we need to convert this using DOS-style short mode. If the path
34763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34764  # take no chances and rewrite it.
34765  # Note: m4 eats our [], so we need to use [ and ] instead.
34766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34767  if test "x$has_forbidden_chars" != x; then
34768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34770  fi
34771
34772    # Output is in $new_path
34773
34774  windows_path="$new_path"
34775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34776    unix_path=`$CYGPATH -u "$windows_path"`
34777    new_path="$unix_path"
34778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34780    new_path="$unix_path"
34781  fi
34782
34783    # remove trailing .exe if any
34784    new_path="${new_path/%.exe/}"
34785
34786    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34787    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34788  fi
34789
34790  else
34791    # We're on a posix platform. Hooray! :)
34792    # First separate the path from the arguments. This will split at the first
34793    # space.
34794    complete="$RC"
34795    path="${complete%% *}"
34796    tmp="$complete EOL"
34797    arguments="${tmp#* }"
34798
34799    # Cannot rely on the command "which" here since it doesn't always work.
34800    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34801    if test -z "$is_absolute_path"; then
34802      # Path to executable is not absolute. Find it.
34803      IFS_save="$IFS"
34804      IFS=:
34805      for p in $PATH; do
34806        if test -f "$p/$path" && test -x "$p/$path"; then
34807          new_path="$p/$path"
34808          break
34809        fi
34810      done
34811      IFS="$IFS_save"
34812    else
34813      # This is an absolute path, we can use it without further modifications.
34814      new_path="$path"
34815    fi
34816
34817    if test "x$new_path" = x; then
34818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34819$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34820      has_space=`$ECHO "$complete" | $GREP " "`
34821      if test "x$has_space" != x; then
34822        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34823$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34824      fi
34825      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34826    fi
34827  fi
34828
34829  # Now join together the path and the arguments once again
34830  if test "x$arguments" != xEOL; then
34831    new_complete="$new_path ${arguments% *}"
34832  else
34833    new_complete="$new_path"
34834  fi
34835
34836  if test "x$complete" != "x$new_complete"; then
34837    RC="$new_complete"
34838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34839$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34840  fi
34841
34842    # Extract the first word of "dumpbin", so it can be a program name with args.
34843set dummy dumpbin; ac_word=$2
34844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34845$as_echo_n "checking for $ac_word... " >&6; }
34846if ${ac_cv_prog_DUMPBIN+:} false; then :
34847  $as_echo_n "(cached) " >&6
34848else
34849  if test -n "$DUMPBIN"; then
34850  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34851else
34852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34853for as_dir in $PATH
34854do
34855  IFS=$as_save_IFS
34856  test -z "$as_dir" && as_dir=.
34857    for ac_exec_ext in '' $ac_executable_extensions; do
34858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34859    ac_cv_prog_DUMPBIN="dumpbin"
34860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34861    break 2
34862  fi
34863done
34864  done
34865IFS=$as_save_IFS
34866
34867fi
34868fi
34869DUMPBIN=$ac_cv_prog_DUMPBIN
34870if test -n "$DUMPBIN"; then
34871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34872$as_echo "$DUMPBIN" >&6; }
34873else
34874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34875$as_echo "no" >&6; }
34876fi
34877
34878
34879
34880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34881
34882  # First separate the path from the arguments. This will split at the first
34883  # space.
34884  complete="$DUMPBIN"
34885  path="${complete%% *}"
34886  tmp="$complete EOL"
34887  arguments="${tmp#* }"
34888
34889  # Input might be given as Windows format, start by converting to
34890  # unix format.
34891  new_path=`$CYGPATH -u "$path"`
34892
34893  # Now try to locate executable using which
34894  new_path=`$WHICH "$new_path" 2> /dev/null`
34895  # bat and cmd files are not always considered executable in cygwin causing which
34896  # to not find them
34897  if test "x$new_path" = x \
34898      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34899      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34900    new_path=`$CYGPATH -u "$path"`
34901  fi
34902  if test "x$new_path" = x; then
34903    # Oops. Which didn't find the executable.
34904    # The splitting of arguments from the executable at a space might have been incorrect,
34905    # since paths with space are more likely in Windows. Give it another try with the whole
34906    # argument.
34907    path="$complete"
34908    arguments="EOL"
34909    new_path=`$CYGPATH -u "$path"`
34910    new_path=`$WHICH "$new_path" 2> /dev/null`
34911    # bat and cmd files are not always considered executable in cygwin causing which
34912    # to not find them
34913    if test "x$new_path" = x \
34914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34916      new_path=`$CYGPATH -u "$path"`
34917    fi
34918    if test "x$new_path" = x; then
34919      # It's still not found. Now this is an unrecoverable error.
34920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34921$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34922      has_space=`$ECHO "$complete" | $GREP " "`
34923      if test "x$has_space" != x; then
34924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34926      fi
34927      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34928    fi
34929  fi
34930
34931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34934  # "foo.exe" is OK but "foo" is an error.
34935  #
34936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34937  # It is also a way to make sure we got the proper file name for the real test later on.
34938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34939  if test "x$test_shortpath" = x; then
34940    # Short path failed, file does not exist as specified.
34941    # Try adding .exe or .cmd
34942    if test -f "${new_path}.exe"; then
34943      input_to_shortpath="${new_path}.exe"
34944    elif test -f "${new_path}.cmd"; then
34945      input_to_shortpath="${new_path}.cmd"
34946    else
34947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34948$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34951      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34952    fi
34953  else
34954    input_to_shortpath="$new_path"
34955  fi
34956
34957  # Call helper function which possibly converts this using DOS-style short mode.
34958  # If so, the updated path is stored in $new_path.
34959  new_path="$input_to_shortpath"
34960
34961  input_path="$input_to_shortpath"
34962  # Check if we need to convert this using DOS-style short mode. If the path
34963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34964  # take no chances and rewrite it.
34965  # Note: m4 eats our [], so we need to use [ and ] instead.
34966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34967  if test "x$has_forbidden_chars" != x; then
34968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34972      # Going to short mode and back again did indeed matter. Since short mode is
34973      # case insensitive, let's make it lowercase to improve readability.
34974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34975      # Now convert it back to Unix-stile (cygpath)
34976      input_path=`$CYGPATH -u "$shortmode_path"`
34977      new_path="$input_path"
34978    fi
34979  fi
34980
34981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34982  if test "x$test_cygdrive_prefix" = x; then
34983    # As a simple fix, exclude /usr/bin since it's not a real path.
34984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34986      # a path prefixed by /cygdrive for fixpath to work.
34987      new_path="$CYGWIN_ROOT_PATH$input_path"
34988    fi
34989  fi
34990
34991  # remove trailing .exe if any
34992  new_path="${new_path/%.exe/}"
34993
34994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34995
34996  # First separate the path from the arguments. This will split at the first
34997  # space.
34998  complete="$DUMPBIN"
34999  path="${complete%% *}"
35000  tmp="$complete EOL"
35001  arguments="${tmp#* }"
35002
35003  # Input might be given as Windows format, start by converting to
35004  # unix format.
35005  new_path="$path"
35006
35007  windows_path="$new_path"
35008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35009    unix_path=`$CYGPATH -u "$windows_path"`
35010    new_path="$unix_path"
35011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35013    new_path="$unix_path"
35014  fi
35015
35016
35017  # Now try to locate executable using which
35018  new_path=`$WHICH "$new_path" 2> /dev/null`
35019
35020  if test "x$new_path" = x; then
35021    # Oops. Which didn't find the executable.
35022    # The splitting of arguments from the executable at a space might have been incorrect,
35023    # since paths with space are more likely in Windows. Give it another try with the whole
35024    # argument.
35025    path="$complete"
35026    arguments="EOL"
35027    new_path="$path"
35028
35029  windows_path="$new_path"
35030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35031    unix_path=`$CYGPATH -u "$windows_path"`
35032    new_path="$unix_path"
35033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35035    new_path="$unix_path"
35036  fi
35037
35038
35039    new_path=`$WHICH "$new_path" 2> /dev/null`
35040    # bat and cmd files are not always considered executable in MSYS causing which
35041    # to not find them
35042    if test "x$new_path" = x \
35043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35045      new_path="$path"
35046
35047  windows_path="$new_path"
35048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35049    unix_path=`$CYGPATH -u "$windows_path"`
35050    new_path="$unix_path"
35051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35053    new_path="$unix_path"
35054  fi
35055
35056    fi
35057
35058    if test "x$new_path" = x; then
35059      # It's still not found. Now this is an unrecoverable error.
35060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35061$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35062      has_space=`$ECHO "$complete" | $GREP " "`
35063      if test "x$has_space" != x; then
35064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35066      fi
35067      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35068    fi
35069  fi
35070
35071  # Now new_path has a complete unix path to the binary
35072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35073    # Keep paths in /bin as-is, but remove trailing .exe if any
35074    new_path="${new_path/%.exe/}"
35075    # Do not save /bin paths to all_fixpath_prefixes!
35076  else
35077    # Not in mixed or Windows style, start by that.
35078    new_path=`cmd //c echo $new_path`
35079
35080  input_path="$new_path"
35081  # Check if we need to convert this using DOS-style short mode. If the path
35082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35083  # take no chances and rewrite it.
35084  # Note: m4 eats our [], so we need to use [ and ] instead.
35085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35086  if test "x$has_forbidden_chars" != x; then
35087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35089  fi
35090
35091    # Output is in $new_path
35092
35093  windows_path="$new_path"
35094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35095    unix_path=`$CYGPATH -u "$windows_path"`
35096    new_path="$unix_path"
35097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35099    new_path="$unix_path"
35100  fi
35101
35102    # remove trailing .exe if any
35103    new_path="${new_path/%.exe/}"
35104
35105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35107  fi
35108
35109  else
35110    # We're on a posix platform. Hooray! :)
35111    # First separate the path from the arguments. This will split at the first
35112    # space.
35113    complete="$DUMPBIN"
35114    path="${complete%% *}"
35115    tmp="$complete EOL"
35116    arguments="${tmp#* }"
35117
35118    # Cannot rely on the command "which" here since it doesn't always work.
35119    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35120    if test -z "$is_absolute_path"; then
35121      # Path to executable is not absolute. Find it.
35122      IFS_save="$IFS"
35123      IFS=:
35124      for p in $PATH; do
35125        if test -f "$p/$path" && test -x "$p/$path"; then
35126          new_path="$p/$path"
35127          break
35128        fi
35129      done
35130      IFS="$IFS_save"
35131    else
35132      # This is an absolute path, we can use it without further modifications.
35133      new_path="$path"
35134    fi
35135
35136    if test "x$new_path" = x; then
35137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35138$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35139      has_space=`$ECHO "$complete" | $GREP " "`
35140      if test "x$has_space" != x; then
35141        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35143      fi
35144      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35145    fi
35146  fi
35147
35148  # Now join together the path and the arguments once again
35149  if test "x$arguments" != xEOL; then
35150    new_complete="$new_path ${arguments% *}"
35151  else
35152    new_complete="$new_path"
35153  fi
35154
35155  if test "x$complete" != "x$new_complete"; then
35156    DUMPBIN="$new_complete"
35157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35158$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35159  fi
35160
35161    # We need to check for 'msbuild.exe' because at the place where we expect to
35162    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35163    # won't find the 'msbuild.exe' executable in that case (and the
35164    # 'ac_executable_extensions' is unusable due to performance reasons).
35165    # Notice that we intentionally don't fix up the path to MSBUILD because we
35166    # will call it in a DOS shell during freetype detection on Windows (see
35167    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35168    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35169set dummy msbuild.exe; ac_word=$2
35170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35171$as_echo_n "checking for $ac_word... " >&6; }
35172if ${ac_cv_prog_MSBUILD+:} false; then :
35173  $as_echo_n "(cached) " >&6
35174else
35175  if test -n "$MSBUILD"; then
35176  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35177else
35178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35179for as_dir in $PATH
35180do
35181  IFS=$as_save_IFS
35182  test -z "$as_dir" && as_dir=.
35183    for ac_exec_ext in '' $ac_executable_extensions; do
35184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35185    ac_cv_prog_MSBUILD="msbuild.exe"
35186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35187    break 2
35188  fi
35189done
35190  done
35191IFS=$as_save_IFS
35192
35193fi
35194fi
35195MSBUILD=$ac_cv_prog_MSBUILD
35196if test -n "$MSBUILD"; then
35197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35198$as_echo "$MSBUILD" >&6; }
35199else
35200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35201$as_echo "no" >&6; }
35202fi
35203
35204
35205  fi
35206
35207  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35208
35209
35210  # Publish this variable in the help.
35211
35212
35213  if test "x$STRIP" = x; then
35214    # The variable is not set by user, try to locate tool using the code snippet
35215    for ac_prog in strip
35216do
35217  # Extract the first word of "$ac_prog", so it can be a program name with args.
35218set dummy $ac_prog; ac_word=$2
35219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35220$as_echo_n "checking for $ac_word... " >&6; }
35221if ${ac_cv_path_STRIP+:} false; then :
35222  $as_echo_n "(cached) " >&6
35223else
35224  case $STRIP in
35225  [\\/]* | ?:[\\/]*)
35226  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35227  ;;
35228  *)
35229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35230for as_dir in $PATH
35231do
35232  IFS=$as_save_IFS
35233  test -z "$as_dir" && as_dir=.
35234    for ac_exec_ext in '' $ac_executable_extensions; do
35235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35236    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35238    break 2
35239  fi
35240done
35241  done
35242IFS=$as_save_IFS
35243
35244  ;;
35245esac
35246fi
35247STRIP=$ac_cv_path_STRIP
35248if test -n "$STRIP"; then
35249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35250$as_echo "$STRIP" >&6; }
35251else
35252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35253$as_echo "no" >&6; }
35254fi
35255
35256
35257  test -n "$STRIP" && break
35258done
35259
35260  else
35261    # The variable is set, but is it from the command line or the environment?
35262
35263    # Try to remove the string !STRIP! from our list.
35264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35266      # If it failed, the variable was not from the command line. Ignore it,
35267      # but warn the user (except for BASH, which is always set by the calling BASH).
35268      if test "xSTRIP" != xBASH; then
35269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35270$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35271      fi
35272      # Try to locate tool using the code snippet
35273      for ac_prog in strip
35274do
35275  # Extract the first word of "$ac_prog", so it can be a program name with args.
35276set dummy $ac_prog; ac_word=$2
35277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35278$as_echo_n "checking for $ac_word... " >&6; }
35279if ${ac_cv_path_STRIP+:} false; then :
35280  $as_echo_n "(cached) " >&6
35281else
35282  case $STRIP in
35283  [\\/]* | ?:[\\/]*)
35284  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35285  ;;
35286  *)
35287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35288for as_dir in $PATH
35289do
35290  IFS=$as_save_IFS
35291  test -z "$as_dir" && as_dir=.
35292    for ac_exec_ext in '' $ac_executable_extensions; do
35293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35294    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35296    break 2
35297  fi
35298done
35299  done
35300IFS=$as_save_IFS
35301
35302  ;;
35303esac
35304fi
35305STRIP=$ac_cv_path_STRIP
35306if test -n "$STRIP"; then
35307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35308$as_echo "$STRIP" >&6; }
35309else
35310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35311$as_echo "no" >&6; }
35312fi
35313
35314
35315  test -n "$STRIP" && break
35316done
35317
35318    else
35319      # If it succeeded, then it was overridden by the user. We will use it
35320      # for the tool.
35321
35322      # First remove it from the list of overridden variables, so we can test
35323      # for unknown variables in the end.
35324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35325
35326      # Check if the provided tool contains a complete path.
35327      tool_specified="$STRIP"
35328      tool_basename="${tool_specified##*/}"
35329      if test "x$tool_basename" = "x$tool_specified"; then
35330        # A command without a complete path is provided, search $PATH.
35331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35332$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35333        # Extract the first word of "$tool_basename", so it can be a program name with args.
35334set dummy $tool_basename; ac_word=$2
35335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35336$as_echo_n "checking for $ac_word... " >&6; }
35337if ${ac_cv_path_STRIP+:} false; then :
35338  $as_echo_n "(cached) " >&6
35339else
35340  case $STRIP in
35341  [\\/]* | ?:[\\/]*)
35342  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35343  ;;
35344  *)
35345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35346for as_dir in $PATH
35347do
35348  IFS=$as_save_IFS
35349  test -z "$as_dir" && as_dir=.
35350    for ac_exec_ext in '' $ac_executable_extensions; do
35351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35352    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35354    break 2
35355  fi
35356done
35357  done
35358IFS=$as_save_IFS
35359
35360  ;;
35361esac
35362fi
35363STRIP=$ac_cv_path_STRIP
35364if test -n "$STRIP"; then
35365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35366$as_echo "$STRIP" >&6; }
35367else
35368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35369$as_echo "no" >&6; }
35370fi
35371
35372
35373        if test "x$STRIP" = x; then
35374          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35375        fi
35376      else
35377        # Otherwise we believe it is a complete path. Use it as it is.
35378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35379$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35381$as_echo_n "checking for STRIP... " >&6; }
35382        if test ! -x "$tool_specified"; then
35383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35384$as_echo "not found" >&6; }
35385          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35386        fi
35387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35388$as_echo "$tool_specified" >&6; }
35389      fi
35390    fi
35391  fi
35392
35393
35394
35395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35396
35397  # First separate the path from the arguments. This will split at the first
35398  # space.
35399  complete="$STRIP"
35400  path="${complete%% *}"
35401  tmp="$complete EOL"
35402  arguments="${tmp#* }"
35403
35404  # Input might be given as Windows format, start by converting to
35405  # unix format.
35406  new_path=`$CYGPATH -u "$path"`
35407
35408  # Now try to locate executable using which
35409  new_path=`$WHICH "$new_path" 2> /dev/null`
35410  # bat and cmd files are not always considered executable in cygwin causing which
35411  # to not find them
35412  if test "x$new_path" = x \
35413      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35414      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35415    new_path=`$CYGPATH -u "$path"`
35416  fi
35417  if test "x$new_path" = x; then
35418    # Oops. Which didn't find the executable.
35419    # The splitting of arguments from the executable at a space might have been incorrect,
35420    # since paths with space are more likely in Windows. Give it another try with the whole
35421    # argument.
35422    path="$complete"
35423    arguments="EOL"
35424    new_path=`$CYGPATH -u "$path"`
35425    new_path=`$WHICH "$new_path" 2> /dev/null`
35426    # bat and cmd files are not always considered executable in cygwin causing which
35427    # to not find them
35428    if test "x$new_path" = x \
35429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35431      new_path=`$CYGPATH -u "$path"`
35432    fi
35433    if test "x$new_path" = x; then
35434      # It's still not found. Now this is an unrecoverable error.
35435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35436$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35437      has_space=`$ECHO "$complete" | $GREP " "`
35438      if test "x$has_space" != x; then
35439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35441      fi
35442      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35443    fi
35444  fi
35445
35446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35449  # "foo.exe" is OK but "foo" is an error.
35450  #
35451  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35452  # It is also a way to make sure we got the proper file name for the real test later on.
35453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35454  if test "x$test_shortpath" = x; then
35455    # Short path failed, file does not exist as specified.
35456    # Try adding .exe or .cmd
35457    if test -f "${new_path}.exe"; then
35458      input_to_shortpath="${new_path}.exe"
35459    elif test -f "${new_path}.cmd"; then
35460      input_to_shortpath="${new_path}.cmd"
35461    else
35462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35463$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35464      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35465$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35466      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35467    fi
35468  else
35469    input_to_shortpath="$new_path"
35470  fi
35471
35472  # Call helper function which possibly converts this using DOS-style short mode.
35473  # If so, the updated path is stored in $new_path.
35474  new_path="$input_to_shortpath"
35475
35476  input_path="$input_to_shortpath"
35477  # Check if we need to convert this using DOS-style short mode. If the path
35478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35479  # take no chances and rewrite it.
35480  # Note: m4 eats our [], so we need to use [ and ] instead.
35481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35482  if test "x$has_forbidden_chars" != x; then
35483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35487      # Going to short mode and back again did indeed matter. Since short mode is
35488      # case insensitive, let's make it lowercase to improve readability.
35489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35490      # Now convert it back to Unix-stile (cygpath)
35491      input_path=`$CYGPATH -u "$shortmode_path"`
35492      new_path="$input_path"
35493    fi
35494  fi
35495
35496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35497  if test "x$test_cygdrive_prefix" = x; then
35498    # As a simple fix, exclude /usr/bin since it's not a real path.
35499    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35501      # a path prefixed by /cygdrive for fixpath to work.
35502      new_path="$CYGWIN_ROOT_PATH$input_path"
35503    fi
35504  fi
35505
35506  # remove trailing .exe if any
35507  new_path="${new_path/%.exe/}"
35508
35509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35510
35511  # First separate the path from the arguments. This will split at the first
35512  # space.
35513  complete="$STRIP"
35514  path="${complete%% *}"
35515  tmp="$complete EOL"
35516  arguments="${tmp#* }"
35517
35518  # Input might be given as Windows format, start by converting to
35519  # unix format.
35520  new_path="$path"
35521
35522  windows_path="$new_path"
35523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35524    unix_path=`$CYGPATH -u "$windows_path"`
35525    new_path="$unix_path"
35526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35528    new_path="$unix_path"
35529  fi
35530
35531
35532  # Now try to locate executable using which
35533  new_path=`$WHICH "$new_path" 2> /dev/null`
35534
35535  if test "x$new_path" = x; then
35536    # Oops. Which didn't find the executable.
35537    # The splitting of arguments from the executable at a space might have been incorrect,
35538    # since paths with space are more likely in Windows. Give it another try with the whole
35539    # argument.
35540    path="$complete"
35541    arguments="EOL"
35542    new_path="$path"
35543
35544  windows_path="$new_path"
35545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35546    unix_path=`$CYGPATH -u "$windows_path"`
35547    new_path="$unix_path"
35548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35550    new_path="$unix_path"
35551  fi
35552
35553
35554    new_path=`$WHICH "$new_path" 2> /dev/null`
35555    # bat and cmd files are not always considered executable in MSYS causing which
35556    # to not find them
35557    if test "x$new_path" = x \
35558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35560      new_path="$path"
35561
35562  windows_path="$new_path"
35563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35564    unix_path=`$CYGPATH -u "$windows_path"`
35565    new_path="$unix_path"
35566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35568    new_path="$unix_path"
35569  fi
35570
35571    fi
35572
35573    if test "x$new_path" = x; then
35574      # It's still not found. Now this is an unrecoverable error.
35575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35576$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35577      has_space=`$ECHO "$complete" | $GREP " "`
35578      if test "x$has_space" != x; then
35579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35581      fi
35582      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35583    fi
35584  fi
35585
35586  # Now new_path has a complete unix path to the binary
35587  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35588    # Keep paths in /bin as-is, but remove trailing .exe if any
35589    new_path="${new_path/%.exe/}"
35590    # Do not save /bin paths to all_fixpath_prefixes!
35591  else
35592    # Not in mixed or Windows style, start by that.
35593    new_path=`cmd //c echo $new_path`
35594
35595  input_path="$new_path"
35596  # Check if we need to convert this using DOS-style short mode. If the path
35597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35598  # take no chances and rewrite it.
35599  # Note: m4 eats our [], so we need to use [ and ] instead.
35600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35601  if test "x$has_forbidden_chars" != x; then
35602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35604  fi
35605
35606    # Output is in $new_path
35607
35608  windows_path="$new_path"
35609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35610    unix_path=`$CYGPATH -u "$windows_path"`
35611    new_path="$unix_path"
35612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35614    new_path="$unix_path"
35615  fi
35616
35617    # remove trailing .exe if any
35618    new_path="${new_path/%.exe/}"
35619
35620    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35621    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35622  fi
35623
35624  else
35625    # We're on a posix platform. Hooray! :)
35626    # First separate the path from the arguments. This will split at the first
35627    # space.
35628    complete="$STRIP"
35629    path="${complete%% *}"
35630    tmp="$complete EOL"
35631    arguments="${tmp#* }"
35632
35633    # Cannot rely on the command "which" here since it doesn't always work.
35634    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35635    if test -z "$is_absolute_path"; then
35636      # Path to executable is not absolute. Find it.
35637      IFS_save="$IFS"
35638      IFS=:
35639      for p in $PATH; do
35640        if test -f "$p/$path" && test -x "$p/$path"; then
35641          new_path="$p/$path"
35642          break
35643        fi
35644      done
35645      IFS="$IFS_save"
35646    else
35647      # This is an absolute path, we can use it without further modifications.
35648      new_path="$path"
35649    fi
35650
35651    if test "x$new_path" = x; then
35652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35653$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35654      has_space=`$ECHO "$complete" | $GREP " "`
35655      if test "x$has_space" != x; then
35656        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35657$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35658      fi
35659      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35660    fi
35661  fi
35662
35663  # Now join together the path and the arguments once again
35664  if test "x$arguments" != xEOL; then
35665    new_complete="$new_path ${arguments% *}"
35666  else
35667    new_complete="$new_path"
35668  fi
35669
35670  if test "x$complete" != "x$new_complete"; then
35671    STRIP="$new_complete"
35672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35673$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35674  fi
35675
35676
35677
35678  # Publish this variable in the help.
35679
35680
35681  if test "x$NM" = x; then
35682    # The variable is not set by user, try to locate tool using the code snippet
35683    for ac_prog in nm
35684do
35685  # Extract the first word of "$ac_prog", so it can be a program name with args.
35686set dummy $ac_prog; ac_word=$2
35687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35688$as_echo_n "checking for $ac_word... " >&6; }
35689if ${ac_cv_path_NM+:} false; then :
35690  $as_echo_n "(cached) " >&6
35691else
35692  case $NM in
35693  [\\/]* | ?:[\\/]*)
35694  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35695  ;;
35696  *)
35697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35698for as_dir in $PATH
35699do
35700  IFS=$as_save_IFS
35701  test -z "$as_dir" && as_dir=.
35702    for ac_exec_ext in '' $ac_executable_extensions; do
35703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35704    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35706    break 2
35707  fi
35708done
35709  done
35710IFS=$as_save_IFS
35711
35712  ;;
35713esac
35714fi
35715NM=$ac_cv_path_NM
35716if test -n "$NM"; then
35717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35718$as_echo "$NM" >&6; }
35719else
35720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35721$as_echo "no" >&6; }
35722fi
35723
35724
35725  test -n "$NM" && break
35726done
35727
35728  else
35729    # The variable is set, but is it from the command line or the environment?
35730
35731    # Try to remove the string !NM! from our list.
35732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35734      # If it failed, the variable was not from the command line. Ignore it,
35735      # but warn the user (except for BASH, which is always set by the calling BASH).
35736      if test "xNM" != xBASH; then
35737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35738$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35739      fi
35740      # Try to locate tool using the code snippet
35741      for ac_prog in nm
35742do
35743  # Extract the first word of "$ac_prog", so it can be a program name with args.
35744set dummy $ac_prog; ac_word=$2
35745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35746$as_echo_n "checking for $ac_word... " >&6; }
35747if ${ac_cv_path_NM+:} false; then :
35748  $as_echo_n "(cached) " >&6
35749else
35750  case $NM in
35751  [\\/]* | ?:[\\/]*)
35752  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35753  ;;
35754  *)
35755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35756for as_dir in $PATH
35757do
35758  IFS=$as_save_IFS
35759  test -z "$as_dir" && as_dir=.
35760    for ac_exec_ext in '' $ac_executable_extensions; do
35761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35762    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35764    break 2
35765  fi
35766done
35767  done
35768IFS=$as_save_IFS
35769
35770  ;;
35771esac
35772fi
35773NM=$ac_cv_path_NM
35774if test -n "$NM"; then
35775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35776$as_echo "$NM" >&6; }
35777else
35778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35779$as_echo "no" >&6; }
35780fi
35781
35782
35783  test -n "$NM" && break
35784done
35785
35786    else
35787      # If it succeeded, then it was overridden by the user. We will use it
35788      # for the tool.
35789
35790      # First remove it from the list of overridden variables, so we can test
35791      # for unknown variables in the end.
35792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35793
35794      # Check if the provided tool contains a complete path.
35795      tool_specified="$NM"
35796      tool_basename="${tool_specified##*/}"
35797      if test "x$tool_basename" = "x$tool_specified"; then
35798        # A command without a complete path is provided, search $PATH.
35799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35800$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35801        # Extract the first word of "$tool_basename", so it can be a program name with args.
35802set dummy $tool_basename; ac_word=$2
35803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35804$as_echo_n "checking for $ac_word... " >&6; }
35805if ${ac_cv_path_NM+:} false; then :
35806  $as_echo_n "(cached) " >&6
35807else
35808  case $NM in
35809  [\\/]* | ?:[\\/]*)
35810  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35811  ;;
35812  *)
35813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35814for as_dir in $PATH
35815do
35816  IFS=$as_save_IFS
35817  test -z "$as_dir" && as_dir=.
35818    for ac_exec_ext in '' $ac_executable_extensions; do
35819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35820    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35822    break 2
35823  fi
35824done
35825  done
35826IFS=$as_save_IFS
35827
35828  ;;
35829esac
35830fi
35831NM=$ac_cv_path_NM
35832if test -n "$NM"; then
35833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35834$as_echo "$NM" >&6; }
35835else
35836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35837$as_echo "no" >&6; }
35838fi
35839
35840
35841        if test "x$NM" = x; then
35842          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35843        fi
35844      else
35845        # Otherwise we believe it is a complete path. Use it as it is.
35846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35847$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35849$as_echo_n "checking for NM... " >&6; }
35850        if test ! -x "$tool_specified"; then
35851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35852$as_echo "not found" >&6; }
35853          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35854        fi
35855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35856$as_echo "$tool_specified" >&6; }
35857      fi
35858    fi
35859  fi
35860
35861
35862
35863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35864
35865  # First separate the path from the arguments. This will split at the first
35866  # space.
35867  complete="$NM"
35868  path="${complete%% *}"
35869  tmp="$complete EOL"
35870  arguments="${tmp#* }"
35871
35872  # Input might be given as Windows format, start by converting to
35873  # unix format.
35874  new_path=`$CYGPATH -u "$path"`
35875
35876  # Now try to locate executable using which
35877  new_path=`$WHICH "$new_path" 2> /dev/null`
35878  # bat and cmd files are not always considered executable in cygwin causing which
35879  # to not find them
35880  if test "x$new_path" = x \
35881      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35882      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35883    new_path=`$CYGPATH -u "$path"`
35884  fi
35885  if test "x$new_path" = x; then
35886    # Oops. Which didn't find the executable.
35887    # The splitting of arguments from the executable at a space might have been incorrect,
35888    # since paths with space are more likely in Windows. Give it another try with the whole
35889    # argument.
35890    path="$complete"
35891    arguments="EOL"
35892    new_path=`$CYGPATH -u "$path"`
35893    new_path=`$WHICH "$new_path" 2> /dev/null`
35894    # bat and cmd files are not always considered executable in cygwin causing which
35895    # to not find them
35896    if test "x$new_path" = x \
35897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35899      new_path=`$CYGPATH -u "$path"`
35900    fi
35901    if test "x$new_path" = x; then
35902      # It's still not found. Now this is an unrecoverable error.
35903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35904$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35905      has_space=`$ECHO "$complete" | $GREP " "`
35906      if test "x$has_space" != x; then
35907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35909      fi
35910      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35911    fi
35912  fi
35913
35914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35917  # "foo.exe" is OK but "foo" is an error.
35918  #
35919  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35920  # It is also a way to make sure we got the proper file name for the real test later on.
35921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35922  if test "x$test_shortpath" = x; then
35923    # Short path failed, file does not exist as specified.
35924    # Try adding .exe or .cmd
35925    if test -f "${new_path}.exe"; then
35926      input_to_shortpath="${new_path}.exe"
35927    elif test -f "${new_path}.cmd"; then
35928      input_to_shortpath="${new_path}.cmd"
35929    else
35930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35931$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35932      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35933$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35934      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35935    fi
35936  else
35937    input_to_shortpath="$new_path"
35938  fi
35939
35940  # Call helper function which possibly converts this using DOS-style short mode.
35941  # If so, the updated path is stored in $new_path.
35942  new_path="$input_to_shortpath"
35943
35944  input_path="$input_to_shortpath"
35945  # Check if we need to convert this using DOS-style short mode. If the path
35946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35947  # take no chances and rewrite it.
35948  # Note: m4 eats our [], so we need to use [ and ] instead.
35949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35950  if test "x$has_forbidden_chars" != x; then
35951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35955      # Going to short mode and back again did indeed matter. Since short mode is
35956      # case insensitive, let's make it lowercase to improve readability.
35957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35958      # Now convert it back to Unix-stile (cygpath)
35959      input_path=`$CYGPATH -u "$shortmode_path"`
35960      new_path="$input_path"
35961    fi
35962  fi
35963
35964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35965  if test "x$test_cygdrive_prefix" = x; then
35966    # As a simple fix, exclude /usr/bin since it's not a real path.
35967    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35969      # a path prefixed by /cygdrive for fixpath to work.
35970      new_path="$CYGWIN_ROOT_PATH$input_path"
35971    fi
35972  fi
35973
35974  # remove trailing .exe if any
35975  new_path="${new_path/%.exe/}"
35976
35977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35978
35979  # First separate the path from the arguments. This will split at the first
35980  # space.
35981  complete="$NM"
35982  path="${complete%% *}"
35983  tmp="$complete EOL"
35984  arguments="${tmp#* }"
35985
35986  # Input might be given as Windows format, start by converting to
35987  # unix format.
35988  new_path="$path"
35989
35990  windows_path="$new_path"
35991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35992    unix_path=`$CYGPATH -u "$windows_path"`
35993    new_path="$unix_path"
35994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35996    new_path="$unix_path"
35997  fi
35998
35999
36000  # Now try to locate executable using which
36001  new_path=`$WHICH "$new_path" 2> /dev/null`
36002
36003  if test "x$new_path" = x; then
36004    # Oops. Which didn't find the executable.
36005    # The splitting of arguments from the executable at a space might have been incorrect,
36006    # since paths with space are more likely in Windows. Give it another try with the whole
36007    # argument.
36008    path="$complete"
36009    arguments="EOL"
36010    new_path="$path"
36011
36012  windows_path="$new_path"
36013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36014    unix_path=`$CYGPATH -u "$windows_path"`
36015    new_path="$unix_path"
36016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36018    new_path="$unix_path"
36019  fi
36020
36021
36022    new_path=`$WHICH "$new_path" 2> /dev/null`
36023    # bat and cmd files are not always considered executable in MSYS causing which
36024    # to not find them
36025    if test "x$new_path" = x \
36026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36028      new_path="$path"
36029
36030  windows_path="$new_path"
36031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36032    unix_path=`$CYGPATH -u "$windows_path"`
36033    new_path="$unix_path"
36034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36036    new_path="$unix_path"
36037  fi
36038
36039    fi
36040
36041    if test "x$new_path" = x; then
36042      # It's still not found. Now this is an unrecoverable error.
36043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36044$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36045      has_space=`$ECHO "$complete" | $GREP " "`
36046      if test "x$has_space" != x; then
36047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36049      fi
36050      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36051    fi
36052  fi
36053
36054  # Now new_path has a complete unix path to the binary
36055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36056    # Keep paths in /bin as-is, but remove trailing .exe if any
36057    new_path="${new_path/%.exe/}"
36058    # Do not save /bin paths to all_fixpath_prefixes!
36059  else
36060    # Not in mixed or Windows style, start by that.
36061    new_path=`cmd //c echo $new_path`
36062
36063  input_path="$new_path"
36064  # Check if we need to convert this using DOS-style short mode. If the path
36065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36066  # take no chances and rewrite it.
36067  # Note: m4 eats our [], so we need to use [ and ] instead.
36068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36069  if test "x$has_forbidden_chars" != x; then
36070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36072  fi
36073
36074    # Output is in $new_path
36075
36076  windows_path="$new_path"
36077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36078    unix_path=`$CYGPATH -u "$windows_path"`
36079    new_path="$unix_path"
36080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36082    new_path="$unix_path"
36083  fi
36084
36085    # remove trailing .exe if any
36086    new_path="${new_path/%.exe/}"
36087
36088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36090  fi
36091
36092  else
36093    # We're on a posix platform. Hooray! :)
36094    # First separate the path from the arguments. This will split at the first
36095    # space.
36096    complete="$NM"
36097    path="${complete%% *}"
36098    tmp="$complete EOL"
36099    arguments="${tmp#* }"
36100
36101    # Cannot rely on the command "which" here since it doesn't always work.
36102    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36103    if test -z "$is_absolute_path"; then
36104      # Path to executable is not absolute. Find it.
36105      IFS_save="$IFS"
36106      IFS=:
36107      for p in $PATH; do
36108        if test -f "$p/$path" && test -x "$p/$path"; then
36109          new_path="$p/$path"
36110          break
36111        fi
36112      done
36113      IFS="$IFS_save"
36114    else
36115      # This is an absolute path, we can use it without further modifications.
36116      new_path="$path"
36117    fi
36118
36119    if test "x$new_path" = x; then
36120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36121$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36122      has_space=`$ECHO "$complete" | $GREP " "`
36123      if test "x$has_space" != x; then
36124        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36125$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36126      fi
36127      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36128    fi
36129  fi
36130
36131  # Now join together the path and the arguments once again
36132  if test "x$arguments" != xEOL; then
36133    new_complete="$new_path ${arguments% *}"
36134  else
36135    new_complete="$new_path"
36136  fi
36137
36138  if test "x$complete" != "x$new_complete"; then
36139    NM="$new_complete"
36140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36141$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36142  fi
36143
36144
36145
36146  # Publish this variable in the help.
36147
36148
36149  if test "x$GNM" = x; then
36150    # The variable is not set by user, try to locate tool using the code snippet
36151    for ac_prog in gnm
36152do
36153  # Extract the first word of "$ac_prog", so it can be a program name with args.
36154set dummy $ac_prog; ac_word=$2
36155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36156$as_echo_n "checking for $ac_word... " >&6; }
36157if ${ac_cv_path_GNM+:} false; then :
36158  $as_echo_n "(cached) " >&6
36159else
36160  case $GNM in
36161  [\\/]* | ?:[\\/]*)
36162  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36163  ;;
36164  *)
36165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36166for as_dir in $PATH
36167do
36168  IFS=$as_save_IFS
36169  test -z "$as_dir" && as_dir=.
36170    for ac_exec_ext in '' $ac_executable_extensions; do
36171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36172    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36174    break 2
36175  fi
36176done
36177  done
36178IFS=$as_save_IFS
36179
36180  ;;
36181esac
36182fi
36183GNM=$ac_cv_path_GNM
36184if test -n "$GNM"; then
36185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36186$as_echo "$GNM" >&6; }
36187else
36188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36189$as_echo "no" >&6; }
36190fi
36191
36192
36193  test -n "$GNM" && break
36194done
36195
36196  else
36197    # The variable is set, but is it from the command line or the environment?
36198
36199    # Try to remove the string !GNM! from our list.
36200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36202      # If it failed, the variable was not from the command line. Ignore it,
36203      # but warn the user (except for BASH, which is always set by the calling BASH).
36204      if test "xGNM" != xBASH; then
36205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36206$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36207      fi
36208      # Try to locate tool using the code snippet
36209      for ac_prog in gnm
36210do
36211  # Extract the first word of "$ac_prog", so it can be a program name with args.
36212set dummy $ac_prog; ac_word=$2
36213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36214$as_echo_n "checking for $ac_word... " >&6; }
36215if ${ac_cv_path_GNM+:} false; then :
36216  $as_echo_n "(cached) " >&6
36217else
36218  case $GNM in
36219  [\\/]* | ?:[\\/]*)
36220  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36221  ;;
36222  *)
36223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36224for as_dir in $PATH
36225do
36226  IFS=$as_save_IFS
36227  test -z "$as_dir" && as_dir=.
36228    for ac_exec_ext in '' $ac_executable_extensions; do
36229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36230    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36232    break 2
36233  fi
36234done
36235  done
36236IFS=$as_save_IFS
36237
36238  ;;
36239esac
36240fi
36241GNM=$ac_cv_path_GNM
36242if test -n "$GNM"; then
36243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36244$as_echo "$GNM" >&6; }
36245else
36246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36247$as_echo "no" >&6; }
36248fi
36249
36250
36251  test -n "$GNM" && break
36252done
36253
36254    else
36255      # If it succeeded, then it was overridden by the user. We will use it
36256      # for the tool.
36257
36258      # First remove it from the list of overridden variables, so we can test
36259      # for unknown variables in the end.
36260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36261
36262      # Check if the provided tool contains a complete path.
36263      tool_specified="$GNM"
36264      tool_basename="${tool_specified##*/}"
36265      if test "x$tool_basename" = "x$tool_specified"; then
36266        # A command without a complete path is provided, search $PATH.
36267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36268$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36269        # Extract the first word of "$tool_basename", so it can be a program name with args.
36270set dummy $tool_basename; ac_word=$2
36271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36272$as_echo_n "checking for $ac_word... " >&6; }
36273if ${ac_cv_path_GNM+:} false; then :
36274  $as_echo_n "(cached) " >&6
36275else
36276  case $GNM in
36277  [\\/]* | ?:[\\/]*)
36278  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36279  ;;
36280  *)
36281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36282for as_dir in $PATH
36283do
36284  IFS=$as_save_IFS
36285  test -z "$as_dir" && as_dir=.
36286    for ac_exec_ext in '' $ac_executable_extensions; do
36287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36288    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36290    break 2
36291  fi
36292done
36293  done
36294IFS=$as_save_IFS
36295
36296  ;;
36297esac
36298fi
36299GNM=$ac_cv_path_GNM
36300if test -n "$GNM"; then
36301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36302$as_echo "$GNM" >&6; }
36303else
36304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36305$as_echo "no" >&6; }
36306fi
36307
36308
36309        if test "x$GNM" = x; then
36310          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36311        fi
36312      else
36313        # Otherwise we believe it is a complete path. Use it as it is.
36314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36315$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36317$as_echo_n "checking for GNM... " >&6; }
36318        if test ! -x "$tool_specified"; then
36319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36320$as_echo "not found" >&6; }
36321          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36322        fi
36323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36324$as_echo "$tool_specified" >&6; }
36325      fi
36326    fi
36327  fi
36328
36329
36330
36331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36332
36333  # First separate the path from the arguments. This will split at the first
36334  # space.
36335  complete="$GNM"
36336  path="${complete%% *}"
36337  tmp="$complete EOL"
36338  arguments="${tmp#* }"
36339
36340  # Input might be given as Windows format, start by converting to
36341  # unix format.
36342  new_path=`$CYGPATH -u "$path"`
36343
36344  # Now try to locate executable using which
36345  new_path=`$WHICH "$new_path" 2> /dev/null`
36346  # bat and cmd files are not always considered executable in cygwin causing which
36347  # to not find them
36348  if test "x$new_path" = x \
36349      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36350      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36351    new_path=`$CYGPATH -u "$path"`
36352  fi
36353  if test "x$new_path" = x; then
36354    # Oops. Which didn't find the executable.
36355    # The splitting of arguments from the executable at a space might have been incorrect,
36356    # since paths with space are more likely in Windows. Give it another try with the whole
36357    # argument.
36358    path="$complete"
36359    arguments="EOL"
36360    new_path=`$CYGPATH -u "$path"`
36361    new_path=`$WHICH "$new_path" 2> /dev/null`
36362    # bat and cmd files are not always considered executable in cygwin causing which
36363    # to not find them
36364    if test "x$new_path" = x \
36365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36367      new_path=`$CYGPATH -u "$path"`
36368    fi
36369    if test "x$new_path" = x; then
36370      # It's still not found. Now this is an unrecoverable error.
36371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36372$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36373      has_space=`$ECHO "$complete" | $GREP " "`
36374      if test "x$has_space" != x; then
36375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36377      fi
36378      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36379    fi
36380  fi
36381
36382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36385  # "foo.exe" is OK but "foo" is an error.
36386  #
36387  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36388  # It is also a way to make sure we got the proper file name for the real test later on.
36389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36390  if test "x$test_shortpath" = x; then
36391    # Short path failed, file does not exist as specified.
36392    # Try adding .exe or .cmd
36393    if test -f "${new_path}.exe"; then
36394      input_to_shortpath="${new_path}.exe"
36395    elif test -f "${new_path}.cmd"; then
36396      input_to_shortpath="${new_path}.cmd"
36397    else
36398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36399$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36400      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36401$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36402      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36403    fi
36404  else
36405    input_to_shortpath="$new_path"
36406  fi
36407
36408  # Call helper function which possibly converts this using DOS-style short mode.
36409  # If so, the updated path is stored in $new_path.
36410  new_path="$input_to_shortpath"
36411
36412  input_path="$input_to_shortpath"
36413  # Check if we need to convert this using DOS-style short mode. If the path
36414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36415  # take no chances and rewrite it.
36416  # Note: m4 eats our [], so we need to use [ and ] instead.
36417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36418  if test "x$has_forbidden_chars" != x; then
36419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36423      # Going to short mode and back again did indeed matter. Since short mode is
36424      # case insensitive, let's make it lowercase to improve readability.
36425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36426      # Now convert it back to Unix-stile (cygpath)
36427      input_path=`$CYGPATH -u "$shortmode_path"`
36428      new_path="$input_path"
36429    fi
36430  fi
36431
36432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36433  if test "x$test_cygdrive_prefix" = x; then
36434    # As a simple fix, exclude /usr/bin since it's not a real path.
36435    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36437      # a path prefixed by /cygdrive for fixpath to work.
36438      new_path="$CYGWIN_ROOT_PATH$input_path"
36439    fi
36440  fi
36441
36442  # remove trailing .exe if any
36443  new_path="${new_path/%.exe/}"
36444
36445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36446
36447  # First separate the path from the arguments. This will split at the first
36448  # space.
36449  complete="$GNM"
36450  path="${complete%% *}"
36451  tmp="$complete EOL"
36452  arguments="${tmp#* }"
36453
36454  # Input might be given as Windows format, start by converting to
36455  # unix format.
36456  new_path="$path"
36457
36458  windows_path="$new_path"
36459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36460    unix_path=`$CYGPATH -u "$windows_path"`
36461    new_path="$unix_path"
36462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36464    new_path="$unix_path"
36465  fi
36466
36467
36468  # Now try to locate executable using which
36469  new_path=`$WHICH "$new_path" 2> /dev/null`
36470
36471  if test "x$new_path" = x; then
36472    # Oops. Which didn't find the executable.
36473    # The splitting of arguments from the executable at a space might have been incorrect,
36474    # since paths with space are more likely in Windows. Give it another try with the whole
36475    # argument.
36476    path="$complete"
36477    arguments="EOL"
36478    new_path="$path"
36479
36480  windows_path="$new_path"
36481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36482    unix_path=`$CYGPATH -u "$windows_path"`
36483    new_path="$unix_path"
36484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36486    new_path="$unix_path"
36487  fi
36488
36489
36490    new_path=`$WHICH "$new_path" 2> /dev/null`
36491    # bat and cmd files are not always considered executable in MSYS causing which
36492    # to not find them
36493    if test "x$new_path" = x \
36494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36496      new_path="$path"
36497
36498  windows_path="$new_path"
36499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36500    unix_path=`$CYGPATH -u "$windows_path"`
36501    new_path="$unix_path"
36502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36504    new_path="$unix_path"
36505  fi
36506
36507    fi
36508
36509    if test "x$new_path" = x; then
36510      # It's still not found. Now this is an unrecoverable error.
36511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36512$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36513      has_space=`$ECHO "$complete" | $GREP " "`
36514      if test "x$has_space" != x; then
36515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36517      fi
36518      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36519    fi
36520  fi
36521
36522  # Now new_path has a complete unix path to the binary
36523  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36524    # Keep paths in /bin as-is, but remove trailing .exe if any
36525    new_path="${new_path/%.exe/}"
36526    # Do not save /bin paths to all_fixpath_prefixes!
36527  else
36528    # Not in mixed or Windows style, start by that.
36529    new_path=`cmd //c echo $new_path`
36530
36531  input_path="$new_path"
36532  # Check if we need to convert this using DOS-style short mode. If the path
36533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36534  # take no chances and rewrite it.
36535  # Note: m4 eats our [], so we need to use [ and ] instead.
36536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36537  if test "x$has_forbidden_chars" != x; then
36538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36540  fi
36541
36542    # Output is in $new_path
36543
36544  windows_path="$new_path"
36545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36546    unix_path=`$CYGPATH -u "$windows_path"`
36547    new_path="$unix_path"
36548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36550    new_path="$unix_path"
36551  fi
36552
36553    # remove trailing .exe if any
36554    new_path="${new_path/%.exe/}"
36555
36556    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36557    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36558  fi
36559
36560  else
36561    # We're on a posix platform. Hooray! :)
36562    # First separate the path from the arguments. This will split at the first
36563    # space.
36564    complete="$GNM"
36565    path="${complete%% *}"
36566    tmp="$complete EOL"
36567    arguments="${tmp#* }"
36568
36569    # Cannot rely on the command "which" here since it doesn't always work.
36570    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36571    if test -z "$is_absolute_path"; then
36572      # Path to executable is not absolute. Find it.
36573      IFS_save="$IFS"
36574      IFS=:
36575      for p in $PATH; do
36576        if test -f "$p/$path" && test -x "$p/$path"; then
36577          new_path="$p/$path"
36578          break
36579        fi
36580      done
36581      IFS="$IFS_save"
36582    else
36583      # This is an absolute path, we can use it without further modifications.
36584      new_path="$path"
36585    fi
36586
36587    if test "x$new_path" = x; then
36588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36589$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36590      has_space=`$ECHO "$complete" | $GREP " "`
36591      if test "x$has_space" != x; then
36592        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36593$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36594      fi
36595      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36596    fi
36597  fi
36598
36599  # Now join together the path and the arguments once again
36600  if test "x$arguments" != xEOL; then
36601    new_complete="$new_path ${arguments% *}"
36602  else
36603    new_complete="$new_path"
36604  fi
36605
36606  if test "x$complete" != "x$new_complete"; then
36607    GNM="$new_complete"
36608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36609$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36610  fi
36611
36612
36613
36614
36615  # Publish this variable in the help.
36616
36617
36618  if test "x$MCS" = x; then
36619    # The variable is not set by user, try to locate tool using the code snippet
36620    for ac_prog in mcs
36621do
36622  # Extract the first word of "$ac_prog", so it can be a program name with args.
36623set dummy $ac_prog; ac_word=$2
36624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36625$as_echo_n "checking for $ac_word... " >&6; }
36626if ${ac_cv_path_MCS+:} false; then :
36627  $as_echo_n "(cached) " >&6
36628else
36629  case $MCS in
36630  [\\/]* | ?:[\\/]*)
36631  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36632  ;;
36633  *)
36634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36635for as_dir in $PATH
36636do
36637  IFS=$as_save_IFS
36638  test -z "$as_dir" && as_dir=.
36639    for ac_exec_ext in '' $ac_executable_extensions; do
36640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36641    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36643    break 2
36644  fi
36645done
36646  done
36647IFS=$as_save_IFS
36648
36649  ;;
36650esac
36651fi
36652MCS=$ac_cv_path_MCS
36653if test -n "$MCS"; then
36654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36655$as_echo "$MCS" >&6; }
36656else
36657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36658$as_echo "no" >&6; }
36659fi
36660
36661
36662  test -n "$MCS" && break
36663done
36664
36665  else
36666    # The variable is set, but is it from the command line or the environment?
36667
36668    # Try to remove the string !MCS! from our list.
36669    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36670    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36671      # If it failed, the variable was not from the command line. Ignore it,
36672      # but warn the user (except for BASH, which is always set by the calling BASH).
36673      if test "xMCS" != xBASH; then
36674        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36675$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36676      fi
36677      # Try to locate tool using the code snippet
36678      for ac_prog in mcs
36679do
36680  # Extract the first word of "$ac_prog", so it can be a program name with args.
36681set dummy $ac_prog; ac_word=$2
36682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36683$as_echo_n "checking for $ac_word... " >&6; }
36684if ${ac_cv_path_MCS+:} false; then :
36685  $as_echo_n "(cached) " >&6
36686else
36687  case $MCS in
36688  [\\/]* | ?:[\\/]*)
36689  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36690  ;;
36691  *)
36692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36693for as_dir in $PATH
36694do
36695  IFS=$as_save_IFS
36696  test -z "$as_dir" && as_dir=.
36697    for ac_exec_ext in '' $ac_executable_extensions; do
36698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36699    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36701    break 2
36702  fi
36703done
36704  done
36705IFS=$as_save_IFS
36706
36707  ;;
36708esac
36709fi
36710MCS=$ac_cv_path_MCS
36711if test -n "$MCS"; then
36712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36713$as_echo "$MCS" >&6; }
36714else
36715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36716$as_echo "no" >&6; }
36717fi
36718
36719
36720  test -n "$MCS" && break
36721done
36722
36723    else
36724      # If it succeeded, then it was overridden by the user. We will use it
36725      # for the tool.
36726
36727      # First remove it from the list of overridden variables, so we can test
36728      # for unknown variables in the end.
36729      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36730
36731      # Check if the provided tool contains a complete path.
36732      tool_specified="$MCS"
36733      tool_basename="${tool_specified##*/}"
36734      if test "x$tool_basename" = "x$tool_specified"; then
36735        # A command without a complete path is provided, search $PATH.
36736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36737$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36738        # Extract the first word of "$tool_basename", so it can be a program name with args.
36739set dummy $tool_basename; ac_word=$2
36740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36741$as_echo_n "checking for $ac_word... " >&6; }
36742if ${ac_cv_path_MCS+:} false; then :
36743  $as_echo_n "(cached) " >&6
36744else
36745  case $MCS in
36746  [\\/]* | ?:[\\/]*)
36747  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36748  ;;
36749  *)
36750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36751for as_dir in $PATH
36752do
36753  IFS=$as_save_IFS
36754  test -z "$as_dir" && as_dir=.
36755    for ac_exec_ext in '' $ac_executable_extensions; do
36756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36757    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36759    break 2
36760  fi
36761done
36762  done
36763IFS=$as_save_IFS
36764
36765  ;;
36766esac
36767fi
36768MCS=$ac_cv_path_MCS
36769if test -n "$MCS"; then
36770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36771$as_echo "$MCS" >&6; }
36772else
36773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36774$as_echo "no" >&6; }
36775fi
36776
36777
36778        if test "x$MCS" = x; then
36779          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36780        fi
36781      else
36782        # Otherwise we believe it is a complete path. Use it as it is.
36783        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36784$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36786$as_echo_n "checking for MCS... " >&6; }
36787        if test ! -x "$tool_specified"; then
36788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36789$as_echo "not found" >&6; }
36790          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36791        fi
36792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36793$as_echo "$tool_specified" >&6; }
36794      fi
36795    fi
36796  fi
36797
36798
36799
36800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36801
36802  # First separate the path from the arguments. This will split at the first
36803  # space.
36804  complete="$MCS"
36805  path="${complete%% *}"
36806  tmp="$complete EOL"
36807  arguments="${tmp#* }"
36808
36809  # Input might be given as Windows format, start by converting to
36810  # unix format.
36811  new_path=`$CYGPATH -u "$path"`
36812
36813  # Now try to locate executable using which
36814  new_path=`$WHICH "$new_path" 2> /dev/null`
36815  # bat and cmd files are not always considered executable in cygwin causing which
36816  # to not find them
36817  if test "x$new_path" = x \
36818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36820    new_path=`$CYGPATH -u "$path"`
36821  fi
36822  if test "x$new_path" = x; then
36823    # Oops. Which didn't find the executable.
36824    # The splitting of arguments from the executable at a space might have been incorrect,
36825    # since paths with space are more likely in Windows. Give it another try with the whole
36826    # argument.
36827    path="$complete"
36828    arguments="EOL"
36829    new_path=`$CYGPATH -u "$path"`
36830    new_path=`$WHICH "$new_path" 2> /dev/null`
36831    # bat and cmd files are not always considered executable in cygwin causing which
36832    # to not find them
36833    if test "x$new_path" = x \
36834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36836      new_path=`$CYGPATH -u "$path"`
36837    fi
36838    if test "x$new_path" = x; then
36839      # It's still not found. Now this is an unrecoverable error.
36840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36841$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36842      has_space=`$ECHO "$complete" | $GREP " "`
36843      if test "x$has_space" != x; then
36844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36846      fi
36847      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36848    fi
36849  fi
36850
36851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36854  # "foo.exe" is OK but "foo" is an error.
36855  #
36856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36857  # It is also a way to make sure we got the proper file name for the real test later on.
36858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36859  if test "x$test_shortpath" = x; then
36860    # Short path failed, file does not exist as specified.
36861    # Try adding .exe or .cmd
36862    if test -f "${new_path}.exe"; then
36863      input_to_shortpath="${new_path}.exe"
36864    elif test -f "${new_path}.cmd"; then
36865      input_to_shortpath="${new_path}.cmd"
36866    else
36867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36868$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36871      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36872    fi
36873  else
36874    input_to_shortpath="$new_path"
36875  fi
36876
36877  # Call helper function which possibly converts this using DOS-style short mode.
36878  # If so, the updated path is stored in $new_path.
36879  new_path="$input_to_shortpath"
36880
36881  input_path="$input_to_shortpath"
36882  # Check if we need to convert this using DOS-style short mode. If the path
36883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36884  # take no chances and rewrite it.
36885  # Note: m4 eats our [], so we need to use [ and ] instead.
36886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36887  if test "x$has_forbidden_chars" != x; then
36888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36892      # Going to short mode and back again did indeed matter. Since short mode is
36893      # case insensitive, let's make it lowercase to improve readability.
36894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36895      # Now convert it back to Unix-stile (cygpath)
36896      input_path=`$CYGPATH -u "$shortmode_path"`
36897      new_path="$input_path"
36898    fi
36899  fi
36900
36901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36902  if test "x$test_cygdrive_prefix" = x; then
36903    # As a simple fix, exclude /usr/bin since it's not a real path.
36904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36906      # a path prefixed by /cygdrive for fixpath to work.
36907      new_path="$CYGWIN_ROOT_PATH$input_path"
36908    fi
36909  fi
36910
36911  # remove trailing .exe if any
36912  new_path="${new_path/%.exe/}"
36913
36914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36915
36916  # First separate the path from the arguments. This will split at the first
36917  # space.
36918  complete="$MCS"
36919  path="${complete%% *}"
36920  tmp="$complete EOL"
36921  arguments="${tmp#* }"
36922
36923  # Input might be given as Windows format, start by converting to
36924  # unix format.
36925  new_path="$path"
36926
36927  windows_path="$new_path"
36928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36929    unix_path=`$CYGPATH -u "$windows_path"`
36930    new_path="$unix_path"
36931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36933    new_path="$unix_path"
36934  fi
36935
36936
36937  # Now try to locate executable using which
36938  new_path=`$WHICH "$new_path" 2> /dev/null`
36939
36940  if test "x$new_path" = x; then
36941    # Oops. Which didn't find the executable.
36942    # The splitting of arguments from the executable at a space might have been incorrect,
36943    # since paths with space are more likely in Windows. Give it another try with the whole
36944    # argument.
36945    path="$complete"
36946    arguments="EOL"
36947    new_path="$path"
36948
36949  windows_path="$new_path"
36950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36951    unix_path=`$CYGPATH -u "$windows_path"`
36952    new_path="$unix_path"
36953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36955    new_path="$unix_path"
36956  fi
36957
36958
36959    new_path=`$WHICH "$new_path" 2> /dev/null`
36960    # bat and cmd files are not always considered executable in MSYS causing which
36961    # to not find them
36962    if test "x$new_path" = x \
36963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36965      new_path="$path"
36966
36967  windows_path="$new_path"
36968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36969    unix_path=`$CYGPATH -u "$windows_path"`
36970    new_path="$unix_path"
36971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36973    new_path="$unix_path"
36974  fi
36975
36976    fi
36977
36978    if test "x$new_path" = x; then
36979      # It's still not found. Now this is an unrecoverable error.
36980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36981$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36982      has_space=`$ECHO "$complete" | $GREP " "`
36983      if test "x$has_space" != x; then
36984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36986      fi
36987      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36988    fi
36989  fi
36990
36991  # Now new_path has a complete unix path to the binary
36992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36993    # Keep paths in /bin as-is, but remove trailing .exe if any
36994    new_path="${new_path/%.exe/}"
36995    # Do not save /bin paths to all_fixpath_prefixes!
36996  else
36997    # Not in mixed or Windows style, start by that.
36998    new_path=`cmd //c echo $new_path`
36999
37000  input_path="$new_path"
37001  # Check if we need to convert this using DOS-style short mode. If the path
37002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37003  # take no chances and rewrite it.
37004  # Note: m4 eats our [], so we need to use [ and ] instead.
37005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37006  if test "x$has_forbidden_chars" != x; then
37007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37009  fi
37010
37011    # Output is in $new_path
37012
37013  windows_path="$new_path"
37014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37015    unix_path=`$CYGPATH -u "$windows_path"`
37016    new_path="$unix_path"
37017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37019    new_path="$unix_path"
37020  fi
37021
37022    # remove trailing .exe if any
37023    new_path="${new_path/%.exe/}"
37024
37025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37027  fi
37028
37029  else
37030    # We're on a posix platform. Hooray! :)
37031    # First separate the path from the arguments. This will split at the first
37032    # space.
37033    complete="$MCS"
37034    path="${complete%% *}"
37035    tmp="$complete EOL"
37036    arguments="${tmp#* }"
37037
37038    # Cannot rely on the command "which" here since it doesn't always work.
37039    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37040    if test -z "$is_absolute_path"; then
37041      # Path to executable is not absolute. Find it.
37042      IFS_save="$IFS"
37043      IFS=:
37044      for p in $PATH; do
37045        if test -f "$p/$path" && test -x "$p/$path"; then
37046          new_path="$p/$path"
37047          break
37048        fi
37049      done
37050      IFS="$IFS_save"
37051    else
37052      # This is an absolute path, we can use it without further modifications.
37053      new_path="$path"
37054    fi
37055
37056    if test "x$new_path" = x; then
37057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37058$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37059      has_space=`$ECHO "$complete" | $GREP " "`
37060      if test "x$has_space" != x; then
37061        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37063      fi
37064      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37065    fi
37066  fi
37067
37068  # Now join together the path and the arguments once again
37069  if test "x$arguments" != xEOL; then
37070    new_complete="$new_path ${arguments% *}"
37071  else
37072    new_complete="$new_path"
37073  fi
37074
37075  if test "x$complete" != "x$new_complete"; then
37076    MCS="$new_complete"
37077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37078$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37079  fi
37080
37081  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37082    # FIXME: we should unify this with the solaris case above.
37083
37084
37085  # Publish this variable in the help.
37086
37087
37088  if test "x$STRIP" = x; then
37089    # The variable is not set by user, try to locate tool using the code snippet
37090    if test -n "$ac_tool_prefix"; then
37091  for ac_prog in strip
37092  do
37093    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37096$as_echo_n "checking for $ac_word... " >&6; }
37097if ${ac_cv_prog_STRIP+:} false; then :
37098  $as_echo_n "(cached) " >&6
37099else
37100  if test -n "$STRIP"; then
37101  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37102else
37103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37104for as_dir in $PATH
37105do
37106  IFS=$as_save_IFS
37107  test -z "$as_dir" && as_dir=.
37108    for ac_exec_ext in '' $ac_executable_extensions; do
37109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37110    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37112    break 2
37113  fi
37114done
37115  done
37116IFS=$as_save_IFS
37117
37118fi
37119fi
37120STRIP=$ac_cv_prog_STRIP
37121if test -n "$STRIP"; then
37122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37123$as_echo "$STRIP" >&6; }
37124else
37125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37126$as_echo "no" >&6; }
37127fi
37128
37129
37130    test -n "$STRIP" && break
37131  done
37132fi
37133if test -z "$STRIP"; then
37134  ac_ct_STRIP=$STRIP
37135  for ac_prog in strip
37136do
37137  # Extract the first word of "$ac_prog", so it can be a program name with args.
37138set dummy $ac_prog; ac_word=$2
37139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37140$as_echo_n "checking for $ac_word... " >&6; }
37141if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37142  $as_echo_n "(cached) " >&6
37143else
37144  if test -n "$ac_ct_STRIP"; then
37145  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37146else
37147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37148for as_dir in $PATH
37149do
37150  IFS=$as_save_IFS
37151  test -z "$as_dir" && as_dir=.
37152    for ac_exec_ext in '' $ac_executable_extensions; do
37153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37154    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37156    break 2
37157  fi
37158done
37159  done
37160IFS=$as_save_IFS
37161
37162fi
37163fi
37164ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37165if test -n "$ac_ct_STRIP"; then
37166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37167$as_echo "$ac_ct_STRIP" >&6; }
37168else
37169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37170$as_echo "no" >&6; }
37171fi
37172
37173
37174  test -n "$ac_ct_STRIP" && break
37175done
37176
37177  if test "x$ac_ct_STRIP" = x; then
37178    STRIP=""
37179  else
37180    case $cross_compiling:$ac_tool_warned in
37181yes:)
37182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37184ac_tool_warned=yes ;;
37185esac
37186    STRIP=$ac_ct_STRIP
37187  fi
37188fi
37189
37190  else
37191    # The variable is set, but is it from the command line or the environment?
37192
37193    # Try to remove the string !STRIP! from our list.
37194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37196      # If it failed, the variable was not from the command line. Ignore it,
37197      # but warn the user (except for BASH, which is always set by the calling BASH).
37198      if test "xSTRIP" != xBASH; then
37199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37200$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37201      fi
37202      # Try to locate tool using the code snippet
37203      if test -n "$ac_tool_prefix"; then
37204  for ac_prog in strip
37205  do
37206    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37207set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37209$as_echo_n "checking for $ac_word... " >&6; }
37210if ${ac_cv_prog_STRIP+:} false; then :
37211  $as_echo_n "(cached) " >&6
37212else
37213  if test -n "$STRIP"; then
37214  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37215else
37216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37217for as_dir in $PATH
37218do
37219  IFS=$as_save_IFS
37220  test -z "$as_dir" && as_dir=.
37221    for ac_exec_ext in '' $ac_executable_extensions; do
37222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37223    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37225    break 2
37226  fi
37227done
37228  done
37229IFS=$as_save_IFS
37230
37231fi
37232fi
37233STRIP=$ac_cv_prog_STRIP
37234if test -n "$STRIP"; then
37235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37236$as_echo "$STRIP" >&6; }
37237else
37238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37239$as_echo "no" >&6; }
37240fi
37241
37242
37243    test -n "$STRIP" && break
37244  done
37245fi
37246if test -z "$STRIP"; then
37247  ac_ct_STRIP=$STRIP
37248  for ac_prog in strip
37249do
37250  # Extract the first word of "$ac_prog", so it can be a program name with args.
37251set dummy $ac_prog; ac_word=$2
37252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37253$as_echo_n "checking for $ac_word... " >&6; }
37254if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37255  $as_echo_n "(cached) " >&6
37256else
37257  if test -n "$ac_ct_STRIP"; then
37258  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37259else
37260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37261for as_dir in $PATH
37262do
37263  IFS=$as_save_IFS
37264  test -z "$as_dir" && as_dir=.
37265    for ac_exec_ext in '' $ac_executable_extensions; do
37266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37267    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37269    break 2
37270  fi
37271done
37272  done
37273IFS=$as_save_IFS
37274
37275fi
37276fi
37277ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37278if test -n "$ac_ct_STRIP"; then
37279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37280$as_echo "$ac_ct_STRIP" >&6; }
37281else
37282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37283$as_echo "no" >&6; }
37284fi
37285
37286
37287  test -n "$ac_ct_STRIP" && break
37288done
37289
37290  if test "x$ac_ct_STRIP" = x; then
37291    STRIP=""
37292  else
37293    case $cross_compiling:$ac_tool_warned in
37294yes:)
37295{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37296$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37297ac_tool_warned=yes ;;
37298esac
37299    STRIP=$ac_ct_STRIP
37300  fi
37301fi
37302
37303    else
37304      # If it succeeded, then it was overridden by the user. We will use it
37305      # for the tool.
37306
37307      # First remove it from the list of overridden variables, so we can test
37308      # for unknown variables in the end.
37309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37310
37311      # Check if the provided tool contains a complete path.
37312      tool_specified="$STRIP"
37313      tool_basename="${tool_specified##*/}"
37314      if test "x$tool_basename" = "x$tool_specified"; then
37315        # A command without a complete path is provided, search $PATH.
37316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37317$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37318        # Extract the first word of "$tool_basename", so it can be a program name with args.
37319set dummy $tool_basename; ac_word=$2
37320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37321$as_echo_n "checking for $ac_word... " >&6; }
37322if ${ac_cv_path_STRIP+:} false; then :
37323  $as_echo_n "(cached) " >&6
37324else
37325  case $STRIP in
37326  [\\/]* | ?:[\\/]*)
37327  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37328  ;;
37329  *)
37330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37331for as_dir in $PATH
37332do
37333  IFS=$as_save_IFS
37334  test -z "$as_dir" && as_dir=.
37335    for ac_exec_ext in '' $ac_executable_extensions; do
37336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37337    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37339    break 2
37340  fi
37341done
37342  done
37343IFS=$as_save_IFS
37344
37345  ;;
37346esac
37347fi
37348STRIP=$ac_cv_path_STRIP
37349if test -n "$STRIP"; then
37350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37351$as_echo "$STRIP" >&6; }
37352else
37353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37354$as_echo "no" >&6; }
37355fi
37356
37357
37358        if test "x$STRIP" = x; then
37359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37360        fi
37361      else
37362        # Otherwise we believe it is a complete path. Use it as it is.
37363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37364$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37366$as_echo_n "checking for STRIP... " >&6; }
37367        if test ! -x "$tool_specified"; then
37368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37369$as_echo "not found" >&6; }
37370          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37371        fi
37372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37373$as_echo "$tool_specified" >&6; }
37374      fi
37375    fi
37376  fi
37377
37378
37379
37380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37381
37382  # First separate the path from the arguments. This will split at the first
37383  # space.
37384  complete="$STRIP"
37385  path="${complete%% *}"
37386  tmp="$complete EOL"
37387  arguments="${tmp#* }"
37388
37389  # Input might be given as Windows format, start by converting to
37390  # unix format.
37391  new_path=`$CYGPATH -u "$path"`
37392
37393  # Now try to locate executable using which
37394  new_path=`$WHICH "$new_path" 2> /dev/null`
37395  # bat and cmd files are not always considered executable in cygwin causing which
37396  # to not find them
37397  if test "x$new_path" = x \
37398      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37399      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37400    new_path=`$CYGPATH -u "$path"`
37401  fi
37402  if test "x$new_path" = x; then
37403    # Oops. Which didn't find the executable.
37404    # The splitting of arguments from the executable at a space might have been incorrect,
37405    # since paths with space are more likely in Windows. Give it another try with the whole
37406    # argument.
37407    path="$complete"
37408    arguments="EOL"
37409    new_path=`$CYGPATH -u "$path"`
37410    new_path=`$WHICH "$new_path" 2> /dev/null`
37411    # bat and cmd files are not always considered executable in cygwin causing which
37412    # to not find them
37413    if test "x$new_path" = x \
37414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37416      new_path=`$CYGPATH -u "$path"`
37417    fi
37418    if test "x$new_path" = x; then
37419      # It's still not found. Now this is an unrecoverable error.
37420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37421$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37422      has_space=`$ECHO "$complete" | $GREP " "`
37423      if test "x$has_space" != x; then
37424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37426      fi
37427      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37428    fi
37429  fi
37430
37431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37434  # "foo.exe" is OK but "foo" is an error.
37435  #
37436  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37437  # It is also a way to make sure we got the proper file name for the real test later on.
37438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37439  if test "x$test_shortpath" = x; then
37440    # Short path failed, file does not exist as specified.
37441    # Try adding .exe or .cmd
37442    if test -f "${new_path}.exe"; then
37443      input_to_shortpath="${new_path}.exe"
37444    elif test -f "${new_path}.cmd"; then
37445      input_to_shortpath="${new_path}.cmd"
37446    else
37447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37448$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37451      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37452    fi
37453  else
37454    input_to_shortpath="$new_path"
37455  fi
37456
37457  # Call helper function which possibly converts this using DOS-style short mode.
37458  # If so, the updated path is stored in $new_path.
37459  new_path="$input_to_shortpath"
37460
37461  input_path="$input_to_shortpath"
37462  # Check if we need to convert this using DOS-style short mode. If the path
37463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37464  # take no chances and rewrite it.
37465  # Note: m4 eats our [], so we need to use [ and ] instead.
37466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37467  if test "x$has_forbidden_chars" != x; then
37468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37472      # Going to short mode and back again did indeed matter. Since short mode is
37473      # case insensitive, let's make it lowercase to improve readability.
37474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37475      # Now convert it back to Unix-stile (cygpath)
37476      input_path=`$CYGPATH -u "$shortmode_path"`
37477      new_path="$input_path"
37478    fi
37479  fi
37480
37481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37482  if test "x$test_cygdrive_prefix" = x; then
37483    # As a simple fix, exclude /usr/bin since it's not a real path.
37484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37486      # a path prefixed by /cygdrive for fixpath to work.
37487      new_path="$CYGWIN_ROOT_PATH$input_path"
37488    fi
37489  fi
37490
37491  # remove trailing .exe if any
37492  new_path="${new_path/%.exe/}"
37493
37494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37495
37496  # First separate the path from the arguments. This will split at the first
37497  # space.
37498  complete="$STRIP"
37499  path="${complete%% *}"
37500  tmp="$complete EOL"
37501  arguments="${tmp#* }"
37502
37503  # Input might be given as Windows format, start by converting to
37504  # unix format.
37505  new_path="$path"
37506
37507  windows_path="$new_path"
37508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37509    unix_path=`$CYGPATH -u "$windows_path"`
37510    new_path="$unix_path"
37511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37513    new_path="$unix_path"
37514  fi
37515
37516
37517  # Now try to locate executable using which
37518  new_path=`$WHICH "$new_path" 2> /dev/null`
37519
37520  if test "x$new_path" = x; then
37521    # Oops. Which didn't find the executable.
37522    # The splitting of arguments from the executable at a space might have been incorrect,
37523    # since paths with space are more likely in Windows. Give it another try with the whole
37524    # argument.
37525    path="$complete"
37526    arguments="EOL"
37527    new_path="$path"
37528
37529  windows_path="$new_path"
37530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37531    unix_path=`$CYGPATH -u "$windows_path"`
37532    new_path="$unix_path"
37533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37535    new_path="$unix_path"
37536  fi
37537
37538
37539    new_path=`$WHICH "$new_path" 2> /dev/null`
37540    # bat and cmd files are not always considered executable in MSYS causing which
37541    # to not find them
37542    if test "x$new_path" = x \
37543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37545      new_path="$path"
37546
37547  windows_path="$new_path"
37548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37549    unix_path=`$CYGPATH -u "$windows_path"`
37550    new_path="$unix_path"
37551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37553    new_path="$unix_path"
37554  fi
37555
37556    fi
37557
37558    if test "x$new_path" = x; then
37559      # It's still not found. Now this is an unrecoverable error.
37560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37561$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37562      has_space=`$ECHO "$complete" | $GREP " "`
37563      if test "x$has_space" != x; then
37564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37566      fi
37567      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37568    fi
37569  fi
37570
37571  # Now new_path has a complete unix path to the binary
37572  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37573    # Keep paths in /bin as-is, but remove trailing .exe if any
37574    new_path="${new_path/%.exe/}"
37575    # Do not save /bin paths to all_fixpath_prefixes!
37576  else
37577    # Not in mixed or Windows style, start by that.
37578    new_path=`cmd //c echo $new_path`
37579
37580  input_path="$new_path"
37581  # Check if we need to convert this using DOS-style short mode. If the path
37582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37583  # take no chances and rewrite it.
37584  # Note: m4 eats our [], so we need to use [ and ] instead.
37585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37586  if test "x$has_forbidden_chars" != x; then
37587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37589  fi
37590
37591    # Output is in $new_path
37592
37593  windows_path="$new_path"
37594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37595    unix_path=`$CYGPATH -u "$windows_path"`
37596    new_path="$unix_path"
37597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37599    new_path="$unix_path"
37600  fi
37601
37602    # remove trailing .exe if any
37603    new_path="${new_path/%.exe/}"
37604
37605    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37606    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37607  fi
37608
37609  else
37610    # We're on a posix platform. Hooray! :)
37611    # First separate the path from the arguments. This will split at the first
37612    # space.
37613    complete="$STRIP"
37614    path="${complete%% *}"
37615    tmp="$complete EOL"
37616    arguments="${tmp#* }"
37617
37618    # Cannot rely on the command "which" here since it doesn't always work.
37619    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37620    if test -z "$is_absolute_path"; then
37621      # Path to executable is not absolute. Find it.
37622      IFS_save="$IFS"
37623      IFS=:
37624      for p in $PATH; do
37625        if test -f "$p/$path" && test -x "$p/$path"; then
37626          new_path="$p/$path"
37627          break
37628        fi
37629      done
37630      IFS="$IFS_save"
37631    else
37632      # This is an absolute path, we can use it without further modifications.
37633      new_path="$path"
37634    fi
37635
37636    if test "x$new_path" = x; then
37637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37638$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37639      has_space=`$ECHO "$complete" | $GREP " "`
37640      if test "x$has_space" != x; then
37641        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37642$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37643      fi
37644      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37645    fi
37646  fi
37647
37648  # Now join together the path and the arguments once again
37649  if test "x$arguments" != xEOL; then
37650    new_complete="$new_path ${arguments% *}"
37651  else
37652    new_complete="$new_path"
37653  fi
37654
37655  if test "x$complete" != "x$new_complete"; then
37656    STRIP="$new_complete"
37657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37658$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37659  fi
37660
37661
37662
37663  # Publish this variable in the help.
37664
37665
37666  if test "x$NM" = x; then
37667    # The variable is not set by user, try to locate tool using the code snippet
37668    if test -n "$ac_tool_prefix"; then
37669  for ac_prog in nm
37670  do
37671    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37672set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37674$as_echo_n "checking for $ac_word... " >&6; }
37675if ${ac_cv_prog_NM+:} false; then :
37676  $as_echo_n "(cached) " >&6
37677else
37678  if test -n "$NM"; then
37679  ac_cv_prog_NM="$NM" # Let the user override the test.
37680else
37681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37682for as_dir in $PATH
37683do
37684  IFS=$as_save_IFS
37685  test -z "$as_dir" && as_dir=.
37686    for ac_exec_ext in '' $ac_executable_extensions; do
37687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37688    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37690    break 2
37691  fi
37692done
37693  done
37694IFS=$as_save_IFS
37695
37696fi
37697fi
37698NM=$ac_cv_prog_NM
37699if test -n "$NM"; then
37700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37701$as_echo "$NM" >&6; }
37702else
37703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37704$as_echo "no" >&6; }
37705fi
37706
37707
37708    test -n "$NM" && break
37709  done
37710fi
37711if test -z "$NM"; then
37712  ac_ct_NM=$NM
37713  for ac_prog in nm
37714do
37715  # Extract the first word of "$ac_prog", so it can be a program name with args.
37716set dummy $ac_prog; ac_word=$2
37717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37718$as_echo_n "checking for $ac_word... " >&6; }
37719if ${ac_cv_prog_ac_ct_NM+:} false; then :
37720  $as_echo_n "(cached) " >&6
37721else
37722  if test -n "$ac_ct_NM"; then
37723  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37724else
37725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37726for as_dir in $PATH
37727do
37728  IFS=$as_save_IFS
37729  test -z "$as_dir" && as_dir=.
37730    for ac_exec_ext in '' $ac_executable_extensions; do
37731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37732    ac_cv_prog_ac_ct_NM="$ac_prog"
37733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37734    break 2
37735  fi
37736done
37737  done
37738IFS=$as_save_IFS
37739
37740fi
37741fi
37742ac_ct_NM=$ac_cv_prog_ac_ct_NM
37743if test -n "$ac_ct_NM"; then
37744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37745$as_echo "$ac_ct_NM" >&6; }
37746else
37747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37748$as_echo "no" >&6; }
37749fi
37750
37751
37752  test -n "$ac_ct_NM" && break
37753done
37754
37755  if test "x$ac_ct_NM" = x; then
37756    NM=""
37757  else
37758    case $cross_compiling:$ac_tool_warned in
37759yes:)
37760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37762ac_tool_warned=yes ;;
37763esac
37764    NM=$ac_ct_NM
37765  fi
37766fi
37767
37768  else
37769    # The variable is set, but is it from the command line or the environment?
37770
37771    # Try to remove the string !NM! from our list.
37772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37774      # If it failed, the variable was not from the command line. Ignore it,
37775      # but warn the user (except for BASH, which is always set by the calling BASH).
37776      if test "xNM" != xBASH; then
37777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37778$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37779      fi
37780      # Try to locate tool using the code snippet
37781      if test -n "$ac_tool_prefix"; then
37782  for ac_prog in nm
37783  do
37784    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37785set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37787$as_echo_n "checking for $ac_word... " >&6; }
37788if ${ac_cv_prog_NM+:} false; then :
37789  $as_echo_n "(cached) " >&6
37790else
37791  if test -n "$NM"; then
37792  ac_cv_prog_NM="$NM" # Let the user override the test.
37793else
37794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37795for as_dir in $PATH
37796do
37797  IFS=$as_save_IFS
37798  test -z "$as_dir" && as_dir=.
37799    for ac_exec_ext in '' $ac_executable_extensions; do
37800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37801    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37803    break 2
37804  fi
37805done
37806  done
37807IFS=$as_save_IFS
37808
37809fi
37810fi
37811NM=$ac_cv_prog_NM
37812if test -n "$NM"; then
37813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37814$as_echo "$NM" >&6; }
37815else
37816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37817$as_echo "no" >&6; }
37818fi
37819
37820
37821    test -n "$NM" && break
37822  done
37823fi
37824if test -z "$NM"; then
37825  ac_ct_NM=$NM
37826  for ac_prog in nm
37827do
37828  # Extract the first word of "$ac_prog", so it can be a program name with args.
37829set dummy $ac_prog; ac_word=$2
37830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37831$as_echo_n "checking for $ac_word... " >&6; }
37832if ${ac_cv_prog_ac_ct_NM+:} false; then :
37833  $as_echo_n "(cached) " >&6
37834else
37835  if test -n "$ac_ct_NM"; then
37836  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37837else
37838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37839for as_dir in $PATH
37840do
37841  IFS=$as_save_IFS
37842  test -z "$as_dir" && as_dir=.
37843    for ac_exec_ext in '' $ac_executable_extensions; do
37844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37845    ac_cv_prog_ac_ct_NM="$ac_prog"
37846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37847    break 2
37848  fi
37849done
37850  done
37851IFS=$as_save_IFS
37852
37853fi
37854fi
37855ac_ct_NM=$ac_cv_prog_ac_ct_NM
37856if test -n "$ac_ct_NM"; then
37857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37858$as_echo "$ac_ct_NM" >&6; }
37859else
37860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37861$as_echo "no" >&6; }
37862fi
37863
37864
37865  test -n "$ac_ct_NM" && break
37866done
37867
37868  if test "x$ac_ct_NM" = x; then
37869    NM=""
37870  else
37871    case $cross_compiling:$ac_tool_warned in
37872yes:)
37873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37875ac_tool_warned=yes ;;
37876esac
37877    NM=$ac_ct_NM
37878  fi
37879fi
37880
37881    else
37882      # If it succeeded, then it was overridden by the user. We will use it
37883      # for the tool.
37884
37885      # First remove it from the list of overridden variables, so we can test
37886      # for unknown variables in the end.
37887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37888
37889      # Check if the provided tool contains a complete path.
37890      tool_specified="$NM"
37891      tool_basename="${tool_specified##*/}"
37892      if test "x$tool_basename" = "x$tool_specified"; then
37893        # A command without a complete path is provided, search $PATH.
37894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37895$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37896        # Extract the first word of "$tool_basename", so it can be a program name with args.
37897set dummy $tool_basename; ac_word=$2
37898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37899$as_echo_n "checking for $ac_word... " >&6; }
37900if ${ac_cv_path_NM+:} false; then :
37901  $as_echo_n "(cached) " >&6
37902else
37903  case $NM in
37904  [\\/]* | ?:[\\/]*)
37905  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37906  ;;
37907  *)
37908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37909for as_dir in $PATH
37910do
37911  IFS=$as_save_IFS
37912  test -z "$as_dir" && as_dir=.
37913    for ac_exec_ext in '' $ac_executable_extensions; do
37914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37915    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37917    break 2
37918  fi
37919done
37920  done
37921IFS=$as_save_IFS
37922
37923  ;;
37924esac
37925fi
37926NM=$ac_cv_path_NM
37927if test -n "$NM"; then
37928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37929$as_echo "$NM" >&6; }
37930else
37931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37932$as_echo "no" >&6; }
37933fi
37934
37935
37936        if test "x$NM" = x; then
37937          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37938        fi
37939      else
37940        # Otherwise we believe it is a complete path. Use it as it is.
37941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37942$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37944$as_echo_n "checking for NM... " >&6; }
37945        if test ! -x "$tool_specified"; then
37946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37947$as_echo "not found" >&6; }
37948          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37949        fi
37950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37951$as_echo "$tool_specified" >&6; }
37952      fi
37953    fi
37954  fi
37955
37956
37957
37958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37959
37960  # First separate the path from the arguments. This will split at the first
37961  # space.
37962  complete="$NM"
37963  path="${complete%% *}"
37964  tmp="$complete EOL"
37965  arguments="${tmp#* }"
37966
37967  # Input might be given as Windows format, start by converting to
37968  # unix format.
37969  new_path=`$CYGPATH -u "$path"`
37970
37971  # Now try to locate executable using which
37972  new_path=`$WHICH "$new_path" 2> /dev/null`
37973  # bat and cmd files are not always considered executable in cygwin causing which
37974  # to not find them
37975  if test "x$new_path" = x \
37976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37978    new_path=`$CYGPATH -u "$path"`
37979  fi
37980  if test "x$new_path" = x; then
37981    # Oops. Which didn't find the executable.
37982    # The splitting of arguments from the executable at a space might have been incorrect,
37983    # since paths with space are more likely in Windows. Give it another try with the whole
37984    # argument.
37985    path="$complete"
37986    arguments="EOL"
37987    new_path=`$CYGPATH -u "$path"`
37988    new_path=`$WHICH "$new_path" 2> /dev/null`
37989    # bat and cmd files are not always considered executable in cygwin causing which
37990    # to not find them
37991    if test "x$new_path" = x \
37992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37994      new_path=`$CYGPATH -u "$path"`
37995    fi
37996    if test "x$new_path" = x; then
37997      # It's still not found. Now this is an unrecoverable error.
37998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37999$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38000      has_space=`$ECHO "$complete" | $GREP " "`
38001      if test "x$has_space" != x; then
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38004      fi
38005      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38006    fi
38007  fi
38008
38009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38012  # "foo.exe" is OK but "foo" is an error.
38013  #
38014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38015  # It is also a way to make sure we got the proper file name for the real test later on.
38016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38017  if test "x$test_shortpath" = x; then
38018    # Short path failed, file does not exist as specified.
38019    # Try adding .exe or .cmd
38020    if test -f "${new_path}.exe"; then
38021      input_to_shortpath="${new_path}.exe"
38022    elif test -f "${new_path}.cmd"; then
38023      input_to_shortpath="${new_path}.cmd"
38024    else
38025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38026$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38029      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38030    fi
38031  else
38032    input_to_shortpath="$new_path"
38033  fi
38034
38035  # Call helper function which possibly converts this using DOS-style short mode.
38036  # If so, the updated path is stored in $new_path.
38037  new_path="$input_to_shortpath"
38038
38039  input_path="$input_to_shortpath"
38040  # Check if we need to convert this using DOS-style short mode. If the path
38041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38042  # take no chances and rewrite it.
38043  # Note: m4 eats our [], so we need to use [ and ] instead.
38044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38045  if test "x$has_forbidden_chars" != x; then
38046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38050      # Going to short mode and back again did indeed matter. Since short mode is
38051      # case insensitive, let's make it lowercase to improve readability.
38052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38053      # Now convert it back to Unix-stile (cygpath)
38054      input_path=`$CYGPATH -u "$shortmode_path"`
38055      new_path="$input_path"
38056    fi
38057  fi
38058
38059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38060  if test "x$test_cygdrive_prefix" = x; then
38061    # As a simple fix, exclude /usr/bin since it's not a real path.
38062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38064      # a path prefixed by /cygdrive for fixpath to work.
38065      new_path="$CYGWIN_ROOT_PATH$input_path"
38066    fi
38067  fi
38068
38069  # remove trailing .exe if any
38070  new_path="${new_path/%.exe/}"
38071
38072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38073
38074  # First separate the path from the arguments. This will split at the first
38075  # space.
38076  complete="$NM"
38077  path="${complete%% *}"
38078  tmp="$complete EOL"
38079  arguments="${tmp#* }"
38080
38081  # Input might be given as Windows format, start by converting to
38082  # unix format.
38083  new_path="$path"
38084
38085  windows_path="$new_path"
38086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38087    unix_path=`$CYGPATH -u "$windows_path"`
38088    new_path="$unix_path"
38089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38091    new_path="$unix_path"
38092  fi
38093
38094
38095  # Now try to locate executable using which
38096  new_path=`$WHICH "$new_path" 2> /dev/null`
38097
38098  if test "x$new_path" = x; then
38099    # Oops. Which didn't find the executable.
38100    # The splitting of arguments from the executable at a space might have been incorrect,
38101    # since paths with space are more likely in Windows. Give it another try with the whole
38102    # argument.
38103    path="$complete"
38104    arguments="EOL"
38105    new_path="$path"
38106
38107  windows_path="$new_path"
38108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38109    unix_path=`$CYGPATH -u "$windows_path"`
38110    new_path="$unix_path"
38111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38113    new_path="$unix_path"
38114  fi
38115
38116
38117    new_path=`$WHICH "$new_path" 2> /dev/null`
38118    # bat and cmd files are not always considered executable in MSYS causing which
38119    # to not find them
38120    if test "x$new_path" = x \
38121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38123      new_path="$path"
38124
38125  windows_path="$new_path"
38126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127    unix_path=`$CYGPATH -u "$windows_path"`
38128    new_path="$unix_path"
38129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131    new_path="$unix_path"
38132  fi
38133
38134    fi
38135
38136    if test "x$new_path" = x; then
38137      # It's still not found. Now this is an unrecoverable error.
38138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38139$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38140      has_space=`$ECHO "$complete" | $GREP " "`
38141      if test "x$has_space" != x; then
38142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38144      fi
38145      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38146    fi
38147  fi
38148
38149  # Now new_path has a complete unix path to the binary
38150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38151    # Keep paths in /bin as-is, but remove trailing .exe if any
38152    new_path="${new_path/%.exe/}"
38153    # Do not save /bin paths to all_fixpath_prefixes!
38154  else
38155    # Not in mixed or Windows style, start by that.
38156    new_path=`cmd //c echo $new_path`
38157
38158  input_path="$new_path"
38159  # Check if we need to convert this using DOS-style short mode. If the path
38160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38161  # take no chances and rewrite it.
38162  # Note: m4 eats our [], so we need to use [ and ] instead.
38163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38164  if test "x$has_forbidden_chars" != x; then
38165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38167  fi
38168
38169    # Output is in $new_path
38170
38171  windows_path="$new_path"
38172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38173    unix_path=`$CYGPATH -u "$windows_path"`
38174    new_path="$unix_path"
38175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38177    new_path="$unix_path"
38178  fi
38179
38180    # remove trailing .exe if any
38181    new_path="${new_path/%.exe/}"
38182
38183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38185  fi
38186
38187  else
38188    # We're on a posix platform. Hooray! :)
38189    # First separate the path from the arguments. This will split at the first
38190    # space.
38191    complete="$NM"
38192    path="${complete%% *}"
38193    tmp="$complete EOL"
38194    arguments="${tmp#* }"
38195
38196    # Cannot rely on the command "which" here since it doesn't always work.
38197    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38198    if test -z "$is_absolute_path"; then
38199      # Path to executable is not absolute. Find it.
38200      IFS_save="$IFS"
38201      IFS=:
38202      for p in $PATH; do
38203        if test -f "$p/$path" && test -x "$p/$path"; then
38204          new_path="$p/$path"
38205          break
38206        fi
38207      done
38208      IFS="$IFS_save"
38209    else
38210      # This is an absolute path, we can use it without further modifications.
38211      new_path="$path"
38212    fi
38213
38214    if test "x$new_path" = x; then
38215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38216$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38217      has_space=`$ECHO "$complete" | $GREP " "`
38218      if test "x$has_space" != x; then
38219        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38221      fi
38222      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38223    fi
38224  fi
38225
38226  # Now join together the path and the arguments once again
38227  if test "x$arguments" != xEOL; then
38228    new_complete="$new_path ${arguments% *}"
38229  else
38230    new_complete="$new_path"
38231  fi
38232
38233  if test "x$complete" != "x$new_complete"; then
38234    NM="$new_complete"
38235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38236$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38237  fi
38238
38239    GNM="$NM"
38240
38241  fi
38242
38243  # objcopy is used for moving debug symbols to separate files when
38244  # full debug symbols are enabled.
38245  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38246
38247
38248  # Publish this variable in the help.
38249
38250
38251  if test "x$OBJCOPY" = x; then
38252    # The variable is not set by user, try to locate tool using the code snippet
38253    if test -n "$ac_tool_prefix"; then
38254  for ac_prog in gobjcopy objcopy
38255  do
38256    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38257set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38259$as_echo_n "checking for $ac_word... " >&6; }
38260if ${ac_cv_prog_OBJCOPY+:} false; then :
38261  $as_echo_n "(cached) " >&6
38262else
38263  if test -n "$OBJCOPY"; then
38264  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38265else
38266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38267for as_dir in $PATH
38268do
38269  IFS=$as_save_IFS
38270  test -z "$as_dir" && as_dir=.
38271    for ac_exec_ext in '' $ac_executable_extensions; do
38272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38273    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38275    break 2
38276  fi
38277done
38278  done
38279IFS=$as_save_IFS
38280
38281fi
38282fi
38283OBJCOPY=$ac_cv_prog_OBJCOPY
38284if test -n "$OBJCOPY"; then
38285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38286$as_echo "$OBJCOPY" >&6; }
38287else
38288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38289$as_echo "no" >&6; }
38290fi
38291
38292
38293    test -n "$OBJCOPY" && break
38294  done
38295fi
38296if test -z "$OBJCOPY"; then
38297  ac_ct_OBJCOPY=$OBJCOPY
38298  for ac_prog in gobjcopy objcopy
38299do
38300  # Extract the first word of "$ac_prog", so it can be a program name with args.
38301set dummy $ac_prog; ac_word=$2
38302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38303$as_echo_n "checking for $ac_word... " >&6; }
38304if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38305  $as_echo_n "(cached) " >&6
38306else
38307  if test -n "$ac_ct_OBJCOPY"; then
38308  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38309else
38310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38311for as_dir in $PATH
38312do
38313  IFS=$as_save_IFS
38314  test -z "$as_dir" && as_dir=.
38315    for ac_exec_ext in '' $ac_executable_extensions; do
38316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38317    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38319    break 2
38320  fi
38321done
38322  done
38323IFS=$as_save_IFS
38324
38325fi
38326fi
38327ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38328if test -n "$ac_ct_OBJCOPY"; then
38329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38330$as_echo "$ac_ct_OBJCOPY" >&6; }
38331else
38332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38333$as_echo "no" >&6; }
38334fi
38335
38336
38337  test -n "$ac_ct_OBJCOPY" && break
38338done
38339
38340  if test "x$ac_ct_OBJCOPY" = x; then
38341    OBJCOPY=""
38342  else
38343    case $cross_compiling:$ac_tool_warned in
38344yes:)
38345{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38346$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38347ac_tool_warned=yes ;;
38348esac
38349    OBJCOPY=$ac_ct_OBJCOPY
38350  fi
38351fi
38352
38353  else
38354    # The variable is set, but is it from the command line or the environment?
38355
38356    # Try to remove the string !OBJCOPY! from our list.
38357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38359      # If it failed, the variable was not from the command line. Ignore it,
38360      # but warn the user (except for BASH, which is always set by the calling BASH).
38361      if test "xOBJCOPY" != xBASH; then
38362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38363$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38364      fi
38365      # Try to locate tool using the code snippet
38366      if test -n "$ac_tool_prefix"; then
38367  for ac_prog in gobjcopy objcopy
38368  do
38369    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38372$as_echo_n "checking for $ac_word... " >&6; }
38373if ${ac_cv_prog_OBJCOPY+:} false; then :
38374  $as_echo_n "(cached) " >&6
38375else
38376  if test -n "$OBJCOPY"; then
38377  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38378else
38379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38380for as_dir in $PATH
38381do
38382  IFS=$as_save_IFS
38383  test -z "$as_dir" && as_dir=.
38384    for ac_exec_ext in '' $ac_executable_extensions; do
38385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38386    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38388    break 2
38389  fi
38390done
38391  done
38392IFS=$as_save_IFS
38393
38394fi
38395fi
38396OBJCOPY=$ac_cv_prog_OBJCOPY
38397if test -n "$OBJCOPY"; then
38398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38399$as_echo "$OBJCOPY" >&6; }
38400else
38401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38402$as_echo "no" >&6; }
38403fi
38404
38405
38406    test -n "$OBJCOPY" && break
38407  done
38408fi
38409if test -z "$OBJCOPY"; then
38410  ac_ct_OBJCOPY=$OBJCOPY
38411  for ac_prog in gobjcopy objcopy
38412do
38413  # Extract the first word of "$ac_prog", so it can be a program name with args.
38414set dummy $ac_prog; ac_word=$2
38415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38416$as_echo_n "checking for $ac_word... " >&6; }
38417if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38418  $as_echo_n "(cached) " >&6
38419else
38420  if test -n "$ac_ct_OBJCOPY"; then
38421  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38422else
38423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38424for as_dir in $PATH
38425do
38426  IFS=$as_save_IFS
38427  test -z "$as_dir" && as_dir=.
38428    for ac_exec_ext in '' $ac_executable_extensions; do
38429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38430    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38432    break 2
38433  fi
38434done
38435  done
38436IFS=$as_save_IFS
38437
38438fi
38439fi
38440ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38441if test -n "$ac_ct_OBJCOPY"; then
38442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38443$as_echo "$ac_ct_OBJCOPY" >&6; }
38444else
38445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38446$as_echo "no" >&6; }
38447fi
38448
38449
38450  test -n "$ac_ct_OBJCOPY" && break
38451done
38452
38453  if test "x$ac_ct_OBJCOPY" = x; then
38454    OBJCOPY=""
38455  else
38456    case $cross_compiling:$ac_tool_warned in
38457yes:)
38458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38460ac_tool_warned=yes ;;
38461esac
38462    OBJCOPY=$ac_ct_OBJCOPY
38463  fi
38464fi
38465
38466    else
38467      # If it succeeded, then it was overridden by the user. We will use it
38468      # for the tool.
38469
38470      # First remove it from the list of overridden variables, so we can test
38471      # for unknown variables in the end.
38472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38473
38474      # Check if the provided tool contains a complete path.
38475      tool_specified="$OBJCOPY"
38476      tool_basename="${tool_specified##*/}"
38477      if test "x$tool_basename" = "x$tool_specified"; then
38478        # A command without a complete path is provided, search $PATH.
38479        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38480$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38481        # Extract the first word of "$tool_basename", so it can be a program name with args.
38482set dummy $tool_basename; ac_word=$2
38483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38484$as_echo_n "checking for $ac_word... " >&6; }
38485if ${ac_cv_path_OBJCOPY+:} false; then :
38486  $as_echo_n "(cached) " >&6
38487else
38488  case $OBJCOPY in
38489  [\\/]* | ?:[\\/]*)
38490  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38491  ;;
38492  *)
38493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38494for as_dir in $PATH
38495do
38496  IFS=$as_save_IFS
38497  test -z "$as_dir" && as_dir=.
38498    for ac_exec_ext in '' $ac_executable_extensions; do
38499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38500    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38502    break 2
38503  fi
38504done
38505  done
38506IFS=$as_save_IFS
38507
38508  ;;
38509esac
38510fi
38511OBJCOPY=$ac_cv_path_OBJCOPY
38512if test -n "$OBJCOPY"; then
38513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38514$as_echo "$OBJCOPY" >&6; }
38515else
38516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38517$as_echo "no" >&6; }
38518fi
38519
38520
38521        if test "x$OBJCOPY" = x; then
38522          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38523        fi
38524      else
38525        # Otherwise we believe it is a complete path. Use it as it is.
38526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38527$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38529$as_echo_n "checking for OBJCOPY... " >&6; }
38530        if test ! -x "$tool_specified"; then
38531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38532$as_echo "not found" >&6; }
38533          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38534        fi
38535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38536$as_echo "$tool_specified" >&6; }
38537      fi
38538    fi
38539  fi
38540
38541
38542    # Only call fixup if objcopy was found.
38543    if test -n "$OBJCOPY"; then
38544
38545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38546
38547  # First separate the path from the arguments. This will split at the first
38548  # space.
38549  complete="$OBJCOPY"
38550  path="${complete%% *}"
38551  tmp="$complete EOL"
38552  arguments="${tmp#* }"
38553
38554  # Input might be given as Windows format, start by converting to
38555  # unix format.
38556  new_path=`$CYGPATH -u "$path"`
38557
38558  # Now try to locate executable using which
38559  new_path=`$WHICH "$new_path" 2> /dev/null`
38560  # bat and cmd files are not always considered executable in cygwin causing which
38561  # to not find them
38562  if test "x$new_path" = x \
38563      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38564      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38565    new_path=`$CYGPATH -u "$path"`
38566  fi
38567  if test "x$new_path" = x; then
38568    # Oops. Which didn't find the executable.
38569    # The splitting of arguments from the executable at a space might have been incorrect,
38570    # since paths with space are more likely in Windows. Give it another try with the whole
38571    # argument.
38572    path="$complete"
38573    arguments="EOL"
38574    new_path=`$CYGPATH -u "$path"`
38575    new_path=`$WHICH "$new_path" 2> /dev/null`
38576    # bat and cmd files are not always considered executable in cygwin causing which
38577    # to not find them
38578    if test "x$new_path" = x \
38579        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38580        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38581      new_path=`$CYGPATH -u "$path"`
38582    fi
38583    if test "x$new_path" = x; then
38584      # It's still not found. Now this is an unrecoverable error.
38585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38586$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38587      has_space=`$ECHO "$complete" | $GREP " "`
38588      if test "x$has_space" != x; then
38589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38591      fi
38592      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38593    fi
38594  fi
38595
38596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38599  # "foo.exe" is OK but "foo" is an error.
38600  #
38601  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38602  # It is also a way to make sure we got the proper file name for the real test later on.
38603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38604  if test "x$test_shortpath" = x; then
38605    # Short path failed, file does not exist as specified.
38606    # Try adding .exe or .cmd
38607    if test -f "${new_path}.exe"; then
38608      input_to_shortpath="${new_path}.exe"
38609    elif test -f "${new_path}.cmd"; then
38610      input_to_shortpath="${new_path}.cmd"
38611    else
38612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38613$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38614      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38615$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38616      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38617    fi
38618  else
38619    input_to_shortpath="$new_path"
38620  fi
38621
38622  # Call helper function which possibly converts this using DOS-style short mode.
38623  # If so, the updated path is stored in $new_path.
38624  new_path="$input_to_shortpath"
38625
38626  input_path="$input_to_shortpath"
38627  # Check if we need to convert this using DOS-style short mode. If the path
38628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38629  # take no chances and rewrite it.
38630  # Note: m4 eats our [], so we need to use [ and ] instead.
38631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38632  if test "x$has_forbidden_chars" != x; then
38633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38637      # Going to short mode and back again did indeed matter. Since short mode is
38638      # case insensitive, let's make it lowercase to improve readability.
38639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38640      # Now convert it back to Unix-stile (cygpath)
38641      input_path=`$CYGPATH -u "$shortmode_path"`
38642      new_path="$input_path"
38643    fi
38644  fi
38645
38646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38647  if test "x$test_cygdrive_prefix" = x; then
38648    # As a simple fix, exclude /usr/bin since it's not a real path.
38649    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38651      # a path prefixed by /cygdrive for fixpath to work.
38652      new_path="$CYGWIN_ROOT_PATH$input_path"
38653    fi
38654  fi
38655
38656  # remove trailing .exe if any
38657  new_path="${new_path/%.exe/}"
38658
38659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38660
38661  # First separate the path from the arguments. This will split at the first
38662  # space.
38663  complete="$OBJCOPY"
38664  path="${complete%% *}"
38665  tmp="$complete EOL"
38666  arguments="${tmp#* }"
38667
38668  # Input might be given as Windows format, start by converting to
38669  # unix format.
38670  new_path="$path"
38671
38672  windows_path="$new_path"
38673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38674    unix_path=`$CYGPATH -u "$windows_path"`
38675    new_path="$unix_path"
38676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38678    new_path="$unix_path"
38679  fi
38680
38681
38682  # Now try to locate executable using which
38683  new_path=`$WHICH "$new_path" 2> /dev/null`
38684
38685  if test "x$new_path" = x; then
38686    # Oops. Which didn't find the executable.
38687    # The splitting of arguments from the executable at a space might have been incorrect,
38688    # since paths with space are more likely in Windows. Give it another try with the whole
38689    # argument.
38690    path="$complete"
38691    arguments="EOL"
38692    new_path="$path"
38693
38694  windows_path="$new_path"
38695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38696    unix_path=`$CYGPATH -u "$windows_path"`
38697    new_path="$unix_path"
38698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38700    new_path="$unix_path"
38701  fi
38702
38703
38704    new_path=`$WHICH "$new_path" 2> /dev/null`
38705    # bat and cmd files are not always considered executable in MSYS causing which
38706    # to not find them
38707    if test "x$new_path" = x \
38708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38710      new_path="$path"
38711
38712  windows_path="$new_path"
38713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38714    unix_path=`$CYGPATH -u "$windows_path"`
38715    new_path="$unix_path"
38716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38718    new_path="$unix_path"
38719  fi
38720
38721    fi
38722
38723    if test "x$new_path" = x; then
38724      # It's still not found. Now this is an unrecoverable error.
38725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38726$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38727      has_space=`$ECHO "$complete" | $GREP " "`
38728      if test "x$has_space" != x; then
38729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38731      fi
38732      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38733    fi
38734  fi
38735
38736  # Now new_path has a complete unix path to the binary
38737  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38738    # Keep paths in /bin as-is, but remove trailing .exe if any
38739    new_path="${new_path/%.exe/}"
38740    # Do not save /bin paths to all_fixpath_prefixes!
38741  else
38742    # Not in mixed or Windows style, start by that.
38743    new_path=`cmd //c echo $new_path`
38744
38745  input_path="$new_path"
38746  # Check if we need to convert this using DOS-style short mode. If the path
38747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38748  # take no chances and rewrite it.
38749  # Note: m4 eats our [], so we need to use [ and ] instead.
38750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38751  if test "x$has_forbidden_chars" != x; then
38752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38754  fi
38755
38756    # Output is in $new_path
38757
38758  windows_path="$new_path"
38759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38760    unix_path=`$CYGPATH -u "$windows_path"`
38761    new_path="$unix_path"
38762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38764    new_path="$unix_path"
38765  fi
38766
38767    # remove trailing .exe if any
38768    new_path="${new_path/%.exe/}"
38769
38770    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38771    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38772  fi
38773
38774  else
38775    # We're on a posix platform. Hooray! :)
38776    # First separate the path from the arguments. This will split at the first
38777    # space.
38778    complete="$OBJCOPY"
38779    path="${complete%% *}"
38780    tmp="$complete EOL"
38781    arguments="${tmp#* }"
38782
38783    # Cannot rely on the command "which" here since it doesn't always work.
38784    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38785    if test -z "$is_absolute_path"; then
38786      # Path to executable is not absolute. Find it.
38787      IFS_save="$IFS"
38788      IFS=:
38789      for p in $PATH; do
38790        if test -f "$p/$path" && test -x "$p/$path"; then
38791          new_path="$p/$path"
38792          break
38793        fi
38794      done
38795      IFS="$IFS_save"
38796    else
38797      # This is an absolute path, we can use it without further modifications.
38798      new_path="$path"
38799    fi
38800
38801    if test "x$new_path" = x; then
38802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38803$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38804      has_space=`$ECHO "$complete" | $GREP " "`
38805      if test "x$has_space" != x; then
38806        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38807$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38808      fi
38809      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38810    fi
38811  fi
38812
38813  # Now join together the path and the arguments once again
38814  if test "x$arguments" != xEOL; then
38815    new_complete="$new_path ${arguments% *}"
38816  else
38817    new_complete="$new_path"
38818  fi
38819
38820  if test "x$complete" != "x$new_complete"; then
38821    OBJCOPY="$new_complete"
38822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38823$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38824  fi
38825
38826    fi
38827  fi
38828
38829
38830
38831  # Publish this variable in the help.
38832
38833
38834  if test "x$OBJDUMP" = x; then
38835    # The variable is not set by user, try to locate tool using the code snippet
38836    if test -n "$ac_tool_prefix"; then
38837  for ac_prog in gobjdump objdump
38838  do
38839    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38840set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38842$as_echo_n "checking for $ac_word... " >&6; }
38843if ${ac_cv_prog_OBJDUMP+:} false; then :
38844  $as_echo_n "(cached) " >&6
38845else
38846  if test -n "$OBJDUMP"; then
38847  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38848else
38849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38850for as_dir in $PATH
38851do
38852  IFS=$as_save_IFS
38853  test -z "$as_dir" && as_dir=.
38854    for ac_exec_ext in '' $ac_executable_extensions; do
38855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38856    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38858    break 2
38859  fi
38860done
38861  done
38862IFS=$as_save_IFS
38863
38864fi
38865fi
38866OBJDUMP=$ac_cv_prog_OBJDUMP
38867if test -n "$OBJDUMP"; then
38868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38869$as_echo "$OBJDUMP" >&6; }
38870else
38871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38872$as_echo "no" >&6; }
38873fi
38874
38875
38876    test -n "$OBJDUMP" && break
38877  done
38878fi
38879if test -z "$OBJDUMP"; then
38880  ac_ct_OBJDUMP=$OBJDUMP
38881  for ac_prog in gobjdump objdump
38882do
38883  # Extract the first word of "$ac_prog", so it can be a program name with args.
38884set dummy $ac_prog; ac_word=$2
38885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38886$as_echo_n "checking for $ac_word... " >&6; }
38887if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38888  $as_echo_n "(cached) " >&6
38889else
38890  if test -n "$ac_ct_OBJDUMP"; then
38891  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38892else
38893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38894for as_dir in $PATH
38895do
38896  IFS=$as_save_IFS
38897  test -z "$as_dir" && as_dir=.
38898    for ac_exec_ext in '' $ac_executable_extensions; do
38899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38900    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38902    break 2
38903  fi
38904done
38905  done
38906IFS=$as_save_IFS
38907
38908fi
38909fi
38910ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38911if test -n "$ac_ct_OBJDUMP"; then
38912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38913$as_echo "$ac_ct_OBJDUMP" >&6; }
38914else
38915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38916$as_echo "no" >&6; }
38917fi
38918
38919
38920  test -n "$ac_ct_OBJDUMP" && break
38921done
38922
38923  if test "x$ac_ct_OBJDUMP" = x; then
38924    OBJDUMP=""
38925  else
38926    case $cross_compiling:$ac_tool_warned in
38927yes:)
38928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38930ac_tool_warned=yes ;;
38931esac
38932    OBJDUMP=$ac_ct_OBJDUMP
38933  fi
38934fi
38935
38936  else
38937    # The variable is set, but is it from the command line or the environment?
38938
38939    # Try to remove the string !OBJDUMP! from our list.
38940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38942      # If it failed, the variable was not from the command line. Ignore it,
38943      # but warn the user (except for BASH, which is always set by the calling BASH).
38944      if test "xOBJDUMP" != xBASH; then
38945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38946$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38947      fi
38948      # Try to locate tool using the code snippet
38949      if test -n "$ac_tool_prefix"; then
38950  for ac_prog in gobjdump objdump
38951  do
38952    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38953set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38955$as_echo_n "checking for $ac_word... " >&6; }
38956if ${ac_cv_prog_OBJDUMP+:} false; then :
38957  $as_echo_n "(cached) " >&6
38958else
38959  if test -n "$OBJDUMP"; then
38960  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38961else
38962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38963for as_dir in $PATH
38964do
38965  IFS=$as_save_IFS
38966  test -z "$as_dir" && as_dir=.
38967    for ac_exec_ext in '' $ac_executable_extensions; do
38968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38969    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38971    break 2
38972  fi
38973done
38974  done
38975IFS=$as_save_IFS
38976
38977fi
38978fi
38979OBJDUMP=$ac_cv_prog_OBJDUMP
38980if test -n "$OBJDUMP"; then
38981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38982$as_echo "$OBJDUMP" >&6; }
38983else
38984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38985$as_echo "no" >&6; }
38986fi
38987
38988
38989    test -n "$OBJDUMP" && break
38990  done
38991fi
38992if test -z "$OBJDUMP"; then
38993  ac_ct_OBJDUMP=$OBJDUMP
38994  for ac_prog in gobjdump objdump
38995do
38996  # Extract the first word of "$ac_prog", so it can be a program name with args.
38997set dummy $ac_prog; ac_word=$2
38998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38999$as_echo_n "checking for $ac_word... " >&6; }
39000if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39001  $as_echo_n "(cached) " >&6
39002else
39003  if test -n "$ac_ct_OBJDUMP"; then
39004  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39005else
39006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39007for as_dir in $PATH
39008do
39009  IFS=$as_save_IFS
39010  test -z "$as_dir" && as_dir=.
39011    for ac_exec_ext in '' $ac_executable_extensions; do
39012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39013    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39015    break 2
39016  fi
39017done
39018  done
39019IFS=$as_save_IFS
39020
39021fi
39022fi
39023ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39024if test -n "$ac_ct_OBJDUMP"; then
39025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39026$as_echo "$ac_ct_OBJDUMP" >&6; }
39027else
39028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39029$as_echo "no" >&6; }
39030fi
39031
39032
39033  test -n "$ac_ct_OBJDUMP" && break
39034done
39035
39036  if test "x$ac_ct_OBJDUMP" = x; then
39037    OBJDUMP=""
39038  else
39039    case $cross_compiling:$ac_tool_warned in
39040yes:)
39041{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39042$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39043ac_tool_warned=yes ;;
39044esac
39045    OBJDUMP=$ac_ct_OBJDUMP
39046  fi
39047fi
39048
39049    else
39050      # If it succeeded, then it was overridden by the user. We will use it
39051      # for the tool.
39052
39053      # First remove it from the list of overridden variables, so we can test
39054      # for unknown variables in the end.
39055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39056
39057      # Check if the provided tool contains a complete path.
39058      tool_specified="$OBJDUMP"
39059      tool_basename="${tool_specified##*/}"
39060      if test "x$tool_basename" = "x$tool_specified"; then
39061        # A command without a complete path is provided, search $PATH.
39062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39063$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39064        # Extract the first word of "$tool_basename", so it can be a program name with args.
39065set dummy $tool_basename; ac_word=$2
39066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39067$as_echo_n "checking for $ac_word... " >&6; }
39068if ${ac_cv_path_OBJDUMP+:} false; then :
39069  $as_echo_n "(cached) " >&6
39070else
39071  case $OBJDUMP in
39072  [\\/]* | ?:[\\/]*)
39073  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39074  ;;
39075  *)
39076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39077for as_dir in $PATH
39078do
39079  IFS=$as_save_IFS
39080  test -z "$as_dir" && as_dir=.
39081    for ac_exec_ext in '' $ac_executable_extensions; do
39082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39083    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39085    break 2
39086  fi
39087done
39088  done
39089IFS=$as_save_IFS
39090
39091  ;;
39092esac
39093fi
39094OBJDUMP=$ac_cv_path_OBJDUMP
39095if test -n "$OBJDUMP"; then
39096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39097$as_echo "$OBJDUMP" >&6; }
39098else
39099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39100$as_echo "no" >&6; }
39101fi
39102
39103
39104        if test "x$OBJDUMP" = x; then
39105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39106        fi
39107      else
39108        # Otherwise we believe it is a complete path. Use it as it is.
39109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39110$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39112$as_echo_n "checking for OBJDUMP... " >&6; }
39113        if test ! -x "$tool_specified"; then
39114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39115$as_echo "not found" >&6; }
39116          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39117        fi
39118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39119$as_echo "$tool_specified" >&6; }
39120      fi
39121    fi
39122  fi
39123
39124
39125  if test "x$OBJDUMP" != x; then
39126    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39127    # bails if argument is missing.
39128
39129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39130
39131  # First separate the path from the arguments. This will split at the first
39132  # space.
39133  complete="$OBJDUMP"
39134  path="${complete%% *}"
39135  tmp="$complete EOL"
39136  arguments="${tmp#* }"
39137
39138  # Input might be given as Windows format, start by converting to
39139  # unix format.
39140  new_path=`$CYGPATH -u "$path"`
39141
39142  # Now try to locate executable using which
39143  new_path=`$WHICH "$new_path" 2> /dev/null`
39144  # bat and cmd files are not always considered executable in cygwin causing which
39145  # to not find them
39146  if test "x$new_path" = x \
39147      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39148      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39149    new_path=`$CYGPATH -u "$path"`
39150  fi
39151  if test "x$new_path" = x; then
39152    # Oops. Which didn't find the executable.
39153    # The splitting of arguments from the executable at a space might have been incorrect,
39154    # since paths with space are more likely in Windows. Give it another try with the whole
39155    # argument.
39156    path="$complete"
39157    arguments="EOL"
39158    new_path=`$CYGPATH -u "$path"`
39159    new_path=`$WHICH "$new_path" 2> /dev/null`
39160    # bat and cmd files are not always considered executable in cygwin causing which
39161    # to not find them
39162    if test "x$new_path" = x \
39163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39165      new_path=`$CYGPATH -u "$path"`
39166    fi
39167    if test "x$new_path" = x; then
39168      # It's still not found. Now this is an unrecoverable error.
39169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39170$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39171      has_space=`$ECHO "$complete" | $GREP " "`
39172      if test "x$has_space" != x; then
39173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39175      fi
39176      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39177    fi
39178  fi
39179
39180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39183  # "foo.exe" is OK but "foo" is an error.
39184  #
39185  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39186  # It is also a way to make sure we got the proper file name for the real test later on.
39187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39188  if test "x$test_shortpath" = x; then
39189    # Short path failed, file does not exist as specified.
39190    # Try adding .exe or .cmd
39191    if test -f "${new_path}.exe"; then
39192      input_to_shortpath="${new_path}.exe"
39193    elif test -f "${new_path}.cmd"; then
39194      input_to_shortpath="${new_path}.cmd"
39195    else
39196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39197$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39198      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39199$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39200      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39201    fi
39202  else
39203    input_to_shortpath="$new_path"
39204  fi
39205
39206  # Call helper function which possibly converts this using DOS-style short mode.
39207  # If so, the updated path is stored in $new_path.
39208  new_path="$input_to_shortpath"
39209
39210  input_path="$input_to_shortpath"
39211  # Check if we need to convert this using DOS-style short mode. If the path
39212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39213  # take no chances and rewrite it.
39214  # Note: m4 eats our [], so we need to use [ and ] instead.
39215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39216  if test "x$has_forbidden_chars" != x; then
39217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39221      # Going to short mode and back again did indeed matter. Since short mode is
39222      # case insensitive, let's make it lowercase to improve readability.
39223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39224      # Now convert it back to Unix-stile (cygpath)
39225      input_path=`$CYGPATH -u "$shortmode_path"`
39226      new_path="$input_path"
39227    fi
39228  fi
39229
39230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39231  if test "x$test_cygdrive_prefix" = x; then
39232    # As a simple fix, exclude /usr/bin since it's not a real path.
39233    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39235      # a path prefixed by /cygdrive for fixpath to work.
39236      new_path="$CYGWIN_ROOT_PATH$input_path"
39237    fi
39238  fi
39239
39240  # remove trailing .exe if any
39241  new_path="${new_path/%.exe/}"
39242
39243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39244
39245  # First separate the path from the arguments. This will split at the first
39246  # space.
39247  complete="$OBJDUMP"
39248  path="${complete%% *}"
39249  tmp="$complete EOL"
39250  arguments="${tmp#* }"
39251
39252  # Input might be given as Windows format, start by converting to
39253  # unix format.
39254  new_path="$path"
39255
39256  windows_path="$new_path"
39257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39258    unix_path=`$CYGPATH -u "$windows_path"`
39259    new_path="$unix_path"
39260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39262    new_path="$unix_path"
39263  fi
39264
39265
39266  # Now try to locate executable using which
39267  new_path=`$WHICH "$new_path" 2> /dev/null`
39268
39269  if test "x$new_path" = x; then
39270    # Oops. Which didn't find the executable.
39271    # The splitting of arguments from the executable at a space might have been incorrect,
39272    # since paths with space are more likely in Windows. Give it another try with the whole
39273    # argument.
39274    path="$complete"
39275    arguments="EOL"
39276    new_path="$path"
39277
39278  windows_path="$new_path"
39279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39280    unix_path=`$CYGPATH -u "$windows_path"`
39281    new_path="$unix_path"
39282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39284    new_path="$unix_path"
39285  fi
39286
39287
39288    new_path=`$WHICH "$new_path" 2> /dev/null`
39289    # bat and cmd files are not always considered executable in MSYS causing which
39290    # to not find them
39291    if test "x$new_path" = x \
39292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39294      new_path="$path"
39295
39296  windows_path="$new_path"
39297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39298    unix_path=`$CYGPATH -u "$windows_path"`
39299    new_path="$unix_path"
39300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39302    new_path="$unix_path"
39303  fi
39304
39305    fi
39306
39307    if test "x$new_path" = x; then
39308      # It's still not found. Now this is an unrecoverable error.
39309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39310$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39311      has_space=`$ECHO "$complete" | $GREP " "`
39312      if test "x$has_space" != x; then
39313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39315      fi
39316      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39317    fi
39318  fi
39319
39320  # Now new_path has a complete unix path to the binary
39321  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39322    # Keep paths in /bin as-is, but remove trailing .exe if any
39323    new_path="${new_path/%.exe/}"
39324    # Do not save /bin paths to all_fixpath_prefixes!
39325  else
39326    # Not in mixed or Windows style, start by that.
39327    new_path=`cmd //c echo $new_path`
39328
39329  input_path="$new_path"
39330  # Check if we need to convert this using DOS-style short mode. If the path
39331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39332  # take no chances and rewrite it.
39333  # Note: m4 eats our [], so we need to use [ and ] instead.
39334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39335  if test "x$has_forbidden_chars" != x; then
39336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39338  fi
39339
39340    # Output is in $new_path
39341
39342  windows_path="$new_path"
39343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39344    unix_path=`$CYGPATH -u "$windows_path"`
39345    new_path="$unix_path"
39346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39348    new_path="$unix_path"
39349  fi
39350
39351    # remove trailing .exe if any
39352    new_path="${new_path/%.exe/}"
39353
39354    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39355    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39356  fi
39357
39358  else
39359    # We're on a posix platform. Hooray! :)
39360    # First separate the path from the arguments. This will split at the first
39361    # space.
39362    complete="$OBJDUMP"
39363    path="${complete%% *}"
39364    tmp="$complete EOL"
39365    arguments="${tmp#* }"
39366
39367    # Cannot rely on the command "which" here since it doesn't always work.
39368    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39369    if test -z "$is_absolute_path"; then
39370      # Path to executable is not absolute. Find it.
39371      IFS_save="$IFS"
39372      IFS=:
39373      for p in $PATH; do
39374        if test -f "$p/$path" && test -x "$p/$path"; then
39375          new_path="$p/$path"
39376          break
39377        fi
39378      done
39379      IFS="$IFS_save"
39380    else
39381      # This is an absolute path, we can use it without further modifications.
39382      new_path="$path"
39383    fi
39384
39385    if test "x$new_path" = x; then
39386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39387$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39388      has_space=`$ECHO "$complete" | $GREP " "`
39389      if test "x$has_space" != x; then
39390        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39391$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39392      fi
39393      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39394    fi
39395  fi
39396
39397  # Now join together the path and the arguments once again
39398  if test "x$arguments" != xEOL; then
39399    new_complete="$new_path ${arguments% *}"
39400  else
39401    new_complete="$new_path"
39402  fi
39403
39404  if test "x$complete" != "x$new_complete"; then
39405    OBJDUMP="$new_complete"
39406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39407$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39408  fi
39409
39410  fi
39411
39412
39413  # Restore old path.
39414  PATH="$OLD_PATH"
39415
39416  # Restore the flags to the user specified values.
39417  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39418  CFLAGS="$ORG_CFLAGS"
39419  CXXFLAGS="$ORG_CXXFLAGS"
39420  OBJCFLAGS="$ORG_OBJCFLAGS"
39421
39422
39423# Finally do some processing after the detection phase
39424
39425  if test "x$COMPILE_TYPE" = "xcross"; then
39426    # Now we need to find a C/C++ compiler that can build executables for the
39427    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39428    # used once. Also, we need to do this without adding a tools dir to the
39429    # path, otherwise we might pick up cross-compilers which don't use standard
39430    # naming.
39431
39432    # FIXME: we should list the discovered compilers as an exclude pattern!
39433    # If we do that, we can do this detection before POST_DETECTION, and still
39434    # find the build compilers in the tools dir, if needed.
39435
39436
39437  # Publish this variable in the help.
39438
39439
39440  if test "x$BUILD_CC" = x; then
39441    # The variable is not set by user, try to locate tool using the code snippet
39442    for ac_prog in cl cc gcc
39443do
39444  # Extract the first word of "$ac_prog", so it can be a program name with args.
39445set dummy $ac_prog; ac_word=$2
39446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39447$as_echo_n "checking for $ac_word... " >&6; }
39448if ${ac_cv_path_BUILD_CC+:} false; then :
39449  $as_echo_n "(cached) " >&6
39450else
39451  case $BUILD_CC in
39452  [\\/]* | ?:[\\/]*)
39453  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39454  ;;
39455  *)
39456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39457for as_dir in $PATH
39458do
39459  IFS=$as_save_IFS
39460  test -z "$as_dir" && as_dir=.
39461    for ac_exec_ext in '' $ac_executable_extensions; do
39462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39463    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39465    break 2
39466  fi
39467done
39468  done
39469IFS=$as_save_IFS
39470
39471  ;;
39472esac
39473fi
39474BUILD_CC=$ac_cv_path_BUILD_CC
39475if test -n "$BUILD_CC"; then
39476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39477$as_echo "$BUILD_CC" >&6; }
39478else
39479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39480$as_echo "no" >&6; }
39481fi
39482
39483
39484  test -n "$BUILD_CC" && break
39485done
39486
39487  else
39488    # The variable is set, but is it from the command line or the environment?
39489
39490    # Try to remove the string !BUILD_CC! from our list.
39491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39493      # If it failed, the variable was not from the command line. Ignore it,
39494      # but warn the user (except for BASH, which is always set by the calling BASH).
39495      if test "xBUILD_CC" != xBASH; then
39496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39497$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39498      fi
39499      # Try to locate tool using the code snippet
39500      for ac_prog in cl cc gcc
39501do
39502  # Extract the first word of "$ac_prog", so it can be a program name with args.
39503set dummy $ac_prog; ac_word=$2
39504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39505$as_echo_n "checking for $ac_word... " >&6; }
39506if ${ac_cv_path_BUILD_CC+:} false; then :
39507  $as_echo_n "(cached) " >&6
39508else
39509  case $BUILD_CC in
39510  [\\/]* | ?:[\\/]*)
39511  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39512  ;;
39513  *)
39514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39515for as_dir in $PATH
39516do
39517  IFS=$as_save_IFS
39518  test -z "$as_dir" && as_dir=.
39519    for ac_exec_ext in '' $ac_executable_extensions; do
39520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39521    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39523    break 2
39524  fi
39525done
39526  done
39527IFS=$as_save_IFS
39528
39529  ;;
39530esac
39531fi
39532BUILD_CC=$ac_cv_path_BUILD_CC
39533if test -n "$BUILD_CC"; then
39534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39535$as_echo "$BUILD_CC" >&6; }
39536else
39537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39538$as_echo "no" >&6; }
39539fi
39540
39541
39542  test -n "$BUILD_CC" && break
39543done
39544
39545    else
39546      # If it succeeded, then it was overridden by the user. We will use it
39547      # for the tool.
39548
39549      # First remove it from the list of overridden variables, so we can test
39550      # for unknown variables in the end.
39551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39552
39553      # Check if the provided tool contains a complete path.
39554      tool_specified="$BUILD_CC"
39555      tool_basename="${tool_specified##*/}"
39556      if test "x$tool_basename" = "x$tool_specified"; then
39557        # A command without a complete path is provided, search $PATH.
39558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39559$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39560        # Extract the first word of "$tool_basename", so it can be a program name with args.
39561set dummy $tool_basename; ac_word=$2
39562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39563$as_echo_n "checking for $ac_word... " >&6; }
39564if ${ac_cv_path_BUILD_CC+:} false; then :
39565  $as_echo_n "(cached) " >&6
39566else
39567  case $BUILD_CC in
39568  [\\/]* | ?:[\\/]*)
39569  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39570  ;;
39571  *)
39572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39573for as_dir in $PATH
39574do
39575  IFS=$as_save_IFS
39576  test -z "$as_dir" && as_dir=.
39577    for ac_exec_ext in '' $ac_executable_extensions; do
39578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39579    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39581    break 2
39582  fi
39583done
39584  done
39585IFS=$as_save_IFS
39586
39587  ;;
39588esac
39589fi
39590BUILD_CC=$ac_cv_path_BUILD_CC
39591if test -n "$BUILD_CC"; then
39592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39593$as_echo "$BUILD_CC" >&6; }
39594else
39595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39596$as_echo "no" >&6; }
39597fi
39598
39599
39600        if test "x$BUILD_CC" = x; then
39601          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39602        fi
39603      else
39604        # Otherwise we believe it is a complete path. Use it as it is.
39605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39606$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39608$as_echo_n "checking for BUILD_CC... " >&6; }
39609        if test ! -x "$tool_specified"; then
39610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39611$as_echo "not found" >&6; }
39612          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39613        fi
39614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39615$as_echo "$tool_specified" >&6; }
39616      fi
39617    fi
39618  fi
39619
39620
39621
39622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39623
39624  # First separate the path from the arguments. This will split at the first
39625  # space.
39626  complete="$BUILD_CC"
39627  path="${complete%% *}"
39628  tmp="$complete EOL"
39629  arguments="${tmp#* }"
39630
39631  # Input might be given as Windows format, start by converting to
39632  # unix format.
39633  new_path=`$CYGPATH -u "$path"`
39634
39635  # Now try to locate executable using which
39636  new_path=`$WHICH "$new_path" 2> /dev/null`
39637  # bat and cmd files are not always considered executable in cygwin causing which
39638  # to not find them
39639  if test "x$new_path" = x \
39640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39642    new_path=`$CYGPATH -u "$path"`
39643  fi
39644  if test "x$new_path" = x; then
39645    # Oops. Which didn't find the executable.
39646    # The splitting of arguments from the executable at a space might have been incorrect,
39647    # since paths with space are more likely in Windows. Give it another try with the whole
39648    # argument.
39649    path="$complete"
39650    arguments="EOL"
39651    new_path=`$CYGPATH -u "$path"`
39652    new_path=`$WHICH "$new_path" 2> /dev/null`
39653    # bat and cmd files are not always considered executable in cygwin causing which
39654    # to not find them
39655    if test "x$new_path" = x \
39656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39658      new_path=`$CYGPATH -u "$path"`
39659    fi
39660    if test "x$new_path" = x; then
39661      # It's still not found. Now this is an unrecoverable error.
39662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39663$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39664      has_space=`$ECHO "$complete" | $GREP " "`
39665      if test "x$has_space" != x; then
39666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39668      fi
39669      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39670    fi
39671  fi
39672
39673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39676  # "foo.exe" is OK but "foo" is an error.
39677  #
39678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39679  # It is also a way to make sure we got the proper file name for the real test later on.
39680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39681  if test "x$test_shortpath" = x; then
39682    # Short path failed, file does not exist as specified.
39683    # Try adding .exe or .cmd
39684    if test -f "${new_path}.exe"; then
39685      input_to_shortpath="${new_path}.exe"
39686    elif test -f "${new_path}.cmd"; then
39687      input_to_shortpath="${new_path}.cmd"
39688    else
39689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39690$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39693      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39694    fi
39695  else
39696    input_to_shortpath="$new_path"
39697  fi
39698
39699  # Call helper function which possibly converts this using DOS-style short mode.
39700  # If so, the updated path is stored in $new_path.
39701  new_path="$input_to_shortpath"
39702
39703  input_path="$input_to_shortpath"
39704  # Check if we need to convert this using DOS-style short mode. If the path
39705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39706  # take no chances and rewrite it.
39707  # Note: m4 eats our [], so we need to use [ and ] instead.
39708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39709  if test "x$has_forbidden_chars" != x; then
39710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39714      # Going to short mode and back again did indeed matter. Since short mode is
39715      # case insensitive, let's make it lowercase to improve readability.
39716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39717      # Now convert it back to Unix-stile (cygpath)
39718      input_path=`$CYGPATH -u "$shortmode_path"`
39719      new_path="$input_path"
39720    fi
39721  fi
39722
39723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39724  if test "x$test_cygdrive_prefix" = x; then
39725    # As a simple fix, exclude /usr/bin since it's not a real path.
39726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39728      # a path prefixed by /cygdrive for fixpath to work.
39729      new_path="$CYGWIN_ROOT_PATH$input_path"
39730    fi
39731  fi
39732
39733  # remove trailing .exe if any
39734  new_path="${new_path/%.exe/}"
39735
39736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39737
39738  # First separate the path from the arguments. This will split at the first
39739  # space.
39740  complete="$BUILD_CC"
39741  path="${complete%% *}"
39742  tmp="$complete EOL"
39743  arguments="${tmp#* }"
39744
39745  # Input might be given as Windows format, start by converting to
39746  # unix format.
39747  new_path="$path"
39748
39749  windows_path="$new_path"
39750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39751    unix_path=`$CYGPATH -u "$windows_path"`
39752    new_path="$unix_path"
39753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39755    new_path="$unix_path"
39756  fi
39757
39758
39759  # Now try to locate executable using which
39760  new_path=`$WHICH "$new_path" 2> /dev/null`
39761
39762  if test "x$new_path" = x; then
39763    # Oops. Which didn't find the executable.
39764    # The splitting of arguments from the executable at a space might have been incorrect,
39765    # since paths with space are more likely in Windows. Give it another try with the whole
39766    # argument.
39767    path="$complete"
39768    arguments="EOL"
39769    new_path="$path"
39770
39771  windows_path="$new_path"
39772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39773    unix_path=`$CYGPATH -u "$windows_path"`
39774    new_path="$unix_path"
39775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39777    new_path="$unix_path"
39778  fi
39779
39780
39781    new_path=`$WHICH "$new_path" 2> /dev/null`
39782    # bat and cmd files are not always considered executable in MSYS causing which
39783    # to not find them
39784    if test "x$new_path" = x \
39785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39787      new_path="$path"
39788
39789  windows_path="$new_path"
39790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791    unix_path=`$CYGPATH -u "$windows_path"`
39792    new_path="$unix_path"
39793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39795    new_path="$unix_path"
39796  fi
39797
39798    fi
39799
39800    if test "x$new_path" = x; then
39801      # It's still not found. Now this is an unrecoverable error.
39802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39803$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39804      has_space=`$ECHO "$complete" | $GREP " "`
39805      if test "x$has_space" != x; then
39806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39808      fi
39809      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39810    fi
39811  fi
39812
39813  # Now new_path has a complete unix path to the binary
39814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39815    # Keep paths in /bin as-is, but remove trailing .exe if any
39816    new_path="${new_path/%.exe/}"
39817    # Do not save /bin paths to all_fixpath_prefixes!
39818  else
39819    # Not in mixed or Windows style, start by that.
39820    new_path=`cmd //c echo $new_path`
39821
39822  input_path="$new_path"
39823  # Check if we need to convert this using DOS-style short mode. If the path
39824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39825  # take no chances and rewrite it.
39826  # Note: m4 eats our [], so we need to use [ and ] instead.
39827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39828  if test "x$has_forbidden_chars" != x; then
39829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39831  fi
39832
39833    # Output is in $new_path
39834
39835  windows_path="$new_path"
39836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39837    unix_path=`$CYGPATH -u "$windows_path"`
39838    new_path="$unix_path"
39839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39841    new_path="$unix_path"
39842  fi
39843
39844    # remove trailing .exe if any
39845    new_path="${new_path/%.exe/}"
39846
39847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39849  fi
39850
39851  else
39852    # We're on a posix platform. Hooray! :)
39853    # First separate the path from the arguments. This will split at the first
39854    # space.
39855    complete="$BUILD_CC"
39856    path="${complete%% *}"
39857    tmp="$complete EOL"
39858    arguments="${tmp#* }"
39859
39860    # Cannot rely on the command "which" here since it doesn't always work.
39861    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39862    if test -z "$is_absolute_path"; then
39863      # Path to executable is not absolute. Find it.
39864      IFS_save="$IFS"
39865      IFS=:
39866      for p in $PATH; do
39867        if test -f "$p/$path" && test -x "$p/$path"; then
39868          new_path="$p/$path"
39869          break
39870        fi
39871      done
39872      IFS="$IFS_save"
39873    else
39874      # This is an absolute path, we can use it without further modifications.
39875      new_path="$path"
39876    fi
39877
39878    if test "x$new_path" = x; then
39879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39880$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39881      has_space=`$ECHO "$complete" | $GREP " "`
39882      if test "x$has_space" != x; then
39883        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39885      fi
39886      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39887    fi
39888  fi
39889
39890  # Now join together the path and the arguments once again
39891  if test "x$arguments" != xEOL; then
39892    new_complete="$new_path ${arguments% *}"
39893  else
39894    new_complete="$new_path"
39895  fi
39896
39897  if test "x$complete" != "x$new_complete"; then
39898    BUILD_CC="$new_complete"
39899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39900$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39901  fi
39902
39903
39904
39905  # Publish this variable in the help.
39906
39907
39908  if test "x$BUILD_CXX" = x; then
39909    # The variable is not set by user, try to locate tool using the code snippet
39910    for ac_prog in cl CC g++
39911do
39912  # Extract the first word of "$ac_prog", so it can be a program name with args.
39913set dummy $ac_prog; ac_word=$2
39914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39915$as_echo_n "checking for $ac_word... " >&6; }
39916if ${ac_cv_path_BUILD_CXX+:} false; then :
39917  $as_echo_n "(cached) " >&6
39918else
39919  case $BUILD_CXX in
39920  [\\/]* | ?:[\\/]*)
39921  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39922  ;;
39923  *)
39924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39925for as_dir in $PATH
39926do
39927  IFS=$as_save_IFS
39928  test -z "$as_dir" && as_dir=.
39929    for ac_exec_ext in '' $ac_executable_extensions; do
39930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39931    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39933    break 2
39934  fi
39935done
39936  done
39937IFS=$as_save_IFS
39938
39939  ;;
39940esac
39941fi
39942BUILD_CXX=$ac_cv_path_BUILD_CXX
39943if test -n "$BUILD_CXX"; then
39944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39945$as_echo "$BUILD_CXX" >&6; }
39946else
39947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39948$as_echo "no" >&6; }
39949fi
39950
39951
39952  test -n "$BUILD_CXX" && break
39953done
39954
39955  else
39956    # The variable is set, but is it from the command line or the environment?
39957
39958    # Try to remove the string !BUILD_CXX! from our list.
39959    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39960    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39961      # If it failed, the variable was not from the command line. Ignore it,
39962      # but warn the user (except for BASH, which is always set by the calling BASH).
39963      if test "xBUILD_CXX" != xBASH; then
39964        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39965$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39966      fi
39967      # Try to locate tool using the code snippet
39968      for ac_prog in cl CC g++
39969do
39970  # Extract the first word of "$ac_prog", so it can be a program name with args.
39971set dummy $ac_prog; ac_word=$2
39972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39973$as_echo_n "checking for $ac_word... " >&6; }
39974if ${ac_cv_path_BUILD_CXX+:} false; then :
39975  $as_echo_n "(cached) " >&6
39976else
39977  case $BUILD_CXX in
39978  [\\/]* | ?:[\\/]*)
39979  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39980  ;;
39981  *)
39982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39983for as_dir in $PATH
39984do
39985  IFS=$as_save_IFS
39986  test -z "$as_dir" && as_dir=.
39987    for ac_exec_ext in '' $ac_executable_extensions; do
39988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39989    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39991    break 2
39992  fi
39993done
39994  done
39995IFS=$as_save_IFS
39996
39997  ;;
39998esac
39999fi
40000BUILD_CXX=$ac_cv_path_BUILD_CXX
40001if test -n "$BUILD_CXX"; then
40002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40003$as_echo "$BUILD_CXX" >&6; }
40004else
40005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40006$as_echo "no" >&6; }
40007fi
40008
40009
40010  test -n "$BUILD_CXX" && break
40011done
40012
40013    else
40014      # If it succeeded, then it was overridden by the user. We will use it
40015      # for the tool.
40016
40017      # First remove it from the list of overridden variables, so we can test
40018      # for unknown variables in the end.
40019      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40020
40021      # Check if the provided tool contains a complete path.
40022      tool_specified="$BUILD_CXX"
40023      tool_basename="${tool_specified##*/}"
40024      if test "x$tool_basename" = "x$tool_specified"; then
40025        # A command without a complete path is provided, search $PATH.
40026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40027$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40028        # Extract the first word of "$tool_basename", so it can be a program name with args.
40029set dummy $tool_basename; ac_word=$2
40030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40031$as_echo_n "checking for $ac_word... " >&6; }
40032if ${ac_cv_path_BUILD_CXX+:} false; then :
40033  $as_echo_n "(cached) " >&6
40034else
40035  case $BUILD_CXX in
40036  [\\/]* | ?:[\\/]*)
40037  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40038  ;;
40039  *)
40040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40041for as_dir in $PATH
40042do
40043  IFS=$as_save_IFS
40044  test -z "$as_dir" && as_dir=.
40045    for ac_exec_ext in '' $ac_executable_extensions; do
40046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40047    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40049    break 2
40050  fi
40051done
40052  done
40053IFS=$as_save_IFS
40054
40055  ;;
40056esac
40057fi
40058BUILD_CXX=$ac_cv_path_BUILD_CXX
40059if test -n "$BUILD_CXX"; then
40060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40061$as_echo "$BUILD_CXX" >&6; }
40062else
40063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40064$as_echo "no" >&6; }
40065fi
40066
40067
40068        if test "x$BUILD_CXX" = x; then
40069          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40070        fi
40071      else
40072        # Otherwise we believe it is a complete path. Use it as it is.
40073        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40074$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40076$as_echo_n "checking for BUILD_CXX... " >&6; }
40077        if test ! -x "$tool_specified"; then
40078          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40079$as_echo "not found" >&6; }
40080          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40081        fi
40082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40083$as_echo "$tool_specified" >&6; }
40084      fi
40085    fi
40086  fi
40087
40088
40089
40090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40091
40092  # First separate the path from the arguments. This will split at the first
40093  # space.
40094  complete="$BUILD_CXX"
40095  path="${complete%% *}"
40096  tmp="$complete EOL"
40097  arguments="${tmp#* }"
40098
40099  # Input might be given as Windows format, start by converting to
40100  # unix format.
40101  new_path=`$CYGPATH -u "$path"`
40102
40103  # Now try to locate executable using which
40104  new_path=`$WHICH "$new_path" 2> /dev/null`
40105  # bat and cmd files are not always considered executable in cygwin causing which
40106  # to not find them
40107  if test "x$new_path" = x \
40108      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40109      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40110    new_path=`$CYGPATH -u "$path"`
40111  fi
40112  if test "x$new_path" = x; then
40113    # Oops. Which didn't find the executable.
40114    # The splitting of arguments from the executable at a space might have been incorrect,
40115    # since paths with space are more likely in Windows. Give it another try with the whole
40116    # argument.
40117    path="$complete"
40118    arguments="EOL"
40119    new_path=`$CYGPATH -u "$path"`
40120    new_path=`$WHICH "$new_path" 2> /dev/null`
40121    # bat and cmd files are not always considered executable in cygwin causing which
40122    # to not find them
40123    if test "x$new_path" = x \
40124        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40125        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40126      new_path=`$CYGPATH -u "$path"`
40127    fi
40128    if test "x$new_path" = x; then
40129      # It's still not found. Now this is an unrecoverable error.
40130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40131$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40132      has_space=`$ECHO "$complete" | $GREP " "`
40133      if test "x$has_space" != x; then
40134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40136      fi
40137      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40138    fi
40139  fi
40140
40141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40144  # "foo.exe" is OK but "foo" is an error.
40145  #
40146  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40147  # It is also a way to make sure we got the proper file name for the real test later on.
40148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40149  if test "x$test_shortpath" = x; then
40150    # Short path failed, file does not exist as specified.
40151    # Try adding .exe or .cmd
40152    if test -f "${new_path}.exe"; then
40153      input_to_shortpath="${new_path}.exe"
40154    elif test -f "${new_path}.cmd"; then
40155      input_to_shortpath="${new_path}.cmd"
40156    else
40157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40158$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40159      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40160$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40161      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40162    fi
40163  else
40164    input_to_shortpath="$new_path"
40165  fi
40166
40167  # Call helper function which possibly converts this using DOS-style short mode.
40168  # If so, the updated path is stored in $new_path.
40169  new_path="$input_to_shortpath"
40170
40171  input_path="$input_to_shortpath"
40172  # Check if we need to convert this using DOS-style short mode. If the path
40173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40174  # take no chances and rewrite it.
40175  # Note: m4 eats our [], so we need to use [ and ] instead.
40176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40177  if test "x$has_forbidden_chars" != x; then
40178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40182      # Going to short mode and back again did indeed matter. Since short mode is
40183      # case insensitive, let's make it lowercase to improve readability.
40184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40185      # Now convert it back to Unix-stile (cygpath)
40186      input_path=`$CYGPATH -u "$shortmode_path"`
40187      new_path="$input_path"
40188    fi
40189  fi
40190
40191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40192  if test "x$test_cygdrive_prefix" = x; then
40193    # As a simple fix, exclude /usr/bin since it's not a real path.
40194    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40196      # a path prefixed by /cygdrive for fixpath to work.
40197      new_path="$CYGWIN_ROOT_PATH$input_path"
40198    fi
40199  fi
40200
40201  # remove trailing .exe if any
40202  new_path="${new_path/%.exe/}"
40203
40204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40205
40206  # First separate the path from the arguments. This will split at the first
40207  # space.
40208  complete="$BUILD_CXX"
40209  path="${complete%% *}"
40210  tmp="$complete EOL"
40211  arguments="${tmp#* }"
40212
40213  # Input might be given as Windows format, start by converting to
40214  # unix format.
40215  new_path="$path"
40216
40217  windows_path="$new_path"
40218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40219    unix_path=`$CYGPATH -u "$windows_path"`
40220    new_path="$unix_path"
40221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40223    new_path="$unix_path"
40224  fi
40225
40226
40227  # Now try to locate executable using which
40228  new_path=`$WHICH "$new_path" 2> /dev/null`
40229
40230  if test "x$new_path" = x; then
40231    # Oops. Which didn't find the executable.
40232    # The splitting of arguments from the executable at a space might have been incorrect,
40233    # since paths with space are more likely in Windows. Give it another try with the whole
40234    # argument.
40235    path="$complete"
40236    arguments="EOL"
40237    new_path="$path"
40238
40239  windows_path="$new_path"
40240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40241    unix_path=`$CYGPATH -u "$windows_path"`
40242    new_path="$unix_path"
40243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40245    new_path="$unix_path"
40246  fi
40247
40248
40249    new_path=`$WHICH "$new_path" 2> /dev/null`
40250    # bat and cmd files are not always considered executable in MSYS causing which
40251    # to not find them
40252    if test "x$new_path" = x \
40253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40255      new_path="$path"
40256
40257  windows_path="$new_path"
40258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40259    unix_path=`$CYGPATH -u "$windows_path"`
40260    new_path="$unix_path"
40261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40263    new_path="$unix_path"
40264  fi
40265
40266    fi
40267
40268    if test "x$new_path" = x; then
40269      # It's still not found. Now this is an unrecoverable error.
40270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40271$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40272      has_space=`$ECHO "$complete" | $GREP " "`
40273      if test "x$has_space" != x; then
40274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40276      fi
40277      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40278    fi
40279  fi
40280
40281  # Now new_path has a complete unix path to the binary
40282  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40283    # Keep paths in /bin as-is, but remove trailing .exe if any
40284    new_path="${new_path/%.exe/}"
40285    # Do not save /bin paths to all_fixpath_prefixes!
40286  else
40287    # Not in mixed or Windows style, start by that.
40288    new_path=`cmd //c echo $new_path`
40289
40290  input_path="$new_path"
40291  # Check if we need to convert this using DOS-style short mode. If the path
40292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40293  # take no chances and rewrite it.
40294  # Note: m4 eats our [], so we need to use [ and ] instead.
40295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40296  if test "x$has_forbidden_chars" != x; then
40297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40299  fi
40300
40301    # Output is in $new_path
40302
40303  windows_path="$new_path"
40304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40305    unix_path=`$CYGPATH -u "$windows_path"`
40306    new_path="$unix_path"
40307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40309    new_path="$unix_path"
40310  fi
40311
40312    # remove trailing .exe if any
40313    new_path="${new_path/%.exe/}"
40314
40315    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40316    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40317  fi
40318
40319  else
40320    # We're on a posix platform. Hooray! :)
40321    # First separate the path from the arguments. This will split at the first
40322    # space.
40323    complete="$BUILD_CXX"
40324    path="${complete%% *}"
40325    tmp="$complete EOL"
40326    arguments="${tmp#* }"
40327
40328    # Cannot rely on the command "which" here since it doesn't always work.
40329    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40330    if test -z "$is_absolute_path"; then
40331      # Path to executable is not absolute. Find it.
40332      IFS_save="$IFS"
40333      IFS=:
40334      for p in $PATH; do
40335        if test -f "$p/$path" && test -x "$p/$path"; then
40336          new_path="$p/$path"
40337          break
40338        fi
40339      done
40340      IFS="$IFS_save"
40341    else
40342      # This is an absolute path, we can use it without further modifications.
40343      new_path="$path"
40344    fi
40345
40346    if test "x$new_path" = x; then
40347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40348$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40349      has_space=`$ECHO "$complete" | $GREP " "`
40350      if test "x$has_space" != x; then
40351        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40352$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40353      fi
40354      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40355    fi
40356  fi
40357
40358  # Now join together the path and the arguments once again
40359  if test "x$arguments" != xEOL; then
40360    new_complete="$new_path ${arguments% *}"
40361  else
40362    new_complete="$new_path"
40363  fi
40364
40365  if test "x$complete" != "x$new_complete"; then
40366    BUILD_CXX="$new_complete"
40367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40368$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40369  fi
40370
40371
40372
40373  # Publish this variable in the help.
40374
40375
40376  if test "x$BUILD_LD" = x; then
40377    # The variable is not set by user, try to locate tool using the code snippet
40378    for ac_prog in ld
40379do
40380  # Extract the first word of "$ac_prog", so it can be a program name with args.
40381set dummy $ac_prog; ac_word=$2
40382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40383$as_echo_n "checking for $ac_word... " >&6; }
40384if ${ac_cv_path_BUILD_LD+:} false; then :
40385  $as_echo_n "(cached) " >&6
40386else
40387  case $BUILD_LD in
40388  [\\/]* | ?:[\\/]*)
40389  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40390  ;;
40391  *)
40392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40393for as_dir in $PATH
40394do
40395  IFS=$as_save_IFS
40396  test -z "$as_dir" && as_dir=.
40397    for ac_exec_ext in '' $ac_executable_extensions; do
40398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40399    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40401    break 2
40402  fi
40403done
40404  done
40405IFS=$as_save_IFS
40406
40407  ;;
40408esac
40409fi
40410BUILD_LD=$ac_cv_path_BUILD_LD
40411if test -n "$BUILD_LD"; then
40412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40413$as_echo "$BUILD_LD" >&6; }
40414else
40415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40416$as_echo "no" >&6; }
40417fi
40418
40419
40420  test -n "$BUILD_LD" && break
40421done
40422
40423  else
40424    # The variable is set, but is it from the command line or the environment?
40425
40426    # Try to remove the string !BUILD_LD! from our list.
40427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40429      # If it failed, the variable was not from the command line. Ignore it,
40430      # but warn the user (except for BASH, which is always set by the calling BASH).
40431      if test "xBUILD_LD" != xBASH; then
40432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40433$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40434      fi
40435      # Try to locate tool using the code snippet
40436      for ac_prog in ld
40437do
40438  # Extract the first word of "$ac_prog", so it can be a program name with args.
40439set dummy $ac_prog; ac_word=$2
40440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40441$as_echo_n "checking for $ac_word... " >&6; }
40442if ${ac_cv_path_BUILD_LD+:} false; then :
40443  $as_echo_n "(cached) " >&6
40444else
40445  case $BUILD_LD in
40446  [\\/]* | ?:[\\/]*)
40447  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40448  ;;
40449  *)
40450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40451for as_dir in $PATH
40452do
40453  IFS=$as_save_IFS
40454  test -z "$as_dir" && as_dir=.
40455    for ac_exec_ext in '' $ac_executable_extensions; do
40456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40457    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40459    break 2
40460  fi
40461done
40462  done
40463IFS=$as_save_IFS
40464
40465  ;;
40466esac
40467fi
40468BUILD_LD=$ac_cv_path_BUILD_LD
40469if test -n "$BUILD_LD"; then
40470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40471$as_echo "$BUILD_LD" >&6; }
40472else
40473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40474$as_echo "no" >&6; }
40475fi
40476
40477
40478  test -n "$BUILD_LD" && break
40479done
40480
40481    else
40482      # If it succeeded, then it was overridden by the user. We will use it
40483      # for the tool.
40484
40485      # First remove it from the list of overridden variables, so we can test
40486      # for unknown variables in the end.
40487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40488
40489      # Check if the provided tool contains a complete path.
40490      tool_specified="$BUILD_LD"
40491      tool_basename="${tool_specified##*/}"
40492      if test "x$tool_basename" = "x$tool_specified"; then
40493        # A command without a complete path is provided, search $PATH.
40494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40495$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40496        # Extract the first word of "$tool_basename", so it can be a program name with args.
40497set dummy $tool_basename; ac_word=$2
40498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40499$as_echo_n "checking for $ac_word... " >&6; }
40500if ${ac_cv_path_BUILD_LD+:} false; then :
40501  $as_echo_n "(cached) " >&6
40502else
40503  case $BUILD_LD in
40504  [\\/]* | ?:[\\/]*)
40505  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40506  ;;
40507  *)
40508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40509for as_dir in $PATH
40510do
40511  IFS=$as_save_IFS
40512  test -z "$as_dir" && as_dir=.
40513    for ac_exec_ext in '' $ac_executable_extensions; do
40514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40515    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40517    break 2
40518  fi
40519done
40520  done
40521IFS=$as_save_IFS
40522
40523  ;;
40524esac
40525fi
40526BUILD_LD=$ac_cv_path_BUILD_LD
40527if test -n "$BUILD_LD"; then
40528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40529$as_echo "$BUILD_LD" >&6; }
40530else
40531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40532$as_echo "no" >&6; }
40533fi
40534
40535
40536        if test "x$BUILD_LD" = x; then
40537          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40538        fi
40539      else
40540        # Otherwise we believe it is a complete path. Use it as it is.
40541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40542$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40544$as_echo_n "checking for BUILD_LD... " >&6; }
40545        if test ! -x "$tool_specified"; then
40546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40547$as_echo "not found" >&6; }
40548          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40549        fi
40550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40551$as_echo "$tool_specified" >&6; }
40552      fi
40553    fi
40554  fi
40555
40556
40557
40558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40559
40560  # First separate the path from the arguments. This will split at the first
40561  # space.
40562  complete="$BUILD_LD"
40563  path="${complete%% *}"
40564  tmp="$complete EOL"
40565  arguments="${tmp#* }"
40566
40567  # Input might be given as Windows format, start by converting to
40568  # unix format.
40569  new_path=`$CYGPATH -u "$path"`
40570
40571  # Now try to locate executable using which
40572  new_path=`$WHICH "$new_path" 2> /dev/null`
40573  # bat and cmd files are not always considered executable in cygwin causing which
40574  # to not find them
40575  if test "x$new_path" = x \
40576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40578    new_path=`$CYGPATH -u "$path"`
40579  fi
40580  if test "x$new_path" = x; then
40581    # Oops. Which didn't find the executable.
40582    # The splitting of arguments from the executable at a space might have been incorrect,
40583    # since paths with space are more likely in Windows. Give it another try with the whole
40584    # argument.
40585    path="$complete"
40586    arguments="EOL"
40587    new_path=`$CYGPATH -u "$path"`
40588    new_path=`$WHICH "$new_path" 2> /dev/null`
40589    # bat and cmd files are not always considered executable in cygwin causing which
40590    # to not find them
40591    if test "x$new_path" = x \
40592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40594      new_path=`$CYGPATH -u "$path"`
40595    fi
40596    if test "x$new_path" = x; then
40597      # It's still not found. Now this is an unrecoverable error.
40598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40599$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40600      has_space=`$ECHO "$complete" | $GREP " "`
40601      if test "x$has_space" != x; then
40602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40604      fi
40605      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40606    fi
40607  fi
40608
40609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40612  # "foo.exe" is OK but "foo" is an error.
40613  #
40614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40615  # It is also a way to make sure we got the proper file name for the real test later on.
40616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40617  if test "x$test_shortpath" = x; then
40618    # Short path failed, file does not exist as specified.
40619    # Try adding .exe or .cmd
40620    if test -f "${new_path}.exe"; then
40621      input_to_shortpath="${new_path}.exe"
40622    elif test -f "${new_path}.cmd"; then
40623      input_to_shortpath="${new_path}.cmd"
40624    else
40625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40626$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40629      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40630    fi
40631  else
40632    input_to_shortpath="$new_path"
40633  fi
40634
40635  # Call helper function which possibly converts this using DOS-style short mode.
40636  # If so, the updated path is stored in $new_path.
40637  new_path="$input_to_shortpath"
40638
40639  input_path="$input_to_shortpath"
40640  # Check if we need to convert this using DOS-style short mode. If the path
40641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40642  # take no chances and rewrite it.
40643  # Note: m4 eats our [], so we need to use [ and ] instead.
40644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40645  if test "x$has_forbidden_chars" != x; then
40646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40650      # Going to short mode and back again did indeed matter. Since short mode is
40651      # case insensitive, let's make it lowercase to improve readability.
40652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40653      # Now convert it back to Unix-stile (cygpath)
40654      input_path=`$CYGPATH -u "$shortmode_path"`
40655      new_path="$input_path"
40656    fi
40657  fi
40658
40659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40660  if test "x$test_cygdrive_prefix" = x; then
40661    # As a simple fix, exclude /usr/bin since it's not a real path.
40662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40664      # a path prefixed by /cygdrive for fixpath to work.
40665      new_path="$CYGWIN_ROOT_PATH$input_path"
40666    fi
40667  fi
40668
40669  # remove trailing .exe if any
40670  new_path="${new_path/%.exe/}"
40671
40672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40673
40674  # First separate the path from the arguments. This will split at the first
40675  # space.
40676  complete="$BUILD_LD"
40677  path="${complete%% *}"
40678  tmp="$complete EOL"
40679  arguments="${tmp#* }"
40680
40681  # Input might be given as Windows format, start by converting to
40682  # unix format.
40683  new_path="$path"
40684
40685  windows_path="$new_path"
40686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40687    unix_path=`$CYGPATH -u "$windows_path"`
40688    new_path="$unix_path"
40689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40691    new_path="$unix_path"
40692  fi
40693
40694
40695  # Now try to locate executable using which
40696  new_path=`$WHICH "$new_path" 2> /dev/null`
40697
40698  if test "x$new_path" = x; then
40699    # Oops. Which didn't find the executable.
40700    # The splitting of arguments from the executable at a space might have been incorrect,
40701    # since paths with space are more likely in Windows. Give it another try with the whole
40702    # argument.
40703    path="$complete"
40704    arguments="EOL"
40705    new_path="$path"
40706
40707  windows_path="$new_path"
40708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40709    unix_path=`$CYGPATH -u "$windows_path"`
40710    new_path="$unix_path"
40711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40713    new_path="$unix_path"
40714  fi
40715
40716
40717    new_path=`$WHICH "$new_path" 2> /dev/null`
40718    # bat and cmd files are not always considered executable in MSYS causing which
40719    # to not find them
40720    if test "x$new_path" = x \
40721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40723      new_path="$path"
40724
40725  windows_path="$new_path"
40726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40727    unix_path=`$CYGPATH -u "$windows_path"`
40728    new_path="$unix_path"
40729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40731    new_path="$unix_path"
40732  fi
40733
40734    fi
40735
40736    if test "x$new_path" = x; then
40737      # It's still not found. Now this is an unrecoverable error.
40738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40739$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40740      has_space=`$ECHO "$complete" | $GREP " "`
40741      if test "x$has_space" != x; then
40742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40744      fi
40745      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40746    fi
40747  fi
40748
40749  # Now new_path has a complete unix path to the binary
40750  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40751    # Keep paths in /bin as-is, but remove trailing .exe if any
40752    new_path="${new_path/%.exe/}"
40753    # Do not save /bin paths to all_fixpath_prefixes!
40754  else
40755    # Not in mixed or Windows style, start by that.
40756    new_path=`cmd //c echo $new_path`
40757
40758  input_path="$new_path"
40759  # Check if we need to convert this using DOS-style short mode. If the path
40760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40761  # take no chances and rewrite it.
40762  # Note: m4 eats our [], so we need to use [ and ] instead.
40763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40764  if test "x$has_forbidden_chars" != x; then
40765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40767  fi
40768
40769    # Output is in $new_path
40770
40771  windows_path="$new_path"
40772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40773    unix_path=`$CYGPATH -u "$windows_path"`
40774    new_path="$unix_path"
40775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40777    new_path="$unix_path"
40778  fi
40779
40780    # remove trailing .exe if any
40781    new_path="${new_path/%.exe/}"
40782
40783    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40784    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40785  fi
40786
40787  else
40788    # We're on a posix platform. Hooray! :)
40789    # First separate the path from the arguments. This will split at the first
40790    # space.
40791    complete="$BUILD_LD"
40792    path="${complete%% *}"
40793    tmp="$complete EOL"
40794    arguments="${tmp#* }"
40795
40796    # Cannot rely on the command "which" here since it doesn't always work.
40797    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40798    if test -z "$is_absolute_path"; then
40799      # Path to executable is not absolute. Find it.
40800      IFS_save="$IFS"
40801      IFS=:
40802      for p in $PATH; do
40803        if test -f "$p/$path" && test -x "$p/$path"; then
40804          new_path="$p/$path"
40805          break
40806        fi
40807      done
40808      IFS="$IFS_save"
40809    else
40810      # This is an absolute path, we can use it without further modifications.
40811      new_path="$path"
40812    fi
40813
40814    if test "x$new_path" = x; then
40815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40816$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40817      has_space=`$ECHO "$complete" | $GREP " "`
40818      if test "x$has_space" != x; then
40819        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40820$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40821      fi
40822      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40823    fi
40824  fi
40825
40826  # Now join together the path and the arguments once again
40827  if test "x$arguments" != xEOL; then
40828    new_complete="$new_path ${arguments% *}"
40829  else
40830    new_complete="$new_path"
40831  fi
40832
40833  if test "x$complete" != "x$new_complete"; then
40834    BUILD_LD="$new_complete"
40835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40836$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40837  fi
40838
40839  else
40840    # If we are not cross compiling, use the normal target compilers for
40841    # building the build platform executables.
40842    BUILD_CC="$CC"
40843    BUILD_CXX="$CXX"
40844    BUILD_LD="$LD"
40845  fi
40846
40847
40848
40849
40850
40851
40852  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40853    # For hotspot, we need these in Windows mixed path,
40854    # so rewrite them all. Need added .exe suffix.
40855    HOTSPOT_CXX="$CXX.exe"
40856    HOTSPOT_LD="$LD.exe"
40857    HOTSPOT_MT="$MT.exe"
40858    HOTSPOT_RC="$RC.exe"
40859
40860  unix_path="$HOTSPOT_CXX"
40861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40862    windows_path=`$CYGPATH -m "$unix_path"`
40863    HOTSPOT_CXX="$windows_path"
40864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40865    windows_path=`cmd //c echo $unix_path`
40866    HOTSPOT_CXX="$windows_path"
40867  fi
40868
40869
40870  unix_path="$HOTSPOT_LD"
40871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40872    windows_path=`$CYGPATH -m "$unix_path"`
40873    HOTSPOT_LD="$windows_path"
40874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40875    windows_path=`cmd //c echo $unix_path`
40876    HOTSPOT_LD="$windows_path"
40877  fi
40878
40879
40880  unix_path="$HOTSPOT_MT"
40881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40882    windows_path=`$CYGPATH -m "$unix_path"`
40883    HOTSPOT_MT="$windows_path"
40884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40885    windows_path=`cmd //c echo $unix_path`
40886    HOTSPOT_MT="$windows_path"
40887  fi
40888
40889
40890  unix_path="$HOTSPOT_RC"
40891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40892    windows_path=`$CYGPATH -m "$unix_path"`
40893    HOTSPOT_RC="$windows_path"
40894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40895    windows_path=`cmd //c echo $unix_path`
40896    HOTSPOT_RC="$windows_path"
40897  fi
40898
40899
40900
40901  else
40902    HOTSPOT_CXX="$CXX"
40903    HOTSPOT_LD="$LD"
40904  fi
40905
40906
40907
40908  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40909    USE_CLANG=true
40910  fi
40911
40912
40913  # LDEXE is the linker to use, when creating executables. Not really used.
40914  # FIXME: These should just be removed!
40915  LDEXE="$LD"
40916  LDEXECXX="$LDCXX"
40917
40918
40919
40920
40921
40922
40923  # The package path is used only on macosx?
40924  # FIXME: clean this up, and/or move it elsewhere.
40925  PACKAGE_PATH=/opt/local
40926
40927
40928  # Check for extra potential brokenness.
40929  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40930    # On Windows, double-check that we got the right compiler.
40931    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40932    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40933    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40934      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40935        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40936      fi
40937    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40938      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40939        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40940      fi
40941    fi
40942  fi
40943
40944  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40945    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40946    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40947    # This is later checked when setting flags.
40948
40949    # "-Og" suppported for GCC 4.8 and later
40950    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40951
40952  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40953$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40954  supports=yes
40955
40956  saved_cflags="$CFLAGS"
40957  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40958  ac_ext=c
40959ac_cpp='$CPP $CPPFLAGS'
40960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40962ac_compiler_gnu=$ac_cv_c_compiler_gnu
40963
40964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40965/* end confdefs.h.  */
40966int i;
40967_ACEOF
40968if ac_fn_c_try_compile "$LINENO"; then :
40969
40970else
40971  supports=no
40972fi
40973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40974  ac_ext=cpp
40975ac_cpp='$CXXCPP $CPPFLAGS'
40976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40979
40980  CFLAGS="$saved_cflags"
40981
40982  saved_cxxflags="$CXXFLAGS"
40983  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40984  ac_ext=cpp
40985ac_cpp='$CXXCPP $CPPFLAGS'
40986ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40987ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40988ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40989
40990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40991/* end confdefs.h.  */
40992int i;
40993_ACEOF
40994if ac_fn_cxx_try_compile "$LINENO"; then :
40995
40996else
40997  supports=no
40998fi
40999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41000  ac_ext=cpp
41001ac_cpp='$CXXCPP $CPPFLAGS'
41002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41005
41006  CXXFLAGS="$saved_cxxflags"
41007
41008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41009$as_echo "$supports" >&6; }
41010  if test "x$supports" = "xyes" ; then
41011    HAS_CFLAG_OPTIMIZE_DEBUG=true
41012  else
41013    HAS_CFLAG_OPTIMIZE_DEBUG=false
41014  fi
41015
41016
41017    # "-fsanitize=undefined" supported for GCC 4.9 and later
41018    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
41019
41020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
41021$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
41022  supports=yes
41023
41024  saved_cflags="$CFLAGS"
41025  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41026  ac_ext=c
41027ac_cpp='$CPP $CPPFLAGS'
41028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41030ac_compiler_gnu=$ac_cv_c_compiler_gnu
41031
41032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41033/* end confdefs.h.  */
41034int i;
41035_ACEOF
41036if ac_fn_c_try_compile "$LINENO"; then :
41037
41038else
41039  supports=no
41040fi
41041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41042  ac_ext=cpp
41043ac_cpp='$CXXCPP $CPPFLAGS'
41044ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41045ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41046ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41047
41048  CFLAGS="$saved_cflags"
41049
41050  saved_cxxflags="$CXXFLAGS"
41051  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41052  ac_ext=cpp
41053ac_cpp='$CXXCPP $CPPFLAGS'
41054ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41055ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41056ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41057
41058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41059/* end confdefs.h.  */
41060int i;
41061_ACEOF
41062if ac_fn_cxx_try_compile "$LINENO"; then :
41063
41064else
41065  supports=no
41066fi
41067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41068  ac_ext=cpp
41069ac_cpp='$CXXCPP $CPPFLAGS'
41070ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41071ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41072ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41073
41074  CXXFLAGS="$saved_cxxflags"
41075
41076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41077$as_echo "$supports" >&6; }
41078  if test "x$supports" = "xyes" ; then
41079    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
41080  else
41081    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
41082  fi
41083
41084
41085    # "-z relro" supported in GNU binutils 2.17 and later
41086    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41087
41088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41089$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41090  supports=yes
41091
41092  saved_ldflags="$LDFLAGS"
41093  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41094  ac_ext=c
41095ac_cpp='$CPP $CPPFLAGS'
41096ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41097ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41098ac_compiler_gnu=$ac_cv_c_compiler_gnu
41099
41100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41101/* end confdefs.h.  */
41102
41103int
41104main ()
41105{
41106
41107  ;
41108  return 0;
41109}
41110_ACEOF
41111if ac_fn_c_try_link "$LINENO"; then :
41112
41113else
41114  supports=no
41115fi
41116rm -f core conftest.err conftest.$ac_objext \
41117    conftest$ac_exeext conftest.$ac_ext
41118  ac_ext=cpp
41119ac_cpp='$CXXCPP $CPPFLAGS'
41120ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41121ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41122ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41123
41124  LDFLAGS="$saved_ldflags"
41125
41126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41127$as_echo "$supports" >&6; }
41128  if test "x$supports" = "xyes" ; then
41129    HAS_LINKER_RELRO=true
41130  else
41131    HAS_LINKER_RELRO=false
41132  fi
41133
41134
41135    # "-z now" supported in GNU binutils 2.11 and later
41136    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41137
41138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41139$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41140  supports=yes
41141
41142  saved_ldflags="$LDFLAGS"
41143  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41144  ac_ext=c
41145ac_cpp='$CPP $CPPFLAGS'
41146ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41147ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41148ac_compiler_gnu=$ac_cv_c_compiler_gnu
41149
41150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41151/* end confdefs.h.  */
41152
41153int
41154main ()
41155{
41156
41157  ;
41158  return 0;
41159}
41160_ACEOF
41161if ac_fn_c_try_link "$LINENO"; then :
41162
41163else
41164  supports=no
41165fi
41166rm -f core conftest.err conftest.$ac_objext \
41167    conftest$ac_exeext conftest.$ac_ext
41168  ac_ext=cpp
41169ac_cpp='$CXXCPP $CPPFLAGS'
41170ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41171ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41172ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41173
41174  LDFLAGS="$saved_ldflags"
41175
41176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41177$as_echo "$supports" >&6; }
41178  if test "x$supports" = "xyes" ; then
41179    HAS_LINKER_NOW=true
41180  else
41181    HAS_LINKER_NOW=false
41182  fi
41183
41184  fi
41185
41186  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41187  # in executable.'
41188  USING_BROKEN_SUSE_LD=no
41189  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41191$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41192    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41193    $ECHO "int main() { }" > main.c
41194    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41196$as_echo "no" >&6; }
41197      USING_BROKEN_SUSE_LD=no
41198    else
41199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41200$as_echo "yes" >&6; }
41201      USING_BROKEN_SUSE_LD=yes
41202    fi
41203    rm -rf version-script.map main.c a.out
41204  fi
41205
41206
41207
41208# Setup the JTReg Regression Test Harness.
41209
41210
41211# Check whether --with-jtreg was given.
41212if test "${with_jtreg+set}" = set; then :
41213  withval=$with_jtreg;
41214else
41215  with_jtreg=no
41216fi
41217
41218
41219  if test "x$with_jtreg" = xno; then
41220    # jtreg disabled
41221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41222$as_echo_n "checking for jtreg... " >&6; }
41223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41224$as_echo "no" >&6; }
41225  else
41226    if test "x$with_jtreg" != xyes; then
41227      # with path specified.
41228      JT_HOME="$with_jtreg"
41229    fi
41230
41231    if test "x$JT_HOME" != x; then
41232      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41233$as_echo_n "checking for jtreg... " >&6; }
41234
41235      # use JT_HOME enviroment var.
41236
41237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41238
41239  # Input might be given as Windows format, start by converting to
41240  # unix format.
41241  path="$JT_HOME"
41242  new_path=`$CYGPATH -u "$path"`
41243
41244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41247  # "foo.exe" is OK but "foo" is an error.
41248  #
41249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41250  # It is also a way to make sure we got the proper file name for the real test later on.
41251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41252  if test "x$test_shortpath" = x; then
41253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41254$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41255    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41256  fi
41257
41258  # Call helper function which possibly converts this using DOS-style short mode.
41259  # If so, the updated path is stored in $new_path.
41260
41261  input_path="$new_path"
41262  # Check if we need to convert this using DOS-style short mode. If the path
41263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41264  # take no chances and rewrite it.
41265  # Note: m4 eats our [], so we need to use [ and ] instead.
41266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41267  if test "x$has_forbidden_chars" != x; then
41268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41272      # Going to short mode and back again did indeed matter. Since short mode is
41273      # case insensitive, let's make it lowercase to improve readability.
41274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41275      # Now convert it back to Unix-stile (cygpath)
41276      input_path=`$CYGPATH -u "$shortmode_path"`
41277      new_path="$input_path"
41278    fi
41279  fi
41280
41281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41282  if test "x$test_cygdrive_prefix" = x; then
41283    # As a simple fix, exclude /usr/bin since it's not a real path.
41284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41286      # a path prefixed by /cygdrive for fixpath to work.
41287      new_path="$CYGWIN_ROOT_PATH$input_path"
41288    fi
41289  fi
41290
41291
41292  if test "x$path" != "x$new_path"; then
41293    JT_HOME="$new_path"
41294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41295$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41296  fi
41297
41298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41299
41300  path="$JT_HOME"
41301  has_colon=`$ECHO $path | $GREP ^.:`
41302  new_path="$path"
41303  if test "x$has_colon" = x; then
41304    # Not in mixed or Windows style, start by that.
41305    new_path=`cmd //c echo $path`
41306  fi
41307
41308
41309  input_path="$new_path"
41310  # Check if we need to convert this using DOS-style short mode. If the path
41311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41312  # take no chances and rewrite it.
41313  # Note: m4 eats our [], so we need to use [ and ] instead.
41314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41315  if test "x$has_forbidden_chars" != x; then
41316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41318  fi
41319
41320
41321  windows_path="$new_path"
41322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41323    unix_path=`$CYGPATH -u "$windows_path"`
41324    new_path="$unix_path"
41325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41327    new_path="$unix_path"
41328  fi
41329
41330  if test "x$path" != "x$new_path"; then
41331    JT_HOME="$new_path"
41332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41333$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41334  fi
41335
41336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41338
41339  else
41340    # We're on a posix platform. Hooray! :)
41341    path="$JT_HOME"
41342    has_space=`$ECHO "$path" | $GREP " "`
41343    if test "x$has_space" != x; then
41344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41345$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41347    fi
41348
41349    # Use eval to expand a potential ~
41350    eval path="$path"
41351    if test ! -f "$path" && test ! -d "$path"; then
41352      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41353    fi
41354
41355    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41356  fi
41357
41358
41359      # jtreg win32 script works for everybody
41360      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41361
41362      if test ! -f "$JTREGEXE"; then
41363        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41364      fi
41365
41366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41367$as_echo "$JTREGEXE" >&6; }
41368    else
41369      # try to find jtreg on path
41370
41371
41372
41373  # Publish this variable in the help.
41374
41375
41376  if test "x$JTREGEXE" = x; then
41377    # The variable is not set by user, try to locate tool using the code snippet
41378    for ac_prog in jtreg
41379do
41380  # Extract the first word of "$ac_prog", so it can be a program name with args.
41381set dummy $ac_prog; ac_word=$2
41382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41383$as_echo_n "checking for $ac_word... " >&6; }
41384if ${ac_cv_path_JTREGEXE+:} false; then :
41385  $as_echo_n "(cached) " >&6
41386else
41387  case $JTREGEXE in
41388  [\\/]* | ?:[\\/]*)
41389  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41390  ;;
41391  *)
41392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41393for as_dir in $PATH
41394do
41395  IFS=$as_save_IFS
41396  test -z "$as_dir" && as_dir=.
41397    for ac_exec_ext in '' $ac_executable_extensions; do
41398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41399    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41401    break 2
41402  fi
41403done
41404  done
41405IFS=$as_save_IFS
41406
41407  ;;
41408esac
41409fi
41410JTREGEXE=$ac_cv_path_JTREGEXE
41411if test -n "$JTREGEXE"; then
41412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41413$as_echo "$JTREGEXE" >&6; }
41414else
41415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41416$as_echo "no" >&6; }
41417fi
41418
41419
41420  test -n "$JTREGEXE" && break
41421done
41422
41423  else
41424    # The variable is set, but is it from the command line or the environment?
41425
41426    # Try to remove the string !JTREGEXE! from our list.
41427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41429      # If it failed, the variable was not from the command line. Ignore it,
41430      # but warn the user (except for BASH, which is always set by the calling BASH).
41431      if test "xJTREGEXE" != xBASH; then
41432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41433$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41434      fi
41435      # Try to locate tool using the code snippet
41436      for ac_prog in jtreg
41437do
41438  # Extract the first word of "$ac_prog", so it can be a program name with args.
41439set dummy $ac_prog; ac_word=$2
41440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41441$as_echo_n "checking for $ac_word... " >&6; }
41442if ${ac_cv_path_JTREGEXE+:} false; then :
41443  $as_echo_n "(cached) " >&6
41444else
41445  case $JTREGEXE in
41446  [\\/]* | ?:[\\/]*)
41447  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41448  ;;
41449  *)
41450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41451for as_dir in $PATH
41452do
41453  IFS=$as_save_IFS
41454  test -z "$as_dir" && as_dir=.
41455    for ac_exec_ext in '' $ac_executable_extensions; do
41456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41457    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41459    break 2
41460  fi
41461done
41462  done
41463IFS=$as_save_IFS
41464
41465  ;;
41466esac
41467fi
41468JTREGEXE=$ac_cv_path_JTREGEXE
41469if test -n "$JTREGEXE"; then
41470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41471$as_echo "$JTREGEXE" >&6; }
41472else
41473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41474$as_echo "no" >&6; }
41475fi
41476
41477
41478  test -n "$JTREGEXE" && break
41479done
41480
41481    else
41482      # If it succeeded, then it was overridden by the user. We will use it
41483      # for the tool.
41484
41485      # First remove it from the list of overridden variables, so we can test
41486      # for unknown variables in the end.
41487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41488
41489      # Check if the provided tool contains a complete path.
41490      tool_specified="$JTREGEXE"
41491      tool_basename="${tool_specified##*/}"
41492      if test "x$tool_basename" = "x$tool_specified"; then
41493        # A command without a complete path is provided, search $PATH.
41494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41495$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41496        # Extract the first word of "$tool_basename", so it can be a program name with args.
41497set dummy $tool_basename; ac_word=$2
41498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41499$as_echo_n "checking for $ac_word... " >&6; }
41500if ${ac_cv_path_JTREGEXE+:} false; then :
41501  $as_echo_n "(cached) " >&6
41502else
41503  case $JTREGEXE in
41504  [\\/]* | ?:[\\/]*)
41505  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41506  ;;
41507  *)
41508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41509for as_dir in $PATH
41510do
41511  IFS=$as_save_IFS
41512  test -z "$as_dir" && as_dir=.
41513    for ac_exec_ext in '' $ac_executable_extensions; do
41514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41515    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41517    break 2
41518  fi
41519done
41520  done
41521IFS=$as_save_IFS
41522
41523  ;;
41524esac
41525fi
41526JTREGEXE=$ac_cv_path_JTREGEXE
41527if test -n "$JTREGEXE"; then
41528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41529$as_echo "$JTREGEXE" >&6; }
41530else
41531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41532$as_echo "no" >&6; }
41533fi
41534
41535
41536        if test "x$JTREGEXE" = x; then
41537          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41538        fi
41539      else
41540        # Otherwise we believe it is a complete path. Use it as it is.
41541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41542$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41544$as_echo_n "checking for JTREGEXE... " >&6; }
41545        if test ! -x "$tool_specified"; then
41546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41547$as_echo "not found" >&6; }
41548          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41549        fi
41550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41551$as_echo "$tool_specified" >&6; }
41552      fi
41553    fi
41554  fi
41555
41556
41557
41558  if test "x$JTREGEXE" = x; then
41559    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41560  fi
41561
41562
41563      JT_HOME="`$DIRNAME $JTREGEXE`"
41564    fi
41565  fi
41566
41567
41568
41569
41570
41571
41572  # Option used to tell the compiler whether to create 32- or 64-bit executables
41573  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41574    COMPILER_TARGET_BITS_FLAG="-q"
41575  else
41576    COMPILER_TARGET_BITS_FLAG="-m"
41577  fi
41578
41579
41580  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41581  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41582    ARFLAGS="-r"
41583  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41584    ARFLAGS="-X64"
41585  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41586    # lib.exe is used as AR to create static libraries.
41587    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41588  else
41589    ARFLAGS=""
41590  fi
41591
41592
41593  ## Setup strip.
41594  # FIXME: should this really be per platform, or should it be per toolchain type?
41595  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41596  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41597  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41598    STRIPFLAGS="-g"
41599  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41600    STRIPFLAGS="-x"
41601  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41602    STRIPFLAGS="-S"
41603  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41604    STRIPFLAGS="-X32_64"
41605  fi
41606
41607  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41608    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41609  fi
41610
41611
41612  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41613    # FIXME: break out into MCSFLAGS
41614    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41615  fi
41616
41617
41618  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41619    CC_OUT_OPTION=-Fo
41620    EXE_OUT_OPTION=-out:
41621    LD_OUT_OPTION=-out:
41622    AR_OUT_OPTION=-out:
41623  else
41624    # The option used to specify the target .o,.a or .so file.
41625    # When compiling, how to specify the to be created object file.
41626    CC_OUT_OPTION='-o$(SPACE)'
41627    # When linking, how to specify the to be created executable.
41628    EXE_OUT_OPTION='-o$(SPACE)'
41629    # When linking, how to specify the to be created dynamically linkable library.
41630    LD_OUT_OPTION='-o$(SPACE)'
41631    # When archiving, how to specify the to be create static archive for object files.
41632    AR_OUT_OPTION='rcs$(SPACE)'
41633  fi
41634
41635
41636
41637
41638
41639  # On Windows, we need to set RC flags.
41640  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41641    RC_FLAGS="-nologo -l 0x409 -r"
41642    if test "x$VARIANT" = xOPT; then
41643      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41644    fi
41645
41646    # The version variables used to create RC_FLAGS may be overridden
41647    # in a custom configure script, or possibly the command line.
41648    # Let those variables be expanded at make time in spec.gmk.
41649    # The \$ are escaped to the shell, and the $(...) variables
41650    # are evaluated by make.
41651    RC_FLAGS="$RC_FLAGS \
41652        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41653        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41654        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41655        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41656        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41657        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41658        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41659  fi
41660
41661
41662  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41663    # silence copyright notice and other headers.
41664    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41665  fi
41666
41667  if test "x$SYSROOT" != "x"; then
41668    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41669      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41670        # Solaris Studio does not have a concept of sysroot. Instead we must
41671        # make sure the default include and lib dirs are appended to each
41672        # compile and link command line.
41673        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41674        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41675            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41676            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41677      fi
41678    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41679      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41680      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41681      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41682    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41683      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41684      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41685    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41686      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41687      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41688    fi
41689    # Propagate the sysroot args to hotspot
41690    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41691    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41692    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41693  fi
41694
41695  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41696  # set this here so it doesn't have to be peppered throughout the forest
41697  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41698    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41699    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41700  fi
41701
41702
41703
41704
41705
41706# FIXME: Currently we must test this after toolchain but before flags. Fix!
41707
41708# Now we can test some aspects on the target using configure macros.
41709
41710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41711$as_echo_n "checking for ANSI C header files... " >&6; }
41712if ${ac_cv_header_stdc+:} false; then :
41713  $as_echo_n "(cached) " >&6
41714else
41715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41716/* end confdefs.h.  */
41717#include <stdlib.h>
41718#include <stdarg.h>
41719#include <string.h>
41720#include <float.h>
41721
41722int
41723main ()
41724{
41725
41726  ;
41727  return 0;
41728}
41729_ACEOF
41730if ac_fn_cxx_try_compile "$LINENO"; then :
41731  ac_cv_header_stdc=yes
41732else
41733  ac_cv_header_stdc=no
41734fi
41735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41736
41737if test $ac_cv_header_stdc = yes; then
41738  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41740/* end confdefs.h.  */
41741#include <string.h>
41742
41743_ACEOF
41744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41745  $EGREP "memchr" >/dev/null 2>&1; then :
41746
41747else
41748  ac_cv_header_stdc=no
41749fi
41750rm -f conftest*
41751
41752fi
41753
41754if test $ac_cv_header_stdc = yes; then
41755  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41757/* end confdefs.h.  */
41758#include <stdlib.h>
41759
41760_ACEOF
41761if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41762  $EGREP "free" >/dev/null 2>&1; then :
41763
41764else
41765  ac_cv_header_stdc=no
41766fi
41767rm -f conftest*
41768
41769fi
41770
41771if test $ac_cv_header_stdc = yes; then
41772  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41773  if test "$cross_compiling" = yes; then :
41774  :
41775else
41776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41777/* end confdefs.h.  */
41778#include <ctype.h>
41779#include <stdlib.h>
41780#if ((' ' & 0x0FF) == 0x020)
41781# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41782# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41783#else
41784# define ISLOWER(c) \
41785		   (('a' <= (c) && (c) <= 'i') \
41786		     || ('j' <= (c) && (c) <= 'r') \
41787		     || ('s' <= (c) && (c) <= 'z'))
41788# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41789#endif
41790
41791#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41792int
41793main ()
41794{
41795  int i;
41796  for (i = 0; i < 256; i++)
41797    if (XOR (islower (i), ISLOWER (i))
41798	|| toupper (i) != TOUPPER (i))
41799      return 2;
41800  return 0;
41801}
41802_ACEOF
41803if ac_fn_cxx_try_run "$LINENO"; then :
41804
41805else
41806  ac_cv_header_stdc=no
41807fi
41808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41809  conftest.$ac_objext conftest.beam conftest.$ac_ext
41810fi
41811
41812fi
41813fi
41814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41815$as_echo "$ac_cv_header_stdc" >&6; }
41816if test $ac_cv_header_stdc = yes; then
41817
41818$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41819
41820fi
41821
41822# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41823for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41824		  inttypes.h stdint.h unistd.h
41825do :
41826  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41827ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41828"
41829if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41830  cat >>confdefs.h <<_ACEOF
41831#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41832_ACEOF
41833
41834fi
41835
41836done
41837
41838
41839
41840  ###############################################################################
41841  #
41842  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41843  # (The JVM can use 32 or 64 bit Java pointers but that decision
41844  # is made at runtime.)
41845  #
41846
41847  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41848    # Always specify -m flag on Solaris
41849    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41850
41851  # When we add flags to the "official" CFLAGS etc, we need to
41852  # keep track of these additions in ADDED_CFLAGS etc. These
41853  # will later be checked to make sure only controlled additions
41854  # have been made to CFLAGS etc.
41855  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41856  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41857  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41858
41859  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41860  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41861  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41862
41863  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41864  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41865  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41866
41867  elif test "x$COMPILE_TYPE" = xreduced; then
41868    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41869      # Specify -m if running reduced on other Posix platforms
41870
41871  # When we add flags to the "official" CFLAGS etc, we need to
41872  # keep track of these additions in ADDED_CFLAGS etc. These
41873  # will later be checked to make sure only controlled additions
41874  # have been made to CFLAGS etc.
41875  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41876  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41877  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41878
41879  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41880  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41881  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41882
41883  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41884  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41885  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41886
41887    fi
41888  fi
41889
41890  # Make compilation sanity check
41891  for ac_header in stdio.h
41892do :
41893  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41894if test "x$ac_cv_header_stdio_h" = xyes; then :
41895  cat >>confdefs.h <<_ACEOF
41896#define HAVE_STDIO_H 1
41897_ACEOF
41898
41899else
41900
41901    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41902$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41903    if test "x$COMPILE_TYPE" = xreduced; then
41904      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41905$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41906    elif test "x$COMPILE_TYPE" = xcross; then
41907      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41908$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41909    fi
41910    as_fn_error $? "Cannot continue." "$LINENO" 5
41911
41912fi
41913
41914done
41915
41916
41917  # The cast to long int works around a bug in the HP C Compiler
41918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41920# This bug is HP SR number 8606223364.
41921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41922$as_echo_n "checking size of int *... " >&6; }
41923if ${ac_cv_sizeof_int_p+:} false; then :
41924  $as_echo_n "(cached) " >&6
41925else
41926  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41927
41928else
41929  if test "$ac_cv_type_int_p" = yes; then
41930     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41932as_fn_error 77 "cannot compute sizeof (int *)
41933See \`config.log' for more details" "$LINENO" 5; }
41934   else
41935     ac_cv_sizeof_int_p=0
41936   fi
41937fi
41938
41939fi
41940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41941$as_echo "$ac_cv_sizeof_int_p" >&6; }
41942
41943
41944
41945cat >>confdefs.h <<_ACEOF
41946#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41947_ACEOF
41948
41949
41950
41951  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41952  if test "x$ac_cv_sizeof_int_p" = x; then
41953    # The test failed, lets stick to the assumed value.
41954    { $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
41955$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41956  else
41957    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41958
41959    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41960      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41961      # Let's try to implicitely set the compilers target architecture and retry the test
41962      { $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
41963$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;}
41964      { $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
41965$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;}
41966
41967  # When we add flags to the "official" CFLAGS etc, we need to
41968  # keep track of these additions in ADDED_CFLAGS etc. These
41969  # will later be checked to make sure only controlled additions
41970  # have been made to CFLAGS etc.
41971  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41972  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41973  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41974
41975  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41976  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41977  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41978
41979  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41980  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41981  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41982
41983
41984      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41985      unset ac_cv_sizeof_int_p
41986      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41987      cat >>confdefs.h <<_ACEOF
41988#undef SIZEOF_INT_P
41989_ACEOF
41990
41991      # The cast to long int works around a bug in the HP C Compiler
41992# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41993# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41994# This bug is HP SR number 8606223364.
41995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41996$as_echo_n "checking size of int *... " >&6; }
41997if ${ac_cv_sizeof_int_p+:} false; then :
41998  $as_echo_n "(cached) " >&6
41999else
42000  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42001
42002else
42003  if test "$ac_cv_type_int_p" = yes; then
42004     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42006as_fn_error 77 "cannot compute sizeof (int *)
42007See \`config.log' for more details" "$LINENO" 5; }
42008   else
42009     ac_cv_sizeof_int_p=0
42010   fi
42011fi
42012
42013fi
42014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42015$as_echo "$ac_cv_sizeof_int_p" >&6; }
42016
42017
42018
42019cat >>confdefs.h <<_ACEOF
42020#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42021_ACEOF
42022
42023
42024
42025      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42026
42027      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42028        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
42029      fi
42030    fi
42031  fi
42032
42033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42034$as_echo_n "checking for target address size... " >&6; }
42035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42036$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42037
42038
42039  ###############################################################################
42040  #
42041  # Is the target little of big endian?
42042  #
42043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42044$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42045if ${ac_cv_c_bigendian+:} false; then :
42046  $as_echo_n "(cached) " >&6
42047else
42048  ac_cv_c_bigendian=unknown
42049    # See if we're dealing with a universal compiler.
42050    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42051/* end confdefs.h.  */
42052#ifndef __APPLE_CC__
42053	       not a universal capable compiler
42054	     #endif
42055	     typedef int dummy;
42056
42057_ACEOF
42058if ac_fn_cxx_try_compile "$LINENO"; then :
42059
42060	# Check for potential -arch flags.  It is not universal unless
42061	# there are at least two -arch flags with different values.
42062	ac_arch=
42063	ac_prev=
42064	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42065	 if test -n "$ac_prev"; then
42066	   case $ac_word in
42067	     i?86 | x86_64 | ppc | ppc64)
42068	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42069		 ac_arch=$ac_word
42070	       else
42071		 ac_cv_c_bigendian=universal
42072		 break
42073	       fi
42074	       ;;
42075	   esac
42076	   ac_prev=
42077	 elif test "x$ac_word" = "x-arch"; then
42078	   ac_prev=arch
42079	 fi
42080       done
42081fi
42082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42083    if test $ac_cv_c_bigendian = unknown; then
42084      # See if sys/param.h defines the BYTE_ORDER macro.
42085      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42086/* end confdefs.h.  */
42087#include <sys/types.h>
42088	     #include <sys/param.h>
42089
42090int
42091main ()
42092{
42093#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42094		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42095		     && LITTLE_ENDIAN)
42096	      bogus endian macros
42097	     #endif
42098
42099  ;
42100  return 0;
42101}
42102_ACEOF
42103if ac_fn_cxx_try_compile "$LINENO"; then :
42104  # It does; now see whether it defined to BIG_ENDIAN or not.
42105	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42106/* end confdefs.h.  */
42107#include <sys/types.h>
42108		#include <sys/param.h>
42109
42110int
42111main ()
42112{
42113#if BYTE_ORDER != BIG_ENDIAN
42114		 not big endian
42115		#endif
42116
42117  ;
42118  return 0;
42119}
42120_ACEOF
42121if ac_fn_cxx_try_compile "$LINENO"; then :
42122  ac_cv_c_bigendian=yes
42123else
42124  ac_cv_c_bigendian=no
42125fi
42126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42127fi
42128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42129    fi
42130    if test $ac_cv_c_bigendian = unknown; then
42131      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42132      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42133/* end confdefs.h.  */
42134#include <limits.h>
42135
42136int
42137main ()
42138{
42139#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42140	      bogus endian macros
42141	     #endif
42142
42143  ;
42144  return 0;
42145}
42146_ACEOF
42147if ac_fn_cxx_try_compile "$LINENO"; then :
42148  # It does; now see whether it defined to _BIG_ENDIAN or not.
42149	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42150/* end confdefs.h.  */
42151#include <limits.h>
42152
42153int
42154main ()
42155{
42156#ifndef _BIG_ENDIAN
42157		 not big endian
42158		#endif
42159
42160  ;
42161  return 0;
42162}
42163_ACEOF
42164if ac_fn_cxx_try_compile "$LINENO"; then :
42165  ac_cv_c_bigendian=yes
42166else
42167  ac_cv_c_bigendian=no
42168fi
42169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42170fi
42171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42172    fi
42173    if test $ac_cv_c_bigendian = unknown; then
42174      # Compile a test program.
42175      if test "$cross_compiling" = yes; then :
42176  # Try to guess by grepping values from an object file.
42177	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42178/* end confdefs.h.  */
42179short int ascii_mm[] =
42180		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42181		short int ascii_ii[] =
42182		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42183		int use_ascii (int i) {
42184		  return ascii_mm[i] + ascii_ii[i];
42185		}
42186		short int ebcdic_ii[] =
42187		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42188		short int ebcdic_mm[] =
42189		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42190		int use_ebcdic (int i) {
42191		  return ebcdic_mm[i] + ebcdic_ii[i];
42192		}
42193		extern int foo;
42194
42195int
42196main ()
42197{
42198return use_ascii (foo) == use_ebcdic (foo);
42199  ;
42200  return 0;
42201}
42202_ACEOF
42203if ac_fn_cxx_try_compile "$LINENO"; then :
42204  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42205	      ac_cv_c_bigendian=yes
42206	    fi
42207	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42208	      if test "$ac_cv_c_bigendian" = unknown; then
42209		ac_cv_c_bigendian=no
42210	      else
42211		# finding both strings is unlikely to happen, but who knows?
42212		ac_cv_c_bigendian=unknown
42213	      fi
42214	    fi
42215fi
42216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42217else
42218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42219/* end confdefs.h.  */
42220$ac_includes_default
42221int
42222main ()
42223{
42224
42225	     /* Are we little or big endian?  From Harbison&Steele.  */
42226	     union
42227	     {
42228	       long int l;
42229	       char c[sizeof (long int)];
42230	     } u;
42231	     u.l = 1;
42232	     return u.c[sizeof (long int) - 1] == 1;
42233
42234  ;
42235  return 0;
42236}
42237_ACEOF
42238if ac_fn_cxx_try_run "$LINENO"; then :
42239  ac_cv_c_bigendian=no
42240else
42241  ac_cv_c_bigendian=yes
42242fi
42243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42244  conftest.$ac_objext conftest.beam conftest.$ac_ext
42245fi
42246
42247    fi
42248fi
42249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42250$as_echo "$ac_cv_c_bigendian" >&6; }
42251 case $ac_cv_c_bigendian in #(
42252   yes)
42253     ENDIAN="big";; #(
42254   no)
42255     ENDIAN="little" ;; #(
42256   universal)
42257     ENDIAN="universal_endianness"
42258     ;; #(
42259   *)
42260     ENDIAN="unknown" ;;
42261 esac
42262
42263
42264  if test "x$ENDIAN" = xuniversal_endianness; then
42265    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42266  fi
42267  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42268    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
42269  fi
42270
42271
42272# Configure flags for the tools
42273
42274  ###############################################################################
42275  #
42276  # How to compile shared libraries.
42277  #
42278
42279  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42280    PICFLAG="-fPIC"
42281    C_FLAG_REORDER=''
42282    CXX_FLAG_REORDER=''
42283
42284    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42285      # Linking is different on MacOSX
42286      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42287      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42288      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42289      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42290      SET_SHARED_LIBRARY_MAPFILE=''
42291    else
42292      # Default works for linux, might work on other platforms as well.
42293      SHARED_LIBRARY_FLAGS='-shared'
42294      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42295      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42296      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42297      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42298    fi
42299  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42300    PICFLAG=''
42301    C_FLAG_REORDER=''
42302    CXX_FLAG_REORDER=''
42303
42304    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42305      # Linking is different on MacOSX
42306      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42307      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42308      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42309      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42310      SET_SHARED_LIBRARY_MAPFILE=''
42311    else
42312      # Default works for linux, might work on other platforms as well.
42313      SHARED_LIBRARY_FLAGS='-shared'
42314      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42315      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42316      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42317      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42318    fi
42319  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42320    PICFLAG="-KPIC"
42321    C_FLAG_REORDER='-xF'
42322    CXX_FLAG_REORDER='-xF'
42323    SHARED_LIBRARY_FLAGS="-G"
42324    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42325    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42326    SET_SHARED_LIBRARY_NAME=''
42327    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42328  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42329    PICFLAG="-qpic=large"
42330    C_FLAG_REORDER=''
42331    CXX_FLAG_REORDER=''
42332    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42333    SET_EXECUTABLE_ORIGIN=""
42334    SET_SHARED_LIBRARY_ORIGIN=''
42335    SET_SHARED_LIBRARY_NAME=''
42336    SET_SHARED_LIBRARY_MAPFILE=''
42337  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42338    PICFLAG=""
42339    C_FLAG_REORDER=''
42340    CXX_FLAG_REORDER=''
42341    SHARED_LIBRARY_FLAGS="-LD"
42342    SET_EXECUTABLE_ORIGIN=''
42343    SET_SHARED_LIBRARY_ORIGIN=''
42344    SET_SHARED_LIBRARY_NAME=''
42345    SET_SHARED_LIBRARY_MAPFILE=''
42346  fi
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42357    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42358    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42359    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42360  fi
42361  # The (cross) compiler is now configured, we can now test capabilities
42362  # of the target platform.
42363
42364
42365
42366  ###############################################################################
42367  #
42368  # Setup the opt flags for different compilers
42369  # and different operating systems.
42370  #
42371
42372  # FIXME: this was indirectly the old default, but just inherited.
42373  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42374  #   C_FLAG_DEPS="-MMD -MF"
42375  # fi
42376
42377  # Generate make dependency files
42378  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42379    C_FLAG_DEPS="-MMD -MF"
42380  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42381    C_FLAG_DEPS="-MMD -MF"
42382  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42383    C_FLAG_DEPS="-xMMD -xMF"
42384  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42385    C_FLAG_DEPS="-qmakedep=gcc -MF"
42386  fi
42387  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42388
42389
42390
42391  # Debug symbols
42392  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42393    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42394      # reduce from default "-g2" option to save space
42395      CFLAGS_DEBUG_SYMBOLS="-g1"
42396      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42397    else
42398      CFLAGS_DEBUG_SYMBOLS="-g"
42399      CXXFLAGS_DEBUG_SYMBOLS="-g"
42400    fi
42401  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42402    CFLAGS_DEBUG_SYMBOLS="-g"
42403    CXXFLAGS_DEBUG_SYMBOLS="-g"
42404  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42405    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42406    # FIXME: likely a bug, this disables debug symbols rather than enables them
42407    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42408  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42409    CFLAGS_DEBUG_SYMBOLS="-g"
42410    CXXFLAGS_DEBUG_SYMBOLS="-g"
42411  fi
42412
42413
42414
42415  # bounds, memory and behavior checking options
42416  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42417    case $DEBUG_LEVEL in
42418    release )
42419      # no adjustment
42420      ;;
42421    fastdebug )
42422      # no adjustment
42423      ;;
42424    slowdebug )
42425      # Add runtime stack smashing and undefined behavior checks
42426      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42427      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42428      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42429        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42430        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
42431      fi
42432      ;;
42433    esac
42434  fi
42435
42436
42437
42438  # Optimization levels
42439  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42440    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42441
42442    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42443      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42444      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42445      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42446      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42447      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42448      C_O_FLAG_NONE="-xregs=no%frameptr"
42449      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42450      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42451      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42452      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42453      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42454      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42455        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42456        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42457      fi
42458    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42459      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42460      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42461      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42462      C_O_FLAG_DEBUG=""
42463      C_O_FLAG_NONE=""
42464      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42465      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42466      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42467      C_O_FLAG_DEBUG=""
42468      CXX_O_FLAG_NONE=""
42469    fi
42470  else
42471    # The remaining toolchains share opt flags between CC and CXX;
42472    # setup for C and duplicate afterwards.
42473    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42474      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42475        # On MacOSX we optimize for size, something
42476        # we should do for all platforms?
42477        C_O_FLAG_HIGHEST="-Os"
42478        C_O_FLAG_HI="-Os"
42479        C_O_FLAG_NORM="-Os"
42480      else
42481        C_O_FLAG_HIGHEST="-O3"
42482        C_O_FLAG_HI="-O3"
42483        C_O_FLAG_NORM="-O2"
42484      fi
42485      C_O_FLAG_DEBUG="-O0"
42486      C_O_FLAG_NONE="-O0"
42487    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42488      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42489        # On MacOSX we optimize for size, something
42490        # we should do for all platforms?
42491        C_O_FLAG_HIGHEST="-Os"
42492        C_O_FLAG_HI="-Os"
42493        C_O_FLAG_NORM="-Os"
42494      else
42495        C_O_FLAG_HIGHEST="-O3"
42496        C_O_FLAG_HI="-O3"
42497        C_O_FLAG_NORM="-O2"
42498      fi
42499      C_O_FLAG_DEBUG="-O0"
42500      C_O_FLAG_NONE="-O0"
42501    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42502      C_O_FLAG_HIGHEST="-O3"
42503      C_O_FLAG_HI="-O3 -qstrict"
42504      C_O_FLAG_NORM="-O2"
42505      C_O_FLAG_DEBUG="-qnoopt"
42506      C_O_FLAG_NONE="-qnoop"
42507    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42508      C_O_FLAG_HIGHEST="-O2"
42509      C_O_FLAG_HI="-O1"
42510      C_O_FLAG_NORM="-O1"
42511      C_O_FLAG_DEBUG="-Od"
42512      C_O_FLAG_NONE="-Od"
42513    fi
42514    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42515    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42516    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42517    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42518    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42519  fi
42520
42521  # Adjust optimization flags according to debug level.
42522  case $DEBUG_LEVEL in
42523    release )
42524      # no adjustment
42525      ;;
42526    fastdebug )
42527      # Not quite so much optimization
42528      C_O_FLAG_HI="$C_O_FLAG_NORM"
42529      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42530      ;;
42531    slowdebug )
42532      # Disable optimization
42533      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42534      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42535      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42536      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42537      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42538      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42539      ;;
42540  esac
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554  # Special extras...
42555  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42556    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42557      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42558      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42559    fi
42560  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42561    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42562    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42563    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42564  fi
42565
42566  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42567    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42568$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42569  fi
42570
42571  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42572    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42573$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42574  fi
42575
42576  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42577    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42578$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42579  fi
42580
42581
42582# Check whether --with-extra-cflags was given.
42583if test "${with_extra_cflags+set}" = set; then :
42584  withval=$with_extra_cflags;
42585fi
42586
42587
42588
42589# Check whether --with-extra-cxxflags was given.
42590if test "${with_extra_cxxflags+set}" = set; then :
42591  withval=$with_extra_cxxflags;
42592fi
42593
42594
42595
42596# Check whether --with-extra-ldflags was given.
42597if test "${with_extra_ldflags+set}" = set; then :
42598  withval=$with_extra_ldflags;
42599fi
42600
42601
42602  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42603  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42604  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42605
42606  # Hotspot needs these set in their legacy form
42607  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42608  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42609  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42610
42611
42612
42613
42614
42615  ###############################################################################
42616  #
42617  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42618  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42619  #
42620
42621  # Setup compiler/platform specific flags into
42622  #    CFLAGS_JDK    - C Compiler flags
42623  #    CXXFLAGS_JDK  - C++ Compiler flags
42624  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42625  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42626    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42627        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42628    case $OPENJDK_TARGET_CPU_ARCH in
42629      arm )
42630        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42631        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42632        ;;
42633      ppc )
42634        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42635        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42636        ;;
42637      * )
42638        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42639        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42640        ;;
42641    esac
42642  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42643    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42644    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42645      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42646      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42647    fi
42648
42649    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42650    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42651  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42652    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42653    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42654  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42655    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42656    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42657    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42658    -DWIN32 -DIAL"
42659    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42660      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42661    else
42662      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42663    fi
42664  fi
42665
42666  ###############################################################################
42667
42668  # Adjust flags according to debug level.
42669  case $DEBUG_LEVEL in
42670    fastdebug | slowdebug )
42671      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42672      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42673      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42674      ;;
42675    release )
42676      ;;
42677    * )
42678      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42679      ;;
42680  esac
42681
42682  # Setup LP64
42683  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42684
42685  # Set some common defines. These works for all compilers, but assume
42686  # -D is universally accepted.
42687
42688  # Setup endianness
42689  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42690    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42691    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42692    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42693    #   Note: -Dmacro         is the same as    #define macro 1
42694    #         -Dmacro=        is the same as    #define macro
42695    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42696      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42697    else
42698      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42699    fi
42700  else
42701    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42702    # are defined in the system?
42703    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42704      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42705    else
42706      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42707    fi
42708  fi
42709
42710  # Setup target OS define. Use OS target name but in upper case.
42711  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42712  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42713
42714  # Setup target CPU
42715  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42716
42717  # Setup debug/release defines
42718  if test "x$DEBUG_LEVEL" = xrelease; then
42719    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42720    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42721      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42722    fi
42723  else
42724    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42725  fi
42726
42727  # Setup release name
42728  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42729
42730
42731  # Set some additional per-OS defines.
42732  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42733    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42734  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42735    # FIXME: PPC64 should not be here.
42736    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42737  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42738    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42739  fi
42740
42741  # Additional macosx handling
42742  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42743    # Setting these parameters makes it an error to link to macosx APIs that are
42744    # newer than the given OS version and makes the linked binaries compatible
42745    # even if built on a newer version of the OS.
42746    # The expected format is X.Y.Z
42747    MACOSX_VERSION_MIN=10.7.0
42748
42749
42750    # The macro takes the version with no dots, ex: 1070
42751    # Let the flags variables get resolved in make for easier override on make
42752    # command line.
42753    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42754    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42755  fi
42756
42757  # Setup some hard coded includes
42758  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42759      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42760      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42761      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
42762
42763  # The shared libraries are compiled using the picflag.
42764  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42765  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42766
42767  # Executable flags
42768  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42769  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42770
42771
42772
42773
42774
42775
42776  # Setup LDFLAGS et al.
42777  #
42778
42779  # Now this is odd. The JDK native libraries have to link against libjvm.so
42780  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42781  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42782  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42783  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42784  # libraries will link to whatever is in memory. Yuck.
42785  #
42786  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42787  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42788    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42789    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42790      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42791    fi
42792    # TODO: make -debug optional "--disable-full-debug-symbols"
42793    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42794  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42795    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42796    # We have previously set HAS_GNU_HASH if this is the case
42797    if test -n "$HAS_GNU_HASH"; then
42798      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42799    fi
42800    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42801      # And since we now know that the linker is gnu, then add -z defs, to forbid
42802      # undefined symbols in object files.
42803      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42804      case $DEBUG_LEVEL in
42805        release )
42806          # tell linker to optimize libraries.
42807          # Should this be supplied to the OSS linker as well?
42808          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42809          ;;
42810        slowdebug )
42811          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42812            # do relocations at load
42813            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42814            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42815          fi
42816          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42817            # mark relocations read only
42818            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42819            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42820          fi
42821          ;;
42822        fastdebug )
42823          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42824            # mark relocations read only
42825            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42826            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42827          fi
42828          ;;
42829        * )
42830          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42831          ;;
42832        esac
42833    fi
42834  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42835    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42836    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42837  fi
42838
42839  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42840    # If undefined behaviour detection is enabled then we need to tell linker.
42841    case $DEBUG_LEVEL in
42842      release | fastdebug )
42843        ;;
42844      slowdebug )
42845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42846$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42847        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42848          # enable undefined behaviour checking
42849          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42850          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42851        fi
42852        ;;
42853      * )
42854        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42855        ;;
42856    esac
42857  fi
42858
42859  # Customize LDFLAGS for executables
42860
42861  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42862
42863  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42864    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42865      LDFLAGS_STACK_SIZE=1048576
42866    else
42867      LDFLAGS_STACK_SIZE=327680
42868    fi
42869    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42870  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42871    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42872  fi
42873
42874  # Customize LDFLAGS for libs
42875  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42876
42877  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42878    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42879    LDFLAGS_JDKLIB_SUFFIX=""
42880  else
42881    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42882        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42883
42884    # On some platforms (mac) the linker warns about non existing -L dirs.
42885    # Add server first if available. Linking aginst client does not always produce the same results.
42886    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42887    # Default to server for other variants.
42888    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42889      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42890    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42891      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42892    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42893      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42894    else
42895      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42896    fi
42897
42898    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42899    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42900      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42901    fi
42902  fi
42903
42904
42905
42906
42907
42908
42909
42910
42911  # Some Zero and Shark settings.
42912  # ZERO_ARCHFLAG tells the compiler which mode to build for
42913  case "${OPENJDK_TARGET_CPU}" in
42914    s390)
42915      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42916      ;;
42917    *)
42918      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42919  esac
42920
42921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42922$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42923  supports=yes
42924
42925  saved_cflags="$CFLAGS"
42926  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42927  ac_ext=c
42928ac_cpp='$CPP $CPPFLAGS'
42929ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42930ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42931ac_compiler_gnu=$ac_cv_c_compiler_gnu
42932
42933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42934/* end confdefs.h.  */
42935int i;
42936_ACEOF
42937if ac_fn_c_try_compile "$LINENO"; then :
42938
42939else
42940  supports=no
42941fi
42942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42943  ac_ext=cpp
42944ac_cpp='$CXXCPP $CPPFLAGS'
42945ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42946ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42947ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42948
42949  CFLAGS="$saved_cflags"
42950
42951  saved_cxxflags="$CXXFLAGS"
42952  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42953  ac_ext=cpp
42954ac_cpp='$CXXCPP $CPPFLAGS'
42955ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42956ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42957ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42958
42959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42960/* end confdefs.h.  */
42961int i;
42962_ACEOF
42963if ac_fn_cxx_try_compile "$LINENO"; then :
42964
42965else
42966  supports=no
42967fi
42968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42969  ac_ext=cpp
42970ac_cpp='$CXXCPP $CPPFLAGS'
42971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42974
42975  CXXFLAGS="$saved_cxxflags"
42976
42977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42978$as_echo "$supports" >&6; }
42979  if test "x$supports" = "xyes" ; then
42980    :
42981  else
42982    ZERO_ARCHFLAG=""
42983  fi
42984
42985
42986
42987  # Check that the compiler supports -mX (or -qX on AIX) flags
42988  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42989
42990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42991$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42992  supports=yes
42993
42994  saved_cflags="$CFLAGS"
42995  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42996  ac_ext=c
42997ac_cpp='$CPP $CPPFLAGS'
42998ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42999ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43000ac_compiler_gnu=$ac_cv_c_compiler_gnu
43001
43002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43003/* end confdefs.h.  */
43004int i;
43005_ACEOF
43006if ac_fn_c_try_compile "$LINENO"; then :
43007
43008else
43009  supports=no
43010fi
43011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43012  ac_ext=cpp
43013ac_cpp='$CXXCPP $CPPFLAGS'
43014ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43015ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43016ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43017
43018  CFLAGS="$saved_cflags"
43019
43020  saved_cxxflags="$CXXFLAGS"
43021  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43022  ac_ext=cpp
43023ac_cpp='$CXXCPP $CPPFLAGS'
43024ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43025ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43026ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43027
43028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43029/* end confdefs.h.  */
43030int i;
43031_ACEOF
43032if ac_fn_cxx_try_compile "$LINENO"; then :
43033
43034else
43035  supports=no
43036fi
43037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43038  ac_ext=cpp
43039ac_cpp='$CXXCPP $CPPFLAGS'
43040ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43041ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43042ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43043
43044  CXXFLAGS="$saved_cxxflags"
43045
43046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43047$as_echo "$supports" >&6; }
43048  if test "x$supports" = "xyes" ; then
43049    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43050  else
43051    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43052  fi
43053
43054
43055
43056  case "${TOOLCHAIN_TYPE}" in
43057    microsoft)
43058      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43059      ;;
43060    solstudio)
43061      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43062      ;;
43063    gcc)
43064      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43065      ;;
43066    clang)
43067      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43068      ;;
43069  esac
43070
43071
43072
43073# Setup debug symbols (need objcopy from the toolchain for that)
43074
43075  #
43076  # ENABLE_DEBUG_SYMBOLS
43077  # This must be done after the toolchain is setup, since we're looking at objcopy.
43078  #
43079  # Check whether --enable-debug-symbols was given.
43080if test "${enable_debug_symbols+set}" = set; then :
43081  enableval=$enable_debug_symbols;
43082fi
43083
43084
43085  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43086$as_echo_n "checking if we should generate debug symbols... " >&6; }
43087
43088  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43089    # explicit enabling of enable-debug-symbols and can't find objcopy
43090    #   this is an error
43091    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43092  fi
43093
43094  if test "x$enable_debug_symbols" = "xyes"; then
43095    ENABLE_DEBUG_SYMBOLS=true
43096  elif test "x$enable_debug_symbols" = "xno"; then
43097    ENABLE_DEBUG_SYMBOLS=false
43098  else
43099    # Default is on if objcopy is found
43100    if test "x$OBJCOPY" != x; then
43101      ENABLE_DEBUG_SYMBOLS=true
43102    # MacOS X and Windows don't use objcopy but default is on for those OSes
43103    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43104      ENABLE_DEBUG_SYMBOLS=true
43105    else
43106      ENABLE_DEBUG_SYMBOLS=false
43107    fi
43108  fi
43109
43110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43111$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43112
43113  #
43114  # ZIP_DEBUGINFO_FILES
43115  #
43116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43117$as_echo_n "checking if we should zip debug-info files... " >&6; }
43118  # Check whether --enable-zip-debug-info was given.
43119if test "${enable_zip_debug_info+set}" = set; then :
43120  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43121else
43122  enable_zip_debug_info="yes"
43123fi
43124
43125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43126$as_echo "${enable_zip_debug_info}" >&6; }
43127
43128  if test "x${enable_zip_debug_info}" = "xno"; then
43129    ZIP_DEBUGINFO_FILES=false
43130  else
43131    ZIP_DEBUGINFO_FILES=true
43132  fi
43133
43134
43135
43136
43137
43138###############################################################################
43139#
43140# Check dependencies for external and internal libraries.
43141#
43142###############################################################################
43143
43144# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43145
43146  # When using cygwin or msys, we need a wrapper binary that renames
43147  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43148  # @files and rewrites these too! This wrapper binary is
43149  # called fixpath.
43150  FIXPATH=
43151  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43153$as_echo_n "checking if fixpath can be created... " >&6; }
43154    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43155    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43156    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43157      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43158      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43159      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43160      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43161    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43162      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43163      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43164
43165      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43166      # @ was chosen as separator to minimize risk of other tools messing around with it
43167      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43168      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43169
43170      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43171    fi
43172    rm -f $OUTPUT_ROOT/fixpath*
43173    cd $OUTPUT_ROOT
43174    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43175    cd $CURDIR
43176
43177    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43179$as_echo "no" >&6; }
43180      cat $OUTPUT_ROOT/fixpath1.log
43181      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43182    fi
43183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43184$as_echo "yes" >&6; }
43185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43186$as_echo_n "checking if fixpath.exe works... " >&6; }
43187    cd $OUTPUT_ROOT
43188    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43189    cd $CURDIR
43190    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43192$as_echo "no" >&6; }
43193      cat $OUTPUT_ROOT/fixpath2.log
43194      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43195    fi
43196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43197$as_echo "yes" >&6; }
43198    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43199  fi
43200
43201
43202
43203
43204
43205
43206  ###############################################################################
43207  #
43208  # OS specific settings that we never will need to probe.
43209  #
43210  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43212$as_echo_n "checking what is not needed on Linux?... " >&6; }
43213    PULSE_NOT_NEEDED=yes
43214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43215$as_echo "pulse" >&6; }
43216  fi
43217
43218  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43220$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43221    ALSA_NOT_NEEDED=yes
43222    PULSE_NOT_NEEDED=yes
43223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43224$as_echo "alsa pulse" >&6; }
43225  fi
43226
43227  if test "x$OPENJDK_TARGET_OS" = xaix; then
43228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43229$as_echo_n "checking what is not needed on AIX?... " >&6; }
43230    ALSA_NOT_NEEDED=yes
43231    PULSE_NOT_NEEDED=yes
43232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43233$as_echo "alsa pulse" >&6; }
43234  fi
43235
43236
43237  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43239$as_echo_n "checking what is not needed on Windows?... " >&6; }
43240    CUPS_NOT_NEEDED=yes
43241    ALSA_NOT_NEEDED=yes
43242    PULSE_NOT_NEEDED=yes
43243    X11_NOT_NEEDED=yes
43244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43245$as_echo "alsa cups pulse x11" >&6; }
43246  fi
43247
43248  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43250$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43251    ALSA_NOT_NEEDED=yes
43252    PULSE_NOT_NEEDED=yes
43253    X11_NOT_NEEDED=yes
43254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43255$as_echo "alsa pulse x11" >&6; }
43256  fi
43257
43258  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43260$as_echo_n "checking what is not needed on bsd?... " >&6; }
43261    ALSA_NOT_NEEDED=yes
43262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43263$as_echo "alsa" >&6; }
43264  fi
43265
43266  if test "x$OPENJDK" = "xfalse"; then
43267    FREETYPE_NOT_NEEDED=yes
43268  fi
43269
43270  if test "x$SUPPORT_HEADFUL" = xno; then
43271    X11_NOT_NEEDED=yes
43272  fi
43273
43274
43275
43276  ###############################################################################
43277  #
43278  # Check for X Windows
43279  #
43280
43281  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43282  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43283  # --x-libraries for the sysroot, if that seems to be correct.
43284  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43285    if test "x$SYSROOT" != "x"; then
43286      if test "x$x_includes" = xNONE; then
43287        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43288          x_includes="$SYSROOT/usr/X11R6/include"
43289        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43290          x_includes="$SYSROOT/usr/include"
43291        fi
43292      fi
43293      if test "x$x_libraries" = xNONE; then
43294        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43295          x_libraries="$SYSROOT/usr/X11R6/lib"
43296        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43297          x_libraries="$SYSROOT/usr/lib64"
43298        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43299          x_libraries="$SYSROOT/usr/lib"
43300        fi
43301      fi
43302    fi
43303  fi
43304
43305  # Now let autoconf do it's magic
43306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43307$as_echo_n "checking for X... " >&6; }
43308
43309
43310# Check whether --with-x was given.
43311if test "${with_x+set}" = set; then :
43312  withval=$with_x;
43313fi
43314
43315# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43316if test "x$with_x" = xno; then
43317  # The user explicitly disabled X.
43318  have_x=disabled
43319else
43320  case $x_includes,$x_libraries in #(
43321    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43322    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43323  $as_echo_n "(cached) " >&6
43324else
43325  # One or both of the vars are not set, and there is no cached value.
43326ac_x_includes=no ac_x_libraries=no
43327rm -f -r conftest.dir
43328if mkdir conftest.dir; then
43329  cd conftest.dir
43330  cat >Imakefile <<'_ACEOF'
43331incroot:
43332	@echo incroot='${INCROOT}'
43333usrlibdir:
43334	@echo usrlibdir='${USRLIBDIR}'
43335libdir:
43336	@echo libdir='${LIBDIR}'
43337_ACEOF
43338  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43339    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43340    for ac_var in incroot usrlibdir libdir; do
43341      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43342    done
43343    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43344    for ac_extension in a so sl dylib la dll; do
43345      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43346	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43347	ac_im_usrlibdir=$ac_im_libdir; break
43348      fi
43349    done
43350    # Screen out bogus values from the imake configuration.  They are
43351    # bogus both because they are the default anyway, and because
43352    # using them would break gcc on systems where it needs fixed includes.
43353    case $ac_im_incroot in
43354	/usr/include) ac_x_includes= ;;
43355	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43356    esac
43357    case $ac_im_usrlibdir in
43358	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43359	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43360    esac
43361  fi
43362  cd ..
43363  rm -f -r conftest.dir
43364fi
43365
43366# Standard set of common directories for X headers.
43367# Check X11 before X11Rn because it is often a symlink to the current release.
43368ac_x_header_dirs='
43369/usr/X11/include
43370/usr/X11R7/include
43371/usr/X11R6/include
43372/usr/X11R5/include
43373/usr/X11R4/include
43374
43375/usr/include/X11
43376/usr/include/X11R7
43377/usr/include/X11R6
43378/usr/include/X11R5
43379/usr/include/X11R4
43380
43381/usr/local/X11/include
43382/usr/local/X11R7/include
43383/usr/local/X11R6/include
43384/usr/local/X11R5/include
43385/usr/local/X11R4/include
43386
43387/usr/local/include/X11
43388/usr/local/include/X11R7
43389/usr/local/include/X11R6
43390/usr/local/include/X11R5
43391/usr/local/include/X11R4
43392
43393/usr/X386/include
43394/usr/x386/include
43395/usr/XFree86/include/X11
43396
43397/usr/include
43398/usr/local/include
43399/usr/unsupported/include
43400/usr/athena/include
43401/usr/local/x11r5/include
43402/usr/lpp/Xamples/include
43403
43404/usr/openwin/include
43405/usr/openwin/share/include'
43406
43407if test "$ac_x_includes" = no; then
43408  # Guess where to find include files, by looking for Xlib.h.
43409  # First, try using that file with no special directory specified.
43410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43411/* end confdefs.h.  */
43412#include <X11/Xlib.h>
43413_ACEOF
43414if ac_fn_cxx_try_cpp "$LINENO"; then :
43415  # We can compile using X headers with no special include directory.
43416ac_x_includes=
43417else
43418  for ac_dir in $ac_x_header_dirs; do
43419  if test -r "$ac_dir/X11/Xlib.h"; then
43420    ac_x_includes=$ac_dir
43421    break
43422  fi
43423done
43424fi
43425rm -f conftest.err conftest.i conftest.$ac_ext
43426fi # $ac_x_includes = no
43427
43428if test "$ac_x_libraries" = no; then
43429  # Check for the libraries.
43430  # See if we find them without any special options.
43431  # Don't add to $LIBS permanently.
43432  ac_save_LIBS=$LIBS
43433  LIBS="-lX11 $LIBS"
43434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43435/* end confdefs.h.  */
43436#include <X11/Xlib.h>
43437int
43438main ()
43439{
43440XrmInitialize ()
43441  ;
43442  return 0;
43443}
43444_ACEOF
43445if ac_fn_cxx_try_link "$LINENO"; then :
43446  LIBS=$ac_save_LIBS
43447# We can link X programs with no special library path.
43448ac_x_libraries=
43449else
43450  LIBS=$ac_save_LIBS
43451for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43452do
43453  # Don't even attempt the hair of trying to link an X program!
43454  for ac_extension in a so sl dylib la dll; do
43455    if test -r "$ac_dir/libX11.$ac_extension"; then
43456      ac_x_libraries=$ac_dir
43457      break 2
43458    fi
43459  done
43460done
43461fi
43462rm -f core conftest.err conftest.$ac_objext \
43463    conftest$ac_exeext conftest.$ac_ext
43464fi # $ac_x_libraries = no
43465
43466case $ac_x_includes,$ac_x_libraries in #(
43467  no,* | *,no | *\'*)
43468    # Didn't find X, or a directory has "'" in its name.
43469    ac_cv_have_x="have_x=no";; #(
43470  *)
43471    # Record where we found X for the cache.
43472    ac_cv_have_x="have_x=yes\
43473	ac_x_includes='$ac_x_includes'\
43474	ac_x_libraries='$ac_x_libraries'"
43475esac
43476fi
43477;; #(
43478    *) have_x=yes;;
43479  esac
43480  eval "$ac_cv_have_x"
43481fi # $with_x != no
43482
43483if test "$have_x" != yes; then
43484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43485$as_echo "$have_x" >&6; }
43486  no_x=yes
43487else
43488  # If each of the values was on the command line, it overrides each guess.
43489  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43490  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43491  # Update the cache value to reflect the command line values.
43492  ac_cv_have_x="have_x=yes\
43493	ac_x_includes='$x_includes'\
43494	ac_x_libraries='$x_libraries'"
43495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43496$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43497fi
43498
43499  if test "$no_x" = yes; then
43500  # Not all programs may use this symbol, but it does not hurt to define it.
43501
43502$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43503
43504  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43505else
43506  if test -n "$x_includes"; then
43507    X_CFLAGS="$X_CFLAGS -I$x_includes"
43508  fi
43509
43510  # It would also be nice to do this for all -L options, not just this one.
43511  if test -n "$x_libraries"; then
43512    X_LIBS="$X_LIBS -L$x_libraries"
43513    # For Solaris; some versions of Sun CC require a space after -R and
43514    # others require no space.  Words are not sufficient . . . .
43515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43516$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43517    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43518    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43519    ac_cxx_werror_flag=yes
43520    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43521/* end confdefs.h.  */
43522
43523int
43524main ()
43525{
43526
43527  ;
43528  return 0;
43529}
43530_ACEOF
43531if ac_fn_cxx_try_link "$LINENO"; then :
43532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43533$as_echo "no" >&6; }
43534       X_LIBS="$X_LIBS -R$x_libraries"
43535else
43536  LIBS="$ac_xsave_LIBS -R $x_libraries"
43537       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43538/* end confdefs.h.  */
43539
43540int
43541main ()
43542{
43543
43544  ;
43545  return 0;
43546}
43547_ACEOF
43548if ac_fn_cxx_try_link "$LINENO"; then :
43549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43550$as_echo "yes" >&6; }
43551	  X_LIBS="$X_LIBS -R $x_libraries"
43552else
43553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43554$as_echo "neither works" >&6; }
43555fi
43556rm -f core conftest.err conftest.$ac_objext \
43557    conftest$ac_exeext conftest.$ac_ext
43558fi
43559rm -f core conftest.err conftest.$ac_objext \
43560    conftest$ac_exeext conftest.$ac_ext
43561    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43562    LIBS=$ac_xsave_LIBS
43563  fi
43564
43565  # Check for system-dependent libraries X programs must link with.
43566  # Do this before checking for the system-independent R6 libraries
43567  # (-lICE), since we may need -lsocket or whatever for X linking.
43568
43569  if test "$ISC" = yes; then
43570    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43571  else
43572    # Martyn Johnson says this is needed for Ultrix, if the X
43573    # libraries were built with DECnet support.  And Karl Berry says
43574    # the Alpha needs dnet_stub (dnet does not exist).
43575    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43577/* end confdefs.h.  */
43578
43579/* Override any GCC internal prototype to avoid an error.
43580   Use char because int might match the return type of a GCC
43581   builtin and then its argument prototype would still apply.  */
43582#ifdef __cplusplus
43583extern "C"
43584#endif
43585char XOpenDisplay ();
43586int
43587main ()
43588{
43589return XOpenDisplay ();
43590  ;
43591  return 0;
43592}
43593_ACEOF
43594if ac_fn_cxx_try_link "$LINENO"; then :
43595
43596else
43597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43598$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43599if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43600  $as_echo_n "(cached) " >&6
43601else
43602  ac_check_lib_save_LIBS=$LIBS
43603LIBS="-ldnet  $LIBS"
43604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43605/* end confdefs.h.  */
43606
43607/* Override any GCC internal prototype to avoid an error.
43608   Use char because int might match the return type of a GCC
43609   builtin and then its argument prototype would still apply.  */
43610#ifdef __cplusplus
43611extern "C"
43612#endif
43613char dnet_ntoa ();
43614int
43615main ()
43616{
43617return dnet_ntoa ();
43618  ;
43619  return 0;
43620}
43621_ACEOF
43622if ac_fn_cxx_try_link "$LINENO"; then :
43623  ac_cv_lib_dnet_dnet_ntoa=yes
43624else
43625  ac_cv_lib_dnet_dnet_ntoa=no
43626fi
43627rm -f core conftest.err conftest.$ac_objext \
43628    conftest$ac_exeext conftest.$ac_ext
43629LIBS=$ac_check_lib_save_LIBS
43630fi
43631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43632$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43633if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43634  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43635fi
43636
43637    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43638      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43639$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43640if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43641  $as_echo_n "(cached) " >&6
43642else
43643  ac_check_lib_save_LIBS=$LIBS
43644LIBS="-ldnet_stub  $LIBS"
43645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43646/* end confdefs.h.  */
43647
43648/* Override any GCC internal prototype to avoid an error.
43649   Use char because int might match the return type of a GCC
43650   builtin and then its argument prototype would still apply.  */
43651#ifdef __cplusplus
43652extern "C"
43653#endif
43654char dnet_ntoa ();
43655int
43656main ()
43657{
43658return dnet_ntoa ();
43659  ;
43660  return 0;
43661}
43662_ACEOF
43663if ac_fn_cxx_try_link "$LINENO"; then :
43664  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43665else
43666  ac_cv_lib_dnet_stub_dnet_ntoa=no
43667fi
43668rm -f core conftest.err conftest.$ac_objext \
43669    conftest$ac_exeext conftest.$ac_ext
43670LIBS=$ac_check_lib_save_LIBS
43671fi
43672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43673$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43674if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43675  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43676fi
43677
43678    fi
43679fi
43680rm -f core conftest.err conftest.$ac_objext \
43681    conftest$ac_exeext conftest.$ac_ext
43682    LIBS="$ac_xsave_LIBS"
43683
43684    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43685    # to get the SysV transport functions.
43686    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43687    # needs -lnsl.
43688    # The nsl library prevents programs from opening the X display
43689    # on Irix 5.2, according to T.E. Dickey.
43690    # The functions gethostbyname, getservbyname, and inet_addr are
43691    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43692    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43693if test "x$ac_cv_func_gethostbyname" = xyes; then :
43694
43695fi
43696
43697    if test $ac_cv_func_gethostbyname = no; then
43698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43699$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43700if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43701  $as_echo_n "(cached) " >&6
43702else
43703  ac_check_lib_save_LIBS=$LIBS
43704LIBS="-lnsl  $LIBS"
43705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43706/* end confdefs.h.  */
43707
43708/* Override any GCC internal prototype to avoid an error.
43709   Use char because int might match the return type of a GCC
43710   builtin and then its argument prototype would still apply.  */
43711#ifdef __cplusplus
43712extern "C"
43713#endif
43714char gethostbyname ();
43715int
43716main ()
43717{
43718return gethostbyname ();
43719  ;
43720  return 0;
43721}
43722_ACEOF
43723if ac_fn_cxx_try_link "$LINENO"; then :
43724  ac_cv_lib_nsl_gethostbyname=yes
43725else
43726  ac_cv_lib_nsl_gethostbyname=no
43727fi
43728rm -f core conftest.err conftest.$ac_objext \
43729    conftest$ac_exeext conftest.$ac_ext
43730LIBS=$ac_check_lib_save_LIBS
43731fi
43732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43733$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43734if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43735  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43736fi
43737
43738      if test $ac_cv_lib_nsl_gethostbyname = no; then
43739	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43740$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43741if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43742  $as_echo_n "(cached) " >&6
43743else
43744  ac_check_lib_save_LIBS=$LIBS
43745LIBS="-lbsd  $LIBS"
43746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43747/* end confdefs.h.  */
43748
43749/* Override any GCC internal prototype to avoid an error.
43750   Use char because int might match the return type of a GCC
43751   builtin and then its argument prototype would still apply.  */
43752#ifdef __cplusplus
43753extern "C"
43754#endif
43755char gethostbyname ();
43756int
43757main ()
43758{
43759return gethostbyname ();
43760  ;
43761  return 0;
43762}
43763_ACEOF
43764if ac_fn_cxx_try_link "$LINENO"; then :
43765  ac_cv_lib_bsd_gethostbyname=yes
43766else
43767  ac_cv_lib_bsd_gethostbyname=no
43768fi
43769rm -f core conftest.err conftest.$ac_objext \
43770    conftest$ac_exeext conftest.$ac_ext
43771LIBS=$ac_check_lib_save_LIBS
43772fi
43773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43774$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43775if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43776  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43777fi
43778
43779      fi
43780    fi
43781
43782    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43783    # socket/setsockopt and other routines are undefined under SCO ODT
43784    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43785    # on later versions), says Simon Leinen: it contains gethostby*
43786    # variants that don't use the name server (or something).  -lsocket
43787    # must be given before -lnsl if both are needed.  We assume that
43788    # if connect needs -lnsl, so does gethostbyname.
43789    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43790if test "x$ac_cv_func_connect" = xyes; then :
43791
43792fi
43793
43794    if test $ac_cv_func_connect = no; then
43795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43796$as_echo_n "checking for connect in -lsocket... " >&6; }
43797if ${ac_cv_lib_socket_connect+:} false; then :
43798  $as_echo_n "(cached) " >&6
43799else
43800  ac_check_lib_save_LIBS=$LIBS
43801LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43803/* end confdefs.h.  */
43804
43805/* Override any GCC internal prototype to avoid an error.
43806   Use char because int might match the return type of a GCC
43807   builtin and then its argument prototype would still apply.  */
43808#ifdef __cplusplus
43809extern "C"
43810#endif
43811char connect ();
43812int
43813main ()
43814{
43815return connect ();
43816  ;
43817  return 0;
43818}
43819_ACEOF
43820if ac_fn_cxx_try_link "$LINENO"; then :
43821  ac_cv_lib_socket_connect=yes
43822else
43823  ac_cv_lib_socket_connect=no
43824fi
43825rm -f core conftest.err conftest.$ac_objext \
43826    conftest$ac_exeext conftest.$ac_ext
43827LIBS=$ac_check_lib_save_LIBS
43828fi
43829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43830$as_echo "$ac_cv_lib_socket_connect" >&6; }
43831if test "x$ac_cv_lib_socket_connect" = xyes; then :
43832  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43833fi
43834
43835    fi
43836
43837    # Guillermo Gomez says -lposix is necessary on A/UX.
43838    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43839if test "x$ac_cv_func_remove" = xyes; then :
43840
43841fi
43842
43843    if test $ac_cv_func_remove = no; then
43844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43845$as_echo_n "checking for remove in -lposix... " >&6; }
43846if ${ac_cv_lib_posix_remove+:} false; then :
43847  $as_echo_n "(cached) " >&6
43848else
43849  ac_check_lib_save_LIBS=$LIBS
43850LIBS="-lposix  $LIBS"
43851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43852/* end confdefs.h.  */
43853
43854/* Override any GCC internal prototype to avoid an error.
43855   Use char because int might match the return type of a GCC
43856   builtin and then its argument prototype would still apply.  */
43857#ifdef __cplusplus
43858extern "C"
43859#endif
43860char remove ();
43861int
43862main ()
43863{
43864return remove ();
43865  ;
43866  return 0;
43867}
43868_ACEOF
43869if ac_fn_cxx_try_link "$LINENO"; then :
43870  ac_cv_lib_posix_remove=yes
43871else
43872  ac_cv_lib_posix_remove=no
43873fi
43874rm -f core conftest.err conftest.$ac_objext \
43875    conftest$ac_exeext conftest.$ac_ext
43876LIBS=$ac_check_lib_save_LIBS
43877fi
43878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43879$as_echo "$ac_cv_lib_posix_remove" >&6; }
43880if test "x$ac_cv_lib_posix_remove" = xyes; then :
43881  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43882fi
43883
43884    fi
43885
43886    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43887    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43888if test "x$ac_cv_func_shmat" = xyes; then :
43889
43890fi
43891
43892    if test $ac_cv_func_shmat = no; then
43893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43894$as_echo_n "checking for shmat in -lipc... " >&6; }
43895if ${ac_cv_lib_ipc_shmat+:} false; then :
43896  $as_echo_n "(cached) " >&6
43897else
43898  ac_check_lib_save_LIBS=$LIBS
43899LIBS="-lipc  $LIBS"
43900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43901/* end confdefs.h.  */
43902
43903/* Override any GCC internal prototype to avoid an error.
43904   Use char because int might match the return type of a GCC
43905   builtin and then its argument prototype would still apply.  */
43906#ifdef __cplusplus
43907extern "C"
43908#endif
43909char shmat ();
43910int
43911main ()
43912{
43913return shmat ();
43914  ;
43915  return 0;
43916}
43917_ACEOF
43918if ac_fn_cxx_try_link "$LINENO"; then :
43919  ac_cv_lib_ipc_shmat=yes
43920else
43921  ac_cv_lib_ipc_shmat=no
43922fi
43923rm -f core conftest.err conftest.$ac_objext \
43924    conftest$ac_exeext conftest.$ac_ext
43925LIBS=$ac_check_lib_save_LIBS
43926fi
43927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43928$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43929if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43930  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43931fi
43932
43933    fi
43934  fi
43935
43936  # Check for libraries that X11R6 Xt/Xaw programs need.
43937  ac_save_LDFLAGS=$LDFLAGS
43938  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43939  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43940  # check for ICE first), but we must link in the order -lSM -lICE or
43941  # we get undefined symbols.  So assume we have SM if we have ICE.
43942  # These have to be linked with before -lX11, unlike the other
43943  # libraries we check for below, so use a different variable.
43944  # John Interrante, Karl Berry
43945  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43946$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43947if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43948  $as_echo_n "(cached) " >&6
43949else
43950  ac_check_lib_save_LIBS=$LIBS
43951LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43953/* end confdefs.h.  */
43954
43955/* Override any GCC internal prototype to avoid an error.
43956   Use char because int might match the return type of a GCC
43957   builtin and then its argument prototype would still apply.  */
43958#ifdef __cplusplus
43959extern "C"
43960#endif
43961char IceConnectionNumber ();
43962int
43963main ()
43964{
43965return IceConnectionNumber ();
43966  ;
43967  return 0;
43968}
43969_ACEOF
43970if ac_fn_cxx_try_link "$LINENO"; then :
43971  ac_cv_lib_ICE_IceConnectionNumber=yes
43972else
43973  ac_cv_lib_ICE_IceConnectionNumber=no
43974fi
43975rm -f core conftest.err conftest.$ac_objext \
43976    conftest$ac_exeext conftest.$ac_ext
43977LIBS=$ac_check_lib_save_LIBS
43978fi
43979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43980$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43981if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43982  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43983fi
43984
43985  LDFLAGS=$ac_save_LDFLAGS
43986
43987fi
43988
43989
43990  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43991  # this doesn't make sense so we remove it.
43992  if test "x$COMPILE_TYPE" = xcross; then
43993    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43994  fi
43995
43996  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43997
43998  # Print a helpful message on how to acquire the necessary build dependency.
43999  # x11 is the help tag: freetype, cups, pulse, alsa etc
44000  MISSING_DEPENDENCY=x11
44001
44002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44003    cygwin_help $MISSING_DEPENDENCY
44004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44005    msys_help $MISSING_DEPENDENCY
44006  else
44007    PKGHANDLER_COMMAND=
44008
44009    case $PKGHANDLER in
44010      apt-get)
44011        apt_help     $MISSING_DEPENDENCY ;;
44012      yum)
44013        yum_help     $MISSING_DEPENDENCY ;;
44014      port)
44015        port_help    $MISSING_DEPENDENCY ;;
44016      pkgutil)
44017        pkgutil_help $MISSING_DEPENDENCY ;;
44018      pkgadd)
44019        pkgadd_help  $MISSING_DEPENDENCY ;;
44020    esac
44021
44022    if test "x$PKGHANDLER_COMMAND" != x; then
44023      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44024    fi
44025  fi
44026
44027    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44028  fi
44029
44030  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44031    OPENWIN_HOME="/usr/openwin"
44032    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44033    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44034        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44035        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44036        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44037  fi
44038
44039  #
44040  # Weird Sol10 something check...TODO change to try compile
44041  #
44042  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
44043    if test "`uname -r`" = "5.10"; then
44044      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
44045        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
44046      fi
44047    fi
44048  fi
44049
44050  ac_ext=c
44051ac_cpp='$CPP $CPPFLAGS'
44052ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44053ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44054ac_compiler_gnu=$ac_cv_c_compiler_gnu
44055
44056  OLD_CFLAGS="$CFLAGS"
44057  CFLAGS="$CFLAGS $X_CFLAGS"
44058
44059  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44060  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44061do :
44062  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44063ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44064        # include <X11/Xlib.h>
44065        # include <X11/Xutil.h>
44066
44067
44068"
44069if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44070  cat >>confdefs.h <<_ACEOF
44071#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44072_ACEOF
44073 X11_A_OK=yes
44074else
44075  X11_A_OK=no; break
44076fi
44077
44078done
44079
44080
44081  CFLAGS="$OLD_CFLAGS"
44082  ac_ext=cpp
44083ac_cpp='$CXXCPP $CPPFLAGS'
44084ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44085ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44086ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44087
44088
44089  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
44090
44091  # Print a helpful message on how to acquire the necessary build dependency.
44092  # x11 is the help tag: freetype, cups, pulse, alsa etc
44093  MISSING_DEPENDENCY=x11
44094
44095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44096    cygwin_help $MISSING_DEPENDENCY
44097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44098    msys_help $MISSING_DEPENDENCY
44099  else
44100    PKGHANDLER_COMMAND=
44101
44102    case $PKGHANDLER in
44103      apt-get)
44104        apt_help     $MISSING_DEPENDENCY ;;
44105      yum)
44106        yum_help     $MISSING_DEPENDENCY ;;
44107      port)
44108        port_help    $MISSING_DEPENDENCY ;;
44109      pkgutil)
44110        pkgutil_help $MISSING_DEPENDENCY ;;
44111      pkgadd)
44112        pkgadd_help  $MISSING_DEPENDENCY ;;
44113    esac
44114
44115    if test "x$PKGHANDLER_COMMAND" != x; then
44116      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44117    fi
44118  fi
44119
44120    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44121  fi
44122
44123
44124
44125
44126
44127
44128  ###############################################################################
44129  #
44130  # The common unix printing system cups is used to print from java.
44131  #
44132
44133# Check whether --with-cups was given.
44134if test "${with_cups+set}" = set; then :
44135  withval=$with_cups;
44136fi
44137
44138
44139# Check whether --with-cups-include was given.
44140if test "${with_cups_include+set}" = set; then :
44141  withval=$with_cups_include;
44142fi
44143
44144
44145  if test "x$CUPS_NOT_NEEDED" = xyes; then
44146    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44147      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44148$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44149    fi
44150    CUPS_CFLAGS=
44151  else
44152    CUPS_FOUND=no
44153
44154    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44155      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44156    fi
44157
44158    if test "x${with_cups}" != x; then
44159      CUPS_CFLAGS="-I${with_cups}/include"
44160      CUPS_FOUND=yes
44161    fi
44162    if test "x${with_cups_include}" != x; then
44163      CUPS_CFLAGS="-I${with_cups_include}"
44164      CUPS_FOUND=yes
44165    fi
44166    if test "x$CUPS_FOUND" = xno; then
44167
44168
44169  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44170    # Source the builddeps file again, to make sure it uses the latest variables!
44171    . $builddepsfile
44172    # Look for a target and build machine specific resource!
44173    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44174    if test "x$resource" = x; then
44175      # Ok, lets instead look for a target specific resource
44176      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44177    fi
44178    if test "x$resource" = x; then
44179      # Ok, lets instead look for a build specific resource
44180      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44181    fi
44182    if test "x$resource" = x; then
44183      # Ok, lets instead look for a generic resource
44184      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44185      resource=${builddep_cups}
44186    fi
44187    if test "x$resource" != x; then
44188      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44189$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44190      # If the resource in the builddeps.conf file is an existing directory,
44191      # for example /java/linux/cups
44192      if test -d ${resource}; then
44193        depdir=${resource}
44194      else
44195
44196  # cups is for example mymodule
44197  # $resource is for example libs/general/libmymod_1_2_3.zip
44198  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44199  # $with_builddeps_dir is for example /localhome/builddeps
44200  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44201  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44202  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44203  filename=`basename $resource`
44204  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44205  filebase=${filename%%.*}
44206  extension=${filename#*.}
44207  installdir=$with_builddeps_dir/$filebase
44208  if test ! -f $installdir/$filename.unpacked; then
44209    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44210$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44211    if test ! -d $installdir; then
44212      mkdir -p $installdir
44213    fi
44214    if test ! -d $installdir; then
44215      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44216    fi
44217    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44218    touch $tmpfile
44219    if test ! -f $tmpfile; then
44220      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44221    fi
44222
44223  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44224  # $tmpfile is the local file name for the downloaded file.
44225  VALID_TOOL=no
44226  if test "x$BDEPS_FTP" = xwget; then
44227    VALID_TOOL=yes
44228    wget -O $tmpfile $with_builddeps_server/$resource
44229  fi
44230  if test "x$BDEPS_FTP" = xlftp; then
44231    VALID_TOOL=yes
44232    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44233  fi
44234  if test "x$BDEPS_FTP" = xftp; then
44235    VALID_TOOL=yes
44236    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44237    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44238    FTPUSERPWD=${FTPSERVER%%@*}
44239    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44240      FTPUSER=${userpwd%%:*}
44241      FTPPWD=${userpwd#*@}
44242      FTPSERVER=${FTPSERVER#*@}
44243    else
44244      FTPUSER=ftp
44245      FTPPWD=ftp
44246    fi
44247    # the "pass" command does not work on some
44248    # ftp clients (read ftp.exe) but if it works,
44249    # passive mode is better!
44250    ( \
44251        echo "user $FTPUSER $FTPPWD"        ; \
44252        echo "pass"                         ; \
44253        echo "bin"                          ; \
44254        echo "get $FTPPATH $tmpfile"              ; \
44255    ) | ftp -in $FTPSERVER
44256  fi
44257  if test "x$VALID_TOOL" != xyes; then
44258    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44259  fi
44260
44261    mv $tmpfile $installdir/$filename
44262    if test ! -s $installdir/$filename; then
44263      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44264    fi
44265    case "$extension" in
44266      zip)  echo "Unzipping $installdir/$filename..."
44267        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44268        ;;
44269      tar.gz) echo "Untaring $installdir/$filename..."
44270        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44271        ;;
44272      tgz) echo "Untaring $installdir/$filename..."
44273        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44274        ;;
44275      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44276        ;;
44277    esac
44278  fi
44279  if test -f $installdir/$filename.unpacked; then
44280    depdir=$installdir
44281  fi
44282
44283      fi
44284      # Source the builddeps file again, because in the previous command, the depdir
44285      # was updated to point at the current build dependency install directory.
44286      . $builddepsfile
44287      # Now extract variables from the builddeps.conf files.
44288      theroot=${builddep_cups_ROOT}
44289      thecflags=${builddep_cups_CFLAGS}
44290      thelibs=${builddep_cups_LIBS}
44291      if test "x$depdir" = x; then
44292        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44293      fi
44294      CUPS=$depdir
44295      if test "x$theroot" != x; then
44296        CUPS="$theroot"
44297      fi
44298      if test "x$thecflags" != x; then
44299        CUPS_CFLAGS="$thecflags"
44300      fi
44301      if test "x$thelibs" != x; then
44302        CUPS_LIBS="$thelibs"
44303      fi
44304      CUPS_FOUND=yes
44305
44306    fi
44307
44308  fi
44309
44310    fi
44311    if test "x$CUPS_FOUND" = xno; then
44312      # Are the cups headers installed in the default /usr/include location?
44313      for ac_header in cups/cups.h cups/ppd.h
44314do :
44315  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44316ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44317if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44318  cat >>confdefs.h <<_ACEOF
44319#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44320_ACEOF
44321
44322            CUPS_FOUND=yes
44323            CUPS_CFLAGS=
44324            DEFAULT_CUPS=yes
44325
44326
44327fi
44328
44329done
44330
44331    fi
44332    if test "x$CUPS_FOUND" = xno; then
44333      # Getting nervous now? Lets poke around for standard Solaris third-party
44334      # package installation locations.
44335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44336$as_echo_n "checking for cups headers... " >&6; }
44337      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44338        # An SFW package seems to be installed!
44339        CUPS_FOUND=yes
44340        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44341      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44342        # A CSW package seems to be installed!
44343        CUPS_FOUND=yes
44344        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44345      fi
44346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44347$as_echo "$CUPS_FOUND" >&6; }
44348    fi
44349    if test "x$CUPS_FOUND" = xno; then
44350
44351  # Print a helpful message on how to acquire the necessary build dependency.
44352  # cups is the help tag: freetype, cups, pulse, alsa etc
44353  MISSING_DEPENDENCY=cups
44354
44355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44356    cygwin_help $MISSING_DEPENDENCY
44357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44358    msys_help $MISSING_DEPENDENCY
44359  else
44360    PKGHANDLER_COMMAND=
44361
44362    case $PKGHANDLER in
44363      apt-get)
44364        apt_help     $MISSING_DEPENDENCY ;;
44365      yum)
44366        yum_help     $MISSING_DEPENDENCY ;;
44367      port)
44368        port_help    $MISSING_DEPENDENCY ;;
44369      pkgutil)
44370        pkgutil_help $MISSING_DEPENDENCY ;;
44371      pkgadd)
44372        pkgadd_help  $MISSING_DEPENDENCY ;;
44373    esac
44374
44375    if test "x$PKGHANDLER_COMMAND" != x; then
44376      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44377    fi
44378  fi
44379
44380      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44381    fi
44382  fi
44383
44384
44385
44386
44387
44388
44389  ###############################################################################
44390  #
44391  # The ubiquitous freetype library is used to render fonts.
44392  #
44393
44394# Check whether --with-freetype was given.
44395if test "${with_freetype+set}" = set; then :
44396  withval=$with_freetype;
44397fi
44398
44399
44400# Check whether --with-freetype-include was given.
44401if test "${with_freetype_include+set}" = set; then :
44402  withval=$with_freetype_include;
44403fi
44404
44405
44406# Check whether --with-freetype-lib was given.
44407if test "${with_freetype_lib+set}" = set; then :
44408  withval=$with_freetype_lib;
44409fi
44410
44411
44412# Check whether --with-freetype-src was given.
44413if test "${with_freetype_src+set}" = set; then :
44414  withval=$with_freetype_src;
44415fi
44416
44417  # Check whether --enable-freetype-bundling was given.
44418if test "${enable_freetype_bundling+set}" = set; then :
44419  enableval=$enable_freetype_bundling;
44420fi
44421
44422
44423  FREETYPE_CFLAGS=
44424  FREETYPE_LIBS=
44425  FREETYPE_BUNDLE_LIB_PATH=
44426
44427  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44428    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
44429      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44430$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44431    fi
44432    if test "x$enable_freetype_bundling" != x; then
44433      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44434$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44435    fi
44436  else
44437    # freetype is needed to build; go get it!
44438
44439    BUNDLE_FREETYPE="$enable_freetype_bundling"
44440
44441    if  test "x$with_freetype_src" != x; then
44442      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44443        # Try to build freetype if --with-freetype-src was given on Windows
44444
44445  FREETYPE_SRC_PATH="$with_freetype_src"
44446  BUILD_FREETYPE=yes
44447
44448  # Check if the freetype sources are acessible..
44449  if ! test -d $FREETYPE_SRC_PATH; then
44450    { $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
44451$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44452    BUILD_FREETYPE=no
44453  fi
44454  # ..and contain a vc2010 project file
44455  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44456  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44457    { $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
44458$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44459    BUILD_FREETYPE=no
44460  fi
44461  # Now check if configure found a version of 'msbuild.exe'
44462  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44464$as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44465    BUILD_FREETYPE=no
44466  fi
44467
44468  # Ready to go..
44469  if test "x$BUILD_FREETYPE" = xyes; then
44470
44471    # msbuild requires trailing slashes for output directories
44472    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44473    freetype_lib_path_unix="$freetype_lib_path"
44474    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44475
44476  unix_path="$vcxproj_path"
44477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44478    windows_path=`$CYGPATH -m "$unix_path"`
44479    vcxproj_path="$windows_path"
44480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44481    windows_path=`cmd //c echo $unix_path`
44482    vcxproj_path="$windows_path"
44483  fi
44484
44485
44486  unix_path="$freetype_lib_path"
44487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44488    windows_path=`$CYGPATH -m "$unix_path"`
44489    freetype_lib_path="$windows_path"
44490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44491    windows_path=`cmd //c echo $unix_path`
44492    freetype_lib_path="$windows_path"
44493  fi
44494
44495
44496  unix_path="$freetype_obj_path"
44497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44498    windows_path=`$CYGPATH -m "$unix_path"`
44499    freetype_obj_path="$windows_path"
44500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44501    windows_path=`cmd //c echo $unix_path`
44502    freetype_obj_path="$windows_path"
44503  fi
44504
44505    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44506      freetype_platform=x64
44507    else
44508      freetype_platform=win32
44509    fi
44510
44511    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44512    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44513    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44514    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44515    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44516$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44517
44518    # First we try to build the freetype.dll
44519    $ECHO -e "@echo off\n"\
44520	     "$MSBUILD $vcxproj_path "\
44521		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44522		       "/p:Configuration=\"Release Multithreaded\" "\
44523		       "/p:Platform=$freetype_platform "\
44524		       "/p:ConfigurationType=DynamicLibrary "\
44525		       "/p:TargetName=freetype "\
44526		       "/p:OutDir=\"$freetype_lib_path\" "\
44527		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44528    cmd /c freetype.bat
44529
44530    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44531      # If that succeeds we also build freetype.lib
44532      $ECHO -e "@echo off\n"\
44533	       "$MSBUILD $vcxproj_path "\
44534			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44535			 "/p:Configuration=\"Release Multithreaded\" "\
44536			 "/p:Platform=$freetype_platform "\
44537			 "/p:ConfigurationType=StaticLibrary "\
44538			 "/p:TargetName=freetype "\
44539			 "/p:OutDir=\"$freetype_lib_path\" "\
44540			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44541      cmd /c freetype.bat
44542
44543      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44544	# Once we build both, lib and dll, set freetype lib and include path appropriately
44545	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44546	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44547	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44548$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44549      else
44550	BUILD_FREETYPE=no
44551      fi
44552    else
44553      BUILD_FREETYPE=no
44554    fi
44555  fi
44556
44557        if test "x$BUILD_FREETYPE" = xyes; then
44558          # Okay, we built it. Check that it works.
44559
44560  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44561  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44562  METHOD="--with-freetype-src"
44563
44564  # First check if the files exists.
44565  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44566    # We found an arbitrary include file. That's a good sign.
44567    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44568$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44569    FOUND_FREETYPE=yes
44570
44571    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44572    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44573      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44574$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44575      FOUND_FREETYPE=no
44576    else
44577      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44578        # On Windows, we will need both .lib and .dll file.
44579        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44580          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44581$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44582          FOUND_FREETYPE=no
44583        fi
44584      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44585          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44586        # Found lib in isa dir, use that instead.
44587        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44588      fi
44589    fi
44590  fi
44591
44592  if test "x$FOUND_FREETYPE" = xyes; then
44593
44594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44595
44596  # Input might be given as Windows format, start by converting to
44597  # unix format.
44598  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44599  new_path=`$CYGPATH -u "$path"`
44600
44601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44604  # "foo.exe" is OK but "foo" is an error.
44605  #
44606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44607  # It is also a way to make sure we got the proper file name for the real test later on.
44608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44609  if test "x$test_shortpath" = x; then
44610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44612    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44613  fi
44614
44615  # Call helper function which possibly converts this using DOS-style short mode.
44616  # If so, the updated path is stored in $new_path.
44617
44618  input_path="$new_path"
44619  # Check if we need to convert this using DOS-style short mode. If the path
44620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44621  # take no chances and rewrite it.
44622  # Note: m4 eats our [], so we need to use [ and ] instead.
44623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44624  if test "x$has_forbidden_chars" != x; then
44625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44629      # Going to short mode and back again did indeed matter. Since short mode is
44630      # case insensitive, let's make it lowercase to improve readability.
44631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44632      # Now convert it back to Unix-stile (cygpath)
44633      input_path=`$CYGPATH -u "$shortmode_path"`
44634      new_path="$input_path"
44635    fi
44636  fi
44637
44638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44639  if test "x$test_cygdrive_prefix" = x; then
44640    # As a simple fix, exclude /usr/bin since it's not a real path.
44641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44643      # a path prefixed by /cygdrive for fixpath to work.
44644      new_path="$CYGWIN_ROOT_PATH$input_path"
44645    fi
44646  fi
44647
44648
44649  if test "x$path" != "x$new_path"; then
44650    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44653  fi
44654
44655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44656
44657  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44658  has_colon=`$ECHO $path | $GREP ^.:`
44659  new_path="$path"
44660  if test "x$has_colon" = x; then
44661    # Not in mixed or Windows style, start by that.
44662    new_path=`cmd //c echo $path`
44663  fi
44664
44665
44666  input_path="$new_path"
44667  # Check if we need to convert this using DOS-style short mode. If the path
44668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44669  # take no chances and rewrite it.
44670  # Note: m4 eats our [], so we need to use [ and ] instead.
44671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44672  if test "x$has_forbidden_chars" != x; then
44673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44675  fi
44676
44677
44678  windows_path="$new_path"
44679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44680    unix_path=`$CYGPATH -u "$windows_path"`
44681    new_path="$unix_path"
44682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44684    new_path="$unix_path"
44685  fi
44686
44687  if test "x$path" != "x$new_path"; then
44688    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44690$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44691  fi
44692
44693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44695
44696  else
44697    # We're on a posix platform. Hooray! :)
44698    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44699    has_space=`$ECHO "$path" | $GREP " "`
44700    if test "x$has_space" != x; then
44701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44703      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44704    fi
44705
44706    # Use eval to expand a potential ~
44707    eval path="$path"
44708    if test ! -f "$path" && test ! -d "$path"; then
44709      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44710    fi
44711
44712    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44713  fi
44714
44715
44716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44717
44718  # Input might be given as Windows format, start by converting to
44719  # unix format.
44720  path="$POTENTIAL_FREETYPE_LIB_PATH"
44721  new_path=`$CYGPATH -u "$path"`
44722
44723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44726  # "foo.exe" is OK but "foo" is an error.
44727  #
44728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44729  # It is also a way to make sure we got the proper file name for the real test later on.
44730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44731  if test "x$test_shortpath" = x; then
44732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44734    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44735  fi
44736
44737  # Call helper function which possibly converts this using DOS-style short mode.
44738  # If so, the updated path is stored in $new_path.
44739
44740  input_path="$new_path"
44741  # Check if we need to convert this using DOS-style short mode. If the path
44742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44743  # take no chances and rewrite it.
44744  # Note: m4 eats our [], so we need to use [ and ] instead.
44745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44746  if test "x$has_forbidden_chars" != x; then
44747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44751      # Going to short mode and back again did indeed matter. Since short mode is
44752      # case insensitive, let's make it lowercase to improve readability.
44753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44754      # Now convert it back to Unix-stile (cygpath)
44755      input_path=`$CYGPATH -u "$shortmode_path"`
44756      new_path="$input_path"
44757    fi
44758  fi
44759
44760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44761  if test "x$test_cygdrive_prefix" = x; then
44762    # As a simple fix, exclude /usr/bin since it's not a real path.
44763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44765      # a path prefixed by /cygdrive for fixpath to work.
44766      new_path="$CYGWIN_ROOT_PATH$input_path"
44767    fi
44768  fi
44769
44770
44771  if test "x$path" != "x$new_path"; then
44772    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44775  fi
44776
44777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44778
44779  path="$POTENTIAL_FREETYPE_LIB_PATH"
44780  has_colon=`$ECHO $path | $GREP ^.:`
44781  new_path="$path"
44782  if test "x$has_colon" = x; then
44783    # Not in mixed or Windows style, start by that.
44784    new_path=`cmd //c echo $path`
44785  fi
44786
44787
44788  input_path="$new_path"
44789  # Check if we need to convert this using DOS-style short mode. If the path
44790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44791  # take no chances and rewrite it.
44792  # Note: m4 eats our [], so we need to use [ and ] instead.
44793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44794  if test "x$has_forbidden_chars" != x; then
44795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44797  fi
44798
44799
44800  windows_path="$new_path"
44801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44802    unix_path=`$CYGPATH -u "$windows_path"`
44803    new_path="$unix_path"
44804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44806    new_path="$unix_path"
44807  fi
44808
44809  if test "x$path" != "x$new_path"; then
44810    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44813  fi
44814
44815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44817
44818  else
44819    # We're on a posix platform. Hooray! :)
44820    path="$POTENTIAL_FREETYPE_LIB_PATH"
44821    has_space=`$ECHO "$path" | $GREP " "`
44822    if test "x$has_space" != x; then
44823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44825      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44826    fi
44827
44828    # Use eval to expand a potential ~
44829    eval path="$path"
44830    if test ! -f "$path" && test ! -d "$path"; then
44831      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44832    fi
44833
44834    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44835  fi
44836
44837
44838    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44840$as_echo_n "checking for freetype includes... " >&6; }
44841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44842$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44843    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44845$as_echo_n "checking for freetype libraries... " >&6; }
44846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44847$as_echo "$FREETYPE_LIB_PATH" >&6; }
44848  fi
44849
44850          if test "x$FOUND_FREETYPE" != xyes; then
44851            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44852          fi
44853        else
44854          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44855$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44856          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44857        fi
44858      else
44859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44860$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44861      fi
44862    fi
44863
44864    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44865      # User has specified settings
44866
44867      if test "x$BUNDLE_FREETYPE" = x; then
44868        # If not specified, default is to bundle freetype
44869        BUNDLE_FREETYPE=yes
44870      fi
44871
44872      if test "x$with_freetype" != x; then
44873        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44874        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44875      fi
44876
44877      # Allow --with-freetype-lib and --with-freetype-include to override
44878      if test "x$with_freetype_include" != x; then
44879        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44880      fi
44881      if test "x$with_freetype_lib" != x; then
44882        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44883      fi
44884
44885      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44886        # Okay, we got it. Check that it works.
44887
44888  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44889  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44890  METHOD="--with-freetype"
44891
44892  # First check if the files exists.
44893  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44894    # We found an arbitrary include file. That's a good sign.
44895    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44896$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44897    FOUND_FREETYPE=yes
44898
44899    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44900    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44901      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44902$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44903      FOUND_FREETYPE=no
44904    else
44905      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44906        # On Windows, we will need both .lib and .dll file.
44907        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44908          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44909$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44910          FOUND_FREETYPE=no
44911        fi
44912      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44913          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44914        # Found lib in isa dir, use that instead.
44915        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44916      fi
44917    fi
44918  fi
44919
44920  if test "x$FOUND_FREETYPE" = xyes; then
44921
44922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44923
44924  # Input might be given as Windows format, start by converting to
44925  # unix format.
44926  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44927  new_path=`$CYGPATH -u "$path"`
44928
44929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44932  # "foo.exe" is OK but "foo" is an error.
44933  #
44934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44935  # It is also a way to make sure we got the proper file name for the real test later on.
44936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44937  if test "x$test_shortpath" = x; then
44938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44940    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44941  fi
44942
44943  # Call helper function which possibly converts this using DOS-style short mode.
44944  # If so, the updated path is stored in $new_path.
44945
44946  input_path="$new_path"
44947  # Check if we need to convert this using DOS-style short mode. If the path
44948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44949  # take no chances and rewrite it.
44950  # Note: m4 eats our [], so we need to use [ and ] instead.
44951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44952  if test "x$has_forbidden_chars" != x; then
44953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44957      # Going to short mode and back again did indeed matter. Since short mode is
44958      # case insensitive, let's make it lowercase to improve readability.
44959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44960      # Now convert it back to Unix-stile (cygpath)
44961      input_path=`$CYGPATH -u "$shortmode_path"`
44962      new_path="$input_path"
44963    fi
44964  fi
44965
44966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44967  if test "x$test_cygdrive_prefix" = x; then
44968    # As a simple fix, exclude /usr/bin since it's not a real path.
44969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44971      # a path prefixed by /cygdrive for fixpath to work.
44972      new_path="$CYGWIN_ROOT_PATH$input_path"
44973    fi
44974  fi
44975
44976
44977  if test "x$path" != "x$new_path"; then
44978    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44981  fi
44982
44983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44984
44985  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44986  has_colon=`$ECHO $path | $GREP ^.:`
44987  new_path="$path"
44988  if test "x$has_colon" = x; then
44989    # Not in mixed or Windows style, start by that.
44990    new_path=`cmd //c echo $path`
44991  fi
44992
44993
44994  input_path="$new_path"
44995  # Check if we need to convert this using DOS-style short mode. If the path
44996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44997  # take no chances and rewrite it.
44998  # Note: m4 eats our [], so we need to use [ and ] instead.
44999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45000  if test "x$has_forbidden_chars" != x; then
45001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45003  fi
45004
45005
45006  windows_path="$new_path"
45007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45008    unix_path=`$CYGPATH -u "$windows_path"`
45009    new_path="$unix_path"
45010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45012    new_path="$unix_path"
45013  fi
45014
45015  if test "x$path" != "x$new_path"; then
45016    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45019  fi
45020
45021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45023
45024  else
45025    # We're on a posix platform. Hooray! :)
45026    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45027    has_space=`$ECHO "$path" | $GREP " "`
45028    if test "x$has_space" != x; then
45029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45031      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45032    fi
45033
45034    # Use eval to expand a potential ~
45035    eval path="$path"
45036    if test ! -f "$path" && test ! -d "$path"; then
45037      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45038    fi
45039
45040    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45041  fi
45042
45043
45044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45045
45046  # Input might be given as Windows format, start by converting to
45047  # unix format.
45048  path="$POTENTIAL_FREETYPE_LIB_PATH"
45049  new_path=`$CYGPATH -u "$path"`
45050
45051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45054  # "foo.exe" is OK but "foo" is an error.
45055  #
45056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45057  # It is also a way to make sure we got the proper file name for the real test later on.
45058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45059  if test "x$test_shortpath" = x; then
45060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45062    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45063  fi
45064
45065  # Call helper function which possibly converts this using DOS-style short mode.
45066  # If so, the updated path is stored in $new_path.
45067
45068  input_path="$new_path"
45069  # Check if we need to convert this using DOS-style short mode. If the path
45070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45071  # take no chances and rewrite it.
45072  # Note: m4 eats our [], so we need to use [ and ] instead.
45073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45074  if test "x$has_forbidden_chars" != x; then
45075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45079      # Going to short mode and back again did indeed matter. Since short mode is
45080      # case insensitive, let's make it lowercase to improve readability.
45081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45082      # Now convert it back to Unix-stile (cygpath)
45083      input_path=`$CYGPATH -u "$shortmode_path"`
45084      new_path="$input_path"
45085    fi
45086  fi
45087
45088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45089  if test "x$test_cygdrive_prefix" = x; then
45090    # As a simple fix, exclude /usr/bin since it's not a real path.
45091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45093      # a path prefixed by /cygdrive for fixpath to work.
45094      new_path="$CYGWIN_ROOT_PATH$input_path"
45095    fi
45096  fi
45097
45098
45099  if test "x$path" != "x$new_path"; then
45100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45103  fi
45104
45105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45106
45107  path="$POTENTIAL_FREETYPE_LIB_PATH"
45108  has_colon=`$ECHO $path | $GREP ^.:`
45109  new_path="$path"
45110  if test "x$has_colon" = x; then
45111    # Not in mixed or Windows style, start by that.
45112    new_path=`cmd //c echo $path`
45113  fi
45114
45115
45116  input_path="$new_path"
45117  # Check if we need to convert this using DOS-style short mode. If the path
45118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45119  # take no chances and rewrite it.
45120  # Note: m4 eats our [], so we need to use [ and ] instead.
45121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45122  if test "x$has_forbidden_chars" != x; then
45123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45125  fi
45126
45127
45128  windows_path="$new_path"
45129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45130    unix_path=`$CYGPATH -u "$windows_path"`
45131    new_path="$unix_path"
45132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45134    new_path="$unix_path"
45135  fi
45136
45137  if test "x$path" != "x$new_path"; then
45138    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45141  fi
45142
45143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45145
45146  else
45147    # We're on a posix platform. Hooray! :)
45148    path="$POTENTIAL_FREETYPE_LIB_PATH"
45149    has_space=`$ECHO "$path" | $GREP " "`
45150    if test "x$has_space" != x; then
45151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45154    fi
45155
45156    # Use eval to expand a potential ~
45157    eval path="$path"
45158    if test ! -f "$path" && test ! -d "$path"; then
45159      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45160    fi
45161
45162    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45163  fi
45164
45165
45166    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45168$as_echo_n "checking for freetype includes... " >&6; }
45169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45170$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45171    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45173$as_echo_n "checking for freetype libraries... " >&6; }
45174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45175$as_echo "$FREETYPE_LIB_PATH" >&6; }
45176  fi
45177
45178        if test "x$FOUND_FREETYPE" != xyes; then
45179          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45180        fi
45181      else
45182        # User specified only one of lib or include. This is an error.
45183        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45184          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45185$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45186          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45187        else
45188          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45189$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45190          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45191        fi
45192      fi
45193    else
45194      # User did not specify settings, but we need freetype. Try to locate it.
45195
45196      if test "x$BUNDLE_FREETYPE" = x; then
45197        # If not specified, default is to bundle freetype only on windows
45198        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45199          BUNDLE_FREETYPE=yes
45200        else
45201          BUNDLE_FREETYPE=no
45202        fi
45203      fi
45204
45205      if test "x$FOUND_FREETYPE" != xyes; then
45206        # Check builddeps
45207
45208
45209  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45210    # Source the builddeps file again, to make sure it uses the latest variables!
45211    . $builddepsfile
45212    # Look for a target and build machine specific resource!
45213    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45214    if test "x$resource" = x; then
45215      # Ok, lets instead look for a target specific resource
45216      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45217    fi
45218    if test "x$resource" = x; then
45219      # Ok, lets instead look for a build specific resource
45220      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45221    fi
45222    if test "x$resource" = x; then
45223      # Ok, lets instead look for a generic resource
45224      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45225      resource=${builddep_freetype2}
45226    fi
45227    if test "x$resource" != x; then
45228      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45229$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45230      # If the resource in the builddeps.conf file is an existing directory,
45231      # for example /java/linux/cups
45232      if test -d ${resource}; then
45233        depdir=${resource}
45234      else
45235
45236  # freetype2 is for example mymodule
45237  # $resource is for example libs/general/libmymod_1_2_3.zip
45238  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45239  # $with_builddeps_dir is for example /localhome/builddeps
45240  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45241  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45242  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45243  filename=`basename $resource`
45244  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45245  filebase=${filename%%.*}
45246  extension=${filename#*.}
45247  installdir=$with_builddeps_dir/$filebase
45248  if test ! -f $installdir/$filename.unpacked; then
45249    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45250$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45251    if test ! -d $installdir; then
45252      mkdir -p $installdir
45253    fi
45254    if test ! -d $installdir; then
45255      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45256    fi
45257    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45258    touch $tmpfile
45259    if test ! -f $tmpfile; then
45260      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45261    fi
45262
45263  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45264  # $tmpfile is the local file name for the downloaded file.
45265  VALID_TOOL=no
45266  if test "x$BDEPS_FTP" = xwget; then
45267    VALID_TOOL=yes
45268    wget -O $tmpfile $with_builddeps_server/$resource
45269  fi
45270  if test "x$BDEPS_FTP" = xlftp; then
45271    VALID_TOOL=yes
45272    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45273  fi
45274  if test "x$BDEPS_FTP" = xftp; then
45275    VALID_TOOL=yes
45276    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45277    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45278    FTPUSERPWD=${FTPSERVER%%@*}
45279    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45280      FTPUSER=${userpwd%%:*}
45281      FTPPWD=${userpwd#*@}
45282      FTPSERVER=${FTPSERVER#*@}
45283    else
45284      FTPUSER=ftp
45285      FTPPWD=ftp
45286    fi
45287    # the "pass" command does not work on some
45288    # ftp clients (read ftp.exe) but if it works,
45289    # passive mode is better!
45290    ( \
45291        echo "user $FTPUSER $FTPPWD"        ; \
45292        echo "pass"                         ; \
45293        echo "bin"                          ; \
45294        echo "get $FTPPATH $tmpfile"              ; \
45295    ) | ftp -in $FTPSERVER
45296  fi
45297  if test "x$VALID_TOOL" != xyes; then
45298    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45299  fi
45300
45301    mv $tmpfile $installdir/$filename
45302    if test ! -s $installdir/$filename; then
45303      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45304    fi
45305    case "$extension" in
45306      zip)  echo "Unzipping $installdir/$filename..."
45307        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45308        ;;
45309      tar.gz) echo "Untaring $installdir/$filename..."
45310        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45311        ;;
45312      tgz) echo "Untaring $installdir/$filename..."
45313        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45314        ;;
45315      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45316        ;;
45317    esac
45318  fi
45319  if test -f $installdir/$filename.unpacked; then
45320    depdir=$installdir
45321  fi
45322
45323      fi
45324      # Source the builddeps file again, because in the previous command, the depdir
45325      # was updated to point at the current build dependency install directory.
45326      . $builddepsfile
45327      # Now extract variables from the builddeps.conf files.
45328      theroot=${builddep_freetype2_ROOT}
45329      thecflags=${builddep_freetype2_CFLAGS}
45330      thelibs=${builddep_freetype2_LIBS}
45331      if test "x$depdir" = x; then
45332        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45333      fi
45334      FREETYPE=$depdir
45335      if test "x$theroot" != x; then
45336        FREETYPE="$theroot"
45337      fi
45338      if test "x$thecflags" != x; then
45339        FREETYPE_CFLAGS="$thecflags"
45340      fi
45341      if test "x$thelibs" != x; then
45342        FREETYPE_LIBS="$thelibs"
45343      fi
45344      FOUND_FREETYPE=yes
45345      else FOUND_FREETYPE=no
45346
45347    fi
45348    else FOUND_FREETYPE=no
45349
45350  fi
45351
45352        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45353        if test "x$FOUND_FREETYPE" = xyes; then
45354          if test "x$BUNDLE_FREETYPE" = xyes; then
45355            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45356$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45357            FOUND_FREETYPE=no
45358          else
45359            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45360$as_echo_n "checking for freetype... " >&6; }
45361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45362$as_echo "yes (using builddeps)" >&6; }
45363          fi
45364        fi
45365      fi
45366
45367      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45368      if test "x$SYSROOT" = x; then
45369        if test "x$FOUND_FREETYPE" != xyes; then
45370          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45371          if test "x$PKG_CONFIG" != x; then
45372
45373pkg_failed=no
45374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45375$as_echo_n "checking for FREETYPE... " >&6; }
45376
45377if test -n "$FREETYPE_CFLAGS"; then
45378    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45379 elif test -n "$PKG_CONFIG"; then
45380    if test -n "$PKG_CONFIG" && \
45381    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45382  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45383  ac_status=$?
45384  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45385  test $ac_status = 0; }; then
45386  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45387else
45388  pkg_failed=yes
45389fi
45390 else
45391    pkg_failed=untried
45392fi
45393if test -n "$FREETYPE_LIBS"; then
45394    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45395 elif test -n "$PKG_CONFIG"; then
45396    if test -n "$PKG_CONFIG" && \
45397    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45398  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45399  ac_status=$?
45400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45401  test $ac_status = 0; }; then
45402  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45403else
45404  pkg_failed=yes
45405fi
45406 else
45407    pkg_failed=untried
45408fi
45409
45410
45411
45412if test $pkg_failed = yes; then
45413
45414if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45415        _pkg_short_errors_supported=yes
45416else
45417        _pkg_short_errors_supported=no
45418fi
45419        if test $_pkg_short_errors_supported = yes; then
45420	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45421        else
45422	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45423        fi
45424	# Put the nasty error message in config.log where it belongs
45425	echo "$FREETYPE_PKG_ERRORS" >&5
45426
45427	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45428$as_echo "no" >&6; }
45429                FOUND_FREETYPE=no
45430elif test $pkg_failed = untried; then
45431	FOUND_FREETYPE=no
45432else
45433	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45434	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45436$as_echo "yes" >&6; }
45437	FOUND_FREETYPE=yes
45438fi
45439            if test "x$FOUND_FREETYPE" = xyes; then
45440              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45441              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45442              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45443              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45444                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45445              fi
45446              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45447              if test "x$BUNDLE_FREETYPE" = xyes; then
45448                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45449$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45450                FOUND_FREETYPE=no
45451              else
45452                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45453$as_echo_n "checking for freetype... " >&6; }
45454                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45455$as_echo "yes (using pkg-config)" >&6; }
45456              fi
45457            fi
45458          fi
45459        fi
45460      fi
45461
45462      if test "x$FOUND_FREETYPE" != xyes; then
45463        # Check in well-known locations
45464        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45465          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45466
45467  windows_path="$FREETYPE_BASE_DIR"
45468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45469    unix_path=`$CYGPATH -u "$windows_path"`
45470    FREETYPE_BASE_DIR="$unix_path"
45471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45473    FREETYPE_BASE_DIR="$unix_path"
45474  fi
45475
45476
45477  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45478  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45479  METHOD="well-known location"
45480
45481  # First check if the files exists.
45482  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45483    # We found an arbitrary include file. That's a good sign.
45484    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45485$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45486    FOUND_FREETYPE=yes
45487
45488    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45489    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45490      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45492      FOUND_FREETYPE=no
45493    else
45494      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45495        # On Windows, we will need both .lib and .dll file.
45496        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45497          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45499          FOUND_FREETYPE=no
45500        fi
45501      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45502          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45503        # Found lib in isa dir, use that instead.
45504        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45505      fi
45506    fi
45507  fi
45508
45509  if test "x$FOUND_FREETYPE" = xyes; then
45510
45511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45512
45513  # Input might be given as Windows format, start by converting to
45514  # unix format.
45515  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45516  new_path=`$CYGPATH -u "$path"`
45517
45518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45521  # "foo.exe" is OK but "foo" is an error.
45522  #
45523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45524  # It is also a way to make sure we got the proper file name for the real test later on.
45525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45526  if test "x$test_shortpath" = x; then
45527    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45529    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45530  fi
45531
45532  # Call helper function which possibly converts this using DOS-style short mode.
45533  # If so, the updated path is stored in $new_path.
45534
45535  input_path="$new_path"
45536  # Check if we need to convert this using DOS-style short mode. If the path
45537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45538  # take no chances and rewrite it.
45539  # Note: m4 eats our [], so we need to use [ and ] instead.
45540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45541  if test "x$has_forbidden_chars" != x; then
45542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45546      # Going to short mode and back again did indeed matter. Since short mode is
45547      # case insensitive, let's make it lowercase to improve readability.
45548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45549      # Now convert it back to Unix-stile (cygpath)
45550      input_path=`$CYGPATH -u "$shortmode_path"`
45551      new_path="$input_path"
45552    fi
45553  fi
45554
45555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45556  if test "x$test_cygdrive_prefix" = x; then
45557    # As a simple fix, exclude /usr/bin since it's not a real path.
45558    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45560      # a path prefixed by /cygdrive for fixpath to work.
45561      new_path="$CYGWIN_ROOT_PATH$input_path"
45562    fi
45563  fi
45564
45565
45566  if test "x$path" != "x$new_path"; then
45567    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45569$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45570  fi
45571
45572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45573
45574  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45575  has_colon=`$ECHO $path | $GREP ^.:`
45576  new_path="$path"
45577  if test "x$has_colon" = x; then
45578    # Not in mixed or Windows style, start by that.
45579    new_path=`cmd //c echo $path`
45580  fi
45581
45582
45583  input_path="$new_path"
45584  # Check if we need to convert this using DOS-style short mode. If the path
45585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45586  # take no chances and rewrite it.
45587  # Note: m4 eats our [], so we need to use [ and ] instead.
45588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45589  if test "x$has_forbidden_chars" != x; then
45590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45592  fi
45593
45594
45595  windows_path="$new_path"
45596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45597    unix_path=`$CYGPATH -u "$windows_path"`
45598    new_path="$unix_path"
45599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45601    new_path="$unix_path"
45602  fi
45603
45604  if test "x$path" != "x$new_path"; then
45605    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45607$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45608  fi
45609
45610  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45611  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45612
45613  else
45614    # We're on a posix platform. Hooray! :)
45615    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45616    has_space=`$ECHO "$path" | $GREP " "`
45617    if test "x$has_space" != x; then
45618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45620      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45621    fi
45622
45623    # Use eval to expand a potential ~
45624    eval path="$path"
45625    if test ! -f "$path" && test ! -d "$path"; then
45626      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45627    fi
45628
45629    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45630  fi
45631
45632
45633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45634
45635  # Input might be given as Windows format, start by converting to
45636  # unix format.
45637  path="$POTENTIAL_FREETYPE_LIB_PATH"
45638  new_path=`$CYGPATH -u "$path"`
45639
45640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45643  # "foo.exe" is OK but "foo" is an error.
45644  #
45645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45646  # It is also a way to make sure we got the proper file name for the real test later on.
45647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45648  if test "x$test_shortpath" = x; then
45649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45651    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45652  fi
45653
45654  # Call helper function which possibly converts this using DOS-style short mode.
45655  # If so, the updated path is stored in $new_path.
45656
45657  input_path="$new_path"
45658  # Check if we need to convert this using DOS-style short mode. If the path
45659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45660  # take no chances and rewrite it.
45661  # Note: m4 eats our [], so we need to use [ and ] instead.
45662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45663  if test "x$has_forbidden_chars" != x; then
45664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45668      # Going to short mode and back again did indeed matter. Since short mode is
45669      # case insensitive, let's make it lowercase to improve readability.
45670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45671      # Now convert it back to Unix-stile (cygpath)
45672      input_path=`$CYGPATH -u "$shortmode_path"`
45673      new_path="$input_path"
45674    fi
45675  fi
45676
45677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45678  if test "x$test_cygdrive_prefix" = x; then
45679    # As a simple fix, exclude /usr/bin since it's not a real path.
45680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45682      # a path prefixed by /cygdrive for fixpath to work.
45683      new_path="$CYGWIN_ROOT_PATH$input_path"
45684    fi
45685  fi
45686
45687
45688  if test "x$path" != "x$new_path"; then
45689    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45692  fi
45693
45694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45695
45696  path="$POTENTIAL_FREETYPE_LIB_PATH"
45697  has_colon=`$ECHO $path | $GREP ^.:`
45698  new_path="$path"
45699  if test "x$has_colon" = x; then
45700    # Not in mixed or Windows style, start by that.
45701    new_path=`cmd //c echo $path`
45702  fi
45703
45704
45705  input_path="$new_path"
45706  # Check if we need to convert this using DOS-style short mode. If the path
45707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45708  # take no chances and rewrite it.
45709  # Note: m4 eats our [], so we need to use [ and ] instead.
45710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45711  if test "x$has_forbidden_chars" != x; then
45712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45714  fi
45715
45716
45717  windows_path="$new_path"
45718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45719    unix_path=`$CYGPATH -u "$windows_path"`
45720    new_path="$unix_path"
45721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45723    new_path="$unix_path"
45724  fi
45725
45726  if test "x$path" != "x$new_path"; then
45727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45730  fi
45731
45732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45734
45735  else
45736    # We're on a posix platform. Hooray! :)
45737    path="$POTENTIAL_FREETYPE_LIB_PATH"
45738    has_space=`$ECHO "$path" | $GREP " "`
45739    if test "x$has_space" != x; then
45740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45742      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45743    fi
45744
45745    # Use eval to expand a potential ~
45746    eval path="$path"
45747    if test ! -f "$path" && test ! -d "$path"; then
45748      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45749    fi
45750
45751    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45752  fi
45753
45754
45755    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45757$as_echo_n "checking for freetype includes... " >&6; }
45758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45759$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45760    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45762$as_echo_n "checking for freetype libraries... " >&6; }
45763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45764$as_echo "$FREETYPE_LIB_PATH" >&6; }
45765  fi
45766
45767          if test "x$FOUND_FREETYPE" != xyes; then
45768            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45769
45770  windows_path="$FREETYPE_BASE_DIR"
45771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45772    unix_path=`$CYGPATH -u "$windows_path"`
45773    FREETYPE_BASE_DIR="$unix_path"
45774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45776    FREETYPE_BASE_DIR="$unix_path"
45777  fi
45778
45779
45780  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45781  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45782  METHOD="well-known location"
45783
45784  # First check if the files exists.
45785  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45786    # We found an arbitrary include file. That's a good sign.
45787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45788$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45789    FOUND_FREETYPE=yes
45790
45791    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45792    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45793      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45794$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45795      FOUND_FREETYPE=no
45796    else
45797      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45798        # On Windows, we will need both .lib and .dll file.
45799        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45800          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45801$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45802          FOUND_FREETYPE=no
45803        fi
45804      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45805          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45806        # Found lib in isa dir, use that instead.
45807        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45808      fi
45809    fi
45810  fi
45811
45812  if test "x$FOUND_FREETYPE" = xyes; then
45813
45814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45815
45816  # Input might be given as Windows format, start by converting to
45817  # unix format.
45818  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45819  new_path=`$CYGPATH -u "$path"`
45820
45821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45824  # "foo.exe" is OK but "foo" is an error.
45825  #
45826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45827  # It is also a way to make sure we got the proper file name for the real test later on.
45828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45829  if test "x$test_shortpath" = x; then
45830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45833  fi
45834
45835  # Call helper function which possibly converts this using DOS-style short mode.
45836  # If so, the updated path is stored in $new_path.
45837
45838  input_path="$new_path"
45839  # Check if we need to convert this using DOS-style short mode. If the path
45840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45841  # take no chances and rewrite it.
45842  # Note: m4 eats our [], so we need to use [ and ] instead.
45843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45844  if test "x$has_forbidden_chars" != x; then
45845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45849      # Going to short mode and back again did indeed matter. Since short mode is
45850      # case insensitive, let's make it lowercase to improve readability.
45851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45852      # Now convert it back to Unix-stile (cygpath)
45853      input_path=`$CYGPATH -u "$shortmode_path"`
45854      new_path="$input_path"
45855    fi
45856  fi
45857
45858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45859  if test "x$test_cygdrive_prefix" = x; then
45860    # As a simple fix, exclude /usr/bin since it's not a real path.
45861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45863      # a path prefixed by /cygdrive for fixpath to work.
45864      new_path="$CYGWIN_ROOT_PATH$input_path"
45865    fi
45866  fi
45867
45868
45869  if test "x$path" != "x$new_path"; then
45870    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45873  fi
45874
45875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45876
45877  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45878  has_colon=`$ECHO $path | $GREP ^.:`
45879  new_path="$path"
45880  if test "x$has_colon" = x; then
45881    # Not in mixed or Windows style, start by that.
45882    new_path=`cmd //c echo $path`
45883  fi
45884
45885
45886  input_path="$new_path"
45887  # Check if we need to convert this using DOS-style short mode. If the path
45888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45889  # take no chances and rewrite it.
45890  # Note: m4 eats our [], so we need to use [ and ] instead.
45891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45892  if test "x$has_forbidden_chars" != x; then
45893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45895  fi
45896
45897
45898  windows_path="$new_path"
45899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45900    unix_path=`$CYGPATH -u "$windows_path"`
45901    new_path="$unix_path"
45902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45904    new_path="$unix_path"
45905  fi
45906
45907  if test "x$path" != "x$new_path"; then
45908    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45911  fi
45912
45913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45915
45916  else
45917    # We're on a posix platform. Hooray! :)
45918    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45919    has_space=`$ECHO "$path" | $GREP " "`
45920    if test "x$has_space" != x; then
45921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45923      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45924    fi
45925
45926    # Use eval to expand a potential ~
45927    eval path="$path"
45928    if test ! -f "$path" && test ! -d "$path"; then
45929      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45930    fi
45931
45932    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45933  fi
45934
45935
45936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45937
45938  # Input might be given as Windows format, start by converting to
45939  # unix format.
45940  path="$POTENTIAL_FREETYPE_LIB_PATH"
45941  new_path=`$CYGPATH -u "$path"`
45942
45943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45946  # "foo.exe" is OK but "foo" is an error.
45947  #
45948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45949  # It is also a way to make sure we got the proper file name for the real test later on.
45950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45951  if test "x$test_shortpath" = x; then
45952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45954    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45955  fi
45956
45957  # Call helper function which possibly converts this using DOS-style short mode.
45958  # If so, the updated path is stored in $new_path.
45959
45960  input_path="$new_path"
45961  # Check if we need to convert this using DOS-style short mode. If the path
45962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45963  # take no chances and rewrite it.
45964  # Note: m4 eats our [], so we need to use [ and ] instead.
45965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45966  if test "x$has_forbidden_chars" != x; then
45967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45971      # Going to short mode and back again did indeed matter. Since short mode is
45972      # case insensitive, let's make it lowercase to improve readability.
45973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45974      # Now convert it back to Unix-stile (cygpath)
45975      input_path=`$CYGPATH -u "$shortmode_path"`
45976      new_path="$input_path"
45977    fi
45978  fi
45979
45980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45981  if test "x$test_cygdrive_prefix" = x; then
45982    # As a simple fix, exclude /usr/bin since it's not a real path.
45983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45985      # a path prefixed by /cygdrive for fixpath to work.
45986      new_path="$CYGWIN_ROOT_PATH$input_path"
45987    fi
45988  fi
45989
45990
45991  if test "x$path" != "x$new_path"; then
45992    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45994$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45995  fi
45996
45997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45998
45999  path="$POTENTIAL_FREETYPE_LIB_PATH"
46000  has_colon=`$ECHO $path | $GREP ^.:`
46001  new_path="$path"
46002  if test "x$has_colon" = x; then
46003    # Not in mixed or Windows style, start by that.
46004    new_path=`cmd //c echo $path`
46005  fi
46006
46007
46008  input_path="$new_path"
46009  # Check if we need to convert this using DOS-style short mode. If the path
46010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46011  # take no chances and rewrite it.
46012  # Note: m4 eats our [], so we need to use [ and ] instead.
46013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46014  if test "x$has_forbidden_chars" != x; then
46015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46017  fi
46018
46019
46020  windows_path="$new_path"
46021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46022    unix_path=`$CYGPATH -u "$windows_path"`
46023    new_path="$unix_path"
46024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46026    new_path="$unix_path"
46027  fi
46028
46029  if test "x$path" != "x$new_path"; then
46030    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46032$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46033  fi
46034
46035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46037
46038  else
46039    # We're on a posix platform. Hooray! :)
46040    path="$POTENTIAL_FREETYPE_LIB_PATH"
46041    has_space=`$ECHO "$path" | $GREP " "`
46042    if test "x$has_space" != x; then
46043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46044$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46045      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46046    fi
46047
46048    # Use eval to expand a potential ~
46049    eval path="$path"
46050    if test ! -f "$path" && test ! -d "$path"; then
46051      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46052    fi
46053
46054    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46055  fi
46056
46057
46058    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46060$as_echo_n "checking for freetype includes... " >&6; }
46061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46062$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46063    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46065$as_echo_n "checking for freetype libraries... " >&6; }
46066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46067$as_echo "$FREETYPE_LIB_PATH" >&6; }
46068  fi
46069
46070          fi
46071        else
46072          FREETYPE_BASE_DIR="$SYSROOT/usr"
46073
46074  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46075  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46076  METHOD="well-known location"
46077
46078  # First check if the files exists.
46079  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46080    # We found an arbitrary include file. That's a good sign.
46081    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46082$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46083    FOUND_FREETYPE=yes
46084
46085    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46086    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46087      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46088$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46089      FOUND_FREETYPE=no
46090    else
46091      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46092        # On Windows, we will need both .lib and .dll file.
46093        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46094          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46095$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46096          FOUND_FREETYPE=no
46097        fi
46098      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46099          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46100        # Found lib in isa dir, use that instead.
46101        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46102      fi
46103    fi
46104  fi
46105
46106  if test "x$FOUND_FREETYPE" = xyes; then
46107
46108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46109
46110  # Input might be given as Windows format, start by converting to
46111  # unix format.
46112  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46113  new_path=`$CYGPATH -u "$path"`
46114
46115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46118  # "foo.exe" is OK but "foo" is an error.
46119  #
46120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46121  # It is also a way to make sure we got the proper file name for the real test later on.
46122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46123  if test "x$test_shortpath" = x; then
46124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46125$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46126    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46127  fi
46128
46129  # Call helper function which possibly converts this using DOS-style short mode.
46130  # If so, the updated path is stored in $new_path.
46131
46132  input_path="$new_path"
46133  # Check if we need to convert this using DOS-style short mode. If the path
46134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46135  # take no chances and rewrite it.
46136  # Note: m4 eats our [], so we need to use [ and ] instead.
46137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46138  if test "x$has_forbidden_chars" != x; then
46139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46143      # Going to short mode and back again did indeed matter. Since short mode is
46144      # case insensitive, let's make it lowercase to improve readability.
46145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46146      # Now convert it back to Unix-stile (cygpath)
46147      input_path=`$CYGPATH -u "$shortmode_path"`
46148      new_path="$input_path"
46149    fi
46150  fi
46151
46152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46153  if test "x$test_cygdrive_prefix" = x; then
46154    # As a simple fix, exclude /usr/bin since it's not a real path.
46155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46157      # a path prefixed by /cygdrive for fixpath to work.
46158      new_path="$CYGWIN_ROOT_PATH$input_path"
46159    fi
46160  fi
46161
46162
46163  if test "x$path" != "x$new_path"; then
46164    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46166$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46167  fi
46168
46169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46170
46171  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46172  has_colon=`$ECHO $path | $GREP ^.:`
46173  new_path="$path"
46174  if test "x$has_colon" = x; then
46175    # Not in mixed or Windows style, start by that.
46176    new_path=`cmd //c echo $path`
46177  fi
46178
46179
46180  input_path="$new_path"
46181  # Check if we need to convert this using DOS-style short mode. If the path
46182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46183  # take no chances and rewrite it.
46184  # Note: m4 eats our [], so we need to use [ and ] instead.
46185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46186  if test "x$has_forbidden_chars" != x; then
46187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46189  fi
46190
46191
46192  windows_path="$new_path"
46193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46194    unix_path=`$CYGPATH -u "$windows_path"`
46195    new_path="$unix_path"
46196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46198    new_path="$unix_path"
46199  fi
46200
46201  if test "x$path" != "x$new_path"; then
46202    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46204$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46205  fi
46206
46207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46209
46210  else
46211    # We're on a posix platform. Hooray! :)
46212    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46213    has_space=`$ECHO "$path" | $GREP " "`
46214    if test "x$has_space" != x; then
46215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46216$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46217      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46218    fi
46219
46220    # Use eval to expand a potential ~
46221    eval path="$path"
46222    if test ! -f "$path" && test ! -d "$path"; then
46223      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46224    fi
46225
46226    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46227  fi
46228
46229
46230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46231
46232  # Input might be given as Windows format, start by converting to
46233  # unix format.
46234  path="$POTENTIAL_FREETYPE_LIB_PATH"
46235  new_path=`$CYGPATH -u "$path"`
46236
46237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46240  # "foo.exe" is OK but "foo" is an error.
46241  #
46242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46243  # It is also a way to make sure we got the proper file name for the real test later on.
46244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46245  if test "x$test_shortpath" = x; then
46246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46247$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46248    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46249  fi
46250
46251  # Call helper function which possibly converts this using DOS-style short mode.
46252  # If so, the updated path is stored in $new_path.
46253
46254  input_path="$new_path"
46255  # Check if we need to convert this using DOS-style short mode. If the path
46256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46257  # take no chances and rewrite it.
46258  # Note: m4 eats our [], so we need to use [ and ] instead.
46259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46260  if test "x$has_forbidden_chars" != x; then
46261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46265      # Going to short mode and back again did indeed matter. Since short mode is
46266      # case insensitive, let's make it lowercase to improve readability.
46267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46268      # Now convert it back to Unix-stile (cygpath)
46269      input_path=`$CYGPATH -u "$shortmode_path"`
46270      new_path="$input_path"
46271    fi
46272  fi
46273
46274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46275  if test "x$test_cygdrive_prefix" = x; then
46276    # As a simple fix, exclude /usr/bin since it's not a real path.
46277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46279      # a path prefixed by /cygdrive for fixpath to work.
46280      new_path="$CYGWIN_ROOT_PATH$input_path"
46281    fi
46282  fi
46283
46284
46285  if test "x$path" != "x$new_path"; then
46286    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46288$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46289  fi
46290
46291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292
46293  path="$POTENTIAL_FREETYPE_LIB_PATH"
46294  has_colon=`$ECHO $path | $GREP ^.:`
46295  new_path="$path"
46296  if test "x$has_colon" = x; then
46297    # Not in mixed or Windows style, start by that.
46298    new_path=`cmd //c echo $path`
46299  fi
46300
46301
46302  input_path="$new_path"
46303  # Check if we need to convert this using DOS-style short mode. If the path
46304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46305  # take no chances and rewrite it.
46306  # Note: m4 eats our [], so we need to use [ and ] instead.
46307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46308  if test "x$has_forbidden_chars" != x; then
46309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46311  fi
46312
46313
46314  windows_path="$new_path"
46315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46316    unix_path=`$CYGPATH -u "$windows_path"`
46317    new_path="$unix_path"
46318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46320    new_path="$unix_path"
46321  fi
46322
46323  if test "x$path" != "x$new_path"; then
46324    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46326$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46327  fi
46328
46329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46331
46332  else
46333    # We're on a posix platform. Hooray! :)
46334    path="$POTENTIAL_FREETYPE_LIB_PATH"
46335    has_space=`$ECHO "$path" | $GREP " "`
46336    if test "x$has_space" != x; then
46337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46339      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46340    fi
46341
46342    # Use eval to expand a potential ~
46343    eval path="$path"
46344    if test ! -f "$path" && test ! -d "$path"; then
46345      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46346    fi
46347
46348    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46349  fi
46350
46351
46352    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46354$as_echo_n "checking for freetype includes... " >&6; }
46355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46356$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46357    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46359$as_echo_n "checking for freetype libraries... " >&6; }
46360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46361$as_echo "$FREETYPE_LIB_PATH" >&6; }
46362  fi
46363
46364
46365          if test "x$FOUND_FREETYPE" != xyes; then
46366            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46367
46368  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46369  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46370  METHOD="well-known location"
46371
46372  # First check if the files exists.
46373  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46374    # We found an arbitrary include file. That's a good sign.
46375    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46376$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46377    FOUND_FREETYPE=yes
46378
46379    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46380    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46381      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46382$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46383      FOUND_FREETYPE=no
46384    else
46385      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46386        # On Windows, we will need both .lib and .dll file.
46387        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46388          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46389$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46390          FOUND_FREETYPE=no
46391        fi
46392      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46393          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46394        # Found lib in isa dir, use that instead.
46395        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46396      fi
46397    fi
46398  fi
46399
46400  if test "x$FOUND_FREETYPE" = xyes; then
46401
46402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46403
46404  # Input might be given as Windows format, start by converting to
46405  # unix format.
46406  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46407  new_path=`$CYGPATH -u "$path"`
46408
46409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46412  # "foo.exe" is OK but "foo" is an error.
46413  #
46414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46415  # It is also a way to make sure we got the proper file name for the real test later on.
46416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46417  if test "x$test_shortpath" = x; then
46418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46419$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46420    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46421  fi
46422
46423  # Call helper function which possibly converts this using DOS-style short mode.
46424  # If so, the updated path is stored in $new_path.
46425
46426  input_path="$new_path"
46427  # Check if we need to convert this using DOS-style short mode. If the path
46428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46429  # take no chances and rewrite it.
46430  # Note: m4 eats our [], so we need to use [ and ] instead.
46431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46432  if test "x$has_forbidden_chars" != x; then
46433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46437      # Going to short mode and back again did indeed matter. Since short mode is
46438      # case insensitive, let's make it lowercase to improve readability.
46439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46440      # Now convert it back to Unix-stile (cygpath)
46441      input_path=`$CYGPATH -u "$shortmode_path"`
46442      new_path="$input_path"
46443    fi
46444  fi
46445
46446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46447  if test "x$test_cygdrive_prefix" = x; then
46448    # As a simple fix, exclude /usr/bin since it's not a real path.
46449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46451      # a path prefixed by /cygdrive for fixpath to work.
46452      new_path="$CYGWIN_ROOT_PATH$input_path"
46453    fi
46454  fi
46455
46456
46457  if test "x$path" != "x$new_path"; then
46458    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46461  fi
46462
46463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46464
46465  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46466  has_colon=`$ECHO $path | $GREP ^.:`
46467  new_path="$path"
46468  if test "x$has_colon" = x; then
46469    # Not in mixed or Windows style, start by that.
46470    new_path=`cmd //c echo $path`
46471  fi
46472
46473
46474  input_path="$new_path"
46475  # Check if we need to convert this using DOS-style short mode. If the path
46476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46477  # take no chances and rewrite it.
46478  # Note: m4 eats our [], so we need to use [ and ] instead.
46479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46480  if test "x$has_forbidden_chars" != x; then
46481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46483  fi
46484
46485
46486  windows_path="$new_path"
46487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46488    unix_path=`$CYGPATH -u "$windows_path"`
46489    new_path="$unix_path"
46490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46492    new_path="$unix_path"
46493  fi
46494
46495  if test "x$path" != "x$new_path"; then
46496    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46498$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46499  fi
46500
46501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46503
46504  else
46505    # We're on a posix platform. Hooray! :)
46506    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46507    has_space=`$ECHO "$path" | $GREP " "`
46508    if test "x$has_space" != x; then
46509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46511      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46512    fi
46513
46514    # Use eval to expand a potential ~
46515    eval path="$path"
46516    if test ! -f "$path" && test ! -d "$path"; then
46517      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46518    fi
46519
46520    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46521  fi
46522
46523
46524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46525
46526  # Input might be given as Windows format, start by converting to
46527  # unix format.
46528  path="$POTENTIAL_FREETYPE_LIB_PATH"
46529  new_path=`$CYGPATH -u "$path"`
46530
46531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46534  # "foo.exe" is OK but "foo" is an error.
46535  #
46536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46537  # It is also a way to make sure we got the proper file name for the real test later on.
46538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46539  if test "x$test_shortpath" = x; then
46540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46542    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46543  fi
46544
46545  # Call helper function which possibly converts this using DOS-style short mode.
46546  # If so, the updated path is stored in $new_path.
46547
46548  input_path="$new_path"
46549  # Check if we need to convert this using DOS-style short mode. If the path
46550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46551  # take no chances and rewrite it.
46552  # Note: m4 eats our [], so we need to use [ and ] instead.
46553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46554  if test "x$has_forbidden_chars" != x; then
46555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46559      # Going to short mode and back again did indeed matter. Since short mode is
46560      # case insensitive, let's make it lowercase to improve readability.
46561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46562      # Now convert it back to Unix-stile (cygpath)
46563      input_path=`$CYGPATH -u "$shortmode_path"`
46564      new_path="$input_path"
46565    fi
46566  fi
46567
46568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46569  if test "x$test_cygdrive_prefix" = x; then
46570    # As a simple fix, exclude /usr/bin since it's not a real path.
46571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46573      # a path prefixed by /cygdrive for fixpath to work.
46574      new_path="$CYGWIN_ROOT_PATH$input_path"
46575    fi
46576  fi
46577
46578
46579  if test "x$path" != "x$new_path"; then
46580    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46583  fi
46584
46585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46586
46587  path="$POTENTIAL_FREETYPE_LIB_PATH"
46588  has_colon=`$ECHO $path | $GREP ^.:`
46589  new_path="$path"
46590  if test "x$has_colon" = x; then
46591    # Not in mixed or Windows style, start by that.
46592    new_path=`cmd //c echo $path`
46593  fi
46594
46595
46596  input_path="$new_path"
46597  # Check if we need to convert this using DOS-style short mode. If the path
46598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46599  # take no chances and rewrite it.
46600  # Note: m4 eats our [], so we need to use [ and ] instead.
46601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46602  if test "x$has_forbidden_chars" != x; then
46603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46605  fi
46606
46607
46608  windows_path="$new_path"
46609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46610    unix_path=`$CYGPATH -u "$windows_path"`
46611    new_path="$unix_path"
46612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46614    new_path="$unix_path"
46615  fi
46616
46617  if test "x$path" != "x$new_path"; then
46618    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46621  fi
46622
46623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46625
46626  else
46627    # We're on a posix platform. Hooray! :)
46628    path="$POTENTIAL_FREETYPE_LIB_PATH"
46629    has_space=`$ECHO "$path" | $GREP " "`
46630    if test "x$has_space" != x; then
46631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46633      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46634    fi
46635
46636    # Use eval to expand a potential ~
46637    eval path="$path"
46638    if test ! -f "$path" && test ! -d "$path"; then
46639      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46640    fi
46641
46642    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46643  fi
46644
46645
46646    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46647    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46648$as_echo_n "checking for freetype includes... " >&6; }
46649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46650$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46651    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46653$as_echo_n "checking for freetype libraries... " >&6; }
46654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46655$as_echo "$FREETYPE_LIB_PATH" >&6; }
46656  fi
46657
46658          fi
46659
46660          if test "x$FOUND_FREETYPE" != xyes; then
46661            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46662
46663  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46664  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46665  METHOD="well-known location"
46666
46667  # First check if the files exists.
46668  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46669    # We found an arbitrary include file. That's a good sign.
46670    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46671$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46672    FOUND_FREETYPE=yes
46673
46674    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46675    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46676      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46677$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46678      FOUND_FREETYPE=no
46679    else
46680      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46681        # On Windows, we will need both .lib and .dll file.
46682        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46683          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46684$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46685          FOUND_FREETYPE=no
46686        fi
46687      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46688          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46689        # Found lib in isa dir, use that instead.
46690        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46691      fi
46692    fi
46693  fi
46694
46695  if test "x$FOUND_FREETYPE" = xyes; then
46696
46697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46698
46699  # Input might be given as Windows format, start by converting to
46700  # unix format.
46701  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46702  new_path=`$CYGPATH -u "$path"`
46703
46704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46707  # "foo.exe" is OK but "foo" is an error.
46708  #
46709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46710  # It is also a way to make sure we got the proper file name for the real test later on.
46711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46712  if test "x$test_shortpath" = x; then
46713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46714$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46715    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46716  fi
46717
46718  # Call helper function which possibly converts this using DOS-style short mode.
46719  # If so, the updated path is stored in $new_path.
46720
46721  input_path="$new_path"
46722  # Check if we need to convert this using DOS-style short mode. If the path
46723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46724  # take no chances and rewrite it.
46725  # Note: m4 eats our [], so we need to use [ and ] instead.
46726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46727  if test "x$has_forbidden_chars" != x; then
46728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46732      # Going to short mode and back again did indeed matter. Since short mode is
46733      # case insensitive, let's make it lowercase to improve readability.
46734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46735      # Now convert it back to Unix-stile (cygpath)
46736      input_path=`$CYGPATH -u "$shortmode_path"`
46737      new_path="$input_path"
46738    fi
46739  fi
46740
46741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46742  if test "x$test_cygdrive_prefix" = x; then
46743    # As a simple fix, exclude /usr/bin since it's not a real path.
46744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46746      # a path prefixed by /cygdrive for fixpath to work.
46747      new_path="$CYGWIN_ROOT_PATH$input_path"
46748    fi
46749  fi
46750
46751
46752  if test "x$path" != "x$new_path"; then
46753    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46755$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46756  fi
46757
46758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46759
46760  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46761  has_colon=`$ECHO $path | $GREP ^.:`
46762  new_path="$path"
46763  if test "x$has_colon" = x; then
46764    # Not in mixed or Windows style, start by that.
46765    new_path=`cmd //c echo $path`
46766  fi
46767
46768
46769  input_path="$new_path"
46770  # Check if we need to convert this using DOS-style short mode. If the path
46771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46772  # take no chances and rewrite it.
46773  # Note: m4 eats our [], so we need to use [ and ] instead.
46774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46775  if test "x$has_forbidden_chars" != x; then
46776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46778  fi
46779
46780
46781  windows_path="$new_path"
46782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46783    unix_path=`$CYGPATH -u "$windows_path"`
46784    new_path="$unix_path"
46785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46787    new_path="$unix_path"
46788  fi
46789
46790  if test "x$path" != "x$new_path"; then
46791    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46793$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46794  fi
46795
46796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46798
46799  else
46800    # We're on a posix platform. Hooray! :)
46801    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46802    has_space=`$ECHO "$path" | $GREP " "`
46803    if test "x$has_space" != x; then
46804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46805$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46806      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46807    fi
46808
46809    # Use eval to expand a potential ~
46810    eval path="$path"
46811    if test ! -f "$path" && test ! -d "$path"; then
46812      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46813    fi
46814
46815    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46816  fi
46817
46818
46819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820
46821  # Input might be given as Windows format, start by converting to
46822  # unix format.
46823  path="$POTENTIAL_FREETYPE_LIB_PATH"
46824  new_path=`$CYGPATH -u "$path"`
46825
46826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46829  # "foo.exe" is OK but "foo" is an error.
46830  #
46831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46832  # It is also a way to make sure we got the proper file name for the real test later on.
46833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46834  if test "x$test_shortpath" = x; then
46835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46837    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46838  fi
46839
46840  # Call helper function which possibly converts this using DOS-style short mode.
46841  # If so, the updated path is stored in $new_path.
46842
46843  input_path="$new_path"
46844  # Check if we need to convert this using DOS-style short mode. If the path
46845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46846  # take no chances and rewrite it.
46847  # Note: m4 eats our [], so we need to use [ and ] instead.
46848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46849  if test "x$has_forbidden_chars" != x; then
46850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46854      # Going to short mode and back again did indeed matter. Since short mode is
46855      # case insensitive, let's make it lowercase to improve readability.
46856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46857      # Now convert it back to Unix-stile (cygpath)
46858      input_path=`$CYGPATH -u "$shortmode_path"`
46859      new_path="$input_path"
46860    fi
46861  fi
46862
46863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46864  if test "x$test_cygdrive_prefix" = x; then
46865    # As a simple fix, exclude /usr/bin since it's not a real path.
46866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46868      # a path prefixed by /cygdrive for fixpath to work.
46869      new_path="$CYGWIN_ROOT_PATH$input_path"
46870    fi
46871  fi
46872
46873
46874  if test "x$path" != "x$new_path"; then
46875    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46878  fi
46879
46880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46881
46882  path="$POTENTIAL_FREETYPE_LIB_PATH"
46883  has_colon=`$ECHO $path | $GREP ^.:`
46884  new_path="$path"
46885  if test "x$has_colon" = x; then
46886    # Not in mixed or Windows style, start by that.
46887    new_path=`cmd //c echo $path`
46888  fi
46889
46890
46891  input_path="$new_path"
46892  # Check if we need to convert this using DOS-style short mode. If the path
46893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46894  # take no chances and rewrite it.
46895  # Note: m4 eats our [], so we need to use [ and ] instead.
46896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46897  if test "x$has_forbidden_chars" != x; then
46898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46900  fi
46901
46902
46903  windows_path="$new_path"
46904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46905    unix_path=`$CYGPATH -u "$windows_path"`
46906    new_path="$unix_path"
46907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46909    new_path="$unix_path"
46910  fi
46911
46912  if test "x$path" != "x$new_path"; then
46913    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46915$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46916  fi
46917
46918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46920
46921  else
46922    # We're on a posix platform. Hooray! :)
46923    path="$POTENTIAL_FREETYPE_LIB_PATH"
46924    has_space=`$ECHO "$path" | $GREP " "`
46925    if test "x$has_space" != x; then
46926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46927$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46928      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46929    fi
46930
46931    # Use eval to expand a potential ~
46932    eval path="$path"
46933    if test ! -f "$path" && test ! -d "$path"; then
46934      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46935    fi
46936
46937    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46938  fi
46939
46940
46941    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46943$as_echo_n "checking for freetype includes... " >&6; }
46944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46945$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46946    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46948$as_echo_n "checking for freetype libraries... " >&6; }
46949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46950$as_echo "$FREETYPE_LIB_PATH" >&6; }
46951  fi
46952
46953          fi
46954
46955          if test "x$FOUND_FREETYPE" != xyes; then
46956            FREETYPE_BASE_DIR="$SYSROOT/usr"
46957            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46958
46959  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46960  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46961  METHOD="well-known location"
46962
46963  # First check if the files exists.
46964  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46965    # We found an arbitrary include file. That's a good sign.
46966    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46967$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46968    FOUND_FREETYPE=yes
46969
46970    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46971    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46972      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46973$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46974      FOUND_FREETYPE=no
46975    else
46976      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46977        # On Windows, we will need both .lib and .dll file.
46978        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46979          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46980$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46981          FOUND_FREETYPE=no
46982        fi
46983      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46984          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46985        # Found lib in isa dir, use that instead.
46986        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46987      fi
46988    fi
46989  fi
46990
46991  if test "x$FOUND_FREETYPE" = xyes; then
46992
46993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46994
46995  # Input might be given as Windows format, start by converting to
46996  # unix format.
46997  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46998  new_path=`$CYGPATH -u "$path"`
46999
47000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47003  # "foo.exe" is OK but "foo" is an error.
47004  #
47005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47006  # It is also a way to make sure we got the proper file name for the real test later on.
47007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47008  if test "x$test_shortpath" = x; then
47009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47010$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47011    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47012  fi
47013
47014  # Call helper function which possibly converts this using DOS-style short mode.
47015  # If so, the updated path is stored in $new_path.
47016
47017  input_path="$new_path"
47018  # Check if we need to convert this using DOS-style short mode. If the path
47019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47020  # take no chances and rewrite it.
47021  # Note: m4 eats our [], so we need to use [ and ] instead.
47022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47023  if test "x$has_forbidden_chars" != x; then
47024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47028      # Going to short mode and back again did indeed matter. Since short mode is
47029      # case insensitive, let's make it lowercase to improve readability.
47030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47031      # Now convert it back to Unix-stile (cygpath)
47032      input_path=`$CYGPATH -u "$shortmode_path"`
47033      new_path="$input_path"
47034    fi
47035  fi
47036
47037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47038  if test "x$test_cygdrive_prefix" = x; then
47039    # As a simple fix, exclude /usr/bin since it's not a real path.
47040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47042      # a path prefixed by /cygdrive for fixpath to work.
47043      new_path="$CYGWIN_ROOT_PATH$input_path"
47044    fi
47045  fi
47046
47047
47048  if test "x$path" != "x$new_path"; then
47049    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47052  fi
47053
47054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47055
47056  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47057  has_colon=`$ECHO $path | $GREP ^.:`
47058  new_path="$path"
47059  if test "x$has_colon" = x; then
47060    # Not in mixed or Windows style, start by that.
47061    new_path=`cmd //c echo $path`
47062  fi
47063
47064
47065  input_path="$new_path"
47066  # Check if we need to convert this using DOS-style short mode. If the path
47067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47068  # take no chances and rewrite it.
47069  # Note: m4 eats our [], so we need to use [ and ] instead.
47070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47071  if test "x$has_forbidden_chars" != x; then
47072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47074  fi
47075
47076
47077  windows_path="$new_path"
47078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47079    unix_path=`$CYGPATH -u "$windows_path"`
47080    new_path="$unix_path"
47081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47083    new_path="$unix_path"
47084  fi
47085
47086  if test "x$path" != "x$new_path"; then
47087    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47089$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47090  fi
47091
47092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47094
47095  else
47096    # We're on a posix platform. Hooray! :)
47097    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47098    has_space=`$ECHO "$path" | $GREP " "`
47099    if test "x$has_space" != x; then
47100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47102      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47103    fi
47104
47105    # Use eval to expand a potential ~
47106    eval path="$path"
47107    if test ! -f "$path" && test ! -d "$path"; then
47108      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47109    fi
47110
47111    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47112  fi
47113
47114
47115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47116
47117  # Input might be given as Windows format, start by converting to
47118  # unix format.
47119  path="$POTENTIAL_FREETYPE_LIB_PATH"
47120  new_path=`$CYGPATH -u "$path"`
47121
47122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47125  # "foo.exe" is OK but "foo" is an error.
47126  #
47127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47128  # It is also a way to make sure we got the proper file name for the real test later on.
47129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47130  if test "x$test_shortpath" = x; then
47131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47132$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47133    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47134  fi
47135
47136  # Call helper function which possibly converts this using DOS-style short mode.
47137  # If so, the updated path is stored in $new_path.
47138
47139  input_path="$new_path"
47140  # Check if we need to convert this using DOS-style short mode. If the path
47141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47142  # take no chances and rewrite it.
47143  # Note: m4 eats our [], so we need to use [ and ] instead.
47144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47145  if test "x$has_forbidden_chars" != x; then
47146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47150      # Going to short mode and back again did indeed matter. Since short mode is
47151      # case insensitive, let's make it lowercase to improve readability.
47152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47153      # Now convert it back to Unix-stile (cygpath)
47154      input_path=`$CYGPATH -u "$shortmode_path"`
47155      new_path="$input_path"
47156    fi
47157  fi
47158
47159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47160  if test "x$test_cygdrive_prefix" = x; then
47161    # As a simple fix, exclude /usr/bin since it's not a real path.
47162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47164      # a path prefixed by /cygdrive for fixpath to work.
47165      new_path="$CYGWIN_ROOT_PATH$input_path"
47166    fi
47167  fi
47168
47169
47170  if test "x$path" != "x$new_path"; then
47171    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47173$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47174  fi
47175
47176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47177
47178  path="$POTENTIAL_FREETYPE_LIB_PATH"
47179  has_colon=`$ECHO $path | $GREP ^.:`
47180  new_path="$path"
47181  if test "x$has_colon" = x; then
47182    # Not in mixed or Windows style, start by that.
47183    new_path=`cmd //c echo $path`
47184  fi
47185
47186
47187  input_path="$new_path"
47188  # Check if we need to convert this using DOS-style short mode. If the path
47189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47190  # take no chances and rewrite it.
47191  # Note: m4 eats our [], so we need to use [ and ] instead.
47192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47193  if test "x$has_forbidden_chars" != x; then
47194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47196  fi
47197
47198
47199  windows_path="$new_path"
47200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47201    unix_path=`$CYGPATH -u "$windows_path"`
47202    new_path="$unix_path"
47203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47205    new_path="$unix_path"
47206  fi
47207
47208  if test "x$path" != "x$new_path"; then
47209    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47212  fi
47213
47214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47216
47217  else
47218    # We're on a posix platform. Hooray! :)
47219    path="$POTENTIAL_FREETYPE_LIB_PATH"
47220    has_space=`$ECHO "$path" | $GREP " "`
47221    if test "x$has_space" != x; then
47222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47224      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47225    fi
47226
47227    # Use eval to expand a potential ~
47228    eval path="$path"
47229    if test ! -f "$path" && test ! -d "$path"; then
47230      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47231    fi
47232
47233    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47234  fi
47235
47236
47237    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47239$as_echo_n "checking for freetype includes... " >&6; }
47240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47241$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47242    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47244$as_echo_n "checking for freetype libraries... " >&6; }
47245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47246$as_echo "$FREETYPE_LIB_PATH" >&6; }
47247  fi
47248
47249            else
47250
47251  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47252  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47253  METHOD="well-known location"
47254
47255  # First check if the files exists.
47256  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47257    # We found an arbitrary include file. That's a good sign.
47258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47259$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47260    FOUND_FREETYPE=yes
47261
47262    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47263    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47264      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47265$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47266      FOUND_FREETYPE=no
47267    else
47268      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47269        # On Windows, we will need both .lib and .dll file.
47270        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47271          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47272$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47273          FOUND_FREETYPE=no
47274        fi
47275      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47276          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47277        # Found lib in isa dir, use that instead.
47278        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47279      fi
47280    fi
47281  fi
47282
47283  if test "x$FOUND_FREETYPE" = xyes; then
47284
47285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47286
47287  # Input might be given as Windows format, start by converting to
47288  # unix format.
47289  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47290  new_path=`$CYGPATH -u "$path"`
47291
47292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47295  # "foo.exe" is OK but "foo" is an error.
47296  #
47297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47298  # It is also a way to make sure we got the proper file name for the real test later on.
47299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47300  if test "x$test_shortpath" = x; then
47301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47303    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47304  fi
47305
47306  # Call helper function which possibly converts this using DOS-style short mode.
47307  # If so, the updated path is stored in $new_path.
47308
47309  input_path="$new_path"
47310  # Check if we need to convert this using DOS-style short mode. If the path
47311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47312  # take no chances and rewrite it.
47313  # Note: m4 eats our [], so we need to use [ and ] instead.
47314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47315  if test "x$has_forbidden_chars" != x; then
47316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47320      # Going to short mode and back again did indeed matter. Since short mode is
47321      # case insensitive, let's make it lowercase to improve readability.
47322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47323      # Now convert it back to Unix-stile (cygpath)
47324      input_path=`$CYGPATH -u "$shortmode_path"`
47325      new_path="$input_path"
47326    fi
47327  fi
47328
47329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47330  if test "x$test_cygdrive_prefix" = x; then
47331    # As a simple fix, exclude /usr/bin since it's not a real path.
47332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47334      # a path prefixed by /cygdrive for fixpath to work.
47335      new_path="$CYGWIN_ROOT_PATH$input_path"
47336    fi
47337  fi
47338
47339
47340  if test "x$path" != "x$new_path"; then
47341    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47344  fi
47345
47346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47347
47348  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47349  has_colon=`$ECHO $path | $GREP ^.:`
47350  new_path="$path"
47351  if test "x$has_colon" = x; then
47352    # Not in mixed or Windows style, start by that.
47353    new_path=`cmd //c echo $path`
47354  fi
47355
47356
47357  input_path="$new_path"
47358  # Check if we need to convert this using DOS-style short mode. If the path
47359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47360  # take no chances and rewrite it.
47361  # Note: m4 eats our [], so we need to use [ and ] instead.
47362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47363  if test "x$has_forbidden_chars" != x; then
47364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47366  fi
47367
47368
47369  windows_path="$new_path"
47370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47371    unix_path=`$CYGPATH -u "$windows_path"`
47372    new_path="$unix_path"
47373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47375    new_path="$unix_path"
47376  fi
47377
47378  if test "x$path" != "x$new_path"; then
47379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47382  fi
47383
47384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47386
47387  else
47388    # We're on a posix platform. Hooray! :)
47389    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47390    has_space=`$ECHO "$path" | $GREP " "`
47391    if test "x$has_space" != x; then
47392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47394      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47395    fi
47396
47397    # Use eval to expand a potential ~
47398    eval path="$path"
47399    if test ! -f "$path" && test ! -d "$path"; then
47400      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47401    fi
47402
47403    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47404  fi
47405
47406
47407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47408
47409  # Input might be given as Windows format, start by converting to
47410  # unix format.
47411  path="$POTENTIAL_FREETYPE_LIB_PATH"
47412  new_path=`$CYGPATH -u "$path"`
47413
47414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47417  # "foo.exe" is OK but "foo" is an error.
47418  #
47419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47420  # It is also a way to make sure we got the proper file name for the real test later on.
47421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47422  if test "x$test_shortpath" = x; then
47423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47425    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47426  fi
47427
47428  # Call helper function which possibly converts this using DOS-style short mode.
47429  # If so, the updated path is stored in $new_path.
47430
47431  input_path="$new_path"
47432  # Check if we need to convert this using DOS-style short mode. If the path
47433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47434  # take no chances and rewrite it.
47435  # Note: m4 eats our [], so we need to use [ and ] instead.
47436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47437  if test "x$has_forbidden_chars" != x; then
47438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47442      # Going to short mode and back again did indeed matter. Since short mode is
47443      # case insensitive, let's make it lowercase to improve readability.
47444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47445      # Now convert it back to Unix-stile (cygpath)
47446      input_path=`$CYGPATH -u "$shortmode_path"`
47447      new_path="$input_path"
47448    fi
47449  fi
47450
47451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47452  if test "x$test_cygdrive_prefix" = x; then
47453    # As a simple fix, exclude /usr/bin since it's not a real path.
47454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47456      # a path prefixed by /cygdrive for fixpath to work.
47457      new_path="$CYGWIN_ROOT_PATH$input_path"
47458    fi
47459  fi
47460
47461
47462  if test "x$path" != "x$new_path"; then
47463    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47466  fi
47467
47468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47469
47470  path="$POTENTIAL_FREETYPE_LIB_PATH"
47471  has_colon=`$ECHO $path | $GREP ^.:`
47472  new_path="$path"
47473  if test "x$has_colon" = x; then
47474    # Not in mixed or Windows style, start by that.
47475    new_path=`cmd //c echo $path`
47476  fi
47477
47478
47479  input_path="$new_path"
47480  # Check if we need to convert this using DOS-style short mode. If the path
47481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47482  # take no chances and rewrite it.
47483  # Note: m4 eats our [], so we need to use [ and ] instead.
47484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47485  if test "x$has_forbidden_chars" != x; then
47486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47488  fi
47489
47490
47491  windows_path="$new_path"
47492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47493    unix_path=`$CYGPATH -u "$windows_path"`
47494    new_path="$unix_path"
47495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47497    new_path="$unix_path"
47498  fi
47499
47500  if test "x$path" != "x$new_path"; then
47501    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47504  fi
47505
47506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47508
47509  else
47510    # We're on a posix platform. Hooray! :)
47511    path="$POTENTIAL_FREETYPE_LIB_PATH"
47512    has_space=`$ECHO "$path" | $GREP " "`
47513    if test "x$has_space" != x; then
47514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47515$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47516      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47517    fi
47518
47519    # Use eval to expand a potential ~
47520    eval path="$path"
47521    if test ! -f "$path" && test ! -d "$path"; then
47522      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47523    fi
47524
47525    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47526  fi
47527
47528
47529    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47531$as_echo_n "checking for freetype includes... " >&6; }
47532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47533$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47534    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47536$as_echo_n "checking for freetype libraries... " >&6; }
47537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47538$as_echo "$FREETYPE_LIB_PATH" >&6; }
47539  fi
47540
47541              if test "x$FOUND_FREETYPE" != xyes; then
47542
47543  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47544  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47545  METHOD="well-known location"
47546
47547  # First check if the files exists.
47548  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47549    # We found an arbitrary include file. That's a good sign.
47550    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47551$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47552    FOUND_FREETYPE=yes
47553
47554    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
47555    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47556      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47557$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47558      FOUND_FREETYPE=no
47559    else
47560      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47561        # On Windows, we will need both .lib and .dll file.
47562        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
47563          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
47564$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
47565          FOUND_FREETYPE=no
47566        fi
47567      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47568          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47569        # Found lib in isa dir, use that instead.
47570        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47571      fi
47572    fi
47573  fi
47574
47575  if test "x$FOUND_FREETYPE" = xyes; then
47576
47577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47578
47579  # Input might be given as Windows format, start by converting to
47580  # unix format.
47581  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47582  new_path=`$CYGPATH -u "$path"`
47583
47584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47587  # "foo.exe" is OK but "foo" is an error.
47588  #
47589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47590  # It is also a way to make sure we got the proper file name for the real test later on.
47591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47592  if test "x$test_shortpath" = x; then
47593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47594$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47595    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47596  fi
47597
47598  # Call helper function which possibly converts this using DOS-style short mode.
47599  # If so, the updated path is stored in $new_path.
47600
47601  input_path="$new_path"
47602  # Check if we need to convert this using DOS-style short mode. If the path
47603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47604  # take no chances and rewrite it.
47605  # Note: m4 eats our [], so we need to use [ and ] instead.
47606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47607  if test "x$has_forbidden_chars" != x; then
47608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47612      # Going to short mode and back again did indeed matter. Since short mode is
47613      # case insensitive, let's make it lowercase to improve readability.
47614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47615      # Now convert it back to Unix-stile (cygpath)
47616      input_path=`$CYGPATH -u "$shortmode_path"`
47617      new_path="$input_path"
47618    fi
47619  fi
47620
47621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47622  if test "x$test_cygdrive_prefix" = x; then
47623    # As a simple fix, exclude /usr/bin since it's not a real path.
47624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47626      # a path prefixed by /cygdrive for fixpath to work.
47627      new_path="$CYGWIN_ROOT_PATH$input_path"
47628    fi
47629  fi
47630
47631
47632  if test "x$path" != "x$new_path"; then
47633    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47636  fi
47637
47638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47639
47640  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47641  has_colon=`$ECHO $path | $GREP ^.:`
47642  new_path="$path"
47643  if test "x$has_colon" = x; then
47644    # Not in mixed or Windows style, start by that.
47645    new_path=`cmd //c echo $path`
47646  fi
47647
47648
47649  input_path="$new_path"
47650  # Check if we need to convert this using DOS-style short mode. If the path
47651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47652  # take no chances and rewrite it.
47653  # Note: m4 eats our [], so we need to use [ and ] instead.
47654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47655  if test "x$has_forbidden_chars" != x; then
47656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47658  fi
47659
47660
47661  windows_path="$new_path"
47662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47663    unix_path=`$CYGPATH -u "$windows_path"`
47664    new_path="$unix_path"
47665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47667    new_path="$unix_path"
47668  fi
47669
47670  if test "x$path" != "x$new_path"; then
47671    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47673$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47674  fi
47675
47676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47678
47679  else
47680    # We're on a posix platform. Hooray! :)
47681    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47682    has_space=`$ECHO "$path" | $GREP " "`
47683    if test "x$has_space" != x; then
47684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47685$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47686      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47687    fi
47688
47689    # Use eval to expand a potential ~
47690    eval path="$path"
47691    if test ! -f "$path" && test ! -d "$path"; then
47692      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47693    fi
47694
47695    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47696  fi
47697
47698
47699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47700
47701  # Input might be given as Windows format, start by converting to
47702  # unix format.
47703  path="$POTENTIAL_FREETYPE_LIB_PATH"
47704  new_path=`$CYGPATH -u "$path"`
47705
47706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47709  # "foo.exe" is OK but "foo" is an error.
47710  #
47711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47712  # It is also a way to make sure we got the proper file name for the real test later on.
47713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47714  if test "x$test_shortpath" = x; then
47715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47717    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47718  fi
47719
47720  # Call helper function which possibly converts this using DOS-style short mode.
47721  # If so, the updated path is stored in $new_path.
47722
47723  input_path="$new_path"
47724  # Check if we need to convert this using DOS-style short mode. If the path
47725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47726  # take no chances and rewrite it.
47727  # Note: m4 eats our [], so we need to use [ and ] instead.
47728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47729  if test "x$has_forbidden_chars" != x; then
47730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47734      # Going to short mode and back again did indeed matter. Since short mode is
47735      # case insensitive, let's make it lowercase to improve readability.
47736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47737      # Now convert it back to Unix-stile (cygpath)
47738      input_path=`$CYGPATH -u "$shortmode_path"`
47739      new_path="$input_path"
47740    fi
47741  fi
47742
47743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47744  if test "x$test_cygdrive_prefix" = x; then
47745    # As a simple fix, exclude /usr/bin since it's not a real path.
47746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47748      # a path prefixed by /cygdrive for fixpath to work.
47749      new_path="$CYGWIN_ROOT_PATH$input_path"
47750    fi
47751  fi
47752
47753
47754  if test "x$path" != "x$new_path"; then
47755    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47758  fi
47759
47760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47761
47762  path="$POTENTIAL_FREETYPE_LIB_PATH"
47763  has_colon=`$ECHO $path | $GREP ^.:`
47764  new_path="$path"
47765  if test "x$has_colon" = x; then
47766    # Not in mixed or Windows style, start by that.
47767    new_path=`cmd //c echo $path`
47768  fi
47769
47770
47771  input_path="$new_path"
47772  # Check if we need to convert this using DOS-style short mode. If the path
47773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47774  # take no chances and rewrite it.
47775  # Note: m4 eats our [], so we need to use [ and ] instead.
47776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47777  if test "x$has_forbidden_chars" != x; then
47778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47780  fi
47781
47782
47783  windows_path="$new_path"
47784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47785    unix_path=`$CYGPATH -u "$windows_path"`
47786    new_path="$unix_path"
47787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47789    new_path="$unix_path"
47790  fi
47791
47792  if test "x$path" != "x$new_path"; then
47793    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47796  fi
47797
47798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47800
47801  else
47802    # We're on a posix platform. Hooray! :)
47803    path="$POTENTIAL_FREETYPE_LIB_PATH"
47804    has_space=`$ECHO "$path" | $GREP " "`
47805    if test "x$has_space" != x; then
47806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47808      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47809    fi
47810
47811    # Use eval to expand a potential ~
47812    eval path="$path"
47813    if test ! -f "$path" && test ! -d "$path"; then
47814      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47815    fi
47816
47817    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47818  fi
47819
47820
47821    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47823$as_echo_n "checking for freetype includes... " >&6; }
47824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47825$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47826    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47828$as_echo_n "checking for freetype libraries... " >&6; }
47829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47830$as_echo "$FREETYPE_LIB_PATH" >&6; }
47831  fi
47832
47833              fi
47834            fi
47835          fi
47836        fi
47837      fi # end check in well-known locations
47838
47839      if test "x$FOUND_FREETYPE" != xyes; then
47840
47841  # Print a helpful message on how to acquire the necessary build dependency.
47842  # freetype is the help tag: freetype, cups, pulse, alsa etc
47843  MISSING_DEPENDENCY=freetype
47844
47845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47846    cygwin_help $MISSING_DEPENDENCY
47847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47848    msys_help $MISSING_DEPENDENCY
47849  else
47850    PKGHANDLER_COMMAND=
47851
47852    case $PKGHANDLER in
47853      apt-get)
47854        apt_help     $MISSING_DEPENDENCY ;;
47855      yum)
47856        yum_help     $MISSING_DEPENDENCY ;;
47857      port)
47858        port_help    $MISSING_DEPENDENCY ;;
47859      pkgutil)
47860        pkgutil_help $MISSING_DEPENDENCY ;;
47861      pkgadd)
47862        pkgadd_help  $MISSING_DEPENDENCY ;;
47863    esac
47864
47865    if test "x$PKGHANDLER_COMMAND" != x; then
47866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47867    fi
47868  fi
47869
47870        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47871      fi
47872    fi # end user specified settings
47873
47874    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47875    if test "x$FREETYPE_CFLAGS" = x; then
47876
47877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47878
47879  # Input might be given as Windows format, start by converting to
47880  # unix format.
47881  path="$FREETYPE_INCLUDE_PATH"
47882  new_path=`$CYGPATH -u "$path"`
47883
47884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47887  # "foo.exe" is OK but "foo" is an error.
47888  #
47889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47890  # It is also a way to make sure we got the proper file name for the real test later on.
47891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47892  if test "x$test_shortpath" = x; then
47893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47894$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47895    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47896  fi
47897
47898  # Call helper function which possibly converts this using DOS-style short mode.
47899  # If so, the updated path is stored in $new_path.
47900
47901  input_path="$new_path"
47902  # Check if we need to convert this using DOS-style short mode. If the path
47903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47904  # take no chances and rewrite it.
47905  # Note: m4 eats our [], so we need to use [ and ] instead.
47906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47907  if test "x$has_forbidden_chars" != x; then
47908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47912      # Going to short mode and back again did indeed matter. Since short mode is
47913      # case insensitive, let's make it lowercase to improve readability.
47914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47915      # Now convert it back to Unix-stile (cygpath)
47916      input_path=`$CYGPATH -u "$shortmode_path"`
47917      new_path="$input_path"
47918    fi
47919  fi
47920
47921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47922  if test "x$test_cygdrive_prefix" = x; then
47923    # As a simple fix, exclude /usr/bin since it's not a real path.
47924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47926      # a path prefixed by /cygdrive for fixpath to work.
47927      new_path="$CYGWIN_ROOT_PATH$input_path"
47928    fi
47929  fi
47930
47931
47932  if test "x$path" != "x$new_path"; then
47933    FREETYPE_INCLUDE_PATH="$new_path"
47934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47935$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47936  fi
47937
47938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47939
47940  path="$FREETYPE_INCLUDE_PATH"
47941  has_colon=`$ECHO $path | $GREP ^.:`
47942  new_path="$path"
47943  if test "x$has_colon" = x; then
47944    # Not in mixed or Windows style, start by that.
47945    new_path=`cmd //c echo $path`
47946  fi
47947
47948
47949  input_path="$new_path"
47950  # Check if we need to convert this using DOS-style short mode. If the path
47951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47952  # take no chances and rewrite it.
47953  # Note: m4 eats our [], so we need to use [ and ] instead.
47954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47955  if test "x$has_forbidden_chars" != x; then
47956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47958  fi
47959
47960
47961  windows_path="$new_path"
47962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47963    unix_path=`$CYGPATH -u "$windows_path"`
47964    new_path="$unix_path"
47965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47967    new_path="$unix_path"
47968  fi
47969
47970  if test "x$path" != "x$new_path"; then
47971    FREETYPE_INCLUDE_PATH="$new_path"
47972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47973$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47974  fi
47975
47976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47978
47979  else
47980    # We're on a posix platform. Hooray! :)
47981    path="$FREETYPE_INCLUDE_PATH"
47982    has_space=`$ECHO "$path" | $GREP " "`
47983    if test "x$has_space" != x; then
47984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47985$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47986      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47987    fi
47988
47989    # Use eval to expand a potential ~
47990    eval path="$path"
47991    if test ! -f "$path" && test ! -d "$path"; then
47992      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47993    fi
47994
47995    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47996  fi
47997
47998      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47999        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48000      else
48001        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48002      fi
48003    fi
48004
48005    if test "x$FREETYPE_LIBS" = x; then
48006
48007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48008
48009  # Input might be given as Windows format, start by converting to
48010  # unix format.
48011  path="$FREETYPE_LIB_PATH"
48012  new_path=`$CYGPATH -u "$path"`
48013
48014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48017  # "foo.exe" is OK but "foo" is an error.
48018  #
48019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48020  # It is also a way to make sure we got the proper file name for the real test later on.
48021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48022  if test "x$test_shortpath" = x; then
48023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48024$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48025    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48026  fi
48027
48028  # Call helper function which possibly converts this using DOS-style short mode.
48029  # If so, the updated path is stored in $new_path.
48030
48031  input_path="$new_path"
48032  # Check if we need to convert this using DOS-style short mode. If the path
48033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48034  # take no chances and rewrite it.
48035  # Note: m4 eats our [], so we need to use [ and ] instead.
48036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48037  if test "x$has_forbidden_chars" != x; then
48038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48042      # Going to short mode and back again did indeed matter. Since short mode is
48043      # case insensitive, let's make it lowercase to improve readability.
48044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48045      # Now convert it back to Unix-stile (cygpath)
48046      input_path=`$CYGPATH -u "$shortmode_path"`
48047      new_path="$input_path"
48048    fi
48049  fi
48050
48051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48052  if test "x$test_cygdrive_prefix" = x; then
48053    # As a simple fix, exclude /usr/bin since it's not a real path.
48054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48056      # a path prefixed by /cygdrive for fixpath to work.
48057      new_path="$CYGWIN_ROOT_PATH$input_path"
48058    fi
48059  fi
48060
48061
48062  if test "x$path" != "x$new_path"; then
48063    FREETYPE_LIB_PATH="$new_path"
48064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48065$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48066  fi
48067
48068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48069
48070  path="$FREETYPE_LIB_PATH"
48071  has_colon=`$ECHO $path | $GREP ^.:`
48072  new_path="$path"
48073  if test "x$has_colon" = x; then
48074    # Not in mixed or Windows style, start by that.
48075    new_path=`cmd //c echo $path`
48076  fi
48077
48078
48079  input_path="$new_path"
48080  # Check if we need to convert this using DOS-style short mode. If the path
48081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48082  # take no chances and rewrite it.
48083  # Note: m4 eats our [], so we need to use [ and ] instead.
48084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48085  if test "x$has_forbidden_chars" != x; then
48086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48088  fi
48089
48090
48091  windows_path="$new_path"
48092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48093    unix_path=`$CYGPATH -u "$windows_path"`
48094    new_path="$unix_path"
48095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48097    new_path="$unix_path"
48098  fi
48099
48100  if test "x$path" != "x$new_path"; then
48101    FREETYPE_LIB_PATH="$new_path"
48102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48103$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48104  fi
48105
48106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48108
48109  else
48110    # We're on a posix platform. Hooray! :)
48111    path="$FREETYPE_LIB_PATH"
48112    has_space=`$ECHO "$path" | $GREP " "`
48113    if test "x$has_space" != x; then
48114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48115$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48116      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48117    fi
48118
48119    # Use eval to expand a potential ~
48120    eval path="$path"
48121    if test ! -f "$path" && test ! -d "$path"; then
48122      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48123    fi
48124
48125    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48126  fi
48127
48128      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48129        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
48130      else
48131        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
48132      fi
48133    fi
48134
48135    # Try to compile it
48136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48137$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48138    ac_ext=cpp
48139ac_cpp='$CXXCPP $CPPFLAGS'
48140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48143
48144    PREV_CXXCFLAGS="$CXXFLAGS"
48145    PREV_LIBS="$LIBS"
48146    PREV_CXX="$CXX"
48147    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48148    LIBS="$LIBS $FREETYPE_LIBS"
48149    CXX="$FIXPATH $CXX"
48150    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48151/* end confdefs.h.  */
48152
48153          #include<ft2build.h>
48154          #include FT_FREETYPE_H
48155          int main () {
48156            FT_Init_FreeType(NULL);
48157            return 0;
48158          }
48159
48160_ACEOF
48161if ac_fn_cxx_try_link "$LINENO"; then :
48162
48163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48164$as_echo "yes" >&6; }
48165
48166else
48167
48168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48169$as_echo "no" >&6; }
48170          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48171$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48172          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48173$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48174
48175
48176  # Print a helpful message on how to acquire the necessary build dependency.
48177  # freetype is the help tag: freetype, cups, pulse, alsa etc
48178  MISSING_DEPENDENCY=freetype
48179
48180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48181    cygwin_help $MISSING_DEPENDENCY
48182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48183    msys_help $MISSING_DEPENDENCY
48184  else
48185    PKGHANDLER_COMMAND=
48186
48187    case $PKGHANDLER in
48188      apt-get)
48189        apt_help     $MISSING_DEPENDENCY ;;
48190      yum)
48191        yum_help     $MISSING_DEPENDENCY ;;
48192      port)
48193        port_help    $MISSING_DEPENDENCY ;;
48194      pkgutil)
48195        pkgutil_help $MISSING_DEPENDENCY ;;
48196      pkgadd)
48197        pkgadd_help  $MISSING_DEPENDENCY ;;
48198    esac
48199
48200    if test "x$PKGHANDLER_COMMAND" != x; then
48201      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48202    fi
48203  fi
48204
48205
48206          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48207
48208
48209fi
48210rm -f core conftest.err conftest.$ac_objext \
48211    conftest$ac_exeext conftest.$ac_ext
48212    CXXCFLAGS="$PREV_CXXFLAGS"
48213    LIBS="$PREV_LIBS"
48214    CXX="$PREV_CXX"
48215    ac_ext=cpp
48216ac_cpp='$CXXCPP $CPPFLAGS'
48217ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48218ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48219ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48220
48221
48222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48223$as_echo_n "checking if we should bundle freetype... " >&6; }
48224    if test "x$BUNDLE_FREETYPE" = xyes; then
48225      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48226    fi
48227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48228$as_echo "$BUNDLE_FREETYPE" >&6; }
48229
48230  fi # end freetype needed
48231
48232
48233
48234
48235
48236
48237
48238  ###############################################################################
48239  #
48240  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48241  #
48242
48243# Check whether --with-alsa was given.
48244if test "${with_alsa+set}" = set; then :
48245  withval=$with_alsa;
48246fi
48247
48248
48249# Check whether --with-alsa-include was given.
48250if test "${with_alsa_include+set}" = set; then :
48251  withval=$with_alsa_include;
48252fi
48253
48254
48255# Check whether --with-alsa-lib was given.
48256if test "${with_alsa_lib+set}" = set; then :
48257  withval=$with_alsa_lib;
48258fi
48259
48260
48261  if test "x$ALSA_NOT_NEEDED" = xyes; then
48262    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48263      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48264$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48265    fi
48266    ALSA_CFLAGS=
48267    ALSA_LIBS=
48268  else
48269    ALSA_FOUND=no
48270
48271    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48272      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48273    fi
48274
48275    if test "x${with_alsa}" != x; then
48276      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48277      ALSA_CFLAGS="-I${with_alsa}/include"
48278      ALSA_FOUND=yes
48279    fi
48280    if test "x${with_alsa_include}" != x; then
48281      ALSA_CFLAGS="-I${with_alsa_include}"
48282      ALSA_FOUND=yes
48283    fi
48284    if test "x${with_alsa_lib}" != x; then
48285      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48286      ALSA_FOUND=yes
48287    fi
48288    if test "x$ALSA_FOUND" = xno; then
48289
48290
48291  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48292    # Source the builddeps file again, to make sure it uses the latest variables!
48293    . $builddepsfile
48294    # Look for a target and build machine specific resource!
48295    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48296    if test "x$resource" = x; then
48297      # Ok, lets instead look for a target specific resource
48298      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48299    fi
48300    if test "x$resource" = x; then
48301      # Ok, lets instead look for a build specific resource
48302      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48303    fi
48304    if test "x$resource" = x; then
48305      # Ok, lets instead look for a generic resource
48306      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48307      resource=${builddep_alsa}
48308    fi
48309    if test "x$resource" != x; then
48310      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48311$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48312      # If the resource in the builddeps.conf file is an existing directory,
48313      # for example /java/linux/cups
48314      if test -d ${resource}; then
48315        depdir=${resource}
48316      else
48317
48318  # alsa is for example mymodule
48319  # $resource is for example libs/general/libmymod_1_2_3.zip
48320  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48321  # $with_builddeps_dir is for example /localhome/builddeps
48322  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48323  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48324  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48325  filename=`basename $resource`
48326  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48327  filebase=${filename%%.*}
48328  extension=${filename#*.}
48329  installdir=$with_builddeps_dir/$filebase
48330  if test ! -f $installdir/$filename.unpacked; then
48331    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48332$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48333    if test ! -d $installdir; then
48334      mkdir -p $installdir
48335    fi
48336    if test ! -d $installdir; then
48337      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48338    fi
48339    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48340    touch $tmpfile
48341    if test ! -f $tmpfile; then
48342      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48343    fi
48344
48345  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48346  # $tmpfile is the local file name for the downloaded file.
48347  VALID_TOOL=no
48348  if test "x$BDEPS_FTP" = xwget; then
48349    VALID_TOOL=yes
48350    wget -O $tmpfile $with_builddeps_server/$resource
48351  fi
48352  if test "x$BDEPS_FTP" = xlftp; then
48353    VALID_TOOL=yes
48354    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48355  fi
48356  if test "x$BDEPS_FTP" = xftp; then
48357    VALID_TOOL=yes
48358    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48359    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48360    FTPUSERPWD=${FTPSERVER%%@*}
48361    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48362      FTPUSER=${userpwd%%:*}
48363      FTPPWD=${userpwd#*@}
48364      FTPSERVER=${FTPSERVER#*@}
48365    else
48366      FTPUSER=ftp
48367      FTPPWD=ftp
48368    fi
48369    # the "pass" command does not work on some
48370    # ftp clients (read ftp.exe) but if it works,
48371    # passive mode is better!
48372    ( \
48373        echo "user $FTPUSER $FTPPWD"        ; \
48374        echo "pass"                         ; \
48375        echo "bin"                          ; \
48376        echo "get $FTPPATH $tmpfile"              ; \
48377    ) | ftp -in $FTPSERVER
48378  fi
48379  if test "x$VALID_TOOL" != xyes; then
48380    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48381  fi
48382
48383    mv $tmpfile $installdir/$filename
48384    if test ! -s $installdir/$filename; then
48385      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48386    fi
48387    case "$extension" in
48388      zip)  echo "Unzipping $installdir/$filename..."
48389        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48390        ;;
48391      tar.gz) echo "Untaring $installdir/$filename..."
48392        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48393        ;;
48394      tgz) echo "Untaring $installdir/$filename..."
48395        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48396        ;;
48397      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48398        ;;
48399    esac
48400  fi
48401  if test -f $installdir/$filename.unpacked; then
48402    depdir=$installdir
48403  fi
48404
48405      fi
48406      # Source the builddeps file again, because in the previous command, the depdir
48407      # was updated to point at the current build dependency install directory.
48408      . $builddepsfile
48409      # Now extract variables from the builddeps.conf files.
48410      theroot=${builddep_alsa_ROOT}
48411      thecflags=${builddep_alsa_CFLAGS}
48412      thelibs=${builddep_alsa_LIBS}
48413      if test "x$depdir" = x; then
48414        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48415      fi
48416      ALSA=$depdir
48417      if test "x$theroot" != x; then
48418        ALSA="$theroot"
48419      fi
48420      if test "x$thecflags" != x; then
48421        ALSA_CFLAGS="$thecflags"
48422      fi
48423      if test "x$thelibs" != x; then
48424        ALSA_LIBS="$thelibs"
48425      fi
48426      ALSA_FOUND=yes
48427      else ALSA_FOUND=no
48428
48429    fi
48430    else ALSA_FOUND=no
48431
48432  fi
48433
48434    fi
48435    # Do not try pkg-config if we have a sysroot set.
48436    if test "x$SYSROOT" = x; then
48437      if test "x$ALSA_FOUND" = xno; then
48438
48439pkg_failed=no
48440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48441$as_echo_n "checking for ALSA... " >&6; }
48442
48443if test -n "$ALSA_CFLAGS"; then
48444    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48445 elif test -n "$PKG_CONFIG"; then
48446    if test -n "$PKG_CONFIG" && \
48447    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48448  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48449  ac_status=$?
48450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48451  test $ac_status = 0; }; then
48452  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48453else
48454  pkg_failed=yes
48455fi
48456 else
48457    pkg_failed=untried
48458fi
48459if test -n "$ALSA_LIBS"; then
48460    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48461 elif test -n "$PKG_CONFIG"; then
48462    if test -n "$PKG_CONFIG" && \
48463    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48464  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48465  ac_status=$?
48466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48467  test $ac_status = 0; }; then
48468  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48469else
48470  pkg_failed=yes
48471fi
48472 else
48473    pkg_failed=untried
48474fi
48475
48476
48477
48478if test $pkg_failed = yes; then
48479
48480if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48481        _pkg_short_errors_supported=yes
48482else
48483        _pkg_short_errors_supported=no
48484fi
48485        if test $_pkg_short_errors_supported = yes; then
48486	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48487        else
48488	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48489        fi
48490	# Put the nasty error message in config.log where it belongs
48491	echo "$ALSA_PKG_ERRORS" >&5
48492
48493	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48494$as_echo "no" >&6; }
48495                ALSA_FOUND=no
48496elif test $pkg_failed = untried; then
48497	ALSA_FOUND=no
48498else
48499	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48500	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48502$as_echo "yes" >&6; }
48503	ALSA_FOUND=yes
48504fi
48505      fi
48506    fi
48507    if test "x$ALSA_FOUND" = xno; then
48508      for ac_header in alsa/asoundlib.h
48509do :
48510  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48511if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48512  cat >>confdefs.h <<_ACEOF
48513#define HAVE_ALSA_ASOUNDLIB_H 1
48514_ACEOF
48515
48516            ALSA_FOUND=yes
48517            ALSA_CFLAGS=-Iignoreme
48518            ALSA_LIBS=-lasound
48519            DEFAULT_ALSA=yes
48520
48521else
48522  ALSA_FOUND=no
48523fi
48524
48525done
48526
48527    fi
48528    if test "x$ALSA_FOUND" = xno; then
48529
48530  # Print a helpful message on how to acquire the necessary build dependency.
48531  # alsa is the help tag: freetype, cups, pulse, alsa etc
48532  MISSING_DEPENDENCY=alsa
48533
48534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48535    cygwin_help $MISSING_DEPENDENCY
48536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48537    msys_help $MISSING_DEPENDENCY
48538  else
48539    PKGHANDLER_COMMAND=
48540
48541    case $PKGHANDLER in
48542      apt-get)
48543        apt_help     $MISSING_DEPENDENCY ;;
48544      yum)
48545        yum_help     $MISSING_DEPENDENCY ;;
48546      port)
48547        port_help    $MISSING_DEPENDENCY ;;
48548      pkgutil)
48549        pkgutil_help $MISSING_DEPENDENCY ;;
48550      pkgadd)
48551        pkgadd_help  $MISSING_DEPENDENCY ;;
48552    esac
48553
48554    if test "x$PKGHANDLER_COMMAND" != x; then
48555      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48556    fi
48557  fi
48558
48559      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48560    fi
48561  fi
48562
48563
48564
48565
48566
48567
48568  ###############################################################################
48569  #
48570  # Check for the jpeg library
48571  #
48572
48573
48574# Check whether --with-libjpeg was given.
48575if test "${with_libjpeg+set}" = set; then :
48576  withval=$with_libjpeg;
48577fi
48578
48579
48580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48581$as_echo_n "checking for which libjpeg to use... " >&6; }
48582
48583  # default is bundled
48584  DEFAULT_LIBJPEG=bundled
48585
48586  #
48587  # if user didn't specify, use DEFAULT_LIBJPEG
48588  #
48589  if test "x${with_libjpeg}" = "x"; then
48590    with_libjpeg=${DEFAULT_LIBJPEG}
48591  fi
48592
48593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48594$as_echo "${with_libjpeg}" >&6; }
48595
48596  if test "x${with_libjpeg}" = "xbundled"; then
48597    USE_EXTERNAL_LIBJPEG=false
48598  elif test "x${with_libjpeg}" = "xsystem"; then
48599    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48600if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48601
48602else
48603   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48604fi
48605
48606
48607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48608$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48609if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48610  $as_echo_n "(cached) " >&6
48611else
48612  ac_check_lib_save_LIBS=$LIBS
48613LIBS="-ljpeg  $LIBS"
48614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48615/* end confdefs.h.  */
48616
48617/* Override any GCC internal prototype to avoid an error.
48618   Use char because int might match the return type of a GCC
48619   builtin and then its argument prototype would still apply.  */
48620#ifdef __cplusplus
48621extern "C"
48622#endif
48623char jpeg_CreateDecompress ();
48624int
48625main ()
48626{
48627return jpeg_CreateDecompress ();
48628  ;
48629  return 0;
48630}
48631_ACEOF
48632if ac_fn_cxx_try_link "$LINENO"; then :
48633  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48634else
48635  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48636fi
48637rm -f core conftest.err conftest.$ac_objext \
48638    conftest$ac_exeext conftest.$ac_ext
48639LIBS=$ac_check_lib_save_LIBS
48640fi
48641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48642$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48643if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48644  cat >>confdefs.h <<_ACEOF
48645#define HAVE_LIBJPEG 1
48646_ACEOF
48647
48648  LIBS="-ljpeg $LIBS"
48649
48650else
48651   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48652fi
48653
48654
48655    USE_EXTERNAL_LIBJPEG=true
48656  else
48657    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48658  fi
48659
48660
48661
48662  ###############################################################################
48663  #
48664  # Check for the gif library
48665  #
48666
48667
48668# Check whether --with-giflib was given.
48669if test "${with_giflib+set}" = set; then :
48670  withval=$with_giflib;
48671fi
48672
48673
48674
48675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48676$as_echo_n "checking for which giflib to use... " >&6; }
48677
48678  # default is bundled
48679  DEFAULT_GIFLIB=bundled
48680
48681  #
48682  # if user didn't specify, use DEFAULT_GIFLIB
48683  #
48684  if test "x${with_giflib}" = "x"; then
48685    with_giflib=${DEFAULT_GIFLIB}
48686  fi
48687
48688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48689$as_echo "${with_giflib}" >&6; }
48690
48691  if test "x${with_giflib}" = "xbundled"; then
48692    USE_EXTERNAL_LIBGIF=false
48693  elif test "x${with_giflib}" = "xsystem"; then
48694    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48695if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48696
48697else
48698   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48699fi
48700
48701
48702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48703$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48704if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48705  $as_echo_n "(cached) " >&6
48706else
48707  ac_check_lib_save_LIBS=$LIBS
48708LIBS="-lgif  $LIBS"
48709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48710/* end confdefs.h.  */
48711
48712/* Override any GCC internal prototype to avoid an error.
48713   Use char because int might match the return type of a GCC
48714   builtin and then its argument prototype would still apply.  */
48715#ifdef __cplusplus
48716extern "C"
48717#endif
48718char DGifGetCode ();
48719int
48720main ()
48721{
48722return DGifGetCode ();
48723  ;
48724  return 0;
48725}
48726_ACEOF
48727if ac_fn_cxx_try_link "$LINENO"; then :
48728  ac_cv_lib_gif_DGifGetCode=yes
48729else
48730  ac_cv_lib_gif_DGifGetCode=no
48731fi
48732rm -f core conftest.err conftest.$ac_objext \
48733    conftest$ac_exeext conftest.$ac_ext
48734LIBS=$ac_check_lib_save_LIBS
48735fi
48736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48737$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48738if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48739  cat >>confdefs.h <<_ACEOF
48740#define HAVE_LIBGIF 1
48741_ACEOF
48742
48743  LIBS="-lgif $LIBS"
48744
48745else
48746   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48747fi
48748
48749
48750    USE_EXTERNAL_LIBGIF=true
48751  else
48752    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48753  fi
48754
48755
48756  ###############################################################################
48757  #
48758  # Check for the lcms2 library
48759  #
48760
48761
48762# Check whether --with-lcms was given.
48763if test "${with_lcms+set}" = set; then :
48764  withval=$with_lcms;
48765fi
48766
48767
48768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48769$as_echo_n "checking for which lcms to use... " >&6; }
48770
48771  DEFAULT_LCMS=bundled
48772
48773  #
48774  # If user didn't specify, use DEFAULT_LCMS
48775  #
48776  if test "x${with_lcms}" = "x"; then
48777      with_lcms=${DEFAULT_LCMS}
48778  fi
48779
48780  if test "x${with_lcms}" = "xbundled"; then
48781    USE_EXTERNAL_LCMS=false
48782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48783$as_echo "bundled" >&6; }
48784  elif test "x${with_lcms}" = "xsystem"; then
48785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48786$as_echo "system" >&6; }
48787
48788pkg_failed=no
48789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48790$as_echo_n "checking for LCMS... " >&6; }
48791
48792if test -n "$LCMS_CFLAGS"; then
48793    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48794 elif test -n "$PKG_CONFIG"; then
48795    if test -n "$PKG_CONFIG" && \
48796    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48797  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48798  ac_status=$?
48799  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48800  test $ac_status = 0; }; then
48801  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48802else
48803  pkg_failed=yes
48804fi
48805 else
48806    pkg_failed=untried
48807fi
48808if test -n "$LCMS_LIBS"; then
48809    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48810 elif test -n "$PKG_CONFIG"; then
48811    if test -n "$PKG_CONFIG" && \
48812    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48813  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48814  ac_status=$?
48815  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48816  test $ac_status = 0; }; then
48817  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48818else
48819  pkg_failed=yes
48820fi
48821 else
48822    pkg_failed=untried
48823fi
48824
48825
48826
48827if test $pkg_failed = yes; then
48828
48829if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48830        _pkg_short_errors_supported=yes
48831else
48832        _pkg_short_errors_supported=no
48833fi
48834        if test $_pkg_short_errors_supported = yes; then
48835	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48836        else
48837	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48838        fi
48839	# Put the nasty error message in config.log where it belongs
48840	echo "$LCMS_PKG_ERRORS" >&5
48841
48842	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48843$as_echo "no" >&6; }
48844                LCMS_FOUND=no
48845elif test $pkg_failed = untried; then
48846	LCMS_FOUND=no
48847else
48848	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48849	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48851$as_echo "yes" >&6; }
48852	LCMS_FOUND=yes
48853fi
48854    if test "x${LCMS_FOUND}" = "xyes"; then
48855      USE_EXTERNAL_LCMS=true
48856    else
48857      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48858    fi
48859  else
48860    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48861  fi
48862
48863
48864
48865  ###############################################################################
48866  #
48867  # Check for the png library
48868  #
48869
48870
48871# Check whether --with-libpng was given.
48872if test "${with_libpng+set}" = set; then :
48873  withval=$with_libpng;
48874fi
48875
48876
48877
48878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48879$as_echo_n "checking for which libpng to use... " >&6; }
48880
48881  # default is bundled
48882  DEFAULT_LIBPNG=bundled
48883
48884  #
48885  # if user didn't specify, use DEFAULT_LIBPNG
48886  #
48887  if test "x${with_libpng}" = "x"; then
48888      with_libpng=${DEFAULT_LIBPNG}
48889  fi
48890
48891  if test "x${with_libpng}" = "xbundled"; then
48892      USE_EXTERNAL_LIBPNG=false
48893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48894$as_echo "bundled" >&6; }
48895  elif test "x${with_libpng}" = "xsystem"; then
48896
48897pkg_failed=no
48898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48899$as_echo_n "checking for PNG... " >&6; }
48900
48901if test -n "$PNG_CFLAGS"; then
48902    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48903 elif test -n "$PKG_CONFIG"; then
48904    if test -n "$PKG_CONFIG" && \
48905    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48906  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48907  ac_status=$?
48908  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48909  test $ac_status = 0; }; then
48910  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48911else
48912  pkg_failed=yes
48913fi
48914 else
48915    pkg_failed=untried
48916fi
48917if test -n "$PNG_LIBS"; then
48918    pkg_cv_PNG_LIBS="$PNG_LIBS"
48919 elif test -n "$PKG_CONFIG"; then
48920    if test -n "$PKG_CONFIG" && \
48921    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48922  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48923  ac_status=$?
48924  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48925  test $ac_status = 0; }; then
48926  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48927else
48928  pkg_failed=yes
48929fi
48930 else
48931    pkg_failed=untried
48932fi
48933
48934
48935
48936if test $pkg_failed = yes; then
48937
48938if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48939        _pkg_short_errors_supported=yes
48940else
48941        _pkg_short_errors_supported=no
48942fi
48943        if test $_pkg_short_errors_supported = yes; then
48944	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48945        else
48946	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48947        fi
48948	# Put the nasty error message in config.log where it belongs
48949	echo "$PNG_PKG_ERRORS" >&5
48950
48951	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48952$as_echo "no" >&6; }
48953                 LIBPNG_FOUND=no
48954elif test $pkg_failed = untried; then
48955	 LIBPNG_FOUND=no
48956else
48957	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48958	PNG_LIBS=$pkg_cv_PNG_LIBS
48959        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48960$as_echo "yes" >&6; }
48961	 LIBPNG_FOUND=yes
48962fi
48963      if test "x${LIBPNG_FOUND}" = "xyes"; then
48964          USE_EXTERNAL_LIBPNG=true
48965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48966$as_echo "system" >&6; }
48967      else
48968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48969$as_echo "system not found" >&6; }
48970          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48971      fi
48972  else
48973      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48974  fi
48975
48976
48977  ###############################################################################
48978  #
48979  # Check for the zlib library
48980  #
48981
48982
48983# Check whether --with-zlib was given.
48984if test "${with_zlib+set}" = set; then :
48985  withval=$with_zlib;
48986fi
48987
48988
48989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48990$as_echo_n "checking for compress in -lz... " >&6; }
48991if ${ac_cv_lib_z_compress+:} false; then :
48992  $as_echo_n "(cached) " >&6
48993else
48994  ac_check_lib_save_LIBS=$LIBS
48995LIBS="-lz  $LIBS"
48996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48997/* end confdefs.h.  */
48998
48999/* Override any GCC internal prototype to avoid an error.
49000   Use char because int might match the return type of a GCC
49001   builtin and then its argument prototype would still apply.  */
49002#ifdef __cplusplus
49003extern "C"
49004#endif
49005char compress ();
49006int
49007main ()
49008{
49009return compress ();
49010  ;
49011  return 0;
49012}
49013_ACEOF
49014if ac_fn_cxx_try_link "$LINENO"; then :
49015  ac_cv_lib_z_compress=yes
49016else
49017  ac_cv_lib_z_compress=no
49018fi
49019rm -f core conftest.err conftest.$ac_objext \
49020    conftest$ac_exeext conftest.$ac_ext
49021LIBS=$ac_check_lib_save_LIBS
49022fi
49023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49024$as_echo "$ac_cv_lib_z_compress" >&6; }
49025if test "x$ac_cv_lib_z_compress" = xyes; then :
49026   ZLIB_FOUND=yes
49027else
49028   ZLIB_FOUND=no
49029fi
49030
49031
49032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49033$as_echo_n "checking for which zlib to use... " >&6; }
49034
49035  DEFAULT_ZLIB=bundled
49036  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49037    #
49038    # On macosx default is system...on others default is
49039    #
49040    DEFAULT_ZLIB=system
49041  fi
49042
49043  if test "x${ZLIB_FOUND}" != "xyes"; then
49044    #
49045    # If we don't find any system...set default to bundled
49046    #
49047    DEFAULT_ZLIB=bundled
49048  fi
49049
49050  #
49051  # If user didn't specify, use DEFAULT_ZLIB
49052  #
49053  if test "x${with_zlib}" = "x"; then
49054    with_zlib=${DEFAULT_ZLIB}
49055  fi
49056
49057  if test "x${with_zlib}" = "xbundled"; then
49058    USE_EXTERNAL_LIBZ=false
49059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49060$as_echo "bundled" >&6; }
49061  elif test "x${with_zlib}" = "xsystem"; then
49062    if test "x${ZLIB_FOUND}" = "xyes"; then
49063      USE_EXTERNAL_LIBZ=true
49064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49065$as_echo "system" >&6; }
49066    else
49067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49068$as_echo "system not found" >&6; }
49069      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49070    fi
49071  else
49072    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49073  fi
49074
49075
49076
49077  ###############################################################################
49078  LIBZIP_CAN_USE_MMAP=true
49079
49080
49081
49082  ###############################################################################
49083  #
49084  # Check if altzone exists in time.h
49085  #
49086
49087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49088/* end confdefs.h.  */
49089#include <time.h>
49090int
49091main ()
49092{
49093return (int)altzone;
49094  ;
49095  return 0;
49096}
49097_ACEOF
49098if ac_fn_cxx_try_link "$LINENO"; then :
49099  has_altzone=yes
49100else
49101  has_altzone=no
49102fi
49103rm -f core conftest.err conftest.$ac_objext \
49104    conftest$ac_exeext conftest.$ac_ext
49105  if test "x$has_altzone" = xyes; then
49106
49107$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49108
49109  fi
49110
49111  ###############################################################################
49112  #
49113  # Check the maths library
49114  #
49115
49116  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49117$as_echo_n "checking for cos in -lm... " >&6; }
49118if ${ac_cv_lib_m_cos+:} false; then :
49119  $as_echo_n "(cached) " >&6
49120else
49121  ac_check_lib_save_LIBS=$LIBS
49122LIBS="-lm  $LIBS"
49123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49124/* end confdefs.h.  */
49125
49126/* Override any GCC internal prototype to avoid an error.
49127   Use char because int might match the return type of a GCC
49128   builtin and then its argument prototype would still apply.  */
49129#ifdef __cplusplus
49130extern "C"
49131#endif
49132char cos ();
49133int
49134main ()
49135{
49136return cos ();
49137  ;
49138  return 0;
49139}
49140_ACEOF
49141if ac_fn_cxx_try_link "$LINENO"; then :
49142  ac_cv_lib_m_cos=yes
49143else
49144  ac_cv_lib_m_cos=no
49145fi
49146rm -f core conftest.err conftest.$ac_objext \
49147    conftest$ac_exeext conftest.$ac_ext
49148LIBS=$ac_check_lib_save_LIBS
49149fi
49150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49151$as_echo "$ac_cv_lib_m_cos" >&6; }
49152if test "x$ac_cv_lib_m_cos" = xyes; then :
49153  cat >>confdefs.h <<_ACEOF
49154#define HAVE_LIBM 1
49155_ACEOF
49156
49157  LIBS="-lm $LIBS"
49158
49159else
49160
49161        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49162$as_echo "$as_me: Maths library was not found" >&6;}
49163
49164
49165fi
49166
49167
49168
49169  ###############################################################################
49170  #
49171  # Check for libdl.so
49172
49173  save_LIBS="$LIBS"
49174  LIBS=""
49175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49176$as_echo_n "checking for dlopen in -ldl... " >&6; }
49177if ${ac_cv_lib_dl_dlopen+:} false; then :
49178  $as_echo_n "(cached) " >&6
49179else
49180  ac_check_lib_save_LIBS=$LIBS
49181LIBS="-ldl  $LIBS"
49182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49183/* end confdefs.h.  */
49184
49185/* Override any GCC internal prototype to avoid an error.
49186   Use char because int might match the return type of a GCC
49187   builtin and then its argument prototype would still apply.  */
49188#ifdef __cplusplus
49189extern "C"
49190#endif
49191char dlopen ();
49192int
49193main ()
49194{
49195return dlopen ();
49196  ;
49197  return 0;
49198}
49199_ACEOF
49200if ac_fn_cxx_try_link "$LINENO"; then :
49201  ac_cv_lib_dl_dlopen=yes
49202else
49203  ac_cv_lib_dl_dlopen=no
49204fi
49205rm -f core conftest.err conftest.$ac_objext \
49206    conftest$ac_exeext conftest.$ac_ext
49207LIBS=$ac_check_lib_save_LIBS
49208fi
49209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49210$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49211if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49212  cat >>confdefs.h <<_ACEOF
49213#define HAVE_LIBDL 1
49214_ACEOF
49215
49216  LIBS="-ldl $LIBS"
49217
49218fi
49219
49220  LIBDL="$LIBS"
49221
49222  LIBS="$save_LIBS"
49223
49224
49225  ###############################################################################
49226  #
49227  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49228  # dynamic build is configured on command line.
49229  #
49230
49231# Check whether --with-stdc++lib was given.
49232if test "${with_stdc__lib+set}" = set; then :
49233  withval=$with_stdc__lib;
49234        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49235                && test "x$with_stdc__lib" != xdefault; then
49236          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49237        fi
49238
49239else
49240  with_stdc__lib=default
49241
49242fi
49243
49244
49245  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49246    # Test if -lstdc++ works.
49247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49248$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49249    ac_ext=cpp
49250ac_cpp='$CXXCPP $CPPFLAGS'
49251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49254
49255    OLD_CXXFLAGS="$CXXFLAGS"
49256    CXXFLAGS="$CXXFLAGS -lstdc++"
49257    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49258/* end confdefs.h.  */
49259
49260int
49261main ()
49262{
49263return 0;
49264  ;
49265  return 0;
49266}
49267_ACEOF
49268if ac_fn_cxx_try_link "$LINENO"; then :
49269  has_dynamic_libstdcxx=yes
49270else
49271  has_dynamic_libstdcxx=no
49272fi
49273rm -f core conftest.err conftest.$ac_objext \
49274    conftest$ac_exeext conftest.$ac_ext
49275    CXXFLAGS="$OLD_CXXFLAGS"
49276    ac_ext=cpp
49277ac_cpp='$CXXCPP $CPPFLAGS'
49278ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49279ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49280ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49281
49282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49283$as_echo "$has_dynamic_libstdcxx" >&6; }
49284
49285    # Test if stdc++ can be linked statically.
49286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49287$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49288    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49289    ac_ext=cpp
49290ac_cpp='$CXXCPP $CPPFLAGS'
49291ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49292ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49293ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49294
49295    OLD_LIBS="$LIBS"
49296    OLD_CXX="$CXX"
49297    LIBS="$STATIC_STDCXX_FLAGS"
49298    CXX="$CC"
49299    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49300/* end confdefs.h.  */
49301
49302int
49303main ()
49304{
49305return 0;
49306  ;
49307  return 0;
49308}
49309_ACEOF
49310if ac_fn_cxx_try_link "$LINENO"; then :
49311  has_static_libstdcxx=yes
49312else
49313  has_static_libstdcxx=no
49314fi
49315rm -f core conftest.err conftest.$ac_objext \
49316    conftest$ac_exeext conftest.$ac_ext
49317    LIBS="$OLD_LIBS"
49318    CXX="$OLD_CXX"
49319    ac_ext=cpp
49320ac_cpp='$CXXCPP $CPPFLAGS'
49321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49324
49325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49326$as_echo "$has_static_libstdcxx" >&6; }
49327
49328    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49329      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49330    fi
49331
49332    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49333      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49334    fi
49335
49336    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49337      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49338    fi
49339
49340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49341$as_echo_n "checking how to link with libstdc++... " >&6; }
49342    # If dynamic was requested, it's available since it would fail above otherwise.
49343    # If dynamic wasn't requested, go with static unless it isn't available.
49344    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49345      LIBCXX="$LIBCXX -lstdc++"
49346      LDCXX="$CXX"
49347      STATIC_CXX_SETTING="STATIC_CXX=false"
49348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49349$as_echo "dynamic" >&6; }
49350    else
49351      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49352      LDCXX="$CC"
49353      STATIC_CXX_SETTING="STATIC_CXX=true"
49354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49355$as_echo "static" >&6; }
49356    fi
49357  fi
49358
49359
49360  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49361    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49362
49363pkg_failed=no
49364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49365$as_echo_n "checking for LIBFFI... " >&6; }
49366
49367if test -n "$LIBFFI_CFLAGS"; then
49368    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49369 elif test -n "$PKG_CONFIG"; then
49370    if test -n "$PKG_CONFIG" && \
49371    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49372  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49373  ac_status=$?
49374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49375  test $ac_status = 0; }; then
49376  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49377else
49378  pkg_failed=yes
49379fi
49380 else
49381    pkg_failed=untried
49382fi
49383if test -n "$LIBFFI_LIBS"; then
49384    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49385 elif test -n "$PKG_CONFIG"; then
49386    if test -n "$PKG_CONFIG" && \
49387    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49388  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49389  ac_status=$?
49390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49391  test $ac_status = 0; }; then
49392  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49393else
49394  pkg_failed=yes
49395fi
49396 else
49397    pkg_failed=untried
49398fi
49399
49400
49401
49402if test $pkg_failed = yes; then
49403
49404if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49405        _pkg_short_errors_supported=yes
49406else
49407        _pkg_short_errors_supported=no
49408fi
49409        if test $_pkg_short_errors_supported = yes; then
49410	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49411        else
49412	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49413        fi
49414	# Put the nasty error message in config.log where it belongs
49415	echo "$LIBFFI_PKG_ERRORS" >&5
49416
49417	as_fn_error $? "Package requirements (libffi) were not met:
49418
49419$LIBFFI_PKG_ERRORS
49420
49421Consider adjusting the PKG_CONFIG_PATH environment variable if you
49422installed software in a non-standard prefix.
49423
49424Alternatively, you may set the environment variables LIBFFI_CFLAGS
49425and LIBFFI_LIBS to avoid the need to call pkg-config.
49426See the pkg-config man page for more details.
49427" "$LINENO" 5
49428elif test $pkg_failed = untried; then
49429	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49431as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49432is in your PATH or set the PKG_CONFIG environment variable to the full
49433path to pkg-config.
49434
49435Alternatively, you may set the environment variables LIBFFI_CFLAGS
49436and LIBFFI_LIBS to avoid the need to call pkg-config.
49437See the pkg-config man page for more details.
49438
49439To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49440See \`config.log' for more details" "$LINENO" 5; }
49441else
49442	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49443	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49445$as_echo "yes" >&6; }
49446	:
49447fi
49448
49449  fi
49450
49451  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49452    # Extract the first word of "llvm-config", so it can be a program name with args.
49453set dummy llvm-config; ac_word=$2
49454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49455$as_echo_n "checking for $ac_word... " >&6; }
49456if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49457  $as_echo_n "(cached) " >&6
49458else
49459  if test -n "$LLVM_CONFIG"; then
49460  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49461else
49462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49463for as_dir in $PATH
49464do
49465  IFS=$as_save_IFS
49466  test -z "$as_dir" && as_dir=.
49467    for ac_exec_ext in '' $ac_executable_extensions; do
49468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49469    ac_cv_prog_LLVM_CONFIG="llvm-config"
49470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49471    break 2
49472  fi
49473done
49474  done
49475IFS=$as_save_IFS
49476
49477fi
49478fi
49479LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49480if test -n "$LLVM_CONFIG"; then
49481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49482$as_echo "$LLVM_CONFIG" >&6; }
49483else
49484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49485$as_echo "no" >&6; }
49486fi
49487
49488
49489
49490    if test "x$LLVM_CONFIG" != xllvm-config; then
49491      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49492    fi
49493
49494    llvm_components="jit mcjit engine nativecodegen native"
49495    unset LLVM_CFLAGS
49496    for flag in $("$LLVM_CONFIG" --cxxflags); do
49497      if echo "${flag}" | grep -q '^-[ID]'; then
49498        if test "${flag}" != "-D_DEBUG" ; then
49499          if test "${LLVM_CFLAGS}" != "" ; then
49500            LLVM_CFLAGS="${LLVM_CFLAGS} "
49501          fi
49502          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49503        fi
49504      fi
49505    done
49506    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49507    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49508
49509    unset LLVM_LDFLAGS
49510    for flag in $("${LLVM_CONFIG}" --ldflags); do
49511      if echo "${flag}" | grep -q '^-L'; then
49512        if test "${LLVM_LDFLAGS}" != ""; then
49513          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49514        fi
49515        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49516      fi
49517    done
49518
49519    unset LLVM_LIBS
49520    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49521      if echo "${flag}" | grep -q '^-l'; then
49522        if test "${LLVM_LIBS}" != ""; then
49523          LLVM_LIBS="${LLVM_LIBS} "
49524        fi
49525        LLVM_LIBS="${LLVM_LIBS}${flag}"
49526      fi
49527    done
49528
49529
49530
49531
49532  fi
49533
49534  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49535  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49536    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49537  fi
49538
49539  # TODO better (platform agnostic) test
49540  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49541    LIBCXX="-lstdc++"
49542  fi
49543
49544
49545
49546
49547  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49548
49549
49550# Check whether --with-msvcr-dll was given.
49551if test "${with_msvcr_dll+set}" = set; then :
49552  withval=$with_msvcr_dll;
49553fi
49554
49555
49556  if test "x$with_msvcr_dll" != x; then
49557    # If given explicitely by user, do not probe. If not present, fail directly.
49558
49559  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49560  METHOD="--with-msvcr-dll"
49561  if test -e "$POSSIBLE_MSVCR_DLL"; then
49562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49563$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49564
49565    # Need to check if the found msvcr is correct architecture
49566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49567$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49568    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49570      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49571      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49572      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49573        CORRECT_MSVCR_ARCH="PE32 executable"
49574      else
49575        CORRECT_MSVCR_ARCH="PE32+ executable"
49576      fi
49577    else
49578      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49579        CORRECT_MSVCR_ARCH=386
49580      else
49581        CORRECT_MSVCR_ARCH=x86-64
49582      fi
49583    fi
49584    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49586$as_echo "ok" >&6; }
49587      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49589$as_echo_n "checking for msvcr100.dll... " >&6; }
49590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49591$as_echo "$MSVCR_DLL" >&6; }
49592    else
49593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49594$as_echo "incorrect, ignoring" >&6; }
49595      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49596$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49597    fi
49598  fi
49599
49600    if test "x$MSVCR_DLL" = x; then
49601      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49602    fi
49603  fi
49604
49605  if test "x$MSVCR_DLL" = x; then
49606    # Probe: Using well-known location from Visual Studio 10.0
49607    if test "x$VCINSTALLDIR" != x; then
49608      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49609
49610  windows_path="$CYGWIN_VC_INSTALL_DIR"
49611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49612    unix_path=`$CYGPATH -u "$windows_path"`
49613    CYGWIN_VC_INSTALL_DIR="$unix_path"
49614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49616    CYGWIN_VC_INSTALL_DIR="$unix_path"
49617  fi
49618
49619      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49620        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49621      else
49622        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49623      fi
49624
49625  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49626  METHOD="well-known location in VCINSTALLDIR"
49627  if test -e "$POSSIBLE_MSVCR_DLL"; then
49628    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49629$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49630
49631    # Need to check if the found msvcr is correct architecture
49632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49633$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49634    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49636      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49637      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49638      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49639        CORRECT_MSVCR_ARCH="PE32 executable"
49640      else
49641        CORRECT_MSVCR_ARCH="PE32+ executable"
49642      fi
49643    else
49644      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49645        CORRECT_MSVCR_ARCH=386
49646      else
49647        CORRECT_MSVCR_ARCH=x86-64
49648      fi
49649    fi
49650    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49652$as_echo "ok" >&6; }
49653      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49655$as_echo_n "checking for msvcr100.dll... " >&6; }
49656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49657$as_echo "$MSVCR_DLL" >&6; }
49658    else
49659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49660$as_echo "incorrect, ignoring" >&6; }
49661      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49662$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49663    fi
49664  fi
49665
49666    fi
49667  fi
49668
49669  if test "x$MSVCR_DLL" = x; then
49670    # Probe: Check in the Boot JDK directory.
49671    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49672
49673  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49674  METHOD="well-known location in Boot JDK"
49675  if test -e "$POSSIBLE_MSVCR_DLL"; then
49676    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49677$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49678
49679    # Need to check if the found msvcr is correct architecture
49680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49681$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49682    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49684      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49685      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49686      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49687        CORRECT_MSVCR_ARCH="PE32 executable"
49688      else
49689        CORRECT_MSVCR_ARCH="PE32+ executable"
49690      fi
49691    else
49692      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49693        CORRECT_MSVCR_ARCH=386
49694      else
49695        CORRECT_MSVCR_ARCH=x86-64
49696      fi
49697    fi
49698    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49700$as_echo "ok" >&6; }
49701      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49702      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49703$as_echo_n "checking for msvcr100.dll... " >&6; }
49704      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49705$as_echo "$MSVCR_DLL" >&6; }
49706    else
49707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49708$as_echo "incorrect, ignoring" >&6; }
49709      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49710$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49711    fi
49712  fi
49713
49714  fi
49715
49716  if test "x$MSVCR_DLL" = x; then
49717    # Probe: Look in the Windows system32 directory
49718    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49719
49720  windows_path="$CYGWIN_SYSTEMROOT"
49721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49722    unix_path=`$CYGPATH -u "$windows_path"`
49723    CYGWIN_SYSTEMROOT="$unix_path"
49724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49726    CYGWIN_SYSTEMROOT="$unix_path"
49727  fi
49728
49729    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49730
49731  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49732  METHOD="well-known location in SYSTEMROOT"
49733  if test -e "$POSSIBLE_MSVCR_DLL"; then
49734    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49735$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49736
49737    # Need to check if the found msvcr is correct architecture
49738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49739$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49740    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49742      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49743      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49744      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49745        CORRECT_MSVCR_ARCH="PE32 executable"
49746      else
49747        CORRECT_MSVCR_ARCH="PE32+ executable"
49748      fi
49749    else
49750      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49751        CORRECT_MSVCR_ARCH=386
49752      else
49753        CORRECT_MSVCR_ARCH=x86-64
49754      fi
49755    fi
49756    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49758$as_echo "ok" >&6; }
49759      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49760      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49761$as_echo_n "checking for msvcr100.dll... " >&6; }
49762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49763$as_echo "$MSVCR_DLL" >&6; }
49764    else
49765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49766$as_echo "incorrect, ignoring" >&6; }
49767      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49768$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49769    fi
49770  fi
49771
49772  fi
49773
49774  if test "x$MSVCR_DLL" = x; then
49775    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49776    if test "x$VS100COMNTOOLS" != x; then
49777      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49778
49779  windows_path="$CYGWIN_VS_TOOLS_DIR"
49780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49781    unix_path=`$CYGPATH -u "$windows_path"`
49782    CYGWIN_VS_TOOLS_DIR="$unix_path"
49783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49785    CYGWIN_VS_TOOLS_DIR="$unix_path"
49786  fi
49787
49788      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49789        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49790      else
49791        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49792      fi
49793
49794  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49795  METHOD="search of VS100COMNTOOLS"
49796  if test -e "$POSSIBLE_MSVCR_DLL"; then
49797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49798$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49799
49800    # Need to check if the found msvcr is correct architecture
49801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49802$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49803    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49805      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49806      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49807      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49808        CORRECT_MSVCR_ARCH="PE32 executable"
49809      else
49810        CORRECT_MSVCR_ARCH="PE32+ executable"
49811      fi
49812    else
49813      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49814        CORRECT_MSVCR_ARCH=386
49815      else
49816        CORRECT_MSVCR_ARCH=x86-64
49817      fi
49818    fi
49819    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49821$as_echo "ok" >&6; }
49822      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49823      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49824$as_echo_n "checking for msvcr100.dll... " >&6; }
49825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49826$as_echo "$MSVCR_DLL" >&6; }
49827    else
49828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49829$as_echo "incorrect, ignoring" >&6; }
49830      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49831$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49832    fi
49833  fi
49834
49835    fi
49836  fi
49837
49838  if test "x$MSVCR_DLL" = x; then
49839    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49840    # (This was the original behaviour; kept since it might turn up something)
49841    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49842      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49843        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49844      else
49845        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49846        if test "x$POSSIBLE_MSVCR_DLL" = x; then
49847          # We're grasping at straws now...
49848          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49849        fi
49850      fi
49851
49852
49853  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49854  METHOD="search of VCINSTALLDIR"
49855  if test -e "$POSSIBLE_MSVCR_DLL"; then
49856    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49857$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49858
49859    # Need to check if the found msvcr is correct architecture
49860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49861$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49862    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49863    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49864      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49865      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49866      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49867        CORRECT_MSVCR_ARCH="PE32 executable"
49868      else
49869        CORRECT_MSVCR_ARCH="PE32+ executable"
49870      fi
49871    else
49872      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49873        CORRECT_MSVCR_ARCH=386
49874      else
49875        CORRECT_MSVCR_ARCH=x86-64
49876      fi
49877    fi
49878    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49880$as_echo "ok" >&6; }
49881      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49883$as_echo_n "checking for msvcr100.dll... " >&6; }
49884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49885$as_echo "$MSVCR_DLL" >&6; }
49886    else
49887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49888$as_echo "incorrect, ignoring" >&6; }
49889      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49890$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49891    fi
49892  fi
49893
49894    fi
49895  fi
49896
49897  if test "x$MSVCR_DLL" = x; then
49898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49899$as_echo_n "checking for msvcr100.dll... " >&6; }
49900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49901$as_echo "no" >&6; }
49902    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49903  fi
49904
49905
49906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49907
49908  # Input might be given as Windows format, start by converting to
49909  # unix format.
49910  path="$MSVCR_DLL"
49911  new_path=`$CYGPATH -u "$path"`
49912
49913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49916  # "foo.exe" is OK but "foo" is an error.
49917  #
49918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49919  # It is also a way to make sure we got the proper file name for the real test later on.
49920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49921  if test "x$test_shortpath" = x; then
49922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49923$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49924    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49925  fi
49926
49927  # Call helper function which possibly converts this using DOS-style short mode.
49928  # If so, the updated path is stored in $new_path.
49929
49930  input_path="$new_path"
49931  # Check if we need to convert this using DOS-style short mode. If the path
49932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49933  # take no chances and rewrite it.
49934  # Note: m4 eats our [], so we need to use [ and ] instead.
49935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49936  if test "x$has_forbidden_chars" != x; then
49937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49941      # Going to short mode and back again did indeed matter. Since short mode is
49942      # case insensitive, let's make it lowercase to improve readability.
49943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49944      # Now convert it back to Unix-stile (cygpath)
49945      input_path=`$CYGPATH -u "$shortmode_path"`
49946      new_path="$input_path"
49947    fi
49948  fi
49949
49950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49951  if test "x$test_cygdrive_prefix" = x; then
49952    # As a simple fix, exclude /usr/bin since it's not a real path.
49953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49955      # a path prefixed by /cygdrive for fixpath to work.
49956      new_path="$CYGWIN_ROOT_PATH$input_path"
49957    fi
49958  fi
49959
49960
49961  if test "x$path" != "x$new_path"; then
49962    MSVCR_DLL="$new_path"
49963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49964$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49965  fi
49966
49967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49968
49969  path="$MSVCR_DLL"
49970  has_colon=`$ECHO $path | $GREP ^.:`
49971  new_path="$path"
49972  if test "x$has_colon" = x; then
49973    # Not in mixed or Windows style, start by that.
49974    new_path=`cmd //c echo $path`
49975  fi
49976
49977
49978  input_path="$new_path"
49979  # Check if we need to convert this using DOS-style short mode. If the path
49980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49981  # take no chances and rewrite it.
49982  # Note: m4 eats our [], so we need to use [ and ] instead.
49983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49984  if test "x$has_forbidden_chars" != x; then
49985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49987  fi
49988
49989
49990  windows_path="$new_path"
49991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49992    unix_path=`$CYGPATH -u "$windows_path"`
49993    new_path="$unix_path"
49994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49996    new_path="$unix_path"
49997  fi
49998
49999  if test "x$path" != "x$new_path"; then
50000    MSVCR_DLL="$new_path"
50001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50002$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50003  fi
50004
50005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50007
50008  else
50009    # We're on a posix platform. Hooray! :)
50010    path="$MSVCR_DLL"
50011    has_space=`$ECHO "$path" | $GREP " "`
50012    if test "x$has_space" != x; then
50013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50014$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50016    fi
50017
50018    # Use eval to expand a potential ~
50019    eval path="$path"
50020    if test ! -f "$path" && test ! -d "$path"; then
50021      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50022    fi
50023
50024    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50025  fi
50026
50027
50028
50029
50030# Check whether --with-dxsdk was given.
50031if test "${with_dxsdk+set}" = set; then :
50032  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50033$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50034fi
50035
50036
50037
50038
50039# Check whether --with-dxsdk-lib was given.
50040if test "${with_dxsdk_lib+set}" = set; then :
50041  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50042$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50043fi
50044
50045
50046
50047
50048# Check whether --with-dxsdk-include was given.
50049if test "${with_dxsdk_include+set}" = set; then :
50050  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50051$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50052fi
50053
50054
50055  fi
50056
50057
50058
50059###############################################################################
50060#
50061# We need to do some final tweaking, when everything else is done.
50062#
50063###############################################################################
50064
50065
50066  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50067
50068
50069  # The name of the Service Agent jar.
50070  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50071  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50072    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50073  fi
50074
50075
50076
50077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50078$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50079
50080    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50081      ENABLE_INTREE_EC=yes
50082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50083$as_echo "yes" >&6; }
50084    else
50085      ENABLE_INTREE_EC=no
50086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50087$as_echo "no" >&6; }
50088    fi
50089
50090
50091
50092
50093###############################################################################
50094#
50095# Configure parts of the build that only affect the build performance,
50096# not the result.
50097#
50098###############################################################################
50099
50100
50101  # How many cores do we have on this build system?
50102
50103# Check whether --with-num-cores was given.
50104if test "${with_num_cores+set}" = set; then :
50105  withval=$with_num_cores;
50106fi
50107
50108  if test "x$with_num_cores" = x; then
50109    # The number of cores were not specified, try to probe them.
50110
50111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50112$as_echo_n "checking for number of cores... " >&6; }
50113  NUM_CORES=1
50114  FOUND_CORES=no
50115
50116  if test -f /proc/cpuinfo; then
50117    # Looks like a Linux (or cygwin) system
50118    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50119    FOUND_CORES=yes
50120  elif test -x /usr/sbin/psrinfo; then
50121    # Looks like a Solaris system
50122    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50123    FOUND_CORES=yes
50124  elif test -x /usr/sbin/system_profiler; then
50125    # Looks like a MacOSX system
50126    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50127    FOUND_CORES=yes
50128  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50129    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50130    FOUND_CORES=yes
50131  elif test -n "$NUMBER_OF_PROCESSORS"; then
50132    # On windows, look in the env
50133    NUM_CORES=$NUMBER_OF_PROCESSORS
50134    FOUND_CORES=yes
50135  fi
50136
50137  if test "x$FOUND_CORES" = xyes; then
50138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50139$as_echo "$NUM_CORES" >&6; }
50140  else
50141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50142$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50143    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50144$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50145  fi
50146
50147  else
50148    NUM_CORES=$with_num_cores
50149  fi
50150
50151
50152
50153  # How much memory do we have on this build system?
50154
50155# Check whether --with-memory-size was given.
50156if test "${with_memory_size+set}" = set; then :
50157  withval=$with_memory_size;
50158fi
50159
50160  if test "x$with_memory_size" = x; then
50161    # The memory size was not specified, try to probe it.
50162
50163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50164$as_echo_n "checking for memory size... " >&6; }
50165  # Default to 1024 MB
50166  MEMORY_SIZE=1024
50167  FOUND_MEM=no
50168
50169  if test -f /proc/meminfo; then
50170    # Looks like a Linux (or cygwin) system
50171    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50172    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50173    FOUND_MEM=yes
50174  elif test -x /usr/sbin/prtconf; then
50175    # Looks like a Solaris or AIX system
50176    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50177    FOUND_MEM=yes
50178  elif test -x /usr/sbin/system_profiler; then
50179    # Looks like a MacOSX system
50180    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50181    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50182    FOUND_MEM=yes
50183  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50184    # Windows, but without cygwin
50185    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50186    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50187    FOUND_MEM=yes
50188  fi
50189
50190  if test "x$FOUND_MEM" = xyes; then
50191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50192$as_echo "$MEMORY_SIZE MB" >&6; }
50193  else
50194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50195$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50197$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50198  fi
50199
50200  else
50201    MEMORY_SIZE=$with_memory_size
50202  fi
50203
50204
50205
50206  # Provide a decent default number of parallel jobs for make depending on
50207  # number of cores, amount of memory and machine architecture.
50208
50209# Check whether --with-jobs was given.
50210if test "${with_jobs+set}" = set; then :
50211  withval=$with_jobs;
50212fi
50213
50214  if test "x$with_jobs" = x; then
50215    # Number of jobs was not specified, calculate.
50216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50217$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50218    # Approximate memory in GB.
50219    memory_gb=`expr $MEMORY_SIZE / 1024`
50220    # Pick the lowest of memory in gb and number of cores.
50221    if test "$memory_gb" -lt "$NUM_CORES"; then
50222      JOBS="$memory_gb"
50223    else
50224      JOBS="$NUM_CORES"
50225      # On bigger machines, leave some room for other processes to run
50226      if test "$JOBS" -gt "4"; then
50227        JOBS=`expr $JOBS '*' 90 / 100`
50228      fi
50229    fi
50230    # Cap number of jobs to 16
50231    if test "$JOBS" -gt "16"; then
50232      JOBS=16
50233    fi
50234    if test "$JOBS" -eq "0"; then
50235      JOBS=1
50236    fi
50237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50238$as_echo "$JOBS" >&6; }
50239  else
50240    JOBS=$with_jobs
50241  fi
50242
50243
50244
50245# Setup arguments for the boot jdk (after cores and memory have been setup)
50246
50247  ##############################################################################
50248  #
50249  # Specify jvm options for anything that is run with the Boot JDK.
50250  # Not all JVM:s accept the same arguments on the command line.
50251  #
50252
50253# Check whether --with-boot-jdk-jvmargs was given.
50254if test "${with_boot_jdk_jvmargs+set}" = set; then :
50255  withval=$with_boot_jdk_jvmargs;
50256fi
50257
50258
50259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50260$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50261
50262  # Disable special log output when a debug build is used as Boot JDK...
50263
50264  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50265  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50266  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50267  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50268  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50269  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50270    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50271    JVM_ARG_OK=true
50272  else
50273    $ECHO "Arg failed:" >&5
50274    $ECHO "$OUTPUT" >&5
50275    JVM_ARG_OK=false
50276  fi
50277
50278
50279  # Apply user provided options.
50280
50281  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50282  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50283  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50284  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50285  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50286  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50287    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50288    JVM_ARG_OK=true
50289  else
50290    $ECHO "Arg failed:" >&5
50291    $ECHO "$OUTPUT" >&5
50292    JVM_ARG_OK=false
50293  fi
50294
50295
50296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50297$as_echo "$boot_jdk_jvmargs" >&6; }
50298
50299  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50300  JAVA_FLAGS=$boot_jdk_jvmargs
50301
50302
50303
50304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50305$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50306
50307  # Starting amount of heap memory.
50308
50309  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50310  $ECHO "Command: $JAVA -Xms64M -version" >&5
50311  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50312  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50313  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50314  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50315    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50316    JVM_ARG_OK=true
50317  else
50318    $ECHO "Arg failed:" >&5
50319    $ECHO "$OUTPUT" >&5
50320    JVM_ARG_OK=false
50321  fi
50322
50323
50324  # Maximum amount of heap memory.
50325  # Maximum stack size.
50326  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50327  if test "x$BUILD_NUM_BITS" = x32; then
50328    if test "$JVM_MAX_HEAP" -gt "1100"; then
50329      JVM_MAX_HEAP=1100
50330    elif test "$JVM_MAX_HEAP" -lt "512"; then
50331      JVM_MAX_HEAP=512
50332    fi
50333    STACK_SIZE=768
50334  else
50335    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50336    # pointers are used. Apparently, we need to increase the heap and stack
50337    # space for the jvm. More specifically, when running javac to build huge
50338    # jdk batch
50339    if test "$JVM_MAX_HEAP" -gt "1600"; then
50340      JVM_MAX_HEAP=1600
50341    elif test "$JVM_MAX_HEAP" -lt "512"; then
50342      JVM_MAX_HEAP=512
50343    fi
50344    STACK_SIZE=1536
50345  fi
50346
50347  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50348  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50349  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50350  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50351  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50352  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50353    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50354    JVM_ARG_OK=true
50355  else
50356    $ECHO "Arg failed:" >&5
50357    $ECHO "$OUTPUT" >&5
50358    JVM_ARG_OK=false
50359  fi
50360
50361
50362  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50363  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50364  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50365  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50366  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50367  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50368    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50369    JVM_ARG_OK=true
50370  else
50371    $ECHO "Arg failed:" >&5
50372    $ECHO "$OUTPUT" >&5
50373    JVM_ARG_OK=false
50374  fi
50375
50376
50377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50378$as_echo "$boot_jdk_jvmargs_big" >&6; }
50379
50380  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50381
50382
50383
50384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50385$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50386
50387  # Use serial gc for small short lived tools if possible
50388
50389  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50390  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50391  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50392  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50393  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50394  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50395    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50396    JVM_ARG_OK=true
50397  else
50398    $ECHO "Arg failed:" >&5
50399    $ECHO "$OUTPUT" >&5
50400    JVM_ARG_OK=false
50401  fi
50402
50403
50404  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50405  $ECHO "Command: $JAVA -Xms32M -version" >&5
50406  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50407  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50408  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50409  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50410    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50411    JVM_ARG_OK=true
50412  else
50413    $ECHO "Arg failed:" >&5
50414    $ECHO "$OUTPUT" >&5
50415    JVM_ARG_OK=false
50416  fi
50417
50418
50419  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50420  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50421  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50422  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50423  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50424  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50425    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50426    JVM_ARG_OK=true
50427  else
50428    $ECHO "Arg failed:" >&5
50429    $ECHO "$OUTPUT" >&5
50430    JVM_ARG_OK=false
50431  fi
50432
50433
50434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50435$as_echo "$boot_jdk_jvmargs_small" >&6; }
50436
50437  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50438
50439
50440  JAVA_TOOL_FLAGS_SMALL=""
50441  for f in $JAVA_FLAGS_SMALL; do
50442    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50443  done
50444
50445
50446
50447# Setup smart javac (after cores and memory have been setup)
50448
50449
50450# Check whether --with-sjavac-server-java was given.
50451if test "${with_sjavac_server_java+set}" = set; then :
50452  withval=$with_sjavac_server_java;
50453fi
50454
50455
50456  if test "x$with_sjavac_server_java" != x; then
50457    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50458    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50459    if test "x$FOUND_VERSION" = x; then
50460      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50461    fi
50462  else
50463    SJAVAC_SERVER_JAVA="$JAVA"
50464  fi
50465
50466
50467  if test "$MEMORY_SIZE" -gt "3000"; then
50468
50469  $ECHO "Check if jvm arg is ok: -d64" >&5
50470  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50471  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50472  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50473  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50474  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50475    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
50476    JVM_ARG_OK=true
50477  else
50478    $ECHO "Arg failed:" >&5
50479    $ECHO "$OUTPUT" >&5
50480    JVM_ARG_OK=false
50481  fi
50482
50483    if test "$JVM_ARG_OK" = true; then
50484      JVM_64BIT=true
50485      JVM_ARG_OK=false
50486    fi
50487  fi
50488
50489  MX_VALUE=`expr $MEMORY_SIZE / 2`
50490  if test "$JVM_64BIT" = true; then
50491    # Set ms lower than mx since more than one instance of the server might
50492    # get launched at the same time before they figure out which instance won.
50493    MS_VALUE=512
50494    if test "$MX_VALUE" -gt "2048"; then
50495      MX_VALUE=2048
50496    fi
50497  else
50498    MS_VALUE=256
50499    if test "$MX_VALUE" -gt "1500"; then
50500      MX_VALUE=1500
50501    fi
50502  fi
50503  if test "$MX_VALUE" -lt "512"; then
50504    MX_VALUE=512
50505  fi
50506
50507  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50508  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50509  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50510  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50511  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50512  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50513    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50514    JVM_ARG_OK=true
50515  else
50516    $ECHO "Arg failed:" >&5
50517    $ECHO "$OUTPUT" >&5
50518    JVM_ARG_OK=false
50519  fi
50520
50521
50522  # Check whether --enable-sjavac was given.
50523if test "${enable_sjavac+set}" = set; then :
50524  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50525else
50526  ENABLE_SJAVAC='no'
50527fi
50528
50529  if test "x$JVM_ARG_OK" = "xfalse"; then
50530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50531$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50532    ENABLE_SJAVAC=no;
50533  fi
50534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50535$as_echo_n "checking whether to use sjavac... " >&6; }
50536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50537$as_echo "$ENABLE_SJAVAC" >&6; }
50538
50539
50540  if test "x$ENABLE_SJAVAC" = xyes; then
50541    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50542  else
50543    SJAVAC_SERVER_DIR=
50544  fi
50545
50546
50547
50548# Can the C/C++ compiler use precompiled headers?
50549
50550
50551  ###############################################################################
50552  #
50553  # Can the C/C++ compiler use precompiled headers?
50554  #
50555  # Check whether --enable-precompiled-headers was given.
50556if test "${enable_precompiled_headers+set}" = set; then :
50557  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50558else
50559  ENABLE_PRECOMPH=yes
50560fi
50561
50562
50563  USE_PRECOMPILED_HEADER=1
50564  if test "x$ENABLE_PRECOMPH" = xno; then
50565    USE_PRECOMPILED_HEADER=0
50566  fi
50567
50568  if test "x$ENABLE_PRECOMPH" = xyes; then
50569    # Check that the compiler actually supports precomp headers.
50570    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50572$as_echo_n "checking that precompiled headers work... " >&6; }
50573      echo "int alfa();" > conftest.h
50574      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50575      if test ! -f conftest.hpp.gch; then
50576        USE_PRECOMPILED_HEADER=0
50577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50578$as_echo "no" >&6; }
50579      else
50580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50581$as_echo "yes" >&6; }
50582      fi
50583      rm -f conftest.h conftest.hpp.gch
50584    fi
50585  fi
50586
50587
50588
50589
50590# Setup use of ccache, if available
50591
50592  # Check whether --enable-ccache was given.
50593if test "${enable_ccache+set}" = set; then :
50594  enableval=$enable_ccache;
50595fi
50596
50597
50598  CCACHE=
50599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50600$as_echo_n "checking is ccache enabled... " >&6; }
50601  ENABLE_CCACHE=$enable_ccache
50602  if test "x$enable_ccache" = xyes; then
50603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50604$as_echo "yes" >&6; }
50605    OLD_PATH="$PATH"
50606    if test "x$TOOLCHAIN_PATH" != x; then
50607      PATH=$TOOLCHAIN_PATH:$PATH
50608    fi
50609
50610
50611
50612  # Publish this variable in the help.
50613
50614
50615  if test "x$CCACHE" = x; then
50616    # The variable is not set by user, try to locate tool using the code snippet
50617    for ac_prog in ccache
50618do
50619  # Extract the first word of "$ac_prog", so it can be a program name with args.
50620set dummy $ac_prog; ac_word=$2
50621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50622$as_echo_n "checking for $ac_word... " >&6; }
50623if ${ac_cv_path_CCACHE+:} false; then :
50624  $as_echo_n "(cached) " >&6
50625else
50626  case $CCACHE in
50627  [\\/]* | ?:[\\/]*)
50628  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50629  ;;
50630  *)
50631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50632for as_dir in $PATH
50633do
50634  IFS=$as_save_IFS
50635  test -z "$as_dir" && as_dir=.
50636    for ac_exec_ext in '' $ac_executable_extensions; do
50637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50638    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50640    break 2
50641  fi
50642done
50643  done
50644IFS=$as_save_IFS
50645
50646  ;;
50647esac
50648fi
50649CCACHE=$ac_cv_path_CCACHE
50650if test -n "$CCACHE"; then
50651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50652$as_echo "$CCACHE" >&6; }
50653else
50654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50655$as_echo "no" >&6; }
50656fi
50657
50658
50659  test -n "$CCACHE" && break
50660done
50661
50662  else
50663    # The variable is set, but is it from the command line or the environment?
50664
50665    # Try to remove the string !CCACHE! from our list.
50666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50668      # If it failed, the variable was not from the command line. Ignore it,
50669      # but warn the user (except for BASH, which is always set by the calling BASH).
50670      if test "xCCACHE" != xBASH; then
50671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50672$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50673      fi
50674      # Try to locate tool using the code snippet
50675      for ac_prog in ccache
50676do
50677  # Extract the first word of "$ac_prog", so it can be a program name with args.
50678set dummy $ac_prog; ac_word=$2
50679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50680$as_echo_n "checking for $ac_word... " >&6; }
50681if ${ac_cv_path_CCACHE+:} false; then :
50682  $as_echo_n "(cached) " >&6
50683else
50684  case $CCACHE in
50685  [\\/]* | ?:[\\/]*)
50686  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50687  ;;
50688  *)
50689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50690for as_dir in $PATH
50691do
50692  IFS=$as_save_IFS
50693  test -z "$as_dir" && as_dir=.
50694    for ac_exec_ext in '' $ac_executable_extensions; do
50695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50696    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50698    break 2
50699  fi
50700done
50701  done
50702IFS=$as_save_IFS
50703
50704  ;;
50705esac
50706fi
50707CCACHE=$ac_cv_path_CCACHE
50708if test -n "$CCACHE"; then
50709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50710$as_echo "$CCACHE" >&6; }
50711else
50712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50713$as_echo "no" >&6; }
50714fi
50715
50716
50717  test -n "$CCACHE" && break
50718done
50719
50720    else
50721      # If it succeeded, then it was overridden by the user. We will use it
50722      # for the tool.
50723
50724      # First remove it from the list of overridden variables, so we can test
50725      # for unknown variables in the end.
50726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50727
50728      # Check if the provided tool contains a complete path.
50729      tool_specified="$CCACHE"
50730      tool_basename="${tool_specified##*/}"
50731      if test "x$tool_basename" = "x$tool_specified"; then
50732        # A command without a complete path is provided, search $PATH.
50733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50734$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50735        # Extract the first word of "$tool_basename", so it can be a program name with args.
50736set dummy $tool_basename; ac_word=$2
50737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50738$as_echo_n "checking for $ac_word... " >&6; }
50739if ${ac_cv_path_CCACHE+:} false; then :
50740  $as_echo_n "(cached) " >&6
50741else
50742  case $CCACHE in
50743  [\\/]* | ?:[\\/]*)
50744  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50745  ;;
50746  *)
50747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50748for as_dir in $PATH
50749do
50750  IFS=$as_save_IFS
50751  test -z "$as_dir" && as_dir=.
50752    for ac_exec_ext in '' $ac_executable_extensions; do
50753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50754    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50756    break 2
50757  fi
50758done
50759  done
50760IFS=$as_save_IFS
50761
50762  ;;
50763esac
50764fi
50765CCACHE=$ac_cv_path_CCACHE
50766if test -n "$CCACHE"; then
50767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50768$as_echo "$CCACHE" >&6; }
50769else
50770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50771$as_echo "no" >&6; }
50772fi
50773
50774
50775        if test "x$CCACHE" = x; then
50776          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50777        fi
50778      else
50779        # Otherwise we believe it is a complete path. Use it as it is.
50780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50781$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50783$as_echo_n "checking for CCACHE... " >&6; }
50784        if test ! -x "$tool_specified"; then
50785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50786$as_echo "not found" >&6; }
50787          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50788        fi
50789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50790$as_echo "$tool_specified" >&6; }
50791      fi
50792    fi
50793  fi
50794
50795
50796
50797  if test "x$CCACHE" = x; then
50798    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50799  fi
50800
50801
50802    CCACHE_STATUS="enabled"
50803    PATH="$OLD_PATH"
50804  elif test "x$enable_ccache" = xno; then
50805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50806$as_echo "no, explicitly disabled" >&6; }
50807  elif test "x$enable_ccache" = x; then
50808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50809$as_echo "no" >&6; }
50810  else
50811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50812$as_echo "unknown" >&6; }
50813    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50814  fi
50815
50816
50817
50818# Check whether --with-ccache-dir was given.
50819if test "${with_ccache_dir+set}" = set; then :
50820  withval=$with_ccache_dir;
50821fi
50822
50823
50824  if test "x$with_ccache_dir" != x; then
50825    # When using a non home ccache directory, assume the use is to share ccache files
50826    # with other users. Thus change the umask.
50827    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50828    if test "x$CCACHE" = x; then
50829      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50830$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50831    fi
50832  fi
50833
50834  if test "x$CCACHE" != x; then
50835
50836  if test "x$CCACHE" != x; then
50837    # Only use ccache if it is 3.1.4 or later, which supports
50838    # precompiled headers.
50839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50840$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50841    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50842    if test "x$HAS_GOOD_CCACHE" = x; then
50843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50844$as_echo "no, disabling ccache" >&6; }
50845      CCACHE=
50846      CCACHE_STATUS="disabled"
50847    else
50848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50849$as_echo "yes" >&6; }
50850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50851$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50852      PUSHED_FLAGS="$CXXFLAGS"
50853      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50854      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50855/* end confdefs.h.  */
50856
50857int
50858main ()
50859{
50860
50861  ;
50862  return 0;
50863}
50864_ACEOF
50865if ac_fn_cxx_try_compile "$LINENO"; then :
50866  CC_KNOWS_CCACHE_TRICK=yes
50867else
50868  CC_KNOWS_CCACHE_TRICK=no
50869fi
50870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50871      CXXFLAGS="$PUSHED_FLAGS"
50872      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50874$as_echo "yes" >&6; }
50875      else
50876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50877$as_echo "no, disabling ccaching of precompiled headers" >&6; }
50878        CCACHE=
50879        CCACHE_STATUS="disabled"
50880      fi
50881    fi
50882  fi
50883
50884  if test "x$CCACHE" != x; then
50885    CCACHE_SLOPPINESS=time_macros
50886    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50887    CCACHE_FLAGS=-fpch-preprocess
50888
50889    if test "x$SET_CCACHE_DIR" != x; then
50890      mkdir -p $CCACHE_DIR > /dev/null 2>&1
50891      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50892    fi
50893  fi
50894
50895  fi
50896
50897
50898###############################################################################
50899#
50900# And now the finish...
50901#
50902###############################################################################
50903
50904# Check for some common pitfalls
50905
50906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50907    file_to_test="$SRC_ROOT/LICENSE"
50908    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50909      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
50910    fi
50911  fi
50912
50913
50914  # Did user specify any unknown variables?
50915
50916  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50917    # Replace the separating ! with spaces before presenting for end user.
50918    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50920$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50921  fi
50922
50923
50924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50925$as_echo_n "checking if build directory is on local disk... " >&6; }
50926
50927  # df -l lists only local disks; if the given directory is not found then
50928  # a non-zero exit code is given
50929  if test "x$DF" = x; then
50930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50931      # msys does not have df; use Windows "net use" instead.
50932      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50933      if test "x$IS_NETWORK_DISK" = x; then
50934        OUTPUT_DIR_IS_LOCAL="yes"
50935      else
50936        OUTPUT_DIR_IS_LOCAL="no"
50937      fi
50938    else
50939      # No df here, say it's local
50940      OUTPUT_DIR_IS_LOCAL="yes"
50941    fi
50942  else
50943    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50944      OUTPUT_DIR_IS_LOCAL="yes"
50945    else
50946      OUTPUT_DIR_IS_LOCAL="no"
50947    fi
50948  fi
50949
50950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50951$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50952
50953
50954
50955  # Check if the user has any old-style ALT_ variables set.
50956  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50957
50958  # Before generating output files, test if they exist. If they do, this is a reconfigure.
50959  # Since we can't properly handle the dependencies for this, warn the user about the situation
50960  if test -e $OUTPUT_ROOT/spec.gmk; then
50961    IS_RECONFIGURE=yes
50962  else
50963    IS_RECONFIGURE=no
50964  fi
50965
50966
50967# At the end, call the custom hook. (Dummy macro if no custom sources available)
50968
50969
50970# We're messing a bit with internal autoconf variables to put the config.status
50971# in the output directory instead of the current directory.
50972CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50973
50974# Create the actual output files. Now the main work of configure is done.
50975cat >confcache <<\_ACEOF
50976# This file is a shell script that caches the results of configure
50977# tests run on this system so they can be shared between configure
50978# scripts and configure runs, see configure's option --config-cache.
50979# It is not useful on other systems.  If it contains results you don't
50980# want to keep, you may remove or edit it.
50981#
50982# config.status only pays attention to the cache file if you give it
50983# the --recheck option to rerun configure.
50984#
50985# `ac_cv_env_foo' variables (set or unset) will be overridden when
50986# loading this file, other *unset* `ac_cv_foo' will be assigned the
50987# following values.
50988
50989_ACEOF
50990
50991# The following way of writing the cache mishandles newlines in values,
50992# but we know of no workaround that is simple, portable, and efficient.
50993# So, we kill variables containing newlines.
50994# Ultrix sh set writes to stderr and can't be redirected directly,
50995# and sets the high bit in the cache file unless we assign to the vars.
50996(
50997  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50998    eval ac_val=\$$ac_var
50999    case $ac_val in #(
51000    *${as_nl}*)
51001      case $ac_var in #(
51002      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51003$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51004      esac
51005      case $ac_var in #(
51006      _ | IFS | as_nl) ;; #(
51007      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51008      *) { eval $ac_var=; unset $ac_var;} ;;
51009      esac ;;
51010    esac
51011  done
51012
51013  (set) 2>&1 |
51014    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51015    *${as_nl}ac_space=\ *)
51016      # `set' does not quote correctly, so add quotes: double-quote
51017      # substitution turns \\\\ into \\, and sed turns \\ into \.
51018      sed -n \
51019	"s/'/'\\\\''/g;
51020	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51021      ;; #(
51022    *)
51023      # `set' quotes correctly as required by POSIX, so do not add quotes.
51024      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51025      ;;
51026    esac |
51027    sort
51028) |
51029  sed '
51030     /^ac_cv_env_/b end
51031     t clear
51032     :clear
51033     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51034     t end
51035     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51036     :end' >>confcache
51037if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51038  if test -w "$cache_file"; then
51039    if test "x$cache_file" != "x/dev/null"; then
51040      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51041$as_echo "$as_me: updating cache $cache_file" >&6;}
51042      if test ! -f "$cache_file" || test -h "$cache_file"; then
51043	cat confcache >"$cache_file"
51044      else
51045        case $cache_file in #(
51046        */* | ?:*)
51047	  mv -f confcache "$cache_file"$$ &&
51048	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51049        *)
51050	  mv -f confcache "$cache_file" ;;
51051	esac
51052      fi
51053    fi
51054  else
51055    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51056$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51057  fi
51058fi
51059rm -f confcache
51060
51061test "x$prefix" = xNONE && prefix=$ac_default_prefix
51062# Let make expand exec_prefix.
51063test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51064
51065DEFS=-DHAVE_CONFIG_H
51066
51067ac_libobjs=
51068ac_ltlibobjs=
51069U=
51070for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51071  # 1. Remove the extension, and $U if already installed.
51072  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51073  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51074  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51075  #    will be set to the directory where LIBOBJS objects are built.
51076  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51077  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51078done
51079LIBOBJS=$ac_libobjs
51080
51081LTLIBOBJS=$ac_ltlibobjs
51082
51083
51084
51085: "${CONFIG_STATUS=./config.status}"
51086ac_write_fail=0
51087ac_clean_files_save=$ac_clean_files
51088ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51089{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51090$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51091as_write_fail=0
51092cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51093#! $SHELL
51094# Generated by $as_me.
51095# Run this file to recreate the current configuration.
51096# Compiler output produced by configure, useful for debugging
51097# configure, is in config.log if it exists.
51098
51099debug=false
51100ac_cs_recheck=false
51101ac_cs_silent=false
51102
51103SHELL=\${CONFIG_SHELL-$SHELL}
51104export SHELL
51105_ASEOF
51106cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51107## -------------------- ##
51108## M4sh Initialization. ##
51109## -------------------- ##
51110
51111# Be more Bourne compatible
51112DUALCASE=1; export DUALCASE # for MKS sh
51113if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51114  emulate sh
51115  NULLCMD=:
51116  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51117  # is contrary to our usage.  Disable this feature.
51118  alias -g '${1+"$@"}'='"$@"'
51119  setopt NO_GLOB_SUBST
51120else
51121  case `(set -o) 2>/dev/null` in #(
51122  *posix*) :
51123    set -o posix ;; #(
51124  *) :
51125     ;;
51126esac
51127fi
51128
51129
51130as_nl='
51131'
51132export as_nl
51133# Printing a long string crashes Solaris 7 /usr/bin/printf.
51134as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51135as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51136as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51137# Prefer a ksh shell builtin over an external printf program on Solaris,
51138# but without wasting forks for bash or zsh.
51139if test -z "$BASH_VERSION$ZSH_VERSION" \
51140    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51141  as_echo='print -r --'
51142  as_echo_n='print -rn --'
51143elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51144  as_echo='printf %s\n'
51145  as_echo_n='printf %s'
51146else
51147  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51148    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51149    as_echo_n='/usr/ucb/echo -n'
51150  else
51151    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51152    as_echo_n_body='eval
51153      arg=$1;
51154      case $arg in #(
51155      *"$as_nl"*)
51156	expr "X$arg" : "X\\(.*\\)$as_nl";
51157	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51158      esac;
51159      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51160    '
51161    export as_echo_n_body
51162    as_echo_n='sh -c $as_echo_n_body as_echo'
51163  fi
51164  export as_echo_body
51165  as_echo='sh -c $as_echo_body as_echo'
51166fi
51167
51168# The user is always right.
51169if test "${PATH_SEPARATOR+set}" != set; then
51170  PATH_SEPARATOR=:
51171  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51172    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51173      PATH_SEPARATOR=';'
51174  }
51175fi
51176
51177
51178# IFS
51179# We need space, tab and new line, in precisely that order.  Quoting is
51180# there to prevent editors from complaining about space-tab.
51181# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51182# splitting by setting IFS to empty value.)
51183IFS=" ""	$as_nl"
51184
51185# Find who we are.  Look in the path if we contain no directory separator.
51186as_myself=
51187case $0 in #((
51188  *[\\/]* ) as_myself=$0 ;;
51189  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51190for as_dir in $PATH
51191do
51192  IFS=$as_save_IFS
51193  test -z "$as_dir" && as_dir=.
51194    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51195  done
51196IFS=$as_save_IFS
51197
51198     ;;
51199esac
51200# We did not find ourselves, most probably we were run as `sh COMMAND'
51201# in which case we are not to be found in the path.
51202if test "x$as_myself" = x; then
51203  as_myself=$0
51204fi
51205if test ! -f "$as_myself"; then
51206  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51207  exit 1
51208fi
51209
51210# Unset variables that we do not need and which cause bugs (e.g. in
51211# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51212# suppresses any "Segmentation fault" message there.  '((' could
51213# trigger a bug in pdksh 5.2.14.
51214for as_var in BASH_ENV ENV MAIL MAILPATH
51215do eval test x\${$as_var+set} = xset \
51216  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51217done
51218PS1='$ '
51219PS2='> '
51220PS4='+ '
51221
51222# NLS nuisances.
51223LC_ALL=C
51224export LC_ALL
51225LANGUAGE=C
51226export LANGUAGE
51227
51228# CDPATH.
51229(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51230
51231
51232# as_fn_error STATUS ERROR [LINENO LOG_FD]
51233# ----------------------------------------
51234# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51235# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51236# script with STATUS, using 1 if that was 0.
51237as_fn_error ()
51238{
51239  as_status=$1; test $as_status -eq 0 && as_status=1
51240  if test "$4"; then
51241    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51242    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51243  fi
51244  $as_echo "$as_me: error: $2" >&2
51245  as_fn_exit $as_status
51246} # as_fn_error
51247
51248
51249# as_fn_set_status STATUS
51250# -----------------------
51251# Set $? to STATUS, without forking.
51252as_fn_set_status ()
51253{
51254  return $1
51255} # as_fn_set_status
51256
51257# as_fn_exit STATUS
51258# -----------------
51259# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51260as_fn_exit ()
51261{
51262  set +e
51263  as_fn_set_status $1
51264  exit $1
51265} # as_fn_exit
51266
51267# as_fn_unset VAR
51268# ---------------
51269# Portably unset VAR.
51270as_fn_unset ()
51271{
51272  { eval $1=; unset $1;}
51273}
51274as_unset=as_fn_unset
51275# as_fn_append VAR VALUE
51276# ----------------------
51277# Append the text in VALUE to the end of the definition contained in VAR. Take
51278# advantage of any shell optimizations that allow amortized linear growth over
51279# repeated appends, instead of the typical quadratic growth present in naive
51280# implementations.
51281if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51282  eval 'as_fn_append ()
51283  {
51284    eval $1+=\$2
51285  }'
51286else
51287  as_fn_append ()
51288  {
51289    eval $1=\$$1\$2
51290  }
51291fi # as_fn_append
51292
51293# as_fn_arith ARG...
51294# ------------------
51295# Perform arithmetic evaluation on the ARGs, and store the result in the
51296# global $as_val. Take advantage of shells that can avoid forks. The arguments
51297# must be portable across $(()) and expr.
51298if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51299  eval 'as_fn_arith ()
51300  {
51301    as_val=$(( $* ))
51302  }'
51303else
51304  as_fn_arith ()
51305  {
51306    as_val=`expr "$@" || test $? -eq 1`
51307  }
51308fi # as_fn_arith
51309
51310
51311if expr a : '\(a\)' >/dev/null 2>&1 &&
51312   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51313  as_expr=expr
51314else
51315  as_expr=false
51316fi
51317
51318if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51319  as_basename=basename
51320else
51321  as_basename=false
51322fi
51323
51324if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51325  as_dirname=dirname
51326else
51327  as_dirname=false
51328fi
51329
51330as_me=`$as_basename -- "$0" ||
51331$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51332	 X"$0" : 'X\(//\)$' \| \
51333	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51334$as_echo X/"$0" |
51335    sed '/^.*\/\([^/][^/]*\)\/*$/{
51336	    s//\1/
51337	    q
51338	  }
51339	  /^X\/\(\/\/\)$/{
51340	    s//\1/
51341	    q
51342	  }
51343	  /^X\/\(\/\).*/{
51344	    s//\1/
51345	    q
51346	  }
51347	  s/.*/./; q'`
51348
51349# Avoid depending upon Character Ranges.
51350as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51351as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51352as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51353as_cr_digits='0123456789'
51354as_cr_alnum=$as_cr_Letters$as_cr_digits
51355
51356ECHO_C= ECHO_N= ECHO_T=
51357case `echo -n x` in #(((((
51358-n*)
51359  case `echo 'xy\c'` in
51360  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51361  xy)  ECHO_C='\c';;
51362  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51363       ECHO_T='	';;
51364  esac;;
51365*)
51366  ECHO_N='-n';;
51367esac
51368
51369rm -f conf$$ conf$$.exe conf$$.file
51370if test -d conf$$.dir; then
51371  rm -f conf$$.dir/conf$$.file
51372else
51373  rm -f conf$$.dir
51374  mkdir conf$$.dir 2>/dev/null
51375fi
51376if (echo >conf$$.file) 2>/dev/null; then
51377  if ln -s conf$$.file conf$$ 2>/dev/null; then
51378    as_ln_s='ln -s'
51379    # ... but there are two gotchas:
51380    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51381    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51382    # In both cases, we have to default to `cp -pR'.
51383    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51384      as_ln_s='cp -pR'
51385  elif ln conf$$.file conf$$ 2>/dev/null; then
51386    as_ln_s=ln
51387  else
51388    as_ln_s='cp -pR'
51389  fi
51390else
51391  as_ln_s='cp -pR'
51392fi
51393rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51394rmdir conf$$.dir 2>/dev/null
51395
51396
51397# as_fn_mkdir_p
51398# -------------
51399# Create "$as_dir" as a directory, including parents if necessary.
51400as_fn_mkdir_p ()
51401{
51402
51403  case $as_dir in #(
51404  -*) as_dir=./$as_dir;;
51405  esac
51406  test -d "$as_dir" || eval $as_mkdir_p || {
51407    as_dirs=
51408    while :; do
51409      case $as_dir in #(
51410      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51411      *) as_qdir=$as_dir;;
51412      esac
51413      as_dirs="'$as_qdir' $as_dirs"
51414      as_dir=`$as_dirname -- "$as_dir" ||
51415$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51416	 X"$as_dir" : 'X\(//\)[^/]' \| \
51417	 X"$as_dir" : 'X\(//\)$' \| \
51418	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51419$as_echo X"$as_dir" |
51420    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51421	    s//\1/
51422	    q
51423	  }
51424	  /^X\(\/\/\)[^/].*/{
51425	    s//\1/
51426	    q
51427	  }
51428	  /^X\(\/\/\)$/{
51429	    s//\1/
51430	    q
51431	  }
51432	  /^X\(\/\).*/{
51433	    s//\1/
51434	    q
51435	  }
51436	  s/.*/./; q'`
51437      test -d "$as_dir" && break
51438    done
51439    test -z "$as_dirs" || eval "mkdir $as_dirs"
51440  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51441
51442
51443} # as_fn_mkdir_p
51444if mkdir -p . 2>/dev/null; then
51445  as_mkdir_p='mkdir -p "$as_dir"'
51446else
51447  test -d ./-p && rmdir ./-p
51448  as_mkdir_p=false
51449fi
51450
51451
51452# as_fn_executable_p FILE
51453# -----------------------
51454# Test if FILE is an executable regular file.
51455as_fn_executable_p ()
51456{
51457  test -f "$1" && test -x "$1"
51458} # as_fn_executable_p
51459as_test_x='test -x'
51460as_executable_p=as_fn_executable_p
51461
51462# Sed expression to map a string onto a valid CPP name.
51463as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51464
51465# Sed expression to map a string onto a valid variable name.
51466as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51467
51468
51469exec 6>&1
51470## ----------------------------------- ##
51471## Main body of $CONFIG_STATUS script. ##
51472## ----------------------------------- ##
51473_ASEOF
51474test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51475
51476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51477# Save the log message, to keep $0 and so on meaningful, and to
51478# report actual input values of CONFIG_FILES etc. instead of their
51479# values after options handling.
51480ac_log="
51481This file was extended by OpenJDK $as_me jdk9, which was
51482generated by GNU Autoconf 2.69.  Invocation command line was
51483
51484  CONFIG_FILES    = $CONFIG_FILES
51485  CONFIG_HEADERS  = $CONFIG_HEADERS
51486  CONFIG_LINKS    = $CONFIG_LINKS
51487  CONFIG_COMMANDS = $CONFIG_COMMANDS
51488  $ $0 $@
51489
51490on `(hostname || uname -n) 2>/dev/null | sed 1q`
51491"
51492
51493_ACEOF
51494
51495case $ac_config_files in *"
51496"*) set x $ac_config_files; shift; ac_config_files=$*;;
51497esac
51498
51499case $ac_config_headers in *"
51500"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
51501esac
51502
51503
51504cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51505# Files that config.status was made for.
51506config_files="$ac_config_files"
51507config_headers="$ac_config_headers"
51508
51509_ACEOF
51510
51511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51512ac_cs_usage="\
51513\`$as_me' instantiates files and other configuration actions
51514from templates according to the current configuration.  Unless the files
51515and actions are specified as TAGs, all are instantiated by default.
51516
51517Usage: $0 [OPTION]... [TAG]...
51518
51519  -h, --help       print this help, then exit
51520  -V, --version    print version number and configuration settings, then exit
51521      --config     print configuration, then exit
51522  -q, --quiet, --silent
51523                   do not print progress messages
51524  -d, --debug      don't remove temporary files
51525      --recheck    update $as_me by reconfiguring in the same conditions
51526      --file=FILE[:TEMPLATE]
51527                   instantiate the configuration file FILE
51528      --header=FILE[:TEMPLATE]
51529                   instantiate the configuration header FILE
51530
51531Configuration files:
51532$config_files
51533
51534Configuration headers:
51535$config_headers
51536
51537Report bugs to <build-dev@openjdk.java.net>.
51538OpenJDK home page: <http://openjdk.java.net>."
51539
51540_ACEOF
51541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51542ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51543ac_cs_version="\\
51544OpenJDK config.status jdk9
51545configured by $0, generated by GNU Autoconf 2.69,
51546  with options \\"\$ac_cs_config\\"
51547
51548Copyright (C) 2012 Free Software Foundation, Inc.
51549This config.status script is free software; the Free Software Foundation
51550gives unlimited permission to copy, distribute and modify it."
51551
51552ac_pwd='$ac_pwd'
51553srcdir='$srcdir'
51554AWK='$AWK'
51555test -n "\$AWK" || AWK=awk
51556_ACEOF
51557
51558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51559# The default lists apply if the user does not specify any file.
51560ac_need_defaults=:
51561while test $# != 0
51562do
51563  case $1 in
51564  --*=?*)
51565    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51566    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51567    ac_shift=:
51568    ;;
51569  --*=)
51570    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51571    ac_optarg=
51572    ac_shift=:
51573    ;;
51574  *)
51575    ac_option=$1
51576    ac_optarg=$2
51577    ac_shift=shift
51578    ;;
51579  esac
51580
51581  case $ac_option in
51582  # Handling of the options.
51583  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51584    ac_cs_recheck=: ;;
51585  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51586    $as_echo "$ac_cs_version"; exit ;;
51587  --config | --confi | --conf | --con | --co | --c )
51588    $as_echo "$ac_cs_config"; exit ;;
51589  --debug | --debu | --deb | --de | --d | -d )
51590    debug=: ;;
51591  --file | --fil | --fi | --f )
51592    $ac_shift
51593    case $ac_optarg in
51594    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51595    '') as_fn_error $? "missing file argument" ;;
51596    esac
51597    as_fn_append CONFIG_FILES " '$ac_optarg'"
51598    ac_need_defaults=false;;
51599  --header | --heade | --head | --hea )
51600    $ac_shift
51601    case $ac_optarg in
51602    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51603    esac
51604    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
51605    ac_need_defaults=false;;
51606  --he | --h)
51607    # Conflict between --help and --header
51608    as_fn_error $? "ambiguous option: \`$1'
51609Try \`$0 --help' for more information.";;
51610  --help | --hel | -h )
51611    $as_echo "$ac_cs_usage"; exit ;;
51612  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51613  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51614    ac_cs_silent=: ;;
51615
51616  # This is an error.
51617  -*) as_fn_error $? "unrecognized option: \`$1'
51618Try \`$0 --help' for more information." ;;
51619
51620  *) as_fn_append ac_config_targets " $1"
51621     ac_need_defaults=false ;;
51622
51623  esac
51624  shift
51625done
51626
51627ac_configure_extra_args=
51628
51629if $ac_cs_silent; then
51630  exec 6>/dev/null
51631  ac_configure_extra_args="$ac_configure_extra_args --silent"
51632fi
51633
51634_ACEOF
51635cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51636if \$ac_cs_recheck; then
51637  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51638  shift
51639  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51640  CONFIG_SHELL='$SHELL'
51641  export CONFIG_SHELL
51642  exec "\$@"
51643fi
51644
51645_ACEOF
51646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51647exec 5>>config.log
51648{
51649  echo
51650  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51651## Running $as_me. ##
51652_ASBOX
51653  $as_echo "$ac_log"
51654} >&5
51655
51656_ACEOF
51657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51658_ACEOF
51659
51660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51661
51662# Handling of arguments.
51663for ac_config_target in $ac_config_targets
51664do
51665  case $ac_config_target in
51666    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
51667    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51668    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51669    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51670    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51671    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
51672    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51673
51674  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51675  esac
51676done
51677
51678
51679# If the user did not use the arguments to specify the items to instantiate,
51680# then the envvar interface is used.  Set only those that are not.
51681# We use the long form for the default assignment because of an extremely
51682# bizarre bug on SunOS 4.1.3.
51683if $ac_need_defaults; then
51684  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51685  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
51686fi
51687
51688# Have a temporary directory for convenience.  Make it in the build tree
51689# simply because there is no reason against having it here, and in addition,
51690# creating and moving files from /tmp can sometimes cause problems.
51691# Hook for its removal unless debugging.
51692# Note that there is a small window in which the directory will not be cleaned:
51693# after its creation but before its name has been assigned to `$tmp'.
51694$debug ||
51695{
51696  tmp= ac_tmp=
51697  trap 'exit_status=$?
51698  : "${ac_tmp:=$tmp}"
51699  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51700' 0
51701  trap 'as_fn_exit 1' 1 2 13 15
51702}
51703# Create a (secure) tmp directory for tmp files.
51704
51705{
51706  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51707  test -d "$tmp"
51708}  ||
51709{
51710  tmp=./conf$$-$RANDOM
51711  (umask 077 && mkdir "$tmp")
51712} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51713ac_tmp=$tmp
51714
51715# Set up the scripts for CONFIG_FILES section.
51716# No need to generate them if there are no CONFIG_FILES.
51717# This happens for instance with `./config.status config.h'.
51718if test -n "$CONFIG_FILES"; then
51719
51720
51721ac_cr=`echo X | tr X '\015'`
51722# On cygwin, bash can eat \r inside `` if the user requested igncr.
51723# But we know of no other shell where ac_cr would be empty at this
51724# point, so we can use a bashism as a fallback.
51725if test "x$ac_cr" = x; then
51726  eval ac_cr=\$\'\\r\'
51727fi
51728ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51729if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51730  ac_cs_awk_cr='\\r'
51731else
51732  ac_cs_awk_cr=$ac_cr
51733fi
51734
51735echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51736_ACEOF
51737
51738
51739{
51740  echo "cat >conf$$subs.awk <<_ACEOF" &&
51741  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51742  echo "_ACEOF"
51743} >conf$$subs.sh ||
51744  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51745ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51746ac_delim='%!_!# '
51747for ac_last_try in false false false false false :; do
51748  . ./conf$$subs.sh ||
51749    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51750
51751  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51752  if test $ac_delim_n = $ac_delim_num; then
51753    break
51754  elif $ac_last_try; then
51755    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51756  else
51757    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51758  fi
51759done
51760rm -f conf$$subs.sh
51761
51762cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51763cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51764_ACEOF
51765sed -n '
51766h
51767s/^/S["/; s/!.*/"]=/
51768p
51769g
51770s/^[^!]*!//
51771:repl
51772t repl
51773s/'"$ac_delim"'$//
51774t delim
51775:nl
51776h
51777s/\(.\{148\}\)..*/\1/
51778t more1
51779s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51780p
51781n
51782b repl
51783:more1
51784s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51785p
51786g
51787s/.\{148\}//
51788t nl
51789:delim
51790h
51791s/\(.\{148\}\)..*/\1/
51792t more2
51793s/["\\]/\\&/g; s/^/"/; s/$/"/
51794p
51795b
51796:more2
51797s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51798p
51799g
51800s/.\{148\}//
51801t delim
51802' <conf$$subs.awk | sed '
51803/^[^""]/{
51804  N
51805  s/\n//
51806}
51807' >>$CONFIG_STATUS || ac_write_fail=1
51808rm -f conf$$subs.awk
51809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51810_ACAWK
51811cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51812  for (key in S) S_is_set[key] = 1
51813  FS = ""
51814
51815}
51816{
51817  line = $ 0
51818  nfields = split(line, field, "@")
51819  substed = 0
51820  len = length(field[1])
51821  for (i = 2; i < nfields; i++) {
51822    key = field[i]
51823    keylen = length(key)
51824    if (S_is_set[key]) {
51825      value = S[key]
51826      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51827      len += length(value) + length(field[++i])
51828      substed = 1
51829    } else
51830      len += 1 + keylen
51831  }
51832
51833  print line
51834}
51835
51836_ACAWK
51837_ACEOF
51838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51839if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51840  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51841else
51842  cat
51843fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51844  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51845_ACEOF
51846
51847# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51848# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51849# trailing colons and then remove the whole line if VPATH becomes empty
51850# (actually we leave an empty line to preserve line numbers).
51851if test "x$srcdir" = x.; then
51852  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
51853h
51854s///
51855s/^/:/
51856s/[	 ]*$/:/
51857s/:\$(srcdir):/:/g
51858s/:\${srcdir}:/:/g
51859s/:@srcdir@:/:/g
51860s/^:*//
51861s/:*$//
51862x
51863s/\(=[	 ]*\).*/\1/
51864G
51865s/\n//
51866s/^[^=]*=[	 ]*$//
51867}'
51868fi
51869
51870cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51871fi # test -n "$CONFIG_FILES"
51872
51873# Set up the scripts for CONFIG_HEADERS section.
51874# No need to generate them if there are no CONFIG_HEADERS.
51875# This happens for instance with `./config.status Makefile'.
51876if test -n "$CONFIG_HEADERS"; then
51877cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
51878BEGIN {
51879_ACEOF
51880
51881# Transform confdefs.h into an awk script `defines.awk', embedded as
51882# here-document in config.status, that substitutes the proper values into
51883# config.h.in to produce config.h.
51884
51885# Create a delimiter string that does not exist in confdefs.h, to ease
51886# handling of long lines.
51887ac_delim='%!_!# '
51888for ac_last_try in false false :; do
51889  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
51890  if test -z "$ac_tt"; then
51891    break
51892  elif $ac_last_try; then
51893    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
51894  else
51895    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51896  fi
51897done
51898
51899# For the awk script, D is an array of macro values keyed by name,
51900# likewise P contains macro parameters if any.  Preserve backslash
51901# newline sequences.
51902
51903ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
51904sed -n '
51905s/.\{148\}/&'"$ac_delim"'/g
51906t rset
51907:rset
51908s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
51909t def
51910d
51911:def
51912s/\\$//
51913t bsnl
51914s/["\\]/\\&/g
51915s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51916D["\1"]=" \3"/p
51917s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
51918d
51919:bsnl
51920s/["\\]/\\&/g
51921s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
51922D["\1"]=" \3\\\\\\n"\\/p
51923t cont
51924s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
51925t cont
51926d
51927:cont
51928n
51929s/.\{148\}/&'"$ac_delim"'/g
51930t clear
51931:clear
51932s/\\$//
51933t bsnlc
51934s/["\\]/\\&/g; s/^/"/; s/$/"/p
51935d
51936:bsnlc
51937s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
51938b cont
51939' <confdefs.h | sed '
51940s/'"$ac_delim"'/"\\\
51941"/g' >>$CONFIG_STATUS || ac_write_fail=1
51942
51943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51944  for (key in D) D_is_set[key] = 1
51945  FS = ""
51946}
51947/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
51948  line = \$ 0
51949  split(line, arg, " ")
51950  if (arg[1] == "#") {
51951    defundef = arg[2]
51952    mac1 = arg[3]
51953  } else {
51954    defundef = substr(arg[1], 2)
51955    mac1 = arg[2]
51956  }
51957  split(mac1, mac2, "(") #)
51958  macro = mac2[1]
51959  prefix = substr(line, 1, index(line, defundef) - 1)
51960  if (D_is_set[macro]) {
51961    # Preserve the white space surrounding the "#".
51962    print prefix "define", macro P[macro] D[macro]
51963    next
51964  } else {
51965    # Replace #undef with comments.  This is necessary, for example,
51966    # in the case of _POSIX_SOURCE, which is predefined and required
51967    # on some systems where configure will not decide to define it.
51968    if (defundef == "undef") {
51969      print "/*", prefix defundef, macro, "*/"
51970      next
51971    }
51972  }
51973}
51974{ print }
51975_ACAWK
51976_ACEOF
51977cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51978  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
51979fi # test -n "$CONFIG_HEADERS"
51980
51981
51982eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
51983shift
51984for ac_tag
51985do
51986  case $ac_tag in
51987  :[FHLC]) ac_mode=$ac_tag; continue;;
51988  esac
51989  case $ac_mode$ac_tag in
51990  :[FHL]*:*);;
51991  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51992  :[FH]-) ac_tag=-:-;;
51993  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51994  esac
51995  ac_save_IFS=$IFS
51996  IFS=:
51997  set x $ac_tag
51998  IFS=$ac_save_IFS
51999  shift
52000  ac_file=$1
52001  shift
52002
52003  case $ac_mode in
52004  :L) ac_source=$1;;
52005  :[FH])
52006    ac_file_inputs=
52007    for ac_f
52008    do
52009      case $ac_f in
52010      -) ac_f="$ac_tmp/stdin";;
52011      *) # Look for the file first in the build tree, then in the source tree
52012	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52013	 # because $ac_f cannot contain `:'.
52014	 test -f "$ac_f" ||
52015	   case $ac_f in
52016	   [\\/$]*) false;;
52017	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52018	   esac ||
52019	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52020      esac
52021      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52022      as_fn_append ac_file_inputs " '$ac_f'"
52023    done
52024
52025    # Let's still pretend it is `configure' which instantiates (i.e., don't
52026    # use $as_me), people would be surprised to read:
52027    #    /* config.h.  Generated by config.status.  */
52028    configure_input='Generated from '`
52029	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52030	`' by configure.'
52031    if test x"$ac_file" != x-; then
52032      configure_input="$ac_file.  $configure_input"
52033      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52034$as_echo "$as_me: creating $ac_file" >&6;}
52035    fi
52036    # Neutralize special characters interpreted by sed in replacement strings.
52037    case $configure_input in #(
52038    *\&* | *\|* | *\\* )
52039       ac_sed_conf_input=`$as_echo "$configure_input" |
52040       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52041    *) ac_sed_conf_input=$configure_input;;
52042    esac
52043
52044    case $ac_tag in
52045    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52046      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52047    esac
52048    ;;
52049  esac
52050
52051  ac_dir=`$as_dirname -- "$ac_file" ||
52052$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52053	 X"$ac_file" : 'X\(//\)[^/]' \| \
52054	 X"$ac_file" : 'X\(//\)$' \| \
52055	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52056$as_echo X"$ac_file" |
52057    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52058	    s//\1/
52059	    q
52060	  }
52061	  /^X\(\/\/\)[^/].*/{
52062	    s//\1/
52063	    q
52064	  }
52065	  /^X\(\/\/\)$/{
52066	    s//\1/
52067	    q
52068	  }
52069	  /^X\(\/\).*/{
52070	    s//\1/
52071	    q
52072	  }
52073	  s/.*/./; q'`
52074  as_dir="$ac_dir"; as_fn_mkdir_p
52075  ac_builddir=.
52076
52077case "$ac_dir" in
52078.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52079*)
52080  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52081  # A ".." for each directory in $ac_dir_suffix.
52082  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52083  case $ac_top_builddir_sub in
52084  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52085  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52086  esac ;;
52087esac
52088ac_abs_top_builddir=$ac_pwd
52089ac_abs_builddir=$ac_pwd$ac_dir_suffix
52090# for backward compatibility:
52091ac_top_builddir=$ac_top_build_prefix
52092
52093case $srcdir in
52094  .)  # We are building in place.
52095    ac_srcdir=.
52096    ac_top_srcdir=$ac_top_builddir_sub
52097    ac_abs_top_srcdir=$ac_pwd ;;
52098  [\\/]* | ?:[\\/]* )  # Absolute name.
52099    ac_srcdir=$srcdir$ac_dir_suffix;
52100    ac_top_srcdir=$srcdir
52101    ac_abs_top_srcdir=$srcdir ;;
52102  *) # Relative name.
52103    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52104    ac_top_srcdir=$ac_top_build_prefix$srcdir
52105    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52106esac
52107ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52108
52109
52110  case $ac_mode in
52111  :F)
52112  #
52113  # CONFIG_FILE
52114  #
52115
52116_ACEOF
52117
52118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52119# If the template does not know about datarootdir, expand it.
52120# FIXME: This hack should be removed a few years after 2.60.
52121ac_datarootdir_hack=; ac_datarootdir_seen=
52122ac_sed_dataroot='
52123/datarootdir/ {
52124  p
52125  q
52126}
52127/@datadir@/p
52128/@docdir@/p
52129/@infodir@/p
52130/@localedir@/p
52131/@mandir@/p'
52132case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52133*datarootdir*) ac_datarootdir_seen=yes;;
52134*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52135  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52136$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52137_ACEOF
52138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52139  ac_datarootdir_hack='
52140  s&@datadir@&$datadir&g
52141  s&@docdir@&$docdir&g
52142  s&@infodir@&$infodir&g
52143  s&@localedir@&$localedir&g
52144  s&@mandir@&$mandir&g
52145  s&\\\${datarootdir}&$datarootdir&g' ;;
52146esac
52147_ACEOF
52148
52149# Neutralize VPATH when `$srcdir' = `.'.
52150# Shell code in configure.ac might set extrasub.
52151# FIXME: do we really want to maintain this feature?
52152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52153ac_sed_extra="$ac_vpsub
52154$extrasub
52155_ACEOF
52156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52157:t
52158/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52159s|@configure_input@|$ac_sed_conf_input|;t t
52160s&@top_builddir@&$ac_top_builddir_sub&;t t
52161s&@top_build_prefix@&$ac_top_build_prefix&;t t
52162s&@srcdir@&$ac_srcdir&;t t
52163s&@abs_srcdir@&$ac_abs_srcdir&;t t
52164s&@top_srcdir@&$ac_top_srcdir&;t t
52165s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52166s&@builddir@&$ac_builddir&;t t
52167s&@abs_builddir@&$ac_abs_builddir&;t t
52168s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52169$ac_datarootdir_hack
52170"
52171eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52172  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52173
52174test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52175  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52176  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52177      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52178  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52179which seems to be undefined.  Please make sure it is defined" >&5
52180$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52181which seems to be undefined.  Please make sure it is defined" >&2;}
52182
52183  rm -f "$ac_tmp/stdin"
52184  case $ac_file in
52185  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52186  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52187  esac \
52188  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52189 ;;
52190  :H)
52191  #
52192  # CONFIG_HEADER
52193  #
52194  if test x"$ac_file" != x-; then
52195    {
52196      $as_echo "/* $configure_input  */" \
52197      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
52198    } >"$ac_tmp/config.h" \
52199      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52200    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
52201      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
52202$as_echo "$as_me: $ac_file is unchanged" >&6;}
52203    else
52204      rm -f "$ac_file"
52205      mv "$ac_tmp/config.h" "$ac_file" \
52206	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
52207    fi
52208  else
52209    $as_echo "/* $configure_input  */" \
52210      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
52211      || as_fn_error $? "could not create -" "$LINENO" 5
52212  fi
52213 ;;
52214
52215
52216  esac
52217
52218done # for ac_tag
52219
52220
52221as_fn_exit 0
52222_ACEOF
52223ac_clean_files=$ac_clean_files_save
52224
52225test $ac_write_fail = 0 ||
52226  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52227
52228
52229# configure is writing to config.log, and then calls config.status.
52230# config.status does its own redirection, appending to config.log.
52231# Unfortunately, on DOS this fails, as config.log is still kept open
52232# by configure, so config.status won't be able to write to it; its
52233# output is simply discarded.  So we exec the FD to /dev/null,
52234# effectively closing config.log, so it can be properly (re)opened and
52235# appended to by config.status.  When coming back to configure, we
52236# need to make the FD available again.
52237if test "$no_create" != yes; then
52238  ac_cs_success=:
52239  ac_config_status_args=
52240  test "$silent" = yes &&
52241    ac_config_status_args="$ac_config_status_args --quiet"
52242  exec 5>/dev/null
52243  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52244  exec 5>>config.log
52245  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52246  # would make configure fail if this is the last instruction.
52247  $ac_cs_success || as_fn_exit 1
52248fi
52249if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52250  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52251$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52252fi
52253
52254
52255# Try to move the config.log file to the output directory.
52256if test -e ./config.log; then
52257  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52258fi
52259
52260# Make the compare script executable
52261$CHMOD +x $OUTPUT_ROOT/compare.sh
52262
52263# Finally output some useful information to the user
52264
52265  # Finally output some useful information to the user
52266
52267  printf "\n"
52268  printf "====================================================\n"
52269  if test "x$no_create" != "xyes"; then
52270    if test "x$IS_RECONFIGURE" != "xyes"; then
52271      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
52272    else
52273      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
52274    fi
52275  else
52276    if test "x$IS_RECONFIGURE" != "xyes"; then
52277      printf "A configuration has been successfully checked but not created\n"
52278    else
52279      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
52280    fi
52281  fi
52282  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52283    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52284  else
52285    printf "using default settings.\n"
52286  fi
52287
52288  printf "\n"
52289  printf "Configuration summary:\n"
52290  printf "* Debug level:    $DEBUG_LEVEL\n"
52291  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52292  printf "* JDK variant:    $JDK_VARIANT\n"
52293  printf "* JVM variants:   $with_jvm_variants\n"
52294  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52295
52296  printf "\n"
52297  printf "Tools summary:\n"
52298  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52299    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52300  fi
52301  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52302  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52303  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52304  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52305
52306  printf "\n"
52307  printf "Build performance summary:\n"
52308  printf "* Cores to use:   $JOBS\n"
52309  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52310  if test "x$CCACHE_STATUS" != "x"; then
52311    printf "* ccache status:  $CCACHE_STATUS\n"
52312  fi
52313  printf "\n"
52314
52315  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52316    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52317    printf "will result in longer build times.\n"
52318    printf "\n"
52319  fi
52320
52321  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52322    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52323    printf "These are not respected, and will be ignored. It is recommended\n"
52324    printf "that you clean your environment. The following variables are set:\n"
52325    printf "$FOUND_ALT_VARIABLES\n"
52326    printf "\n"
52327  fi
52328
52329  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52330    printf "WARNING: Your build output directory is not on a local disk.\n"
52331    printf "This will severely degrade build performance!\n"
52332    printf "It is recommended that you create an output directory on a local disk,\n"
52333    printf "and run the configure script again from that directory.\n"
52334    printf "\n"
52335  fi
52336
52337  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52338    printf "WARNING: The result of this configuration has overridden an older\n"
52339    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52340    printf "proper build. Failure to do so might result in strange build problems.\n"
52341    printf "\n"
52342  fi
52343
52344  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52345    printf "WARNING: The result of this configuration was not saved.\n"
52346    printf "You should run without '--no-create | -n' to create the configuration.\n"
52347    printf "\n"
52348  fi
52349
52350
52351