generated-configure.sh revision 1350:0282b3f5f749
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCR_DLL
649LIBCXX
650LLVM_LIBS
651LLVM_LDFLAGS
652LLVM_CFLAGS
653LLVM_CONFIG
654LIBFFI_LIBS
655LIBFFI_CFLAGS
656STATIC_CXX_SETTING
657LIBDL
658LIBM
659LIBZIP_CAN_USE_MMAP
660USE_EXTERNAL_LIBZ
661USE_EXTERNAL_LIBPNG
662PNG_LIBS
663PNG_CFLAGS
664USE_EXTERNAL_LCMS
665LCMS_LIBS
666LCMS_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669ALSA_LIBS
670ALSA_CFLAGS
671FREETYPE_BUNDLE_LIB_PATH
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674CUPS_CFLAGS
675X_EXTRA_LIBS
676X_LIBS
677X_PRE_LIBS
678X_CFLAGS
679XMKMF
680FIXPATH
681ZIP_DEBUGINFO_FILES
682ENABLE_DEBUG_SYMBOLS
683CFLAGS_WARNINGS_ARE_ERRORS
684COMPILER_SUPPORTS_TARGET_BITS_FLAG
685ZERO_ARCHFLAG
686LDFLAGS_CXX_JDK
687LDFLAGS_JDKEXE_SUFFIX
688LDFLAGS_JDKLIB_SUFFIX
689LDFLAGS_JDKEXE
690LDFLAGS_JDKLIB
691CXXFLAGS_JDKEXE
692CXXFLAGS_JDKLIB
693CFLAGS_JDKEXE
694CFLAGS_JDKLIB
695MACOSX_VERSION_MIN
696LEGACY_EXTRA_LDFLAGS
697LEGACY_EXTRA_CXXFLAGS
698LEGACY_EXTRA_CFLAGS
699CXX_O_FLAG_NONE
700CXX_O_FLAG_DEBUG
701CXX_O_FLAG_NORM
702CXX_O_FLAG_HI
703CXX_O_FLAG_HIGHEST
704C_O_FLAG_NONE
705C_O_FLAG_DEBUG
706C_O_FLAG_NORM
707C_O_FLAG_HI
708C_O_FLAG_HIGHEST
709CXXFLAGS_DEBUG_OPTIONS
710CFLAGS_DEBUG_OPTIONS
711CXXFLAGS_DEBUG_SYMBOLS
712CFLAGS_DEBUG_SYMBOLS
713CXX_FLAG_DEPS
714C_FLAG_DEPS
715SET_SHARED_LIBRARY_MAPFILE
716SET_SHARED_LIBRARY_NAME
717SET_SHARED_LIBRARY_ORIGIN
718SET_EXECUTABLE_ORIGIN
719SHARED_LIBRARY_FLAGS
720CXX_FLAG_REORDER
721C_FLAG_REORDER
722SYSROOT_LDFLAGS
723SYSROOT_CFLAGS
724RC_FLAGS
725AR_OUT_OPTION
726LD_OUT_OPTION
727EXE_OUT_OPTION
728CC_OUT_OPTION
729POST_MCS_CMD
730POST_STRIP_CMD
731ARFLAGS
732COMPILER_TARGET_BITS_FLAG
733JT_HOME
734JTREGEXE
735USING_BROKEN_SUSE_LD
736PACKAGE_PATH
737LDEXECXX
738LDEXE
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747ac_ct_OBJDUMP
748OBJDUMP
749ac_ct_OBJCOPY
750OBJCOPY
751ac_ct_NM
752ac_ct_STRIP
753MCS
754GNM
755NM
756STRIP
757MSBUILD
758DUMPBIN
759RC
760MT
761LIPO
762ac_ct_OBJC
763OBJCFLAGS
764OBJC
765ac_ct_AR
766AR
767AS
768LDCXX
769LD
770CXXCPP
771CPP
772ac_ct_CXX
773CXXFLAGS
774CXX
775ac_ct_PROPER_COMPILER_CXX
776PROPER_COMPILER_CXX
777TOOLCHAIN_PATH_CXX
778POTENTIAL_CXX
779OBJEXT
780EXEEXT
781ac_ct_CC
782CPPFLAGS
783LDFLAGS
784CFLAGS
785CC
786ac_ct_PROPER_COMPILER_CC
787PROPER_COMPILER_CC
788TOOLCHAIN_PATH_CC
789POTENTIAL_CC
790VS_LIB
791VS_INCLUDE
792VS_PATH
793CYGWIN_LINK
794EXE_SUFFIX
795OBJ_SUFFIX
796STATIC_LIBRARY
797SHARED_LIBRARY
798STATIC_LIBRARY_SUFFIX
799SHARED_LIBRARY_SUFFIX
800LIBRARY_PREFIX
801TOOLCHAIN_TYPE
802BUILD_HOTSPOT
803HOTSPOT_DIST
804BUILD_OUTPUT
805OVERRIDE_SRC_ROOT
806ADD_SRC_ROOT
807JDK_TOPDIR
808NASHORN_TOPDIR
809HOTSPOT_TOPDIR
810JAXWS_TOPDIR
811JAXP_TOPDIR
812CORBA_TOPDIR
813LANGTOOLS_TOPDIR
814JAVAC_FLAGS
815BOOT_JDK_SOURCETARGET
816JARSIGNER
817NATIVE2ASCII
818JAR
819JAVAH
820JAVAC
821JAVA
822BOOT_JDK
823BOOT_TOOLSJAR
824BOOT_RTJAR
825JAVA_CHECK
826JAVAC_CHECK
827COOKED_BUILD_NUMBER
828JDK_VERSION
829COPYRIGHT_YEAR
830MACOSX_BUNDLE_ID_BASE
831MACOSX_BUNDLE_NAME_BASE
832COMPANY_NAME
833JDK_RC_PLATFORM_NAME
834PRODUCT_SUFFIX
835PRODUCT_NAME
836LAUNCHER_NAME
837MILESTONE
838JDK_BUILD_NUMBER
839JDK_UPDATE_VERSION
840JDK_MICRO_VERSION
841JDK_MINOR_VERSION
842JDK_MAJOR_VERSION
843USER_RELEASE_SUFFIX
844COMPRESS_JARS
845RMICONNECTOR_IIOP
846UNLIMITED_CRYPTO
847CACERTS_FILE
848TEST_IN_BUILD
849BUILD_HEADLESS
850SUPPORT_HEADFUL
851SUPPORT_HEADLESS
852BDEPS_FTP
853BDEPS_UNZIP
854OS_VERSION_MICRO
855OS_VERSION_MINOR
856OS_VERSION_MAJOR
857PKG_CONFIG
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862TIME
863STAT
864HG
865READELF
866OTOOL
867LDD
868ZIP
869UNZIP
870FIND_DELETE
871OUTPUT_SYNC
872OUTPUT_SYNC_SUPPORTED
873MAKE
874CHECK_TOOLSDIR_MAKE
875CHECK_TOOLSDIR_GMAKE
876CHECK_MAKE
877CHECK_GMAKE
878PKGHANDLER
879OUTPUT_ROOT
880CONF_NAME
881SPEC
882SDKROOT
883XCODEBUILD
884BUILD_VARIANT_RELEASE
885DEBUG_CLASSFILES
886FASTDEBUG
887VARIANT
888DEBUG_LEVEL
889MACOSX_UNIVERSAL
890INCLUDE_SA
891JVM_VARIANT_CORE
892JVM_VARIANT_ZEROSHARK
893JVM_VARIANT_ZERO
894JVM_VARIANT_KERNEL
895JVM_VARIANT_MINIMAL1
896JVM_VARIANT_CLIENT
897JVM_VARIANT_SERVER
898JVM_VARIANTS
899JVM_INTERPRETER
900JDK_VARIANT
901SET_OPENJDK
902BUILD_LOG_WRAPPER
903BUILD_LOG_PREVIOUS
904BUILD_LOG
905TOPDIR
906PATH_SEP
907ZERO_ARCHDEF
908DEFINE_CROSS_COMPILE_ARCH
909LP64
910OPENJDK_TARGET_OS_EXPORT_DIR
911OPENJDK_TARGET_OS_API_DIR
912OPENJDK_TARGET_CPU_JLI_CFLAGS
913OPENJDK_TARGET_CPU_OSARCH
914OPENJDK_TARGET_CPU_ISADIR
915OPENJDK_TARGET_CPU_LIBDIR
916OPENJDK_TARGET_CPU_LEGACY_LIB
917OPENJDK_TARGET_CPU_LEGACY
918REQUIRED_OS_VERSION
919REQUIRED_OS_NAME
920COMPILE_TYPE
921OPENJDK_TARGET_CPU_ENDIAN
922OPENJDK_TARGET_CPU_BITS
923OPENJDK_TARGET_CPU_ARCH
924OPENJDK_TARGET_CPU
925OPENJDK_TARGET_OS_ENV
926OPENJDK_TARGET_OS_API
927OPENJDK_TARGET_OS
928OPENJDK_BUILD_CPU_ENDIAN
929OPENJDK_BUILD_CPU_BITS
930OPENJDK_BUILD_CPU_ARCH
931OPENJDK_BUILD_CPU
932OPENJDK_BUILD_OS_ENV
933OPENJDK_BUILD_OS_API
934OPENJDK_BUILD_OS
935OPENJDK_BUILD_AUTOCONF_NAME
936OPENJDK_TARGET_AUTOCONF_NAME
937target_os
938target_vendor
939target_cpu
940target
941host_os
942host_vendor
943host_cpu
944host
945build_os
946build_vendor
947build_cpu
948build
949CPIO
950SETFILE
951DF
952READLINK
953CYGPATH
954SED
955FGREP
956EGREP
957GREP
958AWK
959XARGS
960WHICH
961WC
962UNIQ
963UNAME
964TR
965TOUCH
966TEE
967TAR
968TAIL
969SORT
970SH
971RM
972PRINTF
973NAWK
974MV
975MKTEMP
976MKDIR
977LS
978LN
979HEAD
980FIND
981FILE
982EXPR
983ECHO
984DIRNAME
985DIFF
986DATE
987CUT
988CP
989COMM
990CMP
991CHMOD
992CAT
993BASH
994BASENAME
995DATE_WHEN_CONFIGURED
996CONFIGURE_COMMAND_LINE
997target_alias
998host_alias
999build_alias
1000LIBS
1001ECHO_T
1002ECHO_N
1003ECHO_C
1004DEFS
1005mandir
1006localedir
1007libdir
1008psdir
1009pdfdir
1010dvidir
1011htmldir
1012infodir
1013docdir
1014oldincludedir
1015includedir
1016localstatedir
1017sharedstatedir
1018sysconfdir
1019datadir
1020datarootdir
1021libexecdir
1022sbindir
1023bindir
1024program_transform_name
1025prefix
1026exec_prefix
1027PACKAGE_URL
1028PACKAGE_BUGREPORT
1029PACKAGE_STRING
1030PACKAGE_VERSION
1031PACKAGE_TARNAME
1032PACKAGE_NAME
1033PATH_SEPARATOR
1034SHELL'
1035ac_subst_files=''
1036ac_user_opts='
1037enable_option_checking
1038with_target_bits
1039enable_openjdk_only
1040with_custom_make_dir
1041with_jdk_variant
1042with_jvm_interpreter
1043with_jvm_variants
1044enable_debug
1045with_debug_level
1046with_devkit
1047with_sys_root
1048with_sysroot
1049with_tools_dir
1050with_toolchain_path
1051with_extra_path
1052with_sdk_name
1053with_conf_name
1054with_output_sync
1055with_builddeps_conf
1056with_builddeps_server
1057with_builddeps_dir
1058with_builddeps_group
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063enable_rmiconnector_iiop
1064with_milestone
1065with_update_version
1066with_user_release_suffix
1067with_build_number
1068with_boot_jdk
1069with_add_source_root
1070with_override_source_root
1071with_adds_and_overrides
1072with_override_langtools
1073with_override_corba
1074with_override_jaxp
1075with_override_jaxws
1076with_override_hotspot
1077with_override_nashorn
1078with_override_jdk
1079with_import_hotspot
1080with_toolchain_type
1081with_jtreg
1082with_extra_cflags
1083with_extra_cxxflags
1084with_extra_ldflags
1085enable_debug_symbols
1086enable_zip_debug_info
1087with_x
1088with_cups
1089with_cups_include
1090with_freetype
1091with_freetype_include
1092with_freetype_lib
1093with_freetype_src
1094enable_freetype_bundling
1095with_alsa
1096with_alsa_include
1097with_alsa_lib
1098with_libjpeg
1099with_giflib
1100with_lcms
1101with_libpng
1102with_zlib
1103with_stdc__lib
1104with_msvcr_dll
1105with_dxsdk
1106with_dxsdk_lib
1107with_dxsdk_include
1108with_num_cores
1109with_memory_size
1110with_jobs
1111with_boot_jdk_jvmargs
1112with_sjavac_server_java
1113enable_sjavac
1114enable_precompiled_headers
1115enable_ccache
1116with_ccache_dir
1117'
1118      ac_precious_vars='build_alias
1119host_alias
1120target_alias
1121BASENAME
1122BASH
1123CAT
1124CHMOD
1125CMP
1126COMM
1127CP
1128CUT
1129DATE
1130DIFF
1131DIRNAME
1132ECHO
1133EXPR
1134FILE
1135FIND
1136HEAD
1137LN
1138LS
1139MKDIR
1140MKTEMP
1141MV
1142NAWK
1143PRINTF
1144RM
1145SH
1146SORT
1147TAIL
1148TAR
1149TEE
1150TOUCH
1151TR
1152UNAME
1153UNIQ
1154WC
1155WHICH
1156XARGS
1157AWK
1158GREP
1159EGREP
1160FGREP
1161SED
1162CYGPATH
1163READLINK
1164DF
1165SETFILE
1166CPIO
1167UNZIP
1168ZIP
1169LDD
1170OTOOL
1171READELF
1172HG
1173STAT
1174TIME
1175DSYMUTIL
1176XATTR
1177CODESIGN
1178PKG_CONFIG
1179JAVA
1180JAVAC
1181JAVAH
1182JAR
1183NATIVE2ASCII
1184JARSIGNER
1185CC
1186CFLAGS
1187LDFLAGS
1188LIBS
1189CPPFLAGS
1190CXX
1191CXXFLAGS
1192CCC
1193CPP
1194CXXCPP
1195AS
1196AR
1197OBJC
1198OBJCFLAGS
1199LIPO
1200STRIP
1201NM
1202GNM
1203MCS
1204OBJCOPY
1205OBJDUMP
1206BUILD_CC
1207BUILD_CXX
1208BUILD_LD
1209JTREGEXE
1210XMKMF
1211FREETYPE_CFLAGS
1212FREETYPE_LIBS
1213ALSA_CFLAGS
1214ALSA_LIBS
1215LCMS_CFLAGS
1216LCMS_LIBS
1217PNG_CFLAGS
1218PNG_LIBS
1219LIBFFI_CFLAGS
1220LIBFFI_LIBS
1221CCACHE'
1222
1223
1224# Initialize some variables set by options.
1225ac_init_help=
1226ac_init_version=false
1227ac_unrecognized_opts=
1228ac_unrecognized_sep=
1229# The variables have the same names as the options, with
1230# dashes changed to underlines.
1231cache_file=/dev/null
1232exec_prefix=NONE
1233no_create=
1234no_recursion=
1235prefix=NONE
1236program_prefix=NONE
1237program_suffix=NONE
1238program_transform_name=s,x,x,
1239silent=
1240site=
1241srcdir=
1242verbose=
1243x_includes=NONE
1244x_libraries=NONE
1245
1246# Installation directory options.
1247# These are left unexpanded so users can "make install exec_prefix=/foo"
1248# and all the variables that are supposed to be based on exec_prefix
1249# by default will actually change.
1250# Use braces instead of parens because sh, perl, etc. also accept them.
1251# (The list follows the same order as the GNU Coding Standards.)
1252bindir='${exec_prefix}/bin'
1253sbindir='${exec_prefix}/sbin'
1254libexecdir='${exec_prefix}/libexec'
1255datarootdir='${prefix}/share'
1256datadir='${datarootdir}'
1257sysconfdir='${prefix}/etc'
1258sharedstatedir='${prefix}/com'
1259localstatedir='${prefix}/var'
1260includedir='${prefix}/include'
1261oldincludedir='/usr/include'
1262docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1263infodir='${datarootdir}/info'
1264htmldir='${docdir}'
1265dvidir='${docdir}'
1266pdfdir='${docdir}'
1267psdir='${docdir}'
1268libdir='${exec_prefix}/lib'
1269localedir='${datarootdir}/locale'
1270mandir='${datarootdir}/man'
1271
1272ac_prev=
1273ac_dashdash=
1274for ac_option
1275do
1276  # If the previous option needs an argument, assign it.
1277  if test -n "$ac_prev"; then
1278    eval $ac_prev=\$ac_option
1279    ac_prev=
1280    continue
1281  fi
1282
1283  case $ac_option in
1284  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1285  *=)   ac_optarg= ;;
1286  *)    ac_optarg=yes ;;
1287  esac
1288
1289  # Accept the important Cygnus configure options, so we can diagnose typos.
1290
1291  case $ac_dashdash$ac_option in
1292  --)
1293    ac_dashdash=yes ;;
1294
1295  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1296    ac_prev=bindir ;;
1297  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1298    bindir=$ac_optarg ;;
1299
1300  -build | --build | --buil | --bui | --bu)
1301    ac_prev=build_alias ;;
1302  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1303    build_alias=$ac_optarg ;;
1304
1305  -cache-file | --cache-file | --cache-fil | --cache-fi \
1306  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1307    ac_prev=cache_file ;;
1308  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1309  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1310    cache_file=$ac_optarg ;;
1311
1312  --config-cache | -C)
1313    cache_file=config.cache ;;
1314
1315  -datadir | --datadir | --datadi | --datad)
1316    ac_prev=datadir ;;
1317  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1318    datadir=$ac_optarg ;;
1319
1320  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1321  | --dataroo | --dataro | --datar)
1322    ac_prev=datarootdir ;;
1323  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1324  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1325    datarootdir=$ac_optarg ;;
1326
1327  -disable-* | --disable-*)
1328    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1329    # Reject names that are not valid shell variable names.
1330    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1331      as_fn_error $? "invalid feature name: $ac_useropt"
1332    ac_useropt_orig=$ac_useropt
1333    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1334    case $ac_user_opts in
1335      *"
1336"enable_$ac_useropt"
1337"*) ;;
1338      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1339	 ac_unrecognized_sep=', ';;
1340    esac
1341    eval enable_$ac_useropt=no ;;
1342
1343  -docdir | --docdir | --docdi | --doc | --do)
1344    ac_prev=docdir ;;
1345  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1346    docdir=$ac_optarg ;;
1347
1348  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1349    ac_prev=dvidir ;;
1350  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1351    dvidir=$ac_optarg ;;
1352
1353  -enable-* | --enable-*)
1354    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1355    # Reject names that are not valid shell variable names.
1356    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1357      as_fn_error $? "invalid feature name: $ac_useropt"
1358    ac_useropt_orig=$ac_useropt
1359    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1360    case $ac_user_opts in
1361      *"
1362"enable_$ac_useropt"
1363"*) ;;
1364      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1365	 ac_unrecognized_sep=', ';;
1366    esac
1367    eval enable_$ac_useropt=\$ac_optarg ;;
1368
1369  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1370  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1371  | --exec | --exe | --ex)
1372    ac_prev=exec_prefix ;;
1373  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1374  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1375  | --exec=* | --exe=* | --ex=*)
1376    exec_prefix=$ac_optarg ;;
1377
1378  -gas | --gas | --ga | --g)
1379    # Obsolete; use --with-gas.
1380    with_gas=yes ;;
1381
1382  -help | --help | --hel | --he | -h)
1383    ac_init_help=long ;;
1384  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1385    ac_init_help=recursive ;;
1386  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1387    ac_init_help=short ;;
1388
1389  -host | --host | --hos | --ho)
1390    ac_prev=host_alias ;;
1391  -host=* | --host=* | --hos=* | --ho=*)
1392    host_alias=$ac_optarg ;;
1393
1394  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1395    ac_prev=htmldir ;;
1396  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1397  | --ht=*)
1398    htmldir=$ac_optarg ;;
1399
1400  -includedir | --includedir | --includedi | --included | --include \
1401  | --includ | --inclu | --incl | --inc)
1402    ac_prev=includedir ;;
1403  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1404  | --includ=* | --inclu=* | --incl=* | --inc=*)
1405    includedir=$ac_optarg ;;
1406
1407  -infodir | --infodir | --infodi | --infod | --info | --inf)
1408    ac_prev=infodir ;;
1409  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1410    infodir=$ac_optarg ;;
1411
1412  -libdir | --libdir | --libdi | --libd)
1413    ac_prev=libdir ;;
1414  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1415    libdir=$ac_optarg ;;
1416
1417  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1418  | --libexe | --libex | --libe)
1419    ac_prev=libexecdir ;;
1420  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1421  | --libexe=* | --libex=* | --libe=*)
1422    libexecdir=$ac_optarg ;;
1423
1424  -localedir | --localedir | --localedi | --localed | --locale)
1425    ac_prev=localedir ;;
1426  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1427    localedir=$ac_optarg ;;
1428
1429  -localstatedir | --localstatedir | --localstatedi | --localstated \
1430  | --localstate | --localstat | --localsta | --localst | --locals)
1431    ac_prev=localstatedir ;;
1432  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1433  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1434    localstatedir=$ac_optarg ;;
1435
1436  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1437    ac_prev=mandir ;;
1438  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1439    mandir=$ac_optarg ;;
1440
1441  -nfp | --nfp | --nf)
1442    # Obsolete; use --without-fp.
1443    with_fp=no ;;
1444
1445  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1446  | --no-cr | --no-c | -n)
1447    no_create=yes ;;
1448
1449  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1450  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1451    no_recursion=yes ;;
1452
1453  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1454  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1455  | --oldin | --oldi | --old | --ol | --o)
1456    ac_prev=oldincludedir ;;
1457  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1458  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1459  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1460    oldincludedir=$ac_optarg ;;
1461
1462  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1463    ac_prev=prefix ;;
1464  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1465    prefix=$ac_optarg ;;
1466
1467  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1468  | --program-pre | --program-pr | --program-p)
1469    ac_prev=program_prefix ;;
1470  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1471  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1472    program_prefix=$ac_optarg ;;
1473
1474  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1475  | --program-suf | --program-su | --program-s)
1476    ac_prev=program_suffix ;;
1477  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1478  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1479    program_suffix=$ac_optarg ;;
1480
1481  -program-transform-name | --program-transform-name \
1482  | --program-transform-nam | --program-transform-na \
1483  | --program-transform-n | --program-transform- \
1484  | --program-transform | --program-transfor \
1485  | --program-transfo | --program-transf \
1486  | --program-trans | --program-tran \
1487  | --progr-tra | --program-tr | --program-t)
1488    ac_prev=program_transform_name ;;
1489  -program-transform-name=* | --program-transform-name=* \
1490  | --program-transform-nam=* | --program-transform-na=* \
1491  | --program-transform-n=* | --program-transform-=* \
1492  | --program-transform=* | --program-transfor=* \
1493  | --program-transfo=* | --program-transf=* \
1494  | --program-trans=* | --program-tran=* \
1495  | --progr-tra=* | --program-tr=* | --program-t=*)
1496    program_transform_name=$ac_optarg ;;
1497
1498  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1499    ac_prev=pdfdir ;;
1500  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1501    pdfdir=$ac_optarg ;;
1502
1503  -psdir | --psdir | --psdi | --psd | --ps)
1504    ac_prev=psdir ;;
1505  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1506    psdir=$ac_optarg ;;
1507
1508  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1509  | -silent | --silent | --silen | --sile | --sil)
1510    silent=yes ;;
1511
1512  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1513    ac_prev=sbindir ;;
1514  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1515  | --sbi=* | --sb=*)
1516    sbindir=$ac_optarg ;;
1517
1518  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1519  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1520  | --sharedst | --shareds | --shared | --share | --shar \
1521  | --sha | --sh)
1522    ac_prev=sharedstatedir ;;
1523  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1524  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1525  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1526  | --sha=* | --sh=*)
1527    sharedstatedir=$ac_optarg ;;
1528
1529  -site | --site | --sit)
1530    ac_prev=site ;;
1531  -site=* | --site=* | --sit=*)
1532    site=$ac_optarg ;;
1533
1534  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1535    ac_prev=srcdir ;;
1536  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1537    srcdir=$ac_optarg ;;
1538
1539  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1540  | --syscon | --sysco | --sysc | --sys | --sy)
1541    ac_prev=sysconfdir ;;
1542  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1543  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1544    sysconfdir=$ac_optarg ;;
1545
1546  -target | --target | --targe | --targ | --tar | --ta | --t)
1547    ac_prev=target_alias ;;
1548  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1549    target_alias=$ac_optarg ;;
1550
1551  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1552    verbose=yes ;;
1553
1554  -version | --version | --versio | --versi | --vers | -V)
1555    ac_init_version=: ;;
1556
1557  -with-* | --with-*)
1558    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1559    # Reject names that are not valid shell variable names.
1560    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1561      as_fn_error $? "invalid package name: $ac_useropt"
1562    ac_useropt_orig=$ac_useropt
1563    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1564    case $ac_user_opts in
1565      *"
1566"with_$ac_useropt"
1567"*) ;;
1568      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1569	 ac_unrecognized_sep=', ';;
1570    esac
1571    eval with_$ac_useropt=\$ac_optarg ;;
1572
1573  -without-* | --without-*)
1574    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1575    # Reject names that are not valid shell variable names.
1576    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1577      as_fn_error $? "invalid package name: $ac_useropt"
1578    ac_useropt_orig=$ac_useropt
1579    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1580    case $ac_user_opts in
1581      *"
1582"with_$ac_useropt"
1583"*) ;;
1584      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1585	 ac_unrecognized_sep=', ';;
1586    esac
1587    eval with_$ac_useropt=no ;;
1588
1589  --x)
1590    # Obsolete; use --with-x.
1591    with_x=yes ;;
1592
1593  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1594  | --x-incl | --x-inc | --x-in | --x-i)
1595    ac_prev=x_includes ;;
1596  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1597  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1598    x_includes=$ac_optarg ;;
1599
1600  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1601  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1602    ac_prev=x_libraries ;;
1603  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1604  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1605    x_libraries=$ac_optarg ;;
1606
1607  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1608Try \`$0 --help' for more information"
1609    ;;
1610
1611  *=*)
1612    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1613    # Reject names that are not valid shell variable names.
1614    case $ac_envvar in #(
1615      '' | [0-9]* | *[!_$as_cr_alnum]* )
1616      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1617    esac
1618    eval $ac_envvar=\$ac_optarg
1619    export $ac_envvar ;;
1620
1621  *)
1622    # FIXME: should be removed in autoconf 3.0.
1623    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1624    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1625      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1626    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1627    ;;
1628
1629  esac
1630done
1631
1632if test -n "$ac_prev"; then
1633  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1634  as_fn_error $? "missing argument to $ac_option"
1635fi
1636
1637if test -n "$ac_unrecognized_opts"; then
1638  case $enable_option_checking in
1639    no) ;;
1640    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1641    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1642  esac
1643fi
1644
1645# Check all directory arguments for consistency.
1646for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1647		datadir sysconfdir sharedstatedir localstatedir includedir \
1648		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1649		libdir localedir mandir
1650do
1651  eval ac_val=\$$ac_var
1652  # Remove trailing slashes.
1653  case $ac_val in
1654    */ )
1655      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1656      eval $ac_var=\$ac_val;;
1657  esac
1658  # Be sure to have absolute directory names.
1659  case $ac_val in
1660    [\\/$]* | ?:[\\/]* )  continue;;
1661    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1662  esac
1663  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1664done
1665
1666# There might be people who depend on the old broken behavior: `$host'
1667# used to hold the argument of --host etc.
1668# FIXME: To remove some day.
1669build=$build_alias
1670host=$host_alias
1671target=$target_alias
1672
1673# FIXME: To remove some day.
1674if test "x$host_alias" != x; then
1675  if test "x$build_alias" = x; then
1676    cross_compiling=maybe
1677  elif test "x$build_alias" != "x$host_alias"; then
1678    cross_compiling=yes
1679  fi
1680fi
1681
1682ac_tool_prefix=
1683test -n "$host_alias" && ac_tool_prefix=$host_alias-
1684
1685test "$silent" = yes && exec 6>/dev/null
1686
1687
1688ac_pwd=`pwd` && test -n "$ac_pwd" &&
1689ac_ls_di=`ls -di .` &&
1690ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1691  as_fn_error $? "working directory cannot be determined"
1692test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1693  as_fn_error $? "pwd does not report name of working directory"
1694
1695
1696# Find the source files, if location was not specified.
1697if test -z "$srcdir"; then
1698  ac_srcdir_defaulted=yes
1699  # Try the directory containing this script, then the parent directory.
1700  ac_confdir=`$as_dirname -- "$as_myself" ||
1701$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1702	 X"$as_myself" : 'X\(//\)[^/]' \| \
1703	 X"$as_myself" : 'X\(//\)$' \| \
1704	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1705$as_echo X"$as_myself" |
1706    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1707	    s//\1/
1708	    q
1709	  }
1710	  /^X\(\/\/\)[^/].*/{
1711	    s//\1/
1712	    q
1713	  }
1714	  /^X\(\/\/\)$/{
1715	    s//\1/
1716	    q
1717	  }
1718	  /^X\(\/\).*/{
1719	    s//\1/
1720	    q
1721	  }
1722	  s/.*/./; q'`
1723  srcdir=$ac_confdir
1724  if test ! -r "$srcdir/$ac_unique_file"; then
1725    srcdir=..
1726  fi
1727else
1728  ac_srcdir_defaulted=no
1729fi
1730if test ! -r "$srcdir/$ac_unique_file"; then
1731  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1732  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1733fi
1734ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1735ac_abs_confdir=`(
1736	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1737	pwd)`
1738# When building in place, set srcdir=.
1739if test "$ac_abs_confdir" = "$ac_pwd"; then
1740  srcdir=.
1741fi
1742# Remove unnecessary trailing slashes from srcdir.
1743# Double slashes in file names in object file debugging info
1744# mess up M-x gdb in Emacs.
1745case $srcdir in
1746*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1747esac
1748for ac_var in $ac_precious_vars; do
1749  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1750  eval ac_env_${ac_var}_value=\$${ac_var}
1751  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1752  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1753done
1754
1755#
1756# Report the --help message.
1757#
1758if test "$ac_init_help" = "long"; then
1759  # Omit some internal or obsolete options to make the list less imposing.
1760  # This message is too long to be a string in the A/UX 3.1 sh.
1761  cat <<_ACEOF
1762\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1763
1764Usage: $0 [OPTION]... [VAR=VALUE]...
1765
1766To assign environment variables (e.g., CC, CFLAGS...), specify them as
1767VAR=VALUE.  See below for descriptions of some of the useful variables.
1768
1769Defaults for the options are specified in brackets.
1770
1771Configuration:
1772  -h, --help              display this help and exit
1773      --help=short        display options specific to this package
1774      --help=recursive    display the short help of all the included packages
1775  -V, --version           display version information and exit
1776  -q, --quiet, --silent   do not print \`checking ...' messages
1777      --cache-file=FILE   cache test results in FILE [disabled]
1778  -C, --config-cache      alias for \`--cache-file=config.cache'
1779  -n, --no-create         do not create output files
1780      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1781
1782Installation directories:
1783  --prefix=PREFIX         install architecture-independent files in PREFIX
1784                          [$ac_default_prefix]
1785  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1786                          [PREFIX]
1787
1788By default, \`make install' will install all the files in
1789\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1790an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1791for instance \`--prefix=\$HOME'.
1792
1793For better control, use the options below.
1794
1795Fine tuning of the installation directories:
1796  --bindir=DIR            user executables [EPREFIX/bin]
1797  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1798  --libexecdir=DIR        program executables [EPREFIX/libexec]
1799  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1800  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1801  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1802  --libdir=DIR            object code libraries [EPREFIX/lib]
1803  --includedir=DIR        C header files [PREFIX/include]
1804  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1805  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1806  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1807  --infodir=DIR           info documentation [DATAROOTDIR/info]
1808  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1809  --mandir=DIR            man documentation [DATAROOTDIR/man]
1810  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1811  --htmldir=DIR           html documentation [DOCDIR]
1812  --dvidir=DIR            dvi documentation [DOCDIR]
1813  --pdfdir=DIR            pdf documentation [DOCDIR]
1814  --psdir=DIR             ps documentation [DOCDIR]
1815_ACEOF
1816
1817  cat <<\_ACEOF
1818
1819X features:
1820  --x-includes=DIR    X include files are in DIR
1821  --x-libraries=DIR   X library files are in DIR
1822
1823System types:
1824  --build=BUILD     configure for building on BUILD [guessed]
1825  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1826  --target=TARGET   configure for building compilers for TARGET [HOST]
1827_ACEOF
1828fi
1829
1830if test -n "$ac_init_help"; then
1831  case $ac_init_help in
1832     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1833   esac
1834  cat <<\_ACEOF
1835
1836Optional Features:
1837  --disable-option-checking  ignore unrecognized --enable/--with options
1838  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1839  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1840  --enable-openjdk-only   suppress building custom source even if present
1841                          [disabled]
1842  --enable-debug          set the debug level to fastdebug (shorthand for
1843                          --with-debug-level=fastdebug) [disabled]
1844  --disable-headful       disable building headful support (graphical UI
1845                          support) [enabled]
1846  --enable-hotspot-test-in-build
1847                          run the Queens test after Hotspot build [disabled]
1848  --enable-unlimited-crypto
1849                          Enable unlimited crypto policy [disabled]
1850  --enable-rmiconnector-iiop
1851                          enable the JMX RMIConnector iiop transport
1852                          [disabled]
1853  --disable-debug-symbols disable generation of debug symbols [enabled]
1854  --disable-zip-debug-info
1855                          disable zipping of debug-info files [enabled]
1856  --disable-freetype-bundling
1857                          disable bundling of the freetype library with the
1858                          build result [enabled on Windows or when using
1859                          --with-freetype, disabled otherwise]
1860  --enable-sjavac         use sjavac to do fast incremental compiles
1861                          [disabled]
1862  --disable-precompiled-headers
1863                          disable using precompiled headers when compiling C++
1864                          [enabled]
1865  --enable-ccache         enable using ccache to speed up recompilations
1866                          [disabled]
1867
1868Optional Packages:
1869  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1870  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1871  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1872                          support it), e.g. --with-target-bits=32 [guessed]
1873  --with-custom-make-dir  Deprecated. Option is kept for backwards
1874                          compatibility and is ignored
1875  --with-jdk-variant      JDK variant to build (normal) [normal]
1876  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1877  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1878                          client, minimal1, kernel, zero, zeroshark, core)
1879                          [server]
1880  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1881                          optimized (HotSpot build only)) [release]
1882  --with-devkit           use this devkit for compilers, tools and resources
1883  --with-sys-root         alias for --with-sysroot for backwards compatability
1884  --with-sysroot          use this directory as sysroot
1885  --with-tools-dir        alias for --with-toolchain-path for backwards
1886                          compatibility
1887  --with-toolchain-path   prepend these directories when searching for
1888                          toolchain binaries (compilers etc)
1889  --with-extra-path       prepend these directories to the default path
1890  --with-sdk-name         use the platform SDK of the given name. [macosx]
1891  --with-conf-name        use this as the name of the configuration [generated
1892                          from important configuration options]
1893  --with-output-sync      set make output sync type if supported by make.
1894                          [recurse]
1895  --with-builddeps-conf   use this configuration file for the builddeps
1896  --with-builddeps-server download and use build dependencies from this server
1897                          url
1898  --with-builddeps-dir    store downloaded build dependencies here
1899                          [/localhome/builddeps]
1900  --with-builddeps-group  chgrp the downloaded build dependencies to this
1901                          group
1902  --with-cacerts-file     specify alternative cacerts file
1903  --with-milestone        Set milestone value for build [internal]
1904  --with-update-version   Set update version value for build [b00]
1905  --with-user-release-suffix
1906                          Add a custom string to the version string if build
1907                          number is not set.[username_builddateb00]
1908  --with-build-number     Set build number value for build [b00]
1909  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1910  --with-add-source-root  for each and every source directory, look in this
1911                          additional source root for the same directory; if it
1912                          exists and have files in it, include it in the build
1913  --with-override-source-root
1914                          for each and every source directory, look in this
1915                          override source root for the same directory; if it
1916                          exists, use that directory instead and ignore the
1917                          directory in the original source root
1918  --with-adds-and-overrides
1919                          use the subdirs 'adds' and 'overrides' in the
1920                          specified directory as add-source-root and
1921                          override-source-root
1922  --with-override-langtools
1923                          use this langtools dir for the build
1924  --with-override-corba   use this corba dir for the build
1925  --with-override-jaxp    use this jaxp dir for the build
1926  --with-override-jaxws   use this jaxws dir for the build
1927  --with-override-hotspot use this hotspot dir for the build
1928  --with-override-nashorn use this nashorn dir for the build
1929  --with-override-jdk     use this jdk dir for the build
1930  --with-import-hotspot   import hotspot binaries from this jdk image or
1931                          hotspot build dist dir instead of building from
1932                          source
1933  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1934                          to show possible values [platform dependent]
1935  --with-jtreg            Regression Test Harness [probed]
1936  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1937  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1938  --with-extra-ldflags    extra flags to be used when linking jdk
1939  --with-x                use the X Window System
1940  --with-cups             specify prefix directory for the cups package
1941                          (expecting the headers under PATH/include)
1942  --with-cups-include     specify directory for the cups include files
1943  --with-freetype         specify prefix directory for the freetype package
1944                          (expecting the libraries under PATH/lib and the
1945                          headers under PATH/include)
1946  --with-freetype-include specify directory for the freetype include files
1947  --with-freetype-lib     specify directory for the freetype library
1948  --with-freetype-src     specify directory with freetype sources to
1949                          automatically build the library (experimental,
1950                          Windows-only)
1951  --with-alsa             specify prefix directory for the alsa package
1952                          (expecting the libraries under PATH/lib and the
1953                          headers under PATH/include)
1954  --with-alsa-include     specify directory for the alsa include files
1955  --with-alsa-lib         specify directory for the alsa library
1956  --with-libjpeg          use libjpeg from build system or OpenJDK source
1957                          (system, bundled) [bundled]
1958  --with-giflib           use giflib from build system or OpenJDK source
1959                          (system, bundled) [bundled]
1960  --with-lcms             use lcms2 from build system or OpenJDK source
1961                          (system, bundled) [bundled]
1962  --with-libpng           use libpng from build system or OpenJDK source
1963                          (system, bundled) [bundled]
1964  --with-zlib             use zlib from build system or OpenJDK source
1965                          (system, bundled) [bundled]
1966  --with-stdc++lib=<static>,<dynamic>,<default>
1967                          force linking of the C++ runtime on Linux to either
1968                          static or dynamic, default is static with dynamic as
1969                          fallback
1970  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1971                          only) [probed]
1972  --with-dxsdk            Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1975                          compatibility and is ignored
1976  --with-dxsdk-include    Deprecated. Option is kept for backwards
1977                          compatibility and is ignored
1978  --with-num-cores        number of cores in the build system, e.g.
1979                          --with-num-cores=8 [probed]
1980  --with-memory-size      memory (in MB) available in the build system, e.g.
1981                          --with-memory-size=1024 [probed]
1982  --with-jobs             number of parallel jobs to let make run [calculated
1983                          based on cores and memory]
1984  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1985                          invocations of boot JDK, overriding the default
1986                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1987                          -enableassertions"
1988  --with-sjavac-server-java
1989                          use this java binary for running the sjavac
1990                          background server [Boot JDK java]
1991  --with-ccache-dir       where to store ccache files [~/.ccache]
1992
1993Some influential environment variables:
1994  BASENAME    Override default value for BASENAME
1995  BASH        Override default value for BASH
1996  CAT         Override default value for CAT
1997  CHMOD       Override default value for CHMOD
1998  CMP         Override default value for CMP
1999  COMM        Override default value for COMM
2000  CP          Override default value for CP
2001  CUT         Override default value for CUT
2002  DATE        Override default value for DATE
2003  DIFF        Override default value for DIFF
2004  DIRNAME     Override default value for DIRNAME
2005  ECHO        Override default value for ECHO
2006  EXPR        Override default value for EXPR
2007  FILE        Override default value for FILE
2008  FIND        Override default value for FIND
2009  HEAD        Override default value for HEAD
2010  LN          Override default value for LN
2011  LS          Override default value for LS
2012  MKDIR       Override default value for MKDIR
2013  MKTEMP      Override default value for MKTEMP
2014  MV          Override default value for MV
2015  NAWK        Override default value for NAWK
2016  PRINTF      Override default value for PRINTF
2017  RM          Override default value for RM
2018  SH          Override default value for SH
2019  SORT        Override default value for SORT
2020  TAIL        Override default value for TAIL
2021  TAR         Override default value for TAR
2022  TEE         Override default value for TEE
2023  TOUCH       Override default value for TOUCH
2024  TR          Override default value for TR
2025  UNAME       Override default value for UNAME
2026  UNIQ        Override default value for UNIQ
2027  WC          Override default value for WC
2028  WHICH       Override default value for WHICH
2029  XARGS       Override default value for XARGS
2030  AWK         Override default value for AWK
2031  GREP        Override default value for GREP
2032  EGREP       Override default value for EGREP
2033  FGREP       Override default value for FGREP
2034  SED         Override default value for SED
2035  CYGPATH     Override default value for CYGPATH
2036  READLINK    Override default value for READLINK
2037  DF          Override default value for DF
2038  SETFILE     Override default value for SETFILE
2039  CPIO        Override default value for CPIO
2040  UNZIP       Override default value for UNZIP
2041  ZIP         Override default value for ZIP
2042  LDD         Override default value for LDD
2043  OTOOL       Override default value for OTOOL
2044  READELF     Override default value for READELF
2045  HG          Override default value for HG
2046  STAT        Override default value for STAT
2047  TIME        Override default value for TIME
2048  DSYMUTIL    Override default value for DSYMUTIL
2049  XATTR       Override default value for XATTR
2050  CODESIGN    Override default value for CODESIGN
2051  PKG_CONFIG  path to pkg-config utility
2052  JAVA        Override default value for JAVA
2053  JAVAC       Override default value for JAVAC
2054  JAVAH       Override default value for JAVAH
2055  JAR         Override default value for JAR
2056  NATIVE2ASCII
2057              Override default value for NATIVE2ASCII
2058  JARSIGNER   Override default value for JARSIGNER
2059  CC          C compiler command
2060  CFLAGS      C compiler flags
2061  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2062              nonstandard directory <lib dir>
2063  LIBS        libraries to pass to the linker, e.g. -l<library>
2064  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2065              you have headers in a nonstandard directory <include dir>
2066  CXX         C++ compiler command
2067  CXXFLAGS    C++ compiler flags
2068  CPP         C preprocessor
2069  CXXCPP      C++ preprocessor
2070  AS          Override default value for AS
2071  AR          Override default value for AR
2072  OBJC        Objective C compiler command
2073  OBJCFLAGS   Objective C compiler flags
2074  LIPO        Override default value for LIPO
2075  STRIP       Override default value for STRIP
2076  NM          Override default value for NM
2077  GNM         Override default value for GNM
2078  MCS         Override default value for MCS
2079  OBJCOPY     Override default value for OBJCOPY
2080  OBJDUMP     Override default value for OBJDUMP
2081  BUILD_CC    Override default value for BUILD_CC
2082  BUILD_CXX   Override default value for BUILD_CXX
2083  BUILD_LD    Override default value for BUILD_LD
2084  JTREGEXE    Override default value for JTREGEXE
2085  XMKMF       Path to xmkmf, Makefile generator for X Window System
2086  FREETYPE_CFLAGS
2087              C compiler flags for FREETYPE, overriding pkg-config
2088  FREETYPE_LIBS
2089              linker flags for FREETYPE, overriding pkg-config
2090  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2091  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2092  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2093  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2094  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2095  PNG_LIBS    linker flags for PNG, overriding pkg-config
2096  LIBFFI_CFLAGS
2097              C compiler flags for LIBFFI, overriding pkg-config
2098  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2099  CCACHE      Override default value for CCACHE
2100
2101Use these variables to override the choices made by `configure' or to help
2102it to find libraries and programs with nonstandard names/locations.
2103
2104Report bugs to <build-dev@openjdk.java.net>.
2105OpenJDK home page: <http://openjdk.java.net>.
2106_ACEOF
2107ac_status=$?
2108fi
2109
2110if test "$ac_init_help" = "recursive"; then
2111  # If there are subdirs, report their specific --help.
2112  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2113    test -d "$ac_dir" ||
2114      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2115      continue
2116    ac_builddir=.
2117
2118case "$ac_dir" in
2119.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2120*)
2121  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2122  # A ".." for each directory in $ac_dir_suffix.
2123  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2124  case $ac_top_builddir_sub in
2125  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2126  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2127  esac ;;
2128esac
2129ac_abs_top_builddir=$ac_pwd
2130ac_abs_builddir=$ac_pwd$ac_dir_suffix
2131# for backward compatibility:
2132ac_top_builddir=$ac_top_build_prefix
2133
2134case $srcdir in
2135  .)  # We are building in place.
2136    ac_srcdir=.
2137    ac_top_srcdir=$ac_top_builddir_sub
2138    ac_abs_top_srcdir=$ac_pwd ;;
2139  [\\/]* | ?:[\\/]* )  # Absolute name.
2140    ac_srcdir=$srcdir$ac_dir_suffix;
2141    ac_top_srcdir=$srcdir
2142    ac_abs_top_srcdir=$srcdir ;;
2143  *) # Relative name.
2144    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2145    ac_top_srcdir=$ac_top_build_prefix$srcdir
2146    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2147esac
2148ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2149
2150    cd "$ac_dir" || { ac_status=$?; continue; }
2151    # Check for guested configure.
2152    if test -f "$ac_srcdir/configure.gnu"; then
2153      echo &&
2154      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2155    elif test -f "$ac_srcdir/configure"; then
2156      echo &&
2157      $SHELL "$ac_srcdir/configure" --help=recursive
2158    else
2159      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2160    fi || ac_status=$?
2161    cd "$ac_pwd" || { ac_status=$?; break; }
2162  done
2163fi
2164
2165test -n "$ac_init_help" && exit $ac_status
2166if $ac_init_version; then
2167  cat <<\_ACEOF
2168OpenJDK configure jdk9
2169generated by GNU Autoconf 2.69
2170
2171Copyright (C) 2012 Free Software Foundation, Inc.
2172This configure script is free software; the Free Software Foundation
2173gives unlimited permission to copy, distribute and modify it.
2174_ACEOF
2175  exit
2176fi
2177
2178## ------------------------ ##
2179## Autoconf initialization. ##
2180## ------------------------ ##
2181
2182# ac_fn_c_try_compile LINENO
2183# --------------------------
2184# Try to compile conftest.$ac_ext, and return whether this succeeded.
2185ac_fn_c_try_compile ()
2186{
2187  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188  rm -f conftest.$ac_objext
2189  if { { ac_try="$ac_compile"
2190case "(($ac_try" in
2191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2192  *) ac_try_echo=$ac_try;;
2193esac
2194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2195$as_echo "$ac_try_echo"; } >&5
2196  (eval "$ac_compile") 2>conftest.err
2197  ac_status=$?
2198  if test -s conftest.err; then
2199    grep -v '^ *+' conftest.err >conftest.er1
2200    cat conftest.er1 >&5
2201    mv -f conftest.er1 conftest.err
2202  fi
2203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2204  test $ac_status = 0; } && {
2205	 test -z "$ac_c_werror_flag" ||
2206	 test ! -s conftest.err
2207       } && test -s conftest.$ac_objext; then :
2208  ac_retval=0
2209else
2210  $as_echo "$as_me: failed program was:" >&5
2211sed 's/^/| /' conftest.$ac_ext >&5
2212
2213	ac_retval=1
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216  as_fn_set_status $ac_retval
2217
2218} # ac_fn_c_try_compile
2219
2220# ac_fn_cxx_try_compile LINENO
2221# ----------------------------
2222# Try to compile conftest.$ac_ext, and return whether this succeeded.
2223ac_fn_cxx_try_compile ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  rm -f conftest.$ac_objext
2227  if { { ac_try="$ac_compile"
2228case "(($ac_try" in
2229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230  *) ac_try_echo=$ac_try;;
2231esac
2232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233$as_echo "$ac_try_echo"; } >&5
2234  (eval "$ac_compile") 2>conftest.err
2235  ac_status=$?
2236  if test -s conftest.err; then
2237    grep -v '^ *+' conftest.err >conftest.er1
2238    cat conftest.er1 >&5
2239    mv -f conftest.er1 conftest.err
2240  fi
2241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242  test $ac_status = 0; } && {
2243	 test -z "$ac_cxx_werror_flag" ||
2244	 test ! -s conftest.err
2245       } && test -s conftest.$ac_objext; then :
2246  ac_retval=0
2247else
2248  $as_echo "$as_me: failed program was:" >&5
2249sed 's/^/| /' conftest.$ac_ext >&5
2250
2251	ac_retval=1
2252fi
2253  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2254  as_fn_set_status $ac_retval
2255
2256} # ac_fn_cxx_try_compile
2257
2258# ac_fn_c_try_cpp LINENO
2259# ----------------------
2260# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2261ac_fn_c_try_cpp ()
2262{
2263  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2264  if { { ac_try="$ac_cpp conftest.$ac_ext"
2265case "(($ac_try" in
2266  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2267  *) ac_try_echo=$ac_try;;
2268esac
2269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2270$as_echo "$ac_try_echo"; } >&5
2271  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2272  ac_status=$?
2273  if test -s conftest.err; then
2274    grep -v '^ *+' conftest.err >conftest.er1
2275    cat conftest.er1 >&5
2276    mv -f conftest.er1 conftest.err
2277  fi
2278  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2279  test $ac_status = 0; } > conftest.i && {
2280	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2281	 test ! -s conftest.err
2282       }; then :
2283  ac_retval=0
2284else
2285  $as_echo "$as_me: failed program was:" >&5
2286sed 's/^/| /' conftest.$ac_ext >&5
2287
2288    ac_retval=1
2289fi
2290  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291  as_fn_set_status $ac_retval
2292
2293} # ac_fn_c_try_cpp
2294
2295# ac_fn_cxx_try_cpp LINENO
2296# ------------------------
2297# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2298ac_fn_cxx_try_cpp ()
2299{
2300  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301  if { { ac_try="$ac_cpp conftest.$ac_ext"
2302case "(($ac_try" in
2303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2304  *) ac_try_echo=$ac_try;;
2305esac
2306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2307$as_echo "$ac_try_echo"; } >&5
2308  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2309  ac_status=$?
2310  if test -s conftest.err; then
2311    grep -v '^ *+' conftest.err >conftest.er1
2312    cat conftest.er1 >&5
2313    mv -f conftest.er1 conftest.err
2314  fi
2315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2316  test $ac_status = 0; } > conftest.i && {
2317	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2318	 test ! -s conftest.err
2319       }; then :
2320  ac_retval=0
2321else
2322  $as_echo "$as_me: failed program was:" >&5
2323sed 's/^/| /' conftest.$ac_ext >&5
2324
2325    ac_retval=1
2326fi
2327  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2328  as_fn_set_status $ac_retval
2329
2330} # ac_fn_cxx_try_cpp
2331
2332# ac_fn_objc_try_compile LINENO
2333# -----------------------------
2334# Try to compile conftest.$ac_ext, and return whether this succeeded.
2335ac_fn_objc_try_compile ()
2336{
2337  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338  rm -f conftest.$ac_objext
2339  if { { ac_try="$ac_compile"
2340case "(($ac_try" in
2341  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2342  *) ac_try_echo=$ac_try;;
2343esac
2344eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2345$as_echo "$ac_try_echo"; } >&5
2346  (eval "$ac_compile") 2>conftest.err
2347  ac_status=$?
2348  if test -s conftest.err; then
2349    grep -v '^ *+' conftest.err >conftest.er1
2350    cat conftest.er1 >&5
2351    mv -f conftest.er1 conftest.err
2352  fi
2353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2354  test $ac_status = 0; } && {
2355	 test -z "$ac_objc_werror_flag" ||
2356	 test ! -s conftest.err
2357       } && test -s conftest.$ac_objext; then :
2358  ac_retval=0
2359else
2360  $as_echo "$as_me: failed program was:" >&5
2361sed 's/^/| /' conftest.$ac_ext >&5
2362
2363	ac_retval=1
2364fi
2365  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2366  as_fn_set_status $ac_retval
2367
2368} # ac_fn_objc_try_compile
2369
2370# ac_fn_c_try_link LINENO
2371# -----------------------
2372# Try to link conftest.$ac_ext, and return whether this succeeded.
2373ac_fn_c_try_link ()
2374{
2375  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376  rm -f conftest.$ac_objext conftest$ac_exeext
2377  if { { ac_try="$ac_link"
2378case "(($ac_try" in
2379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2380  *) ac_try_echo=$ac_try;;
2381esac
2382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2383$as_echo "$ac_try_echo"; } >&5
2384  (eval "$ac_link") 2>conftest.err
2385  ac_status=$?
2386  if test -s conftest.err; then
2387    grep -v '^ *+' conftest.err >conftest.er1
2388    cat conftest.er1 >&5
2389    mv -f conftest.er1 conftest.err
2390  fi
2391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2392  test $ac_status = 0; } && {
2393	 test -z "$ac_c_werror_flag" ||
2394	 test ! -s conftest.err
2395       } && test -s conftest$ac_exeext && {
2396	 test "$cross_compiling" = yes ||
2397	 test -x conftest$ac_exeext
2398       }; then :
2399  ac_retval=0
2400else
2401  $as_echo "$as_me: failed program was:" >&5
2402sed 's/^/| /' conftest.$ac_ext >&5
2403
2404	ac_retval=1
2405fi
2406  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2407  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2408  # interfere with the next link command; also delete a directory that is
2409  # left behind by Apple's compiler.  We do this before executing the actions.
2410  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2411  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412  as_fn_set_status $ac_retval
2413
2414} # ac_fn_c_try_link
2415
2416# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2417# ---------------------------------------------------------
2418# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2419# the include files in INCLUDES and setting the cache variable VAR
2420# accordingly.
2421ac_fn_cxx_check_header_mongrel ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  if eval \${$3+:} false; then :
2425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2426$as_echo_n "checking for $2... " >&6; }
2427if eval \${$3+:} false; then :
2428  $as_echo_n "(cached) " >&6
2429fi
2430eval ac_res=\$$3
2431	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432$as_echo "$ac_res" >&6; }
2433else
2434  # Is the header compilable?
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2436$as_echo_n "checking $2 usability... " >&6; }
2437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438/* end confdefs.h.  */
2439$4
2440#include <$2>
2441_ACEOF
2442if ac_fn_cxx_try_compile "$LINENO"; then :
2443  ac_header_compiler=yes
2444else
2445  ac_header_compiler=no
2446fi
2447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2449$as_echo "$ac_header_compiler" >&6; }
2450
2451# Is the header present?
2452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2453$as_echo_n "checking $2 presence... " >&6; }
2454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2455/* end confdefs.h.  */
2456#include <$2>
2457_ACEOF
2458if ac_fn_cxx_try_cpp "$LINENO"; then :
2459  ac_header_preproc=yes
2460else
2461  ac_header_preproc=no
2462fi
2463rm -f conftest.err conftest.i conftest.$ac_ext
2464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2465$as_echo "$ac_header_preproc" >&6; }
2466
2467# So?  What about this header?
2468case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2469  yes:no: )
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2471$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2473$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2474    ;;
2475  no:yes:* )
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2477$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2479$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2481$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2483$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2485$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2486( $as_echo "## ----------------------------------------- ##
2487## Report this to build-dev@openjdk.java.net ##
2488## ----------------------------------------- ##"
2489     ) | sed "s/^/$as_me: WARNING:     /" >&2
2490    ;;
2491esac
2492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493$as_echo_n "checking for $2... " >&6; }
2494if eval \${$3+:} false; then :
2495  $as_echo_n "(cached) " >&6
2496else
2497  eval "$3=\$ac_header_compiler"
2498fi
2499eval ac_res=\$$3
2500	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2501$as_echo "$ac_res" >&6; }
2502fi
2503  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504
2505} # ac_fn_cxx_check_header_mongrel
2506
2507# ac_fn_cxx_try_run LINENO
2508# ------------------------
2509# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2510# that executables *can* be run.
2511ac_fn_cxx_try_run ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  if { { ac_try="$ac_link"
2515case "(($ac_try" in
2516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517  *) ac_try_echo=$ac_try;;
2518esac
2519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2520$as_echo "$ac_try_echo"; } >&5
2521  (eval "$ac_link") 2>&5
2522  ac_status=$?
2523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2524  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2525  { { case "(($ac_try" in
2526  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527  *) ac_try_echo=$ac_try;;
2528esac
2529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530$as_echo "$ac_try_echo"; } >&5
2531  (eval "$ac_try") 2>&5
2532  ac_status=$?
2533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534  test $ac_status = 0; }; }; then :
2535  ac_retval=0
2536else
2537  $as_echo "$as_me: program exited with status $ac_status" >&5
2538       $as_echo "$as_me: failed program was:" >&5
2539sed 's/^/| /' conftest.$ac_ext >&5
2540
2541       ac_retval=$ac_status
2542fi
2543  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2544  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545  as_fn_set_status $ac_retval
2546
2547} # ac_fn_cxx_try_run
2548
2549# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2550# ---------------------------------------------------------
2551# Tests whether HEADER exists and can be compiled using the include files in
2552# INCLUDES, setting the cache variable VAR accordingly.
2553ac_fn_cxx_check_header_compile ()
2554{
2555  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2557$as_echo_n "checking for $2... " >&6; }
2558if eval \${$3+:} false; then :
2559  $as_echo_n "(cached) " >&6
2560else
2561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564#include <$2>
2565_ACEOF
2566if ac_fn_cxx_try_compile "$LINENO"; then :
2567  eval "$3=yes"
2568else
2569  eval "$3=no"
2570fi
2571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572fi
2573eval ac_res=\$$3
2574	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2575$as_echo "$ac_res" >&6; }
2576  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577
2578} # ac_fn_cxx_check_header_compile
2579
2580# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2581# ----------------------------------------------
2582# Tries to find the compile-time value of EXPR in a program that includes
2583# INCLUDES, setting VAR accordingly. Returns whether the value could be
2584# computed
2585ac_fn_cxx_compute_int ()
2586{
2587  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588  if test "$cross_compiling" = yes; then
2589    # Depending upon the size, compute the lo and hi bounds.
2590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591/* end confdefs.h.  */
2592$4
2593int
2594main ()
2595{
2596static int test_array [1 - 2 * !(($2) >= 0)];
2597test_array [0] = 0;
2598return test_array [0];
2599
2600  ;
2601  return 0;
2602}
2603_ACEOF
2604if ac_fn_cxx_try_compile "$LINENO"; then :
2605  ac_lo=0 ac_mid=0
2606  while :; do
2607    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608/* end confdefs.h.  */
2609$4
2610int
2611main ()
2612{
2613static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2614test_array [0] = 0;
2615return test_array [0];
2616
2617  ;
2618  return 0;
2619}
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_hi=$ac_mid; break
2623else
2624  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2625			if test $ac_lo -le $ac_mid; then
2626			  ac_lo= ac_hi=
2627			  break
2628			fi
2629			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2630fi
2631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2632  done
2633else
2634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2635/* end confdefs.h.  */
2636$4
2637int
2638main ()
2639{
2640static int test_array [1 - 2 * !(($2) < 0)];
2641test_array [0] = 0;
2642return test_array [0];
2643
2644  ;
2645  return 0;
2646}
2647_ACEOF
2648if ac_fn_cxx_try_compile "$LINENO"; then :
2649  ac_hi=-1 ac_mid=-1
2650  while :; do
2651    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2652/* end confdefs.h.  */
2653$4
2654int
2655main ()
2656{
2657static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2658test_array [0] = 0;
2659return test_array [0];
2660
2661  ;
2662  return 0;
2663}
2664_ACEOF
2665if ac_fn_cxx_try_compile "$LINENO"; then :
2666  ac_lo=$ac_mid; break
2667else
2668  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2669			if test $ac_mid -le $ac_hi; then
2670			  ac_lo= ac_hi=
2671			  break
2672			fi
2673			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2674fi
2675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2676  done
2677else
2678  ac_lo= ac_hi=
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681fi
2682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683# Binary search between lo and hi bounds.
2684while test "x$ac_lo" != "x$ac_hi"; do
2685  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=$ac_mid
2702else
2703  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2704fi
2705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706done
2707case $ac_lo in #((
2708?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2709'') ac_retval=1 ;;
2710esac
2711  else
2712    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2713/* end confdefs.h.  */
2714$4
2715static long int longval () { return $2; }
2716static unsigned long int ulongval () { return $2; }
2717#include <stdio.h>
2718#include <stdlib.h>
2719int
2720main ()
2721{
2722
2723  FILE *f = fopen ("conftest.val", "w");
2724  if (! f)
2725    return 1;
2726  if (($2) < 0)
2727    {
2728      long int i = longval ();
2729      if (i != ($2))
2730	return 1;
2731      fprintf (f, "%ld", i);
2732    }
2733  else
2734    {
2735      unsigned long int i = ulongval ();
2736      if (i != ($2))
2737	return 1;
2738      fprintf (f, "%lu", i);
2739    }
2740  /* Do not output a trailing newline, as this causes \r\n confusion
2741     on some platforms.  */
2742  return ferror (f) || fclose (f) != 0;
2743
2744  ;
2745  return 0;
2746}
2747_ACEOF
2748if ac_fn_cxx_try_run "$LINENO"; then :
2749  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2750else
2751  ac_retval=1
2752fi
2753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2754  conftest.$ac_objext conftest.beam conftest.$ac_ext
2755rm -f conftest.val
2756
2757  fi
2758  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759  as_fn_set_status $ac_retval
2760
2761} # ac_fn_cxx_compute_int
2762
2763# ac_fn_cxx_try_link LINENO
2764# -------------------------
2765# Try to link conftest.$ac_ext, and return whether this succeeded.
2766ac_fn_cxx_try_link ()
2767{
2768  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2769  rm -f conftest.$ac_objext conftest$ac_exeext
2770  if { { ac_try="$ac_link"
2771case "(($ac_try" in
2772  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773  *) ac_try_echo=$ac_try;;
2774esac
2775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2776$as_echo "$ac_try_echo"; } >&5
2777  (eval "$ac_link") 2>conftest.err
2778  ac_status=$?
2779  if test -s conftest.err; then
2780    grep -v '^ *+' conftest.err >conftest.er1
2781    cat conftest.er1 >&5
2782    mv -f conftest.er1 conftest.err
2783  fi
2784  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2785  test $ac_status = 0; } && {
2786	 test -z "$ac_cxx_werror_flag" ||
2787	 test ! -s conftest.err
2788       } && test -s conftest$ac_exeext && {
2789	 test "$cross_compiling" = yes ||
2790	 test -x conftest$ac_exeext
2791       }; then :
2792  ac_retval=0
2793else
2794  $as_echo "$as_me: failed program was:" >&5
2795sed 's/^/| /' conftest.$ac_ext >&5
2796
2797	ac_retval=1
2798fi
2799  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2800  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2801  # interfere with the next link command; also delete a directory that is
2802  # left behind by Apple's compiler.  We do this before executing the actions.
2803  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2804  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2805  as_fn_set_status $ac_retval
2806
2807} # ac_fn_cxx_try_link
2808
2809# ac_fn_cxx_check_func LINENO FUNC VAR
2810# ------------------------------------
2811# Tests whether FUNC exists, setting the cache variable VAR accordingly
2812ac_fn_cxx_check_func ()
2813{
2814  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2816$as_echo_n "checking for $2... " >&6; }
2817if eval \${$3+:} false; then :
2818  $as_echo_n "(cached) " >&6
2819else
2820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2821/* end confdefs.h.  */
2822/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2823   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2824#define $2 innocuous_$2
2825
2826/* System header to define __stub macros and hopefully few prototypes,
2827    which can conflict with char $2 (); below.
2828    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2829    <limits.h> exists even on freestanding compilers.  */
2830
2831#ifdef __STDC__
2832# include <limits.h>
2833#else
2834# include <assert.h>
2835#endif
2836
2837#undef $2
2838
2839/* Override any GCC internal prototype to avoid an error.
2840   Use char because int might match the return type of a GCC
2841   builtin and then its argument prototype would still apply.  */
2842#ifdef __cplusplus
2843extern "C"
2844#endif
2845char $2 ();
2846/* The GNU C library defines this for functions which it implements
2847    to always fail with ENOSYS.  Some functions are actually named
2848    something starting with __ and the normal name is an alias.  */
2849#if defined __stub_$2 || defined __stub___$2
2850choke me
2851#endif
2852
2853int
2854main ()
2855{
2856return $2 ();
2857  ;
2858  return 0;
2859}
2860_ACEOF
2861if ac_fn_cxx_try_link "$LINENO"; then :
2862  eval "$3=yes"
2863else
2864  eval "$3=no"
2865fi
2866rm -f core conftest.err conftest.$ac_objext \
2867    conftest$ac_exeext conftest.$ac_ext
2868fi
2869eval ac_res=\$$3
2870	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871$as_echo "$ac_res" >&6; }
2872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873
2874} # ac_fn_cxx_check_func
2875
2876# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2877# -------------------------------------------------------
2878# Tests whether HEADER exists and can be compiled using the include files in
2879# INCLUDES, setting the cache variable VAR accordingly.
2880ac_fn_c_check_header_compile ()
2881{
2882  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2884$as_echo_n "checking for $2... " >&6; }
2885if eval \${$3+:} false; then :
2886  $as_echo_n "(cached) " >&6
2887else
2888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2889/* end confdefs.h.  */
2890$4
2891#include <$2>
2892_ACEOF
2893if ac_fn_c_try_compile "$LINENO"; then :
2894  eval "$3=yes"
2895else
2896  eval "$3=no"
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899fi
2900eval ac_res=\$$3
2901	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2902$as_echo "$ac_res" >&6; }
2903  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2904
2905} # ac_fn_c_check_header_compile
2906cat >config.log <<_ACEOF
2907This file contains any messages produced by compilers while
2908running configure, to aid debugging if configure makes a mistake.
2909
2910It was created by OpenJDK $as_me jdk9, which was
2911generated by GNU Autoconf 2.69.  Invocation command line was
2912
2913  $ $0 $@
2914
2915_ACEOF
2916exec 5>>config.log
2917{
2918cat <<_ASUNAME
2919## --------- ##
2920## Platform. ##
2921## --------- ##
2922
2923hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2924uname -m = `(uname -m) 2>/dev/null || echo unknown`
2925uname -r = `(uname -r) 2>/dev/null || echo unknown`
2926uname -s = `(uname -s) 2>/dev/null || echo unknown`
2927uname -v = `(uname -v) 2>/dev/null || echo unknown`
2928
2929/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2930/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2931
2932/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2933/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2934/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2935/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2936/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2937/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2938/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2939
2940_ASUNAME
2941
2942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943for as_dir in $PATH
2944do
2945  IFS=$as_save_IFS
2946  test -z "$as_dir" && as_dir=.
2947    $as_echo "PATH: $as_dir"
2948  done
2949IFS=$as_save_IFS
2950
2951} >&5
2952
2953cat >&5 <<_ACEOF
2954
2955
2956## ----------- ##
2957## Core tests. ##
2958## ----------- ##
2959
2960_ACEOF
2961
2962
2963# Keep a trace of the command line.
2964# Strip out --no-create and --no-recursion so they do not pile up.
2965# Strip out --silent because we don't want to record it for future runs.
2966# Also quote any args containing shell meta-characters.
2967# Make two passes to allow for proper duplicate-argument suppression.
2968ac_configure_args=
2969ac_configure_args0=
2970ac_configure_args1=
2971ac_must_keep_next=false
2972for ac_pass in 1 2
2973do
2974  for ac_arg
2975  do
2976    case $ac_arg in
2977    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2978    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2979    | -silent | --silent | --silen | --sile | --sil)
2980      continue ;;
2981    *\'*)
2982      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2983    esac
2984    case $ac_pass in
2985    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2986    2)
2987      as_fn_append ac_configure_args1 " '$ac_arg'"
2988      if test $ac_must_keep_next = true; then
2989	ac_must_keep_next=false # Got value, back to normal.
2990      else
2991	case $ac_arg in
2992	  *=* | --config-cache | -C | -disable-* | --disable-* \
2993	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2994	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2995	  | -with-* | --with-* | -without-* | --without-* | --x)
2996	    case "$ac_configure_args0 " in
2997	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2998	    esac
2999	    ;;
3000	  -* ) ac_must_keep_next=true ;;
3001	esac
3002      fi
3003      as_fn_append ac_configure_args " '$ac_arg'"
3004      ;;
3005    esac
3006  done
3007done
3008{ ac_configure_args0=; unset ac_configure_args0;}
3009{ ac_configure_args1=; unset ac_configure_args1;}
3010
3011# When interrupted or exit'd, cleanup temporary files, and complete
3012# config.log.  We remove comments because anyway the quotes in there
3013# would cause problems or look ugly.
3014# WARNING: Use '\'' to represent an apostrophe within the trap.
3015# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3016trap 'exit_status=$?
3017  # Save into config.log some information that might help in debugging.
3018  {
3019    echo
3020
3021    $as_echo "## ---------------- ##
3022## Cache variables. ##
3023## ---------------- ##"
3024    echo
3025    # The following way of writing the cache mishandles newlines in values,
3026(
3027  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3028    eval ac_val=\$$ac_var
3029    case $ac_val in #(
3030    *${as_nl}*)
3031      case $ac_var in #(
3032      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3033$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3034      esac
3035      case $ac_var in #(
3036      _ | IFS | as_nl) ;; #(
3037      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3038      *) { eval $ac_var=; unset $ac_var;} ;;
3039      esac ;;
3040    esac
3041  done
3042  (set) 2>&1 |
3043    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3044    *${as_nl}ac_space=\ *)
3045      sed -n \
3046	"s/'\''/'\''\\\\'\'''\''/g;
3047	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3048      ;; #(
3049    *)
3050      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3051      ;;
3052    esac |
3053    sort
3054)
3055    echo
3056
3057    $as_echo "## ----------------- ##
3058## Output variables. ##
3059## ----------------- ##"
3060    echo
3061    for ac_var in $ac_subst_vars
3062    do
3063      eval ac_val=\$$ac_var
3064      case $ac_val in
3065      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3066      esac
3067      $as_echo "$ac_var='\''$ac_val'\''"
3068    done | sort
3069    echo
3070
3071    if test -n "$ac_subst_files"; then
3072      $as_echo "## ------------------- ##
3073## File substitutions. ##
3074## ------------------- ##"
3075      echo
3076      for ac_var in $ac_subst_files
3077      do
3078	eval ac_val=\$$ac_var
3079	case $ac_val in
3080	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3081	esac
3082	$as_echo "$ac_var='\''$ac_val'\''"
3083      done | sort
3084      echo
3085    fi
3086
3087    if test -s confdefs.h; then
3088      $as_echo "## ----------- ##
3089## confdefs.h. ##
3090## ----------- ##"
3091      echo
3092      cat confdefs.h
3093      echo
3094    fi
3095    test "$ac_signal" != 0 &&
3096      $as_echo "$as_me: caught signal $ac_signal"
3097    $as_echo "$as_me: exit $exit_status"
3098  } >&5
3099  rm -f core *.core core.conftest.* &&
3100    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3101    exit $exit_status
3102' 0
3103for ac_signal in 1 2 13 15; do
3104  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3105done
3106ac_signal=0
3107
3108# confdefs.h avoids OS command line length limits that DEFS can exceed.
3109rm -f -r conftest* confdefs.h
3110
3111$as_echo "/* confdefs.h */" > confdefs.h
3112
3113# Predefined preprocessor variables.
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_NAME "$PACKAGE_NAME"
3117_ACEOF
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3121_ACEOF
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_VERSION "$PACKAGE_VERSION"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_STRING "$PACKAGE_STRING"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_URL "$PACKAGE_URL"
3137_ACEOF
3138
3139
3140# Let the site file select an alternate cache file if it wants to.
3141# Prefer an explicitly selected file to automatically selected ones.
3142ac_site_file1=NONE
3143ac_site_file2=NONE
3144if test -n "$CONFIG_SITE"; then
3145  # We do not want a PATH search for config.site.
3146  case $CONFIG_SITE in #((
3147    -*)  ac_site_file1=./$CONFIG_SITE;;
3148    */*) ac_site_file1=$CONFIG_SITE;;
3149    *)   ac_site_file1=./$CONFIG_SITE;;
3150  esac
3151elif test "x$prefix" != xNONE; then
3152  ac_site_file1=$prefix/share/config.site
3153  ac_site_file2=$prefix/etc/config.site
3154else
3155  ac_site_file1=$ac_default_prefix/share/config.site
3156  ac_site_file2=$ac_default_prefix/etc/config.site
3157fi
3158for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3159do
3160  test "x$ac_site_file" = xNONE && continue
3161  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3162    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3163$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3164    sed 's/^/| /' "$ac_site_file" >&5
3165    . "$ac_site_file" \
3166      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168as_fn_error $? "failed to load site script $ac_site_file
3169See \`config.log' for more details" "$LINENO" 5; }
3170  fi
3171done
3172
3173if test -r "$cache_file"; then
3174  # Some versions of bash will fail to source /dev/null (special files
3175  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3176  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3177    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3178$as_echo "$as_me: loading cache $cache_file" >&6;}
3179    case $cache_file in
3180      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3181      *)                      . "./$cache_file";;
3182    esac
3183  fi
3184else
3185  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3186$as_echo "$as_me: creating cache $cache_file" >&6;}
3187  >$cache_file
3188fi
3189
3190# Check that the precious variables saved in the cache have kept the same
3191# value.
3192ac_cache_corrupted=false
3193for ac_var in $ac_precious_vars; do
3194  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3195  eval ac_new_set=\$ac_env_${ac_var}_set
3196  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3197  eval ac_new_val=\$ac_env_${ac_var}_value
3198  case $ac_old_set,$ac_new_set in
3199    set,)
3200      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3201$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3202      ac_cache_corrupted=: ;;
3203    ,set)
3204      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3205$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3206      ac_cache_corrupted=: ;;
3207    ,);;
3208    *)
3209      if test "x$ac_old_val" != "x$ac_new_val"; then
3210	# differences in whitespace do not lead to failure.
3211	ac_old_val_w=`echo x $ac_old_val`
3212	ac_new_val_w=`echo x $ac_new_val`
3213	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3214	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3215$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3216	  ac_cache_corrupted=:
3217	else
3218	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3219$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3220	  eval $ac_var=\$ac_old_val
3221	fi
3222	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3223$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3224	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3225$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3226      fi;;
3227  esac
3228  # Pass precious variables to config.status.
3229  if test "$ac_new_set" = set; then
3230    case $ac_new_val in
3231    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3232    *) ac_arg=$ac_var=$ac_new_val ;;
3233    esac
3234    case " $ac_configure_args " in
3235      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3236      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3237    esac
3238  fi
3239done
3240if $ac_cache_corrupted; then
3241  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3243  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3244$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3245  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3246fi
3247## -------------------- ##
3248## Main body of script. ##
3249## -------------------- ##
3250
3251ac_ext=c
3252ac_cpp='$CPP $CPPFLAGS'
3253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3255ac_compiler_gnu=$ac_cv_c_compiler_gnu
3256
3257
3258
3259ac_aux_dir=
3260for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3261  if test -f "$ac_dir/install-sh"; then
3262    ac_aux_dir=$ac_dir
3263    ac_install_sh="$ac_aux_dir/install-sh -c"
3264    break
3265  elif test -f "$ac_dir/install.sh"; then
3266    ac_aux_dir=$ac_dir
3267    ac_install_sh="$ac_aux_dir/install.sh -c"
3268    break
3269  elif test -f "$ac_dir/shtool"; then
3270    ac_aux_dir=$ac_dir
3271    ac_install_sh="$ac_aux_dir/shtool install -c"
3272    break
3273  fi
3274done
3275if test -z "$ac_aux_dir"; then
3276  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3277fi
3278
3279# These three variables are undocumented and unsupported,
3280# and are intended to be withdrawn in a future Autoconf release.
3281# They can cause serious problems if a builder's source tree is in a directory
3282# whose full name contains unusual characters.
3283ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3284ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3285ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3286
3287
3288# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3289
3290#
3291# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3292# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3293#
3294# This code is free software; you can redistribute it and/or modify it
3295# under the terms of the GNU General Public License version 2 only, as
3296# published by the Free Software Foundation.  Oracle designates this
3297# particular file as subject to the "Classpath" exception as provided
3298# by Oracle in the LICENSE file that accompanied this code.
3299#
3300# This code is distributed in the hope that it will be useful, but WITHOUT
3301# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3302# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3303# version 2 for more details (a copy is included in the LICENSE file that
3304# accompanied this code).
3305#
3306# You should have received a copy of the GNU General Public License version
3307# 2 along with this work; if not, write to the Free Software Foundation,
3308# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3309#
3310# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3311# or visit www.oracle.com if you need additional information or have any
3312# questions.
3313#
3314
3315#
3316# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3317#
3318# This program is free software; you can redistribute it and/or modify
3319# it under the terms of the GNU General Public License as published by
3320# the Free Software Foundation; either version 2 of the License, or
3321# (at your option) any later version.
3322#
3323# This program is distributed in the hope that it will be useful, but
3324# WITHOUT ANY WARRANTY; without even the implied warranty of
3325# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3326# General Public License for more details.
3327#
3328# You should have received a copy of the GNU General Public License
3329# along with this program; if not, write to the Free Software
3330# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3331#
3332# As a special exception to the GNU General Public License, if you
3333# distribute this file as part of a program that contains a
3334# configuration script generated by Autoconf, you may include it under
3335# the same distribution terms that you use for the rest of that program.
3336
3337# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3338# ----------------------------------
3339# PKG_PROG_PKG_CONFIG
3340
3341# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3342#
3343# Check to see whether a particular set of modules exists.  Similar
3344# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3345#
3346#
3347# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3348# this or PKG_CHECK_MODULES is called, or make sure to call
3349# PKG_CHECK_EXISTS manually
3350# --------------------------------------------------------------
3351
3352
3353
3354# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3355# ---------------------------------------------
3356# _PKG_CONFIG
3357
3358# _PKG_SHORT_ERRORS_SUPPORTED
3359# -----------------------------
3360# _PKG_SHORT_ERRORS_SUPPORTED
3361
3362
3363# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3364# [ACTION-IF-NOT-FOUND])
3365#
3366#
3367# Note that if there is a possibility the first call to
3368# PKG_CHECK_MODULES might not happen, you should be sure to include an
3369# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3370#
3371#
3372# --------------------------------------------------------------
3373# PKG_CHECK_MODULES
3374
3375
3376# Include these first...
3377#
3378# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3380#
3381# This code is free software; you can redistribute it and/or modify it
3382# under the terms of the GNU General Public License version 2 only, as
3383# published by the Free Software Foundation.  Oracle designates this
3384# particular file as subject to the "Classpath" exception as provided
3385# by Oracle in the LICENSE file that accompanied this code.
3386#
3387# This code is distributed in the hope that it will be useful, but WITHOUT
3388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3390# version 2 for more details (a copy is included in the LICENSE file that
3391# accompanied this code).
3392#
3393# You should have received a copy of the GNU General Public License version
3394# 2 along with this work; if not, write to the Free Software Foundation,
3395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3396#
3397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3398# or visit www.oracle.com if you need additional information or have any
3399# questions.
3400#
3401
3402# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3403# If so, then append $1 to $2 \
3404# Also set JVM_ARG_OK to true/false depending on outcome.
3405
3406
3407# Appends a string to a path variable, only adding the : when needed.
3408
3409
3410# Prepends a string to a path variable, only adding the : when needed.
3411
3412
3413# This will make sure the given variable points to a full and proper
3414# path. This means:
3415# 1) There will be no spaces in the path. On posix platforms,
3416#    spaces in the path will result in an error. On Windows,
3417#    the path will be rewritten using short-style to be space-free.
3418# 2) The path will be absolute, and it will be in unix-style (on
3419#     cygwin).
3420# $1: The name of the variable to fix
3421
3422
3423# This will make sure the given variable points to a executable
3424# with a full and proper path. This means:
3425# 1) There will be no spaces in the path. On posix platforms,
3426#    spaces in the path will result in an error. On Windows,
3427#    the path will be rewritten using short-style to be space-free.
3428# 2) The path will be absolute, and it will be in unix-style (on
3429#     cygwin).
3430# Any arguments given to the executable is preserved.
3431# If the input variable does not have a directory specification, then
3432# it need to be in the PATH.
3433# $1: The name of the variable to fix
3434
3435
3436
3437
3438# Register a --with argument but mark it as deprecated
3439# $1: The name of the with argument to deprecate, not including --with-
3440
3441
3442# Register a --enable argument but mark it as deprecated
3443# $1: The name of the with argument to deprecate, not including --enable-
3444# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3445
3446
3447
3448
3449# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3450# $1: variable to check
3451
3452
3453# Check that there are no unprocessed overridden variables left.
3454# If so, they are an incorrect argument and we will exit with an error.
3455
3456
3457# Setup a tool for the given variable. If correctly specified by the user,
3458# use that value, otherwise search for the tool using the supplied code snippet.
3459# $1: variable to set
3460# $2: code snippet to call to look for the tool
3461
3462
3463# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3464# $1: variable to set
3465# $2: executable name (or list of names) to look for
3466
3467
3468# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3469# $1: variable to set
3470# $2: executable name (or list of names) to look for
3471
3472
3473# Like BASIC_PATH_PROGS but fails if no tool was found.
3474# $1: variable to set
3475# $2: executable name (or list of names) to look for
3476
3477
3478# Like BASIC_SETUP_TOOL but fails if no tool was found.
3479# $1: variable to set
3480# $2: autoconf macro to call to look for the special tool
3481
3482
3483# Setup the most fundamental tools that relies on not much else to set up,
3484# but is used by much of the early bootstrap code.
3485
3486
3487# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497#%%% Simple tools %%%
3498
3499# Check if we have found a usable version of make
3500# $1: the path to a potential make binary (or empty)
3501# $2: the description on how we found this
3502
3503
3504
3505
3506# Goes looking for a usable version of GNU make.
3507
3508
3509
3510
3511
3512
3513# Check if build directory is on local disk. If not possible to determine,
3514# we prefer to claim it's local.
3515# Argument 1: directory to test
3516# Argument 2: what to do if it is on local disk
3517# Argument 3: what to do otherwise (remote disk or failure)
3518
3519
3520# Check that source files have basic read permissions set. This might
3521# not be the case in cygwin in certain conditions.
3522
3523
3524
3525
3526#
3527# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3528# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3529#
3530# This code is free software; you can redistribute it and/or modify it
3531# under the terms of the GNU General Public License version 2 only, as
3532# published by the Free Software Foundation.  Oracle designates this
3533# particular file as subject to the "Classpath" exception as provided
3534# by Oracle in the LICENSE file that accompanied this code.
3535#
3536# This code is distributed in the hope that it will be useful, but WITHOUT
3537# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3538# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3539# version 2 for more details (a copy is included in the LICENSE file that
3540# accompanied this code).
3541#
3542# You should have received a copy of the GNU General Public License version
3543# 2 along with this work; if not, write to the Free Software Foundation,
3544# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3545#
3546# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3547# or visit www.oracle.com if you need additional information or have any
3548# questions.
3549#
3550
3551
3552
3553
3554
3555# Helper function which possibly converts a path using DOS-style short mode.
3556# If so, the updated path is stored in $new_path.
3557# $1: The path to check
3558
3559
3560# Helper function which possibly converts a path using DOS-style short mode.
3561# If so, the updated path is stored in $new_path.
3562# $1: The path to check
3563
3564
3565# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3566# and could probably be heavily simplified. However, all changes in this
3567# area tend to need lot of testing in different scenarios, and in lack of
3568# proper unit testing, cleaning this up has not been deemed worth the effort
3569# at the moment.
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3580
3581
3582
3583
3584#
3585# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3586# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3587#
3588# This code is free software; you can redistribute it and/or modify it
3589# under the terms of the GNU General Public License version 2 only, as
3590# published by the Free Software Foundation.  Oracle designates this
3591# particular file as subject to the "Classpath" exception as provided
3592# by Oracle in the LICENSE file that accompanied this code.
3593#
3594# This code is distributed in the hope that it will be useful, but WITHOUT
3595# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3596# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3597# version 2 for more details (a copy is included in the LICENSE file that
3598# accompanied this code).
3599#
3600# You should have received a copy of the GNU General Public License version
3601# 2 along with this work; if not, write to the Free Software Foundation,
3602# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3603#
3604# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3605# or visit www.oracle.com if you need additional information or have any
3606# questions.
3607#
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619# ... then the rest
3620#
3621# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3622# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3623#
3624# This code is free software; you can redistribute it and/or modify it
3625# under the terms of the GNU General Public License version 2 only, as
3626# published by the Free Software Foundation.  Oracle designates this
3627# particular file as subject to the "Classpath" exception as provided
3628# by Oracle in the LICENSE file that accompanied this code.
3629#
3630# This code is distributed in the hope that it will be useful, but WITHOUT
3631# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3632# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3633# version 2 for more details (a copy is included in the LICENSE file that
3634# accompanied this code).
3635#
3636# You should have received a copy of the GNU General Public License version
3637# 2 along with this work; if not, write to the Free Software Foundation,
3638# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3639#
3640# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3641# or visit www.oracle.com if you need additional information or have any
3642# questions.
3643#
3644
3645########################################################################
3646# This file handles detection of the Boot JDK. The Boot JDK detection
3647# process has been developed as a response to solve a complex real-world
3648# problem. Initially, it was simple, but it has grown as platform after
3649# platform, idiosyncracy after idiosyncracy has been supported.
3650#
3651# The basic idea is this:
3652# 1) You need an acceptable *) JDK to use as a Boot JDK
3653# 2) There are several ways to locate a JDK, that are mostly platform
3654#    dependent **)
3655# 3) You can have multiple JDKs installed
3656# 4) If possible, configure should try to dig out an acceptable JDK
3657#    automatically, without having to resort to command-line options
3658#
3659# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3660#     javac) and not a JRE, etc.
3661#
3662# **) On Windows we typically use a well-known path.
3663#     On MacOSX we typically use the tool java_home.
3664#     On Linux we typically find javac in the $PATH, and then follow a
3665#     chain of symlinks that often ends up in a real JDK.
3666#
3667# This leads to the code where we check in different ways to locate a
3668# JDK, and if one is found, check if it is acceptable. If not, we print
3669# our reasons for rejecting it (useful when debugging non-working
3670# configure situations) and continue checking the next one.
3671########################################################################
3672
3673# Execute the check given as argument, and verify the result
3674# If the Boot JDK was previously found, do nothing
3675# $1 A command line (typically autoconf macro) to execute
3676
3677
3678# Test: Is bootjdk explicitely set by command line arguments?
3679
3680
3681# Test: Is bootjdk available from builddeps?
3682
3683
3684# Test: Is $JAVA_HOME set?
3685
3686
3687# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3688
3689
3690# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3691# $1: Argument to the java_home binary (optional)
3692
3693
3694# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3695
3696
3697# Look for a jdk in the given path. If there are multiple, try to select the newest.
3698# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3699# $1 = Path to directory containing jdk installations.
3700# $2 = String to append to the found JDK directory to get the proper JDK home
3701
3702
3703# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3704# environmental variable as base for where to look.
3705# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3706
3707
3708# Test: Is there a JDK installed in default, well-known locations?
3709
3710
3711# Check that a command-line tool in the Boot JDK is correct
3712# $1 = name of variable to assign
3713# $2 = name of binary
3714
3715
3716###############################################################################
3717#
3718# We need a Boot JDK to bootstrap the build.
3719#
3720
3721
3722
3723
3724
3725#
3726# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3727# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3728#
3729# This code is free software; you can redistribute it and/or modify it
3730# under the terms of the GNU General Public License version 2 only, as
3731# published by the Free Software Foundation.  Oracle designates this
3732# particular file as subject to the "Classpath" exception as provided
3733# by Oracle in the LICENSE file that accompanied this code.
3734#
3735# This code is distributed in the hope that it will be useful, but WITHOUT
3736# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3737# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3738# version 2 for more details (a copy is included in the LICENSE file that
3739# accompanied this code).
3740#
3741# You should have received a copy of the GNU General Public License version
3742# 2 along with this work; if not, write to the Free Software Foundation,
3743# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3744#
3745# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3746# or visit www.oracle.com if you need additional information or have any
3747# questions.
3748#
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769#
3770# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3771# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3772#
3773# This code is free software; you can redistribute it and/or modify it
3774# under the terms of the GNU General Public License version 2 only, as
3775# published by the Free Software Foundation.  Oracle designates this
3776# particular file as subject to the "Classpath" exception as provided
3777# by Oracle in the LICENSE file that accompanied this code.
3778#
3779# This code is distributed in the hope that it will be useful, but WITHOUT
3780# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3781# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3782# version 2 for more details (a copy is included in the LICENSE file that
3783# accompanied this code).
3784#
3785# You should have received a copy of the GNU General Public License version
3786# 2 along with this work; if not, write to the Free Software Foundation,
3787# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3788#
3789# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3790# or visit www.oracle.com if you need additional information or have any
3791# questions.
3792#
3793
3794
3795
3796
3797
3798# Documentation on common flags used for solstudio in HIGHEST.
3799#
3800# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3801#          done with care, there are some assumptions below that need to
3802#          be understood about the use of pointers, and IEEE behavior.
3803#
3804# -fns: Use non-standard floating point mode (not IEEE 754)
3805# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3806# -fsingle: Use single precision floating point with 'float'
3807# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3808#   (Source with excessing pointer casting and data access with mixed
3809#    pointer types are not recommended)
3810# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3811#   (If you expect perfect errno behavior, do not use this)
3812# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3813# -xrestrict: Pointer parameters to functions do not overlap
3814#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3815#    If you pass in multiple pointers to the same data, do not use this)
3816# -xlibmil: Inline some library routines
3817#   (If you expect perfect errno behavior, do not use this)
3818# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3819#   (If you expect perfect errno behavior, do not use this)
3820#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3821
3822    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3823    # Bug?
3824    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3825    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3826    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3827    #fi
3828
3829
3830
3831
3832
3833# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3834#                                   [RUN-IF-FALSE])
3835# ------------------------------------------------------------
3836# Check that the c and c++ compilers support an argument
3837
3838
3839# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3840#                                    [RUN-IF-FALSE])
3841# ------------------------------------------------------------
3842# Check that the linker support an argument
3843
3844
3845
3846
3847#
3848# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3849# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3850#
3851# This code is free software; you can redistribute it and/or modify it
3852# under the terms of the GNU General Public License version 2 only, as
3853# published by the Free Software Foundation.  Oracle designates this
3854# particular file as subject to the "Classpath" exception as provided
3855# by Oracle in the LICENSE file that accompanied this code.
3856#
3857# This code is distributed in the hope that it will be useful, but WITHOUT
3858# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3859# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3860# version 2 for more details (a copy is included in the LICENSE file that
3861# accompanied this code).
3862#
3863# You should have received a copy of the GNU General Public License version
3864# 2 along with this work; if not, write to the Free Software Foundation,
3865# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3866#
3867# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3868# or visit www.oracle.com if you need additional information or have any
3869# questions.
3870#
3871
3872
3873
3874
3875
3876cygwin_help() {
3877  case $1 in
3878    unzip)
3879      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3880      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3881      ;;
3882    zip)
3883      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3884      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3885      ;;
3886    make)
3887      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3888      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3889      ;;
3890    freetype)
3891      HELP_MSG="
3892The freetype library can now be build during the configure process.
3893Download the freetype sources and unpack them into an arbitrary directory:
3894
3895wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3896tar -xzf freetype-2.5.3.tar.gz
3897
3898Then run configure with '--with-freetype-src=<freetype_src>'. This will
3899automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3900builds or into '<freetype_src>/lib32' for 32-bit builds.
3901Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3902and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3903      ;;
3904  esac
3905}
3906
3907msys_help() {
3908  PKGHANDLER_COMMAND=""
3909}
3910
3911apt_help() {
3912  case $1 in
3913    devkit)
3914      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3915    openjdk)
3916      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3917    alsa)
3918      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3919    cups)
3920      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3921    freetype)
3922      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3923    pulse)
3924      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3925    x11)
3926      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3927    ccache)
3928      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3929  esac
3930}
3931
3932yum_help() {
3933  case $1 in
3934    devkit)
3935      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3936    openjdk)
3937      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3938    alsa)
3939      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3940    cups)
3941      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3942    freetype)
3943      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3944    pulse)
3945      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3946    x11)
3947      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3948    ccache)
3949      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3950  esac
3951}
3952
3953port_help() {
3954  PKGHANDLER_COMMAND=""
3955}
3956
3957pkgutil_help() {
3958  PKGHANDLER_COMMAND=""
3959}
3960
3961pkgadd_help() {
3962  PKGHANDLER_COMMAND=""
3963}
3964
3965# This function will check if we're called from the "configure" wrapper while
3966# printing --help. If so, we will print out additional information that can
3967# only be extracted within the autoconf script, and then exit. This must be
3968# called at the very beginning in configure.ac.
3969
3970
3971
3972
3973#
3974# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3975# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3976#
3977# This code is free software; you can redistribute it and/or modify it
3978# under the terms of the GNU General Public License version 2 only, as
3979# published by the Free Software Foundation.  Oracle designates this
3980# particular file as subject to the "Classpath" exception as provided
3981# by Oracle in the LICENSE file that accompanied this code.
3982#
3983# This code is distributed in the hope that it will be useful, but WITHOUT
3984# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3985# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3986# version 2 for more details (a copy is included in the LICENSE file that
3987# accompanied this code).
3988#
3989# You should have received a copy of the GNU General Public License version
3990# 2 along with this work; if not, write to the Free Software Foundation,
3991# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3992#
3993# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3994# or visit www.oracle.com if you need additional information or have any
3995# questions.
3996#
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007###############################################################################
4008#
4009# Should we build only OpenJDK even if closed sources are present?
4010#
4011
4012
4013
4014
4015###############################################################################
4016#
4017# Setup version numbers
4018#
4019
4020
4021
4022
4023
4024
4025#
4026# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4027# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4028#
4029# This code is free software; you can redistribute it and/or modify it
4030# under the terms of the GNU General Public License version 2 only, as
4031# published by the Free Software Foundation.  Oracle designates this
4032# particular file as subject to the "Classpath" exception as provided
4033# by Oracle in the LICENSE file that accompanied this code.
4034#
4035# This code is distributed in the hope that it will be useful, but WITHOUT
4036# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4037# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4038# version 2 for more details (a copy is included in the LICENSE file that
4039# accompanied this code).
4040#
4041# You should have received a copy of the GNU General Public License version
4042# 2 along with this work; if not, write to the Free Software Foundation,
4043# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4044#
4045# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4046# or visit www.oracle.com if you need additional information or have any
4047# questions.
4048#
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070#
4071# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4072# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4073#
4074# This code is free software; you can redistribute it and/or modify it
4075# under the terms of the GNU General Public License version 2 only, as
4076# published by the Free Software Foundation.  Oracle designates this
4077# particular file as subject to the "Classpath" exception as provided
4078# by Oracle in the LICENSE file that accompanied this code.
4079#
4080# This code is distributed in the hope that it will be useful, but WITHOUT
4081# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4082# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4083# version 2 for more details (a copy is included in the LICENSE file that
4084# accompanied this code).
4085#
4086# You should have received a copy of the GNU General Public License version
4087# 2 along with this work; if not, write to the Free Software Foundation,
4088# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4089#
4090# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4091# or visit www.oracle.com if you need additional information or have any
4092# questions.
4093#
4094
4095# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4096# Converts autoconf style CPU name to OpenJDK style, into
4097# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4098
4099
4100# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4101# Converts autoconf style OS name to OpenJDK style, into
4102# VAR_OS and VAR_OS_API.
4103
4104
4105# Expects $host_os $host_cpu $build_os and $build_cpu
4106# and $with_target_bits to have been setup!
4107#
4108# Translate the standard triplet(quadruplet) definition
4109# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4110# OPENJDK_BUILD_OS, etc.
4111
4112
4113# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4114# accordingly. Must be done after setting up build and target system, but before
4115# doing anything else with these values.
4116
4117
4118# Setup the legacy variables, for controlling the old makefiles.
4119#
4120
4121
4122
4123
4124#%%% Build and target systems %%%
4125
4126
4127
4128
4129# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4130# Add -mX to various FLAGS variables.
4131
4132
4133
4134
4135
4136
4137#
4138# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4139# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4140#
4141# This code is free software; you can redistribute it and/or modify it
4142# under the terms of the GNU General Public License version 2 only, as
4143# published by the Free Software Foundation.  Oracle designates this
4144# particular file as subject to the "Classpath" exception as provided
4145# by Oracle in the LICENSE file that accompanied this code.
4146#
4147# This code is distributed in the hope that it will be useful, but WITHOUT
4148# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4149# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4150# version 2 for more details (a copy is included in the LICENSE file that
4151# accompanied this code).
4152#
4153# You should have received a copy of the GNU General Public License version
4154# 2 along with this work; if not, write to the Free Software Foundation,
4155# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4156#
4157# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4158# or visit www.oracle.com if you need additional information or have any
4159# questions.
4160#
4161
4162
4163
4164
4165
4166
4167
4168
4169#
4170# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4171# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4172#
4173# This code is free software; you can redistribute it and/or modify it
4174# under the terms of the GNU General Public License version 2 only, as
4175# published by the Free Software Foundation.  Oracle designates this
4176# particular file as subject to the "Classpath" exception as provided
4177# by Oracle in the LICENSE file that accompanied this code.
4178#
4179# This code is distributed in the hope that it will be useful, but WITHOUT
4180# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4181# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4182# version 2 for more details (a copy is included in the LICENSE file that
4183# accompanied this code).
4184#
4185# You should have received a copy of the GNU General Public License version
4186# 2 along with this work; if not, write to the Free Software Foundation,
4187# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4188#
4189# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4190# or visit www.oracle.com if you need additional information or have any
4191# questions.
4192#
4193
4194########################################################################
4195# This file is responsible for detecting, verifying and setting up the
4196# toolchain, i.e. the compiler, linker and related utilities. It will setup
4197# proper paths to the binaries, but it will not setup any flags.
4198#
4199# The binaries used is determined by the toolchain type, which is the family of
4200# compilers and related tools that are used.
4201########################################################################
4202
4203
4204# All valid toolchains, regardless of platform (used by help.m4)
4205VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4206
4207# These toolchains are valid on different platforms
4208VALID_TOOLCHAINS_linux="gcc clang"
4209VALID_TOOLCHAINS_solaris="solstudio"
4210VALID_TOOLCHAINS_macosx="gcc clang"
4211VALID_TOOLCHAINS_aix="xlc"
4212VALID_TOOLCHAINS_windows="microsoft"
4213
4214# Toolchain descriptions
4215TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4216TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4217TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4218TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4219TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4220
4221# Setup a number of variables describing how native output files are
4222# named on this platform/toolchain.
4223
4224
4225# Determine which toolchain type to use, and make sure it is valid for this
4226# platform. Setup various information about the selected toolchain.
4227
4228
4229# Before we start detecting the toolchain executables, we might need some
4230# special setup, e.g. additional paths etc.
4231
4232
4233# Restore path, etc
4234
4235
4236# Check if a compiler is of the toolchain type we expect, and save the version
4237# information from it. If the compiler does not match the expected type,
4238# this function will abort using AC_MSG_ERROR. If it matches, the version will
4239# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4240# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4241#
4242# $1 = compiler to test (CC or CXX)
4243# $2 = human readable name of compiler (C or C++)
4244
4245
4246# Try to locate the given C or C++ compiler in the path, or otherwise.
4247#
4248# $1 = compiler to test (CC or CXX)
4249# $2 = human readable name of compiler (C or C++)
4250# $3 = list of compiler names to search for
4251
4252
4253# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4254# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4255# archiver (AR). Verify that the compilers are correct according to the
4256# toolchain type.
4257
4258
4259# Setup additional tools that is considered a part of the toolchain, but not the
4260# core part. Many of these are highly platform-specific and do not exist,
4261# and/or are not needed on all platforms.
4262
4263
4264# Setup the build tools (i.e, the compiler and linker used to build programs
4265# that should be run on the build platform, not the target platform, as a build
4266# helper). Since the non-cross-compile case uses the normal, target compilers
4267# for this, we can only do this after these have been setup.
4268
4269
4270# Setup legacy variables that are still needed as alternative ways to refer to
4271# parts of the toolchain.
4272
4273
4274# Do some additional checks on the detected tools.
4275
4276
4277# Setup the JTReg Regression Test Harness.
4278
4279
4280#
4281# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4282# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4283#
4284# This code is free software; you can redistribute it and/or modify it
4285# under the terms of the GNU General Public License version 2 only, as
4286# published by the Free Software Foundation.  Oracle designates this
4287# particular file as subject to the "Classpath" exception as provided
4288# by Oracle in the LICENSE file that accompanied this code.
4289#
4290# This code is distributed in the hope that it will be useful, but WITHOUT
4291# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4292# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4293# version 2 for more details (a copy is included in the LICENSE file that
4294# accompanied this code).
4295#
4296# You should have received a copy of the GNU General Public License version
4297# 2 along with this work; if not, write to the Free Software Foundation,
4298# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4299#
4300# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4301# or visit www.oracle.com if you need additional information or have any
4302# questions.
4303#
4304
4305
4306
4307
4308
4309
4310
4311# Check if the VS env variables were setup prior to running configure.
4312# If not, then find vcvarsall.bat and run it automatically, and integrate
4313# the set env variables into the spec file.
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325# This line needs to be here, verbatim, after all includes and the dummy hook
4326# definitions. It is replaced with custom functionality when building
4327# custom sources.
4328#CUSTOM_AUTOCONF_INCLUDE
4329
4330# Do not change or remove the following line, it is needed for consistency checks:
4331DATE_WHEN_GENERATED=1416597741
4332
4333###############################################################################
4334#
4335# Initialization / Boot-strapping
4336#
4337# The bootstrapping process needs to solve the "chicken or the egg" problem,
4338# thus it jumps back and forth, each time gaining something needed later on.
4339#
4340###############################################################################
4341
4342# If we are requested to print additional help, do that and then exit.
4343# This must be the very first call.
4344
4345  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4346    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4347    $PRINTF "Which are valid to use depends on the build platform.\n"
4348    for toolchain in $VALID_TOOLCHAINS_all; do
4349      # Use indirect variable referencing
4350      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4351      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4352      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4353    done
4354
4355    # And now exit directly
4356    exit 0
4357  fi
4358
4359
4360# Basic initialization that must happen first of all in the normal process.
4361
4362  # Save the original command line. This is passed to us by the wrapper configure script.
4363
4364  DATE_WHEN_CONFIGURED=`LANG=C date`
4365
4366  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4367$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4368  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4369$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4370
4371
4372  # Start with tools that do not need have cross compilation support
4373  # and can be expected to be found in the default PATH. These tools are
4374  # used by configure. Nor are these tools expected to be found in the
4375  # devkit from the builddeps server either, since they are
4376  # needed to download the devkit.
4377
4378  # First are all the simple required tools.
4379
4380
4381
4382  # Publish this variable in the help.
4383
4384
4385  if test "x$BASENAME" = x; then
4386    # The variable is not set by user, try to locate tool using the code snippet
4387    for ac_prog in basename
4388do
4389  # Extract the first word of "$ac_prog", so it can be a program name with args.
4390set dummy $ac_prog; ac_word=$2
4391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4392$as_echo_n "checking for $ac_word... " >&6; }
4393if ${ac_cv_path_BASENAME+:} false; then :
4394  $as_echo_n "(cached) " >&6
4395else
4396  case $BASENAME in
4397  [\\/]* | ?:[\\/]*)
4398  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4399  ;;
4400  *)
4401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4402for as_dir in $PATH
4403do
4404  IFS=$as_save_IFS
4405  test -z "$as_dir" && as_dir=.
4406    for ac_exec_ext in '' $ac_executable_extensions; do
4407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4408    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4410    break 2
4411  fi
4412done
4413  done
4414IFS=$as_save_IFS
4415
4416  ;;
4417esac
4418fi
4419BASENAME=$ac_cv_path_BASENAME
4420if test -n "$BASENAME"; then
4421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4422$as_echo "$BASENAME" >&6; }
4423else
4424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4425$as_echo "no" >&6; }
4426fi
4427
4428
4429  test -n "$BASENAME" && break
4430done
4431
4432  else
4433    # The variable is set, but is it from the command line or the environment?
4434
4435    # Try to remove the string !BASENAME! from our list.
4436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4438      # If it failed, the variable was not from the command line. Ignore it,
4439      # but warn the user (except for BASH, which is always set by the calling BASH).
4440      if test "xBASENAME" != xBASH; then
4441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4442$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4443      fi
4444      # Try to locate tool using the code snippet
4445      for ac_prog in basename
4446do
4447  # Extract the first word of "$ac_prog", so it can be a program name with args.
4448set dummy $ac_prog; ac_word=$2
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4450$as_echo_n "checking for $ac_word... " >&6; }
4451if ${ac_cv_path_BASENAME+:} false; then :
4452  $as_echo_n "(cached) " >&6
4453else
4454  case $BASENAME in
4455  [\\/]* | ?:[\\/]*)
4456  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4457  ;;
4458  *)
4459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460for as_dir in $PATH
4461do
4462  IFS=$as_save_IFS
4463  test -z "$as_dir" && as_dir=.
4464    for ac_exec_ext in '' $ac_executable_extensions; do
4465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4466    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4468    break 2
4469  fi
4470done
4471  done
4472IFS=$as_save_IFS
4473
4474  ;;
4475esac
4476fi
4477BASENAME=$ac_cv_path_BASENAME
4478if test -n "$BASENAME"; then
4479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4480$as_echo "$BASENAME" >&6; }
4481else
4482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4483$as_echo "no" >&6; }
4484fi
4485
4486
4487  test -n "$BASENAME" && break
4488done
4489
4490    else
4491      # If it succeeded, then it was overridden by the user. We will use it
4492      # for the tool.
4493
4494      # First remove it from the list of overridden variables, so we can test
4495      # for unknown variables in the end.
4496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4497
4498      # Check if the provided tool contains a complete path.
4499      tool_specified="$BASENAME"
4500      tool_basename="${tool_specified##*/}"
4501      if test "x$tool_basename" = "x$tool_specified"; then
4502        # A command without a complete path is provided, search $PATH.
4503        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4504$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4505        # Extract the first word of "$tool_basename", so it can be a program name with args.
4506set dummy $tool_basename; ac_word=$2
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508$as_echo_n "checking for $ac_word... " >&6; }
4509if ${ac_cv_path_BASENAME+:} false; then :
4510  $as_echo_n "(cached) " >&6
4511else
4512  case $BASENAME in
4513  [\\/]* | ?:[\\/]*)
4514  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4515  ;;
4516  *)
4517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH
4519do
4520  IFS=$as_save_IFS
4521  test -z "$as_dir" && as_dir=.
4522    for ac_exec_ext in '' $ac_executable_extensions; do
4523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4524    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4526    break 2
4527  fi
4528done
4529  done
4530IFS=$as_save_IFS
4531
4532  ;;
4533esac
4534fi
4535BASENAME=$ac_cv_path_BASENAME
4536if test -n "$BASENAME"; then
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4538$as_echo "$BASENAME" >&6; }
4539else
4540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541$as_echo "no" >&6; }
4542fi
4543
4544
4545        if test "x$BASENAME" = x; then
4546          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4547        fi
4548      else
4549        # Otherwise we believe it is a complete path. Use it as it is.
4550        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4551$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4552        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4553$as_echo_n "checking for BASENAME... " >&6; }
4554        if test ! -x "$tool_specified"; then
4555          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4556$as_echo "not found" >&6; }
4557          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4558        fi
4559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4560$as_echo "$tool_specified" >&6; }
4561      fi
4562    fi
4563  fi
4564
4565
4566
4567  if test "x$BASENAME" = x; then
4568    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4569  fi
4570
4571
4572
4573
4574
4575  # Publish this variable in the help.
4576
4577
4578  if test "x$BASH" = x; then
4579    # The variable is not set by user, try to locate tool using the code snippet
4580    for ac_prog in bash
4581do
4582  # Extract the first word of "$ac_prog", so it can be a program name with args.
4583set dummy $ac_prog; ac_word=$2
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4585$as_echo_n "checking for $ac_word... " >&6; }
4586if ${ac_cv_path_BASH+:} false; then :
4587  $as_echo_n "(cached) " >&6
4588else
4589  case $BASH in
4590  [\\/]* | ?:[\\/]*)
4591  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4592  ;;
4593  *)
4594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4595for as_dir in $PATH
4596do
4597  IFS=$as_save_IFS
4598  test -z "$as_dir" && as_dir=.
4599    for ac_exec_ext in '' $ac_executable_extensions; do
4600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4601    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4603    break 2
4604  fi
4605done
4606  done
4607IFS=$as_save_IFS
4608
4609  ;;
4610esac
4611fi
4612BASH=$ac_cv_path_BASH
4613if test -n "$BASH"; then
4614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4615$as_echo "$BASH" >&6; }
4616else
4617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4618$as_echo "no" >&6; }
4619fi
4620
4621
4622  test -n "$BASH" && break
4623done
4624
4625  else
4626    # The variable is set, but is it from the command line or the environment?
4627
4628    # Try to remove the string !BASH! from our list.
4629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4631      # If it failed, the variable was not from the command line. Ignore it,
4632      # but warn the user (except for BASH, which is always set by the calling BASH).
4633      if test "xBASH" != xBASH; then
4634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4635$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4636      fi
4637      # Try to locate tool using the code snippet
4638      for ac_prog in bash
4639do
4640  # Extract the first word of "$ac_prog", so it can be a program name with args.
4641set dummy $ac_prog; ac_word=$2
4642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4643$as_echo_n "checking for $ac_word... " >&6; }
4644if ${ac_cv_path_BASH+:} false; then :
4645  $as_echo_n "(cached) " >&6
4646else
4647  case $BASH in
4648  [\\/]* | ?:[\\/]*)
4649  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4650  ;;
4651  *)
4652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4653for as_dir in $PATH
4654do
4655  IFS=$as_save_IFS
4656  test -z "$as_dir" && as_dir=.
4657    for ac_exec_ext in '' $ac_executable_extensions; do
4658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4659    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4661    break 2
4662  fi
4663done
4664  done
4665IFS=$as_save_IFS
4666
4667  ;;
4668esac
4669fi
4670BASH=$ac_cv_path_BASH
4671if test -n "$BASH"; then
4672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4673$as_echo "$BASH" >&6; }
4674else
4675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4676$as_echo "no" >&6; }
4677fi
4678
4679
4680  test -n "$BASH" && break
4681done
4682
4683    else
4684      # If it succeeded, then it was overridden by the user. We will use it
4685      # for the tool.
4686
4687      # First remove it from the list of overridden variables, so we can test
4688      # for unknown variables in the end.
4689      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4690
4691      # Check if the provided tool contains a complete path.
4692      tool_specified="$BASH"
4693      tool_basename="${tool_specified##*/}"
4694      if test "x$tool_basename" = "x$tool_specified"; then
4695        # A command without a complete path is provided, search $PATH.
4696        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4697$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4698        # Extract the first word of "$tool_basename", so it can be a program name with args.
4699set dummy $tool_basename; ac_word=$2
4700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4701$as_echo_n "checking for $ac_word... " >&6; }
4702if ${ac_cv_path_BASH+:} false; then :
4703  $as_echo_n "(cached) " >&6
4704else
4705  case $BASH in
4706  [\\/]* | ?:[\\/]*)
4707  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4708  ;;
4709  *)
4710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in $PATH
4712do
4713  IFS=$as_save_IFS
4714  test -z "$as_dir" && as_dir=.
4715    for ac_exec_ext in '' $ac_executable_extensions; do
4716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4717    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4719    break 2
4720  fi
4721done
4722  done
4723IFS=$as_save_IFS
4724
4725  ;;
4726esac
4727fi
4728BASH=$ac_cv_path_BASH
4729if test -n "$BASH"; then
4730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4731$as_echo "$BASH" >&6; }
4732else
4733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
4735fi
4736
4737
4738        if test "x$BASH" = x; then
4739          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4740        fi
4741      else
4742        # Otherwise we believe it is a complete path. Use it as it is.
4743        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4744$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4746$as_echo_n "checking for BASH... " >&6; }
4747        if test ! -x "$tool_specified"; then
4748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4749$as_echo "not found" >&6; }
4750          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4751        fi
4752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4753$as_echo "$tool_specified" >&6; }
4754      fi
4755    fi
4756  fi
4757
4758
4759
4760  if test "x$BASH" = x; then
4761    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4762  fi
4763
4764
4765
4766
4767
4768  # Publish this variable in the help.
4769
4770
4771  if test "x$CAT" = x; then
4772    # The variable is not set by user, try to locate tool using the code snippet
4773    for ac_prog in cat
4774do
4775  # Extract the first word of "$ac_prog", so it can be a program name with args.
4776set dummy $ac_prog; ac_word=$2
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
4779if ${ac_cv_path_CAT+:} false; then :
4780  $as_echo_n "(cached) " >&6
4781else
4782  case $CAT in
4783  [\\/]* | ?:[\\/]*)
4784  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4785  ;;
4786  *)
4787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790  IFS=$as_save_IFS
4791  test -z "$as_dir" && as_dir=.
4792    for ac_exec_ext in '' $ac_executable_extensions; do
4793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4794    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796    break 2
4797  fi
4798done
4799  done
4800IFS=$as_save_IFS
4801
4802  ;;
4803esac
4804fi
4805CAT=$ac_cv_path_CAT
4806if test -n "$CAT"; then
4807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4808$as_echo "$CAT" >&6; }
4809else
4810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
4812fi
4813
4814
4815  test -n "$CAT" && break
4816done
4817
4818  else
4819    # The variable is set, but is it from the command line or the environment?
4820
4821    # Try to remove the string !CAT! from our list.
4822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4824      # If it failed, the variable was not from the command line. Ignore it,
4825      # but warn the user (except for BASH, which is always set by the calling BASH).
4826      if test "xCAT" != xBASH; then
4827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4828$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4829      fi
4830      # Try to locate tool using the code snippet
4831      for ac_prog in cat
4832do
4833  # Extract the first word of "$ac_prog", so it can be a program name with args.
4834set dummy $ac_prog; ac_word=$2
4835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4836$as_echo_n "checking for $ac_word... " >&6; }
4837if ${ac_cv_path_CAT+:} false; then :
4838  $as_echo_n "(cached) " >&6
4839else
4840  case $CAT in
4841  [\\/]* | ?:[\\/]*)
4842  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4843  ;;
4844  *)
4845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4846for as_dir in $PATH
4847do
4848  IFS=$as_save_IFS
4849  test -z "$as_dir" && as_dir=.
4850    for ac_exec_ext in '' $ac_executable_extensions; do
4851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4852    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4854    break 2
4855  fi
4856done
4857  done
4858IFS=$as_save_IFS
4859
4860  ;;
4861esac
4862fi
4863CAT=$ac_cv_path_CAT
4864if test -n "$CAT"; then
4865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4866$as_echo "$CAT" >&6; }
4867else
4868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4869$as_echo "no" >&6; }
4870fi
4871
4872
4873  test -n "$CAT" && break
4874done
4875
4876    else
4877      # If it succeeded, then it was overridden by the user. We will use it
4878      # for the tool.
4879
4880      # First remove it from the list of overridden variables, so we can test
4881      # for unknown variables in the end.
4882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4883
4884      # Check if the provided tool contains a complete path.
4885      tool_specified="$CAT"
4886      tool_basename="${tool_specified##*/}"
4887      if test "x$tool_basename" = "x$tool_specified"; then
4888        # A command without a complete path is provided, search $PATH.
4889        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4890$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4891        # Extract the first word of "$tool_basename", so it can be a program name with args.
4892set dummy $tool_basename; ac_word=$2
4893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if ${ac_cv_path_CAT+:} false; then :
4896  $as_echo_n "(cached) " >&6
4897else
4898  case $CAT in
4899  [\\/]* | ?:[\\/]*)
4900  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4901  ;;
4902  *)
4903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in $PATH
4905do
4906  IFS=$as_save_IFS
4907  test -z "$as_dir" && as_dir=.
4908    for ac_exec_ext in '' $ac_executable_extensions; do
4909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4910    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4912    break 2
4913  fi
4914done
4915  done
4916IFS=$as_save_IFS
4917
4918  ;;
4919esac
4920fi
4921CAT=$ac_cv_path_CAT
4922if test -n "$CAT"; then
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4924$as_echo "$CAT" >&6; }
4925else
4926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
4930
4931        if test "x$CAT" = x; then
4932          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4933        fi
4934      else
4935        # Otherwise we believe it is a complete path. Use it as it is.
4936        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4937$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4939$as_echo_n "checking for CAT... " >&6; }
4940        if test ! -x "$tool_specified"; then
4941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4942$as_echo "not found" >&6; }
4943          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4944        fi
4945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4946$as_echo "$tool_specified" >&6; }
4947      fi
4948    fi
4949  fi
4950
4951
4952
4953  if test "x$CAT" = x; then
4954    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4955  fi
4956
4957
4958
4959
4960
4961  # Publish this variable in the help.
4962
4963
4964  if test "x$CHMOD" = x; then
4965    # The variable is not set by user, try to locate tool using the code snippet
4966    for ac_prog in chmod
4967do
4968  # Extract the first word of "$ac_prog", so it can be a program name with args.
4969set dummy $ac_prog; ac_word=$2
4970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4971$as_echo_n "checking for $ac_word... " >&6; }
4972if ${ac_cv_path_CHMOD+:} false; then :
4973  $as_echo_n "(cached) " >&6
4974else
4975  case $CHMOD in
4976  [\\/]* | ?:[\\/]*)
4977  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4978  ;;
4979  *)
4980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4981for as_dir in $PATH
4982do
4983  IFS=$as_save_IFS
4984  test -z "$as_dir" && as_dir=.
4985    for ac_exec_ext in '' $ac_executable_extensions; do
4986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4987    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4989    break 2
4990  fi
4991done
4992  done
4993IFS=$as_save_IFS
4994
4995  ;;
4996esac
4997fi
4998CHMOD=$ac_cv_path_CHMOD
4999if test -n "$CHMOD"; then
5000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5001$as_echo "$CHMOD" >&6; }
5002else
5003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5004$as_echo "no" >&6; }
5005fi
5006
5007
5008  test -n "$CHMOD" && break
5009done
5010
5011  else
5012    # The variable is set, but is it from the command line or the environment?
5013
5014    # Try to remove the string !CHMOD! from our list.
5015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5017      # If it failed, the variable was not from the command line. Ignore it,
5018      # but warn the user (except for BASH, which is always set by the calling BASH).
5019      if test "xCHMOD" != xBASH; then
5020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5021$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5022      fi
5023      # Try to locate tool using the code snippet
5024      for ac_prog in chmod
5025do
5026  # Extract the first word of "$ac_prog", so it can be a program name with args.
5027set dummy $ac_prog; ac_word=$2
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
5030if ${ac_cv_path_CHMOD+:} false; then :
5031  $as_echo_n "(cached) " >&6
5032else
5033  case $CHMOD in
5034  [\\/]* | ?:[\\/]*)
5035  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5036  ;;
5037  *)
5038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041  IFS=$as_save_IFS
5042  test -z "$as_dir" && as_dir=.
5043    for ac_exec_ext in '' $ac_executable_extensions; do
5044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5045    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047    break 2
5048  fi
5049done
5050  done
5051IFS=$as_save_IFS
5052
5053  ;;
5054esac
5055fi
5056CHMOD=$ac_cv_path_CHMOD
5057if test -n "$CHMOD"; then
5058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5059$as_echo "$CHMOD" >&6; }
5060else
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065
5066  test -n "$CHMOD" && break
5067done
5068
5069    else
5070      # If it succeeded, then it was overridden by the user. We will use it
5071      # for the tool.
5072
5073      # First remove it from the list of overridden variables, so we can test
5074      # for unknown variables in the end.
5075      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5076
5077      # Check if the provided tool contains a complete path.
5078      tool_specified="$CHMOD"
5079      tool_basename="${tool_specified##*/}"
5080      if test "x$tool_basename" = "x$tool_specified"; then
5081        # A command without a complete path is provided, search $PATH.
5082        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5083$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5084        # Extract the first word of "$tool_basename", so it can be a program name with args.
5085set dummy $tool_basename; ac_word=$2
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087$as_echo_n "checking for $ac_word... " >&6; }
5088if ${ac_cv_path_CHMOD+:} false; then :
5089  $as_echo_n "(cached) " >&6
5090else
5091  case $CHMOD in
5092  [\\/]* | ?:[\\/]*)
5093  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5094  ;;
5095  *)
5096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5097for as_dir in $PATH
5098do
5099  IFS=$as_save_IFS
5100  test -z "$as_dir" && as_dir=.
5101    for ac_exec_ext in '' $ac_executable_extensions; do
5102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5103    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5105    break 2
5106  fi
5107done
5108  done
5109IFS=$as_save_IFS
5110
5111  ;;
5112esac
5113fi
5114CHMOD=$ac_cv_path_CHMOD
5115if test -n "$CHMOD"; then
5116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5117$as_echo "$CHMOD" >&6; }
5118else
5119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
5121fi
5122
5123
5124        if test "x$CHMOD" = x; then
5125          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5126        fi
5127      else
5128        # Otherwise we believe it is a complete path. Use it as it is.
5129        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5130$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5132$as_echo_n "checking for CHMOD... " >&6; }
5133        if test ! -x "$tool_specified"; then
5134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5135$as_echo "not found" >&6; }
5136          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5137        fi
5138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5139$as_echo "$tool_specified" >&6; }
5140      fi
5141    fi
5142  fi
5143
5144
5145
5146  if test "x$CHMOD" = x; then
5147    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5148  fi
5149
5150
5151
5152
5153
5154  # Publish this variable in the help.
5155
5156
5157  if test "x$CMP" = x; then
5158    # The variable is not set by user, try to locate tool using the code snippet
5159    for ac_prog in cmp
5160do
5161  # Extract the first word of "$ac_prog", so it can be a program name with args.
5162set dummy $ac_prog; ac_word=$2
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5164$as_echo_n "checking for $ac_word... " >&6; }
5165if ${ac_cv_path_CMP+:} false; then :
5166  $as_echo_n "(cached) " >&6
5167else
5168  case $CMP in
5169  [\\/]* | ?:[\\/]*)
5170  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5171  ;;
5172  *)
5173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5174for as_dir in $PATH
5175do
5176  IFS=$as_save_IFS
5177  test -z "$as_dir" && as_dir=.
5178    for ac_exec_ext in '' $ac_executable_extensions; do
5179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5180    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5182    break 2
5183  fi
5184done
5185  done
5186IFS=$as_save_IFS
5187
5188  ;;
5189esac
5190fi
5191CMP=$ac_cv_path_CMP
5192if test -n "$CMP"; then
5193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5194$as_echo "$CMP" >&6; }
5195else
5196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5197$as_echo "no" >&6; }
5198fi
5199
5200
5201  test -n "$CMP" && break
5202done
5203
5204  else
5205    # The variable is set, but is it from the command line or the environment?
5206
5207    # Try to remove the string !CMP! from our list.
5208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5210      # If it failed, the variable was not from the command line. Ignore it,
5211      # but warn the user (except for BASH, which is always set by the calling BASH).
5212      if test "xCMP" != xBASH; then
5213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5214$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5215      fi
5216      # Try to locate tool using the code snippet
5217      for ac_prog in cmp
5218do
5219  # Extract the first word of "$ac_prog", so it can be a program name with args.
5220set dummy $ac_prog; ac_word=$2
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5222$as_echo_n "checking for $ac_word... " >&6; }
5223if ${ac_cv_path_CMP+:} false; then :
5224  $as_echo_n "(cached) " >&6
5225else
5226  case $CMP in
5227  [\\/]* | ?:[\\/]*)
5228  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5229  ;;
5230  *)
5231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232for as_dir in $PATH
5233do
5234  IFS=$as_save_IFS
5235  test -z "$as_dir" && as_dir=.
5236    for ac_exec_ext in '' $ac_executable_extensions; do
5237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5238    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5240    break 2
5241  fi
5242done
5243  done
5244IFS=$as_save_IFS
5245
5246  ;;
5247esac
5248fi
5249CMP=$ac_cv_path_CMP
5250if test -n "$CMP"; then
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5252$as_echo "$CMP" >&6; }
5253else
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255$as_echo "no" >&6; }
5256fi
5257
5258
5259  test -n "$CMP" && break
5260done
5261
5262    else
5263      # If it succeeded, then it was overridden by the user. We will use it
5264      # for the tool.
5265
5266      # First remove it from the list of overridden variables, so we can test
5267      # for unknown variables in the end.
5268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5269
5270      # Check if the provided tool contains a complete path.
5271      tool_specified="$CMP"
5272      tool_basename="${tool_specified##*/}"
5273      if test "x$tool_basename" = "x$tool_specified"; then
5274        # A command without a complete path is provided, search $PATH.
5275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5276$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5277        # Extract the first word of "$tool_basename", so it can be a program name with args.
5278set dummy $tool_basename; ac_word=$2
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5280$as_echo_n "checking for $ac_word... " >&6; }
5281if ${ac_cv_path_CMP+:} false; then :
5282  $as_echo_n "(cached) " >&6
5283else
5284  case $CMP in
5285  [\\/]* | ?:[\\/]*)
5286  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5287  ;;
5288  *)
5289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290for as_dir in $PATH
5291do
5292  IFS=$as_save_IFS
5293  test -z "$as_dir" && as_dir=.
5294    for ac_exec_ext in '' $ac_executable_extensions; do
5295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5296    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5298    break 2
5299  fi
5300done
5301  done
5302IFS=$as_save_IFS
5303
5304  ;;
5305esac
5306fi
5307CMP=$ac_cv_path_CMP
5308if test -n "$CMP"; then
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5310$as_echo "$CMP" >&6; }
5311else
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }
5314fi
5315
5316
5317        if test "x$CMP" = x; then
5318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5319        fi
5320      else
5321        # Otherwise we believe it is a complete path. Use it as it is.
5322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5323$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5325$as_echo_n "checking for CMP... " >&6; }
5326        if test ! -x "$tool_specified"; then
5327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5328$as_echo "not found" >&6; }
5329          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5330        fi
5331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5332$as_echo "$tool_specified" >&6; }
5333      fi
5334    fi
5335  fi
5336
5337
5338
5339  if test "x$CMP" = x; then
5340    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5341  fi
5342
5343
5344
5345
5346
5347  # Publish this variable in the help.
5348
5349
5350  if test "x$COMM" = x; then
5351    # The variable is not set by user, try to locate tool using the code snippet
5352    for ac_prog in comm
5353do
5354  # Extract the first word of "$ac_prog", so it can be a program name with args.
5355set dummy $ac_prog; ac_word=$2
5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5357$as_echo_n "checking for $ac_word... " >&6; }
5358if ${ac_cv_path_COMM+:} false; then :
5359  $as_echo_n "(cached) " >&6
5360else
5361  case $COMM in
5362  [\\/]* | ?:[\\/]*)
5363  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5364  ;;
5365  *)
5366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH
5368do
5369  IFS=$as_save_IFS
5370  test -z "$as_dir" && as_dir=.
5371    for ac_exec_ext in '' $ac_executable_extensions; do
5372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5373    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5375    break 2
5376  fi
5377done
5378  done
5379IFS=$as_save_IFS
5380
5381  ;;
5382esac
5383fi
5384COMM=$ac_cv_path_COMM
5385if test -n "$COMM"; then
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5387$as_echo "$COMM" >&6; }
5388else
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392
5393
5394  test -n "$COMM" && break
5395done
5396
5397  else
5398    # The variable is set, but is it from the command line or the environment?
5399
5400    # Try to remove the string !COMM! from our list.
5401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5403      # If it failed, the variable was not from the command line. Ignore it,
5404      # but warn the user (except for BASH, which is always set by the calling BASH).
5405      if test "xCOMM" != xBASH; then
5406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5407$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5408      fi
5409      # Try to locate tool using the code snippet
5410      for ac_prog in comm
5411do
5412  # Extract the first word of "$ac_prog", so it can be a program name with args.
5413set dummy $ac_prog; ac_word=$2
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5415$as_echo_n "checking for $ac_word... " >&6; }
5416if ${ac_cv_path_COMM+:} false; then :
5417  $as_echo_n "(cached) " >&6
5418else
5419  case $COMM in
5420  [\\/]* | ?:[\\/]*)
5421  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5422  ;;
5423  *)
5424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5425for as_dir in $PATH
5426do
5427  IFS=$as_save_IFS
5428  test -z "$as_dir" && as_dir=.
5429    for ac_exec_ext in '' $ac_executable_extensions; do
5430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5431    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5433    break 2
5434  fi
5435done
5436  done
5437IFS=$as_save_IFS
5438
5439  ;;
5440esac
5441fi
5442COMM=$ac_cv_path_COMM
5443if test -n "$COMM"; then
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5445$as_echo "$COMM" >&6; }
5446else
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }
5449fi
5450
5451
5452  test -n "$COMM" && break
5453done
5454
5455    else
5456      # If it succeeded, then it was overridden by the user. We will use it
5457      # for the tool.
5458
5459      # First remove it from the list of overridden variables, so we can test
5460      # for unknown variables in the end.
5461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5462
5463      # Check if the provided tool contains a complete path.
5464      tool_specified="$COMM"
5465      tool_basename="${tool_specified##*/}"
5466      if test "x$tool_basename" = "x$tool_specified"; then
5467        # A command without a complete path is provided, search $PATH.
5468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5469$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5470        # Extract the first word of "$tool_basename", so it can be a program name with args.
5471set dummy $tool_basename; ac_word=$2
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5473$as_echo_n "checking for $ac_word... " >&6; }
5474if ${ac_cv_path_COMM+:} false; then :
5475  $as_echo_n "(cached) " >&6
5476else
5477  case $COMM in
5478  [\\/]* | ?:[\\/]*)
5479  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5480  ;;
5481  *)
5482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485  IFS=$as_save_IFS
5486  test -z "$as_dir" && as_dir=.
5487    for ac_exec_ext in '' $ac_executable_extensions; do
5488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5489    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5491    break 2
5492  fi
5493done
5494  done
5495IFS=$as_save_IFS
5496
5497  ;;
5498esac
5499fi
5500COMM=$ac_cv_path_COMM
5501if test -n "$COMM"; then
5502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5503$as_echo "$COMM" >&6; }
5504else
5505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506$as_echo "no" >&6; }
5507fi
5508
5509
5510        if test "x$COMM" = x; then
5511          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5512        fi
5513      else
5514        # Otherwise we believe it is a complete path. Use it as it is.
5515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5516$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5518$as_echo_n "checking for COMM... " >&6; }
5519        if test ! -x "$tool_specified"; then
5520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5521$as_echo "not found" >&6; }
5522          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5523        fi
5524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5525$as_echo "$tool_specified" >&6; }
5526      fi
5527    fi
5528  fi
5529
5530
5531
5532  if test "x$COMM" = x; then
5533    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5534  fi
5535
5536
5537
5538
5539
5540  # Publish this variable in the help.
5541
5542
5543  if test "x$CP" = x; then
5544    # The variable is not set by user, try to locate tool using the code snippet
5545    for ac_prog in cp
5546do
5547  # Extract the first word of "$ac_prog", so it can be a program name with args.
5548set dummy $ac_prog; ac_word=$2
5549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5550$as_echo_n "checking for $ac_word... " >&6; }
5551if ${ac_cv_path_CP+:} false; then :
5552  $as_echo_n "(cached) " >&6
5553else
5554  case $CP in
5555  [\\/]* | ?:[\\/]*)
5556  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5557  ;;
5558  *)
5559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5560for as_dir in $PATH
5561do
5562  IFS=$as_save_IFS
5563  test -z "$as_dir" && as_dir=.
5564    for ac_exec_ext in '' $ac_executable_extensions; do
5565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5566    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5568    break 2
5569  fi
5570done
5571  done
5572IFS=$as_save_IFS
5573
5574  ;;
5575esac
5576fi
5577CP=$ac_cv_path_CP
5578if test -n "$CP"; then
5579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5580$as_echo "$CP" >&6; }
5581else
5582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5583$as_echo "no" >&6; }
5584fi
5585
5586
5587  test -n "$CP" && break
5588done
5589
5590  else
5591    # The variable is set, but is it from the command line or the environment?
5592
5593    # Try to remove the string !CP! from our list.
5594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5596      # If it failed, the variable was not from the command line. Ignore it,
5597      # but warn the user (except for BASH, which is always set by the calling BASH).
5598      if test "xCP" != xBASH; then
5599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5600$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5601      fi
5602      # Try to locate tool using the code snippet
5603      for ac_prog in cp
5604do
5605  # Extract the first word of "$ac_prog", so it can be a program name with args.
5606set dummy $ac_prog; ac_word=$2
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5608$as_echo_n "checking for $ac_word... " >&6; }
5609if ${ac_cv_path_CP+:} false; then :
5610  $as_echo_n "(cached) " >&6
5611else
5612  case $CP in
5613  [\\/]* | ?:[\\/]*)
5614  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5615  ;;
5616  *)
5617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5618for as_dir in $PATH
5619do
5620  IFS=$as_save_IFS
5621  test -z "$as_dir" && as_dir=.
5622    for ac_exec_ext in '' $ac_executable_extensions; do
5623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5624    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5626    break 2
5627  fi
5628done
5629  done
5630IFS=$as_save_IFS
5631
5632  ;;
5633esac
5634fi
5635CP=$ac_cv_path_CP
5636if test -n "$CP"; then
5637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5638$as_echo "$CP" >&6; }
5639else
5640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5641$as_echo "no" >&6; }
5642fi
5643
5644
5645  test -n "$CP" && break
5646done
5647
5648    else
5649      # If it succeeded, then it was overridden by the user. We will use it
5650      # for the tool.
5651
5652      # First remove it from the list of overridden variables, so we can test
5653      # for unknown variables in the end.
5654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5655
5656      # Check if the provided tool contains a complete path.
5657      tool_specified="$CP"
5658      tool_basename="${tool_specified##*/}"
5659      if test "x$tool_basename" = "x$tool_specified"; then
5660        # A command without a complete path is provided, search $PATH.
5661        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5662$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5663        # Extract the first word of "$tool_basename", so it can be a program name with args.
5664set dummy $tool_basename; ac_word=$2
5665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5666$as_echo_n "checking for $ac_word... " >&6; }
5667if ${ac_cv_path_CP+:} false; then :
5668  $as_echo_n "(cached) " >&6
5669else
5670  case $CP in
5671  [\\/]* | ?:[\\/]*)
5672  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5673  ;;
5674  *)
5675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676for as_dir in $PATH
5677do
5678  IFS=$as_save_IFS
5679  test -z "$as_dir" && as_dir=.
5680    for ac_exec_ext in '' $ac_executable_extensions; do
5681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5682    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5684    break 2
5685  fi
5686done
5687  done
5688IFS=$as_save_IFS
5689
5690  ;;
5691esac
5692fi
5693CP=$ac_cv_path_CP
5694if test -n "$CP"; then
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5696$as_echo "$CP" >&6; }
5697else
5698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
5700fi
5701
5702
5703        if test "x$CP" = x; then
5704          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5705        fi
5706      else
5707        # Otherwise we believe it is a complete path. Use it as it is.
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5709$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5711$as_echo_n "checking for CP... " >&6; }
5712        if test ! -x "$tool_specified"; then
5713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5714$as_echo "not found" >&6; }
5715          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5716        fi
5717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5718$as_echo "$tool_specified" >&6; }
5719      fi
5720    fi
5721  fi
5722
5723
5724
5725  if test "x$CP" = x; then
5726    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5727  fi
5728
5729
5730
5731
5732
5733  # Publish this variable in the help.
5734
5735
5736  if test "x$CUT" = x; then
5737    # The variable is not set by user, try to locate tool using the code snippet
5738    for ac_prog in cut
5739do
5740  # Extract the first word of "$ac_prog", so it can be a program name with args.
5741set dummy $ac_prog; ac_word=$2
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
5744if ${ac_cv_path_CUT+:} false; then :
5745  $as_echo_n "(cached) " >&6
5746else
5747  case $CUT in
5748  [\\/]* | ?:[\\/]*)
5749  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5750  ;;
5751  *)
5752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5753for as_dir in $PATH
5754do
5755  IFS=$as_save_IFS
5756  test -z "$as_dir" && as_dir=.
5757    for ac_exec_ext in '' $ac_executable_extensions; do
5758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5759    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5761    break 2
5762  fi
5763done
5764  done
5765IFS=$as_save_IFS
5766
5767  ;;
5768esac
5769fi
5770CUT=$ac_cv_path_CUT
5771if test -n "$CUT"; then
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5773$as_echo "$CUT" >&6; }
5774else
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776$as_echo "no" >&6; }
5777fi
5778
5779
5780  test -n "$CUT" && break
5781done
5782
5783  else
5784    # The variable is set, but is it from the command line or the environment?
5785
5786    # Try to remove the string !CUT! from our list.
5787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5789      # If it failed, the variable was not from the command line. Ignore it,
5790      # but warn the user (except for BASH, which is always set by the calling BASH).
5791      if test "xCUT" != xBASH; then
5792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5793$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5794      fi
5795      # Try to locate tool using the code snippet
5796      for ac_prog in cut
5797do
5798  # Extract the first word of "$ac_prog", so it can be a program name with args.
5799set dummy $ac_prog; ac_word=$2
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5801$as_echo_n "checking for $ac_word... " >&6; }
5802if ${ac_cv_path_CUT+:} false; then :
5803  $as_echo_n "(cached) " >&6
5804else
5805  case $CUT in
5806  [\\/]* | ?:[\\/]*)
5807  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5808  ;;
5809  *)
5810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5811for as_dir in $PATH
5812do
5813  IFS=$as_save_IFS
5814  test -z "$as_dir" && as_dir=.
5815    for ac_exec_ext in '' $ac_executable_extensions; do
5816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5817    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5819    break 2
5820  fi
5821done
5822  done
5823IFS=$as_save_IFS
5824
5825  ;;
5826esac
5827fi
5828CUT=$ac_cv_path_CUT
5829if test -n "$CUT"; then
5830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5831$as_echo "$CUT" >&6; }
5832else
5833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5834$as_echo "no" >&6; }
5835fi
5836
5837
5838  test -n "$CUT" && break
5839done
5840
5841    else
5842      # If it succeeded, then it was overridden by the user. We will use it
5843      # for the tool.
5844
5845      # First remove it from the list of overridden variables, so we can test
5846      # for unknown variables in the end.
5847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5848
5849      # Check if the provided tool contains a complete path.
5850      tool_specified="$CUT"
5851      tool_basename="${tool_specified##*/}"
5852      if test "x$tool_basename" = "x$tool_specified"; then
5853        # A command without a complete path is provided, search $PATH.
5854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5855$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5856        # Extract the first word of "$tool_basename", so it can be a program name with args.
5857set dummy $tool_basename; ac_word=$2
5858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5859$as_echo_n "checking for $ac_word... " >&6; }
5860if ${ac_cv_path_CUT+:} false; then :
5861  $as_echo_n "(cached) " >&6
5862else
5863  case $CUT in
5864  [\\/]* | ?:[\\/]*)
5865  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5866  ;;
5867  *)
5868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5869for as_dir in $PATH
5870do
5871  IFS=$as_save_IFS
5872  test -z "$as_dir" && as_dir=.
5873    for ac_exec_ext in '' $ac_executable_extensions; do
5874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5875    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5877    break 2
5878  fi
5879done
5880  done
5881IFS=$as_save_IFS
5882
5883  ;;
5884esac
5885fi
5886CUT=$ac_cv_path_CUT
5887if test -n "$CUT"; then
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5889$as_echo "$CUT" >&6; }
5890else
5891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5892$as_echo "no" >&6; }
5893fi
5894
5895
5896        if test "x$CUT" = x; then
5897          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5898        fi
5899      else
5900        # Otherwise we believe it is a complete path. Use it as it is.
5901        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5902$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5904$as_echo_n "checking for CUT... " >&6; }
5905        if test ! -x "$tool_specified"; then
5906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5907$as_echo "not found" >&6; }
5908          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5909        fi
5910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5911$as_echo "$tool_specified" >&6; }
5912      fi
5913    fi
5914  fi
5915
5916
5917
5918  if test "x$CUT" = x; then
5919    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5920  fi
5921
5922
5923
5924
5925
5926  # Publish this variable in the help.
5927
5928
5929  if test "x$DATE" = x; then
5930    # The variable is not set by user, try to locate tool using the code snippet
5931    for ac_prog in date
5932do
5933  # Extract the first word of "$ac_prog", so it can be a program name with args.
5934set dummy $ac_prog; ac_word=$2
5935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5936$as_echo_n "checking for $ac_word... " >&6; }
5937if ${ac_cv_path_DATE+:} false; then :
5938  $as_echo_n "(cached) " >&6
5939else
5940  case $DATE in
5941  [\\/]* | ?:[\\/]*)
5942  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5943  ;;
5944  *)
5945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5946for as_dir in $PATH
5947do
5948  IFS=$as_save_IFS
5949  test -z "$as_dir" && as_dir=.
5950    for ac_exec_ext in '' $ac_executable_extensions; do
5951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5952    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5954    break 2
5955  fi
5956done
5957  done
5958IFS=$as_save_IFS
5959
5960  ;;
5961esac
5962fi
5963DATE=$ac_cv_path_DATE
5964if test -n "$DATE"; then
5965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5966$as_echo "$DATE" >&6; }
5967else
5968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5969$as_echo "no" >&6; }
5970fi
5971
5972
5973  test -n "$DATE" && break
5974done
5975
5976  else
5977    # The variable is set, but is it from the command line or the environment?
5978
5979    # Try to remove the string !DATE! from our list.
5980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5982      # If it failed, the variable was not from the command line. Ignore it,
5983      # but warn the user (except for BASH, which is always set by the calling BASH).
5984      if test "xDATE" != xBASH; then
5985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5986$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5987      fi
5988      # Try to locate tool using the code snippet
5989      for ac_prog in date
5990do
5991  # Extract the first word of "$ac_prog", so it can be a program name with args.
5992set dummy $ac_prog; ac_word=$2
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994$as_echo_n "checking for $ac_word... " >&6; }
5995if ${ac_cv_path_DATE+:} false; then :
5996  $as_echo_n "(cached) " >&6
5997else
5998  case $DATE in
5999  [\\/]* | ?:[\\/]*)
6000  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6001  ;;
6002  *)
6003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006  IFS=$as_save_IFS
6007  test -z "$as_dir" && as_dir=.
6008    for ac_exec_ext in '' $ac_executable_extensions; do
6009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6010    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012    break 2
6013  fi
6014done
6015  done
6016IFS=$as_save_IFS
6017
6018  ;;
6019esac
6020fi
6021DATE=$ac_cv_path_DATE
6022if test -n "$DATE"; then
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6024$as_echo "$DATE" >&6; }
6025else
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028fi
6029
6030
6031  test -n "$DATE" && break
6032done
6033
6034    else
6035      # If it succeeded, then it was overridden by the user. We will use it
6036      # for the tool.
6037
6038      # First remove it from the list of overridden variables, so we can test
6039      # for unknown variables in the end.
6040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6041
6042      # Check if the provided tool contains a complete path.
6043      tool_specified="$DATE"
6044      tool_basename="${tool_specified##*/}"
6045      if test "x$tool_basename" = "x$tool_specified"; then
6046        # A command without a complete path is provided, search $PATH.
6047        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6048$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6049        # Extract the first word of "$tool_basename", so it can be a program name with args.
6050set dummy $tool_basename; ac_word=$2
6051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052$as_echo_n "checking for $ac_word... " >&6; }
6053if ${ac_cv_path_DATE+:} false; then :
6054  $as_echo_n "(cached) " >&6
6055else
6056  case $DATE in
6057  [\\/]* | ?:[\\/]*)
6058  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6059  ;;
6060  *)
6061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH
6063do
6064  IFS=$as_save_IFS
6065  test -z "$as_dir" && as_dir=.
6066    for ac_exec_ext in '' $ac_executable_extensions; do
6067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6068    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070    break 2
6071  fi
6072done
6073  done
6074IFS=$as_save_IFS
6075
6076  ;;
6077esac
6078fi
6079DATE=$ac_cv_path_DATE
6080if test -n "$DATE"; then
6081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6082$as_echo "$DATE" >&6; }
6083else
6084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6085$as_echo "no" >&6; }
6086fi
6087
6088
6089        if test "x$DATE" = x; then
6090          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6091        fi
6092      else
6093        # Otherwise we believe it is a complete path. Use it as it is.
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6095$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6097$as_echo_n "checking for DATE... " >&6; }
6098        if test ! -x "$tool_specified"; then
6099          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6100$as_echo "not found" >&6; }
6101          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6102        fi
6103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6104$as_echo "$tool_specified" >&6; }
6105      fi
6106    fi
6107  fi
6108
6109
6110
6111  if test "x$DATE" = x; then
6112    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6113  fi
6114
6115
6116
6117
6118
6119  # Publish this variable in the help.
6120
6121
6122  if test "x$DIFF" = x; then
6123    # The variable is not set by user, try to locate tool using the code snippet
6124    for ac_prog in gdiff diff
6125do
6126  # Extract the first word of "$ac_prog", so it can be a program name with args.
6127set dummy $ac_prog; ac_word=$2
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6129$as_echo_n "checking for $ac_word... " >&6; }
6130if ${ac_cv_path_DIFF+:} false; then :
6131  $as_echo_n "(cached) " >&6
6132else
6133  case $DIFF in
6134  [\\/]* | ?:[\\/]*)
6135  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6136  ;;
6137  *)
6138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6139for as_dir in $PATH
6140do
6141  IFS=$as_save_IFS
6142  test -z "$as_dir" && as_dir=.
6143    for ac_exec_ext in '' $ac_executable_extensions; do
6144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6145    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6147    break 2
6148  fi
6149done
6150  done
6151IFS=$as_save_IFS
6152
6153  ;;
6154esac
6155fi
6156DIFF=$ac_cv_path_DIFF
6157if test -n "$DIFF"; then
6158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6159$as_echo "$DIFF" >&6; }
6160else
6161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6162$as_echo "no" >&6; }
6163fi
6164
6165
6166  test -n "$DIFF" && break
6167done
6168
6169  else
6170    # The variable is set, but is it from the command line or the environment?
6171
6172    # Try to remove the string !DIFF! from our list.
6173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6175      # If it failed, the variable was not from the command line. Ignore it,
6176      # but warn the user (except for BASH, which is always set by the calling BASH).
6177      if test "xDIFF" != xBASH; then
6178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6179$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6180      fi
6181      # Try to locate tool using the code snippet
6182      for ac_prog in gdiff diff
6183do
6184  # Extract the first word of "$ac_prog", so it can be a program name with args.
6185set dummy $ac_prog; ac_word=$2
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6187$as_echo_n "checking for $ac_word... " >&6; }
6188if ${ac_cv_path_DIFF+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  case $DIFF in
6192  [\\/]* | ?:[\\/]*)
6193  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6194  ;;
6195  *)
6196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197for as_dir in $PATH
6198do
6199  IFS=$as_save_IFS
6200  test -z "$as_dir" && as_dir=.
6201    for ac_exec_ext in '' $ac_executable_extensions; do
6202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6203    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6205    break 2
6206  fi
6207done
6208  done
6209IFS=$as_save_IFS
6210
6211  ;;
6212esac
6213fi
6214DIFF=$ac_cv_path_DIFF
6215if test -n "$DIFF"; then
6216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6217$as_echo "$DIFF" >&6; }
6218else
6219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224  test -n "$DIFF" && break
6225done
6226
6227    else
6228      # If it succeeded, then it was overridden by the user. We will use it
6229      # for the tool.
6230
6231      # First remove it from the list of overridden variables, so we can test
6232      # for unknown variables in the end.
6233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6234
6235      # Check if the provided tool contains a complete path.
6236      tool_specified="$DIFF"
6237      tool_basename="${tool_specified##*/}"
6238      if test "x$tool_basename" = "x$tool_specified"; then
6239        # A command without a complete path is provided, search $PATH.
6240        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6241$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6242        # Extract the first word of "$tool_basename", so it can be a program name with args.
6243set dummy $tool_basename; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_DIFF+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $DIFF in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272DIFF=$ac_cv_path_DIFF
6273if test -n "$DIFF"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6275$as_echo "$DIFF" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282        if test "x$DIFF" = x; then
6283          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6284        fi
6285      else
6286        # Otherwise we believe it is a complete path. Use it as it is.
6287        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6288$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6290$as_echo_n "checking for DIFF... " >&6; }
6291        if test ! -x "$tool_specified"; then
6292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6293$as_echo "not found" >&6; }
6294          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6295        fi
6296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6297$as_echo "$tool_specified" >&6; }
6298      fi
6299    fi
6300  fi
6301
6302
6303
6304  if test "x$DIFF" = x; then
6305    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6306  fi
6307
6308
6309
6310
6311
6312  # Publish this variable in the help.
6313
6314
6315  if test "x$DIRNAME" = x; then
6316    # The variable is not set by user, try to locate tool using the code snippet
6317    for ac_prog in dirname
6318do
6319  # Extract the first word of "$ac_prog", so it can be a program name with args.
6320set dummy $ac_prog; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
6323if ${ac_cv_path_DIRNAME+:} false; then :
6324  $as_echo_n "(cached) " >&6
6325else
6326  case $DIRNAME in
6327  [\\/]* | ?:[\\/]*)
6328  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6329  ;;
6330  *)
6331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332for as_dir in $PATH
6333do
6334  IFS=$as_save_IFS
6335  test -z "$as_dir" && as_dir=.
6336    for ac_exec_ext in '' $ac_executable_extensions; do
6337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340    break 2
6341  fi
6342done
6343  done
6344IFS=$as_save_IFS
6345
6346  ;;
6347esac
6348fi
6349DIRNAME=$ac_cv_path_DIRNAME
6350if test -n "$DIRNAME"; then
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6352$as_echo "$DIRNAME" >&6; }
6353else
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359  test -n "$DIRNAME" && break
6360done
6361
6362  else
6363    # The variable is set, but is it from the command line or the environment?
6364
6365    # Try to remove the string !DIRNAME! from our list.
6366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6368      # If it failed, the variable was not from the command line. Ignore it,
6369      # but warn the user (except for BASH, which is always set by the calling BASH).
6370      if test "xDIRNAME" != xBASH; then
6371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6372$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6373      fi
6374      # Try to locate tool using the code snippet
6375      for ac_prog in dirname
6376do
6377  # Extract the first word of "$ac_prog", so it can be a program name with args.
6378set dummy $ac_prog; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if ${ac_cv_path_DIRNAME+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $DIRNAME in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6396    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407DIRNAME=$ac_cv_path_DIRNAME
6408if test -n "$DIRNAME"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6410$as_echo "$DIRNAME" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417  test -n "$DIRNAME" && break
6418done
6419
6420    else
6421      # If it succeeded, then it was overridden by the user. We will use it
6422      # for the tool.
6423
6424      # First remove it from the list of overridden variables, so we can test
6425      # for unknown variables in the end.
6426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6427
6428      # Check if the provided tool contains a complete path.
6429      tool_specified="$DIRNAME"
6430      tool_basename="${tool_specified##*/}"
6431      if test "x$tool_basename" = "x$tool_specified"; then
6432        # A command without a complete path is provided, search $PATH.
6433        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6434$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6435        # Extract the first word of "$tool_basename", so it can be a program name with args.
6436set dummy $tool_basename; ac_word=$2
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6438$as_echo_n "checking for $ac_word... " >&6; }
6439if ${ac_cv_path_DIRNAME+:} false; then :
6440  $as_echo_n "(cached) " >&6
6441else
6442  case $DIRNAME in
6443  [\\/]* | ?:[\\/]*)
6444  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6445  ;;
6446  *)
6447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6448for as_dir in $PATH
6449do
6450  IFS=$as_save_IFS
6451  test -z "$as_dir" && as_dir=.
6452    for ac_exec_ext in '' $ac_executable_extensions; do
6453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6454    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6456    break 2
6457  fi
6458done
6459  done
6460IFS=$as_save_IFS
6461
6462  ;;
6463esac
6464fi
6465DIRNAME=$ac_cv_path_DIRNAME
6466if test -n "$DIRNAME"; then
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6468$as_echo "$DIRNAME" >&6; }
6469else
6470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
6472fi
6473
6474
6475        if test "x$DIRNAME" = x; then
6476          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6477        fi
6478      else
6479        # Otherwise we believe it is a complete path. Use it as it is.
6480        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6481$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6483$as_echo_n "checking for DIRNAME... " >&6; }
6484        if test ! -x "$tool_specified"; then
6485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6486$as_echo "not found" >&6; }
6487          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6488        fi
6489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6490$as_echo "$tool_specified" >&6; }
6491      fi
6492    fi
6493  fi
6494
6495
6496
6497  if test "x$DIRNAME" = x; then
6498    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6499  fi
6500
6501
6502
6503
6504
6505  # Publish this variable in the help.
6506
6507
6508  if test "x$ECHO" = x; then
6509    # The variable is not set by user, try to locate tool using the code snippet
6510    for ac_prog in echo
6511do
6512  # Extract the first word of "$ac_prog", so it can be a program name with args.
6513set dummy $ac_prog; ac_word=$2
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515$as_echo_n "checking for $ac_word... " >&6; }
6516if ${ac_cv_path_ECHO+:} false; then :
6517  $as_echo_n "(cached) " >&6
6518else
6519  case $ECHO in
6520  [\\/]* | ?:[\\/]*)
6521  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6522  ;;
6523  *)
6524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525for as_dir in $PATH
6526do
6527  IFS=$as_save_IFS
6528  test -z "$as_dir" && as_dir=.
6529    for ac_exec_ext in '' $ac_executable_extensions; do
6530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533    break 2
6534  fi
6535done
6536  done
6537IFS=$as_save_IFS
6538
6539  ;;
6540esac
6541fi
6542ECHO=$ac_cv_path_ECHO
6543if test -n "$ECHO"; then
6544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6545$as_echo "$ECHO" >&6; }
6546else
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551
6552  test -n "$ECHO" && break
6553done
6554
6555  else
6556    # The variable is set, but is it from the command line or the environment?
6557
6558    # Try to remove the string !ECHO! from our list.
6559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6561      # If it failed, the variable was not from the command line. Ignore it,
6562      # but warn the user (except for BASH, which is always set by the calling BASH).
6563      if test "xECHO" != xBASH; then
6564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6565$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6566      fi
6567      # Try to locate tool using the code snippet
6568      for ac_prog in echo
6569do
6570  # Extract the first word of "$ac_prog", so it can be a program name with args.
6571set dummy $ac_prog; ac_word=$2
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6573$as_echo_n "checking for $ac_word... " >&6; }
6574if ${ac_cv_path_ECHO+:} false; then :
6575  $as_echo_n "(cached) " >&6
6576else
6577  case $ECHO in
6578  [\\/]* | ?:[\\/]*)
6579  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6580  ;;
6581  *)
6582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6583for as_dir in $PATH
6584do
6585  IFS=$as_save_IFS
6586  test -z "$as_dir" && as_dir=.
6587    for ac_exec_ext in '' $ac_executable_extensions; do
6588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6589    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6591    break 2
6592  fi
6593done
6594  done
6595IFS=$as_save_IFS
6596
6597  ;;
6598esac
6599fi
6600ECHO=$ac_cv_path_ECHO
6601if test -n "$ECHO"; then
6602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6603$as_echo "$ECHO" >&6; }
6604else
6605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
6607fi
6608
6609
6610  test -n "$ECHO" && break
6611done
6612
6613    else
6614      # If it succeeded, then it was overridden by the user. We will use it
6615      # for the tool.
6616
6617      # First remove it from the list of overridden variables, so we can test
6618      # for unknown variables in the end.
6619      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6620
6621      # Check if the provided tool contains a complete path.
6622      tool_specified="$ECHO"
6623      tool_basename="${tool_specified##*/}"
6624      if test "x$tool_basename" = "x$tool_specified"; then
6625        # A command without a complete path is provided, search $PATH.
6626        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6627$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6628        # Extract the first word of "$tool_basename", so it can be a program name with args.
6629set dummy $tool_basename; ac_word=$2
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6631$as_echo_n "checking for $ac_word... " >&6; }
6632if ${ac_cv_path_ECHO+:} false; then :
6633  $as_echo_n "(cached) " >&6
6634else
6635  case $ECHO in
6636  [\\/]* | ?:[\\/]*)
6637  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6638  ;;
6639  *)
6640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6641for as_dir in $PATH
6642do
6643  IFS=$as_save_IFS
6644  test -z "$as_dir" && as_dir=.
6645    for ac_exec_ext in '' $ac_executable_extensions; do
6646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6647    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6649    break 2
6650  fi
6651done
6652  done
6653IFS=$as_save_IFS
6654
6655  ;;
6656esac
6657fi
6658ECHO=$ac_cv_path_ECHO
6659if test -n "$ECHO"; then
6660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6661$as_echo "$ECHO" >&6; }
6662else
6663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6664$as_echo "no" >&6; }
6665fi
6666
6667
6668        if test "x$ECHO" = x; then
6669          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6670        fi
6671      else
6672        # Otherwise we believe it is a complete path. Use it as it is.
6673        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6674$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6676$as_echo_n "checking for ECHO... " >&6; }
6677        if test ! -x "$tool_specified"; then
6678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6679$as_echo "not found" >&6; }
6680          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6681        fi
6682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6683$as_echo "$tool_specified" >&6; }
6684      fi
6685    fi
6686  fi
6687
6688
6689
6690  if test "x$ECHO" = x; then
6691    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6692  fi
6693
6694
6695
6696
6697
6698  # Publish this variable in the help.
6699
6700
6701  if test "x$EXPR" = x; then
6702    # The variable is not set by user, try to locate tool using the code snippet
6703    for ac_prog in expr
6704do
6705  # Extract the first word of "$ac_prog", so it can be a program name with args.
6706set dummy $ac_prog; ac_word=$2
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6708$as_echo_n "checking for $ac_word... " >&6; }
6709if ${ac_cv_path_EXPR+:} false; then :
6710  $as_echo_n "(cached) " >&6
6711else
6712  case $EXPR in
6713  [\\/]* | ?:[\\/]*)
6714  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6715  ;;
6716  *)
6717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6718for as_dir in $PATH
6719do
6720  IFS=$as_save_IFS
6721  test -z "$as_dir" && as_dir=.
6722    for ac_exec_ext in '' $ac_executable_extensions; do
6723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6724    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6726    break 2
6727  fi
6728done
6729  done
6730IFS=$as_save_IFS
6731
6732  ;;
6733esac
6734fi
6735EXPR=$ac_cv_path_EXPR
6736if test -n "$EXPR"; then
6737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6738$as_echo "$EXPR" >&6; }
6739else
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6741$as_echo "no" >&6; }
6742fi
6743
6744
6745  test -n "$EXPR" && break
6746done
6747
6748  else
6749    # The variable is set, but is it from the command line or the environment?
6750
6751    # Try to remove the string !EXPR! from our list.
6752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6754      # If it failed, the variable was not from the command line. Ignore it,
6755      # but warn the user (except for BASH, which is always set by the calling BASH).
6756      if test "xEXPR" != xBASH; then
6757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6758$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6759      fi
6760      # Try to locate tool using the code snippet
6761      for ac_prog in expr
6762do
6763  # Extract the first word of "$ac_prog", so it can be a program name with args.
6764set dummy $ac_prog; ac_word=$2
6765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6766$as_echo_n "checking for $ac_word... " >&6; }
6767if ${ac_cv_path_EXPR+:} false; then :
6768  $as_echo_n "(cached) " >&6
6769else
6770  case $EXPR in
6771  [\\/]* | ?:[\\/]*)
6772  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6773  ;;
6774  *)
6775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6776for as_dir in $PATH
6777do
6778  IFS=$as_save_IFS
6779  test -z "$as_dir" && as_dir=.
6780    for ac_exec_ext in '' $ac_executable_extensions; do
6781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6782    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6784    break 2
6785  fi
6786done
6787  done
6788IFS=$as_save_IFS
6789
6790  ;;
6791esac
6792fi
6793EXPR=$ac_cv_path_EXPR
6794if test -n "$EXPR"; then
6795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6796$as_echo "$EXPR" >&6; }
6797else
6798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6799$as_echo "no" >&6; }
6800fi
6801
6802
6803  test -n "$EXPR" && break
6804done
6805
6806    else
6807      # If it succeeded, then it was overridden by the user. We will use it
6808      # for the tool.
6809
6810      # First remove it from the list of overridden variables, so we can test
6811      # for unknown variables in the end.
6812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6813
6814      # Check if the provided tool contains a complete path.
6815      tool_specified="$EXPR"
6816      tool_basename="${tool_specified##*/}"
6817      if test "x$tool_basename" = "x$tool_specified"; then
6818        # A command without a complete path is provided, search $PATH.
6819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6820$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6821        # Extract the first word of "$tool_basename", so it can be a program name with args.
6822set dummy $tool_basename; ac_word=$2
6823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6824$as_echo_n "checking for $ac_word... " >&6; }
6825if ${ac_cv_path_EXPR+:} false; then :
6826  $as_echo_n "(cached) " >&6
6827else
6828  case $EXPR in
6829  [\\/]* | ?:[\\/]*)
6830  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6831  ;;
6832  *)
6833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6834for as_dir in $PATH
6835do
6836  IFS=$as_save_IFS
6837  test -z "$as_dir" && as_dir=.
6838    for ac_exec_ext in '' $ac_executable_extensions; do
6839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6840    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6842    break 2
6843  fi
6844done
6845  done
6846IFS=$as_save_IFS
6847
6848  ;;
6849esac
6850fi
6851EXPR=$ac_cv_path_EXPR
6852if test -n "$EXPR"; then
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6854$as_echo "$EXPR" >&6; }
6855else
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6857$as_echo "no" >&6; }
6858fi
6859
6860
6861        if test "x$EXPR" = x; then
6862          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6863        fi
6864      else
6865        # Otherwise we believe it is a complete path. Use it as it is.
6866        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6867$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6869$as_echo_n "checking for EXPR... " >&6; }
6870        if test ! -x "$tool_specified"; then
6871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6872$as_echo "not found" >&6; }
6873          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6874        fi
6875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6876$as_echo "$tool_specified" >&6; }
6877      fi
6878    fi
6879  fi
6880
6881
6882
6883  if test "x$EXPR" = x; then
6884    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6885  fi
6886
6887
6888
6889
6890
6891  # Publish this variable in the help.
6892
6893
6894  if test "x$FILE" = x; then
6895    # The variable is not set by user, try to locate tool using the code snippet
6896    for ac_prog in file
6897do
6898  # Extract the first word of "$ac_prog", so it can be a program name with args.
6899set dummy $ac_prog; ac_word=$2
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6901$as_echo_n "checking for $ac_word... " >&6; }
6902if ${ac_cv_path_FILE+:} false; then :
6903  $as_echo_n "(cached) " >&6
6904else
6905  case $FILE in
6906  [\\/]* | ?:[\\/]*)
6907  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6908  ;;
6909  *)
6910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6911for as_dir in $PATH
6912do
6913  IFS=$as_save_IFS
6914  test -z "$as_dir" && as_dir=.
6915    for ac_exec_ext in '' $ac_executable_extensions; do
6916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6917    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6919    break 2
6920  fi
6921done
6922  done
6923IFS=$as_save_IFS
6924
6925  ;;
6926esac
6927fi
6928FILE=$ac_cv_path_FILE
6929if test -n "$FILE"; then
6930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6931$as_echo "$FILE" >&6; }
6932else
6933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6934$as_echo "no" >&6; }
6935fi
6936
6937
6938  test -n "$FILE" && break
6939done
6940
6941  else
6942    # The variable is set, but is it from the command line or the environment?
6943
6944    # Try to remove the string !FILE! from our list.
6945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6947      # If it failed, the variable was not from the command line. Ignore it,
6948      # but warn the user (except for BASH, which is always set by the calling BASH).
6949      if test "xFILE" != xBASH; then
6950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6951$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6952      fi
6953      # Try to locate tool using the code snippet
6954      for ac_prog in file
6955do
6956  # Extract the first word of "$ac_prog", so it can be a program name with args.
6957set dummy $ac_prog; ac_word=$2
6958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6959$as_echo_n "checking for $ac_word... " >&6; }
6960if ${ac_cv_path_FILE+:} false; then :
6961  $as_echo_n "(cached) " >&6
6962else
6963  case $FILE in
6964  [\\/]* | ?:[\\/]*)
6965  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6966  ;;
6967  *)
6968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6969for as_dir in $PATH
6970do
6971  IFS=$as_save_IFS
6972  test -z "$as_dir" && as_dir=.
6973    for ac_exec_ext in '' $ac_executable_extensions; do
6974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6975    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6977    break 2
6978  fi
6979done
6980  done
6981IFS=$as_save_IFS
6982
6983  ;;
6984esac
6985fi
6986FILE=$ac_cv_path_FILE
6987if test -n "$FILE"; then
6988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6989$as_echo "$FILE" >&6; }
6990else
6991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6992$as_echo "no" >&6; }
6993fi
6994
6995
6996  test -n "$FILE" && break
6997done
6998
6999    else
7000      # If it succeeded, then it was overridden by the user. We will use it
7001      # for the tool.
7002
7003      # First remove it from the list of overridden variables, so we can test
7004      # for unknown variables in the end.
7005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7006
7007      # Check if the provided tool contains a complete path.
7008      tool_specified="$FILE"
7009      tool_basename="${tool_specified##*/}"
7010      if test "x$tool_basename" = "x$tool_specified"; then
7011        # A command without a complete path is provided, search $PATH.
7012        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7013$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7014        # Extract the first word of "$tool_basename", so it can be a program name with args.
7015set dummy $tool_basename; ac_word=$2
7016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7017$as_echo_n "checking for $ac_word... " >&6; }
7018if ${ac_cv_path_FILE+:} false; then :
7019  $as_echo_n "(cached) " >&6
7020else
7021  case $FILE in
7022  [\\/]* | ?:[\\/]*)
7023  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7024  ;;
7025  *)
7026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027for as_dir in $PATH
7028do
7029  IFS=$as_save_IFS
7030  test -z "$as_dir" && as_dir=.
7031    for ac_exec_ext in '' $ac_executable_extensions; do
7032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7033    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7035    break 2
7036  fi
7037done
7038  done
7039IFS=$as_save_IFS
7040
7041  ;;
7042esac
7043fi
7044FILE=$ac_cv_path_FILE
7045if test -n "$FILE"; then
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7047$as_echo "$FILE" >&6; }
7048else
7049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7050$as_echo "no" >&6; }
7051fi
7052
7053
7054        if test "x$FILE" = x; then
7055          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7056        fi
7057      else
7058        # Otherwise we believe it is a complete path. Use it as it is.
7059        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7060$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7061        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7062$as_echo_n "checking for FILE... " >&6; }
7063        if test ! -x "$tool_specified"; then
7064          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7065$as_echo "not found" >&6; }
7066          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7067        fi
7068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7069$as_echo "$tool_specified" >&6; }
7070      fi
7071    fi
7072  fi
7073
7074
7075
7076  if test "x$FILE" = x; then
7077    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7078  fi
7079
7080
7081
7082
7083
7084  # Publish this variable in the help.
7085
7086
7087  if test "x$FIND" = x; then
7088    # The variable is not set by user, try to locate tool using the code snippet
7089    for ac_prog in find
7090do
7091  # Extract the first word of "$ac_prog", so it can be a program name with args.
7092set dummy $ac_prog; ac_word=$2
7093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7094$as_echo_n "checking for $ac_word... " >&6; }
7095if ${ac_cv_path_FIND+:} false; then :
7096  $as_echo_n "(cached) " >&6
7097else
7098  case $FIND in
7099  [\\/]* | ?:[\\/]*)
7100  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7101  ;;
7102  *)
7103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7104for as_dir in $PATH
7105do
7106  IFS=$as_save_IFS
7107  test -z "$as_dir" && as_dir=.
7108    for ac_exec_ext in '' $ac_executable_extensions; do
7109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7110    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7112    break 2
7113  fi
7114done
7115  done
7116IFS=$as_save_IFS
7117
7118  ;;
7119esac
7120fi
7121FIND=$ac_cv_path_FIND
7122if test -n "$FIND"; then
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7124$as_echo "$FIND" >&6; }
7125else
7126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7127$as_echo "no" >&6; }
7128fi
7129
7130
7131  test -n "$FIND" && break
7132done
7133
7134  else
7135    # The variable is set, but is it from the command line or the environment?
7136
7137    # Try to remove the string !FIND! from our list.
7138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7140      # If it failed, the variable was not from the command line. Ignore it,
7141      # but warn the user (except for BASH, which is always set by the calling BASH).
7142      if test "xFIND" != xBASH; then
7143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7144$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7145      fi
7146      # Try to locate tool using the code snippet
7147      for ac_prog in find
7148do
7149  # Extract the first word of "$ac_prog", so it can be a program name with args.
7150set dummy $ac_prog; ac_word=$2
7151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7152$as_echo_n "checking for $ac_word... " >&6; }
7153if ${ac_cv_path_FIND+:} false; then :
7154  $as_echo_n "(cached) " >&6
7155else
7156  case $FIND in
7157  [\\/]* | ?:[\\/]*)
7158  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7159  ;;
7160  *)
7161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7162for as_dir in $PATH
7163do
7164  IFS=$as_save_IFS
7165  test -z "$as_dir" && as_dir=.
7166    for ac_exec_ext in '' $ac_executable_extensions; do
7167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7168    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7170    break 2
7171  fi
7172done
7173  done
7174IFS=$as_save_IFS
7175
7176  ;;
7177esac
7178fi
7179FIND=$ac_cv_path_FIND
7180if test -n "$FIND"; then
7181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7182$as_echo "$FIND" >&6; }
7183else
7184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7185$as_echo "no" >&6; }
7186fi
7187
7188
7189  test -n "$FIND" && break
7190done
7191
7192    else
7193      # If it succeeded, then it was overridden by the user. We will use it
7194      # for the tool.
7195
7196      # First remove it from the list of overridden variables, so we can test
7197      # for unknown variables in the end.
7198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7199
7200      # Check if the provided tool contains a complete path.
7201      tool_specified="$FIND"
7202      tool_basename="${tool_specified##*/}"
7203      if test "x$tool_basename" = "x$tool_specified"; then
7204        # A command without a complete path is provided, search $PATH.
7205        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7206$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7207        # Extract the first word of "$tool_basename", so it can be a program name with args.
7208set dummy $tool_basename; ac_word=$2
7209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7210$as_echo_n "checking for $ac_word... " >&6; }
7211if ${ac_cv_path_FIND+:} false; then :
7212  $as_echo_n "(cached) " >&6
7213else
7214  case $FIND in
7215  [\\/]* | ?:[\\/]*)
7216  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7217  ;;
7218  *)
7219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7220for as_dir in $PATH
7221do
7222  IFS=$as_save_IFS
7223  test -z "$as_dir" && as_dir=.
7224    for ac_exec_ext in '' $ac_executable_extensions; do
7225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7226    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7228    break 2
7229  fi
7230done
7231  done
7232IFS=$as_save_IFS
7233
7234  ;;
7235esac
7236fi
7237FIND=$ac_cv_path_FIND
7238if test -n "$FIND"; then
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7240$as_echo "$FIND" >&6; }
7241else
7242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7243$as_echo "no" >&6; }
7244fi
7245
7246
7247        if test "x$FIND" = x; then
7248          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7249        fi
7250      else
7251        # Otherwise we believe it is a complete path. Use it as it is.
7252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7253$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7255$as_echo_n "checking for FIND... " >&6; }
7256        if test ! -x "$tool_specified"; then
7257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7258$as_echo "not found" >&6; }
7259          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7260        fi
7261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7262$as_echo "$tool_specified" >&6; }
7263      fi
7264    fi
7265  fi
7266
7267
7268
7269  if test "x$FIND" = x; then
7270    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7271  fi
7272
7273
7274
7275
7276
7277  # Publish this variable in the help.
7278
7279
7280  if test "x$HEAD" = x; then
7281    # The variable is not set by user, try to locate tool using the code snippet
7282    for ac_prog in head
7283do
7284  # Extract the first word of "$ac_prog", so it can be a program name with args.
7285set dummy $ac_prog; ac_word=$2
7286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7287$as_echo_n "checking for $ac_word... " >&6; }
7288if ${ac_cv_path_HEAD+:} false; then :
7289  $as_echo_n "(cached) " >&6
7290else
7291  case $HEAD in
7292  [\\/]* | ?:[\\/]*)
7293  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7294  ;;
7295  *)
7296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7297for as_dir in $PATH
7298do
7299  IFS=$as_save_IFS
7300  test -z "$as_dir" && as_dir=.
7301    for ac_exec_ext in '' $ac_executable_extensions; do
7302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7303    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7305    break 2
7306  fi
7307done
7308  done
7309IFS=$as_save_IFS
7310
7311  ;;
7312esac
7313fi
7314HEAD=$ac_cv_path_HEAD
7315if test -n "$HEAD"; then
7316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7317$as_echo "$HEAD" >&6; }
7318else
7319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7320$as_echo "no" >&6; }
7321fi
7322
7323
7324  test -n "$HEAD" && break
7325done
7326
7327  else
7328    # The variable is set, but is it from the command line or the environment?
7329
7330    # Try to remove the string !HEAD! from our list.
7331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7333      # If it failed, the variable was not from the command line. Ignore it,
7334      # but warn the user (except for BASH, which is always set by the calling BASH).
7335      if test "xHEAD" != xBASH; then
7336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7337$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7338      fi
7339      # Try to locate tool using the code snippet
7340      for ac_prog in head
7341do
7342  # Extract the first word of "$ac_prog", so it can be a program name with args.
7343set dummy $ac_prog; ac_word=$2
7344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7345$as_echo_n "checking for $ac_word... " >&6; }
7346if ${ac_cv_path_HEAD+:} false; then :
7347  $as_echo_n "(cached) " >&6
7348else
7349  case $HEAD in
7350  [\\/]* | ?:[\\/]*)
7351  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7352  ;;
7353  *)
7354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7355for as_dir in $PATH
7356do
7357  IFS=$as_save_IFS
7358  test -z "$as_dir" && as_dir=.
7359    for ac_exec_ext in '' $ac_executable_extensions; do
7360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7361    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7363    break 2
7364  fi
7365done
7366  done
7367IFS=$as_save_IFS
7368
7369  ;;
7370esac
7371fi
7372HEAD=$ac_cv_path_HEAD
7373if test -n "$HEAD"; then
7374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7375$as_echo "$HEAD" >&6; }
7376else
7377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7378$as_echo "no" >&6; }
7379fi
7380
7381
7382  test -n "$HEAD" && break
7383done
7384
7385    else
7386      # If it succeeded, then it was overridden by the user. We will use it
7387      # for the tool.
7388
7389      # First remove it from the list of overridden variables, so we can test
7390      # for unknown variables in the end.
7391      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7392
7393      # Check if the provided tool contains a complete path.
7394      tool_specified="$HEAD"
7395      tool_basename="${tool_specified##*/}"
7396      if test "x$tool_basename" = "x$tool_specified"; then
7397        # A command without a complete path is provided, search $PATH.
7398        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7399$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7400        # Extract the first word of "$tool_basename", so it can be a program name with args.
7401set dummy $tool_basename; ac_word=$2
7402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7403$as_echo_n "checking for $ac_word... " >&6; }
7404if ${ac_cv_path_HEAD+:} false; then :
7405  $as_echo_n "(cached) " >&6
7406else
7407  case $HEAD in
7408  [\\/]* | ?:[\\/]*)
7409  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7410  ;;
7411  *)
7412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7413for as_dir in $PATH
7414do
7415  IFS=$as_save_IFS
7416  test -z "$as_dir" && as_dir=.
7417    for ac_exec_ext in '' $ac_executable_extensions; do
7418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7419    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7421    break 2
7422  fi
7423done
7424  done
7425IFS=$as_save_IFS
7426
7427  ;;
7428esac
7429fi
7430HEAD=$ac_cv_path_HEAD
7431if test -n "$HEAD"; then
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7433$as_echo "$HEAD" >&6; }
7434else
7435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7436$as_echo "no" >&6; }
7437fi
7438
7439
7440        if test "x$HEAD" = x; then
7441          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7442        fi
7443      else
7444        # Otherwise we believe it is a complete path. Use it as it is.
7445        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7446$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7448$as_echo_n "checking for HEAD... " >&6; }
7449        if test ! -x "$tool_specified"; then
7450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7451$as_echo "not found" >&6; }
7452          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7453        fi
7454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7455$as_echo "$tool_specified" >&6; }
7456      fi
7457    fi
7458  fi
7459
7460
7461
7462  if test "x$HEAD" = x; then
7463    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7464  fi
7465
7466
7467
7468
7469
7470  # Publish this variable in the help.
7471
7472
7473  if test "x$LN" = x; then
7474    # The variable is not set by user, try to locate tool using the code snippet
7475    for ac_prog in ln
7476do
7477  # Extract the first word of "$ac_prog", so it can be a program name with args.
7478set dummy $ac_prog; ac_word=$2
7479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7480$as_echo_n "checking for $ac_word... " >&6; }
7481if ${ac_cv_path_LN+:} false; then :
7482  $as_echo_n "(cached) " >&6
7483else
7484  case $LN in
7485  [\\/]* | ?:[\\/]*)
7486  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7487  ;;
7488  *)
7489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7490for as_dir in $PATH
7491do
7492  IFS=$as_save_IFS
7493  test -z "$as_dir" && as_dir=.
7494    for ac_exec_ext in '' $ac_executable_extensions; do
7495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7496    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7498    break 2
7499  fi
7500done
7501  done
7502IFS=$as_save_IFS
7503
7504  ;;
7505esac
7506fi
7507LN=$ac_cv_path_LN
7508if test -n "$LN"; then
7509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7510$as_echo "$LN" >&6; }
7511else
7512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7513$as_echo "no" >&6; }
7514fi
7515
7516
7517  test -n "$LN" && break
7518done
7519
7520  else
7521    # The variable is set, but is it from the command line or the environment?
7522
7523    # Try to remove the string !LN! from our list.
7524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7526      # If it failed, the variable was not from the command line. Ignore it,
7527      # but warn the user (except for BASH, which is always set by the calling BASH).
7528      if test "xLN" != xBASH; then
7529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7530$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7531      fi
7532      # Try to locate tool using the code snippet
7533      for ac_prog in ln
7534do
7535  # Extract the first word of "$ac_prog", so it can be a program name with args.
7536set dummy $ac_prog; ac_word=$2
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538$as_echo_n "checking for $ac_word... " >&6; }
7539if ${ac_cv_path_LN+:} false; then :
7540  $as_echo_n "(cached) " >&6
7541else
7542  case $LN in
7543  [\\/]* | ?:[\\/]*)
7544  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7545  ;;
7546  *)
7547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7548for as_dir in $PATH
7549do
7550  IFS=$as_save_IFS
7551  test -z "$as_dir" && as_dir=.
7552    for ac_exec_ext in '' $ac_executable_extensions; do
7553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7554    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7556    break 2
7557  fi
7558done
7559  done
7560IFS=$as_save_IFS
7561
7562  ;;
7563esac
7564fi
7565LN=$ac_cv_path_LN
7566if test -n "$LN"; then
7567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7568$as_echo "$LN" >&6; }
7569else
7570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571$as_echo "no" >&6; }
7572fi
7573
7574
7575  test -n "$LN" && break
7576done
7577
7578    else
7579      # If it succeeded, then it was overridden by the user. We will use it
7580      # for the tool.
7581
7582      # First remove it from the list of overridden variables, so we can test
7583      # for unknown variables in the end.
7584      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7585
7586      # Check if the provided tool contains a complete path.
7587      tool_specified="$LN"
7588      tool_basename="${tool_specified##*/}"
7589      if test "x$tool_basename" = "x$tool_specified"; then
7590        # A command without a complete path is provided, search $PATH.
7591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7592$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7593        # Extract the first word of "$tool_basename", so it can be a program name with args.
7594set dummy $tool_basename; ac_word=$2
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7596$as_echo_n "checking for $ac_word... " >&6; }
7597if ${ac_cv_path_LN+:} false; then :
7598  $as_echo_n "(cached) " >&6
7599else
7600  case $LN in
7601  [\\/]* | ?:[\\/]*)
7602  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7603  ;;
7604  *)
7605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7606for as_dir in $PATH
7607do
7608  IFS=$as_save_IFS
7609  test -z "$as_dir" && as_dir=.
7610    for ac_exec_ext in '' $ac_executable_extensions; do
7611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7612    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7614    break 2
7615  fi
7616done
7617  done
7618IFS=$as_save_IFS
7619
7620  ;;
7621esac
7622fi
7623LN=$ac_cv_path_LN
7624if test -n "$LN"; then
7625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7626$as_echo "$LN" >&6; }
7627else
7628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7629$as_echo "no" >&6; }
7630fi
7631
7632
7633        if test "x$LN" = x; then
7634          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7635        fi
7636      else
7637        # Otherwise we believe it is a complete path. Use it as it is.
7638        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7639$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7641$as_echo_n "checking for LN... " >&6; }
7642        if test ! -x "$tool_specified"; then
7643          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7644$as_echo "not found" >&6; }
7645          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7646        fi
7647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7648$as_echo "$tool_specified" >&6; }
7649      fi
7650    fi
7651  fi
7652
7653
7654
7655  if test "x$LN" = x; then
7656    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7657  fi
7658
7659
7660
7661
7662
7663  # Publish this variable in the help.
7664
7665
7666  if test "x$LS" = x; then
7667    # The variable is not set by user, try to locate tool using the code snippet
7668    for ac_prog in ls
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_LS+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $LS in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700LS=$ac_cv_path_LS
7701if test -n "$LS"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7703$as_echo "$LS" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$LS" && break
7711done
7712
7713  else
7714    # The variable is set, but is it from the command line or the environment?
7715
7716    # Try to remove the string !LS! from our list.
7717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7719      # If it failed, the variable was not from the command line. Ignore it,
7720      # but warn the user (except for BASH, which is always set by the calling BASH).
7721      if test "xLS" != xBASH; then
7722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7723$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7724      fi
7725      # Try to locate tool using the code snippet
7726      for ac_prog in ls
7727do
7728  # Extract the first word of "$ac_prog", so it can be a program name with args.
7729set dummy $ac_prog; ac_word=$2
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731$as_echo_n "checking for $ac_word... " >&6; }
7732if ${ac_cv_path_LS+:} false; then :
7733  $as_echo_n "(cached) " >&6
7734else
7735  case $LS in
7736  [\\/]* | ?:[\\/]*)
7737  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7738  ;;
7739  *)
7740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7741for as_dir in $PATH
7742do
7743  IFS=$as_save_IFS
7744  test -z "$as_dir" && as_dir=.
7745    for ac_exec_ext in '' $ac_executable_extensions; do
7746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7747    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7749    break 2
7750  fi
7751done
7752  done
7753IFS=$as_save_IFS
7754
7755  ;;
7756esac
7757fi
7758LS=$ac_cv_path_LS
7759if test -n "$LS"; then
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7761$as_echo "$LS" >&6; }
7762else
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7764$as_echo "no" >&6; }
7765fi
7766
7767
7768  test -n "$LS" && break
7769done
7770
7771    else
7772      # If it succeeded, then it was overridden by the user. We will use it
7773      # for the tool.
7774
7775      # First remove it from the list of overridden variables, so we can test
7776      # for unknown variables in the end.
7777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7778
7779      # Check if the provided tool contains a complete path.
7780      tool_specified="$LS"
7781      tool_basename="${tool_specified##*/}"
7782      if test "x$tool_basename" = "x$tool_specified"; then
7783        # A command without a complete path is provided, search $PATH.
7784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7785$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7786        # Extract the first word of "$tool_basename", so it can be a program name with args.
7787set dummy $tool_basename; ac_word=$2
7788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7789$as_echo_n "checking for $ac_word... " >&6; }
7790if ${ac_cv_path_LS+:} false; then :
7791  $as_echo_n "(cached) " >&6
7792else
7793  case $LS in
7794  [\\/]* | ?:[\\/]*)
7795  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7796  ;;
7797  *)
7798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7799for as_dir in $PATH
7800do
7801  IFS=$as_save_IFS
7802  test -z "$as_dir" && as_dir=.
7803    for ac_exec_ext in '' $ac_executable_extensions; do
7804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7805    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7807    break 2
7808  fi
7809done
7810  done
7811IFS=$as_save_IFS
7812
7813  ;;
7814esac
7815fi
7816LS=$ac_cv_path_LS
7817if test -n "$LS"; then
7818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7819$as_echo "$LS" >&6; }
7820else
7821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7822$as_echo "no" >&6; }
7823fi
7824
7825
7826        if test "x$LS" = x; then
7827          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7828        fi
7829      else
7830        # Otherwise we believe it is a complete path. Use it as it is.
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7832$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7834$as_echo_n "checking for LS... " >&6; }
7835        if test ! -x "$tool_specified"; then
7836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7837$as_echo "not found" >&6; }
7838          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7839        fi
7840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7841$as_echo "$tool_specified" >&6; }
7842      fi
7843    fi
7844  fi
7845
7846
7847
7848  if test "x$LS" = x; then
7849    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7850  fi
7851
7852
7853
7854
7855
7856  # Publish this variable in the help.
7857
7858
7859  if test "x$MKDIR" = x; then
7860    # The variable is not set by user, try to locate tool using the code snippet
7861    for ac_prog in mkdir
7862do
7863  # Extract the first word of "$ac_prog", so it can be a program name with args.
7864set dummy $ac_prog; ac_word=$2
7865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7866$as_echo_n "checking for $ac_word... " >&6; }
7867if ${ac_cv_path_MKDIR+:} false; then :
7868  $as_echo_n "(cached) " >&6
7869else
7870  case $MKDIR in
7871  [\\/]* | ?:[\\/]*)
7872  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7873  ;;
7874  *)
7875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7876for as_dir in $PATH
7877do
7878  IFS=$as_save_IFS
7879  test -z "$as_dir" && as_dir=.
7880    for ac_exec_ext in '' $ac_executable_extensions; do
7881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7882    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7884    break 2
7885  fi
7886done
7887  done
7888IFS=$as_save_IFS
7889
7890  ;;
7891esac
7892fi
7893MKDIR=$ac_cv_path_MKDIR
7894if test -n "$MKDIR"; then
7895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7896$as_echo "$MKDIR" >&6; }
7897else
7898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7899$as_echo "no" >&6; }
7900fi
7901
7902
7903  test -n "$MKDIR" && break
7904done
7905
7906  else
7907    # The variable is set, but is it from the command line or the environment?
7908
7909    # Try to remove the string !MKDIR! from our list.
7910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7912      # If it failed, the variable was not from the command line. Ignore it,
7913      # but warn the user (except for BASH, which is always set by the calling BASH).
7914      if test "xMKDIR" != xBASH; then
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7916$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7917      fi
7918      # Try to locate tool using the code snippet
7919      for ac_prog in mkdir
7920do
7921  # Extract the first word of "$ac_prog", so it can be a program name with args.
7922set dummy $ac_prog; ac_word=$2
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7924$as_echo_n "checking for $ac_word... " >&6; }
7925if ${ac_cv_path_MKDIR+:} false; then :
7926  $as_echo_n "(cached) " >&6
7927else
7928  case $MKDIR in
7929  [\\/]* | ?:[\\/]*)
7930  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7931  ;;
7932  *)
7933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7934for as_dir in $PATH
7935do
7936  IFS=$as_save_IFS
7937  test -z "$as_dir" && as_dir=.
7938    for ac_exec_ext in '' $ac_executable_extensions; do
7939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7940    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7942    break 2
7943  fi
7944done
7945  done
7946IFS=$as_save_IFS
7947
7948  ;;
7949esac
7950fi
7951MKDIR=$ac_cv_path_MKDIR
7952if test -n "$MKDIR"; then
7953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7954$as_echo "$MKDIR" >&6; }
7955else
7956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7957$as_echo "no" >&6; }
7958fi
7959
7960
7961  test -n "$MKDIR" && break
7962done
7963
7964    else
7965      # If it succeeded, then it was overridden by the user. We will use it
7966      # for the tool.
7967
7968      # First remove it from the list of overridden variables, so we can test
7969      # for unknown variables in the end.
7970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7971
7972      # Check if the provided tool contains a complete path.
7973      tool_specified="$MKDIR"
7974      tool_basename="${tool_specified##*/}"
7975      if test "x$tool_basename" = "x$tool_specified"; then
7976        # A command without a complete path is provided, search $PATH.
7977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7978$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7979        # Extract the first word of "$tool_basename", so it can be a program name with args.
7980set dummy $tool_basename; ac_word=$2
7981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7982$as_echo_n "checking for $ac_word... " >&6; }
7983if ${ac_cv_path_MKDIR+:} false; then :
7984  $as_echo_n "(cached) " >&6
7985else
7986  case $MKDIR in
7987  [\\/]* | ?:[\\/]*)
7988  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7989  ;;
7990  *)
7991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7992for as_dir in $PATH
7993do
7994  IFS=$as_save_IFS
7995  test -z "$as_dir" && as_dir=.
7996    for ac_exec_ext in '' $ac_executable_extensions; do
7997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7998    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8000    break 2
8001  fi
8002done
8003  done
8004IFS=$as_save_IFS
8005
8006  ;;
8007esac
8008fi
8009MKDIR=$ac_cv_path_MKDIR
8010if test -n "$MKDIR"; then
8011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8012$as_echo "$MKDIR" >&6; }
8013else
8014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8015$as_echo "no" >&6; }
8016fi
8017
8018
8019        if test "x$MKDIR" = x; then
8020          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8021        fi
8022      else
8023        # Otherwise we believe it is a complete path. Use it as it is.
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8025$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8027$as_echo_n "checking for MKDIR... " >&6; }
8028        if test ! -x "$tool_specified"; then
8029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8030$as_echo "not found" >&6; }
8031          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8032        fi
8033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8034$as_echo "$tool_specified" >&6; }
8035      fi
8036    fi
8037  fi
8038
8039
8040
8041  if test "x$MKDIR" = x; then
8042    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8043  fi
8044
8045
8046
8047
8048
8049  # Publish this variable in the help.
8050
8051
8052  if test "x$MKTEMP" = x; then
8053    # The variable is not set by user, try to locate tool using the code snippet
8054    for ac_prog in mktemp
8055do
8056  # Extract the first word of "$ac_prog", so it can be a program name with args.
8057set dummy $ac_prog; ac_word=$2
8058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8059$as_echo_n "checking for $ac_word... " >&6; }
8060if ${ac_cv_path_MKTEMP+:} false; then :
8061  $as_echo_n "(cached) " >&6
8062else
8063  case $MKTEMP in
8064  [\\/]* | ?:[\\/]*)
8065  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8066  ;;
8067  *)
8068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8069for as_dir in $PATH
8070do
8071  IFS=$as_save_IFS
8072  test -z "$as_dir" && as_dir=.
8073    for ac_exec_ext in '' $ac_executable_extensions; do
8074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8075    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8077    break 2
8078  fi
8079done
8080  done
8081IFS=$as_save_IFS
8082
8083  ;;
8084esac
8085fi
8086MKTEMP=$ac_cv_path_MKTEMP
8087if test -n "$MKTEMP"; then
8088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8089$as_echo "$MKTEMP" >&6; }
8090else
8091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8092$as_echo "no" >&6; }
8093fi
8094
8095
8096  test -n "$MKTEMP" && break
8097done
8098
8099  else
8100    # The variable is set, but is it from the command line or the environment?
8101
8102    # Try to remove the string !MKTEMP! from our list.
8103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8105      # If it failed, the variable was not from the command line. Ignore it,
8106      # but warn the user (except for BASH, which is always set by the calling BASH).
8107      if test "xMKTEMP" != xBASH; then
8108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8109$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8110      fi
8111      # Try to locate tool using the code snippet
8112      for ac_prog in mktemp
8113do
8114  # Extract the first word of "$ac_prog", so it can be a program name with args.
8115set dummy $ac_prog; ac_word=$2
8116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8117$as_echo_n "checking for $ac_word... " >&6; }
8118if ${ac_cv_path_MKTEMP+:} false; then :
8119  $as_echo_n "(cached) " >&6
8120else
8121  case $MKTEMP in
8122  [\\/]* | ?:[\\/]*)
8123  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8124  ;;
8125  *)
8126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8127for as_dir in $PATH
8128do
8129  IFS=$as_save_IFS
8130  test -z "$as_dir" && as_dir=.
8131    for ac_exec_ext in '' $ac_executable_extensions; do
8132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8133    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8135    break 2
8136  fi
8137done
8138  done
8139IFS=$as_save_IFS
8140
8141  ;;
8142esac
8143fi
8144MKTEMP=$ac_cv_path_MKTEMP
8145if test -n "$MKTEMP"; then
8146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8147$as_echo "$MKTEMP" >&6; }
8148else
8149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8150$as_echo "no" >&6; }
8151fi
8152
8153
8154  test -n "$MKTEMP" && break
8155done
8156
8157    else
8158      # If it succeeded, then it was overridden by the user. We will use it
8159      # for the tool.
8160
8161      # First remove it from the list of overridden variables, so we can test
8162      # for unknown variables in the end.
8163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8164
8165      # Check if the provided tool contains a complete path.
8166      tool_specified="$MKTEMP"
8167      tool_basename="${tool_specified##*/}"
8168      if test "x$tool_basename" = "x$tool_specified"; then
8169        # A command without a complete path is provided, search $PATH.
8170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8171$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8172        # Extract the first word of "$tool_basename", so it can be a program name with args.
8173set dummy $tool_basename; ac_word=$2
8174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8175$as_echo_n "checking for $ac_word... " >&6; }
8176if ${ac_cv_path_MKTEMP+:} false; then :
8177  $as_echo_n "(cached) " >&6
8178else
8179  case $MKTEMP in
8180  [\\/]* | ?:[\\/]*)
8181  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8182  ;;
8183  *)
8184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8185for as_dir in $PATH
8186do
8187  IFS=$as_save_IFS
8188  test -z "$as_dir" && as_dir=.
8189    for ac_exec_ext in '' $ac_executable_extensions; do
8190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8191    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8193    break 2
8194  fi
8195done
8196  done
8197IFS=$as_save_IFS
8198
8199  ;;
8200esac
8201fi
8202MKTEMP=$ac_cv_path_MKTEMP
8203if test -n "$MKTEMP"; then
8204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8205$as_echo "$MKTEMP" >&6; }
8206else
8207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8208$as_echo "no" >&6; }
8209fi
8210
8211
8212        if test "x$MKTEMP" = x; then
8213          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8214        fi
8215      else
8216        # Otherwise we believe it is a complete path. Use it as it is.
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8218$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8220$as_echo_n "checking for MKTEMP... " >&6; }
8221        if test ! -x "$tool_specified"; then
8222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8223$as_echo "not found" >&6; }
8224          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8225        fi
8226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8227$as_echo "$tool_specified" >&6; }
8228      fi
8229    fi
8230  fi
8231
8232
8233
8234  if test "x$MKTEMP" = x; then
8235    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8236  fi
8237
8238
8239
8240
8241
8242  # Publish this variable in the help.
8243
8244
8245  if test "x$MV" = x; then
8246    # The variable is not set by user, try to locate tool using the code snippet
8247    for ac_prog in mv
8248do
8249  # Extract the first word of "$ac_prog", so it can be a program name with args.
8250set dummy $ac_prog; ac_word=$2
8251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8252$as_echo_n "checking for $ac_word... " >&6; }
8253if ${ac_cv_path_MV+:} false; then :
8254  $as_echo_n "(cached) " >&6
8255else
8256  case $MV in
8257  [\\/]* | ?:[\\/]*)
8258  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8259  ;;
8260  *)
8261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8262for as_dir in $PATH
8263do
8264  IFS=$as_save_IFS
8265  test -z "$as_dir" && as_dir=.
8266    for ac_exec_ext in '' $ac_executable_extensions; do
8267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8268    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8270    break 2
8271  fi
8272done
8273  done
8274IFS=$as_save_IFS
8275
8276  ;;
8277esac
8278fi
8279MV=$ac_cv_path_MV
8280if test -n "$MV"; then
8281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8282$as_echo "$MV" >&6; }
8283else
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8285$as_echo "no" >&6; }
8286fi
8287
8288
8289  test -n "$MV" && break
8290done
8291
8292  else
8293    # The variable is set, but is it from the command line or the environment?
8294
8295    # Try to remove the string !MV! from our list.
8296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8298      # If it failed, the variable was not from the command line. Ignore it,
8299      # but warn the user (except for BASH, which is always set by the calling BASH).
8300      if test "xMV" != xBASH; then
8301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8302$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8303      fi
8304      # Try to locate tool using the code snippet
8305      for ac_prog in mv
8306do
8307  # Extract the first word of "$ac_prog", so it can be a program name with args.
8308set dummy $ac_prog; ac_word=$2
8309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310$as_echo_n "checking for $ac_word... " >&6; }
8311if ${ac_cv_path_MV+:} false; then :
8312  $as_echo_n "(cached) " >&6
8313else
8314  case $MV in
8315  [\\/]* | ?:[\\/]*)
8316  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8317  ;;
8318  *)
8319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320for as_dir in $PATH
8321do
8322  IFS=$as_save_IFS
8323  test -z "$as_dir" && as_dir=.
8324    for ac_exec_ext in '' $ac_executable_extensions; do
8325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8326    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8328    break 2
8329  fi
8330done
8331  done
8332IFS=$as_save_IFS
8333
8334  ;;
8335esac
8336fi
8337MV=$ac_cv_path_MV
8338if test -n "$MV"; then
8339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8340$as_echo "$MV" >&6; }
8341else
8342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
8344fi
8345
8346
8347  test -n "$MV" && break
8348done
8349
8350    else
8351      # If it succeeded, then it was overridden by the user. We will use it
8352      # for the tool.
8353
8354      # First remove it from the list of overridden variables, so we can test
8355      # for unknown variables in the end.
8356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8357
8358      # Check if the provided tool contains a complete path.
8359      tool_specified="$MV"
8360      tool_basename="${tool_specified##*/}"
8361      if test "x$tool_basename" = "x$tool_specified"; then
8362        # A command without a complete path is provided, search $PATH.
8363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8364$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8365        # Extract the first word of "$tool_basename", so it can be a program name with args.
8366set dummy $tool_basename; ac_word=$2
8367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8368$as_echo_n "checking for $ac_word... " >&6; }
8369if ${ac_cv_path_MV+:} false; then :
8370  $as_echo_n "(cached) " >&6
8371else
8372  case $MV in
8373  [\\/]* | ?:[\\/]*)
8374  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8375  ;;
8376  *)
8377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8378for as_dir in $PATH
8379do
8380  IFS=$as_save_IFS
8381  test -z "$as_dir" && as_dir=.
8382    for ac_exec_ext in '' $ac_executable_extensions; do
8383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8384    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8386    break 2
8387  fi
8388done
8389  done
8390IFS=$as_save_IFS
8391
8392  ;;
8393esac
8394fi
8395MV=$ac_cv_path_MV
8396if test -n "$MV"; then
8397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8398$as_echo "$MV" >&6; }
8399else
8400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8401$as_echo "no" >&6; }
8402fi
8403
8404
8405        if test "x$MV" = x; then
8406          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8407        fi
8408      else
8409        # Otherwise we believe it is a complete path. Use it as it is.
8410        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8411$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8413$as_echo_n "checking for MV... " >&6; }
8414        if test ! -x "$tool_specified"; then
8415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8416$as_echo "not found" >&6; }
8417          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8418        fi
8419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8420$as_echo "$tool_specified" >&6; }
8421      fi
8422    fi
8423  fi
8424
8425
8426
8427  if test "x$MV" = x; then
8428    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8429  fi
8430
8431
8432
8433
8434
8435  # Publish this variable in the help.
8436
8437
8438  if test "x$NAWK" = x; then
8439    # The variable is not set by user, try to locate tool using the code snippet
8440    for ac_prog in nawk gawk awk
8441do
8442  # Extract the first word of "$ac_prog", so it can be a program name with args.
8443set dummy $ac_prog; ac_word=$2
8444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8445$as_echo_n "checking for $ac_word... " >&6; }
8446if ${ac_cv_path_NAWK+:} false; then :
8447  $as_echo_n "(cached) " >&6
8448else
8449  case $NAWK in
8450  [\\/]* | ?:[\\/]*)
8451  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8452  ;;
8453  *)
8454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8455for as_dir in $PATH
8456do
8457  IFS=$as_save_IFS
8458  test -z "$as_dir" && as_dir=.
8459    for ac_exec_ext in '' $ac_executable_extensions; do
8460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8461    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8463    break 2
8464  fi
8465done
8466  done
8467IFS=$as_save_IFS
8468
8469  ;;
8470esac
8471fi
8472NAWK=$ac_cv_path_NAWK
8473if test -n "$NAWK"; then
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8475$as_echo "$NAWK" >&6; }
8476else
8477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8478$as_echo "no" >&6; }
8479fi
8480
8481
8482  test -n "$NAWK" && break
8483done
8484
8485  else
8486    # The variable is set, but is it from the command line or the environment?
8487
8488    # Try to remove the string !NAWK! from our list.
8489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8491      # If it failed, the variable was not from the command line. Ignore it,
8492      # but warn the user (except for BASH, which is always set by the calling BASH).
8493      if test "xNAWK" != xBASH; then
8494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8495$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8496      fi
8497      # Try to locate tool using the code snippet
8498      for ac_prog in nawk gawk awk
8499do
8500  # Extract the first word of "$ac_prog", so it can be a program name with args.
8501set dummy $ac_prog; ac_word=$2
8502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8503$as_echo_n "checking for $ac_word... " >&6; }
8504if ${ac_cv_path_NAWK+:} false; then :
8505  $as_echo_n "(cached) " >&6
8506else
8507  case $NAWK in
8508  [\\/]* | ?:[\\/]*)
8509  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8510  ;;
8511  *)
8512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8513for as_dir in $PATH
8514do
8515  IFS=$as_save_IFS
8516  test -z "$as_dir" && as_dir=.
8517    for ac_exec_ext in '' $ac_executable_extensions; do
8518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8519    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8521    break 2
8522  fi
8523done
8524  done
8525IFS=$as_save_IFS
8526
8527  ;;
8528esac
8529fi
8530NAWK=$ac_cv_path_NAWK
8531if test -n "$NAWK"; then
8532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8533$as_echo "$NAWK" >&6; }
8534else
8535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8536$as_echo "no" >&6; }
8537fi
8538
8539
8540  test -n "$NAWK" && break
8541done
8542
8543    else
8544      # If it succeeded, then it was overridden by the user. We will use it
8545      # for the tool.
8546
8547      # First remove it from the list of overridden variables, so we can test
8548      # for unknown variables in the end.
8549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8550
8551      # Check if the provided tool contains a complete path.
8552      tool_specified="$NAWK"
8553      tool_basename="${tool_specified##*/}"
8554      if test "x$tool_basename" = "x$tool_specified"; then
8555        # A command without a complete path is provided, search $PATH.
8556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8557$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8558        # Extract the first word of "$tool_basename", so it can be a program name with args.
8559set dummy $tool_basename; ac_word=$2
8560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8561$as_echo_n "checking for $ac_word... " >&6; }
8562if ${ac_cv_path_NAWK+:} false; then :
8563  $as_echo_n "(cached) " >&6
8564else
8565  case $NAWK in
8566  [\\/]* | ?:[\\/]*)
8567  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8568  ;;
8569  *)
8570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8571for as_dir in $PATH
8572do
8573  IFS=$as_save_IFS
8574  test -z "$as_dir" && as_dir=.
8575    for ac_exec_ext in '' $ac_executable_extensions; do
8576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8577    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8579    break 2
8580  fi
8581done
8582  done
8583IFS=$as_save_IFS
8584
8585  ;;
8586esac
8587fi
8588NAWK=$ac_cv_path_NAWK
8589if test -n "$NAWK"; then
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8591$as_echo "$NAWK" >&6; }
8592else
8593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8594$as_echo "no" >&6; }
8595fi
8596
8597
8598        if test "x$NAWK" = x; then
8599          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8600        fi
8601      else
8602        # Otherwise we believe it is a complete path. Use it as it is.
8603        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8604$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8606$as_echo_n "checking for NAWK... " >&6; }
8607        if test ! -x "$tool_specified"; then
8608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8609$as_echo "not found" >&6; }
8610          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8611        fi
8612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8613$as_echo "$tool_specified" >&6; }
8614      fi
8615    fi
8616  fi
8617
8618
8619
8620  if test "x$NAWK" = x; then
8621    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8622  fi
8623
8624
8625
8626
8627
8628  # Publish this variable in the help.
8629
8630
8631  if test "x$PRINTF" = x; then
8632    # The variable is not set by user, try to locate tool using the code snippet
8633    for ac_prog in printf
8634do
8635  # Extract the first word of "$ac_prog", so it can be a program name with args.
8636set dummy $ac_prog; ac_word=$2
8637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8638$as_echo_n "checking for $ac_word... " >&6; }
8639if ${ac_cv_path_PRINTF+:} false; then :
8640  $as_echo_n "(cached) " >&6
8641else
8642  case $PRINTF in
8643  [\\/]* | ?:[\\/]*)
8644  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8645  ;;
8646  *)
8647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8648for as_dir in $PATH
8649do
8650  IFS=$as_save_IFS
8651  test -z "$as_dir" && as_dir=.
8652    for ac_exec_ext in '' $ac_executable_extensions; do
8653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8654    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8656    break 2
8657  fi
8658done
8659  done
8660IFS=$as_save_IFS
8661
8662  ;;
8663esac
8664fi
8665PRINTF=$ac_cv_path_PRINTF
8666if test -n "$PRINTF"; then
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8668$as_echo "$PRINTF" >&6; }
8669else
8670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8671$as_echo "no" >&6; }
8672fi
8673
8674
8675  test -n "$PRINTF" && break
8676done
8677
8678  else
8679    # The variable is set, but is it from the command line or the environment?
8680
8681    # Try to remove the string !PRINTF! from our list.
8682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8684      # If it failed, the variable was not from the command line. Ignore it,
8685      # but warn the user (except for BASH, which is always set by the calling BASH).
8686      if test "xPRINTF" != xBASH; then
8687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8688$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8689      fi
8690      # Try to locate tool using the code snippet
8691      for ac_prog in printf
8692do
8693  # Extract the first word of "$ac_prog", so it can be a program name with args.
8694set dummy $ac_prog; ac_word=$2
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8696$as_echo_n "checking for $ac_word... " >&6; }
8697if ${ac_cv_path_PRINTF+:} false; then :
8698  $as_echo_n "(cached) " >&6
8699else
8700  case $PRINTF in
8701  [\\/]* | ?:[\\/]*)
8702  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8703  ;;
8704  *)
8705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8706for as_dir in $PATH
8707do
8708  IFS=$as_save_IFS
8709  test -z "$as_dir" && as_dir=.
8710    for ac_exec_ext in '' $ac_executable_extensions; do
8711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8712    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8714    break 2
8715  fi
8716done
8717  done
8718IFS=$as_save_IFS
8719
8720  ;;
8721esac
8722fi
8723PRINTF=$ac_cv_path_PRINTF
8724if test -n "$PRINTF"; then
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8726$as_echo "$PRINTF" >&6; }
8727else
8728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8729$as_echo "no" >&6; }
8730fi
8731
8732
8733  test -n "$PRINTF" && break
8734done
8735
8736    else
8737      # If it succeeded, then it was overridden by the user. We will use it
8738      # for the tool.
8739
8740      # First remove it from the list of overridden variables, so we can test
8741      # for unknown variables in the end.
8742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8743
8744      # Check if the provided tool contains a complete path.
8745      tool_specified="$PRINTF"
8746      tool_basename="${tool_specified##*/}"
8747      if test "x$tool_basename" = "x$tool_specified"; then
8748        # A command without a complete path is provided, search $PATH.
8749        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8750$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8751        # Extract the first word of "$tool_basename", so it can be a program name with args.
8752set dummy $tool_basename; ac_word=$2
8753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8754$as_echo_n "checking for $ac_word... " >&6; }
8755if ${ac_cv_path_PRINTF+:} false; then :
8756  $as_echo_n "(cached) " >&6
8757else
8758  case $PRINTF in
8759  [\\/]* | ?:[\\/]*)
8760  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8761  ;;
8762  *)
8763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8764for as_dir in $PATH
8765do
8766  IFS=$as_save_IFS
8767  test -z "$as_dir" && as_dir=.
8768    for ac_exec_ext in '' $ac_executable_extensions; do
8769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8770    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8772    break 2
8773  fi
8774done
8775  done
8776IFS=$as_save_IFS
8777
8778  ;;
8779esac
8780fi
8781PRINTF=$ac_cv_path_PRINTF
8782if test -n "$PRINTF"; then
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8784$as_echo "$PRINTF" >&6; }
8785else
8786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8787$as_echo "no" >&6; }
8788fi
8789
8790
8791        if test "x$PRINTF" = x; then
8792          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8793        fi
8794      else
8795        # Otherwise we believe it is a complete path. Use it as it is.
8796        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8797$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8799$as_echo_n "checking for PRINTF... " >&6; }
8800        if test ! -x "$tool_specified"; then
8801          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8802$as_echo "not found" >&6; }
8803          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8804        fi
8805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8806$as_echo "$tool_specified" >&6; }
8807      fi
8808    fi
8809  fi
8810
8811
8812
8813  if test "x$PRINTF" = x; then
8814    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8815  fi
8816
8817
8818
8819
8820
8821  # Publish this variable in the help.
8822
8823
8824  if test "x$RM" = x; then
8825    # The variable is not set by user, try to locate tool using the code snippet
8826    for ac_prog in rm
8827do
8828  # Extract the first word of "$ac_prog", so it can be a program name with args.
8829set dummy $ac_prog; ac_word=$2
8830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8831$as_echo_n "checking for $ac_word... " >&6; }
8832if ${ac_cv_path_RM+:} false; then :
8833  $as_echo_n "(cached) " >&6
8834else
8835  case $RM in
8836  [\\/]* | ?:[\\/]*)
8837  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8838  ;;
8839  *)
8840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8841for as_dir in $PATH
8842do
8843  IFS=$as_save_IFS
8844  test -z "$as_dir" && as_dir=.
8845    for ac_exec_ext in '' $ac_executable_extensions; do
8846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8847    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8849    break 2
8850  fi
8851done
8852  done
8853IFS=$as_save_IFS
8854
8855  ;;
8856esac
8857fi
8858RM=$ac_cv_path_RM
8859if test -n "$RM"; then
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8861$as_echo "$RM" >&6; }
8862else
8863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8864$as_echo "no" >&6; }
8865fi
8866
8867
8868  test -n "$RM" && break
8869done
8870
8871  else
8872    # The variable is set, but is it from the command line or the environment?
8873
8874    # Try to remove the string !RM! from our list.
8875    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8876    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8877      # If it failed, the variable was not from the command line. Ignore it,
8878      # but warn the user (except for BASH, which is always set by the calling BASH).
8879      if test "xRM" != xBASH; then
8880        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8881$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8882      fi
8883      # Try to locate tool using the code snippet
8884      for ac_prog in rm
8885do
8886  # Extract the first word of "$ac_prog", so it can be a program name with args.
8887set dummy $ac_prog; ac_word=$2
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8889$as_echo_n "checking for $ac_word... " >&6; }
8890if ${ac_cv_path_RM+:} false; then :
8891  $as_echo_n "(cached) " >&6
8892else
8893  case $RM in
8894  [\\/]* | ?:[\\/]*)
8895  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8896  ;;
8897  *)
8898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8899for as_dir in $PATH
8900do
8901  IFS=$as_save_IFS
8902  test -z "$as_dir" && as_dir=.
8903    for ac_exec_ext in '' $ac_executable_extensions; do
8904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8905    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8907    break 2
8908  fi
8909done
8910  done
8911IFS=$as_save_IFS
8912
8913  ;;
8914esac
8915fi
8916RM=$ac_cv_path_RM
8917if test -n "$RM"; then
8918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8919$as_echo "$RM" >&6; }
8920else
8921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8922$as_echo "no" >&6; }
8923fi
8924
8925
8926  test -n "$RM" && break
8927done
8928
8929    else
8930      # If it succeeded, then it was overridden by the user. We will use it
8931      # for the tool.
8932
8933      # First remove it from the list of overridden variables, so we can test
8934      # for unknown variables in the end.
8935      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8936
8937      # Check if the provided tool contains a complete path.
8938      tool_specified="$RM"
8939      tool_basename="${tool_specified##*/}"
8940      if test "x$tool_basename" = "x$tool_specified"; then
8941        # A command without a complete path is provided, search $PATH.
8942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8943$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8944        # Extract the first word of "$tool_basename", so it can be a program name with args.
8945set dummy $tool_basename; ac_word=$2
8946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8947$as_echo_n "checking for $ac_word... " >&6; }
8948if ${ac_cv_path_RM+:} false; then :
8949  $as_echo_n "(cached) " >&6
8950else
8951  case $RM in
8952  [\\/]* | ?:[\\/]*)
8953  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8954  ;;
8955  *)
8956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8957for as_dir in $PATH
8958do
8959  IFS=$as_save_IFS
8960  test -z "$as_dir" && as_dir=.
8961    for ac_exec_ext in '' $ac_executable_extensions; do
8962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8963    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8965    break 2
8966  fi
8967done
8968  done
8969IFS=$as_save_IFS
8970
8971  ;;
8972esac
8973fi
8974RM=$ac_cv_path_RM
8975if test -n "$RM"; then
8976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8977$as_echo "$RM" >&6; }
8978else
8979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8980$as_echo "no" >&6; }
8981fi
8982
8983
8984        if test "x$RM" = x; then
8985          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8986        fi
8987      else
8988        # Otherwise we believe it is a complete path. Use it as it is.
8989        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8990$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8992$as_echo_n "checking for RM... " >&6; }
8993        if test ! -x "$tool_specified"; then
8994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8995$as_echo "not found" >&6; }
8996          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8997        fi
8998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8999$as_echo "$tool_specified" >&6; }
9000      fi
9001    fi
9002  fi
9003
9004
9005
9006  if test "x$RM" = x; then
9007    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9008  fi
9009
9010
9011
9012
9013
9014  # Publish this variable in the help.
9015
9016
9017  if test "x$SH" = x; then
9018    # The variable is not set by user, try to locate tool using the code snippet
9019    for ac_prog in sh
9020do
9021  # Extract the first word of "$ac_prog", so it can be a program name with args.
9022set dummy $ac_prog; ac_word=$2
9023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9024$as_echo_n "checking for $ac_word... " >&6; }
9025if ${ac_cv_path_SH+:} false; then :
9026  $as_echo_n "(cached) " >&6
9027else
9028  case $SH in
9029  [\\/]* | ?:[\\/]*)
9030  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9031  ;;
9032  *)
9033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9034for as_dir in $PATH
9035do
9036  IFS=$as_save_IFS
9037  test -z "$as_dir" && as_dir=.
9038    for ac_exec_ext in '' $ac_executable_extensions; do
9039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9040    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9042    break 2
9043  fi
9044done
9045  done
9046IFS=$as_save_IFS
9047
9048  ;;
9049esac
9050fi
9051SH=$ac_cv_path_SH
9052if test -n "$SH"; then
9053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9054$as_echo "$SH" >&6; }
9055else
9056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9057$as_echo "no" >&6; }
9058fi
9059
9060
9061  test -n "$SH" && break
9062done
9063
9064  else
9065    # The variable is set, but is it from the command line or the environment?
9066
9067    # Try to remove the string !SH! from our list.
9068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9070      # If it failed, the variable was not from the command line. Ignore it,
9071      # but warn the user (except for BASH, which is always set by the calling BASH).
9072      if test "xSH" != xBASH; then
9073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9074$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9075      fi
9076      # Try to locate tool using the code snippet
9077      for ac_prog in sh
9078do
9079  # Extract the first word of "$ac_prog", so it can be a program name with args.
9080set dummy $ac_prog; ac_word=$2
9081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9082$as_echo_n "checking for $ac_word... " >&6; }
9083if ${ac_cv_path_SH+:} false; then :
9084  $as_echo_n "(cached) " >&6
9085else
9086  case $SH in
9087  [\\/]* | ?:[\\/]*)
9088  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9089  ;;
9090  *)
9091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9092for as_dir in $PATH
9093do
9094  IFS=$as_save_IFS
9095  test -z "$as_dir" && as_dir=.
9096    for ac_exec_ext in '' $ac_executable_extensions; do
9097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9098    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9100    break 2
9101  fi
9102done
9103  done
9104IFS=$as_save_IFS
9105
9106  ;;
9107esac
9108fi
9109SH=$ac_cv_path_SH
9110if test -n "$SH"; then
9111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9112$as_echo "$SH" >&6; }
9113else
9114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9115$as_echo "no" >&6; }
9116fi
9117
9118
9119  test -n "$SH" && break
9120done
9121
9122    else
9123      # If it succeeded, then it was overridden by the user. We will use it
9124      # for the tool.
9125
9126      # First remove it from the list of overridden variables, so we can test
9127      # for unknown variables in the end.
9128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9129
9130      # Check if the provided tool contains a complete path.
9131      tool_specified="$SH"
9132      tool_basename="${tool_specified##*/}"
9133      if test "x$tool_basename" = "x$tool_specified"; then
9134        # A command without a complete path is provided, search $PATH.
9135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9136$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9137        # Extract the first word of "$tool_basename", so it can be a program name with args.
9138set dummy $tool_basename; ac_word=$2
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9140$as_echo_n "checking for $ac_word... " >&6; }
9141if ${ac_cv_path_SH+:} false; then :
9142  $as_echo_n "(cached) " >&6
9143else
9144  case $SH in
9145  [\\/]* | ?:[\\/]*)
9146  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9147  ;;
9148  *)
9149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9150for as_dir in $PATH
9151do
9152  IFS=$as_save_IFS
9153  test -z "$as_dir" && as_dir=.
9154    for ac_exec_ext in '' $ac_executable_extensions; do
9155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9156    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9158    break 2
9159  fi
9160done
9161  done
9162IFS=$as_save_IFS
9163
9164  ;;
9165esac
9166fi
9167SH=$ac_cv_path_SH
9168if test -n "$SH"; then
9169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9170$as_echo "$SH" >&6; }
9171else
9172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
9174fi
9175
9176
9177        if test "x$SH" = x; then
9178          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9179        fi
9180      else
9181        # Otherwise we believe it is a complete path. Use it as it is.
9182        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9183$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9185$as_echo_n "checking for SH... " >&6; }
9186        if test ! -x "$tool_specified"; then
9187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9188$as_echo "not found" >&6; }
9189          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9190        fi
9191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9192$as_echo "$tool_specified" >&6; }
9193      fi
9194    fi
9195  fi
9196
9197
9198
9199  if test "x$SH" = x; then
9200    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9201  fi
9202
9203
9204
9205
9206
9207  # Publish this variable in the help.
9208
9209
9210  if test "x$SORT" = x; then
9211    # The variable is not set by user, try to locate tool using the code snippet
9212    for ac_prog in sort
9213do
9214  # Extract the first word of "$ac_prog", so it can be a program name with args.
9215set dummy $ac_prog; ac_word=$2
9216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9217$as_echo_n "checking for $ac_word... " >&6; }
9218if ${ac_cv_path_SORT+:} false; then :
9219  $as_echo_n "(cached) " >&6
9220else
9221  case $SORT in
9222  [\\/]* | ?:[\\/]*)
9223  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9224  ;;
9225  *)
9226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9227for as_dir in $PATH
9228do
9229  IFS=$as_save_IFS
9230  test -z "$as_dir" && as_dir=.
9231    for ac_exec_ext in '' $ac_executable_extensions; do
9232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9233    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9235    break 2
9236  fi
9237done
9238  done
9239IFS=$as_save_IFS
9240
9241  ;;
9242esac
9243fi
9244SORT=$ac_cv_path_SORT
9245if test -n "$SORT"; then
9246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9247$as_echo "$SORT" >&6; }
9248else
9249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9250$as_echo "no" >&6; }
9251fi
9252
9253
9254  test -n "$SORT" && break
9255done
9256
9257  else
9258    # The variable is set, but is it from the command line or the environment?
9259
9260    # Try to remove the string !SORT! from our list.
9261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9263      # If it failed, the variable was not from the command line. Ignore it,
9264      # but warn the user (except for BASH, which is always set by the calling BASH).
9265      if test "xSORT" != xBASH; then
9266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9267$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9268      fi
9269      # Try to locate tool using the code snippet
9270      for ac_prog in sort
9271do
9272  # Extract the first word of "$ac_prog", so it can be a program name with args.
9273set dummy $ac_prog; ac_word=$2
9274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9275$as_echo_n "checking for $ac_word... " >&6; }
9276if ${ac_cv_path_SORT+:} false; then :
9277  $as_echo_n "(cached) " >&6
9278else
9279  case $SORT in
9280  [\\/]* | ?:[\\/]*)
9281  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9282  ;;
9283  *)
9284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9285for as_dir in $PATH
9286do
9287  IFS=$as_save_IFS
9288  test -z "$as_dir" && as_dir=.
9289    for ac_exec_ext in '' $ac_executable_extensions; do
9290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9291    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9293    break 2
9294  fi
9295done
9296  done
9297IFS=$as_save_IFS
9298
9299  ;;
9300esac
9301fi
9302SORT=$ac_cv_path_SORT
9303if test -n "$SORT"; then
9304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9305$as_echo "$SORT" >&6; }
9306else
9307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308$as_echo "no" >&6; }
9309fi
9310
9311
9312  test -n "$SORT" && break
9313done
9314
9315    else
9316      # If it succeeded, then it was overridden by the user. We will use it
9317      # for the tool.
9318
9319      # First remove it from the list of overridden variables, so we can test
9320      # for unknown variables in the end.
9321      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9322
9323      # Check if the provided tool contains a complete path.
9324      tool_specified="$SORT"
9325      tool_basename="${tool_specified##*/}"
9326      if test "x$tool_basename" = "x$tool_specified"; then
9327        # A command without a complete path is provided, search $PATH.
9328        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9329$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9330        # Extract the first word of "$tool_basename", so it can be a program name with args.
9331set dummy $tool_basename; ac_word=$2
9332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9333$as_echo_n "checking for $ac_word... " >&6; }
9334if ${ac_cv_path_SORT+:} false; then :
9335  $as_echo_n "(cached) " >&6
9336else
9337  case $SORT in
9338  [\\/]* | ?:[\\/]*)
9339  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9340  ;;
9341  *)
9342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9343for as_dir in $PATH
9344do
9345  IFS=$as_save_IFS
9346  test -z "$as_dir" && as_dir=.
9347    for ac_exec_ext in '' $ac_executable_extensions; do
9348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9349    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9351    break 2
9352  fi
9353done
9354  done
9355IFS=$as_save_IFS
9356
9357  ;;
9358esac
9359fi
9360SORT=$ac_cv_path_SORT
9361if test -n "$SORT"; then
9362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9363$as_echo "$SORT" >&6; }
9364else
9365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
9367fi
9368
9369
9370        if test "x$SORT" = x; then
9371          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9372        fi
9373      else
9374        # Otherwise we believe it is a complete path. Use it as it is.
9375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9376$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9378$as_echo_n "checking for SORT... " >&6; }
9379        if test ! -x "$tool_specified"; then
9380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9381$as_echo "not found" >&6; }
9382          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9383        fi
9384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9385$as_echo "$tool_specified" >&6; }
9386      fi
9387    fi
9388  fi
9389
9390
9391
9392  if test "x$SORT" = x; then
9393    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9394  fi
9395
9396
9397
9398
9399
9400  # Publish this variable in the help.
9401
9402
9403  if test "x$TAIL" = x; then
9404    # The variable is not set by user, try to locate tool using the code snippet
9405    for ac_prog in tail
9406do
9407  # Extract the first word of "$ac_prog", so it can be a program name with args.
9408set dummy $ac_prog; ac_word=$2
9409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9410$as_echo_n "checking for $ac_word... " >&6; }
9411if ${ac_cv_path_TAIL+:} false; then :
9412  $as_echo_n "(cached) " >&6
9413else
9414  case $TAIL in
9415  [\\/]* | ?:[\\/]*)
9416  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9417  ;;
9418  *)
9419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9420for as_dir in $PATH
9421do
9422  IFS=$as_save_IFS
9423  test -z "$as_dir" && as_dir=.
9424    for ac_exec_ext in '' $ac_executable_extensions; do
9425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9426    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9428    break 2
9429  fi
9430done
9431  done
9432IFS=$as_save_IFS
9433
9434  ;;
9435esac
9436fi
9437TAIL=$ac_cv_path_TAIL
9438if test -n "$TAIL"; then
9439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9440$as_echo "$TAIL" >&6; }
9441else
9442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9443$as_echo "no" >&6; }
9444fi
9445
9446
9447  test -n "$TAIL" && break
9448done
9449
9450  else
9451    # The variable is set, but is it from the command line or the environment?
9452
9453    # Try to remove the string !TAIL! from our list.
9454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9456      # If it failed, the variable was not from the command line. Ignore it,
9457      # but warn the user (except for BASH, which is always set by the calling BASH).
9458      if test "xTAIL" != xBASH; then
9459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9460$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9461      fi
9462      # Try to locate tool using the code snippet
9463      for ac_prog in tail
9464do
9465  # Extract the first word of "$ac_prog", so it can be a program name with args.
9466set dummy $ac_prog; ac_word=$2
9467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9468$as_echo_n "checking for $ac_word... " >&6; }
9469if ${ac_cv_path_TAIL+:} false; then :
9470  $as_echo_n "(cached) " >&6
9471else
9472  case $TAIL in
9473  [\\/]* | ?:[\\/]*)
9474  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9475  ;;
9476  *)
9477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9478for as_dir in $PATH
9479do
9480  IFS=$as_save_IFS
9481  test -z "$as_dir" && as_dir=.
9482    for ac_exec_ext in '' $ac_executable_extensions; do
9483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9484    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9486    break 2
9487  fi
9488done
9489  done
9490IFS=$as_save_IFS
9491
9492  ;;
9493esac
9494fi
9495TAIL=$ac_cv_path_TAIL
9496if test -n "$TAIL"; then
9497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9498$as_echo "$TAIL" >&6; }
9499else
9500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9501$as_echo "no" >&6; }
9502fi
9503
9504
9505  test -n "$TAIL" && break
9506done
9507
9508    else
9509      # If it succeeded, then it was overridden by the user. We will use it
9510      # for the tool.
9511
9512      # First remove it from the list of overridden variables, so we can test
9513      # for unknown variables in the end.
9514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9515
9516      # Check if the provided tool contains a complete path.
9517      tool_specified="$TAIL"
9518      tool_basename="${tool_specified##*/}"
9519      if test "x$tool_basename" = "x$tool_specified"; then
9520        # A command without a complete path is provided, search $PATH.
9521        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9522$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9523        # Extract the first word of "$tool_basename", so it can be a program name with args.
9524set dummy $tool_basename; ac_word=$2
9525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9526$as_echo_n "checking for $ac_word... " >&6; }
9527if ${ac_cv_path_TAIL+:} false; then :
9528  $as_echo_n "(cached) " >&6
9529else
9530  case $TAIL in
9531  [\\/]* | ?:[\\/]*)
9532  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9533  ;;
9534  *)
9535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9536for as_dir in $PATH
9537do
9538  IFS=$as_save_IFS
9539  test -z "$as_dir" && as_dir=.
9540    for ac_exec_ext in '' $ac_executable_extensions; do
9541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9542    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9544    break 2
9545  fi
9546done
9547  done
9548IFS=$as_save_IFS
9549
9550  ;;
9551esac
9552fi
9553TAIL=$ac_cv_path_TAIL
9554if test -n "$TAIL"; then
9555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9556$as_echo "$TAIL" >&6; }
9557else
9558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9559$as_echo "no" >&6; }
9560fi
9561
9562
9563        if test "x$TAIL" = x; then
9564          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9565        fi
9566      else
9567        # Otherwise we believe it is a complete path. Use it as it is.
9568        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9569$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9570        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9571$as_echo_n "checking for TAIL... " >&6; }
9572        if test ! -x "$tool_specified"; then
9573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9574$as_echo "not found" >&6; }
9575          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9576        fi
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9578$as_echo "$tool_specified" >&6; }
9579      fi
9580    fi
9581  fi
9582
9583
9584
9585  if test "x$TAIL" = x; then
9586    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9587  fi
9588
9589
9590
9591
9592
9593  # Publish this variable in the help.
9594
9595
9596  if test "x$TAR" = x; then
9597    # The variable is not set by user, try to locate tool using the code snippet
9598    for ac_prog in tar
9599do
9600  # Extract the first word of "$ac_prog", so it can be a program name with args.
9601set dummy $ac_prog; ac_word=$2
9602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9603$as_echo_n "checking for $ac_word... " >&6; }
9604if ${ac_cv_path_TAR+:} false; then :
9605  $as_echo_n "(cached) " >&6
9606else
9607  case $TAR in
9608  [\\/]* | ?:[\\/]*)
9609  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9610  ;;
9611  *)
9612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9613for as_dir in $PATH
9614do
9615  IFS=$as_save_IFS
9616  test -z "$as_dir" && as_dir=.
9617    for ac_exec_ext in '' $ac_executable_extensions; do
9618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9619    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9621    break 2
9622  fi
9623done
9624  done
9625IFS=$as_save_IFS
9626
9627  ;;
9628esac
9629fi
9630TAR=$ac_cv_path_TAR
9631if test -n "$TAR"; then
9632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9633$as_echo "$TAR" >&6; }
9634else
9635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636$as_echo "no" >&6; }
9637fi
9638
9639
9640  test -n "$TAR" && break
9641done
9642
9643  else
9644    # The variable is set, but is it from the command line or the environment?
9645
9646    # Try to remove the string !TAR! from our list.
9647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9649      # If it failed, the variable was not from the command line. Ignore it,
9650      # but warn the user (except for BASH, which is always set by the calling BASH).
9651      if test "xTAR" != xBASH; then
9652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9653$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9654      fi
9655      # Try to locate tool using the code snippet
9656      for ac_prog in tar
9657do
9658  # Extract the first word of "$ac_prog", so it can be a program name with args.
9659set dummy $ac_prog; ac_word=$2
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9661$as_echo_n "checking for $ac_word... " >&6; }
9662if ${ac_cv_path_TAR+:} false; then :
9663  $as_echo_n "(cached) " >&6
9664else
9665  case $TAR in
9666  [\\/]* | ?:[\\/]*)
9667  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9668  ;;
9669  *)
9670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9671for as_dir in $PATH
9672do
9673  IFS=$as_save_IFS
9674  test -z "$as_dir" && as_dir=.
9675    for ac_exec_ext in '' $ac_executable_extensions; do
9676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9677    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9679    break 2
9680  fi
9681done
9682  done
9683IFS=$as_save_IFS
9684
9685  ;;
9686esac
9687fi
9688TAR=$ac_cv_path_TAR
9689if test -n "$TAR"; then
9690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9691$as_echo "$TAR" >&6; }
9692else
9693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
9695fi
9696
9697
9698  test -n "$TAR" && break
9699done
9700
9701    else
9702      # If it succeeded, then it was overridden by the user. We will use it
9703      # for the tool.
9704
9705      # First remove it from the list of overridden variables, so we can test
9706      # for unknown variables in the end.
9707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9708
9709      # Check if the provided tool contains a complete path.
9710      tool_specified="$TAR"
9711      tool_basename="${tool_specified##*/}"
9712      if test "x$tool_basename" = "x$tool_specified"; then
9713        # A command without a complete path is provided, search $PATH.
9714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9715$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9716        # Extract the first word of "$tool_basename", so it can be a program name with args.
9717set dummy $tool_basename; ac_word=$2
9718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9719$as_echo_n "checking for $ac_word... " >&6; }
9720if ${ac_cv_path_TAR+:} false; then :
9721  $as_echo_n "(cached) " >&6
9722else
9723  case $TAR in
9724  [\\/]* | ?:[\\/]*)
9725  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9726  ;;
9727  *)
9728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9729for as_dir in $PATH
9730do
9731  IFS=$as_save_IFS
9732  test -z "$as_dir" && as_dir=.
9733    for ac_exec_ext in '' $ac_executable_extensions; do
9734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9735    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9737    break 2
9738  fi
9739done
9740  done
9741IFS=$as_save_IFS
9742
9743  ;;
9744esac
9745fi
9746TAR=$ac_cv_path_TAR
9747if test -n "$TAR"; then
9748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9749$as_echo "$TAR" >&6; }
9750else
9751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9752$as_echo "no" >&6; }
9753fi
9754
9755
9756        if test "x$TAR" = x; then
9757          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9758        fi
9759      else
9760        # Otherwise we believe it is a complete path. Use it as it is.
9761        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9762$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9764$as_echo_n "checking for TAR... " >&6; }
9765        if test ! -x "$tool_specified"; then
9766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9767$as_echo "not found" >&6; }
9768          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9769        fi
9770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9771$as_echo "$tool_specified" >&6; }
9772      fi
9773    fi
9774  fi
9775
9776
9777
9778  if test "x$TAR" = x; then
9779    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9780  fi
9781
9782
9783
9784
9785
9786  # Publish this variable in the help.
9787
9788
9789  if test "x$TEE" = x; then
9790    # The variable is not set by user, try to locate tool using the code snippet
9791    for ac_prog in tee
9792do
9793  # Extract the first word of "$ac_prog", so it can be a program name with args.
9794set dummy $ac_prog; ac_word=$2
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796$as_echo_n "checking for $ac_word... " >&6; }
9797if ${ac_cv_path_TEE+:} false; then :
9798  $as_echo_n "(cached) " >&6
9799else
9800  case $TEE in
9801  [\\/]* | ?:[\\/]*)
9802  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9803  ;;
9804  *)
9805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806for as_dir in $PATH
9807do
9808  IFS=$as_save_IFS
9809  test -z "$as_dir" && as_dir=.
9810    for ac_exec_ext in '' $ac_executable_extensions; do
9811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9812    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814    break 2
9815  fi
9816done
9817  done
9818IFS=$as_save_IFS
9819
9820  ;;
9821esac
9822fi
9823TEE=$ac_cv_path_TEE
9824if test -n "$TEE"; then
9825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9826$as_echo "$TEE" >&6; }
9827else
9828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829$as_echo "no" >&6; }
9830fi
9831
9832
9833  test -n "$TEE" && break
9834done
9835
9836  else
9837    # The variable is set, but is it from the command line or the environment?
9838
9839    # Try to remove the string !TEE! from our list.
9840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9842      # If it failed, the variable was not from the command line. Ignore it,
9843      # but warn the user (except for BASH, which is always set by the calling BASH).
9844      if test "xTEE" != xBASH; then
9845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9846$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9847      fi
9848      # Try to locate tool using the code snippet
9849      for ac_prog in tee
9850do
9851  # Extract the first word of "$ac_prog", so it can be a program name with args.
9852set dummy $ac_prog; ac_word=$2
9853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9854$as_echo_n "checking for $ac_word... " >&6; }
9855if ${ac_cv_path_TEE+:} false; then :
9856  $as_echo_n "(cached) " >&6
9857else
9858  case $TEE in
9859  [\\/]* | ?:[\\/]*)
9860  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9861  ;;
9862  *)
9863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9864for as_dir in $PATH
9865do
9866  IFS=$as_save_IFS
9867  test -z "$as_dir" && as_dir=.
9868    for ac_exec_ext in '' $ac_executable_extensions; do
9869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9870    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9872    break 2
9873  fi
9874done
9875  done
9876IFS=$as_save_IFS
9877
9878  ;;
9879esac
9880fi
9881TEE=$ac_cv_path_TEE
9882if test -n "$TEE"; then
9883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9884$as_echo "$TEE" >&6; }
9885else
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887$as_echo "no" >&6; }
9888fi
9889
9890
9891  test -n "$TEE" && break
9892done
9893
9894    else
9895      # If it succeeded, then it was overridden by the user. We will use it
9896      # for the tool.
9897
9898      # First remove it from the list of overridden variables, so we can test
9899      # for unknown variables in the end.
9900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9901
9902      # Check if the provided tool contains a complete path.
9903      tool_specified="$TEE"
9904      tool_basename="${tool_specified##*/}"
9905      if test "x$tool_basename" = "x$tool_specified"; then
9906        # A command without a complete path is provided, search $PATH.
9907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9908$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9909        # Extract the first word of "$tool_basename", so it can be a program name with args.
9910set dummy $tool_basename; ac_word=$2
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9912$as_echo_n "checking for $ac_word... " >&6; }
9913if ${ac_cv_path_TEE+:} false; then :
9914  $as_echo_n "(cached) " >&6
9915else
9916  case $TEE in
9917  [\\/]* | ?:[\\/]*)
9918  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9919  ;;
9920  *)
9921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9922for as_dir in $PATH
9923do
9924  IFS=$as_save_IFS
9925  test -z "$as_dir" && as_dir=.
9926    for ac_exec_ext in '' $ac_executable_extensions; do
9927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9928    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9930    break 2
9931  fi
9932done
9933  done
9934IFS=$as_save_IFS
9935
9936  ;;
9937esac
9938fi
9939TEE=$ac_cv_path_TEE
9940if test -n "$TEE"; then
9941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9942$as_echo "$TEE" >&6; }
9943else
9944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945$as_echo "no" >&6; }
9946fi
9947
9948
9949        if test "x$TEE" = x; then
9950          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9951        fi
9952      else
9953        # Otherwise we believe it is a complete path. Use it as it is.
9954        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9955$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9957$as_echo_n "checking for TEE... " >&6; }
9958        if test ! -x "$tool_specified"; then
9959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9960$as_echo "not found" >&6; }
9961          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9962        fi
9963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9964$as_echo "$tool_specified" >&6; }
9965      fi
9966    fi
9967  fi
9968
9969
9970
9971  if test "x$TEE" = x; then
9972    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9973  fi
9974
9975
9976
9977
9978
9979  # Publish this variable in the help.
9980
9981
9982  if test "x$TOUCH" = x; then
9983    # The variable is not set by user, try to locate tool using the code snippet
9984    for ac_prog in touch
9985do
9986  # Extract the first word of "$ac_prog", so it can be a program name with args.
9987set dummy $ac_prog; ac_word=$2
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9989$as_echo_n "checking for $ac_word... " >&6; }
9990if ${ac_cv_path_TOUCH+:} false; then :
9991  $as_echo_n "(cached) " >&6
9992else
9993  case $TOUCH in
9994  [\\/]* | ?:[\\/]*)
9995  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9996  ;;
9997  *)
9998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9999for as_dir in $PATH
10000do
10001  IFS=$as_save_IFS
10002  test -z "$as_dir" && as_dir=.
10003    for ac_exec_ext in '' $ac_executable_extensions; do
10004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10005    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10007    break 2
10008  fi
10009done
10010  done
10011IFS=$as_save_IFS
10012
10013  ;;
10014esac
10015fi
10016TOUCH=$ac_cv_path_TOUCH
10017if test -n "$TOUCH"; then
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10019$as_echo "$TOUCH" >&6; }
10020else
10021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10022$as_echo "no" >&6; }
10023fi
10024
10025
10026  test -n "$TOUCH" && break
10027done
10028
10029  else
10030    # The variable is set, but is it from the command line or the environment?
10031
10032    # Try to remove the string !TOUCH! from our list.
10033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10035      # If it failed, the variable was not from the command line. Ignore it,
10036      # but warn the user (except for BASH, which is always set by the calling BASH).
10037      if test "xTOUCH" != xBASH; then
10038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10039$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10040      fi
10041      # Try to locate tool using the code snippet
10042      for ac_prog in touch
10043do
10044  # Extract the first word of "$ac_prog", so it can be a program name with args.
10045set dummy $ac_prog; ac_word=$2
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10047$as_echo_n "checking for $ac_word... " >&6; }
10048if ${ac_cv_path_TOUCH+:} false; then :
10049  $as_echo_n "(cached) " >&6
10050else
10051  case $TOUCH in
10052  [\\/]* | ?:[\\/]*)
10053  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10054  ;;
10055  *)
10056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10057for as_dir in $PATH
10058do
10059  IFS=$as_save_IFS
10060  test -z "$as_dir" && as_dir=.
10061    for ac_exec_ext in '' $ac_executable_extensions; do
10062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10063    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10065    break 2
10066  fi
10067done
10068  done
10069IFS=$as_save_IFS
10070
10071  ;;
10072esac
10073fi
10074TOUCH=$ac_cv_path_TOUCH
10075if test -n "$TOUCH"; then
10076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10077$as_echo "$TOUCH" >&6; }
10078else
10079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10080$as_echo "no" >&6; }
10081fi
10082
10083
10084  test -n "$TOUCH" && break
10085done
10086
10087    else
10088      # If it succeeded, then it was overridden by the user. We will use it
10089      # for the tool.
10090
10091      # First remove it from the list of overridden variables, so we can test
10092      # for unknown variables in the end.
10093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10094
10095      # Check if the provided tool contains a complete path.
10096      tool_specified="$TOUCH"
10097      tool_basename="${tool_specified##*/}"
10098      if test "x$tool_basename" = "x$tool_specified"; then
10099        # A command without a complete path is provided, search $PATH.
10100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10101$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10102        # Extract the first word of "$tool_basename", so it can be a program name with args.
10103set dummy $tool_basename; ac_word=$2
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10105$as_echo_n "checking for $ac_word... " >&6; }
10106if ${ac_cv_path_TOUCH+:} false; then :
10107  $as_echo_n "(cached) " >&6
10108else
10109  case $TOUCH in
10110  [\\/]* | ?:[\\/]*)
10111  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10112  ;;
10113  *)
10114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10115for as_dir in $PATH
10116do
10117  IFS=$as_save_IFS
10118  test -z "$as_dir" && as_dir=.
10119    for ac_exec_ext in '' $ac_executable_extensions; do
10120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10121    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10123    break 2
10124  fi
10125done
10126  done
10127IFS=$as_save_IFS
10128
10129  ;;
10130esac
10131fi
10132TOUCH=$ac_cv_path_TOUCH
10133if test -n "$TOUCH"; then
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10135$as_echo "$TOUCH" >&6; }
10136else
10137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10138$as_echo "no" >&6; }
10139fi
10140
10141
10142        if test "x$TOUCH" = x; then
10143          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10144        fi
10145      else
10146        # Otherwise we believe it is a complete path. Use it as it is.
10147        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10148$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10150$as_echo_n "checking for TOUCH... " >&6; }
10151        if test ! -x "$tool_specified"; then
10152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10153$as_echo "not found" >&6; }
10154          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10155        fi
10156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10157$as_echo "$tool_specified" >&6; }
10158      fi
10159    fi
10160  fi
10161
10162
10163
10164  if test "x$TOUCH" = x; then
10165    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10166  fi
10167
10168
10169
10170
10171
10172  # Publish this variable in the help.
10173
10174
10175  if test "x$TR" = x; then
10176    # The variable is not set by user, try to locate tool using the code snippet
10177    for ac_prog in tr
10178do
10179  # Extract the first word of "$ac_prog", so it can be a program name with args.
10180set dummy $ac_prog; ac_word=$2
10181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10182$as_echo_n "checking for $ac_word... " >&6; }
10183if ${ac_cv_path_TR+:} false; then :
10184  $as_echo_n "(cached) " >&6
10185else
10186  case $TR in
10187  [\\/]* | ?:[\\/]*)
10188  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10189  ;;
10190  *)
10191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10192for as_dir in $PATH
10193do
10194  IFS=$as_save_IFS
10195  test -z "$as_dir" && as_dir=.
10196    for ac_exec_ext in '' $ac_executable_extensions; do
10197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10198    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10200    break 2
10201  fi
10202done
10203  done
10204IFS=$as_save_IFS
10205
10206  ;;
10207esac
10208fi
10209TR=$ac_cv_path_TR
10210if test -n "$TR"; then
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10212$as_echo "$TR" >&6; }
10213else
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
10216fi
10217
10218
10219  test -n "$TR" && break
10220done
10221
10222  else
10223    # The variable is set, but is it from the command line or the environment?
10224
10225    # Try to remove the string !TR! from our list.
10226    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10227    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10228      # If it failed, the variable was not from the command line. Ignore it,
10229      # but warn the user (except for BASH, which is always set by the calling BASH).
10230      if test "xTR" != xBASH; then
10231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10232$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10233      fi
10234      # Try to locate tool using the code snippet
10235      for ac_prog in tr
10236do
10237  # Extract the first word of "$ac_prog", so it can be a program name with args.
10238set dummy $ac_prog; ac_word=$2
10239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240$as_echo_n "checking for $ac_word... " >&6; }
10241if ${ac_cv_path_TR+:} false; then :
10242  $as_echo_n "(cached) " >&6
10243else
10244  case $TR in
10245  [\\/]* | ?:[\\/]*)
10246  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10247  ;;
10248  *)
10249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10250for as_dir in $PATH
10251do
10252  IFS=$as_save_IFS
10253  test -z "$as_dir" && as_dir=.
10254    for ac_exec_ext in '' $ac_executable_extensions; do
10255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10256    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10258    break 2
10259  fi
10260done
10261  done
10262IFS=$as_save_IFS
10263
10264  ;;
10265esac
10266fi
10267TR=$ac_cv_path_TR
10268if test -n "$TR"; then
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10270$as_echo "$TR" >&6; }
10271else
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
10274fi
10275
10276
10277  test -n "$TR" && break
10278done
10279
10280    else
10281      # If it succeeded, then it was overridden by the user. We will use it
10282      # for the tool.
10283
10284      # First remove it from the list of overridden variables, so we can test
10285      # for unknown variables in the end.
10286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10287
10288      # Check if the provided tool contains a complete path.
10289      tool_specified="$TR"
10290      tool_basename="${tool_specified##*/}"
10291      if test "x$tool_basename" = "x$tool_specified"; then
10292        # A command without a complete path is provided, search $PATH.
10293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10294$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10295        # Extract the first word of "$tool_basename", so it can be a program name with args.
10296set dummy $tool_basename; ac_word=$2
10297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10298$as_echo_n "checking for $ac_word... " >&6; }
10299if ${ac_cv_path_TR+:} false; then :
10300  $as_echo_n "(cached) " >&6
10301else
10302  case $TR in
10303  [\\/]* | ?:[\\/]*)
10304  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10305  ;;
10306  *)
10307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10308for as_dir in $PATH
10309do
10310  IFS=$as_save_IFS
10311  test -z "$as_dir" && as_dir=.
10312    for ac_exec_ext in '' $ac_executable_extensions; do
10313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10314    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10316    break 2
10317  fi
10318done
10319  done
10320IFS=$as_save_IFS
10321
10322  ;;
10323esac
10324fi
10325TR=$ac_cv_path_TR
10326if test -n "$TR"; then
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10328$as_echo "$TR" >&6; }
10329else
10330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
10332fi
10333
10334
10335        if test "x$TR" = x; then
10336          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10337        fi
10338      else
10339        # Otherwise we believe it is a complete path. Use it as it is.
10340        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10341$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10343$as_echo_n "checking for TR... " >&6; }
10344        if test ! -x "$tool_specified"; then
10345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10346$as_echo "not found" >&6; }
10347          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10348        fi
10349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10350$as_echo "$tool_specified" >&6; }
10351      fi
10352    fi
10353  fi
10354
10355
10356
10357  if test "x$TR" = x; then
10358    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10359  fi
10360
10361
10362
10363
10364
10365  # Publish this variable in the help.
10366
10367
10368  if test "x$UNAME" = x; then
10369    # The variable is not set by user, try to locate tool using the code snippet
10370    for ac_prog in uname
10371do
10372  # Extract the first word of "$ac_prog", so it can be a program name with args.
10373set dummy $ac_prog; ac_word=$2
10374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10375$as_echo_n "checking for $ac_word... " >&6; }
10376if ${ac_cv_path_UNAME+:} false; then :
10377  $as_echo_n "(cached) " >&6
10378else
10379  case $UNAME in
10380  [\\/]* | ?:[\\/]*)
10381  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10382  ;;
10383  *)
10384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10385for as_dir in $PATH
10386do
10387  IFS=$as_save_IFS
10388  test -z "$as_dir" && as_dir=.
10389    for ac_exec_ext in '' $ac_executable_extensions; do
10390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10391    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10393    break 2
10394  fi
10395done
10396  done
10397IFS=$as_save_IFS
10398
10399  ;;
10400esac
10401fi
10402UNAME=$ac_cv_path_UNAME
10403if test -n "$UNAME"; then
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10405$as_echo "$UNAME" >&6; }
10406else
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408$as_echo "no" >&6; }
10409fi
10410
10411
10412  test -n "$UNAME" && break
10413done
10414
10415  else
10416    # The variable is set, but is it from the command line or the environment?
10417
10418    # Try to remove the string !UNAME! from our list.
10419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10421      # If it failed, the variable was not from the command line. Ignore it,
10422      # but warn the user (except for BASH, which is always set by the calling BASH).
10423      if test "xUNAME" != xBASH; then
10424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10425$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10426      fi
10427      # Try to locate tool using the code snippet
10428      for ac_prog in uname
10429do
10430  # Extract the first word of "$ac_prog", so it can be a program name with args.
10431set dummy $ac_prog; ac_word=$2
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10433$as_echo_n "checking for $ac_word... " >&6; }
10434if ${ac_cv_path_UNAME+:} false; then :
10435  $as_echo_n "(cached) " >&6
10436else
10437  case $UNAME in
10438  [\\/]* | ?:[\\/]*)
10439  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10440  ;;
10441  *)
10442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10443for as_dir in $PATH
10444do
10445  IFS=$as_save_IFS
10446  test -z "$as_dir" && as_dir=.
10447    for ac_exec_ext in '' $ac_executable_extensions; do
10448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10449    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10451    break 2
10452  fi
10453done
10454  done
10455IFS=$as_save_IFS
10456
10457  ;;
10458esac
10459fi
10460UNAME=$ac_cv_path_UNAME
10461if test -n "$UNAME"; then
10462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10463$as_echo "$UNAME" >&6; }
10464else
10465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10466$as_echo "no" >&6; }
10467fi
10468
10469
10470  test -n "$UNAME" && break
10471done
10472
10473    else
10474      # If it succeeded, then it was overridden by the user. We will use it
10475      # for the tool.
10476
10477      # First remove it from the list of overridden variables, so we can test
10478      # for unknown variables in the end.
10479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10480
10481      # Check if the provided tool contains a complete path.
10482      tool_specified="$UNAME"
10483      tool_basename="${tool_specified##*/}"
10484      if test "x$tool_basename" = "x$tool_specified"; then
10485        # A command without a complete path is provided, search $PATH.
10486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10487$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10488        # Extract the first word of "$tool_basename", so it can be a program name with args.
10489set dummy $tool_basename; ac_word=$2
10490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10491$as_echo_n "checking for $ac_word... " >&6; }
10492if ${ac_cv_path_UNAME+:} false; then :
10493  $as_echo_n "(cached) " >&6
10494else
10495  case $UNAME in
10496  [\\/]* | ?:[\\/]*)
10497  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10498  ;;
10499  *)
10500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10501for as_dir in $PATH
10502do
10503  IFS=$as_save_IFS
10504  test -z "$as_dir" && as_dir=.
10505    for ac_exec_ext in '' $ac_executable_extensions; do
10506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10507    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10509    break 2
10510  fi
10511done
10512  done
10513IFS=$as_save_IFS
10514
10515  ;;
10516esac
10517fi
10518UNAME=$ac_cv_path_UNAME
10519if test -n "$UNAME"; then
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10521$as_echo "$UNAME" >&6; }
10522else
10523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524$as_echo "no" >&6; }
10525fi
10526
10527
10528        if test "x$UNAME" = x; then
10529          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10530        fi
10531      else
10532        # Otherwise we believe it is a complete path. Use it as it is.
10533        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10534$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10536$as_echo_n "checking for UNAME... " >&6; }
10537        if test ! -x "$tool_specified"; then
10538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10539$as_echo "not found" >&6; }
10540          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10541        fi
10542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10543$as_echo "$tool_specified" >&6; }
10544      fi
10545    fi
10546  fi
10547
10548
10549
10550  if test "x$UNAME" = x; then
10551    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10552  fi
10553
10554
10555
10556
10557
10558  # Publish this variable in the help.
10559
10560
10561  if test "x$UNIQ" = x; then
10562    # The variable is not set by user, try to locate tool using the code snippet
10563    for ac_prog in uniq
10564do
10565  # Extract the first word of "$ac_prog", so it can be a program name with args.
10566set dummy $ac_prog; ac_word=$2
10567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10568$as_echo_n "checking for $ac_word... " >&6; }
10569if ${ac_cv_path_UNIQ+:} false; then :
10570  $as_echo_n "(cached) " >&6
10571else
10572  case $UNIQ in
10573  [\\/]* | ?:[\\/]*)
10574  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10575  ;;
10576  *)
10577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10578for as_dir in $PATH
10579do
10580  IFS=$as_save_IFS
10581  test -z "$as_dir" && as_dir=.
10582    for ac_exec_ext in '' $ac_executable_extensions; do
10583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10584    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10586    break 2
10587  fi
10588done
10589  done
10590IFS=$as_save_IFS
10591
10592  ;;
10593esac
10594fi
10595UNIQ=$ac_cv_path_UNIQ
10596if test -n "$UNIQ"; then
10597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10598$as_echo "$UNIQ" >&6; }
10599else
10600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10601$as_echo "no" >&6; }
10602fi
10603
10604
10605  test -n "$UNIQ" && break
10606done
10607
10608  else
10609    # The variable is set, but is it from the command line or the environment?
10610
10611    # Try to remove the string !UNIQ! from our list.
10612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10614      # If it failed, the variable was not from the command line. Ignore it,
10615      # but warn the user (except for BASH, which is always set by the calling BASH).
10616      if test "xUNIQ" != xBASH; then
10617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10618$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10619      fi
10620      # Try to locate tool using the code snippet
10621      for ac_prog in uniq
10622do
10623  # Extract the first word of "$ac_prog", so it can be a program name with args.
10624set dummy $ac_prog; ac_word=$2
10625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10626$as_echo_n "checking for $ac_word... " >&6; }
10627if ${ac_cv_path_UNIQ+:} false; then :
10628  $as_echo_n "(cached) " >&6
10629else
10630  case $UNIQ in
10631  [\\/]* | ?:[\\/]*)
10632  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10633  ;;
10634  *)
10635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10636for as_dir in $PATH
10637do
10638  IFS=$as_save_IFS
10639  test -z "$as_dir" && as_dir=.
10640    for ac_exec_ext in '' $ac_executable_extensions; do
10641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10642    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10644    break 2
10645  fi
10646done
10647  done
10648IFS=$as_save_IFS
10649
10650  ;;
10651esac
10652fi
10653UNIQ=$ac_cv_path_UNIQ
10654if test -n "$UNIQ"; then
10655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10656$as_echo "$UNIQ" >&6; }
10657else
10658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659$as_echo "no" >&6; }
10660fi
10661
10662
10663  test -n "$UNIQ" && break
10664done
10665
10666    else
10667      # If it succeeded, then it was overridden by the user. We will use it
10668      # for the tool.
10669
10670      # First remove it from the list of overridden variables, so we can test
10671      # for unknown variables in the end.
10672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10673
10674      # Check if the provided tool contains a complete path.
10675      tool_specified="$UNIQ"
10676      tool_basename="${tool_specified##*/}"
10677      if test "x$tool_basename" = "x$tool_specified"; then
10678        # A command without a complete path is provided, search $PATH.
10679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10680$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10681        # Extract the first word of "$tool_basename", so it can be a program name with args.
10682set dummy $tool_basename; ac_word=$2
10683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10684$as_echo_n "checking for $ac_word... " >&6; }
10685if ${ac_cv_path_UNIQ+:} false; then :
10686  $as_echo_n "(cached) " >&6
10687else
10688  case $UNIQ in
10689  [\\/]* | ?:[\\/]*)
10690  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10691  ;;
10692  *)
10693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10694for as_dir in $PATH
10695do
10696  IFS=$as_save_IFS
10697  test -z "$as_dir" && as_dir=.
10698    for ac_exec_ext in '' $ac_executable_extensions; do
10699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10700    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10702    break 2
10703  fi
10704done
10705  done
10706IFS=$as_save_IFS
10707
10708  ;;
10709esac
10710fi
10711UNIQ=$ac_cv_path_UNIQ
10712if test -n "$UNIQ"; then
10713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10714$as_echo "$UNIQ" >&6; }
10715else
10716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10717$as_echo "no" >&6; }
10718fi
10719
10720
10721        if test "x$UNIQ" = x; then
10722          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10723        fi
10724      else
10725        # Otherwise we believe it is a complete path. Use it as it is.
10726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10727$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10729$as_echo_n "checking for UNIQ... " >&6; }
10730        if test ! -x "$tool_specified"; then
10731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10732$as_echo "not found" >&6; }
10733          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10734        fi
10735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10736$as_echo "$tool_specified" >&6; }
10737      fi
10738    fi
10739  fi
10740
10741
10742
10743  if test "x$UNIQ" = x; then
10744    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10745  fi
10746
10747
10748
10749
10750
10751  # Publish this variable in the help.
10752
10753
10754  if test "x$WC" = x; then
10755    # The variable is not set by user, try to locate tool using the code snippet
10756    for ac_prog in wc
10757do
10758  # Extract the first word of "$ac_prog", so it can be a program name with args.
10759set dummy $ac_prog; ac_word=$2
10760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10761$as_echo_n "checking for $ac_word... " >&6; }
10762if ${ac_cv_path_WC+:} false; then :
10763  $as_echo_n "(cached) " >&6
10764else
10765  case $WC in
10766  [\\/]* | ?:[\\/]*)
10767  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10768  ;;
10769  *)
10770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10771for as_dir in $PATH
10772do
10773  IFS=$as_save_IFS
10774  test -z "$as_dir" && as_dir=.
10775    for ac_exec_ext in '' $ac_executable_extensions; do
10776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10777    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10779    break 2
10780  fi
10781done
10782  done
10783IFS=$as_save_IFS
10784
10785  ;;
10786esac
10787fi
10788WC=$ac_cv_path_WC
10789if test -n "$WC"; then
10790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10791$as_echo "$WC" >&6; }
10792else
10793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794$as_echo "no" >&6; }
10795fi
10796
10797
10798  test -n "$WC" && break
10799done
10800
10801  else
10802    # The variable is set, but is it from the command line or the environment?
10803
10804    # Try to remove the string !WC! from our list.
10805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10807      # If it failed, the variable was not from the command line. Ignore it,
10808      # but warn the user (except for BASH, which is always set by the calling BASH).
10809      if test "xWC" != xBASH; then
10810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10811$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10812      fi
10813      # Try to locate tool using the code snippet
10814      for ac_prog in wc
10815do
10816  # Extract the first word of "$ac_prog", so it can be a program name with args.
10817set dummy $ac_prog; ac_word=$2
10818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10819$as_echo_n "checking for $ac_word... " >&6; }
10820if ${ac_cv_path_WC+:} false; then :
10821  $as_echo_n "(cached) " >&6
10822else
10823  case $WC in
10824  [\\/]* | ?:[\\/]*)
10825  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10826  ;;
10827  *)
10828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10829for as_dir in $PATH
10830do
10831  IFS=$as_save_IFS
10832  test -z "$as_dir" && as_dir=.
10833    for ac_exec_ext in '' $ac_executable_extensions; do
10834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10835    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10837    break 2
10838  fi
10839done
10840  done
10841IFS=$as_save_IFS
10842
10843  ;;
10844esac
10845fi
10846WC=$ac_cv_path_WC
10847if test -n "$WC"; then
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10849$as_echo "$WC" >&6; }
10850else
10851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10852$as_echo "no" >&6; }
10853fi
10854
10855
10856  test -n "$WC" && break
10857done
10858
10859    else
10860      # If it succeeded, then it was overridden by the user. We will use it
10861      # for the tool.
10862
10863      # First remove it from the list of overridden variables, so we can test
10864      # for unknown variables in the end.
10865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10866
10867      # Check if the provided tool contains a complete path.
10868      tool_specified="$WC"
10869      tool_basename="${tool_specified##*/}"
10870      if test "x$tool_basename" = "x$tool_specified"; then
10871        # A command without a complete path is provided, search $PATH.
10872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10873$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10874        # Extract the first word of "$tool_basename", so it can be a program name with args.
10875set dummy $tool_basename; ac_word=$2
10876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10877$as_echo_n "checking for $ac_word... " >&6; }
10878if ${ac_cv_path_WC+:} false; then :
10879  $as_echo_n "(cached) " >&6
10880else
10881  case $WC in
10882  [\\/]* | ?:[\\/]*)
10883  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10884  ;;
10885  *)
10886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10887for as_dir in $PATH
10888do
10889  IFS=$as_save_IFS
10890  test -z "$as_dir" && as_dir=.
10891    for ac_exec_ext in '' $ac_executable_extensions; do
10892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10893    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10895    break 2
10896  fi
10897done
10898  done
10899IFS=$as_save_IFS
10900
10901  ;;
10902esac
10903fi
10904WC=$ac_cv_path_WC
10905if test -n "$WC"; then
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10907$as_echo "$WC" >&6; }
10908else
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910$as_echo "no" >&6; }
10911fi
10912
10913
10914        if test "x$WC" = x; then
10915          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10916        fi
10917      else
10918        # Otherwise we believe it is a complete path. Use it as it is.
10919        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10920$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10921        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10922$as_echo_n "checking for WC... " >&6; }
10923        if test ! -x "$tool_specified"; then
10924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10925$as_echo "not found" >&6; }
10926          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10927        fi
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10929$as_echo "$tool_specified" >&6; }
10930      fi
10931    fi
10932  fi
10933
10934
10935
10936  if test "x$WC" = x; then
10937    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10938  fi
10939
10940
10941
10942
10943
10944  # Publish this variable in the help.
10945
10946
10947  if test "x$WHICH" = x; then
10948    # The variable is not set by user, try to locate tool using the code snippet
10949    for ac_prog in which
10950do
10951  # Extract the first word of "$ac_prog", so it can be a program name with args.
10952set dummy $ac_prog; ac_word=$2
10953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10954$as_echo_n "checking for $ac_word... " >&6; }
10955if ${ac_cv_path_WHICH+:} false; then :
10956  $as_echo_n "(cached) " >&6
10957else
10958  case $WHICH in
10959  [\\/]* | ?:[\\/]*)
10960  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10961  ;;
10962  *)
10963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10964for as_dir in $PATH
10965do
10966  IFS=$as_save_IFS
10967  test -z "$as_dir" && as_dir=.
10968    for ac_exec_ext in '' $ac_executable_extensions; do
10969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10970    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10972    break 2
10973  fi
10974done
10975  done
10976IFS=$as_save_IFS
10977
10978  ;;
10979esac
10980fi
10981WHICH=$ac_cv_path_WHICH
10982if test -n "$WHICH"; then
10983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10984$as_echo "$WHICH" >&6; }
10985else
10986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10987$as_echo "no" >&6; }
10988fi
10989
10990
10991  test -n "$WHICH" && break
10992done
10993
10994  else
10995    # The variable is set, but is it from the command line or the environment?
10996
10997    # Try to remove the string !WHICH! from our list.
10998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11000      # If it failed, the variable was not from the command line. Ignore it,
11001      # but warn the user (except for BASH, which is always set by the calling BASH).
11002      if test "xWHICH" != xBASH; then
11003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11004$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11005      fi
11006      # Try to locate tool using the code snippet
11007      for ac_prog in which
11008do
11009  # Extract the first word of "$ac_prog", so it can be a program name with args.
11010set dummy $ac_prog; ac_word=$2
11011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11012$as_echo_n "checking for $ac_word... " >&6; }
11013if ${ac_cv_path_WHICH+:} false; then :
11014  $as_echo_n "(cached) " >&6
11015else
11016  case $WHICH in
11017  [\\/]* | ?:[\\/]*)
11018  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11019  ;;
11020  *)
11021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11022for as_dir in $PATH
11023do
11024  IFS=$as_save_IFS
11025  test -z "$as_dir" && as_dir=.
11026    for ac_exec_ext in '' $ac_executable_extensions; do
11027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11028    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11030    break 2
11031  fi
11032done
11033  done
11034IFS=$as_save_IFS
11035
11036  ;;
11037esac
11038fi
11039WHICH=$ac_cv_path_WHICH
11040if test -n "$WHICH"; then
11041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11042$as_echo "$WHICH" >&6; }
11043else
11044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11045$as_echo "no" >&6; }
11046fi
11047
11048
11049  test -n "$WHICH" && break
11050done
11051
11052    else
11053      # If it succeeded, then it was overridden by the user. We will use it
11054      # for the tool.
11055
11056      # First remove it from the list of overridden variables, so we can test
11057      # for unknown variables in the end.
11058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11059
11060      # Check if the provided tool contains a complete path.
11061      tool_specified="$WHICH"
11062      tool_basename="${tool_specified##*/}"
11063      if test "x$tool_basename" = "x$tool_specified"; then
11064        # A command without a complete path is provided, search $PATH.
11065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11066$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11067        # Extract the first word of "$tool_basename", so it can be a program name with args.
11068set dummy $tool_basename; ac_word=$2
11069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11070$as_echo_n "checking for $ac_word... " >&6; }
11071if ${ac_cv_path_WHICH+:} false; then :
11072  $as_echo_n "(cached) " >&6
11073else
11074  case $WHICH in
11075  [\\/]* | ?:[\\/]*)
11076  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11077  ;;
11078  *)
11079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11080for as_dir in $PATH
11081do
11082  IFS=$as_save_IFS
11083  test -z "$as_dir" && as_dir=.
11084    for ac_exec_ext in '' $ac_executable_extensions; do
11085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11086    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11088    break 2
11089  fi
11090done
11091  done
11092IFS=$as_save_IFS
11093
11094  ;;
11095esac
11096fi
11097WHICH=$ac_cv_path_WHICH
11098if test -n "$WHICH"; then
11099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11100$as_echo "$WHICH" >&6; }
11101else
11102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11103$as_echo "no" >&6; }
11104fi
11105
11106
11107        if test "x$WHICH" = x; then
11108          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11109        fi
11110      else
11111        # Otherwise we believe it is a complete path. Use it as it is.
11112        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11113$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11115$as_echo_n "checking for WHICH... " >&6; }
11116        if test ! -x "$tool_specified"; then
11117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11118$as_echo "not found" >&6; }
11119          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11120        fi
11121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11122$as_echo "$tool_specified" >&6; }
11123      fi
11124    fi
11125  fi
11126
11127
11128
11129  if test "x$WHICH" = x; then
11130    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11131  fi
11132
11133
11134
11135
11136
11137  # Publish this variable in the help.
11138
11139
11140  if test "x$XARGS" = x; then
11141    # The variable is not set by user, try to locate tool using the code snippet
11142    for ac_prog in xargs
11143do
11144  # Extract the first word of "$ac_prog", so it can be a program name with args.
11145set dummy $ac_prog; ac_word=$2
11146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11147$as_echo_n "checking for $ac_word... " >&6; }
11148if ${ac_cv_path_XARGS+:} false; then :
11149  $as_echo_n "(cached) " >&6
11150else
11151  case $XARGS in
11152  [\\/]* | ?:[\\/]*)
11153  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11154  ;;
11155  *)
11156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11157for as_dir in $PATH
11158do
11159  IFS=$as_save_IFS
11160  test -z "$as_dir" && as_dir=.
11161    for ac_exec_ext in '' $ac_executable_extensions; do
11162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11163    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11165    break 2
11166  fi
11167done
11168  done
11169IFS=$as_save_IFS
11170
11171  ;;
11172esac
11173fi
11174XARGS=$ac_cv_path_XARGS
11175if test -n "$XARGS"; then
11176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11177$as_echo "$XARGS" >&6; }
11178else
11179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11180$as_echo "no" >&6; }
11181fi
11182
11183
11184  test -n "$XARGS" && break
11185done
11186
11187  else
11188    # The variable is set, but is it from the command line or the environment?
11189
11190    # Try to remove the string !XARGS! from our list.
11191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11193      # If it failed, the variable was not from the command line. Ignore it,
11194      # but warn the user (except for BASH, which is always set by the calling BASH).
11195      if test "xXARGS" != xBASH; then
11196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11197$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11198      fi
11199      # Try to locate tool using the code snippet
11200      for ac_prog in xargs
11201do
11202  # Extract the first word of "$ac_prog", so it can be a program name with args.
11203set dummy $ac_prog; ac_word=$2
11204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11205$as_echo_n "checking for $ac_word... " >&6; }
11206if ${ac_cv_path_XARGS+:} false; then :
11207  $as_echo_n "(cached) " >&6
11208else
11209  case $XARGS in
11210  [\\/]* | ?:[\\/]*)
11211  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11212  ;;
11213  *)
11214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11215for as_dir in $PATH
11216do
11217  IFS=$as_save_IFS
11218  test -z "$as_dir" && as_dir=.
11219    for ac_exec_ext in '' $ac_executable_extensions; do
11220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11221    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11223    break 2
11224  fi
11225done
11226  done
11227IFS=$as_save_IFS
11228
11229  ;;
11230esac
11231fi
11232XARGS=$ac_cv_path_XARGS
11233if test -n "$XARGS"; then
11234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11235$as_echo "$XARGS" >&6; }
11236else
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11238$as_echo "no" >&6; }
11239fi
11240
11241
11242  test -n "$XARGS" && break
11243done
11244
11245    else
11246      # If it succeeded, then it was overridden by the user. We will use it
11247      # for the tool.
11248
11249      # First remove it from the list of overridden variables, so we can test
11250      # for unknown variables in the end.
11251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11252
11253      # Check if the provided tool contains a complete path.
11254      tool_specified="$XARGS"
11255      tool_basename="${tool_specified##*/}"
11256      if test "x$tool_basename" = "x$tool_specified"; then
11257        # A command without a complete path is provided, search $PATH.
11258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11259$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11260        # Extract the first word of "$tool_basename", so it can be a program name with args.
11261set dummy $tool_basename; ac_word=$2
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11263$as_echo_n "checking for $ac_word... " >&6; }
11264if ${ac_cv_path_XARGS+:} false; then :
11265  $as_echo_n "(cached) " >&6
11266else
11267  case $XARGS in
11268  [\\/]* | ?:[\\/]*)
11269  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11270  ;;
11271  *)
11272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11273for as_dir in $PATH
11274do
11275  IFS=$as_save_IFS
11276  test -z "$as_dir" && as_dir=.
11277    for ac_exec_ext in '' $ac_executable_extensions; do
11278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11279    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11281    break 2
11282  fi
11283done
11284  done
11285IFS=$as_save_IFS
11286
11287  ;;
11288esac
11289fi
11290XARGS=$ac_cv_path_XARGS
11291if test -n "$XARGS"; then
11292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11293$as_echo "$XARGS" >&6; }
11294else
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
11297fi
11298
11299
11300        if test "x$XARGS" = x; then
11301          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11302        fi
11303      else
11304        # Otherwise we believe it is a complete path. Use it as it is.
11305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11306$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11308$as_echo_n "checking for XARGS... " >&6; }
11309        if test ! -x "$tool_specified"; then
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11311$as_echo "not found" >&6; }
11312          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11313        fi
11314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11315$as_echo "$tool_specified" >&6; }
11316      fi
11317    fi
11318  fi
11319
11320
11321
11322  if test "x$XARGS" = x; then
11323    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11324  fi
11325
11326
11327
11328  # Then required tools that require some special treatment.
11329
11330
11331  # Publish this variable in the help.
11332
11333
11334  if test "x$AWK" = x; then
11335    # The variable is not set by user, try to locate tool using the code snippet
11336    for ac_prog in gawk mawk nawk awk
11337do
11338  # Extract the first word of "$ac_prog", so it can be a program name with args.
11339set dummy $ac_prog; ac_word=$2
11340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11341$as_echo_n "checking for $ac_word... " >&6; }
11342if ${ac_cv_prog_AWK+:} false; then :
11343  $as_echo_n "(cached) " >&6
11344else
11345  if test -n "$AWK"; then
11346  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11347else
11348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11349for as_dir in $PATH
11350do
11351  IFS=$as_save_IFS
11352  test -z "$as_dir" && as_dir=.
11353    for ac_exec_ext in '' $ac_executable_extensions; do
11354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11355    ac_cv_prog_AWK="$ac_prog"
11356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11357    break 2
11358  fi
11359done
11360  done
11361IFS=$as_save_IFS
11362
11363fi
11364fi
11365AWK=$ac_cv_prog_AWK
11366if test -n "$AWK"; then
11367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11368$as_echo "$AWK" >&6; }
11369else
11370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11371$as_echo "no" >&6; }
11372fi
11373
11374
11375  test -n "$AWK" && break
11376done
11377
11378  else
11379    # The variable is set, but is it from the command line or the environment?
11380
11381    # Try to remove the string !AWK! from our list.
11382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11384      # If it failed, the variable was not from the command line. Ignore it,
11385      # but warn the user (except for BASH, which is always set by the calling BASH).
11386      if test "xAWK" != xBASH; then
11387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11388$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11389      fi
11390      # Try to locate tool using the code snippet
11391      for ac_prog in gawk mawk nawk awk
11392do
11393  # Extract the first word of "$ac_prog", so it can be a program name with args.
11394set dummy $ac_prog; ac_word=$2
11395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11396$as_echo_n "checking for $ac_word... " >&6; }
11397if ${ac_cv_prog_AWK+:} false; then :
11398  $as_echo_n "(cached) " >&6
11399else
11400  if test -n "$AWK"; then
11401  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11402else
11403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11404for as_dir in $PATH
11405do
11406  IFS=$as_save_IFS
11407  test -z "$as_dir" && as_dir=.
11408    for ac_exec_ext in '' $ac_executable_extensions; do
11409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11410    ac_cv_prog_AWK="$ac_prog"
11411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11412    break 2
11413  fi
11414done
11415  done
11416IFS=$as_save_IFS
11417
11418fi
11419fi
11420AWK=$ac_cv_prog_AWK
11421if test -n "$AWK"; then
11422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11423$as_echo "$AWK" >&6; }
11424else
11425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11426$as_echo "no" >&6; }
11427fi
11428
11429
11430  test -n "$AWK" && break
11431done
11432
11433    else
11434      # If it succeeded, then it was overridden by the user. We will use it
11435      # for the tool.
11436
11437      # First remove it from the list of overridden variables, so we can test
11438      # for unknown variables in the end.
11439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11440
11441      # Check if the provided tool contains a complete path.
11442      tool_specified="$AWK"
11443      tool_basename="${tool_specified##*/}"
11444      if test "x$tool_basename" = "x$tool_specified"; then
11445        # A command without a complete path is provided, search $PATH.
11446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11447$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11448        # Extract the first word of "$tool_basename", so it can be a program name with args.
11449set dummy $tool_basename; ac_word=$2
11450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11451$as_echo_n "checking for $ac_word... " >&6; }
11452if ${ac_cv_path_AWK+:} false; then :
11453  $as_echo_n "(cached) " >&6
11454else
11455  case $AWK in
11456  [\\/]* | ?:[\\/]*)
11457  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11458  ;;
11459  *)
11460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11461for as_dir in $PATH
11462do
11463  IFS=$as_save_IFS
11464  test -z "$as_dir" && as_dir=.
11465    for ac_exec_ext in '' $ac_executable_extensions; do
11466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11467    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11469    break 2
11470  fi
11471done
11472  done
11473IFS=$as_save_IFS
11474
11475  ;;
11476esac
11477fi
11478AWK=$ac_cv_path_AWK
11479if test -n "$AWK"; then
11480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11481$as_echo "$AWK" >&6; }
11482else
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484$as_echo "no" >&6; }
11485fi
11486
11487
11488        if test "x$AWK" = x; then
11489          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11490        fi
11491      else
11492        # Otherwise we believe it is a complete path. Use it as it is.
11493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11494$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11496$as_echo_n "checking for AWK... " >&6; }
11497        if test ! -x "$tool_specified"; then
11498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11499$as_echo "not found" >&6; }
11500          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11501        fi
11502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11503$as_echo "$tool_specified" >&6; }
11504      fi
11505    fi
11506  fi
11507
11508
11509  if test "x$AWK" = x; then
11510    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11511  fi
11512
11513
11514
11515
11516  # Publish this variable in the help.
11517
11518
11519  if test "x$GREP" = x; then
11520    # The variable is not set by user, try to locate tool using the code snippet
11521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11522$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11523if ${ac_cv_path_GREP+:} false; then :
11524  $as_echo_n "(cached) " >&6
11525else
11526  if test -z "$GREP"; then
11527  ac_path_GREP_found=false
11528  # Loop through the user's path and test for each of PROGNAME-LIST
11529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11530for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11531do
11532  IFS=$as_save_IFS
11533  test -z "$as_dir" && as_dir=.
11534    for ac_prog in grep ggrep; do
11535    for ac_exec_ext in '' $ac_executable_extensions; do
11536      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11537      as_fn_executable_p "$ac_path_GREP" || continue
11538# Check for GNU ac_path_GREP and select it if it is found.
11539  # Check for GNU $ac_path_GREP
11540case `"$ac_path_GREP" --version 2>&1` in
11541*GNU*)
11542  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11543*)
11544  ac_count=0
11545  $as_echo_n 0123456789 >"conftest.in"
11546  while :
11547  do
11548    cat "conftest.in" "conftest.in" >"conftest.tmp"
11549    mv "conftest.tmp" "conftest.in"
11550    cp "conftest.in" "conftest.nl"
11551    $as_echo 'GREP' >> "conftest.nl"
11552    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11553    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11554    as_fn_arith $ac_count + 1 && ac_count=$as_val
11555    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11556      # Best one so far, save it but keep looking for a better one
11557      ac_cv_path_GREP="$ac_path_GREP"
11558      ac_path_GREP_max=$ac_count
11559    fi
11560    # 10*(2^10) chars as input seems more than enough
11561    test $ac_count -gt 10 && break
11562  done
11563  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11564esac
11565
11566      $ac_path_GREP_found && break 3
11567    done
11568  done
11569  done
11570IFS=$as_save_IFS
11571  if test -z "$ac_cv_path_GREP"; then
11572    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11573  fi
11574else
11575  ac_cv_path_GREP=$GREP
11576fi
11577
11578fi
11579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11580$as_echo "$ac_cv_path_GREP" >&6; }
11581 GREP="$ac_cv_path_GREP"
11582
11583
11584  else
11585    # The variable is set, but is it from the command line or the environment?
11586
11587    # Try to remove the string !GREP! from our list.
11588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11590      # If it failed, the variable was not from the command line. Ignore it,
11591      # but warn the user (except for BASH, which is always set by the calling BASH).
11592      if test "xGREP" != xBASH; then
11593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11594$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11595      fi
11596      # Try to locate tool using the code snippet
11597      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11598$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11599if ${ac_cv_path_GREP+:} false; then :
11600  $as_echo_n "(cached) " >&6
11601else
11602  if test -z "$GREP"; then
11603  ac_path_GREP_found=false
11604  # Loop through the user's path and test for each of PROGNAME-LIST
11605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11606for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11607do
11608  IFS=$as_save_IFS
11609  test -z "$as_dir" && as_dir=.
11610    for ac_prog in grep ggrep; do
11611    for ac_exec_ext in '' $ac_executable_extensions; do
11612      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11613      as_fn_executable_p "$ac_path_GREP" || continue
11614# Check for GNU ac_path_GREP and select it if it is found.
11615  # Check for GNU $ac_path_GREP
11616case `"$ac_path_GREP" --version 2>&1` in
11617*GNU*)
11618  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11619*)
11620  ac_count=0
11621  $as_echo_n 0123456789 >"conftest.in"
11622  while :
11623  do
11624    cat "conftest.in" "conftest.in" >"conftest.tmp"
11625    mv "conftest.tmp" "conftest.in"
11626    cp "conftest.in" "conftest.nl"
11627    $as_echo 'GREP' >> "conftest.nl"
11628    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11629    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11630    as_fn_arith $ac_count + 1 && ac_count=$as_val
11631    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11632      # Best one so far, save it but keep looking for a better one
11633      ac_cv_path_GREP="$ac_path_GREP"
11634      ac_path_GREP_max=$ac_count
11635    fi
11636    # 10*(2^10) chars as input seems more than enough
11637    test $ac_count -gt 10 && break
11638  done
11639  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11640esac
11641
11642      $ac_path_GREP_found && break 3
11643    done
11644  done
11645  done
11646IFS=$as_save_IFS
11647  if test -z "$ac_cv_path_GREP"; then
11648    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11649  fi
11650else
11651  ac_cv_path_GREP=$GREP
11652fi
11653
11654fi
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11656$as_echo "$ac_cv_path_GREP" >&6; }
11657 GREP="$ac_cv_path_GREP"
11658
11659
11660    else
11661      # If it succeeded, then it was overridden by the user. We will use it
11662      # for the tool.
11663
11664      # First remove it from the list of overridden variables, so we can test
11665      # for unknown variables in the end.
11666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11667
11668      # Check if the provided tool contains a complete path.
11669      tool_specified="$GREP"
11670      tool_basename="${tool_specified##*/}"
11671      if test "x$tool_basename" = "x$tool_specified"; then
11672        # A command without a complete path is provided, search $PATH.
11673        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11674$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11675        # Extract the first word of "$tool_basename", so it can be a program name with args.
11676set dummy $tool_basename; ac_word=$2
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11678$as_echo_n "checking for $ac_word... " >&6; }
11679if ${ac_cv_path_GREP+:} false; then :
11680  $as_echo_n "(cached) " >&6
11681else
11682  case $GREP in
11683  [\\/]* | ?:[\\/]*)
11684  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11685  ;;
11686  *)
11687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11688for as_dir in $PATH
11689do
11690  IFS=$as_save_IFS
11691  test -z "$as_dir" && as_dir=.
11692    for ac_exec_ext in '' $ac_executable_extensions; do
11693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11694    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11696    break 2
11697  fi
11698done
11699  done
11700IFS=$as_save_IFS
11701
11702  ;;
11703esac
11704fi
11705GREP=$ac_cv_path_GREP
11706if test -n "$GREP"; then
11707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11708$as_echo "$GREP" >&6; }
11709else
11710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
11712fi
11713
11714
11715        if test "x$GREP" = x; then
11716          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11717        fi
11718      else
11719        # Otherwise we believe it is a complete path. Use it as it is.
11720        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11721$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11723$as_echo_n "checking for GREP... " >&6; }
11724        if test ! -x "$tool_specified"; then
11725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11726$as_echo "not found" >&6; }
11727          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11728        fi
11729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11730$as_echo "$tool_specified" >&6; }
11731      fi
11732    fi
11733  fi
11734
11735
11736  if test "x$GREP" = x; then
11737    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11738  fi
11739
11740
11741
11742
11743  # Publish this variable in the help.
11744
11745
11746  if test "x$EGREP" = x; then
11747    # The variable is not set by user, try to locate tool using the code snippet
11748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11749$as_echo_n "checking for egrep... " >&6; }
11750if ${ac_cv_path_EGREP+:} false; then :
11751  $as_echo_n "(cached) " >&6
11752else
11753  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11754   then ac_cv_path_EGREP="$GREP -E"
11755   else
11756     if test -z "$EGREP"; then
11757  ac_path_EGREP_found=false
11758  # Loop through the user's path and test for each of PROGNAME-LIST
11759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11760for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11761do
11762  IFS=$as_save_IFS
11763  test -z "$as_dir" && as_dir=.
11764    for ac_prog in egrep; do
11765    for ac_exec_ext in '' $ac_executable_extensions; do
11766      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11767      as_fn_executable_p "$ac_path_EGREP" || continue
11768# Check for GNU ac_path_EGREP and select it if it is found.
11769  # Check for GNU $ac_path_EGREP
11770case `"$ac_path_EGREP" --version 2>&1` in
11771*GNU*)
11772  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11773*)
11774  ac_count=0
11775  $as_echo_n 0123456789 >"conftest.in"
11776  while :
11777  do
11778    cat "conftest.in" "conftest.in" >"conftest.tmp"
11779    mv "conftest.tmp" "conftest.in"
11780    cp "conftest.in" "conftest.nl"
11781    $as_echo 'EGREP' >> "conftest.nl"
11782    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11783    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11784    as_fn_arith $ac_count + 1 && ac_count=$as_val
11785    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11786      # Best one so far, save it but keep looking for a better one
11787      ac_cv_path_EGREP="$ac_path_EGREP"
11788      ac_path_EGREP_max=$ac_count
11789    fi
11790    # 10*(2^10) chars as input seems more than enough
11791    test $ac_count -gt 10 && break
11792  done
11793  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11794esac
11795
11796      $ac_path_EGREP_found && break 3
11797    done
11798  done
11799  done
11800IFS=$as_save_IFS
11801  if test -z "$ac_cv_path_EGREP"; then
11802    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11803  fi
11804else
11805  ac_cv_path_EGREP=$EGREP
11806fi
11807
11808   fi
11809fi
11810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11811$as_echo "$ac_cv_path_EGREP" >&6; }
11812 EGREP="$ac_cv_path_EGREP"
11813
11814
11815  else
11816    # The variable is set, but is it from the command line or the environment?
11817
11818    # Try to remove the string !EGREP! from our list.
11819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11821      # If it failed, the variable was not from the command line. Ignore it,
11822      # but warn the user (except for BASH, which is always set by the calling BASH).
11823      if test "xEGREP" != xBASH; then
11824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11825$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11826      fi
11827      # Try to locate tool using the code snippet
11828      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11829$as_echo_n "checking for egrep... " >&6; }
11830if ${ac_cv_path_EGREP+:} false; then :
11831  $as_echo_n "(cached) " >&6
11832else
11833  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11834   then ac_cv_path_EGREP="$GREP -E"
11835   else
11836     if test -z "$EGREP"; then
11837  ac_path_EGREP_found=false
11838  # Loop through the user's path and test for each of PROGNAME-LIST
11839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11840for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11841do
11842  IFS=$as_save_IFS
11843  test -z "$as_dir" && as_dir=.
11844    for ac_prog in egrep; do
11845    for ac_exec_ext in '' $ac_executable_extensions; do
11846      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11847      as_fn_executable_p "$ac_path_EGREP" || continue
11848# Check for GNU ac_path_EGREP and select it if it is found.
11849  # Check for GNU $ac_path_EGREP
11850case `"$ac_path_EGREP" --version 2>&1` in
11851*GNU*)
11852  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11853*)
11854  ac_count=0
11855  $as_echo_n 0123456789 >"conftest.in"
11856  while :
11857  do
11858    cat "conftest.in" "conftest.in" >"conftest.tmp"
11859    mv "conftest.tmp" "conftest.in"
11860    cp "conftest.in" "conftest.nl"
11861    $as_echo 'EGREP' >> "conftest.nl"
11862    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11863    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11864    as_fn_arith $ac_count + 1 && ac_count=$as_val
11865    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11866      # Best one so far, save it but keep looking for a better one
11867      ac_cv_path_EGREP="$ac_path_EGREP"
11868      ac_path_EGREP_max=$ac_count
11869    fi
11870    # 10*(2^10) chars as input seems more than enough
11871    test $ac_count -gt 10 && break
11872  done
11873  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11874esac
11875
11876      $ac_path_EGREP_found && break 3
11877    done
11878  done
11879  done
11880IFS=$as_save_IFS
11881  if test -z "$ac_cv_path_EGREP"; then
11882    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11883  fi
11884else
11885  ac_cv_path_EGREP=$EGREP
11886fi
11887
11888   fi
11889fi
11890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11891$as_echo "$ac_cv_path_EGREP" >&6; }
11892 EGREP="$ac_cv_path_EGREP"
11893
11894
11895    else
11896      # If it succeeded, then it was overridden by the user. We will use it
11897      # for the tool.
11898
11899      # First remove it from the list of overridden variables, so we can test
11900      # for unknown variables in the end.
11901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11902
11903      # Check if the provided tool contains a complete path.
11904      tool_specified="$EGREP"
11905      tool_basename="${tool_specified##*/}"
11906      if test "x$tool_basename" = "x$tool_specified"; then
11907        # A command without a complete path is provided, search $PATH.
11908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11909$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11910        # Extract the first word of "$tool_basename", so it can be a program name with args.
11911set dummy $tool_basename; ac_word=$2
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11913$as_echo_n "checking for $ac_word... " >&6; }
11914if ${ac_cv_path_EGREP+:} false; then :
11915  $as_echo_n "(cached) " >&6
11916else
11917  case $EGREP in
11918  [\\/]* | ?:[\\/]*)
11919  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11920  ;;
11921  *)
11922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11923for as_dir in $PATH
11924do
11925  IFS=$as_save_IFS
11926  test -z "$as_dir" && as_dir=.
11927    for ac_exec_ext in '' $ac_executable_extensions; do
11928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11929    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11931    break 2
11932  fi
11933done
11934  done
11935IFS=$as_save_IFS
11936
11937  ;;
11938esac
11939fi
11940EGREP=$ac_cv_path_EGREP
11941if test -n "$EGREP"; then
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11943$as_echo "$EGREP" >&6; }
11944else
11945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11946$as_echo "no" >&6; }
11947fi
11948
11949
11950        if test "x$EGREP" = x; then
11951          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11952        fi
11953      else
11954        # Otherwise we believe it is a complete path. Use it as it is.
11955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11956$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11958$as_echo_n "checking for EGREP... " >&6; }
11959        if test ! -x "$tool_specified"; then
11960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11961$as_echo "not found" >&6; }
11962          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11963        fi
11964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11965$as_echo "$tool_specified" >&6; }
11966      fi
11967    fi
11968  fi
11969
11970
11971  if test "x$EGREP" = x; then
11972    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11973  fi
11974
11975
11976
11977
11978  # Publish this variable in the help.
11979
11980
11981  if test "x$FGREP" = x; then
11982    # The variable is not set by user, try to locate tool using the code snippet
11983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11984$as_echo_n "checking for fgrep... " >&6; }
11985if ${ac_cv_path_FGREP+:} false; then :
11986  $as_echo_n "(cached) " >&6
11987else
11988  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11989   then ac_cv_path_FGREP="$GREP -F"
11990   else
11991     if test -z "$FGREP"; then
11992  ac_path_FGREP_found=false
11993  # Loop through the user's path and test for each of PROGNAME-LIST
11994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11995for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11996do
11997  IFS=$as_save_IFS
11998  test -z "$as_dir" && as_dir=.
11999    for ac_prog in fgrep; do
12000    for ac_exec_ext in '' $ac_executable_extensions; do
12001      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12002      as_fn_executable_p "$ac_path_FGREP" || continue
12003# Check for GNU ac_path_FGREP and select it if it is found.
12004  # Check for GNU $ac_path_FGREP
12005case `"$ac_path_FGREP" --version 2>&1` in
12006*GNU*)
12007  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12008*)
12009  ac_count=0
12010  $as_echo_n 0123456789 >"conftest.in"
12011  while :
12012  do
12013    cat "conftest.in" "conftest.in" >"conftest.tmp"
12014    mv "conftest.tmp" "conftest.in"
12015    cp "conftest.in" "conftest.nl"
12016    $as_echo 'FGREP' >> "conftest.nl"
12017    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12018    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12019    as_fn_arith $ac_count + 1 && ac_count=$as_val
12020    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12021      # Best one so far, save it but keep looking for a better one
12022      ac_cv_path_FGREP="$ac_path_FGREP"
12023      ac_path_FGREP_max=$ac_count
12024    fi
12025    # 10*(2^10) chars as input seems more than enough
12026    test $ac_count -gt 10 && break
12027  done
12028  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12029esac
12030
12031      $ac_path_FGREP_found && break 3
12032    done
12033  done
12034  done
12035IFS=$as_save_IFS
12036  if test -z "$ac_cv_path_FGREP"; then
12037    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12038  fi
12039else
12040  ac_cv_path_FGREP=$FGREP
12041fi
12042
12043   fi
12044fi
12045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12046$as_echo "$ac_cv_path_FGREP" >&6; }
12047 FGREP="$ac_cv_path_FGREP"
12048
12049
12050  else
12051    # The variable is set, but is it from the command line or the environment?
12052
12053    # Try to remove the string !FGREP! from our list.
12054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12056      # If it failed, the variable was not from the command line. Ignore it,
12057      # but warn the user (except for BASH, which is always set by the calling BASH).
12058      if test "xFGREP" != xBASH; then
12059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12060$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12061      fi
12062      # Try to locate tool using the code snippet
12063      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12064$as_echo_n "checking for fgrep... " >&6; }
12065if ${ac_cv_path_FGREP+:} false; then :
12066  $as_echo_n "(cached) " >&6
12067else
12068  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12069   then ac_cv_path_FGREP="$GREP -F"
12070   else
12071     if test -z "$FGREP"; then
12072  ac_path_FGREP_found=false
12073  # Loop through the user's path and test for each of PROGNAME-LIST
12074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12075for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12076do
12077  IFS=$as_save_IFS
12078  test -z "$as_dir" && as_dir=.
12079    for ac_prog in fgrep; do
12080    for ac_exec_ext in '' $ac_executable_extensions; do
12081      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12082      as_fn_executable_p "$ac_path_FGREP" || continue
12083# Check for GNU ac_path_FGREP and select it if it is found.
12084  # Check for GNU $ac_path_FGREP
12085case `"$ac_path_FGREP" --version 2>&1` in
12086*GNU*)
12087  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12088*)
12089  ac_count=0
12090  $as_echo_n 0123456789 >"conftest.in"
12091  while :
12092  do
12093    cat "conftest.in" "conftest.in" >"conftest.tmp"
12094    mv "conftest.tmp" "conftest.in"
12095    cp "conftest.in" "conftest.nl"
12096    $as_echo 'FGREP' >> "conftest.nl"
12097    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12098    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12099    as_fn_arith $ac_count + 1 && ac_count=$as_val
12100    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12101      # Best one so far, save it but keep looking for a better one
12102      ac_cv_path_FGREP="$ac_path_FGREP"
12103      ac_path_FGREP_max=$ac_count
12104    fi
12105    # 10*(2^10) chars as input seems more than enough
12106    test $ac_count -gt 10 && break
12107  done
12108  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12109esac
12110
12111      $ac_path_FGREP_found && break 3
12112    done
12113  done
12114  done
12115IFS=$as_save_IFS
12116  if test -z "$ac_cv_path_FGREP"; then
12117    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12118  fi
12119else
12120  ac_cv_path_FGREP=$FGREP
12121fi
12122
12123   fi
12124fi
12125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12126$as_echo "$ac_cv_path_FGREP" >&6; }
12127 FGREP="$ac_cv_path_FGREP"
12128
12129
12130    else
12131      # If it succeeded, then it was overridden by the user. We will use it
12132      # for the tool.
12133
12134      # First remove it from the list of overridden variables, so we can test
12135      # for unknown variables in the end.
12136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12137
12138      # Check if the provided tool contains a complete path.
12139      tool_specified="$FGREP"
12140      tool_basename="${tool_specified##*/}"
12141      if test "x$tool_basename" = "x$tool_specified"; then
12142        # A command without a complete path is provided, search $PATH.
12143        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12144$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12145        # Extract the first word of "$tool_basename", so it can be a program name with args.
12146set dummy $tool_basename; ac_word=$2
12147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12148$as_echo_n "checking for $ac_word... " >&6; }
12149if ${ac_cv_path_FGREP+:} false; then :
12150  $as_echo_n "(cached) " >&6
12151else
12152  case $FGREP in
12153  [\\/]* | ?:[\\/]*)
12154  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12155  ;;
12156  *)
12157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12158for as_dir in $PATH
12159do
12160  IFS=$as_save_IFS
12161  test -z "$as_dir" && as_dir=.
12162    for ac_exec_ext in '' $ac_executable_extensions; do
12163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12164    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12166    break 2
12167  fi
12168done
12169  done
12170IFS=$as_save_IFS
12171
12172  ;;
12173esac
12174fi
12175FGREP=$ac_cv_path_FGREP
12176if test -n "$FGREP"; then
12177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12178$as_echo "$FGREP" >&6; }
12179else
12180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12181$as_echo "no" >&6; }
12182fi
12183
12184
12185        if test "x$FGREP" = x; then
12186          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12187        fi
12188      else
12189        # Otherwise we believe it is a complete path. Use it as it is.
12190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12191$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12193$as_echo_n "checking for FGREP... " >&6; }
12194        if test ! -x "$tool_specified"; then
12195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12196$as_echo "not found" >&6; }
12197          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12198        fi
12199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12200$as_echo "$tool_specified" >&6; }
12201      fi
12202    fi
12203  fi
12204
12205
12206  if test "x$FGREP" = x; then
12207    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12208  fi
12209
12210
12211
12212
12213  # Publish this variable in the help.
12214
12215
12216  if test "x$SED" = x; then
12217    # The variable is not set by user, try to locate tool using the code snippet
12218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12219$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12220if ${ac_cv_path_SED+:} false; then :
12221  $as_echo_n "(cached) " >&6
12222else
12223            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12224     for ac_i in 1 2 3 4 5 6 7; do
12225       ac_script="$ac_script$as_nl$ac_script"
12226     done
12227     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12228     { ac_script=; unset ac_script;}
12229     if test -z "$SED"; then
12230  ac_path_SED_found=false
12231  # Loop through the user's path and test for each of PROGNAME-LIST
12232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12233for as_dir in $PATH
12234do
12235  IFS=$as_save_IFS
12236  test -z "$as_dir" && as_dir=.
12237    for ac_prog in sed gsed; do
12238    for ac_exec_ext in '' $ac_executable_extensions; do
12239      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12240      as_fn_executable_p "$ac_path_SED" || continue
12241# Check for GNU ac_path_SED and select it if it is found.
12242  # Check for GNU $ac_path_SED
12243case `"$ac_path_SED" --version 2>&1` in
12244*GNU*)
12245  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12246*)
12247  ac_count=0
12248  $as_echo_n 0123456789 >"conftest.in"
12249  while :
12250  do
12251    cat "conftest.in" "conftest.in" >"conftest.tmp"
12252    mv "conftest.tmp" "conftest.in"
12253    cp "conftest.in" "conftest.nl"
12254    $as_echo '' >> "conftest.nl"
12255    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12256    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12257    as_fn_arith $ac_count + 1 && ac_count=$as_val
12258    if test $ac_count -gt ${ac_path_SED_max-0}; then
12259      # Best one so far, save it but keep looking for a better one
12260      ac_cv_path_SED="$ac_path_SED"
12261      ac_path_SED_max=$ac_count
12262    fi
12263    # 10*(2^10) chars as input seems more than enough
12264    test $ac_count -gt 10 && break
12265  done
12266  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12267esac
12268
12269      $ac_path_SED_found && break 3
12270    done
12271  done
12272  done
12273IFS=$as_save_IFS
12274  if test -z "$ac_cv_path_SED"; then
12275    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12276  fi
12277else
12278  ac_cv_path_SED=$SED
12279fi
12280
12281fi
12282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12283$as_echo "$ac_cv_path_SED" >&6; }
12284 SED="$ac_cv_path_SED"
12285  rm -f conftest.sed
12286
12287  else
12288    # The variable is set, but is it from the command line or the environment?
12289
12290    # Try to remove the string !SED! from our list.
12291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12293      # If it failed, the variable was not from the command line. Ignore it,
12294      # but warn the user (except for BASH, which is always set by the calling BASH).
12295      if test "xSED" != xBASH; then
12296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12297$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12298      fi
12299      # Try to locate tool using the code snippet
12300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12301$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12302if ${ac_cv_path_SED+:} false; then :
12303  $as_echo_n "(cached) " >&6
12304else
12305            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12306     for ac_i in 1 2 3 4 5 6 7; do
12307       ac_script="$ac_script$as_nl$ac_script"
12308     done
12309     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12310     { ac_script=; unset ac_script;}
12311     if test -z "$SED"; then
12312  ac_path_SED_found=false
12313  # Loop through the user's path and test for each of PROGNAME-LIST
12314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12315for as_dir in $PATH
12316do
12317  IFS=$as_save_IFS
12318  test -z "$as_dir" && as_dir=.
12319    for ac_prog in sed gsed; do
12320    for ac_exec_ext in '' $ac_executable_extensions; do
12321      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12322      as_fn_executable_p "$ac_path_SED" || continue
12323# Check for GNU ac_path_SED and select it if it is found.
12324  # Check for GNU $ac_path_SED
12325case `"$ac_path_SED" --version 2>&1` in
12326*GNU*)
12327  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12328*)
12329  ac_count=0
12330  $as_echo_n 0123456789 >"conftest.in"
12331  while :
12332  do
12333    cat "conftest.in" "conftest.in" >"conftest.tmp"
12334    mv "conftest.tmp" "conftest.in"
12335    cp "conftest.in" "conftest.nl"
12336    $as_echo '' >> "conftest.nl"
12337    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12338    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12339    as_fn_arith $ac_count + 1 && ac_count=$as_val
12340    if test $ac_count -gt ${ac_path_SED_max-0}; then
12341      # Best one so far, save it but keep looking for a better one
12342      ac_cv_path_SED="$ac_path_SED"
12343      ac_path_SED_max=$ac_count
12344    fi
12345    # 10*(2^10) chars as input seems more than enough
12346    test $ac_count -gt 10 && break
12347  done
12348  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12349esac
12350
12351      $ac_path_SED_found && break 3
12352    done
12353  done
12354  done
12355IFS=$as_save_IFS
12356  if test -z "$ac_cv_path_SED"; then
12357    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12358  fi
12359else
12360  ac_cv_path_SED=$SED
12361fi
12362
12363fi
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12365$as_echo "$ac_cv_path_SED" >&6; }
12366 SED="$ac_cv_path_SED"
12367  rm -f conftest.sed
12368
12369    else
12370      # If it succeeded, then it was overridden by the user. We will use it
12371      # for the tool.
12372
12373      # First remove it from the list of overridden variables, so we can test
12374      # for unknown variables in the end.
12375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12376
12377      # Check if the provided tool contains a complete path.
12378      tool_specified="$SED"
12379      tool_basename="${tool_specified##*/}"
12380      if test "x$tool_basename" = "x$tool_specified"; then
12381        # A command without a complete path is provided, search $PATH.
12382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12383$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12384        # Extract the first word of "$tool_basename", so it can be a program name with args.
12385set dummy $tool_basename; ac_word=$2
12386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12387$as_echo_n "checking for $ac_word... " >&6; }
12388if ${ac_cv_path_SED+:} false; then :
12389  $as_echo_n "(cached) " >&6
12390else
12391  case $SED in
12392  [\\/]* | ?:[\\/]*)
12393  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12394  ;;
12395  *)
12396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12397for as_dir in $PATH
12398do
12399  IFS=$as_save_IFS
12400  test -z "$as_dir" && as_dir=.
12401    for ac_exec_ext in '' $ac_executable_extensions; do
12402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12403    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12405    break 2
12406  fi
12407done
12408  done
12409IFS=$as_save_IFS
12410
12411  ;;
12412esac
12413fi
12414SED=$ac_cv_path_SED
12415if test -n "$SED"; then
12416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12417$as_echo "$SED" >&6; }
12418else
12419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12420$as_echo "no" >&6; }
12421fi
12422
12423
12424        if test "x$SED" = x; then
12425          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12426        fi
12427      else
12428        # Otherwise we believe it is a complete path. Use it as it is.
12429        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12430$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12432$as_echo_n "checking for SED... " >&6; }
12433        if test ! -x "$tool_specified"; then
12434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12435$as_echo "not found" >&6; }
12436          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12437        fi
12438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12439$as_echo "$tool_specified" >&6; }
12440      fi
12441    fi
12442  fi
12443
12444
12445  if test "x$SED" = x; then
12446    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12447  fi
12448
12449
12450
12451  # Always force rm.
12452  RM="$RM -f"
12453
12454  # pwd behaves differently on various platforms and some don't support the -L flag.
12455  # Always use the bash builtin pwd to get uniform behavior.
12456  THEPWDCMD=pwd
12457
12458  # These are not required on all platforms
12459
12460
12461  # Publish this variable in the help.
12462
12463
12464  if test "x$CYGPATH" = x; then
12465    # The variable is not set by user, try to locate tool using the code snippet
12466    for ac_prog in cygpath
12467do
12468  # Extract the first word of "$ac_prog", so it can be a program name with args.
12469set dummy $ac_prog; ac_word=$2
12470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12471$as_echo_n "checking for $ac_word... " >&6; }
12472if ${ac_cv_path_CYGPATH+:} false; then :
12473  $as_echo_n "(cached) " >&6
12474else
12475  case $CYGPATH in
12476  [\\/]* | ?:[\\/]*)
12477  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12478  ;;
12479  *)
12480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12481for as_dir in $PATH
12482do
12483  IFS=$as_save_IFS
12484  test -z "$as_dir" && as_dir=.
12485    for ac_exec_ext in '' $ac_executable_extensions; do
12486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12487    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12489    break 2
12490  fi
12491done
12492  done
12493IFS=$as_save_IFS
12494
12495  ;;
12496esac
12497fi
12498CYGPATH=$ac_cv_path_CYGPATH
12499if test -n "$CYGPATH"; then
12500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12501$as_echo "$CYGPATH" >&6; }
12502else
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12504$as_echo "no" >&6; }
12505fi
12506
12507
12508  test -n "$CYGPATH" && break
12509done
12510
12511  else
12512    # The variable is set, but is it from the command line or the environment?
12513
12514    # Try to remove the string !CYGPATH! from our list.
12515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12517      # If it failed, the variable was not from the command line. Ignore it,
12518      # but warn the user (except for BASH, which is always set by the calling BASH).
12519      if test "xCYGPATH" != xBASH; then
12520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12521$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12522      fi
12523      # Try to locate tool using the code snippet
12524      for ac_prog in cygpath
12525do
12526  # Extract the first word of "$ac_prog", so it can be a program name with args.
12527set dummy $ac_prog; ac_word=$2
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12529$as_echo_n "checking for $ac_word... " >&6; }
12530if ${ac_cv_path_CYGPATH+:} false; then :
12531  $as_echo_n "(cached) " >&6
12532else
12533  case $CYGPATH in
12534  [\\/]* | ?:[\\/]*)
12535  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12536  ;;
12537  *)
12538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12539for as_dir in $PATH
12540do
12541  IFS=$as_save_IFS
12542  test -z "$as_dir" && as_dir=.
12543    for ac_exec_ext in '' $ac_executable_extensions; do
12544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12545    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12547    break 2
12548  fi
12549done
12550  done
12551IFS=$as_save_IFS
12552
12553  ;;
12554esac
12555fi
12556CYGPATH=$ac_cv_path_CYGPATH
12557if test -n "$CYGPATH"; then
12558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12559$as_echo "$CYGPATH" >&6; }
12560else
12561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12562$as_echo "no" >&6; }
12563fi
12564
12565
12566  test -n "$CYGPATH" && break
12567done
12568
12569    else
12570      # If it succeeded, then it was overridden by the user. We will use it
12571      # for the tool.
12572
12573      # First remove it from the list of overridden variables, so we can test
12574      # for unknown variables in the end.
12575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12576
12577      # Check if the provided tool contains a complete path.
12578      tool_specified="$CYGPATH"
12579      tool_basename="${tool_specified##*/}"
12580      if test "x$tool_basename" = "x$tool_specified"; then
12581        # A command without a complete path is provided, search $PATH.
12582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12583$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12584        # Extract the first word of "$tool_basename", so it can be a program name with args.
12585set dummy $tool_basename; ac_word=$2
12586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12587$as_echo_n "checking for $ac_word... " >&6; }
12588if ${ac_cv_path_CYGPATH+:} false; then :
12589  $as_echo_n "(cached) " >&6
12590else
12591  case $CYGPATH in
12592  [\\/]* | ?:[\\/]*)
12593  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12594  ;;
12595  *)
12596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12597for as_dir in $PATH
12598do
12599  IFS=$as_save_IFS
12600  test -z "$as_dir" && as_dir=.
12601    for ac_exec_ext in '' $ac_executable_extensions; do
12602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12603    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12605    break 2
12606  fi
12607done
12608  done
12609IFS=$as_save_IFS
12610
12611  ;;
12612esac
12613fi
12614CYGPATH=$ac_cv_path_CYGPATH
12615if test -n "$CYGPATH"; then
12616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12617$as_echo "$CYGPATH" >&6; }
12618else
12619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12620$as_echo "no" >&6; }
12621fi
12622
12623
12624        if test "x$CYGPATH" = x; then
12625          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12626        fi
12627      else
12628        # Otherwise we believe it is a complete path. Use it as it is.
12629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12630$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12632$as_echo_n "checking for CYGPATH... " >&6; }
12633        if test ! -x "$tool_specified"; then
12634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12635$as_echo "not found" >&6; }
12636          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12637        fi
12638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12639$as_echo "$tool_specified" >&6; }
12640      fi
12641    fi
12642  fi
12643
12644
12645
12646
12647  # Publish this variable in the help.
12648
12649
12650  if test "x$READLINK" = x; then
12651    # The variable is not set by user, try to locate tool using the code snippet
12652    for ac_prog in greadlink readlink
12653do
12654  # Extract the first word of "$ac_prog", so it can be a program name with args.
12655set dummy $ac_prog; ac_word=$2
12656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12657$as_echo_n "checking for $ac_word... " >&6; }
12658if ${ac_cv_path_READLINK+:} false; then :
12659  $as_echo_n "(cached) " >&6
12660else
12661  case $READLINK in
12662  [\\/]* | ?:[\\/]*)
12663  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12664  ;;
12665  *)
12666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12667for as_dir in $PATH
12668do
12669  IFS=$as_save_IFS
12670  test -z "$as_dir" && as_dir=.
12671    for ac_exec_ext in '' $ac_executable_extensions; do
12672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12673    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12675    break 2
12676  fi
12677done
12678  done
12679IFS=$as_save_IFS
12680
12681  ;;
12682esac
12683fi
12684READLINK=$ac_cv_path_READLINK
12685if test -n "$READLINK"; then
12686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12687$as_echo "$READLINK" >&6; }
12688else
12689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12690$as_echo "no" >&6; }
12691fi
12692
12693
12694  test -n "$READLINK" && break
12695done
12696
12697  else
12698    # The variable is set, but is it from the command line or the environment?
12699
12700    # Try to remove the string !READLINK! from our list.
12701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12703      # If it failed, the variable was not from the command line. Ignore it,
12704      # but warn the user (except for BASH, which is always set by the calling BASH).
12705      if test "xREADLINK" != xBASH; then
12706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12707$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12708      fi
12709      # Try to locate tool using the code snippet
12710      for ac_prog in greadlink readlink
12711do
12712  # Extract the first word of "$ac_prog", so it can be a program name with args.
12713set dummy $ac_prog; ac_word=$2
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12715$as_echo_n "checking for $ac_word... " >&6; }
12716if ${ac_cv_path_READLINK+:} false; then :
12717  $as_echo_n "(cached) " >&6
12718else
12719  case $READLINK in
12720  [\\/]* | ?:[\\/]*)
12721  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12722  ;;
12723  *)
12724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12725for as_dir in $PATH
12726do
12727  IFS=$as_save_IFS
12728  test -z "$as_dir" && as_dir=.
12729    for ac_exec_ext in '' $ac_executable_extensions; do
12730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12731    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12733    break 2
12734  fi
12735done
12736  done
12737IFS=$as_save_IFS
12738
12739  ;;
12740esac
12741fi
12742READLINK=$ac_cv_path_READLINK
12743if test -n "$READLINK"; then
12744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12745$as_echo "$READLINK" >&6; }
12746else
12747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12748$as_echo "no" >&6; }
12749fi
12750
12751
12752  test -n "$READLINK" && break
12753done
12754
12755    else
12756      # If it succeeded, then it was overridden by the user. We will use it
12757      # for the tool.
12758
12759      # First remove it from the list of overridden variables, so we can test
12760      # for unknown variables in the end.
12761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12762
12763      # Check if the provided tool contains a complete path.
12764      tool_specified="$READLINK"
12765      tool_basename="${tool_specified##*/}"
12766      if test "x$tool_basename" = "x$tool_specified"; then
12767        # A command without a complete path is provided, search $PATH.
12768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12769$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12770        # Extract the first word of "$tool_basename", so it can be a program name with args.
12771set dummy $tool_basename; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_READLINK+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $READLINK in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800READLINK=$ac_cv_path_READLINK
12801if test -n "$READLINK"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12803$as_echo "$READLINK" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810        if test "x$READLINK" = x; then
12811          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12812        fi
12813      else
12814        # Otherwise we believe it is a complete path. Use it as it is.
12815        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12816$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12817        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12818$as_echo_n "checking for READLINK... " >&6; }
12819        if test ! -x "$tool_specified"; then
12820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12821$as_echo "not found" >&6; }
12822          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12823        fi
12824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12825$as_echo "$tool_specified" >&6; }
12826      fi
12827    fi
12828  fi
12829
12830
12831
12832
12833  # Publish this variable in the help.
12834
12835
12836  if test "x$DF" = x; then
12837    # The variable is not set by user, try to locate tool using the code snippet
12838    for ac_prog in df
12839do
12840  # Extract the first word of "$ac_prog", so it can be a program name with args.
12841set dummy $ac_prog; ac_word=$2
12842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12843$as_echo_n "checking for $ac_word... " >&6; }
12844if ${ac_cv_path_DF+:} false; then :
12845  $as_echo_n "(cached) " >&6
12846else
12847  case $DF in
12848  [\\/]* | ?:[\\/]*)
12849  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12850  ;;
12851  *)
12852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12853for as_dir in $PATH
12854do
12855  IFS=$as_save_IFS
12856  test -z "$as_dir" && as_dir=.
12857    for ac_exec_ext in '' $ac_executable_extensions; do
12858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12859    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12861    break 2
12862  fi
12863done
12864  done
12865IFS=$as_save_IFS
12866
12867  ;;
12868esac
12869fi
12870DF=$ac_cv_path_DF
12871if test -n "$DF"; then
12872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12873$as_echo "$DF" >&6; }
12874else
12875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12876$as_echo "no" >&6; }
12877fi
12878
12879
12880  test -n "$DF" && break
12881done
12882
12883  else
12884    # The variable is set, but is it from the command line or the environment?
12885
12886    # Try to remove the string !DF! from our list.
12887    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12888    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12889      # If it failed, the variable was not from the command line. Ignore it,
12890      # but warn the user (except for BASH, which is always set by the calling BASH).
12891      if test "xDF" != xBASH; then
12892        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12893$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12894      fi
12895      # Try to locate tool using the code snippet
12896      for ac_prog in df
12897do
12898  # Extract the first word of "$ac_prog", so it can be a program name with args.
12899set dummy $ac_prog; ac_word=$2
12900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12901$as_echo_n "checking for $ac_word... " >&6; }
12902if ${ac_cv_path_DF+:} false; then :
12903  $as_echo_n "(cached) " >&6
12904else
12905  case $DF in
12906  [\\/]* | ?:[\\/]*)
12907  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12908  ;;
12909  *)
12910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12911for as_dir in $PATH
12912do
12913  IFS=$as_save_IFS
12914  test -z "$as_dir" && as_dir=.
12915    for ac_exec_ext in '' $ac_executable_extensions; do
12916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12917    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12919    break 2
12920  fi
12921done
12922  done
12923IFS=$as_save_IFS
12924
12925  ;;
12926esac
12927fi
12928DF=$ac_cv_path_DF
12929if test -n "$DF"; then
12930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12931$as_echo "$DF" >&6; }
12932else
12933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12934$as_echo "no" >&6; }
12935fi
12936
12937
12938  test -n "$DF" && break
12939done
12940
12941    else
12942      # If it succeeded, then it was overridden by the user. We will use it
12943      # for the tool.
12944
12945      # First remove it from the list of overridden variables, so we can test
12946      # for unknown variables in the end.
12947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12948
12949      # Check if the provided tool contains a complete path.
12950      tool_specified="$DF"
12951      tool_basename="${tool_specified##*/}"
12952      if test "x$tool_basename" = "x$tool_specified"; then
12953        # A command without a complete path is provided, search $PATH.
12954        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12955$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12956        # Extract the first word of "$tool_basename", so it can be a program name with args.
12957set dummy $tool_basename; ac_word=$2
12958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12959$as_echo_n "checking for $ac_word... " >&6; }
12960if ${ac_cv_path_DF+:} false; then :
12961  $as_echo_n "(cached) " >&6
12962else
12963  case $DF in
12964  [\\/]* | ?:[\\/]*)
12965  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12966  ;;
12967  *)
12968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12969for as_dir in $PATH
12970do
12971  IFS=$as_save_IFS
12972  test -z "$as_dir" && as_dir=.
12973    for ac_exec_ext in '' $ac_executable_extensions; do
12974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12975    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12977    break 2
12978  fi
12979done
12980  done
12981IFS=$as_save_IFS
12982
12983  ;;
12984esac
12985fi
12986DF=$ac_cv_path_DF
12987if test -n "$DF"; then
12988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12989$as_echo "$DF" >&6; }
12990else
12991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12992$as_echo "no" >&6; }
12993fi
12994
12995
12996        if test "x$DF" = x; then
12997          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12998        fi
12999      else
13000        # Otherwise we believe it is a complete path. Use it as it is.
13001        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13002$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13004$as_echo_n "checking for DF... " >&6; }
13005        if test ! -x "$tool_specified"; then
13006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13007$as_echo "not found" >&6; }
13008          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13009        fi
13010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13011$as_echo "$tool_specified" >&6; }
13012      fi
13013    fi
13014  fi
13015
13016
13017
13018
13019  # Publish this variable in the help.
13020
13021
13022  if test "x$SETFILE" = x; then
13023    # The variable is not set by user, try to locate tool using the code snippet
13024    for ac_prog in SetFile
13025do
13026  # Extract the first word of "$ac_prog", so it can be a program name with args.
13027set dummy $ac_prog; ac_word=$2
13028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13029$as_echo_n "checking for $ac_word... " >&6; }
13030if ${ac_cv_path_SETFILE+:} false; then :
13031  $as_echo_n "(cached) " >&6
13032else
13033  case $SETFILE in
13034  [\\/]* | ?:[\\/]*)
13035  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13036  ;;
13037  *)
13038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13039for as_dir in $PATH
13040do
13041  IFS=$as_save_IFS
13042  test -z "$as_dir" && as_dir=.
13043    for ac_exec_ext in '' $ac_executable_extensions; do
13044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13045    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13047    break 2
13048  fi
13049done
13050  done
13051IFS=$as_save_IFS
13052
13053  ;;
13054esac
13055fi
13056SETFILE=$ac_cv_path_SETFILE
13057if test -n "$SETFILE"; then
13058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13059$as_echo "$SETFILE" >&6; }
13060else
13061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13062$as_echo "no" >&6; }
13063fi
13064
13065
13066  test -n "$SETFILE" && break
13067done
13068
13069  else
13070    # The variable is set, but is it from the command line or the environment?
13071
13072    # Try to remove the string !SETFILE! from our list.
13073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13075      # If it failed, the variable was not from the command line. Ignore it,
13076      # but warn the user (except for BASH, which is always set by the calling BASH).
13077      if test "xSETFILE" != xBASH; then
13078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13079$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13080      fi
13081      # Try to locate tool using the code snippet
13082      for ac_prog in SetFile
13083do
13084  # Extract the first word of "$ac_prog", so it can be a program name with args.
13085set dummy $ac_prog; ac_word=$2
13086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13087$as_echo_n "checking for $ac_word... " >&6; }
13088if ${ac_cv_path_SETFILE+:} false; then :
13089  $as_echo_n "(cached) " >&6
13090else
13091  case $SETFILE in
13092  [\\/]* | ?:[\\/]*)
13093  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13094  ;;
13095  *)
13096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13097for as_dir in $PATH
13098do
13099  IFS=$as_save_IFS
13100  test -z "$as_dir" && as_dir=.
13101    for ac_exec_ext in '' $ac_executable_extensions; do
13102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13103    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13105    break 2
13106  fi
13107done
13108  done
13109IFS=$as_save_IFS
13110
13111  ;;
13112esac
13113fi
13114SETFILE=$ac_cv_path_SETFILE
13115if test -n "$SETFILE"; then
13116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13117$as_echo "$SETFILE" >&6; }
13118else
13119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13120$as_echo "no" >&6; }
13121fi
13122
13123
13124  test -n "$SETFILE" && break
13125done
13126
13127    else
13128      # If it succeeded, then it was overridden by the user. We will use it
13129      # for the tool.
13130
13131      # First remove it from the list of overridden variables, so we can test
13132      # for unknown variables in the end.
13133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13134
13135      # Check if the provided tool contains a complete path.
13136      tool_specified="$SETFILE"
13137      tool_basename="${tool_specified##*/}"
13138      if test "x$tool_basename" = "x$tool_specified"; then
13139        # A command without a complete path is provided, search $PATH.
13140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13141$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13142        # Extract the first word of "$tool_basename", so it can be a program name with args.
13143set dummy $tool_basename; ac_word=$2
13144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13145$as_echo_n "checking for $ac_word... " >&6; }
13146if ${ac_cv_path_SETFILE+:} false; then :
13147  $as_echo_n "(cached) " >&6
13148else
13149  case $SETFILE in
13150  [\\/]* | ?:[\\/]*)
13151  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13152  ;;
13153  *)
13154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13155for as_dir in $PATH
13156do
13157  IFS=$as_save_IFS
13158  test -z "$as_dir" && as_dir=.
13159    for ac_exec_ext in '' $ac_executable_extensions; do
13160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13161    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13163    break 2
13164  fi
13165done
13166  done
13167IFS=$as_save_IFS
13168
13169  ;;
13170esac
13171fi
13172SETFILE=$ac_cv_path_SETFILE
13173if test -n "$SETFILE"; then
13174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13175$as_echo "$SETFILE" >&6; }
13176else
13177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13178$as_echo "no" >&6; }
13179fi
13180
13181
13182        if test "x$SETFILE" = x; then
13183          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13184        fi
13185      else
13186        # Otherwise we believe it is a complete path. Use it as it is.
13187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13188$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13190$as_echo_n "checking for SETFILE... " >&6; }
13191        if test ! -x "$tool_specified"; then
13192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13193$as_echo "not found" >&6; }
13194          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13195        fi
13196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13197$as_echo "$tool_specified" >&6; }
13198      fi
13199    fi
13200  fi
13201
13202
13203
13204
13205  # Publish this variable in the help.
13206
13207
13208  if test "x$CPIO" = x; then
13209    # The variable is not set by user, try to locate tool using the code snippet
13210    for ac_prog in cpio bsdcpio
13211do
13212  # Extract the first word of "$ac_prog", so it can be a program name with args.
13213set dummy $ac_prog; ac_word=$2
13214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13215$as_echo_n "checking for $ac_word... " >&6; }
13216if ${ac_cv_path_CPIO+:} false; then :
13217  $as_echo_n "(cached) " >&6
13218else
13219  case $CPIO in
13220  [\\/]* | ?:[\\/]*)
13221  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13222  ;;
13223  *)
13224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13225for as_dir in $PATH
13226do
13227  IFS=$as_save_IFS
13228  test -z "$as_dir" && as_dir=.
13229    for ac_exec_ext in '' $ac_executable_extensions; do
13230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13231    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13233    break 2
13234  fi
13235done
13236  done
13237IFS=$as_save_IFS
13238
13239  ;;
13240esac
13241fi
13242CPIO=$ac_cv_path_CPIO
13243if test -n "$CPIO"; then
13244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13245$as_echo "$CPIO" >&6; }
13246else
13247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13248$as_echo "no" >&6; }
13249fi
13250
13251
13252  test -n "$CPIO" && break
13253done
13254
13255  else
13256    # The variable is set, but is it from the command line or the environment?
13257
13258    # Try to remove the string !CPIO! from our list.
13259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13261      # If it failed, the variable was not from the command line. Ignore it,
13262      # but warn the user (except for BASH, which is always set by the calling BASH).
13263      if test "xCPIO" != xBASH; then
13264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13265$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13266      fi
13267      # Try to locate tool using the code snippet
13268      for ac_prog in cpio bsdcpio
13269do
13270  # Extract the first word of "$ac_prog", so it can be a program name with args.
13271set dummy $ac_prog; ac_word=$2
13272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13273$as_echo_n "checking for $ac_word... " >&6; }
13274if ${ac_cv_path_CPIO+:} false; then :
13275  $as_echo_n "(cached) " >&6
13276else
13277  case $CPIO in
13278  [\\/]* | ?:[\\/]*)
13279  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13280  ;;
13281  *)
13282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13283for as_dir in $PATH
13284do
13285  IFS=$as_save_IFS
13286  test -z "$as_dir" && as_dir=.
13287    for ac_exec_ext in '' $ac_executable_extensions; do
13288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13289    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13291    break 2
13292  fi
13293done
13294  done
13295IFS=$as_save_IFS
13296
13297  ;;
13298esac
13299fi
13300CPIO=$ac_cv_path_CPIO
13301if test -n "$CPIO"; then
13302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13303$as_echo "$CPIO" >&6; }
13304else
13305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13306$as_echo "no" >&6; }
13307fi
13308
13309
13310  test -n "$CPIO" && break
13311done
13312
13313    else
13314      # If it succeeded, then it was overridden by the user. We will use it
13315      # for the tool.
13316
13317      # First remove it from the list of overridden variables, so we can test
13318      # for unknown variables in the end.
13319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13320
13321      # Check if the provided tool contains a complete path.
13322      tool_specified="$CPIO"
13323      tool_basename="${tool_specified##*/}"
13324      if test "x$tool_basename" = "x$tool_specified"; then
13325        # A command without a complete path is provided, search $PATH.
13326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13327$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13328        # Extract the first word of "$tool_basename", so it can be a program name with args.
13329set dummy $tool_basename; ac_word=$2
13330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13331$as_echo_n "checking for $ac_word... " >&6; }
13332if ${ac_cv_path_CPIO+:} false; then :
13333  $as_echo_n "(cached) " >&6
13334else
13335  case $CPIO in
13336  [\\/]* | ?:[\\/]*)
13337  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13338  ;;
13339  *)
13340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13341for as_dir in $PATH
13342do
13343  IFS=$as_save_IFS
13344  test -z "$as_dir" && as_dir=.
13345    for ac_exec_ext in '' $ac_executable_extensions; do
13346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13347    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13349    break 2
13350  fi
13351done
13352  done
13353IFS=$as_save_IFS
13354
13355  ;;
13356esac
13357fi
13358CPIO=$ac_cv_path_CPIO
13359if test -n "$CPIO"; then
13360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13361$as_echo "$CPIO" >&6; }
13362else
13363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13364$as_echo "no" >&6; }
13365fi
13366
13367
13368        if test "x$CPIO" = x; then
13369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13370        fi
13371      else
13372        # Otherwise we believe it is a complete path. Use it as it is.
13373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13374$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13376$as_echo_n "checking for CPIO... " >&6; }
13377        if test ! -x "$tool_specified"; then
13378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13379$as_echo "not found" >&6; }
13380          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13381        fi
13382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13383$as_echo "$tool_specified" >&6; }
13384      fi
13385    fi
13386  fi
13387
13388
13389
13390
13391# Now we can determine OpenJDK build and target platforms. This is required to
13392# have early on.
13393# Make sure we can run config.sub.
13394$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13395  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13396
13397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13398$as_echo_n "checking build system type... " >&6; }
13399if ${ac_cv_build+:} false; then :
13400  $as_echo_n "(cached) " >&6
13401else
13402  ac_build_alias=$build_alias
13403test "x$ac_build_alias" = x &&
13404  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13405test "x$ac_build_alias" = x &&
13406  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13407ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13408  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13409
13410fi
13411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13412$as_echo "$ac_cv_build" >&6; }
13413case $ac_cv_build in
13414*-*-*) ;;
13415*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13416esac
13417build=$ac_cv_build
13418ac_save_IFS=$IFS; IFS='-'
13419set x $ac_cv_build
13420shift
13421build_cpu=$1
13422build_vendor=$2
13423shift; shift
13424# Remember, the first character of IFS is used to create $*,
13425# except with old shells:
13426build_os=$*
13427IFS=$ac_save_IFS
13428case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13429
13430
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13432$as_echo_n "checking host system type... " >&6; }
13433if ${ac_cv_host+:} false; then :
13434  $as_echo_n "(cached) " >&6
13435else
13436  if test "x$host_alias" = x; then
13437  ac_cv_host=$ac_cv_build
13438else
13439  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13440    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13441fi
13442
13443fi
13444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13445$as_echo "$ac_cv_host" >&6; }
13446case $ac_cv_host in
13447*-*-*) ;;
13448*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13449esac
13450host=$ac_cv_host
13451ac_save_IFS=$IFS; IFS='-'
13452set x $ac_cv_host
13453shift
13454host_cpu=$1
13455host_vendor=$2
13456shift; shift
13457# Remember, the first character of IFS is used to create $*,
13458# except with old shells:
13459host_os=$*
13460IFS=$ac_save_IFS
13461case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13462
13463
13464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13465$as_echo_n "checking target system type... " >&6; }
13466if ${ac_cv_target+:} false; then :
13467  $as_echo_n "(cached) " >&6
13468else
13469  if test "x$target_alias" = x; then
13470  ac_cv_target=$ac_cv_host
13471else
13472  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13473    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13474fi
13475
13476fi
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13478$as_echo "$ac_cv_target" >&6; }
13479case $ac_cv_target in
13480*-*-*) ;;
13481*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13482esac
13483target=$ac_cv_target
13484ac_save_IFS=$IFS; IFS='-'
13485set x $ac_cv_target
13486shift
13487target_cpu=$1
13488target_vendor=$2
13489shift; shift
13490# Remember, the first character of IFS is used to create $*,
13491# except with old shells:
13492target_os=$*
13493IFS=$ac_save_IFS
13494case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13495
13496
13497# The aliases save the names the user supplied, while $host etc.
13498# will get canonicalized.
13499test -n "$target_alias" &&
13500  test "$program_prefix$program_suffix$program_transform_name" = \
13501    NONENONEs,x,x, &&
13502  program_prefix=${target_alias}-
13503
13504  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13505  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13506  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13507  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13508  # to use the configure naming style.
13509
13510
13511
13512
13513
13514  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13515  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13516  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13517  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13518  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13519  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13520
13521
13522
13523  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13524
13525  case "$build_os" in
13526    *linux*)
13527      VAR_OS=linux
13528      VAR_OS_API=posix
13529      VAR_OS_ENV=linux
13530      ;;
13531    *solaris*)
13532      VAR_OS=solaris
13533      VAR_OS_API=posix
13534      VAR_OS_ENV=solaris
13535      ;;
13536    *darwin*)
13537      VAR_OS=macosx
13538      VAR_OS_API=posix
13539      VAR_OS_ENV=macosx
13540      ;;
13541    *bsd*)
13542      VAR_OS=bsd
13543      VAR_OS_API=posix
13544      VAR_OS_ENV=bsd
13545      ;;
13546    *cygwin*)
13547      VAR_OS=windows
13548      VAR_OS_API=winapi
13549      VAR_OS_ENV=windows.cygwin
13550      ;;
13551    *mingw*)
13552      VAR_OS=windows
13553      VAR_OS_API=winapi
13554      VAR_OS_ENV=windows.msys
13555      ;;
13556    *aix*)
13557      VAR_OS=aix
13558      VAR_OS_API=posix
13559      VAR_OS_ENV=aix
13560      ;;
13561    *)
13562      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13563      ;;
13564  esac
13565
13566
13567  # First argument is the cpu name from the trip/quad
13568  case "$build_cpu" in
13569    x86_64)
13570      VAR_CPU=x86_64
13571      VAR_CPU_ARCH=x86
13572      VAR_CPU_BITS=64
13573      VAR_CPU_ENDIAN=little
13574      ;;
13575    i?86)
13576      VAR_CPU=x86
13577      VAR_CPU_ARCH=x86
13578      VAR_CPU_BITS=32
13579      VAR_CPU_ENDIAN=little
13580      ;;
13581    arm*)
13582      VAR_CPU=arm
13583      VAR_CPU_ARCH=arm
13584      VAR_CPU_BITS=32
13585      VAR_CPU_ENDIAN=little
13586      ;;
13587    aarch64)
13588      VAR_CPU=aarch64
13589      VAR_CPU_ARCH=aarch64
13590      VAR_CPU_BITS=64
13591      VAR_CPU_ENDIAN=little
13592      ;;
13593    powerpc)
13594      VAR_CPU=ppc
13595      VAR_CPU_ARCH=ppc
13596      VAR_CPU_BITS=32
13597      VAR_CPU_ENDIAN=big
13598      ;;
13599    powerpc64)
13600      VAR_CPU=ppc64
13601      VAR_CPU_ARCH=ppc
13602      VAR_CPU_BITS=64
13603      VAR_CPU_ENDIAN=big
13604      ;;
13605    powerpc64le)
13606      VAR_CPU=ppc64
13607      VAR_CPU_ARCH=ppc
13608      VAR_CPU_BITS=64
13609      VAR_CPU_ENDIAN=little
13610      ;;
13611    s390)
13612      VAR_CPU=s390
13613      VAR_CPU_ARCH=s390
13614      VAR_CPU_BITS=32
13615      VAR_CPU_ENDIAN=big
13616      ;;
13617    s390x)
13618      VAR_CPU=s390x
13619      VAR_CPU_ARCH=s390
13620      VAR_CPU_BITS=64
13621      VAR_CPU_ENDIAN=big
13622      ;;
13623    sparc)
13624      VAR_CPU=sparc
13625      VAR_CPU_ARCH=sparc
13626      VAR_CPU_BITS=32
13627      VAR_CPU_ENDIAN=big
13628      ;;
13629    sparcv9|sparc64)
13630      VAR_CPU=sparcv9
13631      VAR_CPU_ARCH=sparc
13632      VAR_CPU_BITS=64
13633      VAR_CPU_ENDIAN=big
13634      ;;
13635    *)
13636      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13637      ;;
13638  esac
13639
13640  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13641  OPENJDK_BUILD_OS="$VAR_OS"
13642  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13643  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13644  OPENJDK_BUILD_CPU="$VAR_CPU"
13645  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13646  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13647  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13648
13649
13650
13651
13652
13653
13654
13655
13656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13657$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13659$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13660
13661  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13662
13663  case "$host_os" in
13664    *linux*)
13665      VAR_OS=linux
13666      VAR_OS_API=posix
13667      VAR_OS_ENV=linux
13668      ;;
13669    *solaris*)
13670      VAR_OS=solaris
13671      VAR_OS_API=posix
13672      VAR_OS_ENV=solaris
13673      ;;
13674    *darwin*)
13675      VAR_OS=macosx
13676      VAR_OS_API=posix
13677      VAR_OS_ENV=macosx
13678      ;;
13679    *bsd*)
13680      VAR_OS=bsd
13681      VAR_OS_API=posix
13682      VAR_OS_ENV=bsd
13683      ;;
13684    *cygwin*)
13685      VAR_OS=windows
13686      VAR_OS_API=winapi
13687      VAR_OS_ENV=windows.cygwin
13688      ;;
13689    *mingw*)
13690      VAR_OS=windows
13691      VAR_OS_API=winapi
13692      VAR_OS_ENV=windows.msys
13693      ;;
13694    *aix*)
13695      VAR_OS=aix
13696      VAR_OS_API=posix
13697      VAR_OS_ENV=aix
13698      ;;
13699    *)
13700      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13701      ;;
13702  esac
13703
13704
13705  # First argument is the cpu name from the trip/quad
13706  case "$host_cpu" in
13707    x86_64)
13708      VAR_CPU=x86_64
13709      VAR_CPU_ARCH=x86
13710      VAR_CPU_BITS=64
13711      VAR_CPU_ENDIAN=little
13712      ;;
13713    i?86)
13714      VAR_CPU=x86
13715      VAR_CPU_ARCH=x86
13716      VAR_CPU_BITS=32
13717      VAR_CPU_ENDIAN=little
13718      ;;
13719    arm*)
13720      VAR_CPU=arm
13721      VAR_CPU_ARCH=arm
13722      VAR_CPU_BITS=32
13723      VAR_CPU_ENDIAN=little
13724      ;;
13725    aarch64)
13726      VAR_CPU=aarch64
13727      VAR_CPU_ARCH=aarch64
13728      VAR_CPU_BITS=64
13729      VAR_CPU_ENDIAN=little
13730      ;;
13731    powerpc)
13732      VAR_CPU=ppc
13733      VAR_CPU_ARCH=ppc
13734      VAR_CPU_BITS=32
13735      VAR_CPU_ENDIAN=big
13736      ;;
13737    powerpc64)
13738      VAR_CPU=ppc64
13739      VAR_CPU_ARCH=ppc
13740      VAR_CPU_BITS=64
13741      VAR_CPU_ENDIAN=big
13742      ;;
13743    powerpc64le)
13744      VAR_CPU=ppc64
13745      VAR_CPU_ARCH=ppc
13746      VAR_CPU_BITS=64
13747      VAR_CPU_ENDIAN=little
13748      ;;
13749    s390)
13750      VAR_CPU=s390
13751      VAR_CPU_ARCH=s390
13752      VAR_CPU_BITS=32
13753      VAR_CPU_ENDIAN=big
13754      ;;
13755    s390x)
13756      VAR_CPU=s390x
13757      VAR_CPU_ARCH=s390
13758      VAR_CPU_BITS=64
13759      VAR_CPU_ENDIAN=big
13760      ;;
13761    sparc)
13762      VAR_CPU=sparc
13763      VAR_CPU_ARCH=sparc
13764      VAR_CPU_BITS=32
13765      VAR_CPU_ENDIAN=big
13766      ;;
13767    sparcv9|sparc64)
13768      VAR_CPU=sparcv9
13769      VAR_CPU_ARCH=sparc
13770      VAR_CPU_BITS=64
13771      VAR_CPU_ENDIAN=big
13772      ;;
13773    *)
13774      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13775      ;;
13776  esac
13777
13778  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13779  OPENJDK_TARGET_OS="$VAR_OS"
13780  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13781  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13782  OPENJDK_TARGET_CPU="$VAR_CPU"
13783  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13784  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13785  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13786
13787
13788
13789
13790
13791
13792
13793
13794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13795$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13797$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13798
13799
13800
13801# Check whether --with-target-bits was given.
13802if test "${with_target_bits+set}" = set; then :
13803  withval=$with_target_bits;
13804fi
13805
13806
13807  # We have three types of compiles:
13808  # native  == normal compilation, target system == build system
13809  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13810  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13811  #
13812  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13813    # We're doing a proper cross-compilation
13814    COMPILE_TYPE="cross"
13815  else
13816    COMPILE_TYPE="native"
13817  fi
13818
13819  if test "x$with_target_bits" != x; then
13820    if test "x$COMPILE_TYPE" = "xcross"; then
13821      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13822    fi
13823
13824    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13825      # A reduced build is requested
13826      COMPILE_TYPE="reduced"
13827      OPENJDK_TARGET_CPU_BITS=32
13828      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13829        OPENJDK_TARGET_CPU=x86
13830      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13831        OPENJDK_TARGET_CPU=sparc
13832      else
13833        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13834      fi
13835    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13836      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
13837    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13838      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13839$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13840    else
13841      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13842    fi
13843  fi
13844
13845
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13847$as_echo_n "checking compilation type... " >&6; }
13848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13849$as_echo "$COMPILE_TYPE" >&6; }
13850
13851
13852  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13853    REQUIRED_OS_NAME=SunOS
13854    REQUIRED_OS_VERSION=5.10
13855  fi
13856  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13857    REQUIRED_OS_NAME=Linux
13858    REQUIRED_OS_VERSION=2.6
13859  fi
13860  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13861    REQUIRED_OS_NAME=Windows
13862    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13863      REQUIRED_OS_VERSION=5.2
13864    else
13865      REQUIRED_OS_VERSION=5.1
13866    fi
13867  fi
13868  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13869    REQUIRED_OS_NAME=Darwin
13870    REQUIRED_OS_VERSION=11.2
13871  fi
13872
13873
13874
13875
13876
13877  # Also store the legacy naming of the cpu.
13878  # Ie i586 and amd64 instead of x86 and x86_64
13879  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13880  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13881    OPENJDK_TARGET_CPU_LEGACY="i586"
13882  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13883    # On all platforms except MacOSX replace x86_64 with amd64.
13884    OPENJDK_TARGET_CPU_LEGACY="amd64"
13885  fi
13886
13887
13888  # And the second legacy naming of the cpu.
13889  # Ie i386 and amd64 instead of x86 and x86_64.
13890  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13891  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13892    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13893  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13894    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13895  fi
13896
13897
13898  # This is the name of the cpu (but using i386 and amd64 instead of
13899  # x86 and x86_64, respectively), preceeded by a /, to be used when
13900  # locating libraries. On macosx, it's empty, though.
13901  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13902  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13903    OPENJDK_TARGET_CPU_LIBDIR=""
13904  fi
13905
13906
13907  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13908  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13909  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13910  OPENJDK_TARGET_CPU_ISADIR=""
13911  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13912    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13913      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13914    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13915      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13916    fi
13917  fi
13918
13919
13920  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13921  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13922  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13923    # On linux only, we replace x86 with i386.
13924    OPENJDK_TARGET_CPU_OSARCH="i386"
13925  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13926    # On all platforms except macosx, we replace x86_64 with amd64.
13927    OPENJDK_TARGET_CPU_OSARCH="amd64"
13928  fi
13929
13930
13931  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13932  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13933    OPENJDK_TARGET_CPU_JLI="i386"
13934  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13935    # On all platforms except macosx, we replace x86_64 with amd64.
13936    OPENJDK_TARGET_CPU_JLI="amd64"
13937  fi
13938  # Now setup the -D flags for building libjli.
13939  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13940  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13941    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13942      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13943    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13944      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13945    fi
13946  fi
13947
13948
13949  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13950  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13951    OPENJDK_TARGET_OS_API_DIR="unix"
13952  fi
13953  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13954    OPENJDK_TARGET_OS_API_DIR="windows"
13955  fi
13956
13957
13958  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13959      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13960  else
13961      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13962  fi
13963
13964
13965  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13966    A_LP64="LP64:="
13967    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13968    # unpack200.exe
13969    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13970      ADD_LP64="-D_LP64=1"
13971    fi
13972  fi
13973  LP64=$A_LP64
13974
13975
13976  if test "x$COMPILE_TYPE" = "xcross"; then
13977    # FIXME: ... or should this include reduced builds..?
13978    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13979  else
13980    DEFINE_CROSS_COMPILE_ARCH=""
13981  fi
13982
13983
13984  # ZERO_ARCHDEF is used to enable architecture-specific code
13985  case "${OPENJDK_TARGET_CPU}" in
13986    ppc*)    ZERO_ARCHDEF=PPC   ;;
13987    s390*)   ZERO_ARCHDEF=S390  ;;
13988    sparc*)  ZERO_ARCHDEF=SPARC ;;
13989    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13990    x86)     ZERO_ARCHDEF=IA32  ;;
13991    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13992  esac
13993
13994
13995
13996
13997# Continue setting up basic stuff. Most remaining code require fundamental tools.
13998
13999  # Save the current directory this script was started from
14000  CURDIR="$PWD"
14001
14002  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14003    PATH_SEP=";"
14004
14005  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14006  if test $SRC_ROOT_LENGTH -gt 100; then
14007    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14008  fi
14009
14010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14012$as_echo_n "checking cygwin release... " >&6; }
14013    CYGWIN_VERSION=`$UNAME -r`
14014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14015$as_echo "$CYGWIN_VERSION" >&6; }
14016    WINDOWS_ENV_VENDOR='cygwin'
14017    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14018
14019    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14020    if test "x$CYGWIN_VERSION_OK" = x; then
14021      { $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
14022$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;}
14023      as_fn_error $? "Cannot continue" "$LINENO" 5
14024    fi
14025    if test "x$CYGPATH" = x; then
14026      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14027    fi
14028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14029$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14030    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14031    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14032    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14033    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14035$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14036    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14037    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14038    if test "x$test_cygdrive_prefix" = x; then
14039      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14040    fi
14041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14043$as_echo_n "checking msys release... " >&6; }
14044    MSYS_VERSION=`$UNAME -r`
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14046$as_echo "$MSYS_VERSION" >&6; }
14047
14048    WINDOWS_ENV_VENDOR='msys'
14049    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14050
14051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14052$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14053    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14054    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14055
14056  windows_path="$MSYS_ROOT_PATH"
14057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14058    unix_path=`$CYGPATH -u "$windows_path"`
14059    MSYS_ROOT_PATH="$unix_path"
14060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14062    MSYS_ROOT_PATH="$unix_path"
14063  fi
14064
14065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14066$as_echo "$MSYS_ROOT_PATH" >&6; }
14067    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14068  else
14069    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14070  fi
14071
14072  # Test if windows or unix (cygwin/msys) find is first in path.
14073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14074$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14075  FIND_BINARY_OUTPUT=`find --version 2>&1`
14076  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14078$as_echo "unix style" >&6; }
14079  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14081$as_echo "Windows" >&6; }
14082    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14083$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14084    { $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
14085$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14086    as_fn_error $? "Cannot continue" "$LINENO" 5
14087  else
14088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14089$as_echo "unknown" >&6; }
14090    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14091$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14092  fi
14093
14094  else
14095    PATH_SEP=":"
14096  fi
14097
14098
14099  # We get the top-level directory from the supporting wrappers.
14100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14101$as_echo_n "checking for top-level directory... " >&6; }
14102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14103$as_echo "$TOPDIR" >&6; }
14104
14105
14106  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14107
14108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14109
14110  # Input might be given as Windows format, start by converting to
14111  # unix format.
14112  path="$CURDIR"
14113  new_path=`$CYGPATH -u "$path"`
14114
14115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14118  # "foo.exe" is OK but "foo" is an error.
14119  #
14120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14121  # It is also a way to make sure we got the proper file name for the real test later on.
14122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14123  if test "x$test_shortpath" = x; then
14124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14125$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14126    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14127  fi
14128
14129  # Call helper function which possibly converts this using DOS-style short mode.
14130  # If so, the updated path is stored in $new_path.
14131
14132  input_path="$new_path"
14133  # Check if we need to convert this using DOS-style short mode. If the path
14134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14135  # take no chances and rewrite it.
14136  # Note: m4 eats our [], so we need to use [ and ] instead.
14137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14138  if test "x$has_forbidden_chars" != x; then
14139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14143      # Going to short mode and back again did indeed matter. Since short mode is
14144      # case insensitive, let's make it lowercase to improve readability.
14145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14146      # Now convert it back to Unix-stile (cygpath)
14147      input_path=`$CYGPATH -u "$shortmode_path"`
14148      new_path="$input_path"
14149    fi
14150  fi
14151
14152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14153  if test "x$test_cygdrive_prefix" = x; then
14154    # As a simple fix, exclude /usr/bin since it's not a real path.
14155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14157      # a path prefixed by /cygdrive for fixpath to work.
14158      new_path="$CYGWIN_ROOT_PATH$input_path"
14159    fi
14160  fi
14161
14162
14163  if test "x$path" != "x$new_path"; then
14164    CURDIR="$new_path"
14165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14166$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14167  fi
14168
14169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14170
14171  path="$CURDIR"
14172  has_colon=`$ECHO $path | $GREP ^.:`
14173  new_path="$path"
14174  if test "x$has_colon" = x; then
14175    # Not in mixed or Windows style, start by that.
14176    new_path=`cmd //c echo $path`
14177  fi
14178
14179
14180  input_path="$new_path"
14181  # Check if we need to convert this using DOS-style short mode. If the path
14182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14183  # take no chances and rewrite it.
14184  # Note: m4 eats our [], so we need to use [ and ] instead.
14185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14186  if test "x$has_forbidden_chars" != x; then
14187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14189  fi
14190
14191
14192  windows_path="$new_path"
14193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14194    unix_path=`$CYGPATH -u "$windows_path"`
14195    new_path="$unix_path"
14196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14198    new_path="$unix_path"
14199  fi
14200
14201  if test "x$path" != "x$new_path"; then
14202    CURDIR="$new_path"
14203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14204$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14205  fi
14206
14207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14209
14210  else
14211    # We're on a posix platform. Hooray! :)
14212    path="$CURDIR"
14213    has_space=`$ECHO "$path" | $GREP " "`
14214    if test "x$has_space" != x; then
14215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14216$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14217      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14218    fi
14219
14220    # Use eval to expand a potential ~
14221    eval path="$path"
14222    if test ! -f "$path" && test ! -d "$path"; then
14223      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14224    fi
14225
14226    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14227  fi
14228
14229
14230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14231
14232  # Input might be given as Windows format, start by converting to
14233  # unix format.
14234  path="$TOPDIR"
14235  new_path=`$CYGPATH -u "$path"`
14236
14237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14240  # "foo.exe" is OK but "foo" is an error.
14241  #
14242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14243  # It is also a way to make sure we got the proper file name for the real test later on.
14244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14245  if test "x$test_shortpath" = x; then
14246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14247$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14248    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14249  fi
14250
14251  # Call helper function which possibly converts this using DOS-style short mode.
14252  # If so, the updated path is stored in $new_path.
14253
14254  input_path="$new_path"
14255  # Check if we need to convert this using DOS-style short mode. If the path
14256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14257  # take no chances and rewrite it.
14258  # Note: m4 eats our [], so we need to use [ and ] instead.
14259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14260  if test "x$has_forbidden_chars" != x; then
14261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14265      # Going to short mode and back again did indeed matter. Since short mode is
14266      # case insensitive, let's make it lowercase to improve readability.
14267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14268      # Now convert it back to Unix-stile (cygpath)
14269      input_path=`$CYGPATH -u "$shortmode_path"`
14270      new_path="$input_path"
14271    fi
14272  fi
14273
14274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14275  if test "x$test_cygdrive_prefix" = x; then
14276    # As a simple fix, exclude /usr/bin since it's not a real path.
14277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14279      # a path prefixed by /cygdrive for fixpath to work.
14280      new_path="$CYGWIN_ROOT_PATH$input_path"
14281    fi
14282  fi
14283
14284
14285  if test "x$path" != "x$new_path"; then
14286    TOPDIR="$new_path"
14287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14288$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14289  fi
14290
14291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14292
14293  path="$TOPDIR"
14294  has_colon=`$ECHO $path | $GREP ^.:`
14295  new_path="$path"
14296  if test "x$has_colon" = x; then
14297    # Not in mixed or Windows style, start by that.
14298    new_path=`cmd //c echo $path`
14299  fi
14300
14301
14302  input_path="$new_path"
14303  # Check if we need to convert this using DOS-style short mode. If the path
14304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14305  # take no chances and rewrite it.
14306  # Note: m4 eats our [], so we need to use [ and ] instead.
14307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14308  if test "x$has_forbidden_chars" != x; then
14309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14311  fi
14312
14313
14314  windows_path="$new_path"
14315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14316    unix_path=`$CYGPATH -u "$windows_path"`
14317    new_path="$unix_path"
14318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14320    new_path="$unix_path"
14321  fi
14322
14323  if test "x$path" != "x$new_path"; then
14324    TOPDIR="$new_path"
14325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14326$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14327  fi
14328
14329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14331
14332  else
14333    # We're on a posix platform. Hooray! :)
14334    path="$TOPDIR"
14335    has_space=`$ECHO "$path" | $GREP " "`
14336    if test "x$has_space" != x; then
14337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14338$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14339      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14340    fi
14341
14342    # Use eval to expand a potential ~
14343    eval path="$path"
14344    if test ! -f "$path" && test ! -d "$path"; then
14345      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14346    fi
14347
14348    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14349  fi
14350
14351  # SRC_ROOT is a traditional alias for TOPDIR.
14352  SRC_ROOT=$TOPDIR
14353
14354  # Locate the directory of this script.
14355  AUTOCONF_DIR=$TOPDIR/common/autoconf
14356
14357
14358  # Setup default logging of stdout and stderr to build.log in the output root.
14359  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14360  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14361  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14362
14363
14364
14365
14366
14367# Check if it's a pure open build or if custom sources are to be used.
14368
14369  # Check whether --enable-openjdk-only was given.
14370if test "${enable_openjdk_only+set}" = set; then :
14371  enableval=$enable_openjdk_only;
14372else
14373  enable_openjdk_only="no"
14374fi
14375
14376
14377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14378$as_echo_n "checking for presence of closed sources... " >&6; }
14379  if test -d "$SRC_ROOT/jdk/src/closed"; then
14380    CLOSED_SOURCE_PRESENT=yes
14381  else
14382    CLOSED_SOURCE_PRESENT=no
14383  fi
14384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14385$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14386
14387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14388$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14389  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14391$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14392
14393  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14394    OPENJDK=true
14395    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14396      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14397$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14398    fi
14399  else
14400    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14401      OPENJDK=true
14402    else
14403      OPENJDK=false
14404    fi
14405  fi
14406
14407  if test "x$OPENJDK" = "xtrue"; then
14408    SET_OPENJDK="OPENJDK=true"
14409  fi
14410
14411
14412
14413  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14414  # the IncludeCustomExtension macro.
14415
14416
14417# Check whether --with-custom-make-dir was given.
14418if test "${with_custom_make_dir+set}" = set; then :
14419  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
14420$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14421fi
14422
14423
14424
14425
14426# These are needed to be able to create a configuration name (and thus the output directory)
14427
14428  ###############################################################################
14429  #
14430  # Check which variant of the JDK that we want to build.
14431  # Currently we have:
14432  #    normal:   standard edition
14433  # but the custom make system may add other variants
14434  #
14435  # Effectively the JDK variant gives a name to a specific set of
14436  # modules to compile into the JDK. In the future, these modules
14437  # might even be Jigsaw modules.
14438  #
14439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14440$as_echo_n "checking which variant of the JDK to build... " >&6; }
14441
14442# Check whether --with-jdk-variant was given.
14443if test "${with_jdk_variant+set}" = set; then :
14444  withval=$with_jdk_variant;
14445fi
14446
14447
14448  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14449    JDK_VARIANT="normal"
14450  else
14451    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14452  fi
14453
14454
14455
14456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14457$as_echo "$JDK_VARIANT" >&6; }
14458
14459
14460###############################################################################
14461#
14462# Check which interpreter of the JVM we want to build.
14463# Currently we have:
14464#    template: Template interpreter (the default)
14465#    cpp     : C++ interpreter
14466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14467$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14468
14469# Check whether --with-jvm-interpreter was given.
14470if test "${with_jvm_interpreter+set}" = set; then :
14471  withval=$with_jvm_interpreter;
14472fi
14473
14474
14475if test "x$with_jvm_interpreter" = x; then
14476     with_jvm_interpreter="template"
14477fi
14478
14479JVM_INTERPRETER="$with_jvm_interpreter"
14480
14481if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14482   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14483fi
14484
14485
14486
14487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14488$as_echo "$with_jvm_interpreter" >&6; }
14489
14490
14491
14492  ###############################################################################
14493  #
14494  # Check which variants of the JVM that we want to build.
14495  # Currently we have:
14496  #    server: normal interpreter and a tiered C1/C2 compiler
14497  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14498  #    minimal1: reduced form of client with optional VM services and features stripped out
14499  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14500  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14501  #    zero: no machine code interpreter, no compiler
14502  #    zeroshark: zero interpreter and shark/llvm compiler backend
14503#    core: interpreter only, no compiler (only works on some platforms)
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14505$as_echo_n "checking which variants of the JVM to build... " >&6; }
14506
14507# Check whether --with-jvm-variants was given.
14508if test "${with_jvm_variants+set}" = set; then :
14509  withval=$with_jvm_variants;
14510fi
14511
14512
14513  if test "x$with_jvm_variants" = x; then
14514    with_jvm_variants="server"
14515  fi
14516
14517  JVM_VARIANTS=",$with_jvm_variants,"
14518  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,//'`
14519
14520  if test "x$TEST_VARIANTS" != "x,"; then
14521     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14522  fi
14523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14524$as_echo "$with_jvm_variants" >&6; }
14525
14526  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14527  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14528  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14529  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14530  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14531  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14532  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14533
14534  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14535    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14536      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14537    fi
14538  fi
14539  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14540    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14541      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14542    fi
14543  fi
14544  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14545    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14546      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14547    fi
14548  fi
14549
14550  # Replace the commas with AND for use in the build directory name.
14551  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14552  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/'`
14553  if test "x$COUNT_VARIANTS" != "x,1"; then
14554    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14555  else
14556    BUILDING_MULTIPLE_JVM_VARIANTS=no
14557  fi
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568  INCLUDE_SA=true
14569  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14570    INCLUDE_SA=false
14571  fi
14572  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14573    INCLUDE_SA=false
14574  fi
14575  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14576    INCLUDE_SA=false
14577  fi
14578  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14579    INCLUDE_SA=false
14580  fi
14581
14582
14583  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14584    MACOSX_UNIVERSAL="true"
14585  fi
14586
14587
14588
14589
14590  ###############################################################################
14591  #
14592  # Set the debug level
14593  #    release: no debug information, all optimizations, no asserts.
14594  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14595  #    fastdebug: debug information (-g), all optimizations, all asserts
14596  #    slowdebug: debug information (-g), no optimizations, all asserts
14597  #
14598  DEBUG_LEVEL="release"
14599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14600$as_echo_n "checking which debug level to use... " >&6; }
14601  # Check whether --enable-debug was given.
14602if test "${enable_debug+set}" = set; then :
14603  enableval=$enable_debug;
14604        ENABLE_DEBUG="${enableval}"
14605        DEBUG_LEVEL="fastdebug"
14606
14607else
14608  ENABLE_DEBUG="no"
14609fi
14610
14611
14612
14613# Check whether --with-debug-level was given.
14614if test "${with_debug_level+set}" = set; then :
14615  withval=$with_debug_level;
14616        DEBUG_LEVEL="${withval}"
14617        if test "x$ENABLE_DEBUG" = xyes; then
14618          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14619        fi
14620
14621fi
14622
14623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14624$as_echo "$DEBUG_LEVEL" >&6; }
14625
14626  if test "x$DEBUG_LEVEL" != xrelease && \
14627      test "x$DEBUG_LEVEL" != xoptimized && \
14628      test "x$DEBUG_LEVEL" != xfastdebug && \
14629      test "x$DEBUG_LEVEL" != xslowdebug; then
14630    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14631  fi
14632
14633
14634  ###############################################################################
14635  #
14636  # Setup legacy vars/targets and new vars to deal with different debug levels.
14637  #
14638
14639  case $DEBUG_LEVEL in
14640    release )
14641      VARIANT="OPT"
14642      FASTDEBUG="false"
14643      DEBUG_CLASSFILES="false"
14644      BUILD_VARIANT_RELEASE=""
14645      HOTSPOT_DEBUG_LEVEL="product"
14646      HOTSPOT_EXPORT="product"
14647      ;;
14648    fastdebug )
14649      VARIANT="DBG"
14650      FASTDEBUG="true"
14651      DEBUG_CLASSFILES="true"
14652      BUILD_VARIANT_RELEASE="-fastdebug"
14653      HOTSPOT_DEBUG_LEVEL="fastdebug"
14654      HOTSPOT_EXPORT="fastdebug"
14655      ;;
14656    slowdebug )
14657      VARIANT="DBG"
14658      FASTDEBUG="false"
14659      DEBUG_CLASSFILES="true"
14660      BUILD_VARIANT_RELEASE="-debug"
14661      HOTSPOT_DEBUG_LEVEL="debug"
14662      HOTSPOT_EXPORT="debug"
14663      ;;
14664    optimized )
14665      VARIANT="OPT"
14666      FASTDEBUG="false"
14667      DEBUG_CLASSFILES="false"
14668      BUILD_VARIANT_RELEASE="-optimized"
14669      HOTSPOT_DEBUG_LEVEL="optimized"
14670      HOTSPOT_EXPORT="optimized"
14671      ;;
14672  esac
14673
14674  # The debug level 'optimized' is a little special because it is currently only
14675  # applicable to the HotSpot build where it means to build a completely
14676  # optimized version of the VM without any debugging code (like for the
14677  # 'release' debug level which is called 'product' in the HotSpot build) but
14678  # with the exception that it can contain additional code which is otherwise
14679  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14680  # test new and/or experimental features which are not intended for customer
14681  # shipment. Because these new features need to be tested and benchmarked in
14682  # real world scenarios, we want to build the containing JDK at the 'release'
14683  # debug level.
14684  if test "x$DEBUG_LEVEL" = xoptimized; then
14685    DEBUG_LEVEL="release"
14686  fi
14687
14688  #####
14689  # Generate the legacy makefile targets for hotspot.
14690  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14691  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14692  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14693  # But until then ...
14694  HOTSPOT_TARGET=""
14695
14696  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14698  fi
14699
14700  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14701    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14702  fi
14703
14704  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14705    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14706  fi
14707
14708  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14709    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14710  fi
14711
14712  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14713    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14714  fi
14715
14716  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14717    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14718  fi
14719
14720  if test "x$JVM_VARIANT_CORE" = xtrue; then
14721    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14722  fi
14723
14724  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14725
14726  # On Macosx universal binaries are produced, but they only contain
14727  # 64 bit intel. This invalidates control of which jvms are built
14728  # from configure, but only server is valid anyway. Fix this
14729  # when hotspot makefiles are rewritten.
14730  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14731    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14732  fi
14733
14734  #####
14735
14736
14737
14738
14739
14740
14741
14742
14743# With basic setup done, call the custom early hook.
14744
14745
14746# Check if we have devkits, extra paths or sysroot set.
14747
14748
14749# Check whether --with-devkit was given.
14750if test "${with_devkit+set}" = set; then :
14751  withval=$with_devkit;
14752
14753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14754
14755  # Input might be given as Windows format, start by converting to
14756  # unix format.
14757  path="$with_devkit"
14758  new_path=`$CYGPATH -u "$path"`
14759
14760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14763  # "foo.exe" is OK but "foo" is an error.
14764  #
14765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14766  # It is also a way to make sure we got the proper file name for the real test later on.
14767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14768  if test "x$test_shortpath" = x; then
14769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14770$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14771    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14772  fi
14773
14774  # Call helper function which possibly converts this using DOS-style short mode.
14775  # If so, the updated path is stored in $new_path.
14776
14777  input_path="$new_path"
14778  # Check if we need to convert this using DOS-style short mode. If the path
14779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14780  # take no chances and rewrite it.
14781  # Note: m4 eats our [], so we need to use [ and ] instead.
14782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14783  if test "x$has_forbidden_chars" != x; then
14784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14788      # Going to short mode and back again did indeed matter. Since short mode is
14789      # case insensitive, let's make it lowercase to improve readability.
14790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14791      # Now convert it back to Unix-stile (cygpath)
14792      input_path=`$CYGPATH -u "$shortmode_path"`
14793      new_path="$input_path"
14794    fi
14795  fi
14796
14797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14798  if test "x$test_cygdrive_prefix" = x; then
14799    # As a simple fix, exclude /usr/bin since it's not a real path.
14800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14802      # a path prefixed by /cygdrive for fixpath to work.
14803      new_path="$CYGWIN_ROOT_PATH$input_path"
14804    fi
14805  fi
14806
14807
14808  if test "x$path" != "x$new_path"; then
14809    with_devkit="$new_path"
14810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14811$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14812  fi
14813
14814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14815
14816  path="$with_devkit"
14817  has_colon=`$ECHO $path | $GREP ^.:`
14818  new_path="$path"
14819  if test "x$has_colon" = x; then
14820    # Not in mixed or Windows style, start by that.
14821    new_path=`cmd //c echo $path`
14822  fi
14823
14824
14825  input_path="$new_path"
14826  # Check if we need to convert this using DOS-style short mode. If the path
14827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14828  # take no chances and rewrite it.
14829  # Note: m4 eats our [], so we need to use [ and ] instead.
14830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14831  if test "x$has_forbidden_chars" != x; then
14832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14834  fi
14835
14836
14837  windows_path="$new_path"
14838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14839    unix_path=`$CYGPATH -u "$windows_path"`
14840    new_path="$unix_path"
14841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14843    new_path="$unix_path"
14844  fi
14845
14846  if test "x$path" != "x$new_path"; then
14847    with_devkit="$new_path"
14848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14849$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14850  fi
14851
14852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14854
14855  else
14856    # We're on a posix platform. Hooray! :)
14857    path="$with_devkit"
14858    has_space=`$ECHO "$path" | $GREP " "`
14859    if test "x$has_space" != x; then
14860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14861$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14862      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14863    fi
14864
14865    # Use eval to expand a potential ~
14866    eval path="$path"
14867    if test ! -f "$path" && test ! -d "$path"; then
14868      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14869    fi
14870
14871    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14872  fi
14873
14874        DEVKIT_ROOT="$with_devkit"
14875        # Check for a meta data info file in the root of the devkit
14876        if test -f "$DEVKIT_ROOT/devkit.info"; then
14877          # This potentially sets the following:
14878          # DEVKIT_NAME: A descriptive name of the devkit
14879          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14880          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14881          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14882          . $DEVKIT_ROOT/devkit.info
14883        fi
14884
14885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14886$as_echo_n "checking for devkit... " >&6; }
14887        if test "x$DEVKIT_NAME" != x; then
14888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14889$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14890        else
14891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14892$as_echo "$DEVKIT_ROOT" >&6; }
14893        fi
14894
14895        if test "x$DEVKIT_EXTRA_PATH" != x; then
14896
14897  if test "x$DEVKIT_EXTRA_PATH" != x; then
14898    if test "x$EXTRA_PATH" = x; then
14899      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14900    else
14901      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14902    fi
14903  fi
14904
14905        fi
14906
14907        # Fallback default of just /bin if DEVKIT_PATH is not defined
14908        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14909          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14910        fi
14911
14912  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14913    if test "x$TOOLCHAIN_PATH" = x; then
14914      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14915    else
14916      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14917    fi
14918  fi
14919
14920
14921        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14922        # places for backwards compatiblity.
14923        if test "x$DEVKIT_SYSROOT" != x; then
14924          SYSROOT="$DEVKIT_SYSROOT"
14925        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14926          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14927        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14928          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14929        fi
14930
14931
14932fi
14933
14934
14935  # You can force the sysroot if the sysroot encoded into the compiler tools
14936  # is not correct.
14937
14938# Check whether --with-sys-root was given.
14939if test "${with_sys_root+set}" = set; then :
14940  withval=$with_sys_root; SYSROOT=$with_sys_root
14941
14942fi
14943
14944
14945
14946# Check whether --with-sysroot was given.
14947if test "${with_sysroot+set}" = set; then :
14948  withval=$with_sysroot; SYSROOT=$with_sysroot
14949
14950fi
14951
14952
14953
14954# Check whether --with-tools-dir was given.
14955if test "${with_tools_dir+set}" = set; then :
14956  withval=$with_tools_dir;
14957  if test "x$with_tools_dir" != x; then
14958    if test "x$TOOLCHAIN_PATH" = x; then
14959      TOOLCHAIN_PATH="$with_tools_dir"
14960    else
14961      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14962    fi
14963  fi
14964
14965
14966fi
14967
14968
14969
14970# Check whether --with-toolchain-path was given.
14971if test "${with_toolchain_path+set}" = set; then :
14972  withval=$with_toolchain_path;
14973  if test "x$with_toolchain_path" != x; then
14974    if test "x$TOOLCHAIN_PATH" = x; then
14975      TOOLCHAIN_PATH="$with_toolchain_path"
14976    else
14977      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14978    fi
14979  fi
14980
14981
14982fi
14983
14984
14985
14986# Check whether --with-extra-path was given.
14987if test "${with_extra_path+set}" = set; then :
14988  withval=$with_extra_path;
14989  if test "x$with_extra_path" != x; then
14990    if test "x$EXTRA_PATH" = x; then
14991      EXTRA_PATH="$with_extra_path"
14992    else
14993      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14994    fi
14995  fi
14996
14997
14998fi
14999
15000
15001  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15002    # detect if Xcode is installed by running xcodebuild -version
15003    # if no Xcode installed, xcodebuild exits with 1
15004    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15005    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15006      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15007      # fall back on the stub binary in /usr/bin/xcodebuild
15008      # Extract the first word of "xcodebuild", so it can be a program name with args.
15009set dummy xcodebuild; ac_word=$2
15010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15011$as_echo_n "checking for $ac_word... " >&6; }
15012if ${ac_cv_path_XCODEBUILD+:} false; then :
15013  $as_echo_n "(cached) " >&6
15014else
15015  case $XCODEBUILD in
15016  [\\/]* | ?:[\\/]*)
15017  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15018  ;;
15019  *)
15020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15021for as_dir in $TOOLCHAIN_PATH
15022do
15023  IFS=$as_save_IFS
15024  test -z "$as_dir" && as_dir=.
15025    for ac_exec_ext in '' $ac_executable_extensions; do
15026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15027    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15029    break 2
15030  fi
15031done
15032  done
15033IFS=$as_save_IFS
15034
15035  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15036  ;;
15037esac
15038fi
15039XCODEBUILD=$ac_cv_path_XCODEBUILD
15040if test -n "$XCODEBUILD"; then
15041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15042$as_echo "$XCODEBUILD" >&6; }
15043else
15044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15045$as_echo "no" >&6; }
15046fi
15047
15048
15049    else
15050      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15051      # when only the command line tools are installed there are no SDKs, so headers
15052      # are copied into the system frameworks
15053      XCODEBUILD=
15054
15055    fi
15056
15057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15058$as_echo_n "checking for sdk name... " >&6; }
15059
15060# Check whether --with-sdk-name was given.
15061if test "${with_sdk_name+set}" = set; then :
15062  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15063
15064fi
15065
15066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15067$as_echo "$SDKNAME" >&6; }
15068
15069    # if toolchain path is specified then don't rely on system headers, they may not compile
15070    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15071    test -z "$TOOLCHAIN_PATH" && \
15072      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15073
15074    if test -z "$SYSROOT"; then
15075      if test -n "$XCODEBUILD"; then
15076        # if we don't have system headers, use default SDK name (last resort)
15077        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15078          SDKNAME=${SDKNAME:-macosx}
15079        fi
15080
15081        if test -n "$SDKNAME"; then
15082          # Call xcodebuild to determine SYSROOT
15083          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15084        fi
15085      else
15086        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15087          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
15088        fi
15089      fi
15090    else
15091      # warn user if --with-sdk-name was also set
15092      if test -n "$with_sdk_name"; then
15093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15094$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15095      fi
15096    fi
15097
15098    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15099      # If no system framework headers, then SYSROOT must be set, or we won't build
15100      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
15101    fi
15102
15103    # Perform a basic sanity test
15104    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15105      if test -z "$SYSROOT"; then
15106        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
15107      else
15108        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15109      fi
15110    fi
15111
15112    # set SDKROOT too, Xcode tools will pick it up
15113    SDKROOT=$SYSROOT
15114
15115  fi
15116
15117  # Prepend the extra path to the global path
15118
15119  if test "x$EXTRA_PATH" != x; then
15120    if test "x$PATH" = x; then
15121      PATH="$EXTRA_PATH"
15122    else
15123      PATH="$EXTRA_PATH:$PATH"
15124    fi
15125  fi
15126
15127
15128  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15129    # Add extra search paths on solaris for utilities like ar and as etc...
15130    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15131  fi
15132
15133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15134$as_echo_n "checking for sysroot... " >&6; }
15135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15136$as_echo "$SYSROOT" >&6; }
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15138$as_echo_n "checking for toolchain path... " >&6; }
15139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15140$as_echo "$TOOLCHAIN_PATH" >&6; }
15141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15142$as_echo_n "checking for extra path... " >&6; }
15143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15144$as_echo "$EXTRA_PATH" >&6; }
15145
15146
15147# To properly create a configuration name, we need to have the OpenJDK target
15148# and options (variants and debug level) parsed.
15149
15150
15151
15152# Check whether --with-conf-name was given.
15153if test "${with_conf_name+set}" = set; then :
15154  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15155fi
15156
15157
15158  # Test from where we are running configure, in or outside of src root.
15159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15160$as_echo_n "checking where to store configuration... " >&6; }
15161  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15162      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15163      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15164    # We are running configure from the src root.
15165    # Create a default ./build/target-variant-debuglevel output root.
15166    if test "x${CONF_NAME}" = x; then
15167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15168$as_echo "in default location" >&6; }
15169      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15170    else
15171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15172$as_echo "in build directory with custom name" >&6; }
15173    fi
15174    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15175    $MKDIR -p "$OUTPUT_ROOT"
15176    if test ! -d "$OUTPUT_ROOT"; then
15177      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15178    fi
15179  else
15180    # We are running configure from outside of the src dir.
15181    # Then use the current directory as output dir!
15182    # If configuration is situated in normal build directory, just use the build
15183    # directory name as configuration name, otherwise use the complete path.
15184    if test "x${CONF_NAME}" = x; then
15185      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15186    fi
15187    OUTPUT_ROOT="$CURDIR"
15188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15189$as_echo "in current directory" >&6; }
15190
15191    # WARNING: This might be a bad thing to do. You need to be sure you want to
15192    # have a configuration in this directory. Do some sanity checks!
15193
15194    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15195      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15196      # other files
15197      files_present=`$LS $OUTPUT_ROOT`
15198      # Configure has already touched config.log and confdefs.h in the current dir when this check
15199      # is performed.
15200      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15201      | $TR -d '\n'`
15202      if test "x$filtered_files" != x; then
15203        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15204$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15206$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15208$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15210$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15211        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15212$as_echo "$as_me: seriously mess up just about everything." >&6;}
15213        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15214$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15215        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15216$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15217        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15218      fi
15219    fi
15220  fi
15221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15222$as_echo_n "checking what configuration name to use... " >&6; }
15223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15224$as_echo "$CONF_NAME" >&6; }
15225
15226
15227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15228
15229  # Input might be given as Windows format, start by converting to
15230  # unix format.
15231  path="$OUTPUT_ROOT"
15232  new_path=`$CYGPATH -u "$path"`
15233
15234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15237  # "foo.exe" is OK but "foo" is an error.
15238  #
15239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15240  # It is also a way to make sure we got the proper file name for the real test later on.
15241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15242  if test "x$test_shortpath" = x; then
15243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15244$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15245    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15246  fi
15247
15248  # Call helper function which possibly converts this using DOS-style short mode.
15249  # If so, the updated path is stored in $new_path.
15250
15251  input_path="$new_path"
15252  # Check if we need to convert this using DOS-style short mode. If the path
15253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15254  # take no chances and rewrite it.
15255  # Note: m4 eats our [], so we need to use [ and ] instead.
15256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15257  if test "x$has_forbidden_chars" != x; then
15258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15262      # Going to short mode and back again did indeed matter. Since short mode is
15263      # case insensitive, let's make it lowercase to improve readability.
15264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15265      # Now convert it back to Unix-stile (cygpath)
15266      input_path=`$CYGPATH -u "$shortmode_path"`
15267      new_path="$input_path"
15268    fi
15269  fi
15270
15271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15272  if test "x$test_cygdrive_prefix" = x; then
15273    # As a simple fix, exclude /usr/bin since it's not a real path.
15274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15276      # a path prefixed by /cygdrive for fixpath to work.
15277      new_path="$CYGWIN_ROOT_PATH$input_path"
15278    fi
15279  fi
15280
15281
15282  if test "x$path" != "x$new_path"; then
15283    OUTPUT_ROOT="$new_path"
15284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15285$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15286  fi
15287
15288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15289
15290  path="$OUTPUT_ROOT"
15291  has_colon=`$ECHO $path | $GREP ^.:`
15292  new_path="$path"
15293  if test "x$has_colon" = x; then
15294    # Not in mixed or Windows style, start by that.
15295    new_path=`cmd //c echo $path`
15296  fi
15297
15298
15299  input_path="$new_path"
15300  # Check if we need to convert this using DOS-style short mode. If the path
15301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15302  # take no chances and rewrite it.
15303  # Note: m4 eats our [], so we need to use [ and ] instead.
15304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15305  if test "x$has_forbidden_chars" != x; then
15306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15308  fi
15309
15310
15311  windows_path="$new_path"
15312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15313    unix_path=`$CYGPATH -u "$windows_path"`
15314    new_path="$unix_path"
15315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15317    new_path="$unix_path"
15318  fi
15319
15320  if test "x$path" != "x$new_path"; then
15321    OUTPUT_ROOT="$new_path"
15322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15323$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15324  fi
15325
15326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15328
15329  else
15330    # We're on a posix platform. Hooray! :)
15331    path="$OUTPUT_ROOT"
15332    has_space=`$ECHO "$path" | $GREP " "`
15333    if test "x$has_space" != x; then
15334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15335$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15336      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15337    fi
15338
15339    # Use eval to expand a potential ~
15340    eval path="$path"
15341    if test ! -f "$path" && test ! -d "$path"; then
15342      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15343    fi
15344
15345    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15346  fi
15347
15348
15349  SPEC=$OUTPUT_ROOT/spec.gmk
15350
15351  CONF_NAME=$CONF_NAME
15352
15353  OUTPUT_ROOT=$OUTPUT_ROOT
15354
15355
15356  # The spec.gmk file contains all variables for the make system.
15357  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15358
15359  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15360  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15361
15362  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15363  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15364
15365  # The compare.sh is used to compare the build output to other builds.
15366  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15367
15368  # The generated Makefile knows where the spec.gmk is and where the source is.
15369  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15370  # which will look for generated configurations
15371  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15372
15373
15374
15375# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15376
15377  for ac_prog in apt-get yum port pkgutil pkgadd
15378do
15379  # Extract the first word of "$ac_prog", so it can be a program name with args.
15380set dummy $ac_prog; ac_word=$2
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15382$as_echo_n "checking for $ac_word... " >&6; }
15383if ${ac_cv_prog_PKGHANDLER+:} false; then :
15384  $as_echo_n "(cached) " >&6
15385else
15386  if test -n "$PKGHANDLER"; then
15387  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15388else
15389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15390for as_dir in $PATH
15391do
15392  IFS=$as_save_IFS
15393  test -z "$as_dir" && as_dir=.
15394    for ac_exec_ext in '' $ac_executable_extensions; do
15395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15396    ac_cv_prog_PKGHANDLER="$ac_prog"
15397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15398    break 2
15399  fi
15400done
15401  done
15402IFS=$as_save_IFS
15403
15404fi
15405fi
15406PKGHANDLER=$ac_cv_prog_PKGHANDLER
15407if test -n "$PKGHANDLER"; then
15408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15409$as_echo "$PKGHANDLER" >&6; }
15410else
15411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15412$as_echo "no" >&6; }
15413fi
15414
15415
15416  test -n "$PKGHANDLER" && break
15417done
15418
15419
15420
15421# Setup tools that requires more complex handling, or that is not needed by the configure script.
15422
15423
15424  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15425  if test "x$MAKE" != x; then
15426    # User has supplied a make, test it.
15427    if test ! -f "$MAKE"; then
15428      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15429    fi
15430
15431  MAKE_CANDIDATE=""$MAKE""
15432  DESCRIPTION="user supplied MAKE=$MAKE"
15433  if test "x$MAKE_CANDIDATE" != x; then
15434    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15435$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15436    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15437    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15438    if test "x$IS_GNU_MAKE" = x; then
15439      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15440$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15441    else
15442      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15443      if test "x$IS_MODERN_MAKE" = x; then
15444        { $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
15445$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;}
15446      else
15447        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15448          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15449            MAKE_EXPECTED_ENV='cygwin'
15450          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15451            MAKE_EXPECTED_ENV='msys'
15452          else
15453            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15454          fi
15455          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15456          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15457        else
15458          # Not relevant for non-Windows
15459          IS_MAKE_CORRECT_ENV=true
15460        fi
15461        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15462          { $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
15463$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;}
15464        else
15465          FOUND_MAKE=$MAKE_CANDIDATE
15466
15467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15468
15469  # First separate the path from the arguments. This will split at the first
15470  # space.
15471  complete="$FOUND_MAKE"
15472  path="${complete%% *}"
15473  tmp="$complete EOL"
15474  arguments="${tmp#* }"
15475
15476  # Input might be given as Windows format, start by converting to
15477  # unix format.
15478  new_path=`$CYGPATH -u "$path"`
15479
15480  # Now try to locate executable using which
15481  new_path=`$WHICH "$new_path" 2> /dev/null`
15482  # bat and cmd files are not always considered executable in cygwin causing which
15483  # to not find them
15484  if test "x$new_path" = x \
15485      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15486      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15487    new_path=`$CYGPATH -u "$path"`
15488  fi
15489  if test "x$new_path" = x; then
15490    # Oops. Which didn't find the executable.
15491    # The splitting of arguments from the executable at a space might have been incorrect,
15492    # since paths with space are more likely in Windows. Give it another try with the whole
15493    # argument.
15494    path="$complete"
15495    arguments="EOL"
15496    new_path=`$CYGPATH -u "$path"`
15497    new_path=`$WHICH "$new_path" 2> /dev/null`
15498    # bat and cmd files are not always considered executable in cygwin causing which
15499    # to not find them
15500    if test "x$new_path" = x \
15501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15503      new_path=`$CYGPATH -u "$path"`
15504    fi
15505    if test "x$new_path" = x; then
15506      # It's still not found. Now this is an unrecoverable error.
15507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15509      has_space=`$ECHO "$complete" | $GREP " "`
15510      if test "x$has_space" != x; then
15511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15513      fi
15514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15515    fi
15516  fi
15517
15518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15521  # "foo.exe" is OK but "foo" is an error.
15522  #
15523  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15524  # It is also a way to make sure we got the proper file name for the real test later on.
15525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15526  if test "x$test_shortpath" = x; then
15527    # Short path failed, file does not exist as specified.
15528    # Try adding .exe or .cmd
15529    if test -f "${new_path}.exe"; then
15530      input_to_shortpath="${new_path}.exe"
15531    elif test -f "${new_path}.cmd"; then
15532      input_to_shortpath="${new_path}.cmd"
15533    else
15534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15539    fi
15540  else
15541    input_to_shortpath="$new_path"
15542  fi
15543
15544  # Call helper function which possibly converts this using DOS-style short mode.
15545  # If so, the updated path is stored in $new_path.
15546  new_path="$input_to_shortpath"
15547
15548  input_path="$input_to_shortpath"
15549  # Check if we need to convert this using DOS-style short mode. If the path
15550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15551  # take no chances and rewrite it.
15552  # Note: m4 eats our [], so we need to use [ and ] instead.
15553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15554  if test "x$has_forbidden_chars" != x; then
15555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15559      # Going to short mode and back again did indeed matter. Since short mode is
15560      # case insensitive, let's make it lowercase to improve readability.
15561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15562      # Now convert it back to Unix-stile (cygpath)
15563      input_path=`$CYGPATH -u "$shortmode_path"`
15564      new_path="$input_path"
15565    fi
15566  fi
15567
15568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15569  if test "x$test_cygdrive_prefix" = x; then
15570    # As a simple fix, exclude /usr/bin since it's not a real path.
15571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15573      # a path prefixed by /cygdrive for fixpath to work.
15574      new_path="$CYGWIN_ROOT_PATH$input_path"
15575    fi
15576  fi
15577
15578  # remove trailing .exe if any
15579  new_path="${new_path/%.exe/}"
15580
15581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15582
15583  # First separate the path from the arguments. This will split at the first
15584  # space.
15585  complete="$FOUND_MAKE"
15586  path="${complete%% *}"
15587  tmp="$complete EOL"
15588  arguments="${tmp#* }"
15589
15590  # Input might be given as Windows format, start by converting to
15591  # unix format.
15592  new_path="$path"
15593
15594  windows_path="$new_path"
15595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15596    unix_path=`$CYGPATH -u "$windows_path"`
15597    new_path="$unix_path"
15598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15600    new_path="$unix_path"
15601  fi
15602
15603
15604  # Now try to locate executable using which
15605  new_path=`$WHICH "$new_path" 2> /dev/null`
15606
15607  if test "x$new_path" = x; then
15608    # Oops. Which didn't find the executable.
15609    # The splitting of arguments from the executable at a space might have been incorrect,
15610    # since paths with space are more likely in Windows. Give it another try with the whole
15611    # argument.
15612    path="$complete"
15613    arguments="EOL"
15614    new_path="$path"
15615
15616  windows_path="$new_path"
15617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15618    unix_path=`$CYGPATH -u "$windows_path"`
15619    new_path="$unix_path"
15620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15622    new_path="$unix_path"
15623  fi
15624
15625
15626    new_path=`$WHICH "$new_path" 2> /dev/null`
15627    # bat and cmd files are not always considered executable in MSYS causing which
15628    # to not find them
15629    if test "x$new_path" = x \
15630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15632      new_path="$path"
15633
15634  windows_path="$new_path"
15635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15636    unix_path=`$CYGPATH -u "$windows_path"`
15637    new_path="$unix_path"
15638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15640    new_path="$unix_path"
15641  fi
15642
15643    fi
15644
15645    if test "x$new_path" = x; then
15646      # It's still not found. Now this is an unrecoverable error.
15647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15649      has_space=`$ECHO "$complete" | $GREP " "`
15650      if test "x$has_space" != x; then
15651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15653      fi
15654      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15655    fi
15656  fi
15657
15658  # Now new_path has a complete unix path to the binary
15659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15660    # Keep paths in /bin as-is, but remove trailing .exe if any
15661    new_path="${new_path/%.exe/}"
15662    # Do not save /bin paths to all_fixpath_prefixes!
15663  else
15664    # Not in mixed or Windows style, start by that.
15665    new_path=`cmd //c echo $new_path`
15666
15667  input_path="$new_path"
15668  # Check if we need to convert this using DOS-style short mode. If the path
15669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15670  # take no chances and rewrite it.
15671  # Note: m4 eats our [], so we need to use [ and ] instead.
15672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15673  if test "x$has_forbidden_chars" != x; then
15674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15676  fi
15677
15678    # Output is in $new_path
15679
15680  windows_path="$new_path"
15681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15682    unix_path=`$CYGPATH -u "$windows_path"`
15683    new_path="$unix_path"
15684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15686    new_path="$unix_path"
15687  fi
15688
15689    # remove trailing .exe if any
15690    new_path="${new_path/%.exe/}"
15691
15692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15694  fi
15695
15696  else
15697    # We're on a posix platform. Hooray! :)
15698    # First separate the path from the arguments. This will split at the first
15699    # space.
15700    complete="$FOUND_MAKE"
15701    path="${complete%% *}"
15702    tmp="$complete EOL"
15703    arguments="${tmp#* }"
15704
15705    # Cannot rely on the command "which" here since it doesn't always work.
15706    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15707    if test -z "$is_absolute_path"; then
15708      # Path to executable is not absolute. Find it.
15709      IFS_save="$IFS"
15710      IFS=:
15711      for p in $PATH; do
15712        if test -f "$p/$path" && test -x "$p/$path"; then
15713          new_path="$p/$path"
15714          break
15715        fi
15716      done
15717      IFS="$IFS_save"
15718    else
15719      # This is an absolute path, we can use it without further modifications.
15720      new_path="$path"
15721    fi
15722
15723    if test "x$new_path" = x; then
15724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15726      has_space=`$ECHO "$complete" | $GREP " "`
15727      if test "x$has_space" != x; then
15728        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15729$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15730      fi
15731      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15732    fi
15733  fi
15734
15735  # Now join together the path and the arguments once again
15736  if test "x$arguments" != xEOL; then
15737    new_complete="$new_path ${arguments% *}"
15738  else
15739    new_complete="$new_path"
15740  fi
15741
15742  if test "x$complete" != "x$new_complete"; then
15743    FOUND_MAKE="$new_complete"
15744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15745$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15746  fi
15747
15748        fi
15749      fi
15750    fi
15751  fi
15752
15753    if test "x$FOUND_MAKE" = x; then
15754      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15755    fi
15756  else
15757    # Try our hardest to locate a correct version of GNU make
15758    for ac_prog in gmake
15759do
15760  # Extract the first word of "$ac_prog", so it can be a program name with args.
15761set dummy $ac_prog; ac_word=$2
15762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15763$as_echo_n "checking for $ac_word... " >&6; }
15764if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15765  $as_echo_n "(cached) " >&6
15766else
15767  case $CHECK_GMAKE in
15768  [\\/]* | ?:[\\/]*)
15769  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15770  ;;
15771  *)
15772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15773for as_dir in $PATH
15774do
15775  IFS=$as_save_IFS
15776  test -z "$as_dir" && as_dir=.
15777    for ac_exec_ext in '' $ac_executable_extensions; do
15778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15779    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15781    break 2
15782  fi
15783done
15784  done
15785IFS=$as_save_IFS
15786
15787  ;;
15788esac
15789fi
15790CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15791if test -n "$CHECK_GMAKE"; then
15792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15793$as_echo "$CHECK_GMAKE" >&6; }
15794else
15795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15796$as_echo "no" >&6; }
15797fi
15798
15799
15800  test -n "$CHECK_GMAKE" && break
15801done
15802
15803
15804  MAKE_CANDIDATE=""$CHECK_GMAKE""
15805  DESCRIPTION="gmake in PATH"
15806  if test "x$MAKE_CANDIDATE" != x; then
15807    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15808$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15809    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15810    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15811    if test "x$IS_GNU_MAKE" = x; then
15812      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15813$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15814    else
15815      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15816      if test "x$IS_MODERN_MAKE" = x; then
15817        { $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
15818$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;}
15819      else
15820        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15821          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15822            MAKE_EXPECTED_ENV='cygwin'
15823          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15824            MAKE_EXPECTED_ENV='msys'
15825          else
15826            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15827          fi
15828          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15829          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15830        else
15831          # Not relevant for non-Windows
15832          IS_MAKE_CORRECT_ENV=true
15833        fi
15834        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15835          { $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
15836$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;}
15837        else
15838          FOUND_MAKE=$MAKE_CANDIDATE
15839
15840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15841
15842  # First separate the path from the arguments. This will split at the first
15843  # space.
15844  complete="$FOUND_MAKE"
15845  path="${complete%% *}"
15846  tmp="$complete EOL"
15847  arguments="${tmp#* }"
15848
15849  # Input might be given as Windows format, start by converting to
15850  # unix format.
15851  new_path=`$CYGPATH -u "$path"`
15852
15853  # Now try to locate executable using which
15854  new_path=`$WHICH "$new_path" 2> /dev/null`
15855  # bat and cmd files are not always considered executable in cygwin causing which
15856  # to not find them
15857  if test "x$new_path" = x \
15858      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15859      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15860    new_path=`$CYGPATH -u "$path"`
15861  fi
15862  if test "x$new_path" = x; then
15863    # Oops. Which didn't find the executable.
15864    # The splitting of arguments from the executable at a space might have been incorrect,
15865    # since paths with space are more likely in Windows. Give it another try with the whole
15866    # argument.
15867    path="$complete"
15868    arguments="EOL"
15869    new_path=`$CYGPATH -u "$path"`
15870    new_path=`$WHICH "$new_path" 2> /dev/null`
15871    # bat and cmd files are not always considered executable in cygwin causing which
15872    # to not find them
15873    if test "x$new_path" = x \
15874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15876      new_path=`$CYGPATH -u "$path"`
15877    fi
15878    if test "x$new_path" = x; then
15879      # It's still not found. Now this is an unrecoverable error.
15880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15882      has_space=`$ECHO "$complete" | $GREP " "`
15883      if test "x$has_space" != x; then
15884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15886      fi
15887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15888    fi
15889  fi
15890
15891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15894  # "foo.exe" is OK but "foo" is an error.
15895  #
15896  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15897  # It is also a way to make sure we got the proper file name for the real test later on.
15898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15899  if test "x$test_shortpath" = x; then
15900    # Short path failed, file does not exist as specified.
15901    # Try adding .exe or .cmd
15902    if test -f "${new_path}.exe"; then
15903      input_to_shortpath="${new_path}.exe"
15904    elif test -f "${new_path}.cmd"; then
15905      input_to_shortpath="${new_path}.cmd"
15906    else
15907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15911      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15912    fi
15913  else
15914    input_to_shortpath="$new_path"
15915  fi
15916
15917  # Call helper function which possibly converts this using DOS-style short mode.
15918  # If so, the updated path is stored in $new_path.
15919  new_path="$input_to_shortpath"
15920
15921  input_path="$input_to_shortpath"
15922  # Check if we need to convert this using DOS-style short mode. If the path
15923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15924  # take no chances and rewrite it.
15925  # Note: m4 eats our [], so we need to use [ and ] instead.
15926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15927  if test "x$has_forbidden_chars" != x; then
15928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15932      # Going to short mode and back again did indeed matter. Since short mode is
15933      # case insensitive, let's make it lowercase to improve readability.
15934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15935      # Now convert it back to Unix-stile (cygpath)
15936      input_path=`$CYGPATH -u "$shortmode_path"`
15937      new_path="$input_path"
15938    fi
15939  fi
15940
15941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15942  if test "x$test_cygdrive_prefix" = x; then
15943    # As a simple fix, exclude /usr/bin since it's not a real path.
15944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15946      # a path prefixed by /cygdrive for fixpath to work.
15947      new_path="$CYGWIN_ROOT_PATH$input_path"
15948    fi
15949  fi
15950
15951  # remove trailing .exe if any
15952  new_path="${new_path/%.exe/}"
15953
15954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15955
15956  # First separate the path from the arguments. This will split at the first
15957  # space.
15958  complete="$FOUND_MAKE"
15959  path="${complete%% *}"
15960  tmp="$complete EOL"
15961  arguments="${tmp#* }"
15962
15963  # Input might be given as Windows format, start by converting to
15964  # unix format.
15965  new_path="$path"
15966
15967  windows_path="$new_path"
15968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15969    unix_path=`$CYGPATH -u "$windows_path"`
15970    new_path="$unix_path"
15971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15973    new_path="$unix_path"
15974  fi
15975
15976
15977  # Now try to locate executable using which
15978  new_path=`$WHICH "$new_path" 2> /dev/null`
15979
15980  if test "x$new_path" = x; then
15981    # Oops. Which didn't find the executable.
15982    # The splitting of arguments from the executable at a space might have been incorrect,
15983    # since paths with space are more likely in Windows. Give it another try with the whole
15984    # argument.
15985    path="$complete"
15986    arguments="EOL"
15987    new_path="$path"
15988
15989  windows_path="$new_path"
15990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15991    unix_path=`$CYGPATH -u "$windows_path"`
15992    new_path="$unix_path"
15993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15995    new_path="$unix_path"
15996  fi
15997
15998
15999    new_path=`$WHICH "$new_path" 2> /dev/null`
16000    # bat and cmd files are not always considered executable in MSYS causing which
16001    # to not find them
16002    if test "x$new_path" = x \
16003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16005      new_path="$path"
16006
16007  windows_path="$new_path"
16008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16009    unix_path=`$CYGPATH -u "$windows_path"`
16010    new_path="$unix_path"
16011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16013    new_path="$unix_path"
16014  fi
16015
16016    fi
16017
16018    if test "x$new_path" = x; then
16019      # It's still not found. Now this is an unrecoverable error.
16020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16021$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16022      has_space=`$ECHO "$complete" | $GREP " "`
16023      if test "x$has_space" != x; then
16024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16026      fi
16027      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16028    fi
16029  fi
16030
16031  # Now new_path has a complete unix path to the binary
16032  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16033    # Keep paths in /bin as-is, but remove trailing .exe if any
16034    new_path="${new_path/%.exe/}"
16035    # Do not save /bin paths to all_fixpath_prefixes!
16036  else
16037    # Not in mixed or Windows style, start by that.
16038    new_path=`cmd //c echo $new_path`
16039
16040  input_path="$new_path"
16041  # Check if we need to convert this using DOS-style short mode. If the path
16042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16043  # take no chances and rewrite it.
16044  # Note: m4 eats our [], so we need to use [ and ] instead.
16045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16046  if test "x$has_forbidden_chars" != x; then
16047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16049  fi
16050
16051    # Output is in $new_path
16052
16053  windows_path="$new_path"
16054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16055    unix_path=`$CYGPATH -u "$windows_path"`
16056    new_path="$unix_path"
16057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16059    new_path="$unix_path"
16060  fi
16061
16062    # remove trailing .exe if any
16063    new_path="${new_path/%.exe/}"
16064
16065    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16066    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16067  fi
16068
16069  else
16070    # We're on a posix platform. Hooray! :)
16071    # First separate the path from the arguments. This will split at the first
16072    # space.
16073    complete="$FOUND_MAKE"
16074    path="${complete%% *}"
16075    tmp="$complete EOL"
16076    arguments="${tmp#* }"
16077
16078    # Cannot rely on the command "which" here since it doesn't always work.
16079    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16080    if test -z "$is_absolute_path"; then
16081      # Path to executable is not absolute. Find it.
16082      IFS_save="$IFS"
16083      IFS=:
16084      for p in $PATH; do
16085        if test -f "$p/$path" && test -x "$p/$path"; then
16086          new_path="$p/$path"
16087          break
16088        fi
16089      done
16090      IFS="$IFS_save"
16091    else
16092      # This is an absolute path, we can use it without further modifications.
16093      new_path="$path"
16094    fi
16095
16096    if test "x$new_path" = x; then
16097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16098$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16099      has_space=`$ECHO "$complete" | $GREP " "`
16100      if test "x$has_space" != x; then
16101        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16102$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16103      fi
16104      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16105    fi
16106  fi
16107
16108  # Now join together the path and the arguments once again
16109  if test "x$arguments" != xEOL; then
16110    new_complete="$new_path ${arguments% *}"
16111  else
16112    new_complete="$new_path"
16113  fi
16114
16115  if test "x$complete" != "x$new_complete"; then
16116    FOUND_MAKE="$new_complete"
16117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16118$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16119  fi
16120
16121        fi
16122      fi
16123    fi
16124  fi
16125
16126
16127    if test "x$FOUND_MAKE" = x; then
16128      for ac_prog in make
16129do
16130  # Extract the first word of "$ac_prog", so it can be a program name with args.
16131set dummy $ac_prog; ac_word=$2
16132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16133$as_echo_n "checking for $ac_word... " >&6; }
16134if ${ac_cv_path_CHECK_MAKE+:} false; then :
16135  $as_echo_n "(cached) " >&6
16136else
16137  case $CHECK_MAKE in
16138  [\\/]* | ?:[\\/]*)
16139  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16140  ;;
16141  *)
16142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16143for as_dir in $PATH
16144do
16145  IFS=$as_save_IFS
16146  test -z "$as_dir" && as_dir=.
16147    for ac_exec_ext in '' $ac_executable_extensions; do
16148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16149    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16151    break 2
16152  fi
16153done
16154  done
16155IFS=$as_save_IFS
16156
16157  ;;
16158esac
16159fi
16160CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16161if test -n "$CHECK_MAKE"; then
16162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16163$as_echo "$CHECK_MAKE" >&6; }
16164else
16165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16166$as_echo "no" >&6; }
16167fi
16168
16169
16170  test -n "$CHECK_MAKE" && break
16171done
16172
16173
16174  MAKE_CANDIDATE=""$CHECK_MAKE""
16175  DESCRIPTION="make in PATH"
16176  if test "x$MAKE_CANDIDATE" != x; then
16177    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16178$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16179    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16180    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16181    if test "x$IS_GNU_MAKE" = x; then
16182      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16183$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16184    else
16185      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16186      if test "x$IS_MODERN_MAKE" = x; then
16187        { $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
16188$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;}
16189      else
16190        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16191          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16192            MAKE_EXPECTED_ENV='cygwin'
16193          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16194            MAKE_EXPECTED_ENV='msys'
16195          else
16196            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16197          fi
16198          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16199          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16200        else
16201          # Not relevant for non-Windows
16202          IS_MAKE_CORRECT_ENV=true
16203        fi
16204        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16205          { $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
16206$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;}
16207        else
16208          FOUND_MAKE=$MAKE_CANDIDATE
16209
16210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16211
16212  # First separate the path from the arguments. This will split at the first
16213  # space.
16214  complete="$FOUND_MAKE"
16215  path="${complete%% *}"
16216  tmp="$complete EOL"
16217  arguments="${tmp#* }"
16218
16219  # Input might be given as Windows format, start by converting to
16220  # unix format.
16221  new_path=`$CYGPATH -u "$path"`
16222
16223  # Now try to locate executable using which
16224  new_path=`$WHICH "$new_path" 2> /dev/null`
16225  # bat and cmd files are not always considered executable in cygwin causing which
16226  # to not find them
16227  if test "x$new_path" = x \
16228      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16229      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16230    new_path=`$CYGPATH -u "$path"`
16231  fi
16232  if test "x$new_path" = x; then
16233    # Oops. Which didn't find the executable.
16234    # The splitting of arguments from the executable at a space might have been incorrect,
16235    # since paths with space are more likely in Windows. Give it another try with the whole
16236    # argument.
16237    path="$complete"
16238    arguments="EOL"
16239    new_path=`$CYGPATH -u "$path"`
16240    new_path=`$WHICH "$new_path" 2> /dev/null`
16241    # bat and cmd files are not always considered executable in cygwin causing which
16242    # to not find them
16243    if test "x$new_path" = x \
16244        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16245        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16246      new_path=`$CYGPATH -u "$path"`
16247    fi
16248    if test "x$new_path" = x; then
16249      # It's still not found. Now this is an unrecoverable error.
16250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16251$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16252      has_space=`$ECHO "$complete" | $GREP " "`
16253      if test "x$has_space" != x; then
16254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16256      fi
16257      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16258    fi
16259  fi
16260
16261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16264  # "foo.exe" is OK but "foo" is an error.
16265  #
16266  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16267  # It is also a way to make sure we got the proper file name for the real test later on.
16268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16269  if test "x$test_shortpath" = x; then
16270    # Short path failed, file does not exist as specified.
16271    # Try adding .exe or .cmd
16272    if test -f "${new_path}.exe"; then
16273      input_to_shortpath="${new_path}.exe"
16274    elif test -f "${new_path}.cmd"; then
16275      input_to_shortpath="${new_path}.cmd"
16276    else
16277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16279      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16280$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16281      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16282    fi
16283  else
16284    input_to_shortpath="$new_path"
16285  fi
16286
16287  # Call helper function which possibly converts this using DOS-style short mode.
16288  # If so, the updated path is stored in $new_path.
16289  new_path="$input_to_shortpath"
16290
16291  input_path="$input_to_shortpath"
16292  # Check if we need to convert this using DOS-style short mode. If the path
16293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16294  # take no chances and rewrite it.
16295  # Note: m4 eats our [], so we need to use [ and ] instead.
16296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16297  if test "x$has_forbidden_chars" != x; then
16298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16302      # Going to short mode and back again did indeed matter. Since short mode is
16303      # case insensitive, let's make it lowercase to improve readability.
16304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16305      # Now convert it back to Unix-stile (cygpath)
16306      input_path=`$CYGPATH -u "$shortmode_path"`
16307      new_path="$input_path"
16308    fi
16309  fi
16310
16311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16312  if test "x$test_cygdrive_prefix" = x; then
16313    # As a simple fix, exclude /usr/bin since it's not a real path.
16314    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16316      # a path prefixed by /cygdrive for fixpath to work.
16317      new_path="$CYGWIN_ROOT_PATH$input_path"
16318    fi
16319  fi
16320
16321  # remove trailing .exe if any
16322  new_path="${new_path/%.exe/}"
16323
16324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325
16326  # First separate the path from the arguments. This will split at the first
16327  # space.
16328  complete="$FOUND_MAKE"
16329  path="${complete%% *}"
16330  tmp="$complete EOL"
16331  arguments="${tmp#* }"
16332
16333  # Input might be given as Windows format, start by converting to
16334  # unix format.
16335  new_path="$path"
16336
16337  windows_path="$new_path"
16338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16339    unix_path=`$CYGPATH -u "$windows_path"`
16340    new_path="$unix_path"
16341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16343    new_path="$unix_path"
16344  fi
16345
16346
16347  # Now try to locate executable using which
16348  new_path=`$WHICH "$new_path" 2> /dev/null`
16349
16350  if test "x$new_path" = x; then
16351    # Oops. Which didn't find the executable.
16352    # The splitting of arguments from the executable at a space might have been incorrect,
16353    # since paths with space are more likely in Windows. Give it another try with the whole
16354    # argument.
16355    path="$complete"
16356    arguments="EOL"
16357    new_path="$path"
16358
16359  windows_path="$new_path"
16360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16361    unix_path=`$CYGPATH -u "$windows_path"`
16362    new_path="$unix_path"
16363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16365    new_path="$unix_path"
16366  fi
16367
16368
16369    new_path=`$WHICH "$new_path" 2> /dev/null`
16370    # bat and cmd files are not always considered executable in MSYS causing which
16371    # to not find them
16372    if test "x$new_path" = x \
16373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16375      new_path="$path"
16376
16377  windows_path="$new_path"
16378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16379    unix_path=`$CYGPATH -u "$windows_path"`
16380    new_path="$unix_path"
16381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16383    new_path="$unix_path"
16384  fi
16385
16386    fi
16387
16388    if test "x$new_path" = x; then
16389      # It's still not found. Now this is an unrecoverable error.
16390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16391$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16392      has_space=`$ECHO "$complete" | $GREP " "`
16393      if test "x$has_space" != x; then
16394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16396      fi
16397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16398    fi
16399  fi
16400
16401  # Now new_path has a complete unix path to the binary
16402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16403    # Keep paths in /bin as-is, but remove trailing .exe if any
16404    new_path="${new_path/%.exe/}"
16405    # Do not save /bin paths to all_fixpath_prefixes!
16406  else
16407    # Not in mixed or Windows style, start by that.
16408    new_path=`cmd //c echo $new_path`
16409
16410  input_path="$new_path"
16411  # Check if we need to convert this using DOS-style short mode. If the path
16412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16413  # take no chances and rewrite it.
16414  # Note: m4 eats our [], so we need to use [ and ] instead.
16415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16416  if test "x$has_forbidden_chars" != x; then
16417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16419  fi
16420
16421    # Output is in $new_path
16422
16423  windows_path="$new_path"
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425    unix_path=`$CYGPATH -u "$windows_path"`
16426    new_path="$unix_path"
16427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16429    new_path="$unix_path"
16430  fi
16431
16432    # remove trailing .exe if any
16433    new_path="${new_path/%.exe/}"
16434
16435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16437  fi
16438
16439  else
16440    # We're on a posix platform. Hooray! :)
16441    # First separate the path from the arguments. This will split at the first
16442    # space.
16443    complete="$FOUND_MAKE"
16444    path="${complete%% *}"
16445    tmp="$complete EOL"
16446    arguments="${tmp#* }"
16447
16448    # Cannot rely on the command "which" here since it doesn't always work.
16449    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16450    if test -z "$is_absolute_path"; then
16451      # Path to executable is not absolute. Find it.
16452      IFS_save="$IFS"
16453      IFS=:
16454      for p in $PATH; do
16455        if test -f "$p/$path" && test -x "$p/$path"; then
16456          new_path="$p/$path"
16457          break
16458        fi
16459      done
16460      IFS="$IFS_save"
16461    else
16462      # This is an absolute path, we can use it without further modifications.
16463      new_path="$path"
16464    fi
16465
16466    if test "x$new_path" = x; then
16467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16468$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16469      has_space=`$ECHO "$complete" | $GREP " "`
16470      if test "x$has_space" != x; then
16471        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16472$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16473      fi
16474      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16475    fi
16476  fi
16477
16478  # Now join together the path and the arguments once again
16479  if test "x$arguments" != xEOL; then
16480    new_complete="$new_path ${arguments% *}"
16481  else
16482    new_complete="$new_path"
16483  fi
16484
16485  if test "x$complete" != "x$new_complete"; then
16486    FOUND_MAKE="$new_complete"
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16488$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16489  fi
16490
16491        fi
16492      fi
16493    fi
16494  fi
16495
16496    fi
16497
16498    if test "x$FOUND_MAKE" = x; then
16499      if test "x$TOOLCHAIN_PATH" != x; then
16500        # We have a toolchain path, check that as well before giving up.
16501        OLD_PATH=$PATH
16502        PATH=$TOOLCHAIN_PATH:$PATH
16503        for ac_prog in gmake
16504do
16505  # Extract the first word of "$ac_prog", so it can be a program name with args.
16506set dummy $ac_prog; ac_word=$2
16507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16508$as_echo_n "checking for $ac_word... " >&6; }
16509if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16510  $as_echo_n "(cached) " >&6
16511else
16512  case $CHECK_TOOLSDIR_GMAKE in
16513  [\\/]* | ?:[\\/]*)
16514  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16515  ;;
16516  *)
16517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16518for as_dir in $PATH
16519do
16520  IFS=$as_save_IFS
16521  test -z "$as_dir" && as_dir=.
16522    for ac_exec_ext in '' $ac_executable_extensions; do
16523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16524    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16526    break 2
16527  fi
16528done
16529  done
16530IFS=$as_save_IFS
16531
16532  ;;
16533esac
16534fi
16535CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16536if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16538$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16539else
16540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16541$as_echo "no" >&6; }
16542fi
16543
16544
16545  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16546done
16547
16548
16549  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16550  DESCRIPTION="gmake in tools-dir"
16551  if test "x$MAKE_CANDIDATE" != x; then
16552    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16553$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16554    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16555    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16556    if test "x$IS_GNU_MAKE" = x; then
16557      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16558$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16559    else
16560      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16561      if test "x$IS_MODERN_MAKE" = x; then
16562        { $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
16563$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;}
16564      else
16565        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16566          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16567            MAKE_EXPECTED_ENV='cygwin'
16568          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16569            MAKE_EXPECTED_ENV='msys'
16570          else
16571            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16572          fi
16573          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16574          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16575        else
16576          # Not relevant for non-Windows
16577          IS_MAKE_CORRECT_ENV=true
16578        fi
16579        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16580          { $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
16581$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;}
16582        else
16583          FOUND_MAKE=$MAKE_CANDIDATE
16584
16585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16586
16587  # First separate the path from the arguments. This will split at the first
16588  # space.
16589  complete="$FOUND_MAKE"
16590  path="${complete%% *}"
16591  tmp="$complete EOL"
16592  arguments="${tmp#* }"
16593
16594  # Input might be given as Windows format, start by converting to
16595  # unix format.
16596  new_path=`$CYGPATH -u "$path"`
16597
16598  # Now try to locate executable using which
16599  new_path=`$WHICH "$new_path" 2> /dev/null`
16600  # bat and cmd files are not always considered executable in cygwin causing which
16601  # to not find them
16602  if test "x$new_path" = x \
16603      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16604      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16605    new_path=`$CYGPATH -u "$path"`
16606  fi
16607  if test "x$new_path" = x; then
16608    # Oops. Which didn't find the executable.
16609    # The splitting of arguments from the executable at a space might have been incorrect,
16610    # since paths with space are more likely in Windows. Give it another try with the whole
16611    # argument.
16612    path="$complete"
16613    arguments="EOL"
16614    new_path=`$CYGPATH -u "$path"`
16615    new_path=`$WHICH "$new_path" 2> /dev/null`
16616    # bat and cmd files are not always considered executable in cygwin causing which
16617    # to not find them
16618    if test "x$new_path" = x \
16619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16621      new_path=`$CYGPATH -u "$path"`
16622    fi
16623    if test "x$new_path" = x; then
16624      # It's still not found. Now this is an unrecoverable error.
16625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16626$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16627      has_space=`$ECHO "$complete" | $GREP " "`
16628      if test "x$has_space" != x; then
16629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16631      fi
16632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16633    fi
16634  fi
16635
16636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16639  # "foo.exe" is OK but "foo" is an error.
16640  #
16641  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16642  # It is also a way to make sure we got the proper file name for the real test later on.
16643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16644  if test "x$test_shortpath" = x; then
16645    # Short path failed, file does not exist as specified.
16646    # Try adding .exe or .cmd
16647    if test -f "${new_path}.exe"; then
16648      input_to_shortpath="${new_path}.exe"
16649    elif test -f "${new_path}.cmd"; then
16650      input_to_shortpath="${new_path}.cmd"
16651    else
16652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16653$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16654      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16656      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16657    fi
16658  else
16659    input_to_shortpath="$new_path"
16660  fi
16661
16662  # Call helper function which possibly converts this using DOS-style short mode.
16663  # If so, the updated path is stored in $new_path.
16664  new_path="$input_to_shortpath"
16665
16666  input_path="$input_to_shortpath"
16667  # Check if we need to convert this using DOS-style short mode. If the path
16668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16669  # take no chances and rewrite it.
16670  # Note: m4 eats our [], so we need to use [ and ] instead.
16671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16672  if test "x$has_forbidden_chars" != x; then
16673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16677      # Going to short mode and back again did indeed matter. Since short mode is
16678      # case insensitive, let's make it lowercase to improve readability.
16679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16680      # Now convert it back to Unix-stile (cygpath)
16681      input_path=`$CYGPATH -u "$shortmode_path"`
16682      new_path="$input_path"
16683    fi
16684  fi
16685
16686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16687  if test "x$test_cygdrive_prefix" = x; then
16688    # As a simple fix, exclude /usr/bin since it's not a real path.
16689    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16691      # a path prefixed by /cygdrive for fixpath to work.
16692      new_path="$CYGWIN_ROOT_PATH$input_path"
16693    fi
16694  fi
16695
16696  # remove trailing .exe if any
16697  new_path="${new_path/%.exe/}"
16698
16699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16700
16701  # First separate the path from the arguments. This will split at the first
16702  # space.
16703  complete="$FOUND_MAKE"
16704  path="${complete%% *}"
16705  tmp="$complete EOL"
16706  arguments="${tmp#* }"
16707
16708  # Input might be given as Windows format, start by converting to
16709  # unix format.
16710  new_path="$path"
16711
16712  windows_path="$new_path"
16713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16714    unix_path=`$CYGPATH -u "$windows_path"`
16715    new_path="$unix_path"
16716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16718    new_path="$unix_path"
16719  fi
16720
16721
16722  # Now try to locate executable using which
16723  new_path=`$WHICH "$new_path" 2> /dev/null`
16724
16725  if test "x$new_path" = x; then
16726    # Oops. Which didn't find the executable.
16727    # The splitting of arguments from the executable at a space might have been incorrect,
16728    # since paths with space are more likely in Windows. Give it another try with the whole
16729    # argument.
16730    path="$complete"
16731    arguments="EOL"
16732    new_path="$path"
16733
16734  windows_path="$new_path"
16735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16736    unix_path=`$CYGPATH -u "$windows_path"`
16737    new_path="$unix_path"
16738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16740    new_path="$unix_path"
16741  fi
16742
16743
16744    new_path=`$WHICH "$new_path" 2> /dev/null`
16745    # bat and cmd files are not always considered executable in MSYS causing which
16746    # to not find them
16747    if test "x$new_path" = x \
16748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16750      new_path="$path"
16751
16752  windows_path="$new_path"
16753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16754    unix_path=`$CYGPATH -u "$windows_path"`
16755    new_path="$unix_path"
16756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16758    new_path="$unix_path"
16759  fi
16760
16761    fi
16762
16763    if test "x$new_path" = x; then
16764      # It's still not found. Now this is an unrecoverable error.
16765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16766$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16767      has_space=`$ECHO "$complete" | $GREP " "`
16768      if test "x$has_space" != x; then
16769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16771      fi
16772      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16773    fi
16774  fi
16775
16776  # Now new_path has a complete unix path to the binary
16777  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16778    # Keep paths in /bin as-is, but remove trailing .exe if any
16779    new_path="${new_path/%.exe/}"
16780    # Do not save /bin paths to all_fixpath_prefixes!
16781  else
16782    # Not in mixed or Windows style, start by that.
16783    new_path=`cmd //c echo $new_path`
16784
16785  input_path="$new_path"
16786  # Check if we need to convert this using DOS-style short mode. If the path
16787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16788  # take no chances and rewrite it.
16789  # Note: m4 eats our [], so we need to use [ and ] instead.
16790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16791  if test "x$has_forbidden_chars" != x; then
16792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16794  fi
16795
16796    # Output is in $new_path
16797
16798  windows_path="$new_path"
16799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16800    unix_path=`$CYGPATH -u "$windows_path"`
16801    new_path="$unix_path"
16802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16804    new_path="$unix_path"
16805  fi
16806
16807    # remove trailing .exe if any
16808    new_path="${new_path/%.exe/}"
16809
16810    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16811    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16812  fi
16813
16814  else
16815    # We're on a posix platform. Hooray! :)
16816    # First separate the path from the arguments. This will split at the first
16817    # space.
16818    complete="$FOUND_MAKE"
16819    path="${complete%% *}"
16820    tmp="$complete EOL"
16821    arguments="${tmp#* }"
16822
16823    # Cannot rely on the command "which" here since it doesn't always work.
16824    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16825    if test -z "$is_absolute_path"; then
16826      # Path to executable is not absolute. Find it.
16827      IFS_save="$IFS"
16828      IFS=:
16829      for p in $PATH; do
16830        if test -f "$p/$path" && test -x "$p/$path"; then
16831          new_path="$p/$path"
16832          break
16833        fi
16834      done
16835      IFS="$IFS_save"
16836    else
16837      # This is an absolute path, we can use it without further modifications.
16838      new_path="$path"
16839    fi
16840
16841    if test "x$new_path" = x; then
16842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16844      has_space=`$ECHO "$complete" | $GREP " "`
16845      if test "x$has_space" != x; then
16846        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16848      fi
16849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16850    fi
16851  fi
16852
16853  # Now join together the path and the arguments once again
16854  if test "x$arguments" != xEOL; then
16855    new_complete="$new_path ${arguments% *}"
16856  else
16857    new_complete="$new_path"
16858  fi
16859
16860  if test "x$complete" != "x$new_complete"; then
16861    FOUND_MAKE="$new_complete"
16862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16863$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16864  fi
16865
16866        fi
16867      fi
16868    fi
16869  fi
16870
16871        if test "x$FOUND_MAKE" = x; then
16872          for ac_prog in make
16873do
16874  # Extract the first word of "$ac_prog", so it can be a program name with args.
16875set dummy $ac_prog; ac_word=$2
16876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16877$as_echo_n "checking for $ac_word... " >&6; }
16878if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16879  $as_echo_n "(cached) " >&6
16880else
16881  case $CHECK_TOOLSDIR_MAKE in
16882  [\\/]* | ?:[\\/]*)
16883  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16884  ;;
16885  *)
16886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16887for as_dir in $PATH
16888do
16889  IFS=$as_save_IFS
16890  test -z "$as_dir" && as_dir=.
16891    for ac_exec_ext in '' $ac_executable_extensions; do
16892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16893    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16895    break 2
16896  fi
16897done
16898  done
16899IFS=$as_save_IFS
16900
16901  ;;
16902esac
16903fi
16904CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16905if test -n "$CHECK_TOOLSDIR_MAKE"; then
16906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16907$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16908else
16909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16910$as_echo "no" >&6; }
16911fi
16912
16913
16914  test -n "$CHECK_TOOLSDIR_MAKE" && break
16915done
16916
16917
16918  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16919  DESCRIPTION="make in tools-dir"
16920  if test "x$MAKE_CANDIDATE" != x; then
16921    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16922$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16923    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16924    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16925    if test "x$IS_GNU_MAKE" = x; then
16926      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16927$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16928    else
16929      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16930      if test "x$IS_MODERN_MAKE" = x; then
16931        { $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
16932$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;}
16933      else
16934        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16935          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16936            MAKE_EXPECTED_ENV='cygwin'
16937          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16938            MAKE_EXPECTED_ENV='msys'
16939          else
16940            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16941          fi
16942          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16943          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16944        else
16945          # Not relevant for non-Windows
16946          IS_MAKE_CORRECT_ENV=true
16947        fi
16948        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16949          { $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
16950$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;}
16951        else
16952          FOUND_MAKE=$MAKE_CANDIDATE
16953
16954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16955
16956  # First separate the path from the arguments. This will split at the first
16957  # space.
16958  complete="$FOUND_MAKE"
16959  path="${complete%% *}"
16960  tmp="$complete EOL"
16961  arguments="${tmp#* }"
16962
16963  # Input might be given as Windows format, start by converting to
16964  # unix format.
16965  new_path=`$CYGPATH -u "$path"`
16966
16967  # Now try to locate executable using which
16968  new_path=`$WHICH "$new_path" 2> /dev/null`
16969  # bat and cmd files are not always considered executable in cygwin causing which
16970  # to not find them
16971  if test "x$new_path" = x \
16972      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16973      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16974    new_path=`$CYGPATH -u "$path"`
16975  fi
16976  if test "x$new_path" = x; then
16977    # Oops. Which didn't find the executable.
16978    # The splitting of arguments from the executable at a space might have been incorrect,
16979    # since paths with space are more likely in Windows. Give it another try with the whole
16980    # argument.
16981    path="$complete"
16982    arguments="EOL"
16983    new_path=`$CYGPATH -u "$path"`
16984    new_path=`$WHICH "$new_path" 2> /dev/null`
16985    # bat and cmd files are not always considered executable in cygwin causing which
16986    # to not find them
16987    if test "x$new_path" = x \
16988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16990      new_path=`$CYGPATH -u "$path"`
16991    fi
16992    if test "x$new_path" = x; then
16993      # It's still not found. Now this is an unrecoverable error.
16994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16995$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16996      has_space=`$ECHO "$complete" | $GREP " "`
16997      if test "x$has_space" != x; then
16998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17000      fi
17001      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17002    fi
17003  fi
17004
17005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17008  # "foo.exe" is OK but "foo" is an error.
17009  #
17010  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17011  # It is also a way to make sure we got the proper file name for the real test later on.
17012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17013  if test "x$test_shortpath" = x; then
17014    # Short path failed, file does not exist as specified.
17015    # Try adding .exe or .cmd
17016    if test -f "${new_path}.exe"; then
17017      input_to_shortpath="${new_path}.exe"
17018    elif test -f "${new_path}.cmd"; then
17019      input_to_shortpath="${new_path}.cmd"
17020    else
17021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17025      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17026    fi
17027  else
17028    input_to_shortpath="$new_path"
17029  fi
17030
17031  # Call helper function which possibly converts this using DOS-style short mode.
17032  # If so, the updated path is stored in $new_path.
17033  new_path="$input_to_shortpath"
17034
17035  input_path="$input_to_shortpath"
17036  # Check if we need to convert this using DOS-style short mode. If the path
17037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17038  # take no chances and rewrite it.
17039  # Note: m4 eats our [], so we need to use [ and ] instead.
17040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17041  if test "x$has_forbidden_chars" != x; then
17042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17046      # Going to short mode and back again did indeed matter. Since short mode is
17047      # case insensitive, let's make it lowercase to improve readability.
17048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17049      # Now convert it back to Unix-stile (cygpath)
17050      input_path=`$CYGPATH -u "$shortmode_path"`
17051      new_path="$input_path"
17052    fi
17053  fi
17054
17055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17056  if test "x$test_cygdrive_prefix" = x; then
17057    # As a simple fix, exclude /usr/bin since it's not a real path.
17058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17060      # a path prefixed by /cygdrive for fixpath to work.
17061      new_path="$CYGWIN_ROOT_PATH$input_path"
17062    fi
17063  fi
17064
17065  # remove trailing .exe if any
17066  new_path="${new_path/%.exe/}"
17067
17068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17069
17070  # First separate the path from the arguments. This will split at the first
17071  # space.
17072  complete="$FOUND_MAKE"
17073  path="${complete%% *}"
17074  tmp="$complete EOL"
17075  arguments="${tmp#* }"
17076
17077  # Input might be given as Windows format, start by converting to
17078  # unix format.
17079  new_path="$path"
17080
17081  windows_path="$new_path"
17082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17083    unix_path=`$CYGPATH -u "$windows_path"`
17084    new_path="$unix_path"
17085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17087    new_path="$unix_path"
17088  fi
17089
17090
17091  # Now try to locate executable using which
17092  new_path=`$WHICH "$new_path" 2> /dev/null`
17093
17094  if test "x$new_path" = x; then
17095    # Oops. Which didn't find the executable.
17096    # The splitting of arguments from the executable at a space might have been incorrect,
17097    # since paths with space are more likely in Windows. Give it another try with the whole
17098    # argument.
17099    path="$complete"
17100    arguments="EOL"
17101    new_path="$path"
17102
17103  windows_path="$new_path"
17104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17105    unix_path=`$CYGPATH -u "$windows_path"`
17106    new_path="$unix_path"
17107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17109    new_path="$unix_path"
17110  fi
17111
17112
17113    new_path=`$WHICH "$new_path" 2> /dev/null`
17114    # bat and cmd files are not always considered executable in MSYS causing which
17115    # to not find them
17116    if test "x$new_path" = x \
17117        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17118        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17119      new_path="$path"
17120
17121  windows_path="$new_path"
17122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17123    unix_path=`$CYGPATH -u "$windows_path"`
17124    new_path="$unix_path"
17125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17127    new_path="$unix_path"
17128  fi
17129
17130    fi
17131
17132    if test "x$new_path" = x; then
17133      # It's still not found. Now this is an unrecoverable error.
17134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17135$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17136      has_space=`$ECHO "$complete" | $GREP " "`
17137      if test "x$has_space" != x; then
17138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17140      fi
17141      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17142    fi
17143  fi
17144
17145  # Now new_path has a complete unix path to the binary
17146  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17147    # Keep paths in /bin as-is, but remove trailing .exe if any
17148    new_path="${new_path/%.exe/}"
17149    # Do not save /bin paths to all_fixpath_prefixes!
17150  else
17151    # Not in mixed or Windows style, start by that.
17152    new_path=`cmd //c echo $new_path`
17153
17154  input_path="$new_path"
17155  # Check if we need to convert this using DOS-style short mode. If the path
17156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17157  # take no chances and rewrite it.
17158  # Note: m4 eats our [], so we need to use [ and ] instead.
17159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17160  if test "x$has_forbidden_chars" != x; then
17161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17163  fi
17164
17165    # Output is in $new_path
17166
17167  windows_path="$new_path"
17168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17169    unix_path=`$CYGPATH -u "$windows_path"`
17170    new_path="$unix_path"
17171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17173    new_path="$unix_path"
17174  fi
17175
17176    # remove trailing .exe if any
17177    new_path="${new_path/%.exe/}"
17178
17179    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17180    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17181  fi
17182
17183  else
17184    # We're on a posix platform. Hooray! :)
17185    # First separate the path from the arguments. This will split at the first
17186    # space.
17187    complete="$FOUND_MAKE"
17188    path="${complete%% *}"
17189    tmp="$complete EOL"
17190    arguments="${tmp#* }"
17191
17192    # Cannot rely on the command "which" here since it doesn't always work.
17193    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17194    if test -z "$is_absolute_path"; then
17195      # Path to executable is not absolute. Find it.
17196      IFS_save="$IFS"
17197      IFS=:
17198      for p in $PATH; do
17199        if test -f "$p/$path" && test -x "$p/$path"; then
17200          new_path="$p/$path"
17201          break
17202        fi
17203      done
17204      IFS="$IFS_save"
17205    else
17206      # This is an absolute path, we can use it without further modifications.
17207      new_path="$path"
17208    fi
17209
17210    if test "x$new_path" = x; then
17211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17213      has_space=`$ECHO "$complete" | $GREP " "`
17214      if test "x$has_space" != x; then
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17217      fi
17218      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17219    fi
17220  fi
17221
17222  # Now join together the path and the arguments once again
17223  if test "x$arguments" != xEOL; then
17224    new_complete="$new_path ${arguments% *}"
17225  else
17226    new_complete="$new_path"
17227  fi
17228
17229  if test "x$complete" != "x$new_complete"; then
17230    FOUND_MAKE="$new_complete"
17231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17232$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17233  fi
17234
17235        fi
17236      fi
17237    fi
17238  fi
17239
17240        fi
17241        PATH=$OLD_PATH
17242      fi
17243    fi
17244
17245    if test "x$FOUND_MAKE" = x; then
17246      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
17247    fi
17248  fi
17249
17250  MAKE=$FOUND_MAKE
17251
17252  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17253$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17254
17255
17256  # Check if make supports the output sync option and if so, setup using it.
17257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17258$as_echo_n "checking if make --output-sync is supported... " >&6; }
17259  if $MAKE --version -O > /dev/null 2>&1; then
17260    OUTPUT_SYNC_SUPPORTED=true
17261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17262$as_echo "yes" >&6; }
17263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17264$as_echo_n "checking for output-sync value... " >&6; }
17265
17266# Check whether --with-output-sync was given.
17267if test "${with_output_sync+set}" = set; then :
17268  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17269fi
17270
17271    if test "x$OUTPUT_SYNC" = "x"; then
17272      OUTPUT_SYNC=none
17273    fi
17274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17275$as_echo "$OUTPUT_SYNC" >&6; }
17276    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17277      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17278    fi
17279  else
17280    OUTPUT_SYNC_SUPPORTED=false
17281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17282$as_echo "no" >&6; }
17283  fi
17284
17285
17286
17287
17288
17289
17290  # Test if find supports -delete
17291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17292$as_echo_n "checking if find supports -delete... " >&6; }
17293  FIND_DELETE="-delete"
17294
17295  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17296
17297  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17298
17299  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17300  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17301    # No, it does not.
17302    rm $DELETEDIR/TestIfFindSupportsDelete
17303    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17304      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17305      FIND_DELETE="-print | xargs rm"
17306    else
17307      FIND_DELETE="-exec rm \{\} \+"
17308    fi
17309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17310$as_echo "no" >&6; }
17311  else
17312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17313$as_echo "yes" >&6; }
17314  fi
17315  rmdir $DELETEDIR
17316
17317
17318
17319  # These tools might not be installed by default,
17320  # need hint on how to install them.
17321
17322
17323
17324  # Publish this variable in the help.
17325
17326
17327  if test "x$UNZIP" = x; then
17328    # The variable is not set by user, try to locate tool using the code snippet
17329    for ac_prog in unzip
17330do
17331  # Extract the first word of "$ac_prog", so it can be a program name with args.
17332set dummy $ac_prog; ac_word=$2
17333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17334$as_echo_n "checking for $ac_word... " >&6; }
17335if ${ac_cv_path_UNZIP+:} false; then :
17336  $as_echo_n "(cached) " >&6
17337else
17338  case $UNZIP in
17339  [\\/]* | ?:[\\/]*)
17340  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17341  ;;
17342  *)
17343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17344for as_dir in $PATH
17345do
17346  IFS=$as_save_IFS
17347  test -z "$as_dir" && as_dir=.
17348    for ac_exec_ext in '' $ac_executable_extensions; do
17349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17350    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17352    break 2
17353  fi
17354done
17355  done
17356IFS=$as_save_IFS
17357
17358  ;;
17359esac
17360fi
17361UNZIP=$ac_cv_path_UNZIP
17362if test -n "$UNZIP"; then
17363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17364$as_echo "$UNZIP" >&6; }
17365else
17366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17367$as_echo "no" >&6; }
17368fi
17369
17370
17371  test -n "$UNZIP" && break
17372done
17373
17374  else
17375    # The variable is set, but is it from the command line or the environment?
17376
17377    # Try to remove the string !UNZIP! from our list.
17378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17380      # If it failed, the variable was not from the command line. Ignore it,
17381      # but warn the user (except for BASH, which is always set by the calling BASH).
17382      if test "xUNZIP" != xBASH; then
17383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17384$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17385      fi
17386      # Try to locate tool using the code snippet
17387      for ac_prog in unzip
17388do
17389  # Extract the first word of "$ac_prog", so it can be a program name with args.
17390set dummy $ac_prog; ac_word=$2
17391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17392$as_echo_n "checking for $ac_word... " >&6; }
17393if ${ac_cv_path_UNZIP+:} false; then :
17394  $as_echo_n "(cached) " >&6
17395else
17396  case $UNZIP in
17397  [\\/]* | ?:[\\/]*)
17398  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17399  ;;
17400  *)
17401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17402for as_dir in $PATH
17403do
17404  IFS=$as_save_IFS
17405  test -z "$as_dir" && as_dir=.
17406    for ac_exec_ext in '' $ac_executable_extensions; do
17407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17408    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17410    break 2
17411  fi
17412done
17413  done
17414IFS=$as_save_IFS
17415
17416  ;;
17417esac
17418fi
17419UNZIP=$ac_cv_path_UNZIP
17420if test -n "$UNZIP"; then
17421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17422$as_echo "$UNZIP" >&6; }
17423else
17424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17425$as_echo "no" >&6; }
17426fi
17427
17428
17429  test -n "$UNZIP" && break
17430done
17431
17432    else
17433      # If it succeeded, then it was overridden by the user. We will use it
17434      # for the tool.
17435
17436      # First remove it from the list of overridden variables, so we can test
17437      # for unknown variables in the end.
17438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17439
17440      # Check if the provided tool contains a complete path.
17441      tool_specified="$UNZIP"
17442      tool_basename="${tool_specified##*/}"
17443      if test "x$tool_basename" = "x$tool_specified"; then
17444        # A command without a complete path is provided, search $PATH.
17445        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17446$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17447        # Extract the first word of "$tool_basename", so it can be a program name with args.
17448set dummy $tool_basename; ac_word=$2
17449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17450$as_echo_n "checking for $ac_word... " >&6; }
17451if ${ac_cv_path_UNZIP+:} false; then :
17452  $as_echo_n "(cached) " >&6
17453else
17454  case $UNZIP in
17455  [\\/]* | ?:[\\/]*)
17456  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17457  ;;
17458  *)
17459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17460for as_dir in $PATH
17461do
17462  IFS=$as_save_IFS
17463  test -z "$as_dir" && as_dir=.
17464    for ac_exec_ext in '' $ac_executable_extensions; do
17465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17466    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17468    break 2
17469  fi
17470done
17471  done
17472IFS=$as_save_IFS
17473
17474  ;;
17475esac
17476fi
17477UNZIP=$ac_cv_path_UNZIP
17478if test -n "$UNZIP"; then
17479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17480$as_echo "$UNZIP" >&6; }
17481else
17482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17483$as_echo "no" >&6; }
17484fi
17485
17486
17487        if test "x$UNZIP" = x; then
17488          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17489        fi
17490      else
17491        # Otherwise we believe it is a complete path. Use it as it is.
17492        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17493$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17495$as_echo_n "checking for UNZIP... " >&6; }
17496        if test ! -x "$tool_specified"; then
17497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17498$as_echo "not found" >&6; }
17499          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17500        fi
17501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17502$as_echo "$tool_specified" >&6; }
17503      fi
17504    fi
17505  fi
17506
17507
17508
17509  if test "x$UNZIP" = x; then
17510    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17511  fi
17512
17513
17514
17515
17516
17517  # Publish this variable in the help.
17518
17519
17520  if test "x$ZIP" = x; then
17521    # The variable is not set by user, try to locate tool using the code snippet
17522    for ac_prog in zip
17523do
17524  # Extract the first word of "$ac_prog", so it can be a program name with args.
17525set dummy $ac_prog; ac_word=$2
17526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17527$as_echo_n "checking for $ac_word... " >&6; }
17528if ${ac_cv_path_ZIP+:} false; then :
17529  $as_echo_n "(cached) " >&6
17530else
17531  case $ZIP in
17532  [\\/]* | ?:[\\/]*)
17533  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17534  ;;
17535  *)
17536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17537for as_dir in $PATH
17538do
17539  IFS=$as_save_IFS
17540  test -z "$as_dir" && as_dir=.
17541    for ac_exec_ext in '' $ac_executable_extensions; do
17542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17543    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17545    break 2
17546  fi
17547done
17548  done
17549IFS=$as_save_IFS
17550
17551  ;;
17552esac
17553fi
17554ZIP=$ac_cv_path_ZIP
17555if test -n "$ZIP"; then
17556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17557$as_echo "$ZIP" >&6; }
17558else
17559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17560$as_echo "no" >&6; }
17561fi
17562
17563
17564  test -n "$ZIP" && break
17565done
17566
17567  else
17568    # The variable is set, but is it from the command line or the environment?
17569
17570    # Try to remove the string !ZIP! from our list.
17571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17573      # If it failed, the variable was not from the command line. Ignore it,
17574      # but warn the user (except for BASH, which is always set by the calling BASH).
17575      if test "xZIP" != xBASH; then
17576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17577$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17578      fi
17579      # Try to locate tool using the code snippet
17580      for ac_prog in zip
17581do
17582  # Extract the first word of "$ac_prog", so it can be a program name with args.
17583set dummy $ac_prog; ac_word=$2
17584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17585$as_echo_n "checking for $ac_word... " >&6; }
17586if ${ac_cv_path_ZIP+:} false; then :
17587  $as_echo_n "(cached) " >&6
17588else
17589  case $ZIP in
17590  [\\/]* | ?:[\\/]*)
17591  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17592  ;;
17593  *)
17594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17595for as_dir in $PATH
17596do
17597  IFS=$as_save_IFS
17598  test -z "$as_dir" && as_dir=.
17599    for ac_exec_ext in '' $ac_executable_extensions; do
17600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17601    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17603    break 2
17604  fi
17605done
17606  done
17607IFS=$as_save_IFS
17608
17609  ;;
17610esac
17611fi
17612ZIP=$ac_cv_path_ZIP
17613if test -n "$ZIP"; then
17614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17615$as_echo "$ZIP" >&6; }
17616else
17617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17618$as_echo "no" >&6; }
17619fi
17620
17621
17622  test -n "$ZIP" && break
17623done
17624
17625    else
17626      # If it succeeded, then it was overridden by the user. We will use it
17627      # for the tool.
17628
17629      # First remove it from the list of overridden variables, so we can test
17630      # for unknown variables in the end.
17631      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17632
17633      # Check if the provided tool contains a complete path.
17634      tool_specified="$ZIP"
17635      tool_basename="${tool_specified##*/}"
17636      if test "x$tool_basename" = "x$tool_specified"; then
17637        # A command without a complete path is provided, search $PATH.
17638        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17639$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17640        # Extract the first word of "$tool_basename", so it can be a program name with args.
17641set dummy $tool_basename; ac_word=$2
17642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17643$as_echo_n "checking for $ac_word... " >&6; }
17644if ${ac_cv_path_ZIP+:} false; then :
17645  $as_echo_n "(cached) " >&6
17646else
17647  case $ZIP in
17648  [\\/]* | ?:[\\/]*)
17649  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17650  ;;
17651  *)
17652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17653for as_dir in $PATH
17654do
17655  IFS=$as_save_IFS
17656  test -z "$as_dir" && as_dir=.
17657    for ac_exec_ext in '' $ac_executable_extensions; do
17658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17659    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17661    break 2
17662  fi
17663done
17664  done
17665IFS=$as_save_IFS
17666
17667  ;;
17668esac
17669fi
17670ZIP=$ac_cv_path_ZIP
17671if test -n "$ZIP"; then
17672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17673$as_echo "$ZIP" >&6; }
17674else
17675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17676$as_echo "no" >&6; }
17677fi
17678
17679
17680        if test "x$ZIP" = x; then
17681          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17682        fi
17683      else
17684        # Otherwise we believe it is a complete path. Use it as it is.
17685        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17686$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17688$as_echo_n "checking for ZIP... " >&6; }
17689        if test ! -x "$tool_specified"; then
17690          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17691$as_echo "not found" >&6; }
17692          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17693        fi
17694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17695$as_echo "$tool_specified" >&6; }
17696      fi
17697    fi
17698  fi
17699
17700
17701
17702  if test "x$ZIP" = x; then
17703    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17704  fi
17705
17706
17707
17708  # Non-required basic tools
17709
17710
17711
17712  # Publish this variable in the help.
17713
17714
17715  if test "x$LDD" = x; then
17716    # The variable is not set by user, try to locate tool using the code snippet
17717    for ac_prog in ldd
17718do
17719  # Extract the first word of "$ac_prog", so it can be a program name with args.
17720set dummy $ac_prog; ac_word=$2
17721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17722$as_echo_n "checking for $ac_word... " >&6; }
17723if ${ac_cv_path_LDD+:} false; then :
17724  $as_echo_n "(cached) " >&6
17725else
17726  case $LDD in
17727  [\\/]* | ?:[\\/]*)
17728  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17729  ;;
17730  *)
17731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17732for as_dir in $PATH
17733do
17734  IFS=$as_save_IFS
17735  test -z "$as_dir" && as_dir=.
17736    for ac_exec_ext in '' $ac_executable_extensions; do
17737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17738    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17740    break 2
17741  fi
17742done
17743  done
17744IFS=$as_save_IFS
17745
17746  ;;
17747esac
17748fi
17749LDD=$ac_cv_path_LDD
17750if test -n "$LDD"; then
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17752$as_echo "$LDD" >&6; }
17753else
17754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17755$as_echo "no" >&6; }
17756fi
17757
17758
17759  test -n "$LDD" && break
17760done
17761
17762  else
17763    # The variable is set, but is it from the command line or the environment?
17764
17765    # Try to remove the string !LDD! from our list.
17766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17768      # If it failed, the variable was not from the command line. Ignore it,
17769      # but warn the user (except for BASH, which is always set by the calling BASH).
17770      if test "xLDD" != xBASH; then
17771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17772$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17773      fi
17774      # Try to locate tool using the code snippet
17775      for ac_prog in ldd
17776do
17777  # Extract the first word of "$ac_prog", so it can be a program name with args.
17778set dummy $ac_prog; ac_word=$2
17779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17780$as_echo_n "checking for $ac_word... " >&6; }
17781if ${ac_cv_path_LDD+:} false; then :
17782  $as_echo_n "(cached) " >&6
17783else
17784  case $LDD in
17785  [\\/]* | ?:[\\/]*)
17786  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17787  ;;
17788  *)
17789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17790for as_dir in $PATH
17791do
17792  IFS=$as_save_IFS
17793  test -z "$as_dir" && as_dir=.
17794    for ac_exec_ext in '' $ac_executable_extensions; do
17795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17796    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17798    break 2
17799  fi
17800done
17801  done
17802IFS=$as_save_IFS
17803
17804  ;;
17805esac
17806fi
17807LDD=$ac_cv_path_LDD
17808if test -n "$LDD"; then
17809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17810$as_echo "$LDD" >&6; }
17811else
17812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17813$as_echo "no" >&6; }
17814fi
17815
17816
17817  test -n "$LDD" && break
17818done
17819
17820    else
17821      # If it succeeded, then it was overridden by the user. We will use it
17822      # for the tool.
17823
17824      # First remove it from the list of overridden variables, so we can test
17825      # for unknown variables in the end.
17826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17827
17828      # Check if the provided tool contains a complete path.
17829      tool_specified="$LDD"
17830      tool_basename="${tool_specified##*/}"
17831      if test "x$tool_basename" = "x$tool_specified"; then
17832        # A command without a complete path is provided, search $PATH.
17833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17834$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17835        # Extract the first word of "$tool_basename", so it can be a program name with args.
17836set dummy $tool_basename; ac_word=$2
17837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17838$as_echo_n "checking for $ac_word... " >&6; }
17839if ${ac_cv_path_LDD+:} false; then :
17840  $as_echo_n "(cached) " >&6
17841else
17842  case $LDD in
17843  [\\/]* | ?:[\\/]*)
17844  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17845  ;;
17846  *)
17847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17848for as_dir in $PATH
17849do
17850  IFS=$as_save_IFS
17851  test -z "$as_dir" && as_dir=.
17852    for ac_exec_ext in '' $ac_executable_extensions; do
17853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17854    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17856    break 2
17857  fi
17858done
17859  done
17860IFS=$as_save_IFS
17861
17862  ;;
17863esac
17864fi
17865LDD=$ac_cv_path_LDD
17866if test -n "$LDD"; then
17867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17868$as_echo "$LDD" >&6; }
17869else
17870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17871$as_echo "no" >&6; }
17872fi
17873
17874
17875        if test "x$LDD" = x; then
17876          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17877        fi
17878      else
17879        # Otherwise we believe it is a complete path. Use it as it is.
17880        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17881$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17883$as_echo_n "checking for LDD... " >&6; }
17884        if test ! -x "$tool_specified"; then
17885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17886$as_echo "not found" >&6; }
17887          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17888        fi
17889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17890$as_echo "$tool_specified" >&6; }
17891      fi
17892    fi
17893  fi
17894
17895
17896  if test "x$LDD" = "x"; then
17897    # List shared lib dependencies is used for
17898    # debug output and checking for forbidden dependencies.
17899    # We can build without it.
17900    LDD="true"
17901  fi
17902
17903
17904  # Publish this variable in the help.
17905
17906
17907  if test "x$OTOOL" = x; then
17908    # The variable is not set by user, try to locate tool using the code snippet
17909    for ac_prog in otool
17910do
17911  # Extract the first word of "$ac_prog", so it can be a program name with args.
17912set dummy $ac_prog; ac_word=$2
17913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17914$as_echo_n "checking for $ac_word... " >&6; }
17915if ${ac_cv_path_OTOOL+:} false; then :
17916  $as_echo_n "(cached) " >&6
17917else
17918  case $OTOOL in
17919  [\\/]* | ?:[\\/]*)
17920  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17921  ;;
17922  *)
17923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17924for as_dir in $PATH
17925do
17926  IFS=$as_save_IFS
17927  test -z "$as_dir" && as_dir=.
17928    for ac_exec_ext in '' $ac_executable_extensions; do
17929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17930    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17932    break 2
17933  fi
17934done
17935  done
17936IFS=$as_save_IFS
17937
17938  ;;
17939esac
17940fi
17941OTOOL=$ac_cv_path_OTOOL
17942if test -n "$OTOOL"; then
17943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17944$as_echo "$OTOOL" >&6; }
17945else
17946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17947$as_echo "no" >&6; }
17948fi
17949
17950
17951  test -n "$OTOOL" && break
17952done
17953
17954  else
17955    # The variable is set, but is it from the command line or the environment?
17956
17957    # Try to remove the string !OTOOL! from our list.
17958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17960      # If it failed, the variable was not from the command line. Ignore it,
17961      # but warn the user (except for BASH, which is always set by the calling BASH).
17962      if test "xOTOOL" != xBASH; then
17963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17964$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17965      fi
17966      # Try to locate tool using the code snippet
17967      for ac_prog in otool
17968do
17969  # Extract the first word of "$ac_prog", so it can be a program name with args.
17970set dummy $ac_prog; ac_word=$2
17971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17972$as_echo_n "checking for $ac_word... " >&6; }
17973if ${ac_cv_path_OTOOL+:} false; then :
17974  $as_echo_n "(cached) " >&6
17975else
17976  case $OTOOL in
17977  [\\/]* | ?:[\\/]*)
17978  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17979  ;;
17980  *)
17981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17982for as_dir in $PATH
17983do
17984  IFS=$as_save_IFS
17985  test -z "$as_dir" && as_dir=.
17986    for ac_exec_ext in '' $ac_executable_extensions; do
17987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17988    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17990    break 2
17991  fi
17992done
17993  done
17994IFS=$as_save_IFS
17995
17996  ;;
17997esac
17998fi
17999OTOOL=$ac_cv_path_OTOOL
18000if test -n "$OTOOL"; then
18001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18002$as_echo "$OTOOL" >&6; }
18003else
18004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18005$as_echo "no" >&6; }
18006fi
18007
18008
18009  test -n "$OTOOL" && break
18010done
18011
18012    else
18013      # If it succeeded, then it was overridden by the user. We will use it
18014      # for the tool.
18015
18016      # First remove it from the list of overridden variables, so we can test
18017      # for unknown variables in the end.
18018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18019
18020      # Check if the provided tool contains a complete path.
18021      tool_specified="$OTOOL"
18022      tool_basename="${tool_specified##*/}"
18023      if test "x$tool_basename" = "x$tool_specified"; then
18024        # A command without a complete path is provided, search $PATH.
18025        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18026$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18027        # Extract the first word of "$tool_basename", so it can be a program name with args.
18028set dummy $tool_basename; ac_word=$2
18029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18030$as_echo_n "checking for $ac_word... " >&6; }
18031if ${ac_cv_path_OTOOL+:} false; then :
18032  $as_echo_n "(cached) " >&6
18033else
18034  case $OTOOL in
18035  [\\/]* | ?:[\\/]*)
18036  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18037  ;;
18038  *)
18039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18040for as_dir in $PATH
18041do
18042  IFS=$as_save_IFS
18043  test -z "$as_dir" && as_dir=.
18044    for ac_exec_ext in '' $ac_executable_extensions; do
18045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18046    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18048    break 2
18049  fi
18050done
18051  done
18052IFS=$as_save_IFS
18053
18054  ;;
18055esac
18056fi
18057OTOOL=$ac_cv_path_OTOOL
18058if test -n "$OTOOL"; then
18059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18060$as_echo "$OTOOL" >&6; }
18061else
18062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18063$as_echo "no" >&6; }
18064fi
18065
18066
18067        if test "x$OTOOL" = x; then
18068          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18069        fi
18070      else
18071        # Otherwise we believe it is a complete path. Use it as it is.
18072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18073$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18074        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18075$as_echo_n "checking for OTOOL... " >&6; }
18076        if test ! -x "$tool_specified"; then
18077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18078$as_echo "not found" >&6; }
18079          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18080        fi
18081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18082$as_echo "$tool_specified" >&6; }
18083      fi
18084    fi
18085  fi
18086
18087
18088  if test "x$OTOOL" = "x"; then
18089    OTOOL="true"
18090  fi
18091
18092
18093  # Publish this variable in the help.
18094
18095
18096  if test "x$READELF" = x; then
18097    # The variable is not set by user, try to locate tool using the code snippet
18098    for ac_prog in greadelf readelf
18099do
18100  # Extract the first word of "$ac_prog", so it can be a program name with args.
18101set dummy $ac_prog; ac_word=$2
18102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18103$as_echo_n "checking for $ac_word... " >&6; }
18104if ${ac_cv_path_READELF+:} false; then :
18105  $as_echo_n "(cached) " >&6
18106else
18107  case $READELF in
18108  [\\/]* | ?:[\\/]*)
18109  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18110  ;;
18111  *)
18112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18113for as_dir in $PATH
18114do
18115  IFS=$as_save_IFS
18116  test -z "$as_dir" && as_dir=.
18117    for ac_exec_ext in '' $ac_executable_extensions; do
18118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18119    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18121    break 2
18122  fi
18123done
18124  done
18125IFS=$as_save_IFS
18126
18127  ;;
18128esac
18129fi
18130READELF=$ac_cv_path_READELF
18131if test -n "$READELF"; then
18132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18133$as_echo "$READELF" >&6; }
18134else
18135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18136$as_echo "no" >&6; }
18137fi
18138
18139
18140  test -n "$READELF" && break
18141done
18142
18143  else
18144    # The variable is set, but is it from the command line or the environment?
18145
18146    # Try to remove the string !READELF! from our list.
18147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18149      # If it failed, the variable was not from the command line. Ignore it,
18150      # but warn the user (except for BASH, which is always set by the calling BASH).
18151      if test "xREADELF" != xBASH; then
18152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18153$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18154      fi
18155      # Try to locate tool using the code snippet
18156      for ac_prog in greadelf readelf
18157do
18158  # Extract the first word of "$ac_prog", so it can be a program name with args.
18159set dummy $ac_prog; ac_word=$2
18160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18161$as_echo_n "checking for $ac_word... " >&6; }
18162if ${ac_cv_path_READELF+:} false; then :
18163  $as_echo_n "(cached) " >&6
18164else
18165  case $READELF in
18166  [\\/]* | ?:[\\/]*)
18167  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18168  ;;
18169  *)
18170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18171for as_dir in $PATH
18172do
18173  IFS=$as_save_IFS
18174  test -z "$as_dir" && as_dir=.
18175    for ac_exec_ext in '' $ac_executable_extensions; do
18176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18177    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18179    break 2
18180  fi
18181done
18182  done
18183IFS=$as_save_IFS
18184
18185  ;;
18186esac
18187fi
18188READELF=$ac_cv_path_READELF
18189if test -n "$READELF"; then
18190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18191$as_echo "$READELF" >&6; }
18192else
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18194$as_echo "no" >&6; }
18195fi
18196
18197
18198  test -n "$READELF" && break
18199done
18200
18201    else
18202      # If it succeeded, then it was overridden by the user. We will use it
18203      # for the tool.
18204
18205      # First remove it from the list of overridden variables, so we can test
18206      # for unknown variables in the end.
18207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18208
18209      # Check if the provided tool contains a complete path.
18210      tool_specified="$READELF"
18211      tool_basename="${tool_specified##*/}"
18212      if test "x$tool_basename" = "x$tool_specified"; then
18213        # A command without a complete path is provided, search $PATH.
18214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18215$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18216        # Extract the first word of "$tool_basename", so it can be a program name with args.
18217set dummy $tool_basename; ac_word=$2
18218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18219$as_echo_n "checking for $ac_word... " >&6; }
18220if ${ac_cv_path_READELF+:} false; then :
18221  $as_echo_n "(cached) " >&6
18222else
18223  case $READELF in
18224  [\\/]* | ?:[\\/]*)
18225  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18226  ;;
18227  *)
18228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18229for as_dir in $PATH
18230do
18231  IFS=$as_save_IFS
18232  test -z "$as_dir" && as_dir=.
18233    for ac_exec_ext in '' $ac_executable_extensions; do
18234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18235    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18237    break 2
18238  fi
18239done
18240  done
18241IFS=$as_save_IFS
18242
18243  ;;
18244esac
18245fi
18246READELF=$ac_cv_path_READELF
18247if test -n "$READELF"; then
18248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18249$as_echo "$READELF" >&6; }
18250else
18251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18252$as_echo "no" >&6; }
18253fi
18254
18255
18256        if test "x$READELF" = x; then
18257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18258        fi
18259      else
18260        # Otherwise we believe it is a complete path. Use it as it is.
18261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18262$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18264$as_echo_n "checking for READELF... " >&6; }
18265        if test ! -x "$tool_specified"; then
18266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18267$as_echo "not found" >&6; }
18268          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18269        fi
18270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18271$as_echo "$tool_specified" >&6; }
18272      fi
18273    fi
18274  fi
18275
18276
18277
18278
18279  # Publish this variable in the help.
18280
18281
18282  if test "x$HG" = x; then
18283    # The variable is not set by user, try to locate tool using the code snippet
18284    for ac_prog in hg
18285do
18286  # Extract the first word of "$ac_prog", so it can be a program name with args.
18287set dummy $ac_prog; ac_word=$2
18288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18289$as_echo_n "checking for $ac_word... " >&6; }
18290if ${ac_cv_path_HG+:} false; then :
18291  $as_echo_n "(cached) " >&6
18292else
18293  case $HG in
18294  [\\/]* | ?:[\\/]*)
18295  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18296  ;;
18297  *)
18298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18299for as_dir in $PATH
18300do
18301  IFS=$as_save_IFS
18302  test -z "$as_dir" && as_dir=.
18303    for ac_exec_ext in '' $ac_executable_extensions; do
18304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18305    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18307    break 2
18308  fi
18309done
18310  done
18311IFS=$as_save_IFS
18312
18313  ;;
18314esac
18315fi
18316HG=$ac_cv_path_HG
18317if test -n "$HG"; then
18318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18319$as_echo "$HG" >&6; }
18320else
18321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18322$as_echo "no" >&6; }
18323fi
18324
18325
18326  test -n "$HG" && break
18327done
18328
18329  else
18330    # The variable is set, but is it from the command line or the environment?
18331
18332    # Try to remove the string !HG! from our list.
18333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18335      # If it failed, the variable was not from the command line. Ignore it,
18336      # but warn the user (except for BASH, which is always set by the calling BASH).
18337      if test "xHG" != xBASH; then
18338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18339$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18340      fi
18341      # Try to locate tool using the code snippet
18342      for ac_prog in hg
18343do
18344  # Extract the first word of "$ac_prog", so it can be a program name with args.
18345set dummy $ac_prog; ac_word=$2
18346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18347$as_echo_n "checking for $ac_word... " >&6; }
18348if ${ac_cv_path_HG+:} false; then :
18349  $as_echo_n "(cached) " >&6
18350else
18351  case $HG in
18352  [\\/]* | ?:[\\/]*)
18353  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18354  ;;
18355  *)
18356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18357for as_dir in $PATH
18358do
18359  IFS=$as_save_IFS
18360  test -z "$as_dir" && as_dir=.
18361    for ac_exec_ext in '' $ac_executable_extensions; do
18362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18363    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18365    break 2
18366  fi
18367done
18368  done
18369IFS=$as_save_IFS
18370
18371  ;;
18372esac
18373fi
18374HG=$ac_cv_path_HG
18375if test -n "$HG"; then
18376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18377$as_echo "$HG" >&6; }
18378else
18379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18380$as_echo "no" >&6; }
18381fi
18382
18383
18384  test -n "$HG" && break
18385done
18386
18387    else
18388      # If it succeeded, then it was overridden by the user. We will use it
18389      # for the tool.
18390
18391      # First remove it from the list of overridden variables, so we can test
18392      # for unknown variables in the end.
18393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18394
18395      # Check if the provided tool contains a complete path.
18396      tool_specified="$HG"
18397      tool_basename="${tool_specified##*/}"
18398      if test "x$tool_basename" = "x$tool_specified"; then
18399        # A command without a complete path is provided, search $PATH.
18400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18401$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18402        # Extract the first word of "$tool_basename", so it can be a program name with args.
18403set dummy $tool_basename; ac_word=$2
18404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18405$as_echo_n "checking for $ac_word... " >&6; }
18406if ${ac_cv_path_HG+:} false; then :
18407  $as_echo_n "(cached) " >&6
18408else
18409  case $HG in
18410  [\\/]* | ?:[\\/]*)
18411  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18412  ;;
18413  *)
18414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18415for as_dir in $PATH
18416do
18417  IFS=$as_save_IFS
18418  test -z "$as_dir" && as_dir=.
18419    for ac_exec_ext in '' $ac_executable_extensions; do
18420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18421    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18423    break 2
18424  fi
18425done
18426  done
18427IFS=$as_save_IFS
18428
18429  ;;
18430esac
18431fi
18432HG=$ac_cv_path_HG
18433if test -n "$HG"; then
18434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18435$as_echo "$HG" >&6; }
18436else
18437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18438$as_echo "no" >&6; }
18439fi
18440
18441
18442        if test "x$HG" = x; then
18443          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18444        fi
18445      else
18446        # Otherwise we believe it is a complete path. Use it as it is.
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18448$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18449        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18450$as_echo_n "checking for HG... " >&6; }
18451        if test ! -x "$tool_specified"; then
18452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18453$as_echo "not found" >&6; }
18454          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18455        fi
18456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18457$as_echo "$tool_specified" >&6; }
18458      fi
18459    fi
18460  fi
18461
18462
18463
18464
18465  # Publish this variable in the help.
18466
18467
18468  if test "x$STAT" = x; then
18469    # The variable is not set by user, try to locate tool using the code snippet
18470    for ac_prog in stat
18471do
18472  # Extract the first word of "$ac_prog", so it can be a program name with args.
18473set dummy $ac_prog; ac_word=$2
18474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18475$as_echo_n "checking for $ac_word... " >&6; }
18476if ${ac_cv_path_STAT+:} false; then :
18477  $as_echo_n "(cached) " >&6
18478else
18479  case $STAT in
18480  [\\/]* | ?:[\\/]*)
18481  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18482  ;;
18483  *)
18484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18485for as_dir in $PATH
18486do
18487  IFS=$as_save_IFS
18488  test -z "$as_dir" && as_dir=.
18489    for ac_exec_ext in '' $ac_executable_extensions; do
18490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18491    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18493    break 2
18494  fi
18495done
18496  done
18497IFS=$as_save_IFS
18498
18499  ;;
18500esac
18501fi
18502STAT=$ac_cv_path_STAT
18503if test -n "$STAT"; then
18504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18505$as_echo "$STAT" >&6; }
18506else
18507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18508$as_echo "no" >&6; }
18509fi
18510
18511
18512  test -n "$STAT" && break
18513done
18514
18515  else
18516    # The variable is set, but is it from the command line or the environment?
18517
18518    # Try to remove the string !STAT! from our list.
18519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18521      # If it failed, the variable was not from the command line. Ignore it,
18522      # but warn the user (except for BASH, which is always set by the calling BASH).
18523      if test "xSTAT" != xBASH; then
18524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18525$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18526      fi
18527      # Try to locate tool using the code snippet
18528      for ac_prog in stat
18529do
18530  # Extract the first word of "$ac_prog", so it can be a program name with args.
18531set dummy $ac_prog; ac_word=$2
18532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18533$as_echo_n "checking for $ac_word... " >&6; }
18534if ${ac_cv_path_STAT+:} false; then :
18535  $as_echo_n "(cached) " >&6
18536else
18537  case $STAT in
18538  [\\/]* | ?:[\\/]*)
18539  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18540  ;;
18541  *)
18542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18543for as_dir in $PATH
18544do
18545  IFS=$as_save_IFS
18546  test -z "$as_dir" && as_dir=.
18547    for ac_exec_ext in '' $ac_executable_extensions; do
18548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18549    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18551    break 2
18552  fi
18553done
18554  done
18555IFS=$as_save_IFS
18556
18557  ;;
18558esac
18559fi
18560STAT=$ac_cv_path_STAT
18561if test -n "$STAT"; then
18562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18563$as_echo "$STAT" >&6; }
18564else
18565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18566$as_echo "no" >&6; }
18567fi
18568
18569
18570  test -n "$STAT" && break
18571done
18572
18573    else
18574      # If it succeeded, then it was overridden by the user. We will use it
18575      # for the tool.
18576
18577      # First remove it from the list of overridden variables, so we can test
18578      # for unknown variables in the end.
18579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18580
18581      # Check if the provided tool contains a complete path.
18582      tool_specified="$STAT"
18583      tool_basename="${tool_specified##*/}"
18584      if test "x$tool_basename" = "x$tool_specified"; then
18585        # A command without a complete path is provided, search $PATH.
18586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18587$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18588        # Extract the first word of "$tool_basename", so it can be a program name with args.
18589set dummy $tool_basename; ac_word=$2
18590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18591$as_echo_n "checking for $ac_word... " >&6; }
18592if ${ac_cv_path_STAT+:} false; then :
18593  $as_echo_n "(cached) " >&6
18594else
18595  case $STAT in
18596  [\\/]* | ?:[\\/]*)
18597  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18598  ;;
18599  *)
18600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18601for as_dir in $PATH
18602do
18603  IFS=$as_save_IFS
18604  test -z "$as_dir" && as_dir=.
18605    for ac_exec_ext in '' $ac_executable_extensions; do
18606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18607    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18609    break 2
18610  fi
18611done
18612  done
18613IFS=$as_save_IFS
18614
18615  ;;
18616esac
18617fi
18618STAT=$ac_cv_path_STAT
18619if test -n "$STAT"; then
18620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18621$as_echo "$STAT" >&6; }
18622else
18623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18624$as_echo "no" >&6; }
18625fi
18626
18627
18628        if test "x$STAT" = x; then
18629          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18630        fi
18631      else
18632        # Otherwise we believe it is a complete path. Use it as it is.
18633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18634$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18636$as_echo_n "checking for STAT... " >&6; }
18637        if test ! -x "$tool_specified"; then
18638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18639$as_echo "not found" >&6; }
18640          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18641        fi
18642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18643$as_echo "$tool_specified" >&6; }
18644      fi
18645    fi
18646  fi
18647
18648
18649
18650
18651  # Publish this variable in the help.
18652
18653
18654  if test "x$TIME" = x; then
18655    # The variable is not set by user, try to locate tool using the code snippet
18656    for ac_prog in time
18657do
18658  # Extract the first word of "$ac_prog", so it can be a program name with args.
18659set dummy $ac_prog; ac_word=$2
18660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18661$as_echo_n "checking for $ac_word... " >&6; }
18662if ${ac_cv_path_TIME+:} false; then :
18663  $as_echo_n "(cached) " >&6
18664else
18665  case $TIME in
18666  [\\/]* | ?:[\\/]*)
18667  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18668  ;;
18669  *)
18670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18671for as_dir in $PATH
18672do
18673  IFS=$as_save_IFS
18674  test -z "$as_dir" && as_dir=.
18675    for ac_exec_ext in '' $ac_executable_extensions; do
18676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18677    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18679    break 2
18680  fi
18681done
18682  done
18683IFS=$as_save_IFS
18684
18685  ;;
18686esac
18687fi
18688TIME=$ac_cv_path_TIME
18689if test -n "$TIME"; then
18690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18691$as_echo "$TIME" >&6; }
18692else
18693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18694$as_echo "no" >&6; }
18695fi
18696
18697
18698  test -n "$TIME" && break
18699done
18700
18701  else
18702    # The variable is set, but is it from the command line or the environment?
18703
18704    # Try to remove the string !TIME! from our list.
18705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18707      # If it failed, the variable was not from the command line. Ignore it,
18708      # but warn the user (except for BASH, which is always set by the calling BASH).
18709      if test "xTIME" != xBASH; then
18710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18711$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18712      fi
18713      # Try to locate tool using the code snippet
18714      for ac_prog in time
18715do
18716  # Extract the first word of "$ac_prog", so it can be a program name with args.
18717set dummy $ac_prog; ac_word=$2
18718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18719$as_echo_n "checking for $ac_word... " >&6; }
18720if ${ac_cv_path_TIME+:} false; then :
18721  $as_echo_n "(cached) " >&6
18722else
18723  case $TIME in
18724  [\\/]* | ?:[\\/]*)
18725  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18726  ;;
18727  *)
18728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18729for as_dir in $PATH
18730do
18731  IFS=$as_save_IFS
18732  test -z "$as_dir" && as_dir=.
18733    for ac_exec_ext in '' $ac_executable_extensions; do
18734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18735    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18737    break 2
18738  fi
18739done
18740  done
18741IFS=$as_save_IFS
18742
18743  ;;
18744esac
18745fi
18746TIME=$ac_cv_path_TIME
18747if test -n "$TIME"; then
18748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18749$as_echo "$TIME" >&6; }
18750else
18751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18752$as_echo "no" >&6; }
18753fi
18754
18755
18756  test -n "$TIME" && break
18757done
18758
18759    else
18760      # If it succeeded, then it was overridden by the user. We will use it
18761      # for the tool.
18762
18763      # First remove it from the list of overridden variables, so we can test
18764      # for unknown variables in the end.
18765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18766
18767      # Check if the provided tool contains a complete path.
18768      tool_specified="$TIME"
18769      tool_basename="${tool_specified##*/}"
18770      if test "x$tool_basename" = "x$tool_specified"; then
18771        # A command without a complete path is provided, search $PATH.
18772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18773$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18774        # Extract the first word of "$tool_basename", so it can be a program name with args.
18775set dummy $tool_basename; ac_word=$2
18776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18777$as_echo_n "checking for $ac_word... " >&6; }
18778if ${ac_cv_path_TIME+:} false; then :
18779  $as_echo_n "(cached) " >&6
18780else
18781  case $TIME in
18782  [\\/]* | ?:[\\/]*)
18783  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18784  ;;
18785  *)
18786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18787for as_dir in $PATH
18788do
18789  IFS=$as_save_IFS
18790  test -z "$as_dir" && as_dir=.
18791    for ac_exec_ext in '' $ac_executable_extensions; do
18792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18793    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18795    break 2
18796  fi
18797done
18798  done
18799IFS=$as_save_IFS
18800
18801  ;;
18802esac
18803fi
18804TIME=$ac_cv_path_TIME
18805if test -n "$TIME"; then
18806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18807$as_echo "$TIME" >&6; }
18808else
18809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18810$as_echo "no" >&6; }
18811fi
18812
18813
18814        if test "x$TIME" = x; then
18815          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18816        fi
18817      else
18818        # Otherwise we believe it is a complete path. Use it as it is.
18819        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18820$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18822$as_echo_n "checking for TIME... " >&6; }
18823        if test ! -x "$tool_specified"; then
18824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18825$as_echo "not found" >&6; }
18826          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18827        fi
18828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18829$as_echo "$tool_specified" >&6; }
18830      fi
18831    fi
18832  fi
18833
18834
18835  # Check if it's GNU time
18836  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18837  if test "x$IS_GNU_TIME" != x; then
18838    IS_GNU_TIME=yes
18839  else
18840    IS_GNU_TIME=no
18841  fi
18842
18843
18844  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18845
18846
18847
18848  # Publish this variable in the help.
18849
18850
18851  if test "x$COMM" = x; then
18852    # The variable is not set by user, try to locate tool using the code snippet
18853    for ac_prog in comm
18854do
18855  # Extract the first word of "$ac_prog", so it can be a program name with args.
18856set dummy $ac_prog; ac_word=$2
18857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18858$as_echo_n "checking for $ac_word... " >&6; }
18859if ${ac_cv_path_COMM+:} false; then :
18860  $as_echo_n "(cached) " >&6
18861else
18862  case $COMM in
18863  [\\/]* | ?:[\\/]*)
18864  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18865  ;;
18866  *)
18867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18868for as_dir in $PATH
18869do
18870  IFS=$as_save_IFS
18871  test -z "$as_dir" && as_dir=.
18872    for ac_exec_ext in '' $ac_executable_extensions; do
18873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18874    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18876    break 2
18877  fi
18878done
18879  done
18880IFS=$as_save_IFS
18881
18882  ;;
18883esac
18884fi
18885COMM=$ac_cv_path_COMM
18886if test -n "$COMM"; then
18887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18888$as_echo "$COMM" >&6; }
18889else
18890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18891$as_echo "no" >&6; }
18892fi
18893
18894
18895  test -n "$COMM" && break
18896done
18897
18898  else
18899    # The variable is set, but is it from the command line or the environment?
18900
18901    # Try to remove the string !COMM! from our list.
18902    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18903    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18904      # If it failed, the variable was not from the command line. Ignore it,
18905      # but warn the user (except for BASH, which is always set by the calling BASH).
18906      if test "xCOMM" != xBASH; then
18907        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18908$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18909      fi
18910      # Try to locate tool using the code snippet
18911      for ac_prog in comm
18912do
18913  # Extract the first word of "$ac_prog", so it can be a program name with args.
18914set dummy $ac_prog; ac_word=$2
18915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18916$as_echo_n "checking for $ac_word... " >&6; }
18917if ${ac_cv_path_COMM+:} false; then :
18918  $as_echo_n "(cached) " >&6
18919else
18920  case $COMM in
18921  [\\/]* | ?:[\\/]*)
18922  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18923  ;;
18924  *)
18925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18926for as_dir in $PATH
18927do
18928  IFS=$as_save_IFS
18929  test -z "$as_dir" && as_dir=.
18930    for ac_exec_ext in '' $ac_executable_extensions; do
18931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18932    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18934    break 2
18935  fi
18936done
18937  done
18938IFS=$as_save_IFS
18939
18940  ;;
18941esac
18942fi
18943COMM=$ac_cv_path_COMM
18944if test -n "$COMM"; then
18945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18946$as_echo "$COMM" >&6; }
18947else
18948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18949$as_echo "no" >&6; }
18950fi
18951
18952
18953  test -n "$COMM" && break
18954done
18955
18956    else
18957      # If it succeeded, then it was overridden by the user. We will use it
18958      # for the tool.
18959
18960      # First remove it from the list of overridden variables, so we can test
18961      # for unknown variables in the end.
18962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18963
18964      # Check if the provided tool contains a complete path.
18965      tool_specified="$COMM"
18966      tool_basename="${tool_specified##*/}"
18967      if test "x$tool_basename" = "x$tool_specified"; then
18968        # A command without a complete path is provided, search $PATH.
18969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18970$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18971        # Extract the first word of "$tool_basename", so it can be a program name with args.
18972set dummy $tool_basename; ac_word=$2
18973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18974$as_echo_n "checking for $ac_word... " >&6; }
18975if ${ac_cv_path_COMM+:} false; then :
18976  $as_echo_n "(cached) " >&6
18977else
18978  case $COMM in
18979  [\\/]* | ?:[\\/]*)
18980  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18981  ;;
18982  *)
18983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18984for as_dir in $PATH
18985do
18986  IFS=$as_save_IFS
18987  test -z "$as_dir" && as_dir=.
18988    for ac_exec_ext in '' $ac_executable_extensions; do
18989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18990    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18992    break 2
18993  fi
18994done
18995  done
18996IFS=$as_save_IFS
18997
18998  ;;
18999esac
19000fi
19001COMM=$ac_cv_path_COMM
19002if test -n "$COMM"; then
19003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
19004$as_echo "$COMM" >&6; }
19005else
19006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19007$as_echo "no" >&6; }
19008fi
19009
19010
19011        if test "x$COMM" = x; then
19012          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19013        fi
19014      else
19015        # Otherwise we believe it is a complete path. Use it as it is.
19016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19017$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19018        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19019$as_echo_n "checking for COMM... " >&6; }
19020        if test ! -x "$tool_specified"; then
19021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19022$as_echo "not found" >&6; }
19023          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19024        fi
19025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19026$as_echo "$tool_specified" >&6; }
19027      fi
19028    fi
19029  fi
19030
19031
19032
19033  if test "x$COMM" = x; then
19034    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19035  fi
19036
19037
19038  fi
19039
19040  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19041
19042
19043
19044  # Publish this variable in the help.
19045
19046
19047  if test "x$DSYMUTIL" = x; then
19048    # The variable is not set by user, try to locate tool using the code snippet
19049    for ac_prog in dsymutil
19050do
19051  # Extract the first word of "$ac_prog", so it can be a program name with args.
19052set dummy $ac_prog; ac_word=$2
19053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19054$as_echo_n "checking for $ac_word... " >&6; }
19055if ${ac_cv_path_DSYMUTIL+:} false; then :
19056  $as_echo_n "(cached) " >&6
19057else
19058  case $DSYMUTIL in
19059  [\\/]* | ?:[\\/]*)
19060  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19061  ;;
19062  *)
19063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19064for as_dir in $PATH
19065do
19066  IFS=$as_save_IFS
19067  test -z "$as_dir" && as_dir=.
19068    for ac_exec_ext in '' $ac_executable_extensions; do
19069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19070    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19072    break 2
19073  fi
19074done
19075  done
19076IFS=$as_save_IFS
19077
19078  ;;
19079esac
19080fi
19081DSYMUTIL=$ac_cv_path_DSYMUTIL
19082if test -n "$DSYMUTIL"; then
19083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19084$as_echo "$DSYMUTIL" >&6; }
19085else
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19087$as_echo "no" >&6; }
19088fi
19089
19090
19091  test -n "$DSYMUTIL" && break
19092done
19093
19094  else
19095    # The variable is set, but is it from the command line or the environment?
19096
19097    # Try to remove the string !DSYMUTIL! from our list.
19098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19100      # If it failed, the variable was not from the command line. Ignore it,
19101      # but warn the user (except for BASH, which is always set by the calling BASH).
19102      if test "xDSYMUTIL" != xBASH; then
19103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19104$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19105      fi
19106      # Try to locate tool using the code snippet
19107      for ac_prog in dsymutil
19108do
19109  # Extract the first word of "$ac_prog", so it can be a program name with args.
19110set dummy $ac_prog; ac_word=$2
19111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19112$as_echo_n "checking for $ac_word... " >&6; }
19113if ${ac_cv_path_DSYMUTIL+:} false; then :
19114  $as_echo_n "(cached) " >&6
19115else
19116  case $DSYMUTIL in
19117  [\\/]* | ?:[\\/]*)
19118  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19119  ;;
19120  *)
19121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19122for as_dir in $PATH
19123do
19124  IFS=$as_save_IFS
19125  test -z "$as_dir" && as_dir=.
19126    for ac_exec_ext in '' $ac_executable_extensions; do
19127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19128    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19130    break 2
19131  fi
19132done
19133  done
19134IFS=$as_save_IFS
19135
19136  ;;
19137esac
19138fi
19139DSYMUTIL=$ac_cv_path_DSYMUTIL
19140if test -n "$DSYMUTIL"; then
19141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19142$as_echo "$DSYMUTIL" >&6; }
19143else
19144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19145$as_echo "no" >&6; }
19146fi
19147
19148
19149  test -n "$DSYMUTIL" && break
19150done
19151
19152    else
19153      # If it succeeded, then it was overridden by the user. We will use it
19154      # for the tool.
19155
19156      # First remove it from the list of overridden variables, so we can test
19157      # for unknown variables in the end.
19158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19159
19160      # Check if the provided tool contains a complete path.
19161      tool_specified="$DSYMUTIL"
19162      tool_basename="${tool_specified##*/}"
19163      if test "x$tool_basename" = "x$tool_specified"; then
19164        # A command without a complete path is provided, search $PATH.
19165        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19166$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19167        # Extract the first word of "$tool_basename", so it can be a program name with args.
19168set dummy $tool_basename; ac_word=$2
19169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19170$as_echo_n "checking for $ac_word... " >&6; }
19171if ${ac_cv_path_DSYMUTIL+:} false; then :
19172  $as_echo_n "(cached) " >&6
19173else
19174  case $DSYMUTIL in
19175  [\\/]* | ?:[\\/]*)
19176  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19177  ;;
19178  *)
19179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19180for as_dir in $PATH
19181do
19182  IFS=$as_save_IFS
19183  test -z "$as_dir" && as_dir=.
19184    for ac_exec_ext in '' $ac_executable_extensions; do
19185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19186    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19188    break 2
19189  fi
19190done
19191  done
19192IFS=$as_save_IFS
19193
19194  ;;
19195esac
19196fi
19197DSYMUTIL=$ac_cv_path_DSYMUTIL
19198if test -n "$DSYMUTIL"; then
19199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19200$as_echo "$DSYMUTIL" >&6; }
19201else
19202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19203$as_echo "no" >&6; }
19204fi
19205
19206
19207        if test "x$DSYMUTIL" = x; then
19208          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19209        fi
19210      else
19211        # Otherwise we believe it is a complete path. Use it as it is.
19212        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19213$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19215$as_echo_n "checking for DSYMUTIL... " >&6; }
19216        if test ! -x "$tool_specified"; then
19217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19218$as_echo "not found" >&6; }
19219          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19220        fi
19221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19222$as_echo "$tool_specified" >&6; }
19223      fi
19224    fi
19225  fi
19226
19227
19228
19229  if test "x$DSYMUTIL" = x; then
19230    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19231  fi
19232
19233
19234
19235
19236
19237  # Publish this variable in the help.
19238
19239
19240  if test "x$XATTR" = x; then
19241    # The variable is not set by user, try to locate tool using the code snippet
19242    for ac_prog in xattr
19243do
19244  # Extract the first word of "$ac_prog", so it can be a program name with args.
19245set dummy $ac_prog; ac_word=$2
19246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19247$as_echo_n "checking for $ac_word... " >&6; }
19248if ${ac_cv_path_XATTR+:} false; then :
19249  $as_echo_n "(cached) " >&6
19250else
19251  case $XATTR in
19252  [\\/]* | ?:[\\/]*)
19253  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19254  ;;
19255  *)
19256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19257for as_dir in $PATH
19258do
19259  IFS=$as_save_IFS
19260  test -z "$as_dir" && as_dir=.
19261    for ac_exec_ext in '' $ac_executable_extensions; do
19262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19263    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19265    break 2
19266  fi
19267done
19268  done
19269IFS=$as_save_IFS
19270
19271  ;;
19272esac
19273fi
19274XATTR=$ac_cv_path_XATTR
19275if test -n "$XATTR"; then
19276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19277$as_echo "$XATTR" >&6; }
19278else
19279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19280$as_echo "no" >&6; }
19281fi
19282
19283
19284  test -n "$XATTR" && break
19285done
19286
19287  else
19288    # The variable is set, but is it from the command line or the environment?
19289
19290    # Try to remove the string !XATTR! from our list.
19291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19293      # If it failed, the variable was not from the command line. Ignore it,
19294      # but warn the user (except for BASH, which is always set by the calling BASH).
19295      if test "xXATTR" != xBASH; then
19296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19297$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19298      fi
19299      # Try to locate tool using the code snippet
19300      for ac_prog in xattr
19301do
19302  # Extract the first word of "$ac_prog", so it can be a program name with args.
19303set dummy $ac_prog; ac_word=$2
19304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19305$as_echo_n "checking for $ac_word... " >&6; }
19306if ${ac_cv_path_XATTR+:} false; then :
19307  $as_echo_n "(cached) " >&6
19308else
19309  case $XATTR in
19310  [\\/]* | ?:[\\/]*)
19311  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19312  ;;
19313  *)
19314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19315for as_dir in $PATH
19316do
19317  IFS=$as_save_IFS
19318  test -z "$as_dir" && as_dir=.
19319    for ac_exec_ext in '' $ac_executable_extensions; do
19320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19321    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19323    break 2
19324  fi
19325done
19326  done
19327IFS=$as_save_IFS
19328
19329  ;;
19330esac
19331fi
19332XATTR=$ac_cv_path_XATTR
19333if test -n "$XATTR"; then
19334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19335$as_echo "$XATTR" >&6; }
19336else
19337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19338$as_echo "no" >&6; }
19339fi
19340
19341
19342  test -n "$XATTR" && break
19343done
19344
19345    else
19346      # If it succeeded, then it was overridden by the user. We will use it
19347      # for the tool.
19348
19349      # First remove it from the list of overridden variables, so we can test
19350      # for unknown variables in the end.
19351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19352
19353      # Check if the provided tool contains a complete path.
19354      tool_specified="$XATTR"
19355      tool_basename="${tool_specified##*/}"
19356      if test "x$tool_basename" = "x$tool_specified"; then
19357        # A command without a complete path is provided, search $PATH.
19358        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19359$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19360        # Extract the first word of "$tool_basename", so it can be a program name with args.
19361set dummy $tool_basename; ac_word=$2
19362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19363$as_echo_n "checking for $ac_word... " >&6; }
19364if ${ac_cv_path_XATTR+:} false; then :
19365  $as_echo_n "(cached) " >&6
19366else
19367  case $XATTR in
19368  [\\/]* | ?:[\\/]*)
19369  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19370  ;;
19371  *)
19372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19373for as_dir in $PATH
19374do
19375  IFS=$as_save_IFS
19376  test -z "$as_dir" && as_dir=.
19377    for ac_exec_ext in '' $ac_executable_extensions; do
19378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19379    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19381    break 2
19382  fi
19383done
19384  done
19385IFS=$as_save_IFS
19386
19387  ;;
19388esac
19389fi
19390XATTR=$ac_cv_path_XATTR
19391if test -n "$XATTR"; then
19392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19393$as_echo "$XATTR" >&6; }
19394else
19395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19396$as_echo "no" >&6; }
19397fi
19398
19399
19400        if test "x$XATTR" = x; then
19401          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19402        fi
19403      else
19404        # Otherwise we believe it is a complete path. Use it as it is.
19405        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19406$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19408$as_echo_n "checking for XATTR... " >&6; }
19409        if test ! -x "$tool_specified"; then
19410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19411$as_echo "not found" >&6; }
19412          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19413        fi
19414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19415$as_echo "$tool_specified" >&6; }
19416      fi
19417    fi
19418  fi
19419
19420
19421
19422  if test "x$XATTR" = x; then
19423    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19424  fi
19425
19426
19427
19428
19429  # Publish this variable in the help.
19430
19431
19432  if test "x$CODESIGN" = x; then
19433    # The variable is not set by user, try to locate tool using the code snippet
19434    for ac_prog in codesign
19435do
19436  # Extract the first word of "$ac_prog", so it can be a program name with args.
19437set dummy $ac_prog; ac_word=$2
19438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19439$as_echo_n "checking for $ac_word... " >&6; }
19440if ${ac_cv_path_CODESIGN+:} false; then :
19441  $as_echo_n "(cached) " >&6
19442else
19443  case $CODESIGN in
19444  [\\/]* | ?:[\\/]*)
19445  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19446  ;;
19447  *)
19448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19449for as_dir in $PATH
19450do
19451  IFS=$as_save_IFS
19452  test -z "$as_dir" && as_dir=.
19453    for ac_exec_ext in '' $ac_executable_extensions; do
19454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19455    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19457    break 2
19458  fi
19459done
19460  done
19461IFS=$as_save_IFS
19462
19463  ;;
19464esac
19465fi
19466CODESIGN=$ac_cv_path_CODESIGN
19467if test -n "$CODESIGN"; then
19468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19469$as_echo "$CODESIGN" >&6; }
19470else
19471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19472$as_echo "no" >&6; }
19473fi
19474
19475
19476  test -n "$CODESIGN" && break
19477done
19478
19479  else
19480    # The variable is set, but is it from the command line or the environment?
19481
19482    # Try to remove the string !CODESIGN! from our list.
19483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19485      # If it failed, the variable was not from the command line. Ignore it,
19486      # but warn the user (except for BASH, which is always set by the calling BASH).
19487      if test "xCODESIGN" != xBASH; then
19488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19489$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19490      fi
19491      # Try to locate tool using the code snippet
19492      for ac_prog in codesign
19493do
19494  # Extract the first word of "$ac_prog", so it can be a program name with args.
19495set dummy $ac_prog; ac_word=$2
19496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19497$as_echo_n "checking for $ac_word... " >&6; }
19498if ${ac_cv_path_CODESIGN+:} false; then :
19499  $as_echo_n "(cached) " >&6
19500else
19501  case $CODESIGN in
19502  [\\/]* | ?:[\\/]*)
19503  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19504  ;;
19505  *)
19506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19507for as_dir in $PATH
19508do
19509  IFS=$as_save_IFS
19510  test -z "$as_dir" && as_dir=.
19511    for ac_exec_ext in '' $ac_executable_extensions; do
19512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19513    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19515    break 2
19516  fi
19517done
19518  done
19519IFS=$as_save_IFS
19520
19521  ;;
19522esac
19523fi
19524CODESIGN=$ac_cv_path_CODESIGN
19525if test -n "$CODESIGN"; then
19526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19527$as_echo "$CODESIGN" >&6; }
19528else
19529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19530$as_echo "no" >&6; }
19531fi
19532
19533
19534  test -n "$CODESIGN" && break
19535done
19536
19537    else
19538      # If it succeeded, then it was overridden by the user. We will use it
19539      # for the tool.
19540
19541      # First remove it from the list of overridden variables, so we can test
19542      # for unknown variables in the end.
19543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19544
19545      # Check if the provided tool contains a complete path.
19546      tool_specified="$CODESIGN"
19547      tool_basename="${tool_specified##*/}"
19548      if test "x$tool_basename" = "x$tool_specified"; then
19549        # A command without a complete path is provided, search $PATH.
19550        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19551$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19552        # Extract the first word of "$tool_basename", so it can be a program name with args.
19553set dummy $tool_basename; ac_word=$2
19554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19555$as_echo_n "checking for $ac_word... " >&6; }
19556if ${ac_cv_path_CODESIGN+:} false; then :
19557  $as_echo_n "(cached) " >&6
19558else
19559  case $CODESIGN in
19560  [\\/]* | ?:[\\/]*)
19561  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19562  ;;
19563  *)
19564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19565for as_dir in $PATH
19566do
19567  IFS=$as_save_IFS
19568  test -z "$as_dir" && as_dir=.
19569    for ac_exec_ext in '' $ac_executable_extensions; do
19570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19571    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19573    break 2
19574  fi
19575done
19576  done
19577IFS=$as_save_IFS
19578
19579  ;;
19580esac
19581fi
19582CODESIGN=$ac_cv_path_CODESIGN
19583if test -n "$CODESIGN"; then
19584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19585$as_echo "$CODESIGN" >&6; }
19586else
19587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19588$as_echo "no" >&6; }
19589fi
19590
19591
19592        if test "x$CODESIGN" = x; then
19593          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19594        fi
19595      else
19596        # Otherwise we believe it is a complete path. Use it as it is.
19597        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19598$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19600$as_echo_n "checking for CODESIGN... " >&6; }
19601        if test ! -x "$tool_specified"; then
19602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19603$as_echo "not found" >&6; }
19604          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19605        fi
19606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19607$as_echo "$tool_specified" >&6; }
19608      fi
19609    fi
19610  fi
19611
19612
19613    if test "x$CODESIGN" != "x"; then
19614      # Verify that the openjdk_codesign certificate is present
19615      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19616$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19617      rm -f codesign-testfile
19618      touch codesign-testfile
19619      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19620      rm -f codesign-testfile
19621      if test "x$CODESIGN" = x; then
19622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19623$as_echo "no" >&6; }
19624      else
19625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19626$as_echo "yes" >&6; }
19627      fi
19628    fi
19629  fi
19630
19631
19632# Check if pkg-config is available.
19633
19634
19635if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19636	if test -n "$ac_tool_prefix"; then
19637  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19638set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19640$as_echo_n "checking for $ac_word... " >&6; }
19641if ${ac_cv_path_PKG_CONFIG+:} false; then :
19642  $as_echo_n "(cached) " >&6
19643else
19644  case $PKG_CONFIG in
19645  [\\/]* | ?:[\\/]*)
19646  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19647  ;;
19648  *)
19649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19650for as_dir in $PATH
19651do
19652  IFS=$as_save_IFS
19653  test -z "$as_dir" && as_dir=.
19654    for ac_exec_ext in '' $ac_executable_extensions; do
19655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19656    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19658    break 2
19659  fi
19660done
19661  done
19662IFS=$as_save_IFS
19663
19664  ;;
19665esac
19666fi
19667PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19668if test -n "$PKG_CONFIG"; then
19669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19670$as_echo "$PKG_CONFIG" >&6; }
19671else
19672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19673$as_echo "no" >&6; }
19674fi
19675
19676
19677fi
19678if test -z "$ac_cv_path_PKG_CONFIG"; then
19679  ac_pt_PKG_CONFIG=$PKG_CONFIG
19680  # Extract the first word of "pkg-config", so it can be a program name with args.
19681set dummy pkg-config; ac_word=$2
19682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19683$as_echo_n "checking for $ac_word... " >&6; }
19684if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19685  $as_echo_n "(cached) " >&6
19686else
19687  case $ac_pt_PKG_CONFIG in
19688  [\\/]* | ?:[\\/]*)
19689  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19690  ;;
19691  *)
19692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19693for as_dir in $PATH
19694do
19695  IFS=$as_save_IFS
19696  test -z "$as_dir" && as_dir=.
19697    for ac_exec_ext in '' $ac_executable_extensions; do
19698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19699    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19701    break 2
19702  fi
19703done
19704  done
19705IFS=$as_save_IFS
19706
19707  ;;
19708esac
19709fi
19710ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19711if test -n "$ac_pt_PKG_CONFIG"; then
19712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19713$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19714else
19715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19716$as_echo "no" >&6; }
19717fi
19718
19719  if test "x$ac_pt_PKG_CONFIG" = x; then
19720    PKG_CONFIG=""
19721  else
19722    case $cross_compiling:$ac_tool_warned in
19723yes:)
19724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19726ac_tool_warned=yes ;;
19727esac
19728    PKG_CONFIG=$ac_pt_PKG_CONFIG
19729  fi
19730else
19731  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19732fi
19733
19734fi
19735if test -n "$PKG_CONFIG"; then
19736	_pkg_min_version=0.9.0
19737	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19738$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19739	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19740		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19741$as_echo "yes" >&6; }
19742	else
19743		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19744$as_echo "no" >&6; }
19745		PKG_CONFIG=""
19746	fi
19747
19748fi
19749
19750# After basic tools have been setup, we can check build os specific details.
19751
19752  ###############################################################################
19753
19754  # Note that this is the build platform OS version!
19755
19756  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19757  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19758  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19759  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19760
19761
19762
19763
19764
19765# Setup builddeps, for automatic downloading of tools we need.
19766# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19767# boot-jdk setup, but we need to have basic tools setup first.
19768
19769
19770# Check whether --with-builddeps-conf was given.
19771if test "${with_builddeps_conf+set}" = set; then :
19772  withval=$with_builddeps_conf;
19773fi
19774
19775
19776
19777# Check whether --with-builddeps-server was given.
19778if test "${with_builddeps_server+set}" = set; then :
19779  withval=$with_builddeps_server;
19780fi
19781
19782
19783
19784# Check whether --with-builddeps-dir was given.
19785if test "${with_builddeps_dir+set}" = set; then :
19786  withval=$with_builddeps_dir;
19787else
19788  with_builddeps_dir=/localhome/builddeps
19789fi
19790
19791
19792
19793# Check whether --with-builddeps-group was given.
19794if test "${with_builddeps_group+set}" = set; then :
19795  withval=$with_builddeps_group;
19796fi
19797
19798
19799
19800
19801  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19802    if test "x$with_builddeps_conf" != x; then
19803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19804$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19805      builddepsfile=$with_builddeps_conf
19806      if test -s $builddepsfile; then
19807        . $builddepsfile
19808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19809$as_echo "loaded!" >&6; }
19810      else
19811        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19812      fi
19813    else
19814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19815$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19816      builddepsfile=`mktemp`
19817      touch $builddepsfile
19818      # Put all found confs into a single file.
19819      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19820      # Source the file to acquire the variables
19821      if test -s $builddepsfile; then
19822        . $builddepsfile
19823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19824$as_echo "found at least one!" >&6; }
19825      else
19826        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19827      fi
19828    fi
19829    # Create build and target names that use _ instead of "-" and ".".
19830    # This is necessary to use them in variable names.
19831    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19832    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19833    # Extract rewrite information for build and target
19834    eval rewritten_build=\${REWRITE_${build_var}}
19835    if test "x$rewritten_build" = x; then
19836      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19837      echo Build stays the same $rewritten_build
19838    else
19839      echo Rewriting build for builddeps into $rewritten_build
19840    fi
19841    eval rewritten_target=\${REWRITE_${target_var}}
19842    if test "x$rewritten_target" = x; then
19843      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19844      echo Target stays the same $rewritten_target
19845    else
19846      echo Rewriting target for builddeps into $rewritten_target
19847    fi
19848    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19849    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19850  fi
19851  for ac_prog in 7z unzip
19852do
19853  # Extract the first word of "$ac_prog", so it can be a program name with args.
19854set dummy $ac_prog; ac_word=$2
19855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19856$as_echo_n "checking for $ac_word... " >&6; }
19857if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19858  $as_echo_n "(cached) " >&6
19859else
19860  if test -n "$BDEPS_UNZIP"; then
19861  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19862else
19863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19864for as_dir in $PATH
19865do
19866  IFS=$as_save_IFS
19867  test -z "$as_dir" && as_dir=.
19868    for ac_exec_ext in '' $ac_executable_extensions; do
19869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19870    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19872    break 2
19873  fi
19874done
19875  done
19876IFS=$as_save_IFS
19877
19878fi
19879fi
19880BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19881if test -n "$BDEPS_UNZIP"; then
19882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19883$as_echo "$BDEPS_UNZIP" >&6; }
19884else
19885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19886$as_echo "no" >&6; }
19887fi
19888
19889
19890  test -n "$BDEPS_UNZIP" && break
19891done
19892
19893  if test "x$BDEPS_UNZIP" = x7z; then
19894    BDEPS_UNZIP="7z x"
19895  fi
19896
19897  for ac_prog in wget lftp ftp
19898do
19899  # Extract the first word of "$ac_prog", so it can be a program name with args.
19900set dummy $ac_prog; ac_word=$2
19901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19902$as_echo_n "checking for $ac_word... " >&6; }
19903if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19904  $as_echo_n "(cached) " >&6
19905else
19906  if test -n "$BDEPS_FTP"; then
19907  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19908else
19909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19910for as_dir in $PATH
19911do
19912  IFS=$as_save_IFS
19913  test -z "$as_dir" && as_dir=.
19914    for ac_exec_ext in '' $ac_executable_extensions; do
19915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19916    ac_cv_prog_BDEPS_FTP="$ac_prog"
19917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19918    break 2
19919  fi
19920done
19921  done
19922IFS=$as_save_IFS
19923
19924fi
19925fi
19926BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19927if test -n "$BDEPS_FTP"; then
19928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19929$as_echo "$BDEPS_FTP" >&6; }
19930else
19931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19932$as_echo "no" >&6; }
19933fi
19934
19935
19936  test -n "$BDEPS_FTP" && break
19937done
19938
19939
19940
19941###############################################################################
19942#
19943# Determine OpenJDK variants, options and version numbers.
19944#
19945###############################################################################
19946
19947# We need build & target for this.
19948
19949
19950  ###############################################################################
19951  #
19952  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19953  # We always build headless support.
19954  #
19955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19956$as_echo_n "checking headful support... " >&6; }
19957  # Check whether --enable-headful was given.
19958if test "${enable_headful+set}" = set; then :
19959  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19960else
19961  SUPPORT_HEADFUL=yes
19962fi
19963
19964
19965  SUPPORT_HEADLESS=yes
19966  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19967
19968  if test "x$SUPPORT_HEADFUL" = xyes; then
19969    # We are building both headful and headless.
19970    headful_msg="include support for both headful and headless"
19971  fi
19972
19973  if test "x$SUPPORT_HEADFUL" = xno; then
19974    # Thus we are building headless only.
19975    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19976    headful_msg="headless only"
19977  fi
19978
19979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19980$as_echo "$headful_msg" >&6; }
19981
19982
19983
19984
19985
19986  # Control wether Hotspot runs Queens test after build.
19987  # Check whether --enable-hotspot-test-in-build was given.
19988if test "${enable_hotspot_test_in_build+set}" = set; then :
19989  enableval=$enable_hotspot_test_in_build;
19990else
19991  enable_hotspot_test_in_build=no
19992fi
19993
19994  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19995    TEST_IN_BUILD=true
19996  else
19997    TEST_IN_BUILD=false
19998  fi
19999
20000
20001  ###############################################################################
20002  #
20003  # Choose cacerts source file
20004  #
20005
20006# Check whether --with-cacerts-file was given.
20007if test "${with_cacerts_file+set}" = set; then :
20008  withval=$with_cacerts_file;
20009fi
20010
20011  if test "x$with_cacerts_file" != x; then
20012    CACERTS_FILE=$with_cacerts_file
20013  fi
20014
20015
20016  ###############################################################################
20017  #
20018  # Enable or disable unlimited crypto
20019  #
20020  # Check whether --enable-unlimited-crypto was given.
20021if test "${enable_unlimited_crypto+set}" = set; then :
20022  enableval=$enable_unlimited_crypto;
20023else
20024  enable_unlimited_crypto=no
20025fi
20026
20027  if test "x$enable_unlimited_crypto" = "xyes"; then
20028    UNLIMITED_CRYPTO=true
20029  else
20030    UNLIMITED_CRYPTO=false
20031  fi
20032
20033
20034  ###############################################################################
20035  #
20036  # Enable or disable the elliptic curve crypto implementation
20037  #
20038
20039
20040  ###############################################################################
20041  #
20042  # --enable-rmiconnector-iiop
20043  #
20044  # Check whether --enable-rmiconnector-iiop was given.
20045if test "${enable_rmiconnector_iiop+set}" = set; then :
20046  enableval=$enable_rmiconnector_iiop;
20047fi
20048
20049  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20050    RMICONNECTOR_IIOP=true
20051  else
20052    RMICONNECTOR_IIOP=false
20053  fi
20054
20055
20056  ###############################################################################
20057  #
20058  # Compress jars
20059  #
20060  COMPRESS_JARS=false
20061
20062
20063
20064
20065  # Source the version numbers
20066  . $AUTOCONF_DIR/version-numbers
20067
20068  # Get the settings from parameters
20069
20070# Check whether --with-milestone was given.
20071if test "${with_milestone+set}" = set; then :
20072  withval=$with_milestone;
20073fi
20074
20075  if test "x$with_milestone" = xyes; then
20076    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20077  elif test "x$with_milestone" != x; then
20078    MILESTONE="$with_milestone"
20079  fi
20080  if test "x$MILESTONE" = x; then
20081    MILESTONE=internal
20082  fi
20083
20084
20085# Check whether --with-update-version was given.
20086if test "${with_update_version+set}" = set; then :
20087  withval=$with_update_version;
20088fi
20089
20090  if test "x$with_update_version" = xyes; then
20091    as_fn_error $? "Update version must have a value" "$LINENO" 5
20092  elif test "x$with_update_version" != x; then
20093    JDK_UPDATE_VERSION="$with_update_version"
20094    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20095    # to a bug in expr (which reduces it to just X). To work around this, we
20096    # always add a 0 to one digit update versions.
20097    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20098      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20099    fi
20100  fi
20101
20102
20103# Check whether --with-user-release-suffix was given.
20104if test "${with_user_release_suffix+set}" = set; then :
20105  withval=$with_user_release_suffix;
20106fi
20107
20108  if test "x$with_user_release_suffix" = xyes; then
20109    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20110  elif test "x$with_user_release_suffix" != x; then
20111    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20112  fi
20113
20114
20115# Check whether --with-build-number was given.
20116if test "${with_build_number+set}" = set; then :
20117  withval=$with_build_number;
20118fi
20119
20120  if test "x$with_build_number" = xyes; then
20121    as_fn_error $? "Build number must have a value" "$LINENO" 5
20122  elif test "x$with_build_number" != x; then
20123    JDK_BUILD_NUMBER="$with_build_number"
20124  fi
20125  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20126  if test "x$JDK_BUILD_NUMBER" = x; then
20127    JDK_BUILD_NUMBER=b00
20128    if test "x$USER_RELEASE_SUFFIX" = x; then
20129      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20130      # Avoid [:alnum:] since it depends on the locale.
20131      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20132      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20133    fi
20134  fi
20135
20136  # Now set the JDK version, milestone, build number etc.
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152  COPYRIGHT_YEAR=`date +'%Y'`
20153
20154
20155  if test "x$JDK_UPDATE_VERSION" != x; then
20156    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20157  else
20158    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20159  fi
20160
20161
20162  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20163
20164
20165
20166###############################################################################
20167#
20168# Setup BootJDK, used to bootstrap the build.
20169#
20170###############################################################################
20171
20172
20173  BOOT_JDK_FOUND=no
20174
20175# Check whether --with-boot-jdk was given.
20176if test "${with_boot_jdk+set}" = set; then :
20177  withval=$with_boot_jdk;
20178fi
20179
20180
20181  # We look for the Boot JDK through various means, going from more certain to
20182  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20183  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20184  # must check if this is indeed valid; otherwise we'll continue looking.
20185
20186  # Test: Is bootjdk explicitely set by command line arguments?
20187
20188  if test "x$BOOT_JDK_FOUND" = xno; then
20189    # Now execute the test
20190
20191  if test "x$with_boot_jdk" != x; then
20192    BOOT_JDK=$with_boot_jdk
20193    BOOT_JDK_FOUND=maybe
20194    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20195$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20196  fi
20197
20198
20199    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20200    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20201      # Do we have a bin/java?
20202      if test ! -x "$BOOT_JDK/bin/java"; then
20203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20205        BOOT_JDK_FOUND=no
20206      else
20207        # Do we have a bin/javac?
20208        if test ! -x "$BOOT_JDK/bin/javac"; then
20209          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20211          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20212$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20213          BOOT_JDK_FOUND=no
20214        else
20215          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20216          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20219            BOOT_JDK_FOUND=no
20220          else
20221            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20222            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20223
20224            # Extra M4 quote needed to protect [] in grep expression.
20225            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20226            if test "x$FOUND_CORRECT_VERSION" = x; then
20227              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20229              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20230$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20231              BOOT_JDK_FOUND=no
20232            else
20233              # We're done! :-)
20234              BOOT_JDK_FOUND=yes
20235
20236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20237
20238  # Input might be given as Windows format, start by converting to
20239  # unix format.
20240  path="$BOOT_JDK"
20241  new_path=`$CYGPATH -u "$path"`
20242
20243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20246  # "foo.exe" is OK but "foo" is an error.
20247  #
20248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20249  # It is also a way to make sure we got the proper file name for the real test later on.
20250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20251  if test "x$test_shortpath" = x; then
20252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20253$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20254    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20255  fi
20256
20257  # Call helper function which possibly converts this using DOS-style short mode.
20258  # If so, the updated path is stored in $new_path.
20259
20260  input_path="$new_path"
20261  # Check if we need to convert this using DOS-style short mode. If the path
20262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20263  # take no chances and rewrite it.
20264  # Note: m4 eats our [], so we need to use [ and ] instead.
20265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20266  if test "x$has_forbidden_chars" != x; then
20267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20271      # Going to short mode and back again did indeed matter. Since short mode is
20272      # case insensitive, let's make it lowercase to improve readability.
20273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20274      # Now convert it back to Unix-stile (cygpath)
20275      input_path=`$CYGPATH -u "$shortmode_path"`
20276      new_path="$input_path"
20277    fi
20278  fi
20279
20280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20281  if test "x$test_cygdrive_prefix" = x; then
20282    # As a simple fix, exclude /usr/bin since it's not a real path.
20283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20285      # a path prefixed by /cygdrive for fixpath to work.
20286      new_path="$CYGWIN_ROOT_PATH$input_path"
20287    fi
20288  fi
20289
20290
20291  if test "x$path" != "x$new_path"; then
20292    BOOT_JDK="$new_path"
20293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20295  fi
20296
20297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20298
20299  path="$BOOT_JDK"
20300  has_colon=`$ECHO $path | $GREP ^.:`
20301  new_path="$path"
20302  if test "x$has_colon" = x; then
20303    # Not in mixed or Windows style, start by that.
20304    new_path=`cmd //c echo $path`
20305  fi
20306
20307
20308  input_path="$new_path"
20309  # Check if we need to convert this using DOS-style short mode. If the path
20310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20311  # take no chances and rewrite it.
20312  # Note: m4 eats our [], so we need to use [ and ] instead.
20313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20314  if test "x$has_forbidden_chars" != x; then
20315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20317  fi
20318
20319
20320  windows_path="$new_path"
20321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20322    unix_path=`$CYGPATH -u "$windows_path"`
20323    new_path="$unix_path"
20324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20326    new_path="$unix_path"
20327  fi
20328
20329  if test "x$path" != "x$new_path"; then
20330    BOOT_JDK="$new_path"
20331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20333  fi
20334
20335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20337
20338  else
20339    # We're on a posix platform. Hooray! :)
20340    path="$BOOT_JDK"
20341    has_space=`$ECHO "$path" | $GREP " "`
20342    if test "x$has_space" != x; then
20343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20346    fi
20347
20348    # Use eval to expand a potential ~
20349    eval path="$path"
20350    if test ! -f "$path" && test ! -d "$path"; then
20351      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20352    fi
20353
20354    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20355  fi
20356
20357              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20358$as_echo_n "checking for Boot JDK... " >&6; }
20359              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20360$as_echo "$BOOT_JDK" >&6; }
20361              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20362$as_echo_n "checking Boot JDK version... " >&6; }
20363              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20364              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20365$as_echo "$BOOT_JDK_VERSION" >&6; }
20366            fi # end check jdk version
20367          fi # end check rt.jar
20368        fi # end check javac
20369      fi # end check java
20370    fi # end check boot jdk found
20371  fi
20372
20373  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20374    # Having specified an argument which is incorrect will produce an instant failure;
20375    # we should not go on looking
20376    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20377  fi
20378
20379  # Test: Is bootjdk available from builddeps?
20380
20381  if test "x$BOOT_JDK_FOUND" = xno; then
20382    # Now execute the test
20383
20384
20385
20386  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20387    # Source the builddeps file again, to make sure it uses the latest variables!
20388    . $builddepsfile
20389    # Look for a target and build machine specific resource!
20390    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20391    if test "x$resource" = x; then
20392      # Ok, lets instead look for a target specific resource
20393      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20394    fi
20395    if test "x$resource" = x; then
20396      # Ok, lets instead look for a build specific resource
20397      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20398    fi
20399    if test "x$resource" = x; then
20400      # Ok, lets instead look for a generic resource
20401      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20402      resource=${builddep_bootjdk}
20403    fi
20404    if test "x$resource" != x; then
20405      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20406$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20407      # If the resource in the builddeps.conf file is an existing directory,
20408      # for example /java/linux/cups
20409      if test -d ${resource}; then
20410        depdir=${resource}
20411      else
20412
20413  # bootjdk is for example mymodule
20414  # $resource is for example libs/general/libmymod_1_2_3.zip
20415  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20416  # $with_builddeps_dir is for example /localhome/builddeps
20417  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20418  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20419  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20420  filename=`basename $resource`
20421  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20422  filebase=${filename%%.*}
20423  extension=${filename#*.}
20424  installdir=$with_builddeps_dir/$filebase
20425  if test ! -f $installdir/$filename.unpacked; then
20426    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20427$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20428    if test ! -d $installdir; then
20429      mkdir -p $installdir
20430    fi
20431    if test ! -d $installdir; then
20432      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20433    fi
20434    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20435    touch $tmpfile
20436    if test ! -f $tmpfile; then
20437      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20438    fi
20439
20440  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20441  # $tmpfile is the local file name for the downloaded file.
20442  VALID_TOOL=no
20443  if test "x$BDEPS_FTP" = xwget; then
20444    VALID_TOOL=yes
20445    wget -O $tmpfile $with_builddeps_server/$resource
20446  fi
20447  if test "x$BDEPS_FTP" = xlftp; then
20448    VALID_TOOL=yes
20449    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20450  fi
20451  if test "x$BDEPS_FTP" = xftp; then
20452    VALID_TOOL=yes
20453    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20454    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20455    FTPUSERPWD=${FTPSERVER%%@*}
20456    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20457      FTPUSER=${userpwd%%:*}
20458      FTPPWD=${userpwd#*@}
20459      FTPSERVER=${FTPSERVER#*@}
20460    else
20461      FTPUSER=ftp
20462      FTPPWD=ftp
20463    fi
20464    # the "pass" command does not work on some
20465    # ftp clients (read ftp.exe) but if it works,
20466    # passive mode is better!
20467    ( \
20468        echo "user $FTPUSER $FTPPWD"        ; \
20469        echo "pass"                         ; \
20470        echo "bin"                          ; \
20471        echo "get $FTPPATH $tmpfile"              ; \
20472    ) | ftp -in $FTPSERVER
20473  fi
20474  if test "x$VALID_TOOL" != xyes; then
20475    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20476  fi
20477
20478    mv $tmpfile $installdir/$filename
20479    if test ! -s $installdir/$filename; then
20480      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20481    fi
20482    case "$extension" in
20483      zip)  echo "Unzipping $installdir/$filename..."
20484        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20485        ;;
20486      tar.gz) echo "Untaring $installdir/$filename..."
20487        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20488        ;;
20489      tgz) echo "Untaring $installdir/$filename..."
20490        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20491        ;;
20492      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20493        ;;
20494    esac
20495  fi
20496  if test -f $installdir/$filename.unpacked; then
20497    depdir=$installdir
20498  fi
20499
20500      fi
20501      # Source the builddeps file again, because in the previous command, the depdir
20502      # was updated to point at the current build dependency install directory.
20503      . $builddepsfile
20504      # Now extract variables from the builddeps.conf files.
20505      theroot=${builddep_bootjdk_ROOT}
20506      thecflags=${builddep_bootjdk_CFLAGS}
20507      thelibs=${builddep_bootjdk_LIBS}
20508      if test "x$depdir" = x; then
20509        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20510      fi
20511      BOOT_JDK=$depdir
20512      if test "x$theroot" != x; then
20513        BOOT_JDK="$theroot"
20514      fi
20515      if test "x$thecflags" != x; then
20516        BOOT_JDK_CFLAGS="$thecflags"
20517      fi
20518      if test "x$thelibs" != x; then
20519        BOOT_JDK_LIBS="$thelibs"
20520      fi
20521      BOOT_JDK_FOUND=maybe
20522      else BOOT_JDK_FOUND=no
20523
20524    fi
20525    else BOOT_JDK_FOUND=no
20526
20527  fi
20528
20529
20530
20531    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20532    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20533      # Do we have a bin/java?
20534      if test ! -x "$BOOT_JDK/bin/java"; then
20535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20537        BOOT_JDK_FOUND=no
20538      else
20539        # Do we have a bin/javac?
20540        if test ! -x "$BOOT_JDK/bin/javac"; then
20541          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20543          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20544$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20545          BOOT_JDK_FOUND=no
20546        else
20547          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20548          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20551            BOOT_JDK_FOUND=no
20552          else
20553            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20555
20556            # Extra M4 quote needed to protect [] in grep expression.
20557            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20558            if test "x$FOUND_CORRECT_VERSION" = x; then
20559              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20561              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20562$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20563              BOOT_JDK_FOUND=no
20564            else
20565              # We're done! :-)
20566              BOOT_JDK_FOUND=yes
20567
20568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20569
20570  # Input might be given as Windows format, start by converting to
20571  # unix format.
20572  path="$BOOT_JDK"
20573  new_path=`$CYGPATH -u "$path"`
20574
20575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20578  # "foo.exe" is OK but "foo" is an error.
20579  #
20580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20581  # It is also a way to make sure we got the proper file name for the real test later on.
20582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20583  if test "x$test_shortpath" = x; then
20584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20586    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20587  fi
20588
20589  # Call helper function which possibly converts this using DOS-style short mode.
20590  # If so, the updated path is stored in $new_path.
20591
20592  input_path="$new_path"
20593  # Check if we need to convert this using DOS-style short mode. If the path
20594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20595  # take no chances and rewrite it.
20596  # Note: m4 eats our [], so we need to use [ and ] instead.
20597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20598  if test "x$has_forbidden_chars" != x; then
20599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20603      # Going to short mode and back again did indeed matter. Since short mode is
20604      # case insensitive, let's make it lowercase to improve readability.
20605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20606      # Now convert it back to Unix-stile (cygpath)
20607      input_path=`$CYGPATH -u "$shortmode_path"`
20608      new_path="$input_path"
20609    fi
20610  fi
20611
20612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20613  if test "x$test_cygdrive_prefix" = x; then
20614    # As a simple fix, exclude /usr/bin since it's not a real path.
20615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20617      # a path prefixed by /cygdrive for fixpath to work.
20618      new_path="$CYGWIN_ROOT_PATH$input_path"
20619    fi
20620  fi
20621
20622
20623  if test "x$path" != "x$new_path"; then
20624    BOOT_JDK="$new_path"
20625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20627  fi
20628
20629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20630
20631  path="$BOOT_JDK"
20632  has_colon=`$ECHO $path | $GREP ^.:`
20633  new_path="$path"
20634  if test "x$has_colon" = x; then
20635    # Not in mixed or Windows style, start by that.
20636    new_path=`cmd //c echo $path`
20637  fi
20638
20639
20640  input_path="$new_path"
20641  # Check if we need to convert this using DOS-style short mode. If the path
20642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20643  # take no chances and rewrite it.
20644  # Note: m4 eats our [], so we need to use [ and ] instead.
20645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20646  if test "x$has_forbidden_chars" != x; then
20647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20649  fi
20650
20651
20652  windows_path="$new_path"
20653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20654    unix_path=`$CYGPATH -u "$windows_path"`
20655    new_path="$unix_path"
20656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20658    new_path="$unix_path"
20659  fi
20660
20661  if test "x$path" != "x$new_path"; then
20662    BOOT_JDK="$new_path"
20663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20665  fi
20666
20667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20669
20670  else
20671    # We're on a posix platform. Hooray! :)
20672    path="$BOOT_JDK"
20673    has_space=`$ECHO "$path" | $GREP " "`
20674    if test "x$has_space" != x; then
20675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20676$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20677      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20678    fi
20679
20680    # Use eval to expand a potential ~
20681    eval path="$path"
20682    if test ! -f "$path" && test ! -d "$path"; then
20683      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20684    fi
20685
20686    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20687  fi
20688
20689              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20690$as_echo_n "checking for Boot JDK... " >&6; }
20691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20692$as_echo "$BOOT_JDK" >&6; }
20693              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20694$as_echo_n "checking Boot JDK version... " >&6; }
20695              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20696              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20697$as_echo "$BOOT_JDK_VERSION" >&6; }
20698            fi # end check jdk version
20699          fi # end check rt.jar
20700        fi # end check javac
20701      fi # end check java
20702    fi # end check boot jdk found
20703  fi
20704
20705
20706  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20707
20708  if test "x$BOOT_JDK_FOUND" = xno; then
20709    # Now execute the test
20710
20711  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20712    # First check at user selected default
20713
20714  if test "x$BOOT_JDK_FOUND" = xno; then
20715    # Now execute the test
20716
20717  if test -x /usr/libexec/java_home; then
20718    BOOT_JDK=`/usr/libexec/java_home `
20719    BOOT_JDK_FOUND=maybe
20720    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20721$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20722  fi
20723
20724
20725    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20726    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20727      # Do we have a bin/java?
20728      if test ! -x "$BOOT_JDK/bin/java"; then
20729        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20731        BOOT_JDK_FOUND=no
20732      else
20733        # Do we have a bin/javac?
20734        if test ! -x "$BOOT_JDK/bin/javac"; then
20735          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20737          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20738$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20739          BOOT_JDK_FOUND=no
20740        else
20741          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20742          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20743            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20745            BOOT_JDK_FOUND=no
20746          else
20747            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20749
20750            # Extra M4 quote needed to protect [] in grep expression.
20751            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20752            if test "x$FOUND_CORRECT_VERSION" = x; then
20753              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20755              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20756$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20757              BOOT_JDK_FOUND=no
20758            else
20759              # We're done! :-)
20760              BOOT_JDK_FOUND=yes
20761
20762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20763
20764  # Input might be given as Windows format, start by converting to
20765  # unix format.
20766  path="$BOOT_JDK"
20767  new_path=`$CYGPATH -u "$path"`
20768
20769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20772  # "foo.exe" is OK but "foo" is an error.
20773  #
20774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20775  # It is also a way to make sure we got the proper file name for the real test later on.
20776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20777  if test "x$test_shortpath" = x; then
20778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20780    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20781  fi
20782
20783  # Call helper function which possibly converts this using DOS-style short mode.
20784  # If so, the updated path is stored in $new_path.
20785
20786  input_path="$new_path"
20787  # Check if we need to convert this using DOS-style short mode. If the path
20788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20789  # take no chances and rewrite it.
20790  # Note: m4 eats our [], so we need to use [ and ] instead.
20791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20792  if test "x$has_forbidden_chars" != x; then
20793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20797      # Going to short mode and back again did indeed matter. Since short mode is
20798      # case insensitive, let's make it lowercase to improve readability.
20799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20800      # Now convert it back to Unix-stile (cygpath)
20801      input_path=`$CYGPATH -u "$shortmode_path"`
20802      new_path="$input_path"
20803    fi
20804  fi
20805
20806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20807  if test "x$test_cygdrive_prefix" = x; then
20808    # As a simple fix, exclude /usr/bin since it's not a real path.
20809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20811      # a path prefixed by /cygdrive for fixpath to work.
20812      new_path="$CYGWIN_ROOT_PATH$input_path"
20813    fi
20814  fi
20815
20816
20817  if test "x$path" != "x$new_path"; then
20818    BOOT_JDK="$new_path"
20819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20820$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20821  fi
20822
20823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20824
20825  path="$BOOT_JDK"
20826  has_colon=`$ECHO $path | $GREP ^.:`
20827  new_path="$path"
20828  if test "x$has_colon" = x; then
20829    # Not in mixed or Windows style, start by that.
20830    new_path=`cmd //c echo $path`
20831  fi
20832
20833
20834  input_path="$new_path"
20835  # Check if we need to convert this using DOS-style short mode. If the path
20836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20837  # take no chances and rewrite it.
20838  # Note: m4 eats our [], so we need to use [ and ] instead.
20839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20840  if test "x$has_forbidden_chars" != x; then
20841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20843  fi
20844
20845
20846  windows_path="$new_path"
20847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20848    unix_path=`$CYGPATH -u "$windows_path"`
20849    new_path="$unix_path"
20850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20852    new_path="$unix_path"
20853  fi
20854
20855  if test "x$path" != "x$new_path"; then
20856    BOOT_JDK="$new_path"
20857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20859  fi
20860
20861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20863
20864  else
20865    # We're on a posix platform. Hooray! :)
20866    path="$BOOT_JDK"
20867    has_space=`$ECHO "$path" | $GREP " "`
20868    if test "x$has_space" != x; then
20869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20871      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20872    fi
20873
20874    # Use eval to expand a potential ~
20875    eval path="$path"
20876    if test ! -f "$path" && test ! -d "$path"; then
20877      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20878    fi
20879
20880    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20881  fi
20882
20883              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20884$as_echo_n "checking for Boot JDK... " >&6; }
20885              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20886$as_echo "$BOOT_JDK" >&6; }
20887              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20888$as_echo_n "checking Boot JDK version... " >&6; }
20889              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20890              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20891$as_echo "$BOOT_JDK_VERSION" >&6; }
20892            fi # end check jdk version
20893          fi # end check rt.jar
20894        fi # end check javac
20895      fi # end check java
20896    fi # end check boot jdk found
20897  fi
20898
20899    # If that did not work out (e.g. too old), try explicit versions instead
20900
20901  if test "x$BOOT_JDK_FOUND" = xno; then
20902    # Now execute the test
20903
20904  if test -x /usr/libexec/java_home; then
20905    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20906    BOOT_JDK_FOUND=maybe
20907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20908$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20909  fi
20910
20911
20912    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20913    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20914      # Do we have a bin/java?
20915      if test ! -x "$BOOT_JDK/bin/java"; then
20916        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20918        BOOT_JDK_FOUND=no
20919      else
20920        # Do we have a bin/javac?
20921        if test ! -x "$BOOT_JDK/bin/javac"; then
20922          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20924          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20925$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20926          BOOT_JDK_FOUND=no
20927        else
20928          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20929          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20930            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20932            BOOT_JDK_FOUND=no
20933          else
20934            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20936
20937            # Extra M4 quote needed to protect [] in grep expression.
20938            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20939            if test "x$FOUND_CORRECT_VERSION" = x; then
20940              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20942              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20943$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20944              BOOT_JDK_FOUND=no
20945            else
20946              # We're done! :-)
20947              BOOT_JDK_FOUND=yes
20948
20949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20950
20951  # Input might be given as Windows format, start by converting to
20952  # unix format.
20953  path="$BOOT_JDK"
20954  new_path=`$CYGPATH -u "$path"`
20955
20956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20959  # "foo.exe" is OK but "foo" is an error.
20960  #
20961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20962  # It is also a way to make sure we got the proper file name for the real test later on.
20963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20964  if test "x$test_shortpath" = x; then
20965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20966$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20967    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20968  fi
20969
20970  # Call helper function which possibly converts this using DOS-style short mode.
20971  # If so, the updated path is stored in $new_path.
20972
20973  input_path="$new_path"
20974  # Check if we need to convert this using DOS-style short mode. If the path
20975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20976  # take no chances and rewrite it.
20977  # Note: m4 eats our [], so we need to use [ and ] instead.
20978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20979  if test "x$has_forbidden_chars" != x; then
20980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20984      # Going to short mode and back again did indeed matter. Since short mode is
20985      # case insensitive, let's make it lowercase to improve readability.
20986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20987      # Now convert it back to Unix-stile (cygpath)
20988      input_path=`$CYGPATH -u "$shortmode_path"`
20989      new_path="$input_path"
20990    fi
20991  fi
20992
20993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20994  if test "x$test_cygdrive_prefix" = x; then
20995    # As a simple fix, exclude /usr/bin since it's not a real path.
20996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20998      # a path prefixed by /cygdrive for fixpath to work.
20999      new_path="$CYGWIN_ROOT_PATH$input_path"
21000    fi
21001  fi
21002
21003
21004  if test "x$path" != "x$new_path"; then
21005    BOOT_JDK="$new_path"
21006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21008  fi
21009
21010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21011
21012  path="$BOOT_JDK"
21013  has_colon=`$ECHO $path | $GREP ^.:`
21014  new_path="$path"
21015  if test "x$has_colon" = x; then
21016    # Not in mixed or Windows style, start by that.
21017    new_path=`cmd //c echo $path`
21018  fi
21019
21020
21021  input_path="$new_path"
21022  # Check if we need to convert this using DOS-style short mode. If the path
21023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21024  # take no chances and rewrite it.
21025  # Note: m4 eats our [], so we need to use [ and ] instead.
21026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21027  if test "x$has_forbidden_chars" != x; then
21028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21030  fi
21031
21032
21033  windows_path="$new_path"
21034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21035    unix_path=`$CYGPATH -u "$windows_path"`
21036    new_path="$unix_path"
21037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21039    new_path="$unix_path"
21040  fi
21041
21042  if test "x$path" != "x$new_path"; then
21043    BOOT_JDK="$new_path"
21044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21045$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21046  fi
21047
21048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21050
21051  else
21052    # We're on a posix platform. Hooray! :)
21053    path="$BOOT_JDK"
21054    has_space=`$ECHO "$path" | $GREP " "`
21055    if test "x$has_space" != x; then
21056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21057$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21058      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21059    fi
21060
21061    # Use eval to expand a potential ~
21062    eval path="$path"
21063    if test ! -f "$path" && test ! -d "$path"; then
21064      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21065    fi
21066
21067    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21068  fi
21069
21070              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21071$as_echo_n "checking for Boot JDK... " >&6; }
21072              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21073$as_echo "$BOOT_JDK" >&6; }
21074              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21075$as_echo_n "checking Boot JDK version... " >&6; }
21076              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21077              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21078$as_echo "$BOOT_JDK_VERSION" >&6; }
21079            fi # end check jdk version
21080          fi # end check rt.jar
21081        fi # end check javac
21082      fi # end check java
21083    fi # end check boot jdk found
21084  fi
21085
21086
21087  if test "x$BOOT_JDK_FOUND" = xno; then
21088    # Now execute the test
21089
21090  if test -x /usr/libexec/java_home; then
21091    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21092    BOOT_JDK_FOUND=maybe
21093    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21094$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21095  fi
21096
21097
21098    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21099    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21100      # Do we have a bin/java?
21101      if test ! -x "$BOOT_JDK/bin/java"; then
21102        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21104        BOOT_JDK_FOUND=no
21105      else
21106        # Do we have a bin/javac?
21107        if test ! -x "$BOOT_JDK/bin/javac"; then
21108          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21110          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21111$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21112          BOOT_JDK_FOUND=no
21113        else
21114          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21115          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21116            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21118            BOOT_JDK_FOUND=no
21119          else
21120            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21121            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21122
21123            # Extra M4 quote needed to protect [] in grep expression.
21124            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21125            if test "x$FOUND_CORRECT_VERSION" = x; then
21126              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21128              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21129$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21130              BOOT_JDK_FOUND=no
21131            else
21132              # We're done! :-)
21133              BOOT_JDK_FOUND=yes
21134
21135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21136
21137  # Input might be given as Windows format, start by converting to
21138  # unix format.
21139  path="$BOOT_JDK"
21140  new_path=`$CYGPATH -u "$path"`
21141
21142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21145  # "foo.exe" is OK but "foo" is an error.
21146  #
21147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21148  # It is also a way to make sure we got the proper file name for the real test later on.
21149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21150  if test "x$test_shortpath" = x; then
21151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21153    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21154  fi
21155
21156  # Call helper function which possibly converts this using DOS-style short mode.
21157  # If so, the updated path is stored in $new_path.
21158
21159  input_path="$new_path"
21160  # Check if we need to convert this using DOS-style short mode. If the path
21161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21162  # take no chances and rewrite it.
21163  # Note: m4 eats our [], so we need to use [ and ] instead.
21164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21165  if test "x$has_forbidden_chars" != x; then
21166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21170      # Going to short mode and back again did indeed matter. Since short mode is
21171      # case insensitive, let's make it lowercase to improve readability.
21172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21173      # Now convert it back to Unix-stile (cygpath)
21174      input_path=`$CYGPATH -u "$shortmode_path"`
21175      new_path="$input_path"
21176    fi
21177  fi
21178
21179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21180  if test "x$test_cygdrive_prefix" = x; then
21181    # As a simple fix, exclude /usr/bin since it's not a real path.
21182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21184      # a path prefixed by /cygdrive for fixpath to work.
21185      new_path="$CYGWIN_ROOT_PATH$input_path"
21186    fi
21187  fi
21188
21189
21190  if test "x$path" != "x$new_path"; then
21191    BOOT_JDK="$new_path"
21192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21194  fi
21195
21196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21197
21198  path="$BOOT_JDK"
21199  has_colon=`$ECHO $path | $GREP ^.:`
21200  new_path="$path"
21201  if test "x$has_colon" = x; then
21202    # Not in mixed or Windows style, start by that.
21203    new_path=`cmd //c echo $path`
21204  fi
21205
21206
21207  input_path="$new_path"
21208  # Check if we need to convert this using DOS-style short mode. If the path
21209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21210  # take no chances and rewrite it.
21211  # Note: m4 eats our [], so we need to use [ and ] instead.
21212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21213  if test "x$has_forbidden_chars" != x; then
21214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21216  fi
21217
21218
21219  windows_path="$new_path"
21220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21221    unix_path=`$CYGPATH -u "$windows_path"`
21222    new_path="$unix_path"
21223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21225    new_path="$unix_path"
21226  fi
21227
21228  if test "x$path" != "x$new_path"; then
21229    BOOT_JDK="$new_path"
21230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21232  fi
21233
21234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21236
21237  else
21238    # We're on a posix platform. Hooray! :)
21239    path="$BOOT_JDK"
21240    has_space=`$ECHO "$path" | $GREP " "`
21241    if test "x$has_space" != x; then
21242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21244      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21245    fi
21246
21247    # Use eval to expand a potential ~
21248    eval path="$path"
21249    if test ! -f "$path" && test ! -d "$path"; then
21250      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21251    fi
21252
21253    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21254  fi
21255
21256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21257$as_echo_n "checking for Boot JDK... " >&6; }
21258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21259$as_echo "$BOOT_JDK" >&6; }
21260              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21261$as_echo_n "checking Boot JDK version... " >&6; }
21262              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21263              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21264$as_echo "$BOOT_JDK_VERSION" >&6; }
21265            fi # end check jdk version
21266          fi # end check rt.jar
21267        fi # end check javac
21268      fi # end check java
21269    fi # end check boot jdk found
21270  fi
21271
21272
21273  if test "x$BOOT_JDK_FOUND" = xno; then
21274    # Now execute the test
21275
21276  if test -x /usr/libexec/java_home; then
21277    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21278    BOOT_JDK_FOUND=maybe
21279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21280$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21281  fi
21282
21283
21284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21286      # Do we have a bin/java?
21287      if test ! -x "$BOOT_JDK/bin/java"; then
21288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21290        BOOT_JDK_FOUND=no
21291      else
21292        # Do we have a bin/javac?
21293        if test ! -x "$BOOT_JDK/bin/javac"; then
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21298          BOOT_JDK_FOUND=no
21299        else
21300          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21301          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21304            BOOT_JDK_FOUND=no
21305          else
21306            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21307            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21308
21309            # Extra M4 quote needed to protect [] in grep expression.
21310            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21311            if test "x$FOUND_CORRECT_VERSION" = x; then
21312              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21314              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21315$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21316              BOOT_JDK_FOUND=no
21317            else
21318              # We're done! :-)
21319              BOOT_JDK_FOUND=yes
21320
21321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21322
21323  # Input might be given as Windows format, start by converting to
21324  # unix format.
21325  path="$BOOT_JDK"
21326  new_path=`$CYGPATH -u "$path"`
21327
21328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21331  # "foo.exe" is OK but "foo" is an error.
21332  #
21333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21334  # It is also a way to make sure we got the proper file name for the real test later on.
21335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21336  if test "x$test_shortpath" = x; then
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21340  fi
21341
21342  # Call helper function which possibly converts this using DOS-style short mode.
21343  # If so, the updated path is stored in $new_path.
21344
21345  input_path="$new_path"
21346  # Check if we need to convert this using DOS-style short mode. If the path
21347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348  # take no chances and rewrite it.
21349  # Note: m4 eats our [], so we need to use [ and ] instead.
21350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21351  if test "x$has_forbidden_chars" != x; then
21352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21356      # Going to short mode and back again did indeed matter. Since short mode is
21357      # case insensitive, let's make it lowercase to improve readability.
21358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21359      # Now convert it back to Unix-stile (cygpath)
21360      input_path=`$CYGPATH -u "$shortmode_path"`
21361      new_path="$input_path"
21362    fi
21363  fi
21364
21365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21366  if test "x$test_cygdrive_prefix" = x; then
21367    # As a simple fix, exclude /usr/bin since it's not a real path.
21368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21370      # a path prefixed by /cygdrive for fixpath to work.
21371      new_path="$CYGWIN_ROOT_PATH$input_path"
21372    fi
21373  fi
21374
21375
21376  if test "x$path" != "x$new_path"; then
21377    BOOT_JDK="$new_path"
21378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21380  fi
21381
21382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21383
21384  path="$BOOT_JDK"
21385  has_colon=`$ECHO $path | $GREP ^.:`
21386  new_path="$path"
21387  if test "x$has_colon" = x; then
21388    # Not in mixed or Windows style, start by that.
21389    new_path=`cmd //c echo $path`
21390  fi
21391
21392
21393  input_path="$new_path"
21394  # Check if we need to convert this using DOS-style short mode. If the path
21395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21396  # take no chances and rewrite it.
21397  # Note: m4 eats our [], so we need to use [ and ] instead.
21398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21399  if test "x$has_forbidden_chars" != x; then
21400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21402  fi
21403
21404
21405  windows_path="$new_path"
21406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21407    unix_path=`$CYGPATH -u "$windows_path"`
21408    new_path="$unix_path"
21409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21411    new_path="$unix_path"
21412  fi
21413
21414  if test "x$path" != "x$new_path"; then
21415    BOOT_JDK="$new_path"
21416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21418  fi
21419
21420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21422
21423  else
21424    # We're on a posix platform. Hooray! :)
21425    path="$BOOT_JDK"
21426    has_space=`$ECHO "$path" | $GREP " "`
21427    if test "x$has_space" != x; then
21428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21431    fi
21432
21433    # Use eval to expand a potential ~
21434    eval path="$path"
21435    if test ! -f "$path" && test ! -d "$path"; then
21436      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21437    fi
21438
21439    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21440  fi
21441
21442              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21443$as_echo_n "checking for Boot JDK... " >&6; }
21444              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21445$as_echo "$BOOT_JDK" >&6; }
21446              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21447$as_echo_n "checking Boot JDK version... " >&6; }
21448              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21450$as_echo "$BOOT_JDK_VERSION" >&6; }
21451            fi # end check jdk version
21452          fi # end check rt.jar
21453        fi # end check javac
21454      fi # end check java
21455    fi # end check boot jdk found
21456  fi
21457
21458  fi
21459
21460
21461    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21462    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21463      # Do we have a bin/java?
21464      if test ! -x "$BOOT_JDK/bin/java"; then
21465        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21467        BOOT_JDK_FOUND=no
21468      else
21469        # Do we have a bin/javac?
21470        if test ! -x "$BOOT_JDK/bin/javac"; then
21471          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21473          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21474$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21475          BOOT_JDK_FOUND=no
21476        else
21477          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21478          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21479            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21480$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21481            BOOT_JDK_FOUND=no
21482          else
21483            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21484            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21485
21486            # Extra M4 quote needed to protect [] in grep expression.
21487            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21488            if test "x$FOUND_CORRECT_VERSION" = x; then
21489              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21491              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21493              BOOT_JDK_FOUND=no
21494            else
21495              # We're done! :-)
21496              BOOT_JDK_FOUND=yes
21497
21498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21499
21500  # Input might be given as Windows format, start by converting to
21501  # unix format.
21502  path="$BOOT_JDK"
21503  new_path=`$CYGPATH -u "$path"`
21504
21505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21508  # "foo.exe" is OK but "foo" is an error.
21509  #
21510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21511  # It is also a way to make sure we got the proper file name for the real test later on.
21512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21513  if test "x$test_shortpath" = x; then
21514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21516    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21517  fi
21518
21519  # Call helper function which possibly converts this using DOS-style short mode.
21520  # If so, the updated path is stored in $new_path.
21521
21522  input_path="$new_path"
21523  # Check if we need to convert this using DOS-style short mode. If the path
21524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21525  # take no chances and rewrite it.
21526  # Note: m4 eats our [], so we need to use [ and ] instead.
21527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21528  if test "x$has_forbidden_chars" != x; then
21529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21533      # Going to short mode and back again did indeed matter. Since short mode is
21534      # case insensitive, let's make it lowercase to improve readability.
21535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21536      # Now convert it back to Unix-stile (cygpath)
21537      input_path=`$CYGPATH -u "$shortmode_path"`
21538      new_path="$input_path"
21539    fi
21540  fi
21541
21542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21543  if test "x$test_cygdrive_prefix" = x; then
21544    # As a simple fix, exclude /usr/bin since it's not a real path.
21545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21547      # a path prefixed by /cygdrive for fixpath to work.
21548      new_path="$CYGWIN_ROOT_PATH$input_path"
21549    fi
21550  fi
21551
21552
21553  if test "x$path" != "x$new_path"; then
21554    BOOT_JDK="$new_path"
21555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21556$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21557  fi
21558
21559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21560
21561  path="$BOOT_JDK"
21562  has_colon=`$ECHO $path | $GREP ^.:`
21563  new_path="$path"
21564  if test "x$has_colon" = x; then
21565    # Not in mixed or Windows style, start by that.
21566    new_path=`cmd //c echo $path`
21567  fi
21568
21569
21570  input_path="$new_path"
21571  # Check if we need to convert this using DOS-style short mode. If the path
21572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21573  # take no chances and rewrite it.
21574  # Note: m4 eats our [], so we need to use [ and ] instead.
21575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21576  if test "x$has_forbidden_chars" != x; then
21577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21579  fi
21580
21581
21582  windows_path="$new_path"
21583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21584    unix_path=`$CYGPATH -u "$windows_path"`
21585    new_path="$unix_path"
21586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21588    new_path="$unix_path"
21589  fi
21590
21591  if test "x$path" != "x$new_path"; then
21592    BOOT_JDK="$new_path"
21593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21594$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21595  fi
21596
21597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21599
21600  else
21601    # We're on a posix platform. Hooray! :)
21602    path="$BOOT_JDK"
21603    has_space=`$ECHO "$path" | $GREP " "`
21604    if test "x$has_space" != x; then
21605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21607      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21608    fi
21609
21610    # Use eval to expand a potential ~
21611    eval path="$path"
21612    if test ! -f "$path" && test ! -d "$path"; then
21613      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21614    fi
21615
21616    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21617  fi
21618
21619              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21620$as_echo_n "checking for Boot JDK... " >&6; }
21621              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21622$as_echo "$BOOT_JDK" >&6; }
21623              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21624$as_echo_n "checking Boot JDK version... " >&6; }
21625              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21626              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21627$as_echo "$BOOT_JDK_VERSION" >&6; }
21628            fi # end check jdk version
21629          fi # end check rt.jar
21630        fi # end check javac
21631      fi # end check java
21632    fi # end check boot jdk found
21633  fi
21634
21635
21636  # Test: Is $JAVA_HOME set?
21637
21638  if test "x$BOOT_JDK_FOUND" = xno; then
21639    # Now execute the test
21640
21641  if test "x$JAVA_HOME" != x; then
21642    JAVA_HOME_PROCESSED="$JAVA_HOME"
21643
21644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21645
21646  # Input might be given as Windows format, start by converting to
21647  # unix format.
21648  path="$JAVA_HOME_PROCESSED"
21649  new_path=`$CYGPATH -u "$path"`
21650
21651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21654  # "foo.exe" is OK but "foo" is an error.
21655  #
21656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21657  # It is also a way to make sure we got the proper file name for the real test later on.
21658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21659  if test "x$test_shortpath" = x; then
21660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21661$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21662    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21663  fi
21664
21665  # Call helper function which possibly converts this using DOS-style short mode.
21666  # If so, the updated path is stored in $new_path.
21667
21668  input_path="$new_path"
21669  # Check if we need to convert this using DOS-style short mode. If the path
21670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21671  # take no chances and rewrite it.
21672  # Note: m4 eats our [], so we need to use [ and ] instead.
21673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21674  if test "x$has_forbidden_chars" != x; then
21675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21679      # Going to short mode and back again did indeed matter. Since short mode is
21680      # case insensitive, let's make it lowercase to improve readability.
21681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21682      # Now convert it back to Unix-stile (cygpath)
21683      input_path=`$CYGPATH -u "$shortmode_path"`
21684      new_path="$input_path"
21685    fi
21686  fi
21687
21688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21689  if test "x$test_cygdrive_prefix" = x; then
21690    # As a simple fix, exclude /usr/bin since it's not a real path.
21691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21693      # a path prefixed by /cygdrive for fixpath to work.
21694      new_path="$CYGWIN_ROOT_PATH$input_path"
21695    fi
21696  fi
21697
21698
21699  if test "x$path" != "x$new_path"; then
21700    JAVA_HOME_PROCESSED="$new_path"
21701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21702$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21703  fi
21704
21705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21706
21707  path="$JAVA_HOME_PROCESSED"
21708  has_colon=`$ECHO $path | $GREP ^.:`
21709  new_path="$path"
21710  if test "x$has_colon" = x; then
21711    # Not in mixed or Windows style, start by that.
21712    new_path=`cmd //c echo $path`
21713  fi
21714
21715
21716  input_path="$new_path"
21717  # Check if we need to convert this using DOS-style short mode. If the path
21718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21719  # take no chances and rewrite it.
21720  # Note: m4 eats our [], so we need to use [ and ] instead.
21721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21722  if test "x$has_forbidden_chars" != x; then
21723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21725  fi
21726
21727
21728  windows_path="$new_path"
21729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21730    unix_path=`$CYGPATH -u "$windows_path"`
21731    new_path="$unix_path"
21732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21734    new_path="$unix_path"
21735  fi
21736
21737  if test "x$path" != "x$new_path"; then
21738    JAVA_HOME_PROCESSED="$new_path"
21739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21740$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21741  fi
21742
21743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21745
21746  else
21747    # We're on a posix platform. Hooray! :)
21748    path="$JAVA_HOME_PROCESSED"
21749    has_space=`$ECHO "$path" | $GREP " "`
21750    if test "x$has_space" != x; then
21751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21752$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21753      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21754    fi
21755
21756    # Use eval to expand a potential ~
21757    eval path="$path"
21758    if test ! -f "$path" && test ! -d "$path"; then
21759      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21760    fi
21761
21762    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21763  fi
21764
21765    if test ! -d "$JAVA_HOME_PROCESSED"; then
21766      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21767$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21768    else
21769      # Aha, the user has set a JAVA_HOME
21770      # let us use that as the Boot JDK.
21771      BOOT_JDK="$JAVA_HOME_PROCESSED"
21772      BOOT_JDK_FOUND=maybe
21773      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21774$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21775    fi
21776  fi
21777
21778
21779    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21780    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21781      # Do we have a bin/java?
21782      if test ! -x "$BOOT_JDK/bin/java"; then
21783        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21785        BOOT_JDK_FOUND=no
21786      else
21787        # Do we have a bin/javac?
21788        if test ! -x "$BOOT_JDK/bin/javac"; then
21789          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21791          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21792$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21793          BOOT_JDK_FOUND=no
21794        else
21795          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21796          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21797            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21799            BOOT_JDK_FOUND=no
21800          else
21801            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21802            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21803
21804            # Extra M4 quote needed to protect [] in grep expression.
21805            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21806            if test "x$FOUND_CORRECT_VERSION" = x; then
21807              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21809              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21810$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21811              BOOT_JDK_FOUND=no
21812            else
21813              # We're done! :-)
21814              BOOT_JDK_FOUND=yes
21815
21816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21817
21818  # Input might be given as Windows format, start by converting to
21819  # unix format.
21820  path="$BOOT_JDK"
21821  new_path=`$CYGPATH -u "$path"`
21822
21823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21826  # "foo.exe" is OK but "foo" is an error.
21827  #
21828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21829  # It is also a way to make sure we got the proper file name for the real test later on.
21830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21831  if test "x$test_shortpath" = x; then
21832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21833$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21834    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21835  fi
21836
21837  # Call helper function which possibly converts this using DOS-style short mode.
21838  # If so, the updated path is stored in $new_path.
21839
21840  input_path="$new_path"
21841  # Check if we need to convert this using DOS-style short mode. If the path
21842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21843  # take no chances and rewrite it.
21844  # Note: m4 eats our [], so we need to use [ and ] instead.
21845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21846  if test "x$has_forbidden_chars" != x; then
21847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21851      # Going to short mode and back again did indeed matter. Since short mode is
21852      # case insensitive, let's make it lowercase to improve readability.
21853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21854      # Now convert it back to Unix-stile (cygpath)
21855      input_path=`$CYGPATH -u "$shortmode_path"`
21856      new_path="$input_path"
21857    fi
21858  fi
21859
21860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21861  if test "x$test_cygdrive_prefix" = x; then
21862    # As a simple fix, exclude /usr/bin since it's not a real path.
21863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21865      # a path prefixed by /cygdrive for fixpath to work.
21866      new_path="$CYGWIN_ROOT_PATH$input_path"
21867    fi
21868  fi
21869
21870
21871  if test "x$path" != "x$new_path"; then
21872    BOOT_JDK="$new_path"
21873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21874$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21875  fi
21876
21877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21878
21879  path="$BOOT_JDK"
21880  has_colon=`$ECHO $path | $GREP ^.:`
21881  new_path="$path"
21882  if test "x$has_colon" = x; then
21883    # Not in mixed or Windows style, start by that.
21884    new_path=`cmd //c echo $path`
21885  fi
21886
21887
21888  input_path="$new_path"
21889  # Check if we need to convert this using DOS-style short mode. If the path
21890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21891  # take no chances and rewrite it.
21892  # Note: m4 eats our [], so we need to use [ and ] instead.
21893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21894  if test "x$has_forbidden_chars" != x; then
21895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21897  fi
21898
21899
21900  windows_path="$new_path"
21901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21902    unix_path=`$CYGPATH -u "$windows_path"`
21903    new_path="$unix_path"
21904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21906    new_path="$unix_path"
21907  fi
21908
21909  if test "x$path" != "x$new_path"; then
21910    BOOT_JDK="$new_path"
21911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21912$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21913  fi
21914
21915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21917
21918  else
21919    # We're on a posix platform. Hooray! :)
21920    path="$BOOT_JDK"
21921    has_space=`$ECHO "$path" | $GREP " "`
21922    if test "x$has_space" != x; then
21923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21925      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21926    fi
21927
21928    # Use eval to expand a potential ~
21929    eval path="$path"
21930    if test ! -f "$path" && test ! -d "$path"; then
21931      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21932    fi
21933
21934    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21935  fi
21936
21937              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21938$as_echo_n "checking for Boot JDK... " >&6; }
21939              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21940$as_echo "$BOOT_JDK" >&6; }
21941              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21942$as_echo_n "checking Boot JDK version... " >&6; }
21943              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21944              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21945$as_echo "$BOOT_JDK_VERSION" >&6; }
21946            fi # end check jdk version
21947          fi # end check rt.jar
21948        fi # end check javac
21949      fi # end check java
21950    fi # end check boot jdk found
21951  fi
21952
21953
21954  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21955
21956  if test "x$BOOT_JDK_FOUND" = xno; then
21957    # Now execute the test
21958
21959  # Extract the first word of "javac", so it can be a program name with args.
21960set dummy javac; ac_word=$2
21961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21962$as_echo_n "checking for $ac_word... " >&6; }
21963if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21964  $as_echo_n "(cached) " >&6
21965else
21966  case $JAVAC_CHECK in
21967  [\\/]* | ?:[\\/]*)
21968  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21969  ;;
21970  *)
21971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21972for as_dir in $PATH
21973do
21974  IFS=$as_save_IFS
21975  test -z "$as_dir" && as_dir=.
21976    for ac_exec_ext in '' $ac_executable_extensions; do
21977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21978    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21980    break 2
21981  fi
21982done
21983  done
21984IFS=$as_save_IFS
21985
21986  ;;
21987esac
21988fi
21989JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21990if test -n "$JAVAC_CHECK"; then
21991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21992$as_echo "$JAVAC_CHECK" >&6; }
21993else
21994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21995$as_echo "no" >&6; }
21996fi
21997
21998
21999  # Extract the first word of "java", so it can be a program name with args.
22000set dummy java; ac_word=$2
22001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22002$as_echo_n "checking for $ac_word... " >&6; }
22003if ${ac_cv_path_JAVA_CHECK+:} false; then :
22004  $as_echo_n "(cached) " >&6
22005else
22006  case $JAVA_CHECK in
22007  [\\/]* | ?:[\\/]*)
22008  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22009  ;;
22010  *)
22011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22012for as_dir in $PATH
22013do
22014  IFS=$as_save_IFS
22015  test -z "$as_dir" && as_dir=.
22016    for ac_exec_ext in '' $ac_executable_extensions; do
22017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22018    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22020    break 2
22021  fi
22022done
22023  done
22024IFS=$as_save_IFS
22025
22026  ;;
22027esac
22028fi
22029JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22030if test -n "$JAVA_CHECK"; then
22031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22032$as_echo "$JAVA_CHECK" >&6; }
22033else
22034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22035$as_echo "no" >&6; }
22036fi
22037
22038
22039  BINARY="$JAVAC_CHECK"
22040  if test "x$JAVAC_CHECK" = x; then
22041    BINARY="$JAVA_CHECK"
22042  fi
22043  if test "x$BINARY" != x; then
22044    # So there is a java(c) binary, it might be part of a JDK.
22045    # Lets find the JDK/JRE directory by following symbolic links.
22046    # Linux/GNU systems often have links from /usr/bin/java to
22047    # /etc/alternatives/java to the real JDK binary.
22048
22049  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22050    # Follow a chain of symbolic links. Use readlink
22051    # where it exists, else fall back to horribly
22052    # complicated shell code.
22053    if test "x$READLINK_TESTED" != yes; then
22054      # On MacOSX there is a readlink tool with a different
22055      # purpose than the GNU readlink tool. Check the found readlink.
22056      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22057      if test "x$ISGNU" = x; then
22058        # A readlink that we do not know how to use.
22059        # Are there other non-GNU readlinks out there?
22060        READLINK_TESTED=yes
22061        READLINK=
22062      fi
22063    fi
22064
22065    if test "x$READLINK" != x; then
22066      BINARY=`$READLINK -f $BINARY`
22067    else
22068      # Save the current directory for restoring afterwards
22069      STARTDIR=$PWD
22070      COUNTER=0
22071      sym_link_dir=`$DIRNAME $BINARY`
22072      sym_link_file=`$BASENAME $BINARY`
22073      cd $sym_link_dir
22074      # Use -P flag to resolve symlinks in directories.
22075      cd `$THEPWDCMD -P`
22076      sym_link_dir=`$THEPWDCMD -P`
22077      # Resolve file symlinks
22078      while test $COUNTER -lt 20; do
22079        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22080        if test "x$ISLINK" == x; then
22081          # This is not a symbolic link! We are done!
22082          break
22083        fi
22084        # Again resolve directory symlinks since the target of the just found
22085        # link could be in a different directory
22086        cd `$DIRNAME $ISLINK`
22087        sym_link_dir=`$THEPWDCMD -P`
22088        sym_link_file=`$BASENAME $ISLINK`
22089        let COUNTER=COUNTER+1
22090      done
22091      cd $STARTDIR
22092      BINARY=$sym_link_dir/$sym_link_file
22093    fi
22094  fi
22095
22096    BOOT_JDK=`dirname "$BINARY"`
22097    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22098    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22099      # Looks like we found ourselves an JDK
22100      BOOT_JDK_FOUND=maybe
22101      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22102$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22103    fi
22104  fi
22105
22106
22107    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22108    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22109      # Do we have a bin/java?
22110      if test ! -x "$BOOT_JDK/bin/java"; then
22111        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22113        BOOT_JDK_FOUND=no
22114      else
22115        # Do we have a bin/javac?
22116        if test ! -x "$BOOT_JDK/bin/javac"; then
22117          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22119          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22120$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22121          BOOT_JDK_FOUND=no
22122        else
22123          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22124          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22125            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22127            BOOT_JDK_FOUND=no
22128          else
22129            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22130            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22131
22132            # Extra M4 quote needed to protect [] in grep expression.
22133            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22134            if test "x$FOUND_CORRECT_VERSION" = x; then
22135              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22137              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22138$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22139              BOOT_JDK_FOUND=no
22140            else
22141              # We're done! :-)
22142              BOOT_JDK_FOUND=yes
22143
22144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22145
22146  # Input might be given as Windows format, start by converting to
22147  # unix format.
22148  path="$BOOT_JDK"
22149  new_path=`$CYGPATH -u "$path"`
22150
22151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22154  # "foo.exe" is OK but "foo" is an error.
22155  #
22156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22157  # It is also a way to make sure we got the proper file name for the real test later on.
22158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22159  if test "x$test_shortpath" = x; then
22160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22162    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22163  fi
22164
22165  # Call helper function which possibly converts this using DOS-style short mode.
22166  # If so, the updated path is stored in $new_path.
22167
22168  input_path="$new_path"
22169  # Check if we need to convert this using DOS-style short mode. If the path
22170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22171  # take no chances and rewrite it.
22172  # Note: m4 eats our [], so we need to use [ and ] instead.
22173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22174  if test "x$has_forbidden_chars" != x; then
22175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22179      # Going to short mode and back again did indeed matter. Since short mode is
22180      # case insensitive, let's make it lowercase to improve readability.
22181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22182      # Now convert it back to Unix-stile (cygpath)
22183      input_path=`$CYGPATH -u "$shortmode_path"`
22184      new_path="$input_path"
22185    fi
22186  fi
22187
22188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22189  if test "x$test_cygdrive_prefix" = x; then
22190    # As a simple fix, exclude /usr/bin since it's not a real path.
22191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22193      # a path prefixed by /cygdrive for fixpath to work.
22194      new_path="$CYGWIN_ROOT_PATH$input_path"
22195    fi
22196  fi
22197
22198
22199  if test "x$path" != "x$new_path"; then
22200    BOOT_JDK="$new_path"
22201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22202$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22203  fi
22204
22205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22206
22207  path="$BOOT_JDK"
22208  has_colon=`$ECHO $path | $GREP ^.:`
22209  new_path="$path"
22210  if test "x$has_colon" = x; then
22211    # Not in mixed or Windows style, start by that.
22212    new_path=`cmd //c echo $path`
22213  fi
22214
22215
22216  input_path="$new_path"
22217  # Check if we need to convert this using DOS-style short mode. If the path
22218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22219  # take no chances and rewrite it.
22220  # Note: m4 eats our [], so we need to use [ and ] instead.
22221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22222  if test "x$has_forbidden_chars" != x; then
22223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22225  fi
22226
22227
22228  windows_path="$new_path"
22229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22230    unix_path=`$CYGPATH -u "$windows_path"`
22231    new_path="$unix_path"
22232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22234    new_path="$unix_path"
22235  fi
22236
22237  if test "x$path" != "x$new_path"; then
22238    BOOT_JDK="$new_path"
22239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22241  fi
22242
22243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22245
22246  else
22247    # We're on a posix platform. Hooray! :)
22248    path="$BOOT_JDK"
22249    has_space=`$ECHO "$path" | $GREP " "`
22250    if test "x$has_space" != x; then
22251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22254    fi
22255
22256    # Use eval to expand a potential ~
22257    eval path="$path"
22258    if test ! -f "$path" && test ! -d "$path"; then
22259      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22260    fi
22261
22262    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22263  fi
22264
22265              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22266$as_echo_n "checking for Boot JDK... " >&6; }
22267              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22268$as_echo "$BOOT_JDK" >&6; }
22269              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22270$as_echo_n "checking Boot JDK version... " >&6; }
22271              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22272              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22273$as_echo "$BOOT_JDK_VERSION" >&6; }
22274            fi # end check jdk version
22275          fi # end check rt.jar
22276        fi # end check javac
22277      fi # end check java
22278    fi # end check boot jdk found
22279  fi
22280
22281
22282  # Test: Is there a JDK installed in default, well-known locations?
22283
22284  if test "x$BOOT_JDK_FOUND" = xno; then
22285    # Now execute the test
22286
22287  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22288
22289  if test "x$BOOT_JDK_FOUND" = xno; then
22290    # Now execute the test
22291
22292  if test "x$ProgramW6432" != x; then
22293    VIRTUAL_DIR="$ProgramW6432/Java"
22294
22295  windows_path="$VIRTUAL_DIR"
22296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22297    unix_path=`$CYGPATH -u "$windows_path"`
22298    VIRTUAL_DIR="$unix_path"
22299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22301    VIRTUAL_DIR="$unix_path"
22302  fi
22303
22304
22305  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22306  BOOT_JDK_SUFFIX=""
22307  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22308  if test "x$ALL_JDKS_FOUND" != x; then
22309    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22310
22311  if test "x$BOOT_JDK_FOUND" = xno; then
22312    # Now execute the test
22313
22314        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22315        if test -d "$BOOT_JDK"; then
22316          BOOT_JDK_FOUND=maybe
22317          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22318$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22319        fi
22320
22321
22322    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22323    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22324      # Do we have a bin/java?
22325      if test ! -x "$BOOT_JDK/bin/java"; then
22326        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22328        BOOT_JDK_FOUND=no
22329      else
22330        # Do we have a bin/javac?
22331        if test ! -x "$BOOT_JDK/bin/javac"; then
22332          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22334          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22335$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22336          BOOT_JDK_FOUND=no
22337        else
22338          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22339          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22340            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22342            BOOT_JDK_FOUND=no
22343          else
22344            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22345            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22346
22347            # Extra M4 quote needed to protect [] in grep expression.
22348            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22349            if test "x$FOUND_CORRECT_VERSION" = x; then
22350              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22352              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22354              BOOT_JDK_FOUND=no
22355            else
22356              # We're done! :-)
22357              BOOT_JDK_FOUND=yes
22358
22359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22360
22361  # Input might be given as Windows format, start by converting to
22362  # unix format.
22363  path="$BOOT_JDK"
22364  new_path=`$CYGPATH -u "$path"`
22365
22366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22369  # "foo.exe" is OK but "foo" is an error.
22370  #
22371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22372  # It is also a way to make sure we got the proper file name for the real test later on.
22373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22374  if test "x$test_shortpath" = x; then
22375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22376$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22377    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22378  fi
22379
22380  # Call helper function which possibly converts this using DOS-style short mode.
22381  # If so, the updated path is stored in $new_path.
22382
22383  input_path="$new_path"
22384  # Check if we need to convert this using DOS-style short mode. If the path
22385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22386  # take no chances and rewrite it.
22387  # Note: m4 eats our [], so we need to use [ and ] instead.
22388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22389  if test "x$has_forbidden_chars" != x; then
22390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22394      # Going to short mode and back again did indeed matter. Since short mode is
22395      # case insensitive, let's make it lowercase to improve readability.
22396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22397      # Now convert it back to Unix-stile (cygpath)
22398      input_path=`$CYGPATH -u "$shortmode_path"`
22399      new_path="$input_path"
22400    fi
22401  fi
22402
22403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22404  if test "x$test_cygdrive_prefix" = x; then
22405    # As a simple fix, exclude /usr/bin since it's not a real path.
22406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22408      # a path prefixed by /cygdrive for fixpath to work.
22409      new_path="$CYGWIN_ROOT_PATH$input_path"
22410    fi
22411  fi
22412
22413
22414  if test "x$path" != "x$new_path"; then
22415    BOOT_JDK="$new_path"
22416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22418  fi
22419
22420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22421
22422  path="$BOOT_JDK"
22423  has_colon=`$ECHO $path | $GREP ^.:`
22424  new_path="$path"
22425  if test "x$has_colon" = x; then
22426    # Not in mixed or Windows style, start by that.
22427    new_path=`cmd //c echo $path`
22428  fi
22429
22430
22431  input_path="$new_path"
22432  # Check if we need to convert this using DOS-style short mode. If the path
22433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22434  # take no chances and rewrite it.
22435  # Note: m4 eats our [], so we need to use [ and ] instead.
22436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22437  if test "x$has_forbidden_chars" != x; then
22438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22440  fi
22441
22442
22443  windows_path="$new_path"
22444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22445    unix_path=`$CYGPATH -u "$windows_path"`
22446    new_path="$unix_path"
22447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22449    new_path="$unix_path"
22450  fi
22451
22452  if test "x$path" != "x$new_path"; then
22453    BOOT_JDK="$new_path"
22454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22456  fi
22457
22458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22460
22461  else
22462    # We're on a posix platform. Hooray! :)
22463    path="$BOOT_JDK"
22464    has_space=`$ECHO "$path" | $GREP " "`
22465    if test "x$has_space" != x; then
22466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22467$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22468      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22469    fi
22470
22471    # Use eval to expand a potential ~
22472    eval path="$path"
22473    if test ! -f "$path" && test ! -d "$path"; then
22474      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22475    fi
22476
22477    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22478  fi
22479
22480              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22481$as_echo_n "checking for Boot JDK... " >&6; }
22482              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22483$as_echo "$BOOT_JDK" >&6; }
22484              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22485$as_echo_n "checking Boot JDK version... " >&6; }
22486              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22488$as_echo "$BOOT_JDK_VERSION" >&6; }
22489            fi # end check jdk version
22490          fi # end check rt.jar
22491        fi # end check javac
22492      fi # end check java
22493    fi # end check boot jdk found
22494  fi
22495
22496    done
22497  fi
22498
22499  fi
22500
22501
22502    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22503    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22504      # Do we have a bin/java?
22505      if test ! -x "$BOOT_JDK/bin/java"; then
22506        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22508        BOOT_JDK_FOUND=no
22509      else
22510        # Do we have a bin/javac?
22511        if test ! -x "$BOOT_JDK/bin/javac"; then
22512          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22514          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22515$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22516          BOOT_JDK_FOUND=no
22517        else
22518          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22519          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22520            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22522            BOOT_JDK_FOUND=no
22523          else
22524            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22526
22527            # Extra M4 quote needed to protect [] in grep expression.
22528            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22529            if test "x$FOUND_CORRECT_VERSION" = x; then
22530              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22532              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22533$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22534              BOOT_JDK_FOUND=no
22535            else
22536              # We're done! :-)
22537              BOOT_JDK_FOUND=yes
22538
22539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22540
22541  # Input might be given as Windows format, start by converting to
22542  # unix format.
22543  path="$BOOT_JDK"
22544  new_path=`$CYGPATH -u "$path"`
22545
22546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22549  # "foo.exe" is OK but "foo" is an error.
22550  #
22551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22552  # It is also a way to make sure we got the proper file name for the real test later on.
22553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22554  if test "x$test_shortpath" = x; then
22555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22558  fi
22559
22560  # Call helper function which possibly converts this using DOS-style short mode.
22561  # If so, the updated path is stored in $new_path.
22562
22563  input_path="$new_path"
22564  # Check if we need to convert this using DOS-style short mode. If the path
22565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22566  # take no chances and rewrite it.
22567  # Note: m4 eats our [], so we need to use [ and ] instead.
22568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22569  if test "x$has_forbidden_chars" != x; then
22570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22574      # Going to short mode and back again did indeed matter. Since short mode is
22575      # case insensitive, let's make it lowercase to improve readability.
22576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22577      # Now convert it back to Unix-stile (cygpath)
22578      input_path=`$CYGPATH -u "$shortmode_path"`
22579      new_path="$input_path"
22580    fi
22581  fi
22582
22583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22584  if test "x$test_cygdrive_prefix" = x; then
22585    # As a simple fix, exclude /usr/bin since it's not a real path.
22586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22588      # a path prefixed by /cygdrive for fixpath to work.
22589      new_path="$CYGWIN_ROOT_PATH$input_path"
22590    fi
22591  fi
22592
22593
22594  if test "x$path" != "x$new_path"; then
22595    BOOT_JDK="$new_path"
22596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22598  fi
22599
22600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22601
22602  path="$BOOT_JDK"
22603  has_colon=`$ECHO $path | $GREP ^.:`
22604  new_path="$path"
22605  if test "x$has_colon" = x; then
22606    # Not in mixed or Windows style, start by that.
22607    new_path=`cmd //c echo $path`
22608  fi
22609
22610
22611  input_path="$new_path"
22612  # Check if we need to convert this using DOS-style short mode. If the path
22613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22614  # take no chances and rewrite it.
22615  # Note: m4 eats our [], so we need to use [ and ] instead.
22616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22617  if test "x$has_forbidden_chars" != x; then
22618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22620  fi
22621
22622
22623  windows_path="$new_path"
22624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22625    unix_path=`$CYGPATH -u "$windows_path"`
22626    new_path="$unix_path"
22627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22629    new_path="$unix_path"
22630  fi
22631
22632  if test "x$path" != "x$new_path"; then
22633    BOOT_JDK="$new_path"
22634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22636  fi
22637
22638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22640
22641  else
22642    # We're on a posix platform. Hooray! :)
22643    path="$BOOT_JDK"
22644    has_space=`$ECHO "$path" | $GREP " "`
22645    if test "x$has_space" != x; then
22646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22648      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22649    fi
22650
22651    # Use eval to expand a potential ~
22652    eval path="$path"
22653    if test ! -f "$path" && test ! -d "$path"; then
22654      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22655    fi
22656
22657    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22658  fi
22659
22660              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22661$as_echo_n "checking for Boot JDK... " >&6; }
22662              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22663$as_echo "$BOOT_JDK" >&6; }
22664              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22665$as_echo_n "checking Boot JDK version... " >&6; }
22666              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22667              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22668$as_echo "$BOOT_JDK_VERSION" >&6; }
22669            fi # end check jdk version
22670          fi # end check rt.jar
22671        fi # end check javac
22672      fi # end check java
22673    fi # end check boot jdk found
22674  fi
22675
22676
22677  if test "x$BOOT_JDK_FOUND" = xno; then
22678    # Now execute the test
22679
22680  if test "x$PROGRAMW6432" != x; then
22681    VIRTUAL_DIR="$PROGRAMW6432/Java"
22682
22683  windows_path="$VIRTUAL_DIR"
22684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22685    unix_path=`$CYGPATH -u "$windows_path"`
22686    VIRTUAL_DIR="$unix_path"
22687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22689    VIRTUAL_DIR="$unix_path"
22690  fi
22691
22692
22693  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22694  BOOT_JDK_SUFFIX=""
22695  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22696  if test "x$ALL_JDKS_FOUND" != x; then
22697    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22698
22699  if test "x$BOOT_JDK_FOUND" = xno; then
22700    # Now execute the test
22701
22702        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22703        if test -d "$BOOT_JDK"; then
22704          BOOT_JDK_FOUND=maybe
22705          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22706$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22707        fi
22708
22709
22710    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22711    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22712      # Do we have a bin/java?
22713      if test ! -x "$BOOT_JDK/bin/java"; then
22714        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22716        BOOT_JDK_FOUND=no
22717      else
22718        # Do we have a bin/javac?
22719        if test ! -x "$BOOT_JDK/bin/javac"; then
22720          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22722          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22723$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22724          BOOT_JDK_FOUND=no
22725        else
22726          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22727          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22730            BOOT_JDK_FOUND=no
22731          else
22732            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22734
22735            # Extra M4 quote needed to protect [] in grep expression.
22736            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22737            if test "x$FOUND_CORRECT_VERSION" = x; then
22738              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22740              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22741$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22742              BOOT_JDK_FOUND=no
22743            else
22744              # We're done! :-)
22745              BOOT_JDK_FOUND=yes
22746
22747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22748
22749  # Input might be given as Windows format, start by converting to
22750  # unix format.
22751  path="$BOOT_JDK"
22752  new_path=`$CYGPATH -u "$path"`
22753
22754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22757  # "foo.exe" is OK but "foo" is an error.
22758  #
22759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22760  # It is also a way to make sure we got the proper file name for the real test later on.
22761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22762  if test "x$test_shortpath" = x; then
22763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22765    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22766  fi
22767
22768  # Call helper function which possibly converts this using DOS-style short mode.
22769  # If so, the updated path is stored in $new_path.
22770
22771  input_path="$new_path"
22772  # Check if we need to convert this using DOS-style short mode. If the path
22773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22774  # take no chances and rewrite it.
22775  # Note: m4 eats our [], so we need to use [ and ] instead.
22776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22777  if test "x$has_forbidden_chars" != x; then
22778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22782      # Going to short mode and back again did indeed matter. Since short mode is
22783      # case insensitive, let's make it lowercase to improve readability.
22784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22785      # Now convert it back to Unix-stile (cygpath)
22786      input_path=`$CYGPATH -u "$shortmode_path"`
22787      new_path="$input_path"
22788    fi
22789  fi
22790
22791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22792  if test "x$test_cygdrive_prefix" = x; then
22793    # As a simple fix, exclude /usr/bin since it's not a real path.
22794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22796      # a path prefixed by /cygdrive for fixpath to work.
22797      new_path="$CYGWIN_ROOT_PATH$input_path"
22798    fi
22799  fi
22800
22801
22802  if test "x$path" != "x$new_path"; then
22803    BOOT_JDK="$new_path"
22804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22805$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22806  fi
22807
22808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22809
22810  path="$BOOT_JDK"
22811  has_colon=`$ECHO $path | $GREP ^.:`
22812  new_path="$path"
22813  if test "x$has_colon" = x; then
22814    # Not in mixed or Windows style, start by that.
22815    new_path=`cmd //c echo $path`
22816  fi
22817
22818
22819  input_path="$new_path"
22820  # Check if we need to convert this using DOS-style short mode. If the path
22821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22822  # take no chances and rewrite it.
22823  # Note: m4 eats our [], so we need to use [ and ] instead.
22824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22825  if test "x$has_forbidden_chars" != x; then
22826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22828  fi
22829
22830
22831  windows_path="$new_path"
22832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22833    unix_path=`$CYGPATH -u "$windows_path"`
22834    new_path="$unix_path"
22835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22837    new_path="$unix_path"
22838  fi
22839
22840  if test "x$path" != "x$new_path"; then
22841    BOOT_JDK="$new_path"
22842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22844  fi
22845
22846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22848
22849  else
22850    # We're on a posix platform. Hooray! :)
22851    path="$BOOT_JDK"
22852    has_space=`$ECHO "$path" | $GREP " "`
22853    if test "x$has_space" != x; then
22854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22856      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22857    fi
22858
22859    # Use eval to expand a potential ~
22860    eval path="$path"
22861    if test ! -f "$path" && test ! -d "$path"; then
22862      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22863    fi
22864
22865    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22866  fi
22867
22868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22869$as_echo_n "checking for Boot JDK... " >&6; }
22870              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22871$as_echo "$BOOT_JDK" >&6; }
22872              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22873$as_echo_n "checking Boot JDK version... " >&6; }
22874              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22875              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22876$as_echo "$BOOT_JDK_VERSION" >&6; }
22877            fi # end check jdk version
22878          fi # end check rt.jar
22879        fi # end check javac
22880      fi # end check java
22881    fi # end check boot jdk found
22882  fi
22883
22884    done
22885  fi
22886
22887  fi
22888
22889
22890    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22891    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22892      # Do we have a bin/java?
22893      if test ! -x "$BOOT_JDK/bin/java"; then
22894        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22895$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22896        BOOT_JDK_FOUND=no
22897      else
22898        # Do we have a bin/javac?
22899        if test ! -x "$BOOT_JDK/bin/javac"; then
22900          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22902          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22903$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22904          BOOT_JDK_FOUND=no
22905        else
22906          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22907          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22908            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22910            BOOT_JDK_FOUND=no
22911          else
22912            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22913            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22914
22915            # Extra M4 quote needed to protect [] in grep expression.
22916            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22917            if test "x$FOUND_CORRECT_VERSION" = x; then
22918              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22920              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22921$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22922              BOOT_JDK_FOUND=no
22923            else
22924              # We're done! :-)
22925              BOOT_JDK_FOUND=yes
22926
22927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22928
22929  # Input might be given as Windows format, start by converting to
22930  # unix format.
22931  path="$BOOT_JDK"
22932  new_path=`$CYGPATH -u "$path"`
22933
22934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22937  # "foo.exe" is OK but "foo" is an error.
22938  #
22939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22940  # It is also a way to make sure we got the proper file name for the real test later on.
22941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22942  if test "x$test_shortpath" = x; then
22943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22946  fi
22947
22948  # Call helper function which possibly converts this using DOS-style short mode.
22949  # If so, the updated path is stored in $new_path.
22950
22951  input_path="$new_path"
22952  # Check if we need to convert this using DOS-style short mode. If the path
22953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22954  # take no chances and rewrite it.
22955  # Note: m4 eats our [], so we need to use [ and ] instead.
22956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22957  if test "x$has_forbidden_chars" != x; then
22958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22962      # Going to short mode and back again did indeed matter. Since short mode is
22963      # case insensitive, let's make it lowercase to improve readability.
22964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22965      # Now convert it back to Unix-stile (cygpath)
22966      input_path=`$CYGPATH -u "$shortmode_path"`
22967      new_path="$input_path"
22968    fi
22969  fi
22970
22971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22972  if test "x$test_cygdrive_prefix" = x; then
22973    # As a simple fix, exclude /usr/bin since it's not a real path.
22974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22976      # a path prefixed by /cygdrive for fixpath to work.
22977      new_path="$CYGWIN_ROOT_PATH$input_path"
22978    fi
22979  fi
22980
22981
22982  if test "x$path" != "x$new_path"; then
22983    BOOT_JDK="$new_path"
22984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22986  fi
22987
22988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22989
22990  path="$BOOT_JDK"
22991  has_colon=`$ECHO $path | $GREP ^.:`
22992  new_path="$path"
22993  if test "x$has_colon" = x; then
22994    # Not in mixed or Windows style, start by that.
22995    new_path=`cmd //c echo $path`
22996  fi
22997
22998
22999  input_path="$new_path"
23000  # Check if we need to convert this using DOS-style short mode. If the path
23001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23002  # take no chances and rewrite it.
23003  # Note: m4 eats our [], so we need to use [ and ] instead.
23004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23005  if test "x$has_forbidden_chars" != x; then
23006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23008  fi
23009
23010
23011  windows_path="$new_path"
23012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23013    unix_path=`$CYGPATH -u "$windows_path"`
23014    new_path="$unix_path"
23015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23017    new_path="$unix_path"
23018  fi
23019
23020  if test "x$path" != "x$new_path"; then
23021    BOOT_JDK="$new_path"
23022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23024  fi
23025
23026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23028
23029  else
23030    # We're on a posix platform. Hooray! :)
23031    path="$BOOT_JDK"
23032    has_space=`$ECHO "$path" | $GREP " "`
23033    if test "x$has_space" != x; then
23034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23036      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23037    fi
23038
23039    # Use eval to expand a potential ~
23040    eval path="$path"
23041    if test ! -f "$path" && test ! -d "$path"; then
23042      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23043    fi
23044
23045    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23046  fi
23047
23048              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23049$as_echo_n "checking for Boot JDK... " >&6; }
23050              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23051$as_echo "$BOOT_JDK" >&6; }
23052              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23053$as_echo_n "checking Boot JDK version... " >&6; }
23054              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23055              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23056$as_echo "$BOOT_JDK_VERSION" >&6; }
23057            fi # end check jdk version
23058          fi # end check rt.jar
23059        fi # end check javac
23060      fi # end check java
23061    fi # end check boot jdk found
23062  fi
23063
23064
23065  if test "x$BOOT_JDK_FOUND" = xno; then
23066    # Now execute the test
23067
23068  if test "x$PROGRAMFILES" != x; then
23069    VIRTUAL_DIR="$PROGRAMFILES/Java"
23070
23071  windows_path="$VIRTUAL_DIR"
23072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23073    unix_path=`$CYGPATH -u "$windows_path"`
23074    VIRTUAL_DIR="$unix_path"
23075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23077    VIRTUAL_DIR="$unix_path"
23078  fi
23079
23080
23081  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23082  BOOT_JDK_SUFFIX=""
23083  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23084  if test "x$ALL_JDKS_FOUND" != x; then
23085    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23086
23087  if test "x$BOOT_JDK_FOUND" = xno; then
23088    # Now execute the test
23089
23090        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23091        if test -d "$BOOT_JDK"; then
23092          BOOT_JDK_FOUND=maybe
23093          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23094$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23095        fi
23096
23097
23098    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23099    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23100      # Do we have a bin/java?
23101      if test ! -x "$BOOT_JDK/bin/java"; then
23102        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23104        BOOT_JDK_FOUND=no
23105      else
23106        # Do we have a bin/javac?
23107        if test ! -x "$BOOT_JDK/bin/javac"; then
23108          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23110          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23111$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23112          BOOT_JDK_FOUND=no
23113        else
23114          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23115          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23116            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23118            BOOT_JDK_FOUND=no
23119          else
23120            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23121            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23122
23123            # Extra M4 quote needed to protect [] in grep expression.
23124            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23125            if test "x$FOUND_CORRECT_VERSION" = x; then
23126              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23128              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23129$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23130              BOOT_JDK_FOUND=no
23131            else
23132              # We're done! :-)
23133              BOOT_JDK_FOUND=yes
23134
23135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23136
23137  # Input might be given as Windows format, start by converting to
23138  # unix format.
23139  path="$BOOT_JDK"
23140  new_path=`$CYGPATH -u "$path"`
23141
23142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23145  # "foo.exe" is OK but "foo" is an error.
23146  #
23147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23148  # It is also a way to make sure we got the proper file name for the real test later on.
23149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23150  if test "x$test_shortpath" = x; then
23151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23153    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23154  fi
23155
23156  # Call helper function which possibly converts this using DOS-style short mode.
23157  # If so, the updated path is stored in $new_path.
23158
23159  input_path="$new_path"
23160  # Check if we need to convert this using DOS-style short mode. If the path
23161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23162  # take no chances and rewrite it.
23163  # Note: m4 eats our [], so we need to use [ and ] instead.
23164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23165  if test "x$has_forbidden_chars" != x; then
23166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23170      # Going to short mode and back again did indeed matter. Since short mode is
23171      # case insensitive, let's make it lowercase to improve readability.
23172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23173      # Now convert it back to Unix-stile (cygpath)
23174      input_path=`$CYGPATH -u "$shortmode_path"`
23175      new_path="$input_path"
23176    fi
23177  fi
23178
23179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23180  if test "x$test_cygdrive_prefix" = x; then
23181    # As a simple fix, exclude /usr/bin since it's not a real path.
23182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23184      # a path prefixed by /cygdrive for fixpath to work.
23185      new_path="$CYGWIN_ROOT_PATH$input_path"
23186    fi
23187  fi
23188
23189
23190  if test "x$path" != "x$new_path"; then
23191    BOOT_JDK="$new_path"
23192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23193$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23194  fi
23195
23196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23197
23198  path="$BOOT_JDK"
23199  has_colon=`$ECHO $path | $GREP ^.:`
23200  new_path="$path"
23201  if test "x$has_colon" = x; then
23202    # Not in mixed or Windows style, start by that.
23203    new_path=`cmd //c echo $path`
23204  fi
23205
23206
23207  input_path="$new_path"
23208  # Check if we need to convert this using DOS-style short mode. If the path
23209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23210  # take no chances and rewrite it.
23211  # Note: m4 eats our [], so we need to use [ and ] instead.
23212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23213  if test "x$has_forbidden_chars" != x; then
23214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23216  fi
23217
23218
23219  windows_path="$new_path"
23220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23221    unix_path=`$CYGPATH -u "$windows_path"`
23222    new_path="$unix_path"
23223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23225    new_path="$unix_path"
23226  fi
23227
23228  if test "x$path" != "x$new_path"; then
23229    BOOT_JDK="$new_path"
23230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23232  fi
23233
23234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23236
23237  else
23238    # We're on a posix platform. Hooray! :)
23239    path="$BOOT_JDK"
23240    has_space=`$ECHO "$path" | $GREP " "`
23241    if test "x$has_space" != x; then
23242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23244      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23245    fi
23246
23247    # Use eval to expand a potential ~
23248    eval path="$path"
23249    if test ! -f "$path" && test ! -d "$path"; then
23250      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23251    fi
23252
23253    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23254  fi
23255
23256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23257$as_echo_n "checking for Boot JDK... " >&6; }
23258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23259$as_echo "$BOOT_JDK" >&6; }
23260              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23261$as_echo_n "checking Boot JDK version... " >&6; }
23262              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23263              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23264$as_echo "$BOOT_JDK_VERSION" >&6; }
23265            fi # end check jdk version
23266          fi # end check rt.jar
23267        fi # end check javac
23268      fi # end check java
23269    fi # end check boot jdk found
23270  fi
23271
23272    done
23273  fi
23274
23275  fi
23276
23277
23278    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23279    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23280      # Do we have a bin/java?
23281      if test ! -x "$BOOT_JDK/bin/java"; then
23282        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23284        BOOT_JDK_FOUND=no
23285      else
23286        # Do we have a bin/javac?
23287        if test ! -x "$BOOT_JDK/bin/javac"; then
23288          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23290          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23291$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23292          BOOT_JDK_FOUND=no
23293        else
23294          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23295          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23298            BOOT_JDK_FOUND=no
23299          else
23300            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23301            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23302
23303            # Extra M4 quote needed to protect [] in grep expression.
23304            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23305            if test "x$FOUND_CORRECT_VERSION" = x; then
23306              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23308              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23309$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23310              BOOT_JDK_FOUND=no
23311            else
23312              # We're done! :-)
23313              BOOT_JDK_FOUND=yes
23314
23315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23316
23317  # Input might be given as Windows format, start by converting to
23318  # unix format.
23319  path="$BOOT_JDK"
23320  new_path=`$CYGPATH -u "$path"`
23321
23322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23325  # "foo.exe" is OK but "foo" is an error.
23326  #
23327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23328  # It is also a way to make sure we got the proper file name for the real test later on.
23329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23330  if test "x$test_shortpath" = x; then
23331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23332$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23333    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23334  fi
23335
23336  # Call helper function which possibly converts this using DOS-style short mode.
23337  # If so, the updated path is stored in $new_path.
23338
23339  input_path="$new_path"
23340  # Check if we need to convert this using DOS-style short mode. If the path
23341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23342  # take no chances and rewrite it.
23343  # Note: m4 eats our [], so we need to use [ and ] instead.
23344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23345  if test "x$has_forbidden_chars" != x; then
23346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23350      # Going to short mode and back again did indeed matter. Since short mode is
23351      # case insensitive, let's make it lowercase to improve readability.
23352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23353      # Now convert it back to Unix-stile (cygpath)
23354      input_path=`$CYGPATH -u "$shortmode_path"`
23355      new_path="$input_path"
23356    fi
23357  fi
23358
23359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23360  if test "x$test_cygdrive_prefix" = x; then
23361    # As a simple fix, exclude /usr/bin since it's not a real path.
23362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23364      # a path prefixed by /cygdrive for fixpath to work.
23365      new_path="$CYGWIN_ROOT_PATH$input_path"
23366    fi
23367  fi
23368
23369
23370  if test "x$path" != "x$new_path"; then
23371    BOOT_JDK="$new_path"
23372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23373$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23374  fi
23375
23376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23377
23378  path="$BOOT_JDK"
23379  has_colon=`$ECHO $path | $GREP ^.:`
23380  new_path="$path"
23381  if test "x$has_colon" = x; then
23382    # Not in mixed or Windows style, start by that.
23383    new_path=`cmd //c echo $path`
23384  fi
23385
23386
23387  input_path="$new_path"
23388  # Check if we need to convert this using DOS-style short mode. If the path
23389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23390  # take no chances and rewrite it.
23391  # Note: m4 eats our [], so we need to use [ and ] instead.
23392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23393  if test "x$has_forbidden_chars" != x; then
23394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23396  fi
23397
23398
23399  windows_path="$new_path"
23400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23401    unix_path=`$CYGPATH -u "$windows_path"`
23402    new_path="$unix_path"
23403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23405    new_path="$unix_path"
23406  fi
23407
23408  if test "x$path" != "x$new_path"; then
23409    BOOT_JDK="$new_path"
23410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23412  fi
23413
23414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23416
23417  else
23418    # We're on a posix platform. Hooray! :)
23419    path="$BOOT_JDK"
23420    has_space=`$ECHO "$path" | $GREP " "`
23421    if test "x$has_space" != x; then
23422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23424      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23425    fi
23426
23427    # Use eval to expand a potential ~
23428    eval path="$path"
23429    if test ! -f "$path" && test ! -d "$path"; then
23430      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23431    fi
23432
23433    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23434  fi
23435
23436              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23437$as_echo_n "checking for Boot JDK... " >&6; }
23438              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23439$as_echo "$BOOT_JDK" >&6; }
23440              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23441$as_echo_n "checking Boot JDK version... " >&6; }
23442              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23443              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23444$as_echo "$BOOT_JDK_VERSION" >&6; }
23445            fi # end check jdk version
23446          fi # end check rt.jar
23447        fi # end check javac
23448      fi # end check java
23449    fi # end check boot jdk found
23450  fi
23451
23452
23453  if test "x$BOOT_JDK_FOUND" = xno; then
23454    # Now execute the test
23455
23456  if test "x$ProgramFiles" != x; then
23457    VIRTUAL_DIR="$ProgramFiles/Java"
23458
23459  windows_path="$VIRTUAL_DIR"
23460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23461    unix_path=`$CYGPATH -u "$windows_path"`
23462    VIRTUAL_DIR="$unix_path"
23463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23465    VIRTUAL_DIR="$unix_path"
23466  fi
23467
23468
23469  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23470  BOOT_JDK_SUFFIX=""
23471  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23472  if test "x$ALL_JDKS_FOUND" != x; then
23473    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23474
23475  if test "x$BOOT_JDK_FOUND" = xno; then
23476    # Now execute the test
23477
23478        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23479        if test -d "$BOOT_JDK"; then
23480          BOOT_JDK_FOUND=maybe
23481          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23482$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23483        fi
23484
23485
23486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23488      # Do we have a bin/java?
23489      if test ! -x "$BOOT_JDK/bin/java"; then
23490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23492        BOOT_JDK_FOUND=no
23493      else
23494        # Do we have a bin/javac?
23495        if test ! -x "$BOOT_JDK/bin/javac"; then
23496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23500          BOOT_JDK_FOUND=no
23501        else
23502          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23503          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23506            BOOT_JDK_FOUND=no
23507          else
23508            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23510
23511            # Extra M4 quote needed to protect [] in grep expression.
23512            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23513            if test "x$FOUND_CORRECT_VERSION" = x; then
23514              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23516              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23517$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23518              BOOT_JDK_FOUND=no
23519            else
23520              # We're done! :-)
23521              BOOT_JDK_FOUND=yes
23522
23523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23524
23525  # Input might be given as Windows format, start by converting to
23526  # unix format.
23527  path="$BOOT_JDK"
23528  new_path=`$CYGPATH -u "$path"`
23529
23530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23533  # "foo.exe" is OK but "foo" is an error.
23534  #
23535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23536  # It is also a way to make sure we got the proper file name for the real test later on.
23537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23538  if test "x$test_shortpath" = x; then
23539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23542  fi
23543
23544  # Call helper function which possibly converts this using DOS-style short mode.
23545  # If so, the updated path is stored in $new_path.
23546
23547  input_path="$new_path"
23548  # Check if we need to convert this using DOS-style short mode. If the path
23549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23550  # take no chances and rewrite it.
23551  # Note: m4 eats our [], so we need to use [ and ] instead.
23552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23553  if test "x$has_forbidden_chars" != x; then
23554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23558      # Going to short mode and back again did indeed matter. Since short mode is
23559      # case insensitive, let's make it lowercase to improve readability.
23560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23561      # Now convert it back to Unix-stile (cygpath)
23562      input_path=`$CYGPATH -u "$shortmode_path"`
23563      new_path="$input_path"
23564    fi
23565  fi
23566
23567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23568  if test "x$test_cygdrive_prefix" = x; then
23569    # As a simple fix, exclude /usr/bin since it's not a real path.
23570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23572      # a path prefixed by /cygdrive for fixpath to work.
23573      new_path="$CYGWIN_ROOT_PATH$input_path"
23574    fi
23575  fi
23576
23577
23578  if test "x$path" != "x$new_path"; then
23579    BOOT_JDK="$new_path"
23580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23582  fi
23583
23584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23585
23586  path="$BOOT_JDK"
23587  has_colon=`$ECHO $path | $GREP ^.:`
23588  new_path="$path"
23589  if test "x$has_colon" = x; then
23590    # Not in mixed or Windows style, start by that.
23591    new_path=`cmd //c echo $path`
23592  fi
23593
23594
23595  input_path="$new_path"
23596  # Check if we need to convert this using DOS-style short mode. If the path
23597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23598  # take no chances and rewrite it.
23599  # Note: m4 eats our [], so we need to use [ and ] instead.
23600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23601  if test "x$has_forbidden_chars" != x; then
23602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23604  fi
23605
23606
23607  windows_path="$new_path"
23608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23609    unix_path=`$CYGPATH -u "$windows_path"`
23610    new_path="$unix_path"
23611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23613    new_path="$unix_path"
23614  fi
23615
23616  if test "x$path" != "x$new_path"; then
23617    BOOT_JDK="$new_path"
23618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23620  fi
23621
23622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23624
23625  else
23626    # We're on a posix platform. Hooray! :)
23627    path="$BOOT_JDK"
23628    has_space=`$ECHO "$path" | $GREP " "`
23629    if test "x$has_space" != x; then
23630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23632      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23633    fi
23634
23635    # Use eval to expand a potential ~
23636    eval path="$path"
23637    if test ! -f "$path" && test ! -d "$path"; then
23638      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23639    fi
23640
23641    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23642  fi
23643
23644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23645$as_echo_n "checking for Boot JDK... " >&6; }
23646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23647$as_echo "$BOOT_JDK" >&6; }
23648              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23649$as_echo_n "checking Boot JDK version... " >&6; }
23650              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23652$as_echo "$BOOT_JDK_VERSION" >&6; }
23653            fi # end check jdk version
23654          fi # end check rt.jar
23655        fi # end check javac
23656      fi # end check java
23657    fi # end check boot jdk found
23658  fi
23659
23660    done
23661  fi
23662
23663  fi
23664
23665
23666    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23667    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23668      # Do we have a bin/java?
23669      if test ! -x "$BOOT_JDK/bin/java"; then
23670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23672        BOOT_JDK_FOUND=no
23673      else
23674        # Do we have a bin/javac?
23675        if test ! -x "$BOOT_JDK/bin/javac"; then
23676          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23678          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23679$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23680          BOOT_JDK_FOUND=no
23681        else
23682          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23683          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23684            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23686            BOOT_JDK_FOUND=no
23687          else
23688            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23689            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23690
23691            # Extra M4 quote needed to protect [] in grep expression.
23692            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23693            if test "x$FOUND_CORRECT_VERSION" = x; then
23694              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23696              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23697$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23698              BOOT_JDK_FOUND=no
23699            else
23700              # We're done! :-)
23701              BOOT_JDK_FOUND=yes
23702
23703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23704
23705  # Input might be given as Windows format, start by converting to
23706  # unix format.
23707  path="$BOOT_JDK"
23708  new_path=`$CYGPATH -u "$path"`
23709
23710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23713  # "foo.exe" is OK but "foo" is an error.
23714  #
23715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23716  # It is also a way to make sure we got the proper file name for the real test later on.
23717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23718  if test "x$test_shortpath" = x; then
23719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23720$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23721    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23722  fi
23723
23724  # Call helper function which possibly converts this using DOS-style short mode.
23725  # If so, the updated path is stored in $new_path.
23726
23727  input_path="$new_path"
23728  # Check if we need to convert this using DOS-style short mode. If the path
23729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23730  # take no chances and rewrite it.
23731  # Note: m4 eats our [], so we need to use [ and ] instead.
23732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23733  if test "x$has_forbidden_chars" != x; then
23734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23738      # Going to short mode and back again did indeed matter. Since short mode is
23739      # case insensitive, let's make it lowercase to improve readability.
23740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23741      # Now convert it back to Unix-stile (cygpath)
23742      input_path=`$CYGPATH -u "$shortmode_path"`
23743      new_path="$input_path"
23744    fi
23745  fi
23746
23747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23748  if test "x$test_cygdrive_prefix" = x; then
23749    # As a simple fix, exclude /usr/bin since it's not a real path.
23750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23752      # a path prefixed by /cygdrive for fixpath to work.
23753      new_path="$CYGWIN_ROOT_PATH$input_path"
23754    fi
23755  fi
23756
23757
23758  if test "x$path" != "x$new_path"; then
23759    BOOT_JDK="$new_path"
23760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23762  fi
23763
23764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23765
23766  path="$BOOT_JDK"
23767  has_colon=`$ECHO $path | $GREP ^.:`
23768  new_path="$path"
23769  if test "x$has_colon" = x; then
23770    # Not in mixed or Windows style, start by that.
23771    new_path=`cmd //c echo $path`
23772  fi
23773
23774
23775  input_path="$new_path"
23776  # Check if we need to convert this using DOS-style short mode. If the path
23777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23778  # take no chances and rewrite it.
23779  # Note: m4 eats our [], so we need to use [ and ] instead.
23780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23781  if test "x$has_forbidden_chars" != x; then
23782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23784  fi
23785
23786
23787  windows_path="$new_path"
23788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23789    unix_path=`$CYGPATH -u "$windows_path"`
23790    new_path="$unix_path"
23791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23793    new_path="$unix_path"
23794  fi
23795
23796  if test "x$path" != "x$new_path"; then
23797    BOOT_JDK="$new_path"
23798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23800  fi
23801
23802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23804
23805  else
23806    # We're on a posix platform. Hooray! :)
23807    path="$BOOT_JDK"
23808    has_space=`$ECHO "$path" | $GREP " "`
23809    if test "x$has_space" != x; then
23810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23812      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23813    fi
23814
23815    # Use eval to expand a potential ~
23816    eval path="$path"
23817    if test ! -f "$path" && test ! -d "$path"; then
23818      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23819    fi
23820
23821    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23822  fi
23823
23824              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23825$as_echo_n "checking for Boot JDK... " >&6; }
23826              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23827$as_echo "$BOOT_JDK" >&6; }
23828              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23829$as_echo_n "checking Boot JDK version... " >&6; }
23830              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23831              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23832$as_echo "$BOOT_JDK_VERSION" >&6; }
23833            fi # end check jdk version
23834          fi # end check rt.jar
23835        fi # end check javac
23836      fi # end check java
23837    fi # end check boot jdk found
23838  fi
23839
23840
23841  if test "x$BOOT_JDK_FOUND" = xno; then
23842    # Now execute the test
23843
23844  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23845  BOOT_JDK_SUFFIX=""
23846  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23847  if test "x$ALL_JDKS_FOUND" != x; then
23848    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23849
23850  if test "x$BOOT_JDK_FOUND" = xno; then
23851    # Now execute the test
23852
23853        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23854        if test -d "$BOOT_JDK"; then
23855          BOOT_JDK_FOUND=maybe
23856          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23857$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23858        fi
23859
23860
23861    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23862    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23863      # Do we have a bin/java?
23864      if test ! -x "$BOOT_JDK/bin/java"; then
23865        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23867        BOOT_JDK_FOUND=no
23868      else
23869        # Do we have a bin/javac?
23870        if test ! -x "$BOOT_JDK/bin/javac"; then
23871          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23873          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23874$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23875          BOOT_JDK_FOUND=no
23876        else
23877          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23878          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23879            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23881            BOOT_JDK_FOUND=no
23882          else
23883            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23884            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23885
23886            # Extra M4 quote needed to protect [] in grep expression.
23887            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23888            if test "x$FOUND_CORRECT_VERSION" = x; then
23889              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23891              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23892$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23893              BOOT_JDK_FOUND=no
23894            else
23895              # We're done! :-)
23896              BOOT_JDK_FOUND=yes
23897
23898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23899
23900  # Input might be given as Windows format, start by converting to
23901  # unix format.
23902  path="$BOOT_JDK"
23903  new_path=`$CYGPATH -u "$path"`
23904
23905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23908  # "foo.exe" is OK but "foo" is an error.
23909  #
23910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23911  # It is also a way to make sure we got the proper file name for the real test later on.
23912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23913  if test "x$test_shortpath" = x; then
23914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23916    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23917  fi
23918
23919  # Call helper function which possibly converts this using DOS-style short mode.
23920  # If so, the updated path is stored in $new_path.
23921
23922  input_path="$new_path"
23923  # Check if we need to convert this using DOS-style short mode. If the path
23924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23925  # take no chances and rewrite it.
23926  # Note: m4 eats our [], so we need to use [ and ] instead.
23927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23928  if test "x$has_forbidden_chars" != x; then
23929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23933      # Going to short mode and back again did indeed matter. Since short mode is
23934      # case insensitive, let's make it lowercase to improve readability.
23935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23936      # Now convert it back to Unix-stile (cygpath)
23937      input_path=`$CYGPATH -u "$shortmode_path"`
23938      new_path="$input_path"
23939    fi
23940  fi
23941
23942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23943  if test "x$test_cygdrive_prefix" = x; then
23944    # As a simple fix, exclude /usr/bin since it's not a real path.
23945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23947      # a path prefixed by /cygdrive for fixpath to work.
23948      new_path="$CYGWIN_ROOT_PATH$input_path"
23949    fi
23950  fi
23951
23952
23953  if test "x$path" != "x$new_path"; then
23954    BOOT_JDK="$new_path"
23955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23957  fi
23958
23959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23960
23961  path="$BOOT_JDK"
23962  has_colon=`$ECHO $path | $GREP ^.:`
23963  new_path="$path"
23964  if test "x$has_colon" = x; then
23965    # Not in mixed or Windows style, start by that.
23966    new_path=`cmd //c echo $path`
23967  fi
23968
23969
23970  input_path="$new_path"
23971  # Check if we need to convert this using DOS-style short mode. If the path
23972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23973  # take no chances and rewrite it.
23974  # Note: m4 eats our [], so we need to use [ and ] instead.
23975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23976  if test "x$has_forbidden_chars" != x; then
23977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23979  fi
23980
23981
23982  windows_path="$new_path"
23983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23984    unix_path=`$CYGPATH -u "$windows_path"`
23985    new_path="$unix_path"
23986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23988    new_path="$unix_path"
23989  fi
23990
23991  if test "x$path" != "x$new_path"; then
23992    BOOT_JDK="$new_path"
23993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23995  fi
23996
23997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23999
24000  else
24001    # We're on a posix platform. Hooray! :)
24002    path="$BOOT_JDK"
24003    has_space=`$ECHO "$path" | $GREP " "`
24004    if test "x$has_space" != x; then
24005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24006$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24007      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24008    fi
24009
24010    # Use eval to expand a potential ~
24011    eval path="$path"
24012    if test ! -f "$path" && test ! -d "$path"; then
24013      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24014    fi
24015
24016    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24017  fi
24018
24019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24020$as_echo_n "checking for Boot JDK... " >&6; }
24021              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24022$as_echo "$BOOT_JDK" >&6; }
24023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24024$as_echo_n "checking Boot JDK version... " >&6; }
24025              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24027$as_echo "$BOOT_JDK_VERSION" >&6; }
24028            fi # end check jdk version
24029          fi # end check rt.jar
24030        fi # end check javac
24031      fi # end check java
24032    fi # end check boot jdk found
24033  fi
24034
24035    done
24036  fi
24037
24038
24039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24041      # Do we have a bin/java?
24042      if test ! -x "$BOOT_JDK/bin/java"; then
24043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24045        BOOT_JDK_FOUND=no
24046      else
24047        # Do we have a bin/javac?
24048        if test ! -x "$BOOT_JDK/bin/javac"; then
24049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24053          BOOT_JDK_FOUND=no
24054        else
24055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24059            BOOT_JDK_FOUND=no
24060          else
24061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24063
24064            # Extra M4 quote needed to protect [] in grep expression.
24065            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24066            if test "x$FOUND_CORRECT_VERSION" = x; then
24067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24071              BOOT_JDK_FOUND=no
24072            else
24073              # We're done! :-)
24074              BOOT_JDK_FOUND=yes
24075
24076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24077
24078  # Input might be given as Windows format, start by converting to
24079  # unix format.
24080  path="$BOOT_JDK"
24081  new_path=`$CYGPATH -u "$path"`
24082
24083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24086  # "foo.exe" is OK but "foo" is an error.
24087  #
24088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24089  # It is also a way to make sure we got the proper file name for the real test later on.
24090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24091  if test "x$test_shortpath" = x; then
24092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24095  fi
24096
24097  # Call helper function which possibly converts this using DOS-style short mode.
24098  # If so, the updated path is stored in $new_path.
24099
24100  input_path="$new_path"
24101  # Check if we need to convert this using DOS-style short mode. If the path
24102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24103  # take no chances and rewrite it.
24104  # Note: m4 eats our [], so we need to use [ and ] instead.
24105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24106  if test "x$has_forbidden_chars" != x; then
24107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24111      # Going to short mode and back again did indeed matter. Since short mode is
24112      # case insensitive, let's make it lowercase to improve readability.
24113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24114      # Now convert it back to Unix-stile (cygpath)
24115      input_path=`$CYGPATH -u "$shortmode_path"`
24116      new_path="$input_path"
24117    fi
24118  fi
24119
24120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24121  if test "x$test_cygdrive_prefix" = x; then
24122    # As a simple fix, exclude /usr/bin since it's not a real path.
24123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24125      # a path prefixed by /cygdrive for fixpath to work.
24126      new_path="$CYGWIN_ROOT_PATH$input_path"
24127    fi
24128  fi
24129
24130
24131  if test "x$path" != "x$new_path"; then
24132    BOOT_JDK="$new_path"
24133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24135  fi
24136
24137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24138
24139  path="$BOOT_JDK"
24140  has_colon=`$ECHO $path | $GREP ^.:`
24141  new_path="$path"
24142  if test "x$has_colon" = x; then
24143    # Not in mixed or Windows style, start by that.
24144    new_path=`cmd //c echo $path`
24145  fi
24146
24147
24148  input_path="$new_path"
24149  # Check if we need to convert this using DOS-style short mode. If the path
24150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24151  # take no chances and rewrite it.
24152  # Note: m4 eats our [], so we need to use [ and ] instead.
24153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24154  if test "x$has_forbidden_chars" != x; then
24155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24157  fi
24158
24159
24160  windows_path="$new_path"
24161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24162    unix_path=`$CYGPATH -u "$windows_path"`
24163    new_path="$unix_path"
24164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24166    new_path="$unix_path"
24167  fi
24168
24169  if test "x$path" != "x$new_path"; then
24170    BOOT_JDK="$new_path"
24171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24173  fi
24174
24175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24177
24178  else
24179    # We're on a posix platform. Hooray! :)
24180    path="$BOOT_JDK"
24181    has_space=`$ECHO "$path" | $GREP " "`
24182    if test "x$has_space" != x; then
24183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24184$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24186    fi
24187
24188    # Use eval to expand a potential ~
24189    eval path="$path"
24190    if test ! -f "$path" && test ! -d "$path"; then
24191      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24192    fi
24193
24194    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24195  fi
24196
24197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24198$as_echo_n "checking for Boot JDK... " >&6; }
24199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24200$as_echo "$BOOT_JDK" >&6; }
24201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24202$as_echo_n "checking Boot JDK version... " >&6; }
24203              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24205$as_echo "$BOOT_JDK_VERSION" >&6; }
24206            fi # end check jdk version
24207          fi # end check rt.jar
24208        fi # end check javac
24209      fi # end check java
24210    fi # end check boot jdk found
24211  fi
24212
24213  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24214
24215  if test "x$BOOT_JDK_FOUND" = xno; then
24216    # Now execute the test
24217
24218  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24219  BOOT_JDK_SUFFIX="/Contents/Home"
24220  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24221  if test "x$ALL_JDKS_FOUND" != x; then
24222    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24223
24224  if test "x$BOOT_JDK_FOUND" = xno; then
24225    # Now execute the test
24226
24227        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24228        if test -d "$BOOT_JDK"; then
24229          BOOT_JDK_FOUND=maybe
24230          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24231$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24232        fi
24233
24234
24235    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24236    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24237      # Do we have a bin/java?
24238      if test ! -x "$BOOT_JDK/bin/java"; then
24239        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24241        BOOT_JDK_FOUND=no
24242      else
24243        # Do we have a bin/javac?
24244        if test ! -x "$BOOT_JDK/bin/javac"; then
24245          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24247          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24248$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24249          BOOT_JDK_FOUND=no
24250        else
24251          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24252          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24253            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24255            BOOT_JDK_FOUND=no
24256          else
24257            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24258            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24259
24260            # Extra M4 quote needed to protect [] in grep expression.
24261            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24262            if test "x$FOUND_CORRECT_VERSION" = x; then
24263              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24265              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24266$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24267              BOOT_JDK_FOUND=no
24268            else
24269              # We're done! :-)
24270              BOOT_JDK_FOUND=yes
24271
24272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24273
24274  # Input might be given as Windows format, start by converting to
24275  # unix format.
24276  path="$BOOT_JDK"
24277  new_path=`$CYGPATH -u "$path"`
24278
24279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24282  # "foo.exe" is OK but "foo" is an error.
24283  #
24284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24285  # It is also a way to make sure we got the proper file name for the real test later on.
24286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24287  if test "x$test_shortpath" = x; then
24288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24290    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24291  fi
24292
24293  # Call helper function which possibly converts this using DOS-style short mode.
24294  # If so, the updated path is stored in $new_path.
24295
24296  input_path="$new_path"
24297  # Check if we need to convert this using DOS-style short mode. If the path
24298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24299  # take no chances and rewrite it.
24300  # Note: m4 eats our [], so we need to use [ and ] instead.
24301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24302  if test "x$has_forbidden_chars" != x; then
24303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24307      # Going to short mode and back again did indeed matter. Since short mode is
24308      # case insensitive, let's make it lowercase to improve readability.
24309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24310      # Now convert it back to Unix-stile (cygpath)
24311      input_path=`$CYGPATH -u "$shortmode_path"`
24312      new_path="$input_path"
24313    fi
24314  fi
24315
24316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24317  if test "x$test_cygdrive_prefix" = x; then
24318    # As a simple fix, exclude /usr/bin since it's not a real path.
24319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24321      # a path prefixed by /cygdrive for fixpath to work.
24322      new_path="$CYGWIN_ROOT_PATH$input_path"
24323    fi
24324  fi
24325
24326
24327  if test "x$path" != "x$new_path"; then
24328    BOOT_JDK="$new_path"
24329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24331  fi
24332
24333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24334
24335  path="$BOOT_JDK"
24336  has_colon=`$ECHO $path | $GREP ^.:`
24337  new_path="$path"
24338  if test "x$has_colon" = x; then
24339    # Not in mixed or Windows style, start by that.
24340    new_path=`cmd //c echo $path`
24341  fi
24342
24343
24344  input_path="$new_path"
24345  # Check if we need to convert this using DOS-style short mode. If the path
24346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24347  # take no chances and rewrite it.
24348  # Note: m4 eats our [], so we need to use [ and ] instead.
24349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24350  if test "x$has_forbidden_chars" != x; then
24351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24353  fi
24354
24355
24356  windows_path="$new_path"
24357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24358    unix_path=`$CYGPATH -u "$windows_path"`
24359    new_path="$unix_path"
24360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24362    new_path="$unix_path"
24363  fi
24364
24365  if test "x$path" != "x$new_path"; then
24366    BOOT_JDK="$new_path"
24367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24369  fi
24370
24371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24373
24374  else
24375    # We're on a posix platform. Hooray! :)
24376    path="$BOOT_JDK"
24377    has_space=`$ECHO "$path" | $GREP " "`
24378    if test "x$has_space" != x; then
24379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24381      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24382    fi
24383
24384    # Use eval to expand a potential ~
24385    eval path="$path"
24386    if test ! -f "$path" && test ! -d "$path"; then
24387      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24388    fi
24389
24390    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24391  fi
24392
24393              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24394$as_echo_n "checking for Boot JDK... " >&6; }
24395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24396$as_echo "$BOOT_JDK" >&6; }
24397              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24398$as_echo_n "checking Boot JDK version... " >&6; }
24399              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24400              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24401$as_echo "$BOOT_JDK_VERSION" >&6; }
24402            fi # end check jdk version
24403          fi # end check rt.jar
24404        fi # end check javac
24405      fi # end check java
24406    fi # end check boot jdk found
24407  fi
24408
24409    done
24410  fi
24411
24412
24413    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24414    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24415      # Do we have a bin/java?
24416      if test ! -x "$BOOT_JDK/bin/java"; then
24417        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24419        BOOT_JDK_FOUND=no
24420      else
24421        # Do we have a bin/javac?
24422        if test ! -x "$BOOT_JDK/bin/javac"; then
24423          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24425          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24426$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24427          BOOT_JDK_FOUND=no
24428        else
24429          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24430          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24431            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24433            BOOT_JDK_FOUND=no
24434          else
24435            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24436            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24437
24438            # Extra M4 quote needed to protect [] in grep expression.
24439            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24440            if test "x$FOUND_CORRECT_VERSION" = x; then
24441              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24443              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24444$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24445              BOOT_JDK_FOUND=no
24446            else
24447              # We're done! :-)
24448              BOOT_JDK_FOUND=yes
24449
24450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24451
24452  # Input might be given as Windows format, start by converting to
24453  # unix format.
24454  path="$BOOT_JDK"
24455  new_path=`$CYGPATH -u "$path"`
24456
24457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24460  # "foo.exe" is OK but "foo" is an error.
24461  #
24462  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24463  # It is also a way to make sure we got the proper file name for the real test later on.
24464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24465  if test "x$test_shortpath" = x; then
24466    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24467$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24468    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24469  fi
24470
24471  # Call helper function which possibly converts this using DOS-style short mode.
24472  # If so, the updated path is stored in $new_path.
24473
24474  input_path="$new_path"
24475  # Check if we need to convert this using DOS-style short mode. If the path
24476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24477  # take no chances and rewrite it.
24478  # Note: m4 eats our [], so we need to use [ and ] instead.
24479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24480  if test "x$has_forbidden_chars" != x; then
24481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24485      # Going to short mode and back again did indeed matter. Since short mode is
24486      # case insensitive, let's make it lowercase to improve readability.
24487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24488      # Now convert it back to Unix-stile (cygpath)
24489      input_path=`$CYGPATH -u "$shortmode_path"`
24490      new_path="$input_path"
24491    fi
24492  fi
24493
24494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24495  if test "x$test_cygdrive_prefix" = x; then
24496    # As a simple fix, exclude /usr/bin since it's not a real path.
24497    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24499      # a path prefixed by /cygdrive for fixpath to work.
24500      new_path="$CYGWIN_ROOT_PATH$input_path"
24501    fi
24502  fi
24503
24504
24505  if test "x$path" != "x$new_path"; then
24506    BOOT_JDK="$new_path"
24507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24508$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24509  fi
24510
24511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24512
24513  path="$BOOT_JDK"
24514  has_colon=`$ECHO $path | $GREP ^.:`
24515  new_path="$path"
24516  if test "x$has_colon" = x; then
24517    # Not in mixed or Windows style, start by that.
24518    new_path=`cmd //c echo $path`
24519  fi
24520
24521
24522  input_path="$new_path"
24523  # Check if we need to convert this using DOS-style short mode. If the path
24524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24525  # take no chances and rewrite it.
24526  # Note: m4 eats our [], so we need to use [ and ] instead.
24527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24528  if test "x$has_forbidden_chars" != x; then
24529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24531  fi
24532
24533
24534  windows_path="$new_path"
24535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24536    unix_path=`$CYGPATH -u "$windows_path"`
24537    new_path="$unix_path"
24538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24540    new_path="$unix_path"
24541  fi
24542
24543  if test "x$path" != "x$new_path"; then
24544    BOOT_JDK="$new_path"
24545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24546$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24547  fi
24548
24549  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24550  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24551
24552  else
24553    # We're on a posix platform. Hooray! :)
24554    path="$BOOT_JDK"
24555    has_space=`$ECHO "$path" | $GREP " "`
24556    if test "x$has_space" != x; then
24557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24559      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24560    fi
24561
24562    # Use eval to expand a potential ~
24563    eval path="$path"
24564    if test ! -f "$path" && test ! -d "$path"; then
24565      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24566    fi
24567
24568    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24569  fi
24570
24571              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24572$as_echo_n "checking for Boot JDK... " >&6; }
24573              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24574$as_echo "$BOOT_JDK" >&6; }
24575              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24576$as_echo_n "checking Boot JDK version... " >&6; }
24577              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24578              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24579$as_echo "$BOOT_JDK_VERSION" >&6; }
24580            fi # end check jdk version
24581          fi # end check rt.jar
24582        fi # end check javac
24583      fi # end check java
24584    fi # end check boot jdk found
24585  fi
24586
24587
24588  if test "x$BOOT_JDK_FOUND" = xno; then
24589    # Now execute the test
24590
24591  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24592  BOOT_JDK_SUFFIX="/Contents/Home"
24593  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24594  if test "x$ALL_JDKS_FOUND" != x; then
24595    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24596
24597  if test "x$BOOT_JDK_FOUND" = xno; then
24598    # Now execute the test
24599
24600        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24601        if test -d "$BOOT_JDK"; then
24602          BOOT_JDK_FOUND=maybe
24603          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24604$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24605        fi
24606
24607
24608    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24609    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24610      # Do we have a bin/java?
24611      if test ! -x "$BOOT_JDK/bin/java"; then
24612        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24614        BOOT_JDK_FOUND=no
24615      else
24616        # Do we have a bin/javac?
24617        if test ! -x "$BOOT_JDK/bin/javac"; then
24618          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24620          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24621$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24622          BOOT_JDK_FOUND=no
24623        else
24624          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24625          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24626            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24628            BOOT_JDK_FOUND=no
24629          else
24630            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24631            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24632
24633            # Extra M4 quote needed to protect [] in grep expression.
24634            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24635            if test "x$FOUND_CORRECT_VERSION" = x; then
24636              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24638              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24639$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24640              BOOT_JDK_FOUND=no
24641            else
24642              # We're done! :-)
24643              BOOT_JDK_FOUND=yes
24644
24645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24646
24647  # Input might be given as Windows format, start by converting to
24648  # unix format.
24649  path="$BOOT_JDK"
24650  new_path=`$CYGPATH -u "$path"`
24651
24652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24655  # "foo.exe" is OK but "foo" is an error.
24656  #
24657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24658  # It is also a way to make sure we got the proper file name for the real test later on.
24659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24660  if test "x$test_shortpath" = x; then
24661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24663    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24664  fi
24665
24666  # Call helper function which possibly converts this using DOS-style short mode.
24667  # If so, the updated path is stored in $new_path.
24668
24669  input_path="$new_path"
24670  # Check if we need to convert this using DOS-style short mode. If the path
24671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24672  # take no chances and rewrite it.
24673  # Note: m4 eats our [], so we need to use [ and ] instead.
24674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24675  if test "x$has_forbidden_chars" != x; then
24676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24680      # Going to short mode and back again did indeed matter. Since short mode is
24681      # case insensitive, let's make it lowercase to improve readability.
24682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24683      # Now convert it back to Unix-stile (cygpath)
24684      input_path=`$CYGPATH -u "$shortmode_path"`
24685      new_path="$input_path"
24686    fi
24687  fi
24688
24689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24690  if test "x$test_cygdrive_prefix" = x; then
24691    # As a simple fix, exclude /usr/bin since it's not a real path.
24692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24694      # a path prefixed by /cygdrive for fixpath to work.
24695      new_path="$CYGWIN_ROOT_PATH$input_path"
24696    fi
24697  fi
24698
24699
24700  if test "x$path" != "x$new_path"; then
24701    BOOT_JDK="$new_path"
24702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24703$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24704  fi
24705
24706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24707
24708  path="$BOOT_JDK"
24709  has_colon=`$ECHO $path | $GREP ^.:`
24710  new_path="$path"
24711  if test "x$has_colon" = x; then
24712    # Not in mixed or Windows style, start by that.
24713    new_path=`cmd //c echo $path`
24714  fi
24715
24716
24717  input_path="$new_path"
24718  # Check if we need to convert this using DOS-style short mode. If the path
24719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24720  # take no chances and rewrite it.
24721  # Note: m4 eats our [], so we need to use [ and ] instead.
24722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24723  if test "x$has_forbidden_chars" != x; then
24724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24726  fi
24727
24728
24729  windows_path="$new_path"
24730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24731    unix_path=`$CYGPATH -u "$windows_path"`
24732    new_path="$unix_path"
24733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24735    new_path="$unix_path"
24736  fi
24737
24738  if test "x$path" != "x$new_path"; then
24739    BOOT_JDK="$new_path"
24740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24741$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24742  fi
24743
24744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24746
24747  else
24748    # We're on a posix platform. Hooray! :)
24749    path="$BOOT_JDK"
24750    has_space=`$ECHO "$path" | $GREP " "`
24751    if test "x$has_space" != x; then
24752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24753$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24754      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24755    fi
24756
24757    # Use eval to expand a potential ~
24758    eval path="$path"
24759    if test ! -f "$path" && test ! -d "$path"; then
24760      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24761    fi
24762
24763    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24764  fi
24765
24766              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24767$as_echo_n "checking for Boot JDK... " >&6; }
24768              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24769$as_echo "$BOOT_JDK" >&6; }
24770              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24771$as_echo_n "checking Boot JDK version... " >&6; }
24772              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24773              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24774$as_echo "$BOOT_JDK_VERSION" >&6; }
24775            fi # end check jdk version
24776          fi # end check rt.jar
24777        fi # end check javac
24778      fi # end check java
24779    fi # end check boot jdk found
24780  fi
24781
24782    done
24783  fi
24784
24785
24786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24788      # Do we have a bin/java?
24789      if test ! -x "$BOOT_JDK/bin/java"; then
24790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24792        BOOT_JDK_FOUND=no
24793      else
24794        # Do we have a bin/javac?
24795        if test ! -x "$BOOT_JDK/bin/javac"; then
24796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24800          BOOT_JDK_FOUND=no
24801        else
24802          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24803          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24804            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24806            BOOT_JDK_FOUND=no
24807          else
24808            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24809            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24810
24811            # Extra M4 quote needed to protect [] in grep expression.
24812            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24813            if test "x$FOUND_CORRECT_VERSION" = x; then
24814              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24816              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24817$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24818              BOOT_JDK_FOUND=no
24819            else
24820              # We're done! :-)
24821              BOOT_JDK_FOUND=yes
24822
24823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24824
24825  # Input might be given as Windows format, start by converting to
24826  # unix format.
24827  path="$BOOT_JDK"
24828  new_path=`$CYGPATH -u "$path"`
24829
24830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24833  # "foo.exe" is OK but "foo" is an error.
24834  #
24835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24836  # It is also a way to make sure we got the proper file name for the real test later on.
24837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24838  if test "x$test_shortpath" = x; then
24839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24842  fi
24843
24844  # Call helper function which possibly converts this using DOS-style short mode.
24845  # If so, the updated path is stored in $new_path.
24846
24847  input_path="$new_path"
24848  # Check if we need to convert this using DOS-style short mode. If the path
24849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24850  # take no chances and rewrite it.
24851  # Note: m4 eats our [], so we need to use [ and ] instead.
24852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24853  if test "x$has_forbidden_chars" != x; then
24854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24858      # Going to short mode and back again did indeed matter. Since short mode is
24859      # case insensitive, let's make it lowercase to improve readability.
24860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24861      # Now convert it back to Unix-stile (cygpath)
24862      input_path=`$CYGPATH -u "$shortmode_path"`
24863      new_path="$input_path"
24864    fi
24865  fi
24866
24867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24868  if test "x$test_cygdrive_prefix" = x; then
24869    # As a simple fix, exclude /usr/bin since it's not a real path.
24870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24872      # a path prefixed by /cygdrive for fixpath to work.
24873      new_path="$CYGWIN_ROOT_PATH$input_path"
24874    fi
24875  fi
24876
24877
24878  if test "x$path" != "x$new_path"; then
24879    BOOT_JDK="$new_path"
24880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24882  fi
24883
24884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24885
24886  path="$BOOT_JDK"
24887  has_colon=`$ECHO $path | $GREP ^.:`
24888  new_path="$path"
24889  if test "x$has_colon" = x; then
24890    # Not in mixed or Windows style, start by that.
24891    new_path=`cmd //c echo $path`
24892  fi
24893
24894
24895  input_path="$new_path"
24896  # Check if we need to convert this using DOS-style short mode. If the path
24897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24898  # take no chances and rewrite it.
24899  # Note: m4 eats our [], so we need to use [ and ] instead.
24900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24901  if test "x$has_forbidden_chars" != x; then
24902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24904  fi
24905
24906
24907  windows_path="$new_path"
24908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24909    unix_path=`$CYGPATH -u "$windows_path"`
24910    new_path="$unix_path"
24911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24913    new_path="$unix_path"
24914  fi
24915
24916  if test "x$path" != "x$new_path"; then
24917    BOOT_JDK="$new_path"
24918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24920  fi
24921
24922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24924
24925  else
24926    # We're on a posix platform. Hooray! :)
24927    path="$BOOT_JDK"
24928    has_space=`$ECHO "$path" | $GREP " "`
24929    if test "x$has_space" != x; then
24930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24932      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24933    fi
24934
24935    # Use eval to expand a potential ~
24936    eval path="$path"
24937    if test ! -f "$path" && test ! -d "$path"; then
24938      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24939    fi
24940
24941    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24942  fi
24943
24944              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24945$as_echo_n "checking for Boot JDK... " >&6; }
24946              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24947$as_echo "$BOOT_JDK" >&6; }
24948              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24949$as_echo_n "checking Boot JDK version... " >&6; }
24950              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24951              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24952$as_echo "$BOOT_JDK_VERSION" >&6; }
24953            fi # end check jdk version
24954          fi # end check rt.jar
24955        fi # end check javac
24956      fi # end check java
24957    fi # end check boot jdk found
24958  fi
24959
24960  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24961
24962  if test "x$BOOT_JDK_FOUND" = xno; then
24963    # Now execute the test
24964
24965  BOOT_JDK_PREFIX="/usr/lib/jvm"
24966  BOOT_JDK_SUFFIX=""
24967  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24968  if test "x$ALL_JDKS_FOUND" != x; then
24969    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24970
24971  if test "x$BOOT_JDK_FOUND" = xno; then
24972    # Now execute the test
24973
24974        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24975        if test -d "$BOOT_JDK"; then
24976          BOOT_JDK_FOUND=maybe
24977          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24978$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24979        fi
24980
24981
24982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24984      # Do we have a bin/java?
24985      if test ! -x "$BOOT_JDK/bin/java"; then
24986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24988        BOOT_JDK_FOUND=no
24989      else
24990        # Do we have a bin/javac?
24991        if test ! -x "$BOOT_JDK/bin/javac"; then
24992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24996          BOOT_JDK_FOUND=no
24997        else
24998          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24999          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25002            BOOT_JDK_FOUND=no
25003          else
25004            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25005            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25006
25007            # Extra M4 quote needed to protect [] in grep expression.
25008            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25009            if test "x$FOUND_CORRECT_VERSION" = x; then
25010              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25012              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25013$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25014              BOOT_JDK_FOUND=no
25015            else
25016              # We're done! :-)
25017              BOOT_JDK_FOUND=yes
25018
25019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25020
25021  # Input might be given as Windows format, start by converting to
25022  # unix format.
25023  path="$BOOT_JDK"
25024  new_path=`$CYGPATH -u "$path"`
25025
25026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25029  # "foo.exe" is OK but "foo" is an error.
25030  #
25031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25032  # It is also a way to make sure we got the proper file name for the real test later on.
25033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25034  if test "x$test_shortpath" = x; then
25035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25037    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25038  fi
25039
25040  # Call helper function which possibly converts this using DOS-style short mode.
25041  # If so, the updated path is stored in $new_path.
25042
25043  input_path="$new_path"
25044  # Check if we need to convert this using DOS-style short mode. If the path
25045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25046  # take no chances and rewrite it.
25047  # Note: m4 eats our [], so we need to use [ and ] instead.
25048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25049  if test "x$has_forbidden_chars" != x; then
25050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25054      # Going to short mode and back again did indeed matter. Since short mode is
25055      # case insensitive, let's make it lowercase to improve readability.
25056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25057      # Now convert it back to Unix-stile (cygpath)
25058      input_path=`$CYGPATH -u "$shortmode_path"`
25059      new_path="$input_path"
25060    fi
25061  fi
25062
25063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25064  if test "x$test_cygdrive_prefix" = x; then
25065    # As a simple fix, exclude /usr/bin since it's not a real path.
25066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25068      # a path prefixed by /cygdrive for fixpath to work.
25069      new_path="$CYGWIN_ROOT_PATH$input_path"
25070    fi
25071  fi
25072
25073
25074  if test "x$path" != "x$new_path"; then
25075    BOOT_JDK="$new_path"
25076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25078  fi
25079
25080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25081
25082  path="$BOOT_JDK"
25083  has_colon=`$ECHO $path | $GREP ^.:`
25084  new_path="$path"
25085  if test "x$has_colon" = x; then
25086    # Not in mixed or Windows style, start by that.
25087    new_path=`cmd //c echo $path`
25088  fi
25089
25090
25091  input_path="$new_path"
25092  # Check if we need to convert this using DOS-style short mode. If the path
25093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25094  # take no chances and rewrite it.
25095  # Note: m4 eats our [], so we need to use [ and ] instead.
25096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25097  if test "x$has_forbidden_chars" != x; then
25098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25100  fi
25101
25102
25103  windows_path="$new_path"
25104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105    unix_path=`$CYGPATH -u "$windows_path"`
25106    new_path="$unix_path"
25107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25109    new_path="$unix_path"
25110  fi
25111
25112  if test "x$path" != "x$new_path"; then
25113    BOOT_JDK="$new_path"
25114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25116  fi
25117
25118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25120
25121  else
25122    # We're on a posix platform. Hooray! :)
25123    path="$BOOT_JDK"
25124    has_space=`$ECHO "$path" | $GREP " "`
25125    if test "x$has_space" != x; then
25126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25128      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25129    fi
25130
25131    # Use eval to expand a potential ~
25132    eval path="$path"
25133    if test ! -f "$path" && test ! -d "$path"; then
25134      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25135    fi
25136
25137    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25138  fi
25139
25140              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25141$as_echo_n "checking for Boot JDK... " >&6; }
25142              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25143$as_echo "$BOOT_JDK" >&6; }
25144              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25145$as_echo_n "checking Boot JDK version... " >&6; }
25146              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25147              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25148$as_echo "$BOOT_JDK_VERSION" >&6; }
25149            fi # end check jdk version
25150          fi # end check rt.jar
25151        fi # end check javac
25152      fi # end check java
25153    fi # end check boot jdk found
25154  fi
25155
25156    done
25157  fi
25158
25159
25160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25162      # Do we have a bin/java?
25163      if test ! -x "$BOOT_JDK/bin/java"; then
25164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25166        BOOT_JDK_FOUND=no
25167      else
25168        # Do we have a bin/javac?
25169        if test ! -x "$BOOT_JDK/bin/javac"; then
25170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25174          BOOT_JDK_FOUND=no
25175        else
25176          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25177          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25180            BOOT_JDK_FOUND=no
25181          else
25182            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25183            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25184
25185            # Extra M4 quote needed to protect [] in grep expression.
25186            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25187            if test "x$FOUND_CORRECT_VERSION" = x; then
25188              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25190              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25191$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25192              BOOT_JDK_FOUND=no
25193            else
25194              # We're done! :-)
25195              BOOT_JDK_FOUND=yes
25196
25197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25198
25199  # Input might be given as Windows format, start by converting to
25200  # unix format.
25201  path="$BOOT_JDK"
25202  new_path=`$CYGPATH -u "$path"`
25203
25204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25207  # "foo.exe" is OK but "foo" is an error.
25208  #
25209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25210  # It is also a way to make sure we got the proper file name for the real test later on.
25211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25212  if test "x$test_shortpath" = x; then
25213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25215    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25216  fi
25217
25218  # Call helper function which possibly converts this using DOS-style short mode.
25219  # If so, the updated path is stored in $new_path.
25220
25221  input_path="$new_path"
25222  # Check if we need to convert this using DOS-style short mode. If the path
25223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25224  # take no chances and rewrite it.
25225  # Note: m4 eats our [], so we need to use [ and ] instead.
25226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25227  if test "x$has_forbidden_chars" != x; then
25228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25232      # Going to short mode and back again did indeed matter. Since short mode is
25233      # case insensitive, let's make it lowercase to improve readability.
25234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25235      # Now convert it back to Unix-stile (cygpath)
25236      input_path=`$CYGPATH -u "$shortmode_path"`
25237      new_path="$input_path"
25238    fi
25239  fi
25240
25241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25242  if test "x$test_cygdrive_prefix" = x; then
25243    # As a simple fix, exclude /usr/bin since it's not a real path.
25244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25246      # a path prefixed by /cygdrive for fixpath to work.
25247      new_path="$CYGWIN_ROOT_PATH$input_path"
25248    fi
25249  fi
25250
25251
25252  if test "x$path" != "x$new_path"; then
25253    BOOT_JDK="$new_path"
25254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25256  fi
25257
25258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25259
25260  path="$BOOT_JDK"
25261  has_colon=`$ECHO $path | $GREP ^.:`
25262  new_path="$path"
25263  if test "x$has_colon" = x; then
25264    # Not in mixed or Windows style, start by that.
25265    new_path=`cmd //c echo $path`
25266  fi
25267
25268
25269  input_path="$new_path"
25270  # Check if we need to convert this using DOS-style short mode. If the path
25271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25272  # take no chances and rewrite it.
25273  # Note: m4 eats our [], so we need to use [ and ] instead.
25274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25275  if test "x$has_forbidden_chars" != x; then
25276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25278  fi
25279
25280
25281  windows_path="$new_path"
25282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25283    unix_path=`$CYGPATH -u "$windows_path"`
25284    new_path="$unix_path"
25285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25287    new_path="$unix_path"
25288  fi
25289
25290  if test "x$path" != "x$new_path"; then
25291    BOOT_JDK="$new_path"
25292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25294  fi
25295
25296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25298
25299  else
25300    # We're on a posix platform. Hooray! :)
25301    path="$BOOT_JDK"
25302    has_space=`$ECHO "$path" | $GREP " "`
25303    if test "x$has_space" != x; then
25304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25306      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25307    fi
25308
25309    # Use eval to expand a potential ~
25310    eval path="$path"
25311    if test ! -f "$path" && test ! -d "$path"; then
25312      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25313    fi
25314
25315    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25316  fi
25317
25318              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25319$as_echo_n "checking for Boot JDK... " >&6; }
25320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25321$as_echo "$BOOT_JDK" >&6; }
25322              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25323$as_echo_n "checking Boot JDK version... " >&6; }
25324              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25325              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25326$as_echo "$BOOT_JDK_VERSION" >&6; }
25327            fi # end check jdk version
25328          fi # end check rt.jar
25329        fi # end check javac
25330      fi # end check java
25331    fi # end check boot jdk found
25332  fi
25333
25334  fi
25335
25336
25337    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25338    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25339      # Do we have a bin/java?
25340      if test ! -x "$BOOT_JDK/bin/java"; then
25341        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25343        BOOT_JDK_FOUND=no
25344      else
25345        # Do we have a bin/javac?
25346        if test ! -x "$BOOT_JDK/bin/javac"; then
25347          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25349          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25350$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25351          BOOT_JDK_FOUND=no
25352        else
25353          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25354          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25357            BOOT_JDK_FOUND=no
25358          else
25359            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25361
25362            # Extra M4 quote needed to protect [] in grep expression.
25363            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25364            if test "x$FOUND_CORRECT_VERSION" = x; then
25365              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25367              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25368$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25369              BOOT_JDK_FOUND=no
25370            else
25371              # We're done! :-)
25372              BOOT_JDK_FOUND=yes
25373
25374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25375
25376  # Input might be given as Windows format, start by converting to
25377  # unix format.
25378  path="$BOOT_JDK"
25379  new_path=`$CYGPATH -u "$path"`
25380
25381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25384  # "foo.exe" is OK but "foo" is an error.
25385  #
25386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25387  # It is also a way to make sure we got the proper file name for the real test later on.
25388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25389  if test "x$test_shortpath" = x; then
25390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25392    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25393  fi
25394
25395  # Call helper function which possibly converts this using DOS-style short mode.
25396  # If so, the updated path is stored in $new_path.
25397
25398  input_path="$new_path"
25399  # Check if we need to convert this using DOS-style short mode. If the path
25400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25401  # take no chances and rewrite it.
25402  # Note: m4 eats our [], so we need to use [ and ] instead.
25403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25404  if test "x$has_forbidden_chars" != x; then
25405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25409      # Going to short mode and back again did indeed matter. Since short mode is
25410      # case insensitive, let's make it lowercase to improve readability.
25411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25412      # Now convert it back to Unix-stile (cygpath)
25413      input_path=`$CYGPATH -u "$shortmode_path"`
25414      new_path="$input_path"
25415    fi
25416  fi
25417
25418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25419  if test "x$test_cygdrive_prefix" = x; then
25420    # As a simple fix, exclude /usr/bin since it's not a real path.
25421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25423      # a path prefixed by /cygdrive for fixpath to work.
25424      new_path="$CYGWIN_ROOT_PATH$input_path"
25425    fi
25426  fi
25427
25428
25429  if test "x$path" != "x$new_path"; then
25430    BOOT_JDK="$new_path"
25431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25432$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25433  fi
25434
25435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25436
25437  path="$BOOT_JDK"
25438  has_colon=`$ECHO $path | $GREP ^.:`
25439  new_path="$path"
25440  if test "x$has_colon" = x; then
25441    # Not in mixed or Windows style, start by that.
25442    new_path=`cmd //c echo $path`
25443  fi
25444
25445
25446  input_path="$new_path"
25447  # Check if we need to convert this using DOS-style short mode. If the path
25448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25449  # take no chances and rewrite it.
25450  # Note: m4 eats our [], so we need to use [ and ] instead.
25451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25452  if test "x$has_forbidden_chars" != x; then
25453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25455  fi
25456
25457
25458  windows_path="$new_path"
25459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25460    unix_path=`$CYGPATH -u "$windows_path"`
25461    new_path="$unix_path"
25462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25464    new_path="$unix_path"
25465  fi
25466
25467  if test "x$path" != "x$new_path"; then
25468    BOOT_JDK="$new_path"
25469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25471  fi
25472
25473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25475
25476  else
25477    # We're on a posix platform. Hooray! :)
25478    path="$BOOT_JDK"
25479    has_space=`$ECHO "$path" | $GREP " "`
25480    if test "x$has_space" != x; then
25481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25483      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25484    fi
25485
25486    # Use eval to expand a potential ~
25487    eval path="$path"
25488    if test ! -f "$path" && test ! -d "$path"; then
25489      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25490    fi
25491
25492    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25493  fi
25494
25495              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25496$as_echo_n "checking for Boot JDK... " >&6; }
25497              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25498$as_echo "$BOOT_JDK" >&6; }
25499              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25500$as_echo_n "checking Boot JDK version... " >&6; }
25501              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25502              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25503$as_echo "$BOOT_JDK_VERSION" >&6; }
25504            fi # end check jdk version
25505          fi # end check rt.jar
25506        fi # end check javac
25507      fi # end check java
25508    fi # end check boot jdk found
25509  fi
25510
25511
25512  # If we haven't found anything yet, we've truly lost. Give up.
25513  if test "x$BOOT_JDK_FOUND" = xno; then
25514
25515  # Print a helpful message on how to acquire the necessary build dependency.
25516  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25517  MISSING_DEPENDENCY=openjdk
25518
25519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25520    cygwin_help $MISSING_DEPENDENCY
25521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25522    msys_help $MISSING_DEPENDENCY
25523  else
25524    PKGHANDLER_COMMAND=
25525
25526    case $PKGHANDLER in
25527      apt-get)
25528        apt_help     $MISSING_DEPENDENCY ;;
25529      yum)
25530        yum_help     $MISSING_DEPENDENCY ;;
25531      port)
25532        port_help    $MISSING_DEPENDENCY ;;
25533      pkgutil)
25534        pkgutil_help $MISSING_DEPENDENCY ;;
25535      pkgadd)
25536        pkgadd_help  $MISSING_DEPENDENCY ;;
25537    esac
25538
25539    if test "x$PKGHANDLER_COMMAND" != x; then
25540      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25541    fi
25542  fi
25543
25544    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25545$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25546    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25547$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25548    as_fn_error $? "Cannot continue" "$LINENO" 5
25549  fi
25550
25551  # Setup proper paths for what we found
25552  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25553  if test ! -f "$BOOT_RTJAR"; then
25554    # On MacOSX it is called classes.jar
25555    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25556    if test -f "$BOOT_RTJAR"; then
25557      # Remove the ..
25558      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25559    fi
25560  fi
25561  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25562  BOOT_JDK="$BOOT_JDK"
25563
25564
25565
25566
25567  # Setup tools from the Boot JDK.
25568
25569  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25570
25571  # Publish this variable in the help.
25572
25573
25574  if test "x$JAVA" = x; then
25575    # The variable is not set by user, try to locate tool using the code snippet
25576
25577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25578$as_echo_n "checking for java in Boot JDK... " >&6; }
25579      JAVA=$BOOT_JDK/bin/java
25580      if test ! -x $JAVA; then
25581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25582$as_echo "not found" >&6; }
25583        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25584$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25585        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25586      fi
25587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25588$as_echo "ok" >&6; }
25589
25590
25591  else
25592    # The variable is set, but is it from the command line or the environment?
25593
25594    # Try to remove the string !JAVA! from our list.
25595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25597      # If it failed, the variable was not from the command line. Ignore it,
25598      # but warn the user (except for BASH, which is always set by the calling BASH).
25599      if test "xJAVA" != xBASH; then
25600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25601$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25602      fi
25603      # Try to locate tool using the code snippet
25604
25605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25606$as_echo_n "checking for java in Boot JDK... " >&6; }
25607      JAVA=$BOOT_JDK/bin/java
25608      if test ! -x $JAVA; then
25609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25610$as_echo "not found" >&6; }
25611        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25612$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25613        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25614      fi
25615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25616$as_echo "ok" >&6; }
25617
25618
25619    else
25620      # If it succeeded, then it was overridden by the user. We will use it
25621      # for the tool.
25622
25623      # First remove it from the list of overridden variables, so we can test
25624      # for unknown variables in the end.
25625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25626
25627      # Check if the provided tool contains a complete path.
25628      tool_specified="$JAVA"
25629      tool_basename="${tool_specified##*/}"
25630      if test "x$tool_basename" = "x$tool_specified"; then
25631        # A command without a complete path is provided, search $PATH.
25632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25633$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25634        # Extract the first word of "$tool_basename", so it can be a program name with args.
25635set dummy $tool_basename; ac_word=$2
25636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25637$as_echo_n "checking for $ac_word... " >&6; }
25638if ${ac_cv_path_JAVA+:} false; then :
25639  $as_echo_n "(cached) " >&6
25640else
25641  case $JAVA in
25642  [\\/]* | ?:[\\/]*)
25643  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25644  ;;
25645  *)
25646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25647for as_dir in $PATH
25648do
25649  IFS=$as_save_IFS
25650  test -z "$as_dir" && as_dir=.
25651    for ac_exec_ext in '' $ac_executable_extensions; do
25652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25653    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25655    break 2
25656  fi
25657done
25658  done
25659IFS=$as_save_IFS
25660
25661  ;;
25662esac
25663fi
25664JAVA=$ac_cv_path_JAVA
25665if test -n "$JAVA"; then
25666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25667$as_echo "$JAVA" >&6; }
25668else
25669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25670$as_echo "no" >&6; }
25671fi
25672
25673
25674        if test "x$JAVA" = x; then
25675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25676        fi
25677      else
25678        # Otherwise we believe it is a complete path. Use it as it is.
25679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25680$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25682$as_echo_n "checking for JAVA... " >&6; }
25683        if test ! -x "$tool_specified"; then
25684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25685$as_echo "not found" >&6; }
25686          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25687        fi
25688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25689$as_echo "$tool_specified" >&6; }
25690      fi
25691    fi
25692  fi
25693
25694
25695
25696  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25697
25698  # Publish this variable in the help.
25699
25700
25701  if test "x$JAVAC" = x; then
25702    # The variable is not set by user, try to locate tool using the code snippet
25703
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25705$as_echo_n "checking for javac in Boot JDK... " >&6; }
25706      JAVAC=$BOOT_JDK/bin/javac
25707      if test ! -x $JAVAC; then
25708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25709$as_echo "not found" >&6; }
25710        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25711$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25712        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25713      fi
25714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25715$as_echo "ok" >&6; }
25716
25717
25718  else
25719    # The variable is set, but is it from the command line or the environment?
25720
25721    # Try to remove the string !JAVAC! from our list.
25722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25724      # If it failed, the variable was not from the command line. Ignore it,
25725      # but warn the user (except for BASH, which is always set by the calling BASH).
25726      if test "xJAVAC" != xBASH; then
25727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25728$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25729      fi
25730      # Try to locate tool using the code snippet
25731
25732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25733$as_echo_n "checking for javac in Boot JDK... " >&6; }
25734      JAVAC=$BOOT_JDK/bin/javac
25735      if test ! -x $JAVAC; then
25736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25737$as_echo "not found" >&6; }
25738        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25739$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25740        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25741      fi
25742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25743$as_echo "ok" >&6; }
25744
25745
25746    else
25747      # If it succeeded, then it was overridden by the user. We will use it
25748      # for the tool.
25749
25750      # First remove it from the list of overridden variables, so we can test
25751      # for unknown variables in the end.
25752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25753
25754      # Check if the provided tool contains a complete path.
25755      tool_specified="$JAVAC"
25756      tool_basename="${tool_specified##*/}"
25757      if test "x$tool_basename" = "x$tool_specified"; then
25758        # A command without a complete path is provided, search $PATH.
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25760$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25761        # Extract the first word of "$tool_basename", so it can be a program name with args.
25762set dummy $tool_basename; ac_word=$2
25763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25764$as_echo_n "checking for $ac_word... " >&6; }
25765if ${ac_cv_path_JAVAC+:} false; then :
25766  $as_echo_n "(cached) " >&6
25767else
25768  case $JAVAC in
25769  [\\/]* | ?:[\\/]*)
25770  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25771  ;;
25772  *)
25773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25774for as_dir in $PATH
25775do
25776  IFS=$as_save_IFS
25777  test -z "$as_dir" && as_dir=.
25778    for ac_exec_ext in '' $ac_executable_extensions; do
25779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25780    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25782    break 2
25783  fi
25784done
25785  done
25786IFS=$as_save_IFS
25787
25788  ;;
25789esac
25790fi
25791JAVAC=$ac_cv_path_JAVAC
25792if test -n "$JAVAC"; then
25793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25794$as_echo "$JAVAC" >&6; }
25795else
25796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25797$as_echo "no" >&6; }
25798fi
25799
25800
25801        if test "x$JAVAC" = x; then
25802          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25803        fi
25804      else
25805        # Otherwise we believe it is a complete path. Use it as it is.
25806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25807$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25809$as_echo_n "checking for JAVAC... " >&6; }
25810        if test ! -x "$tool_specified"; then
25811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25812$as_echo "not found" >&6; }
25813          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25814        fi
25815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25816$as_echo "$tool_specified" >&6; }
25817      fi
25818    fi
25819  fi
25820
25821
25822
25823  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25824
25825  # Publish this variable in the help.
25826
25827
25828  if test "x$JAVAH" = x; then
25829    # The variable is not set by user, try to locate tool using the code snippet
25830
25831      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25832$as_echo_n "checking for javah in Boot JDK... " >&6; }
25833      JAVAH=$BOOT_JDK/bin/javah
25834      if test ! -x $JAVAH; then
25835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25836$as_echo "not found" >&6; }
25837        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25838$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25839        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25840      fi
25841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25842$as_echo "ok" >&6; }
25843
25844
25845  else
25846    # The variable is set, but is it from the command line or the environment?
25847
25848    # Try to remove the string !JAVAH! from our list.
25849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25851      # If it failed, the variable was not from the command line. Ignore it,
25852      # but warn the user (except for BASH, which is always set by the calling BASH).
25853      if test "xJAVAH" != xBASH; then
25854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25855$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25856      fi
25857      # Try to locate tool using the code snippet
25858
25859      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25860$as_echo_n "checking for javah in Boot JDK... " >&6; }
25861      JAVAH=$BOOT_JDK/bin/javah
25862      if test ! -x $JAVAH; then
25863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25864$as_echo "not found" >&6; }
25865        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25866$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25867        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25868      fi
25869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25870$as_echo "ok" >&6; }
25871
25872
25873    else
25874      # If it succeeded, then it was overridden by the user. We will use it
25875      # for the tool.
25876
25877      # First remove it from the list of overridden variables, so we can test
25878      # for unknown variables in the end.
25879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25880
25881      # Check if the provided tool contains a complete path.
25882      tool_specified="$JAVAH"
25883      tool_basename="${tool_specified##*/}"
25884      if test "x$tool_basename" = "x$tool_specified"; then
25885        # A command without a complete path is provided, search $PATH.
25886        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25887$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25888        # Extract the first word of "$tool_basename", so it can be a program name with args.
25889set dummy $tool_basename; ac_word=$2
25890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25891$as_echo_n "checking for $ac_word... " >&6; }
25892if ${ac_cv_path_JAVAH+:} false; then :
25893  $as_echo_n "(cached) " >&6
25894else
25895  case $JAVAH in
25896  [\\/]* | ?:[\\/]*)
25897  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25898  ;;
25899  *)
25900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25901for as_dir in $PATH
25902do
25903  IFS=$as_save_IFS
25904  test -z "$as_dir" && as_dir=.
25905    for ac_exec_ext in '' $ac_executable_extensions; do
25906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25907    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25909    break 2
25910  fi
25911done
25912  done
25913IFS=$as_save_IFS
25914
25915  ;;
25916esac
25917fi
25918JAVAH=$ac_cv_path_JAVAH
25919if test -n "$JAVAH"; then
25920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25921$as_echo "$JAVAH" >&6; }
25922else
25923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25924$as_echo "no" >&6; }
25925fi
25926
25927
25928        if test "x$JAVAH" = x; then
25929          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25930        fi
25931      else
25932        # Otherwise we believe it is a complete path. Use it as it is.
25933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25934$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25936$as_echo_n "checking for JAVAH... " >&6; }
25937        if test ! -x "$tool_specified"; then
25938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25939$as_echo "not found" >&6; }
25940          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25941        fi
25942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25943$as_echo "$tool_specified" >&6; }
25944      fi
25945    fi
25946  fi
25947
25948
25949
25950  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25951
25952  # Publish this variable in the help.
25953
25954
25955  if test "x$JAR" = x; then
25956    # The variable is not set by user, try to locate tool using the code snippet
25957
25958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25959$as_echo_n "checking for jar in Boot JDK... " >&6; }
25960      JAR=$BOOT_JDK/bin/jar
25961      if test ! -x $JAR; then
25962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25963$as_echo "not found" >&6; }
25964        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25965$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25966        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25967      fi
25968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25969$as_echo "ok" >&6; }
25970
25971
25972  else
25973    # The variable is set, but is it from the command line or the environment?
25974
25975    # Try to remove the string !JAR! from our list.
25976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25978      # If it failed, the variable was not from the command line. Ignore it,
25979      # but warn the user (except for BASH, which is always set by the calling BASH).
25980      if test "xJAR" != xBASH; then
25981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25982$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25983      fi
25984      # Try to locate tool using the code snippet
25985
25986      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25987$as_echo_n "checking for jar in Boot JDK... " >&6; }
25988      JAR=$BOOT_JDK/bin/jar
25989      if test ! -x $JAR; then
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25991$as_echo "not found" >&6; }
25992        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25993$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25994        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25995      fi
25996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25997$as_echo "ok" >&6; }
25998
25999
26000    else
26001      # If it succeeded, then it was overridden by the user. We will use it
26002      # for the tool.
26003
26004      # First remove it from the list of overridden variables, so we can test
26005      # for unknown variables in the end.
26006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26007
26008      # Check if the provided tool contains a complete path.
26009      tool_specified="$JAR"
26010      tool_basename="${tool_specified##*/}"
26011      if test "x$tool_basename" = "x$tool_specified"; then
26012        # A command without a complete path is provided, search $PATH.
26013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26014$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26015        # Extract the first word of "$tool_basename", so it can be a program name with args.
26016set dummy $tool_basename; ac_word=$2
26017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26018$as_echo_n "checking for $ac_word... " >&6; }
26019if ${ac_cv_path_JAR+:} false; then :
26020  $as_echo_n "(cached) " >&6
26021else
26022  case $JAR in
26023  [\\/]* | ?:[\\/]*)
26024  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26025  ;;
26026  *)
26027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26028for as_dir in $PATH
26029do
26030  IFS=$as_save_IFS
26031  test -z "$as_dir" && as_dir=.
26032    for ac_exec_ext in '' $ac_executable_extensions; do
26033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26034    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26036    break 2
26037  fi
26038done
26039  done
26040IFS=$as_save_IFS
26041
26042  ;;
26043esac
26044fi
26045JAR=$ac_cv_path_JAR
26046if test -n "$JAR"; then
26047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26048$as_echo "$JAR" >&6; }
26049else
26050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26051$as_echo "no" >&6; }
26052fi
26053
26054
26055        if test "x$JAR" = x; then
26056          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26057        fi
26058      else
26059        # Otherwise we believe it is a complete path. Use it as it is.
26060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26061$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26063$as_echo_n "checking for JAR... " >&6; }
26064        if test ! -x "$tool_specified"; then
26065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26066$as_echo "not found" >&6; }
26067          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26068        fi
26069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26070$as_echo "$tool_specified" >&6; }
26071      fi
26072    fi
26073  fi
26074
26075
26076
26077  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26078
26079  # Publish this variable in the help.
26080
26081
26082  if test "x$NATIVE2ASCII" = x; then
26083    # The variable is not set by user, try to locate tool using the code snippet
26084
26085      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26086$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26087      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26088      if test ! -x $NATIVE2ASCII; then
26089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26090$as_echo "not found" >&6; }
26091        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26092$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26093        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26094      fi
26095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26096$as_echo "ok" >&6; }
26097
26098
26099  else
26100    # The variable is set, but is it from the command line or the environment?
26101
26102    # Try to remove the string !NATIVE2ASCII! from our list.
26103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
26104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26105      # If it failed, the variable was not from the command line. Ignore it,
26106      # but warn the user (except for BASH, which is always set by the calling BASH).
26107      if test "xNATIVE2ASCII" != xBASH; then
26108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
26109$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
26110      fi
26111      # Try to locate tool using the code snippet
26112
26113      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
26114$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
26115      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
26116      if test ! -x $NATIVE2ASCII; then
26117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26118$as_echo "not found" >&6; }
26119        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26120$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26121        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
26122      fi
26123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26124$as_echo "ok" >&6; }
26125
26126
26127    else
26128      # If it succeeded, then it was overridden by the user. We will use it
26129      # for the tool.
26130
26131      # First remove it from the list of overridden variables, so we can test
26132      # for unknown variables in the end.
26133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26134
26135      # Check if the provided tool contains a complete path.
26136      tool_specified="$NATIVE2ASCII"
26137      tool_basename="${tool_specified##*/}"
26138      if test "x$tool_basename" = "x$tool_specified"; then
26139        # A command without a complete path is provided, search $PATH.
26140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26141$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26142        # Extract the first word of "$tool_basename", so it can be a program name with args.
26143set dummy $tool_basename; ac_word=$2
26144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26145$as_echo_n "checking for $ac_word... " >&6; }
26146if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26147  $as_echo_n "(cached) " >&6
26148else
26149  case $NATIVE2ASCII in
26150  [\\/]* | ?:[\\/]*)
26151  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26152  ;;
26153  *)
26154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26155for as_dir in $PATH
26156do
26157  IFS=$as_save_IFS
26158  test -z "$as_dir" && as_dir=.
26159    for ac_exec_ext in '' $ac_executable_extensions; do
26160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26161    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26163    break 2
26164  fi
26165done
26166  done
26167IFS=$as_save_IFS
26168
26169  ;;
26170esac
26171fi
26172NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26173if test -n "$NATIVE2ASCII"; then
26174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26175$as_echo "$NATIVE2ASCII" >&6; }
26176else
26177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26178$as_echo "no" >&6; }
26179fi
26180
26181
26182        if test "x$NATIVE2ASCII" = x; then
26183          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26184        fi
26185      else
26186        # Otherwise we believe it is a complete path. Use it as it is.
26187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26188$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26190$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26191        if test ! -x "$tool_specified"; then
26192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26193$as_echo "not found" >&6; }
26194          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26195        fi
26196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26197$as_echo "$tool_specified" >&6; }
26198      fi
26199    fi
26200  fi
26201
26202
26203
26204  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26205
26206  # Publish this variable in the help.
26207
26208
26209  if test "x$JARSIGNER" = x; then
26210    # The variable is not set by user, try to locate tool using the code snippet
26211
26212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26213$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26214      JARSIGNER=$BOOT_JDK/bin/jarsigner
26215      if test ! -x $JARSIGNER; then
26216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26217$as_echo "not found" >&6; }
26218        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26219$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26220        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26221      fi
26222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26223$as_echo "ok" >&6; }
26224
26225
26226  else
26227    # The variable is set, but is it from the command line or the environment?
26228
26229    # Try to remove the string !JARSIGNER! from our list.
26230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26232      # If it failed, the variable was not from the command line. Ignore it,
26233      # but warn the user (except for BASH, which is always set by the calling BASH).
26234      if test "xJARSIGNER" != xBASH; then
26235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26236$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26237      fi
26238      # Try to locate tool using the code snippet
26239
26240      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26241$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26242      JARSIGNER=$BOOT_JDK/bin/jarsigner
26243      if test ! -x $JARSIGNER; then
26244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26245$as_echo "not found" >&6; }
26246        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26247$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26248        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26249      fi
26250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26251$as_echo "ok" >&6; }
26252
26253
26254    else
26255      # If it succeeded, then it was overridden by the user. We will use it
26256      # for the tool.
26257
26258      # First remove it from the list of overridden variables, so we can test
26259      # for unknown variables in the end.
26260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26261
26262      # Check if the provided tool contains a complete path.
26263      tool_specified="$JARSIGNER"
26264      tool_basename="${tool_specified##*/}"
26265      if test "x$tool_basename" = "x$tool_specified"; then
26266        # A command without a complete path is provided, search $PATH.
26267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26268$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26269        # Extract the first word of "$tool_basename", so it can be a program name with args.
26270set dummy $tool_basename; ac_word=$2
26271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26272$as_echo_n "checking for $ac_word... " >&6; }
26273if ${ac_cv_path_JARSIGNER+:} false; then :
26274  $as_echo_n "(cached) " >&6
26275else
26276  case $JARSIGNER in
26277  [\\/]* | ?:[\\/]*)
26278  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26279  ;;
26280  *)
26281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26282for as_dir in $PATH
26283do
26284  IFS=$as_save_IFS
26285  test -z "$as_dir" && as_dir=.
26286    for ac_exec_ext in '' $ac_executable_extensions; do
26287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26288    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26290    break 2
26291  fi
26292done
26293  done
26294IFS=$as_save_IFS
26295
26296  ;;
26297esac
26298fi
26299JARSIGNER=$ac_cv_path_JARSIGNER
26300if test -n "$JARSIGNER"; then
26301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26302$as_echo "$JARSIGNER" >&6; }
26303else
26304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26305$as_echo "no" >&6; }
26306fi
26307
26308
26309        if test "x$JARSIGNER" = x; then
26310          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26311        fi
26312      else
26313        # Otherwise we believe it is a complete path. Use it as it is.
26314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26315$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26317$as_echo_n "checking for JARSIGNER... " >&6; }
26318        if test ! -x "$tool_specified"; then
26319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26320$as_echo "not found" >&6; }
26321          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26322        fi
26323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26324$as_echo "$tool_specified" >&6; }
26325      fi
26326    fi
26327  fi
26328
26329
26330
26331  # Finally, set some other options...
26332
26333  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26334  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26335
26336
26337
26338
26339###############################################################################
26340#
26341# Configure the sources to use. We can add or override individual directories.
26342#
26343###############################################################################
26344
26345
26346  # Where are the sources. Any of these can be overridden
26347  # using --with-override-corba and the likes.
26348  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26349  CORBA_TOPDIR="$SRC_ROOT/corba"
26350  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26351  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26352  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26353  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26354  JDK_TOPDIR="$SRC_ROOT/jdk"
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365  ###############################################################################
26366  #
26367  # Pickup additional source for a component from outside of the source root
26368  # or override source for a component.
26369  #
26370
26371# Check whether --with-add-source-root was given.
26372if test "${with_add_source_root+set}" = set; then :
26373  withval=$with_add_source_root;
26374fi
26375
26376
26377
26378# Check whether --with-override-source-root was given.
26379if test "${with_override_source_root+set}" = set; then :
26380  withval=$with_override_source_root;
26381fi
26382
26383
26384
26385# Check whether --with-adds-and-overrides was given.
26386if test "${with_adds_and_overrides+set}" = set; then :
26387  withval=$with_adds_and_overrides;
26388fi
26389
26390
26391  if test "x$with_adds_and_overrides" != x; then
26392    with_add_source_root="$with_adds_and_overrides/adds"
26393    with_override_source_root="$with_adds_and_overrides/overrides"
26394  fi
26395
26396  if test "x$with_add_source_root" != x; then
26397    if ! test -d $with_add_source_root; then
26398      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26399    fi
26400    CURDIR="$PWD"
26401    cd "$with_add_source_root"
26402    ADD_SRC_ROOT="`pwd`"
26403    cd "$CURDIR"
26404    # Verify that the addon source root does not have any root makefiles.
26405    # If it does, then it is usually an error, prevent this.
26406    if test -f $with_add_source_root/langtools/make/Makefile; then
26407      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
26408    fi
26409    if test -f $with_add_source_root/corba/make/Makefile; then
26410      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
26411    fi
26412    if test -f $with_add_source_root/jaxp/make/Makefile; then
26413      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
26414    fi
26415    if test -f $with_add_source_root/jaxws/make/Makefile; then
26416      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
26417    fi
26418    if test -f $with_add_source_root/hotspot/make/Makefile; then
26419      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
26420    fi
26421    if test -f $with_add_source_root/nashorn/make/Makefile; then
26422      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
26423    fi
26424    if test -f $with_add_source_root/jdk/make/Makefile; then
26425      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
26426    fi
26427  fi
26428
26429
26430  if test "x$with_override_source_root" != x; then
26431    if ! test -d $with_override_source_root; then
26432      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26433    fi
26434    CURDIR="$PWD"
26435    cd "$with_override_source_root"
26436    OVERRIDE_SRC_ROOT="`pwd`"
26437    cd "$CURDIR"
26438    if test -f $with_override_source_root/langtools/make/Makefile; then
26439      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
26440    fi
26441    if test -f $with_override_source_root/corba/make/Makefile; then
26442      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
26443    fi
26444    if test -f $with_override_source_root/jaxp/make/Makefile; then
26445      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
26446    fi
26447    if test -f $with_override_source_root/jaxws/make/Makefile; then
26448      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
26449    fi
26450    if test -f $with_override_source_root/hotspot/make/Makefile; then
26451      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
26452    fi
26453    if test -f $with_override_source_root/nashorn/make/Makefile; then
26454      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
26455    fi
26456    if test -f $with_override_source_root/jdk/make/Makefile; then
26457      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
26458    fi
26459  fi
26460
26461
26462  ###############################################################################
26463  #
26464  # Override a repo completely, this is used for example when you have 3 small
26465  # development sandboxes of the langtools sources and want to avoid having 3 full
26466  # OpenJDK sources checked out on disk.
26467  #
26468  # Assuming that the 3 langtools sandboxes are located here:
26469  # /home/fredrik/sandbox1/langtools
26470  # /home/fredrik/sandbox2/langtools
26471  # /home/fredrik/sandbox3/langtools
26472  #
26473  # From the source root you create build subdirs manually:
26474  #     mkdir -p build1 build2 build3
26475  # in each build directory run:
26476  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26477  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26478  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26479  #
26480
26481
26482# Check whether --with-override-langtools was given.
26483if test "${with_override_langtools+set}" = set; then :
26484  withval=$with_override_langtools;
26485fi
26486
26487
26488
26489# Check whether --with-override-corba was given.
26490if test "${with_override_corba+set}" = set; then :
26491  withval=$with_override_corba;
26492fi
26493
26494
26495
26496# Check whether --with-override-jaxp was given.
26497if test "${with_override_jaxp+set}" = set; then :
26498  withval=$with_override_jaxp;
26499fi
26500
26501
26502
26503# Check whether --with-override-jaxws was given.
26504if test "${with_override_jaxws+set}" = set; then :
26505  withval=$with_override_jaxws;
26506fi
26507
26508
26509
26510# Check whether --with-override-hotspot was given.
26511if test "${with_override_hotspot+set}" = set; then :
26512  withval=$with_override_hotspot;
26513fi
26514
26515
26516
26517# Check whether --with-override-nashorn was given.
26518if test "${with_override_nashorn+set}" = set; then :
26519  withval=$with_override_nashorn;
26520fi
26521
26522
26523
26524# Check whether --with-override-jdk was given.
26525if test "${with_override_jdk+set}" = set; then :
26526  withval=$with_override_jdk;
26527fi
26528
26529
26530  if test "x$with_override_langtools" != x; then
26531    CURDIR="$PWD"
26532    cd "$with_override_langtools"
26533    LANGTOOLS_TOPDIR="`pwd`"
26534    cd "$CURDIR"
26535    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26536      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26537    fi
26538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26539$as_echo_n "checking if langtools should be overridden... " >&6; }
26540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26541$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26542  fi
26543  if test "x$with_override_corba" != x; then
26544    CURDIR="$PWD"
26545    cd "$with_override_corba"
26546    CORBA_TOPDIR="`pwd`"
26547    cd "$CURDIR"
26548    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26549      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26550    fi
26551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26552$as_echo_n "checking if corba should be overridden... " >&6; }
26553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26554$as_echo "yes with $CORBA_TOPDIR" >&6; }
26555  fi
26556  if test "x$with_override_jaxp" != x; then
26557    CURDIR="$PWD"
26558    cd "$with_override_jaxp"
26559    JAXP_TOPDIR="`pwd`"
26560    cd "$CURDIR"
26561    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26562      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26563    fi
26564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26565$as_echo_n "checking if jaxp should be overridden... " >&6; }
26566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26567$as_echo "yes with $JAXP_TOPDIR" >&6; }
26568  fi
26569  if test "x$with_override_jaxws" != x; then
26570    CURDIR="$PWD"
26571    cd "$with_override_jaxws"
26572    JAXWS_TOPDIR="`pwd`"
26573    cd "$CURDIR"
26574    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26575      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26576    fi
26577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26578$as_echo_n "checking if jaxws should be overridden... " >&6; }
26579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26580$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26581  fi
26582  if test "x$with_override_hotspot" != x; then
26583    CURDIR="$PWD"
26584    cd "$with_override_hotspot"
26585    HOTSPOT_TOPDIR="`pwd`"
26586    cd "$CURDIR"
26587    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26588      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26589    fi
26590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26591$as_echo_n "checking if hotspot should be overridden... " >&6; }
26592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26593$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26594  fi
26595  if test "x$with_override_nashorn" != x; then
26596    CURDIR="$PWD"
26597    cd "$with_override_nashorn"
26598    NASHORN_TOPDIR="`pwd`"
26599    cd "$CURDIR"
26600    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26601      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26602    fi
26603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26604$as_echo_n "checking if nashorn should be overridden... " >&6; }
26605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26606$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26607  fi
26608  if test "x$with_override_jdk" != x; then
26609    CURDIR="$PWD"
26610    cd "$with_override_jdk"
26611    JDK_TOPDIR="`pwd`"
26612    cd "$CURDIR"
26613    if ! test -f $JDK_TOPDIR/make/Makefile; then
26614      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26615    fi
26616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26617$as_echo_n "checking if JDK should be overridden... " >&6; }
26618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26619$as_echo "yes with $JDK_TOPDIR" >&6; }
26620  fi
26621
26622
26623  BUILD_OUTPUT="$OUTPUT_ROOT"
26624
26625
26626  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26627  BUILD_HOTSPOT=true
26628
26629
26630
26631# Check whether --with-import-hotspot was given.
26632if test "${with_import_hotspot+set}" = set; then :
26633  withval=$with_import_hotspot;
26634fi
26635
26636  if test "x$with_import_hotspot" != x; then
26637    CURDIR="$PWD"
26638    cd "$with_import_hotspot"
26639    HOTSPOT_DIST="`pwd`"
26640    cd "$CURDIR"
26641    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26642      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26643    fi
26644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26645$as_echo_n "checking if hotspot should be imported... " >&6; }
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26647$as_echo "yes from $HOTSPOT_DIST" >&6; }
26648    BUILD_HOTSPOT=false
26649  fi
26650
26651  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26652
26653
26654###############################################################################
26655#
26656# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26657# native code.
26658#
26659###############################################################################
26660
26661# First determine the toolchain type (compiler family)
26662
26663
26664# Check whether --with-toolchain-type was given.
26665if test "${with_toolchain_type+set}" = set; then :
26666  withval=$with_toolchain_type;
26667fi
26668
26669
26670  # Use indirect variable referencing
26671  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26672  VALID_TOOLCHAINS=${!toolchain_var_name}
26673
26674  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26675    if test -n "$XCODEBUILD"; then
26676      # On Mac OS X, default toolchain to clang after Xcode 5
26677      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26678      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26679      if test $? -ne 0; then
26680        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26681      fi
26682      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26683          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26684          $CUT -f 1 -d .`
26685      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26686$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26687      if test $XCODE_MAJOR_VERSION -ge 5; then
26688          DEFAULT_TOOLCHAIN="clang"
26689      else
26690          DEFAULT_TOOLCHAIN="gcc"
26691      fi
26692    else
26693      # If Xcode is not installed, but the command line tools are
26694      # then we can't run xcodebuild. On these systems we should
26695      # default to clang
26696      DEFAULT_TOOLCHAIN="clang"
26697    fi
26698  else
26699    # First toolchain type in the list is the default
26700    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26701  fi
26702
26703  if test "x$with_toolchain_type" = xlist; then
26704    # List all toolchains
26705    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26706$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26707    for toolchain in $VALID_TOOLCHAINS; do
26708      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26709      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26710      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26711    done
26712
26713    exit 0
26714  elif test "x$with_toolchain_type" != x; then
26715    # User override; check that it is valid
26716    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26717      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26718$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26719      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26720$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26721      as_fn_error $? "Cannot continue." "$LINENO" 5
26722    fi
26723    TOOLCHAIN_TYPE=$with_toolchain_type
26724  else
26725    # No flag given, use default
26726    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26727  fi
26728
26729
26730  TOOLCHAIN_CC_BINARY_clang="clang"
26731  TOOLCHAIN_CC_BINARY_gcc="gcc"
26732  TOOLCHAIN_CC_BINARY_microsoft="cl"
26733  TOOLCHAIN_CC_BINARY_solstudio="cc"
26734  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26735
26736  TOOLCHAIN_CXX_BINARY_clang="clang++"
26737  TOOLCHAIN_CXX_BINARY_gcc="g++"
26738  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26739  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26740  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26741
26742  # Use indirect variable referencing
26743  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26744  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26745  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26746  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26747  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26748  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26749
26750
26751  # Define filename patterns
26752  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26753    LIBRARY_PREFIX=
26754    SHARED_LIBRARY_SUFFIX='.dll'
26755    STATIC_LIBRARY_SUFFIX='.lib'
26756    SHARED_LIBRARY='$1.dll'
26757    STATIC_LIBRARY='$1.lib'
26758    OBJ_SUFFIX='.obj'
26759    EXE_SUFFIX='.exe'
26760  else
26761    LIBRARY_PREFIX=lib
26762    SHARED_LIBRARY_SUFFIX='.so'
26763    STATIC_LIBRARY_SUFFIX='.a'
26764    SHARED_LIBRARY='lib$1.so'
26765    STATIC_LIBRARY='lib$1.a'
26766    OBJ_SUFFIX='.o'
26767    EXE_SUFFIX=''
26768    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26769      SHARED_LIBRARY='lib$1.dylib'
26770      SHARED_LIBRARY_SUFFIX='.dylib'
26771    fi
26772  fi
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26784    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26785$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26786  else
26787    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26788$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26789  fi
26790
26791
26792# Then detect the actual binaries needed
26793
26794  # FIXME: Is this needed?
26795  ac_ext=cpp
26796ac_cpp='$CXXCPP $CPPFLAGS'
26797ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26798ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26799ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26800
26801
26802  # Store the CFLAGS etc passed to the configure script.
26803  ORG_CFLAGS="$CFLAGS"
26804  ORG_CXXFLAGS="$CXXFLAGS"
26805  ORG_OBJCFLAGS="$OBJCFLAGS"
26806
26807  # On Windows, we need to detect the visual studio installation first.
26808  # This will change the PATH, but we need to keep that new PATH even
26809  # after toolchain detection is done, since the compiler (on x86) uses
26810  # it for DLL resolution in runtime.
26811  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26812
26813  # Store path to cygwin link.exe to help excluding it when searching for
26814  # VS linker. This must be done before changing the PATH when looking for VS.
26815  # Extract the first word of "link", so it can be a program name with args.
26816set dummy link; ac_word=$2
26817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26818$as_echo_n "checking for $ac_word... " >&6; }
26819if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26820  $as_echo_n "(cached) " >&6
26821else
26822  case $CYGWIN_LINK in
26823  [\\/]* | ?:[\\/]*)
26824  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26825  ;;
26826  *)
26827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26828for as_dir in $PATH
26829do
26830  IFS=$as_save_IFS
26831  test -z "$as_dir" && as_dir=.
26832    for ac_exec_ext in '' $ac_executable_extensions; do
26833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26834    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26836    break 2
26837  fi
26838done
26839  done
26840IFS=$as_save_IFS
26841
26842  ;;
26843esac
26844fi
26845CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26846if test -n "$CYGWIN_LINK"; then
26847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26848$as_echo "$CYGWIN_LINK" >&6; }
26849else
26850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26851$as_echo "no" >&6; }
26852fi
26853
26854
26855  if test "x$CYGWIN_LINK" != x; then
26856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26857$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26858    "$CYGWIN_LINK" --version > /dev/null
26859    if test $? -eq 0 ; then
26860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26861$as_echo "yes" >&6; }
26862    else
26863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26864$as_echo "no" >&6; }
26865      # This might be the VS linker. Don't exclude it later on.
26866      CYGWIN_LINK=""
26867    fi
26868  fi
26869
26870  # First-hand choice is to locate and run the vsvars bat file.
26871
26872  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26873    VCVARSFILE="vc/bin/vcvars32.bat"
26874  else
26875    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26876  fi
26877
26878  VS_ENV_CMD=""
26879  VS_ENV_ARGS=""
26880  if test "x$with_toolsdir" != x; then
26881
26882  if test "x$VS_ENV_CMD" = x; then
26883    VS100BASE="$with_toolsdir/../.."
26884    METHOD="--with-tools-dir"
26885
26886  windows_path="$VS100BASE"
26887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26888    unix_path=`$CYGPATH -u "$windows_path"`
26889    VS100BASE="$unix_path"
26890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26892    VS100BASE="$unix_path"
26893  fi
26894
26895    if test -d "$VS100BASE"; then
26896      if test -f "$VS100BASE/$VCVARSFILE"; then
26897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26898$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26899        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26900        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26901        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26902        # TODO: improve detection for other versions of VS
26903        PLATFORM_TOOLSET="v100"
26904      else
26905        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26906$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26907        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26908$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26909      fi
26910    fi
26911  fi
26912
26913  fi
26914
26915  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26916    # Having specified an argument which is incorrect will produce an instant failure;
26917    # we should not go on looking
26918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26919$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26920    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26921$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26922    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26923  fi
26924
26925  if test "x$VS100COMNTOOLS" != x; then
26926
26927  if test "x$VS_ENV_CMD" = x; then
26928    VS100BASE="$VS100COMNTOOLS/../.."
26929    METHOD="VS100COMNTOOLS variable"
26930
26931  windows_path="$VS100BASE"
26932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26933    unix_path=`$CYGPATH -u "$windows_path"`
26934    VS100BASE="$unix_path"
26935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26937    VS100BASE="$unix_path"
26938  fi
26939
26940    if test -d "$VS100BASE"; then
26941      if test -f "$VS100BASE/$VCVARSFILE"; then
26942        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26943$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26944        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26945        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26946        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26947        # TODO: improve detection for other versions of VS
26948        PLATFORM_TOOLSET="v100"
26949      else
26950        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26951$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26952        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26953$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26954      fi
26955    fi
26956  fi
26957
26958  fi
26959  if test "x$PROGRAMFILES" != x; then
26960
26961  if test "x$VS_ENV_CMD" = x; then
26962    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26963    METHOD="well-known name"
26964
26965  windows_path="$VS100BASE"
26966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26967    unix_path=`$CYGPATH -u "$windows_path"`
26968    VS100BASE="$unix_path"
26969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26971    VS100BASE="$unix_path"
26972  fi
26973
26974    if test -d "$VS100BASE"; then
26975      if test -f "$VS100BASE/$VCVARSFILE"; then
26976        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26977$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26978        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26979        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26980        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26981        # TODO: improve detection for other versions of VS
26982        PLATFORM_TOOLSET="v100"
26983      else
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26985$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26987$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26988      fi
26989    fi
26990  fi
26991
26992  fi
26993
26994  if test "x$VS_ENV_CMD" = x; then
26995    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26996    METHOD="well-known name"
26997
26998  windows_path="$VS100BASE"
26999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27000    unix_path=`$CYGPATH -u "$windows_path"`
27001    VS100BASE="$unix_path"
27002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27004    VS100BASE="$unix_path"
27005  fi
27006
27007    if test -d "$VS100BASE"; then
27008      if test -f "$VS100BASE/$VCVARSFILE"; then
27009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27010$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27011        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27012        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27013        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27014        # TODO: improve detection for other versions of VS
27015        PLATFORM_TOOLSET="v100"
27016      else
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27018$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27019        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27020$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27021      fi
27022    fi
27023  fi
27024
27025
27026  if test "x$VS_ENV_CMD" = x; then
27027    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27028    METHOD="well-known name"
27029
27030  windows_path="$VS100BASE"
27031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27032    unix_path=`$CYGPATH -u "$windows_path"`
27033    VS100BASE="$unix_path"
27034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27036    VS100BASE="$unix_path"
27037  fi
27038
27039    if test -d "$VS100BASE"; then
27040      if test -f "$VS100BASE/$VCVARSFILE"; then
27041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27042$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27043        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27044        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27045        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27046        # TODO: improve detection for other versions of VS
27047        PLATFORM_TOOLSET="v100"
27048      else
27049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27050$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27051        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27052$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27053      fi
27054    fi
27055  fi
27056
27057
27058  if test "x$ProgramW6432" != x; then
27059
27060  if test "x$VS_ENV_CMD" = x; then
27061    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27062    METHOD="well-known name"
27063
27064  windows_path="$WIN_SDK_BASE"
27065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27066    unix_path=`$CYGPATH -u "$windows_path"`
27067    WIN_SDK_BASE="$unix_path"
27068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27070    WIN_SDK_BASE="$unix_path"
27071  fi
27072
27073    if test -d "$WIN_SDK_BASE"; then
27074      # There have been cases of partial or broken SDK installations. A missing
27075      # lib dir is not going to work.
27076      if test ! -d "$WIN_SDK_BASE/../lib"; then
27077        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27078$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27079        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27080$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27081      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27082        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27083$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27084        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27085        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27086          VS_ENV_ARGS="/x86"
27087        else
27088          VS_ENV_ARGS="/x64"
27089        fi
27090        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27091        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27092        # TODO: improve detection for other versions of SDK
27093        PLATFORM_TOOLSET="Windows7.1SDK"
27094      else
27095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27096$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27097        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27098$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27099      fi
27100    fi
27101  fi
27102
27103  fi
27104  if test "x$PROGRAMW6432" != x; then
27105
27106  if test "x$VS_ENV_CMD" = x; then
27107    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27108    METHOD="well-known name"
27109
27110  windows_path="$WIN_SDK_BASE"
27111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27112    unix_path=`$CYGPATH -u "$windows_path"`
27113    WIN_SDK_BASE="$unix_path"
27114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27116    WIN_SDK_BASE="$unix_path"
27117  fi
27118
27119    if test -d "$WIN_SDK_BASE"; then
27120      # There have been cases of partial or broken SDK installations. A missing
27121      # lib dir is not going to work.
27122      if test ! -d "$WIN_SDK_BASE/../lib"; then
27123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27124$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27125        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27126$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27127      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27129$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27130        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27131        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27132          VS_ENV_ARGS="/x86"
27133        else
27134          VS_ENV_ARGS="/x64"
27135        fi
27136        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27137        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27138        # TODO: improve detection for other versions of SDK
27139        PLATFORM_TOOLSET="Windows7.1SDK"
27140      else
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27142$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27143        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27144$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27145      fi
27146    fi
27147  fi
27148
27149  fi
27150  if test "x$PROGRAMFILES" != x; then
27151
27152  if test "x$VS_ENV_CMD" = x; then
27153    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27154    METHOD="well-known name"
27155
27156  windows_path="$WIN_SDK_BASE"
27157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27158    unix_path=`$CYGPATH -u "$windows_path"`
27159    WIN_SDK_BASE="$unix_path"
27160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27162    WIN_SDK_BASE="$unix_path"
27163  fi
27164
27165    if test -d "$WIN_SDK_BASE"; then
27166      # There have been cases of partial or broken SDK installations. A missing
27167      # lib dir is not going to work.
27168      if test ! -d "$WIN_SDK_BASE/../lib"; then
27169        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27170$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27172$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27173      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27174        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27175$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27176        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27177        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27178          VS_ENV_ARGS="/x86"
27179        else
27180          VS_ENV_ARGS="/x64"
27181        fi
27182        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27183        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27184        # TODO: improve detection for other versions of SDK
27185        PLATFORM_TOOLSET="Windows7.1SDK"
27186      else
27187        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27188$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27189        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27190$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27191      fi
27192    fi
27193  fi
27194
27195  fi
27196
27197  if test "x$VS_ENV_CMD" = x; then
27198    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27199    METHOD="well-known name"
27200
27201  windows_path="$WIN_SDK_BASE"
27202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27203    unix_path=`$CYGPATH -u "$windows_path"`
27204    WIN_SDK_BASE="$unix_path"
27205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27207    WIN_SDK_BASE="$unix_path"
27208  fi
27209
27210    if test -d "$WIN_SDK_BASE"; then
27211      # There have been cases of partial or broken SDK installations. A missing
27212      # lib dir is not going to work.
27213      if test ! -d "$WIN_SDK_BASE/../lib"; then
27214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27215$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27217$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27218      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27219        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27220$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27221        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27222        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27223          VS_ENV_ARGS="/x86"
27224        else
27225          VS_ENV_ARGS="/x64"
27226        fi
27227        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27228        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27229        # TODO: improve detection for other versions of SDK
27230        PLATFORM_TOOLSET="Windows7.1SDK"
27231      else
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27233$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27235$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27236      fi
27237    fi
27238  fi
27239
27240
27241  if test "x$VS_ENV_CMD" = x; then
27242    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27243    METHOD="well-known name"
27244
27245  windows_path="$WIN_SDK_BASE"
27246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27247    unix_path=`$CYGPATH -u "$windows_path"`
27248    WIN_SDK_BASE="$unix_path"
27249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27251    WIN_SDK_BASE="$unix_path"
27252  fi
27253
27254    if test -d "$WIN_SDK_BASE"; then
27255      # There have been cases of partial or broken SDK installations. A missing
27256      # lib dir is not going to work.
27257      if test ! -d "$WIN_SDK_BASE/../lib"; then
27258        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27259$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27260        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27261$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27262      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27265        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27266        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27267          VS_ENV_ARGS="/x86"
27268        else
27269          VS_ENV_ARGS="/x64"
27270        fi
27271        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27272        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27273        # TODO: improve detection for other versions of SDK
27274        PLATFORM_TOOLSET="Windows7.1SDK"
27275      else
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27277$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27278        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27279$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27280      fi
27281    fi
27282  fi
27283
27284
27285  if test "x$VS_ENV_CMD" != x; then
27286    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27287
27288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27289
27290  # First separate the path from the arguments. This will split at the first
27291  # space.
27292  complete="$VS_ENV_CMD"
27293  path="${complete%% *}"
27294  tmp="$complete EOL"
27295  arguments="${tmp#* }"
27296
27297  # Input might be given as Windows format, start by converting to
27298  # unix format.
27299  new_path=`$CYGPATH -u "$path"`
27300
27301  # Now try to locate executable using which
27302  new_path=`$WHICH "$new_path" 2> /dev/null`
27303  # bat and cmd files are not always considered executable in cygwin causing which
27304  # to not find them
27305  if test "x$new_path" = x \
27306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27308    new_path=`$CYGPATH -u "$path"`
27309  fi
27310  if test "x$new_path" = x; then
27311    # Oops. Which didn't find the executable.
27312    # The splitting of arguments from the executable at a space might have been incorrect,
27313    # since paths with space are more likely in Windows. Give it another try with the whole
27314    # argument.
27315    path="$complete"
27316    arguments="EOL"
27317    new_path=`$CYGPATH -u "$path"`
27318    new_path=`$WHICH "$new_path" 2> /dev/null`
27319    # bat and cmd files are not always considered executable in cygwin causing which
27320    # to not find them
27321    if test "x$new_path" = x \
27322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27324      new_path=`$CYGPATH -u "$path"`
27325    fi
27326    if test "x$new_path" = x; then
27327      # It's still not found. Now this is an unrecoverable error.
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27329$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27330      has_space=`$ECHO "$complete" | $GREP " "`
27331      if test "x$has_space" != x; then
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27334      fi
27335      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27336    fi
27337  fi
27338
27339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27342  # "foo.exe" is OK but "foo" is an error.
27343  #
27344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27345  # It is also a way to make sure we got the proper file name for the real test later on.
27346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27347  if test "x$test_shortpath" = x; then
27348    # Short path failed, file does not exist as specified.
27349    # Try adding .exe or .cmd
27350    if test -f "${new_path}.exe"; then
27351      input_to_shortpath="${new_path}.exe"
27352    elif test -f "${new_path}.cmd"; then
27353      input_to_shortpath="${new_path}.cmd"
27354    else
27355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27356$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27359      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27360    fi
27361  else
27362    input_to_shortpath="$new_path"
27363  fi
27364
27365  # Call helper function which possibly converts this using DOS-style short mode.
27366  # If so, the updated path is stored in $new_path.
27367  new_path="$input_to_shortpath"
27368
27369  input_path="$input_to_shortpath"
27370  # Check if we need to convert this using DOS-style short mode. If the path
27371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27372  # take no chances and rewrite it.
27373  # Note: m4 eats our [], so we need to use [ and ] instead.
27374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27375  if test "x$has_forbidden_chars" != x; then
27376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27380      # Going to short mode and back again did indeed matter. Since short mode is
27381      # case insensitive, let's make it lowercase to improve readability.
27382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27383      # Now convert it back to Unix-stile (cygpath)
27384      input_path=`$CYGPATH -u "$shortmode_path"`
27385      new_path="$input_path"
27386    fi
27387  fi
27388
27389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27390  if test "x$test_cygdrive_prefix" = x; then
27391    # As a simple fix, exclude /usr/bin since it's not a real path.
27392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27394      # a path prefixed by /cygdrive for fixpath to work.
27395      new_path="$CYGWIN_ROOT_PATH$input_path"
27396    fi
27397  fi
27398
27399  # remove trailing .exe if any
27400  new_path="${new_path/%.exe/}"
27401
27402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27403
27404  # First separate the path from the arguments. This will split at the first
27405  # space.
27406  complete="$VS_ENV_CMD"
27407  path="${complete%% *}"
27408  tmp="$complete EOL"
27409  arguments="${tmp#* }"
27410
27411  # Input might be given as Windows format, start by converting to
27412  # unix format.
27413  new_path="$path"
27414
27415  windows_path="$new_path"
27416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27417    unix_path=`$CYGPATH -u "$windows_path"`
27418    new_path="$unix_path"
27419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27421    new_path="$unix_path"
27422  fi
27423
27424
27425  # Now try to locate executable using which
27426  new_path=`$WHICH "$new_path" 2> /dev/null`
27427
27428  if test "x$new_path" = x; then
27429    # Oops. Which didn't find the executable.
27430    # The splitting of arguments from the executable at a space might have been incorrect,
27431    # since paths with space are more likely in Windows. Give it another try with the whole
27432    # argument.
27433    path="$complete"
27434    arguments="EOL"
27435    new_path="$path"
27436
27437  windows_path="$new_path"
27438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27439    unix_path=`$CYGPATH -u "$windows_path"`
27440    new_path="$unix_path"
27441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27443    new_path="$unix_path"
27444  fi
27445
27446
27447    new_path=`$WHICH "$new_path" 2> /dev/null`
27448    # bat and cmd files are not always considered executable in MSYS causing which
27449    # to not find them
27450    if test "x$new_path" = x \
27451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27453      new_path="$path"
27454
27455  windows_path="$new_path"
27456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27457    unix_path=`$CYGPATH -u "$windows_path"`
27458    new_path="$unix_path"
27459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27461    new_path="$unix_path"
27462  fi
27463
27464    fi
27465
27466    if test "x$new_path" = x; then
27467      # It's still not found. Now this is an unrecoverable error.
27468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27469$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27470      has_space=`$ECHO "$complete" | $GREP " "`
27471      if test "x$has_space" != x; then
27472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27474      fi
27475      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27476    fi
27477  fi
27478
27479  # Now new_path has a complete unix path to the binary
27480  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27481    # Keep paths in /bin as-is, but remove trailing .exe if any
27482    new_path="${new_path/%.exe/}"
27483    # Do not save /bin paths to all_fixpath_prefixes!
27484  else
27485    # Not in mixed or Windows style, start by that.
27486    new_path=`cmd //c echo $new_path`
27487
27488  input_path="$new_path"
27489  # Check if we need to convert this using DOS-style short mode. If the path
27490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27491  # take no chances and rewrite it.
27492  # Note: m4 eats our [], so we need to use [ and ] instead.
27493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27494  if test "x$has_forbidden_chars" != x; then
27495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27497  fi
27498
27499    # Output is in $new_path
27500
27501  windows_path="$new_path"
27502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27503    unix_path=`$CYGPATH -u "$windows_path"`
27504    new_path="$unix_path"
27505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27507    new_path="$unix_path"
27508  fi
27509
27510    # remove trailing .exe if any
27511    new_path="${new_path/%.exe/}"
27512
27513    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27514    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27515  fi
27516
27517  else
27518    # We're on a posix platform. Hooray! :)
27519    # First separate the path from the arguments. This will split at the first
27520    # space.
27521    complete="$VS_ENV_CMD"
27522    path="${complete%% *}"
27523    tmp="$complete EOL"
27524    arguments="${tmp#* }"
27525
27526    # Cannot rely on the command "which" here since it doesn't always work.
27527    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27528    if test -z "$is_absolute_path"; then
27529      # Path to executable is not absolute. Find it.
27530      IFS_save="$IFS"
27531      IFS=:
27532      for p in $PATH; do
27533        if test -f "$p/$path" && test -x "$p/$path"; then
27534          new_path="$p/$path"
27535          break
27536        fi
27537      done
27538      IFS="$IFS_save"
27539    else
27540      # This is an absolute path, we can use it without further modifications.
27541      new_path="$path"
27542    fi
27543
27544    if test "x$new_path" = x; then
27545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27546$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27547      has_space=`$ECHO "$complete" | $GREP " "`
27548      if test "x$has_space" != x; then
27549        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27551      fi
27552      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27553    fi
27554  fi
27555
27556  # Now join together the path and the arguments once again
27557  if test "x$arguments" != xEOL; then
27558    new_complete="$new_path ${arguments% *}"
27559  else
27560    new_complete="$new_path"
27561  fi
27562
27563  if test "x$complete" != "x$new_complete"; then
27564    VS_ENV_CMD="$new_complete"
27565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27566$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27567  fi
27568
27569
27570    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27571    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27572$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27573
27574    # We need to create a couple of temporary files.
27575    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27576    $MKDIR -p $VS_ENV_TMP_DIR
27577
27578    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27579    # Instead create a shell script which will set the relevant variables when run.
27580    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27581
27582  unix_path="$WINPATH_VS_ENV_CMD"
27583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27584    windows_path=`$CYGPATH -m "$unix_path"`
27585    WINPATH_VS_ENV_CMD="$windows_path"
27586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27587    windows_path=`cmd //c echo $unix_path`
27588    WINPATH_VS_ENV_CMD="$windows_path"
27589  fi
27590
27591    WINPATH_BASH="$BASH"
27592
27593  unix_path="$WINPATH_BASH"
27594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27595    windows_path=`$CYGPATH -m "$unix_path"`
27596    WINPATH_BASH="$windows_path"
27597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27598    windows_path=`cmd //c echo $unix_path`
27599    WINPATH_BASH="$windows_path"
27600  fi
27601
27602
27603    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27604    # script (executable by bash) that will setup the important variables.
27605    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27606    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27607    # This will end up something like:
27608    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27609    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27610    # These will end up something like:
27611    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27612    # The trailing space for everyone except PATH is no typo, but is needed due
27613    # to trailing \ in the Windows paths. These will be stripped later.
27614    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27615    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27616    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27617    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27618    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27619    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27620
27621    # Now execute the newly created bat file.
27622    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27623    # Change directory so we don't need to mess with Windows paths in redirects.
27624    cd $VS_ENV_TMP_DIR
27625    cmd /c extract-vs-env.bat | $CAT
27626    cd $CURDIR
27627
27628    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27629      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27630$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27631      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27632$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27633      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27634$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27635      as_fn_error $? "Cannot continue" "$LINENO" 5
27636    fi
27637
27638    # Now set all paths and other env variables. This will allow the rest of
27639    # the configure script to find and run the compiler in the proper way.
27640    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27641$as_echo "$as_me: Setting extracted environment variables" >&6;}
27642    . $VS_ENV_TMP_DIR/set-vs-env.sh
27643    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27644    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27645  else
27646    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27647    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27648$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27649  fi
27650
27651  # At this point, we should have correct variables in the environment, or we can't continue.
27652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27653$as_echo_n "checking for Visual Studio variables... " >&6; }
27654
27655  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27656    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27658$as_echo "present but broken" >&6; }
27659      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27660    else
27661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27662$as_echo "ok" >&6; }
27663      # Remove any trailing "\" and " " from the variables.
27664      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27665      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27666      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27667      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27668      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27669      # Remove any paths containing # (typically F#) as that messes up make. This
27670      # is needed if visual studio was installed with F# support.
27671      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27672
27673
27674
27675
27676    fi
27677  else
27678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27679$as_echo "not found" >&6; }
27680
27681    if test "x$VS_ENV_CMD" = x; then
27682      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27683$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27684      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27685$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27686    else
27687      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27688$as_echo "$as_me: Running the extraction script failed." >&6;}
27689    fi
27690    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27691$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27692    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27693$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27694    as_fn_error $? "Cannot continue" "$LINENO" 5
27695  fi
27696
27697    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27698    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27699    PATH="$VS_PATH"
27700    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27701    export INCLUDE="$VS_INCLUDE"
27702    export LIB="$VS_LIB"
27703  fi
27704
27705  # autoconf magic only relies on PATH, so update it if tools dir is specified
27706  OLD_PATH="$PATH"
27707
27708  # For solaris we really need solaris tools, and not the GNU equivalent.
27709  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27710  # so add that to path before starting to probe.
27711  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27712  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27713    PATH="/usr/ccs/bin:$PATH"
27714  fi
27715
27716  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27717  # override all other locations.
27718  if test "x$TOOLCHAIN_PATH" != x; then
27719    PATH=$TOOLCHAIN_PATH:$PATH
27720  fi
27721
27722
27723  #
27724  # Setup the compilers (CC and CXX)
27725  #
27726
27727  COMPILER_NAME=C
27728  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27729
27730  if test "x$CC" != x; then
27731    # User has supplied compiler name already, always let that override.
27732    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27733$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27734    if test "x`basename $CC`" = "x$CC"; then
27735      # A command without a complete path is provided, search $PATH.
27736
27737      for ac_prog in $CC
27738do
27739  # Extract the first word of "$ac_prog", so it can be a program name with args.
27740set dummy $ac_prog; ac_word=$2
27741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27742$as_echo_n "checking for $ac_word... " >&6; }
27743if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27744  $as_echo_n "(cached) " >&6
27745else
27746  case $POTENTIAL_CC in
27747  [\\/]* | ?:[\\/]*)
27748  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27749  ;;
27750  *)
27751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27752for as_dir in $PATH
27753do
27754  IFS=$as_save_IFS
27755  test -z "$as_dir" && as_dir=.
27756    for ac_exec_ext in '' $ac_executable_extensions; do
27757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27758    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27760    break 2
27761  fi
27762done
27763  done
27764IFS=$as_save_IFS
27765
27766  ;;
27767esac
27768fi
27769POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27770if test -n "$POTENTIAL_CC"; then
27771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27772$as_echo "$POTENTIAL_CC" >&6; }
27773else
27774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27775$as_echo "no" >&6; }
27776fi
27777
27778
27779  test -n "$POTENTIAL_CC" && break
27780done
27781
27782      if test "x$POTENTIAL_CC" != x; then
27783        CC=$POTENTIAL_CC
27784      else
27785        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27786      fi
27787    else
27788      # Otherwise it might already be a complete path
27789      if test ! -x "$CC"; then
27790        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27791      fi
27792    fi
27793  else
27794    # No user supplied value. Locate compiler ourselves.
27795
27796    # If we are cross compiling, assume cross compilation tools follows the
27797    # cross compilation standard where they are prefixed with the autoconf
27798    # standard name for the target. For example the binary
27799    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27800    # If we are not cross compiling, then the default compiler name will be
27801    # used.
27802
27803    CC=
27804    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27805    # before checking the rest of the PATH.
27806    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27807    # step, this should not be necessary.
27808    if test -n "$TOOLCHAIN_PATH"; then
27809      PATH_save="$PATH"
27810      PATH="$TOOLCHAIN_PATH"
27811      for ac_prog in $SEARCH_LIST
27812do
27813  # Extract the first word of "$ac_prog", so it can be a program name with args.
27814set dummy $ac_prog; ac_word=$2
27815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27816$as_echo_n "checking for $ac_word... " >&6; }
27817if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27818  $as_echo_n "(cached) " >&6
27819else
27820  case $TOOLCHAIN_PATH_CC in
27821  [\\/]* | ?:[\\/]*)
27822  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27823  ;;
27824  *)
27825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27826for as_dir in $PATH
27827do
27828  IFS=$as_save_IFS
27829  test -z "$as_dir" && as_dir=.
27830    for ac_exec_ext in '' $ac_executable_extensions; do
27831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27832    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27834    break 2
27835  fi
27836done
27837  done
27838IFS=$as_save_IFS
27839
27840  ;;
27841esac
27842fi
27843TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27844if test -n "$TOOLCHAIN_PATH_CC"; then
27845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27846$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27847else
27848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27849$as_echo "no" >&6; }
27850fi
27851
27852
27853  test -n "$TOOLCHAIN_PATH_CC" && break
27854done
27855
27856      CC=$TOOLCHAIN_PATH_CC
27857      PATH="$PATH_save"
27858    fi
27859
27860    # AC_PATH_PROGS can't be run multiple times with the same variable,
27861    # so create a new name for this run.
27862    if test "x$CC" = x; then
27863      for ac_prog in $SEARCH_LIST
27864do
27865  # Extract the first word of "$ac_prog", so it can be a program name with args.
27866set dummy $ac_prog; ac_word=$2
27867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27868$as_echo_n "checking for $ac_word... " >&6; }
27869if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27870  $as_echo_n "(cached) " >&6
27871else
27872  case $POTENTIAL_CC in
27873  [\\/]* | ?:[\\/]*)
27874  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27875  ;;
27876  *)
27877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27878for as_dir in $PATH
27879do
27880  IFS=$as_save_IFS
27881  test -z "$as_dir" && as_dir=.
27882    for ac_exec_ext in '' $ac_executable_extensions; do
27883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27884    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27886    break 2
27887  fi
27888done
27889  done
27890IFS=$as_save_IFS
27891
27892  ;;
27893esac
27894fi
27895POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27896if test -n "$POTENTIAL_CC"; then
27897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27898$as_echo "$POTENTIAL_CC" >&6; }
27899else
27900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27901$as_echo "no" >&6; }
27902fi
27903
27904
27905  test -n "$POTENTIAL_CC" && break
27906done
27907
27908      CC=$POTENTIAL_CC
27909    fi
27910
27911    if test "x$CC" = x; then
27912
27913  # Print a helpful message on how to acquire the necessary build dependency.
27914  # devkit is the help tag: freetype, cups, pulse, alsa etc
27915  MISSING_DEPENDENCY=devkit
27916
27917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27918    cygwin_help $MISSING_DEPENDENCY
27919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27920    msys_help $MISSING_DEPENDENCY
27921  else
27922    PKGHANDLER_COMMAND=
27923
27924    case $PKGHANDLER in
27925      apt-get)
27926        apt_help     $MISSING_DEPENDENCY ;;
27927      yum)
27928        yum_help     $MISSING_DEPENDENCY ;;
27929      port)
27930        port_help    $MISSING_DEPENDENCY ;;
27931      pkgutil)
27932        pkgutil_help $MISSING_DEPENDENCY ;;
27933      pkgadd)
27934        pkgadd_help  $MISSING_DEPENDENCY ;;
27935    esac
27936
27937    if test "x$PKGHANDLER_COMMAND" != x; then
27938      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27939    fi
27940  fi
27941
27942      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27943    fi
27944  fi
27945
27946  # Now we have a compiler binary in CC. Make sure it's okay.
27947
27948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27949
27950  # First separate the path from the arguments. This will split at the first
27951  # space.
27952  complete="$CC"
27953  path="${complete%% *}"
27954  tmp="$complete EOL"
27955  arguments="${tmp#* }"
27956
27957  # Input might be given as Windows format, start by converting to
27958  # unix format.
27959  new_path=`$CYGPATH -u "$path"`
27960
27961  # Now try to locate executable using which
27962  new_path=`$WHICH "$new_path" 2> /dev/null`
27963  # bat and cmd files are not always considered executable in cygwin causing which
27964  # to not find them
27965  if test "x$new_path" = x \
27966      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27967      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27968    new_path=`$CYGPATH -u "$path"`
27969  fi
27970  if test "x$new_path" = x; then
27971    # Oops. Which didn't find the executable.
27972    # The splitting of arguments from the executable at a space might have been incorrect,
27973    # since paths with space are more likely in Windows. Give it another try with the whole
27974    # argument.
27975    path="$complete"
27976    arguments="EOL"
27977    new_path=`$CYGPATH -u "$path"`
27978    new_path=`$WHICH "$new_path" 2> /dev/null`
27979    # bat and cmd files are not always considered executable in cygwin causing which
27980    # to not find them
27981    if test "x$new_path" = x \
27982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27984      new_path=`$CYGPATH -u "$path"`
27985    fi
27986    if test "x$new_path" = x; then
27987      # It's still not found. Now this is an unrecoverable error.
27988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27989$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27990      has_space=`$ECHO "$complete" | $GREP " "`
27991      if test "x$has_space" != x; then
27992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27994      fi
27995      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27996    fi
27997  fi
27998
27999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28002  # "foo.exe" is OK but "foo" is an error.
28003  #
28004  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28005  # It is also a way to make sure we got the proper file name for the real test later on.
28006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28007  if test "x$test_shortpath" = x; then
28008    # Short path failed, file does not exist as specified.
28009    # Try adding .exe or .cmd
28010    if test -f "${new_path}.exe"; then
28011      input_to_shortpath="${new_path}.exe"
28012    elif test -f "${new_path}.cmd"; then
28013      input_to_shortpath="${new_path}.cmd"
28014    else
28015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28016$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28017      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28018$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28019      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28020    fi
28021  else
28022    input_to_shortpath="$new_path"
28023  fi
28024
28025  # Call helper function which possibly converts this using DOS-style short mode.
28026  # If so, the updated path is stored in $new_path.
28027  new_path="$input_to_shortpath"
28028
28029  input_path="$input_to_shortpath"
28030  # Check if we need to convert this using DOS-style short mode. If the path
28031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28032  # take no chances and rewrite it.
28033  # Note: m4 eats our [], so we need to use [ and ] instead.
28034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28035  if test "x$has_forbidden_chars" != x; then
28036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28040      # Going to short mode and back again did indeed matter. Since short mode is
28041      # case insensitive, let's make it lowercase to improve readability.
28042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28043      # Now convert it back to Unix-stile (cygpath)
28044      input_path=`$CYGPATH -u "$shortmode_path"`
28045      new_path="$input_path"
28046    fi
28047  fi
28048
28049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28050  if test "x$test_cygdrive_prefix" = x; then
28051    # As a simple fix, exclude /usr/bin since it's not a real path.
28052    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28054      # a path prefixed by /cygdrive for fixpath to work.
28055      new_path="$CYGWIN_ROOT_PATH$input_path"
28056    fi
28057  fi
28058
28059  # remove trailing .exe if any
28060  new_path="${new_path/%.exe/}"
28061
28062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28063
28064  # First separate the path from the arguments. This will split at the first
28065  # space.
28066  complete="$CC"
28067  path="${complete%% *}"
28068  tmp="$complete EOL"
28069  arguments="${tmp#* }"
28070
28071  # Input might be given as Windows format, start by converting to
28072  # unix format.
28073  new_path="$path"
28074
28075  windows_path="$new_path"
28076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28077    unix_path=`$CYGPATH -u "$windows_path"`
28078    new_path="$unix_path"
28079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28081    new_path="$unix_path"
28082  fi
28083
28084
28085  # Now try to locate executable using which
28086  new_path=`$WHICH "$new_path" 2> /dev/null`
28087
28088  if test "x$new_path" = x; then
28089    # Oops. Which didn't find the executable.
28090    # The splitting of arguments from the executable at a space might have been incorrect,
28091    # since paths with space are more likely in Windows. Give it another try with the whole
28092    # argument.
28093    path="$complete"
28094    arguments="EOL"
28095    new_path="$path"
28096
28097  windows_path="$new_path"
28098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28099    unix_path=`$CYGPATH -u "$windows_path"`
28100    new_path="$unix_path"
28101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28103    new_path="$unix_path"
28104  fi
28105
28106
28107    new_path=`$WHICH "$new_path" 2> /dev/null`
28108    # bat and cmd files are not always considered executable in MSYS causing which
28109    # to not find them
28110    if test "x$new_path" = x \
28111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28113      new_path="$path"
28114
28115  windows_path="$new_path"
28116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28117    unix_path=`$CYGPATH -u "$windows_path"`
28118    new_path="$unix_path"
28119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28121    new_path="$unix_path"
28122  fi
28123
28124    fi
28125
28126    if test "x$new_path" = x; then
28127      # It's still not found. Now this is an unrecoverable error.
28128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28129$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28130      has_space=`$ECHO "$complete" | $GREP " "`
28131      if test "x$has_space" != x; then
28132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28134      fi
28135      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28136    fi
28137  fi
28138
28139  # Now new_path has a complete unix path to the binary
28140  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28141    # Keep paths in /bin as-is, but remove trailing .exe if any
28142    new_path="${new_path/%.exe/}"
28143    # Do not save /bin paths to all_fixpath_prefixes!
28144  else
28145    # Not in mixed or Windows style, start by that.
28146    new_path=`cmd //c echo $new_path`
28147
28148  input_path="$new_path"
28149  # Check if we need to convert this using DOS-style short mode. If the path
28150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28151  # take no chances and rewrite it.
28152  # Note: m4 eats our [], so we need to use [ and ] instead.
28153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28154  if test "x$has_forbidden_chars" != x; then
28155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28157  fi
28158
28159    # Output is in $new_path
28160
28161  windows_path="$new_path"
28162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28163    unix_path=`$CYGPATH -u "$windows_path"`
28164    new_path="$unix_path"
28165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28167    new_path="$unix_path"
28168  fi
28169
28170    # remove trailing .exe if any
28171    new_path="${new_path/%.exe/}"
28172
28173    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28174    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28175  fi
28176
28177  else
28178    # We're on a posix platform. Hooray! :)
28179    # First separate the path from the arguments. This will split at the first
28180    # space.
28181    complete="$CC"
28182    path="${complete%% *}"
28183    tmp="$complete EOL"
28184    arguments="${tmp#* }"
28185
28186    # Cannot rely on the command "which" here since it doesn't always work.
28187    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28188    if test -z "$is_absolute_path"; then
28189      # Path to executable is not absolute. Find it.
28190      IFS_save="$IFS"
28191      IFS=:
28192      for p in $PATH; do
28193        if test -f "$p/$path" && test -x "$p/$path"; then
28194          new_path="$p/$path"
28195          break
28196        fi
28197      done
28198      IFS="$IFS_save"
28199    else
28200      # This is an absolute path, we can use it without further modifications.
28201      new_path="$path"
28202    fi
28203
28204    if test "x$new_path" = x; then
28205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28206$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28207      has_space=`$ECHO "$complete" | $GREP " "`
28208      if test "x$has_space" != x; then
28209        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28210$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28211      fi
28212      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28213    fi
28214  fi
28215
28216  # Now join together the path and the arguments once again
28217  if test "x$arguments" != xEOL; then
28218    new_complete="$new_path ${arguments% *}"
28219  else
28220    new_complete="$new_path"
28221  fi
28222
28223  if test "x$complete" != "x$new_complete"; then
28224    CC="$new_complete"
28225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28226$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28227  fi
28228
28229  TEST_COMPILER="$CC"
28230  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28231  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28232  if test "x$OPENJDK_BUILD_OS" != xaix; then
28233    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28235$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28236
28237  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28238    # Follow a chain of symbolic links. Use readlink
28239    # where it exists, else fall back to horribly
28240    # complicated shell code.
28241    if test "x$READLINK_TESTED" != yes; then
28242      # On MacOSX there is a readlink tool with a different
28243      # purpose than the GNU readlink tool. Check the found readlink.
28244      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28245      if test "x$ISGNU" = x; then
28246        # A readlink that we do not know how to use.
28247        # Are there other non-GNU readlinks out there?
28248        READLINK_TESTED=yes
28249        READLINK=
28250      fi
28251    fi
28252
28253    if test "x$READLINK" != x; then
28254      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28255    else
28256      # Save the current directory for restoring afterwards
28257      STARTDIR=$PWD
28258      COUNTER=0
28259      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28260      sym_link_file=`$BASENAME $TEST_COMPILER`
28261      cd $sym_link_dir
28262      # Use -P flag to resolve symlinks in directories.
28263      cd `$THEPWDCMD -P`
28264      sym_link_dir=`$THEPWDCMD -P`
28265      # Resolve file symlinks
28266      while test $COUNTER -lt 20; do
28267        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28268        if test "x$ISLINK" == x; then
28269          # This is not a symbolic link! We are done!
28270          break
28271        fi
28272        # Again resolve directory symlinks since the target of the just found
28273        # link could be in a different directory
28274        cd `$DIRNAME $ISLINK`
28275        sym_link_dir=`$THEPWDCMD -P`
28276        sym_link_file=`$BASENAME $ISLINK`
28277        let COUNTER=COUNTER+1
28278      done
28279      cd $STARTDIR
28280      TEST_COMPILER=$sym_link_dir/$sym_link_file
28281    fi
28282  fi
28283
28284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28285$as_echo "$TEST_COMPILER" >&6; }
28286  fi
28287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28288$as_echo_n "checking if CC is disguised ccache... " >&6; }
28289
28290  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28291  if test "x$COMPILER_BASENAME" = "xccache"; then
28292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28293$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28294    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28295    # We want to control ccache invocation ourselves, so ignore this cc and try
28296    # searching again.
28297
28298    # Remove the path to the fake ccache cc from the PATH
28299    RETRY_COMPILER_SAVED_PATH="$PATH"
28300    COMPILER_DIRNAME=`$DIRNAME $CC`
28301    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28302
28303    # Try again looking for our compiler
28304    if test -n "$ac_tool_prefix"; then
28305  for ac_prog in $TOOLCHAIN_CC_BINARY
28306  do
28307    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28308set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28310$as_echo_n "checking for $ac_word... " >&6; }
28311if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28312  $as_echo_n "(cached) " >&6
28313else
28314  if test -n "$PROPER_COMPILER_CC"; then
28315  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28316else
28317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28318for as_dir in $PATH
28319do
28320  IFS=$as_save_IFS
28321  test -z "$as_dir" && as_dir=.
28322    for ac_exec_ext in '' $ac_executable_extensions; do
28323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28324    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28326    break 2
28327  fi
28328done
28329  done
28330IFS=$as_save_IFS
28331
28332fi
28333fi
28334PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28335if test -n "$PROPER_COMPILER_CC"; then
28336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28337$as_echo "$PROPER_COMPILER_CC" >&6; }
28338else
28339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28340$as_echo "no" >&6; }
28341fi
28342
28343
28344    test -n "$PROPER_COMPILER_CC" && break
28345  done
28346fi
28347if test -z "$PROPER_COMPILER_CC"; then
28348  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28349  for ac_prog in $TOOLCHAIN_CC_BINARY
28350do
28351  # Extract the first word of "$ac_prog", so it can be a program name with args.
28352set dummy $ac_prog; ac_word=$2
28353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28354$as_echo_n "checking for $ac_word... " >&6; }
28355if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28356  $as_echo_n "(cached) " >&6
28357else
28358  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28359  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28360else
28361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28362for as_dir in $PATH
28363do
28364  IFS=$as_save_IFS
28365  test -z "$as_dir" && as_dir=.
28366    for ac_exec_ext in '' $ac_executable_extensions; do
28367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28368    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28370    break 2
28371  fi
28372done
28373  done
28374IFS=$as_save_IFS
28375
28376fi
28377fi
28378ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28379if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28381$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28382else
28383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28384$as_echo "no" >&6; }
28385fi
28386
28387
28388  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28389done
28390
28391  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28392    PROPER_COMPILER_CC=""
28393  else
28394    case $cross_compiling:$ac_tool_warned in
28395yes:)
28396{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28397$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28398ac_tool_warned=yes ;;
28399esac
28400    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28401  fi
28402fi
28403
28404
28405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28406
28407  # First separate the path from the arguments. This will split at the first
28408  # space.
28409  complete="$PROPER_COMPILER_CC"
28410  path="${complete%% *}"
28411  tmp="$complete EOL"
28412  arguments="${tmp#* }"
28413
28414  # Input might be given as Windows format, start by converting to
28415  # unix format.
28416  new_path=`$CYGPATH -u "$path"`
28417
28418  # Now try to locate executable using which
28419  new_path=`$WHICH "$new_path" 2> /dev/null`
28420  # bat and cmd files are not always considered executable in cygwin causing which
28421  # to not find them
28422  if test "x$new_path" = x \
28423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28425    new_path=`$CYGPATH -u "$path"`
28426  fi
28427  if test "x$new_path" = x; then
28428    # Oops. Which didn't find the executable.
28429    # The splitting of arguments from the executable at a space might have been incorrect,
28430    # since paths with space are more likely in Windows. Give it another try with the whole
28431    # argument.
28432    path="$complete"
28433    arguments="EOL"
28434    new_path=`$CYGPATH -u "$path"`
28435    new_path=`$WHICH "$new_path" 2> /dev/null`
28436    # bat and cmd files are not always considered executable in cygwin causing which
28437    # to not find them
28438    if test "x$new_path" = x \
28439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28441      new_path=`$CYGPATH -u "$path"`
28442    fi
28443    if test "x$new_path" = x; then
28444      # It's still not found. Now this is an unrecoverable error.
28445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28446$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28447      has_space=`$ECHO "$complete" | $GREP " "`
28448      if test "x$has_space" != x; then
28449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28451      fi
28452      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28453    fi
28454  fi
28455
28456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28459  # "foo.exe" is OK but "foo" is an error.
28460  #
28461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28462  # It is also a way to make sure we got the proper file name for the real test later on.
28463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28464  if test "x$test_shortpath" = x; then
28465    # Short path failed, file does not exist as specified.
28466    # Try adding .exe or .cmd
28467    if test -f "${new_path}.exe"; then
28468      input_to_shortpath="${new_path}.exe"
28469    elif test -f "${new_path}.cmd"; then
28470      input_to_shortpath="${new_path}.cmd"
28471    else
28472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28473$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28476      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28477    fi
28478  else
28479    input_to_shortpath="$new_path"
28480  fi
28481
28482  # Call helper function which possibly converts this using DOS-style short mode.
28483  # If so, the updated path is stored in $new_path.
28484  new_path="$input_to_shortpath"
28485
28486  input_path="$input_to_shortpath"
28487  # Check if we need to convert this using DOS-style short mode. If the path
28488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28489  # take no chances and rewrite it.
28490  # Note: m4 eats our [], so we need to use [ and ] instead.
28491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28492  if test "x$has_forbidden_chars" != x; then
28493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28497      # Going to short mode and back again did indeed matter. Since short mode is
28498      # case insensitive, let's make it lowercase to improve readability.
28499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28500      # Now convert it back to Unix-stile (cygpath)
28501      input_path=`$CYGPATH -u "$shortmode_path"`
28502      new_path="$input_path"
28503    fi
28504  fi
28505
28506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28507  if test "x$test_cygdrive_prefix" = x; then
28508    # As a simple fix, exclude /usr/bin since it's not a real path.
28509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28511      # a path prefixed by /cygdrive for fixpath to work.
28512      new_path="$CYGWIN_ROOT_PATH$input_path"
28513    fi
28514  fi
28515
28516  # remove trailing .exe if any
28517  new_path="${new_path/%.exe/}"
28518
28519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28520
28521  # First separate the path from the arguments. This will split at the first
28522  # space.
28523  complete="$PROPER_COMPILER_CC"
28524  path="${complete%% *}"
28525  tmp="$complete EOL"
28526  arguments="${tmp#* }"
28527
28528  # Input might be given as Windows format, start by converting to
28529  # unix format.
28530  new_path="$path"
28531
28532  windows_path="$new_path"
28533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28534    unix_path=`$CYGPATH -u "$windows_path"`
28535    new_path="$unix_path"
28536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28538    new_path="$unix_path"
28539  fi
28540
28541
28542  # Now try to locate executable using which
28543  new_path=`$WHICH "$new_path" 2> /dev/null`
28544
28545  if test "x$new_path" = x; then
28546    # Oops. Which didn't find the executable.
28547    # The splitting of arguments from the executable at a space might have been incorrect,
28548    # since paths with space are more likely in Windows. Give it another try with the whole
28549    # argument.
28550    path="$complete"
28551    arguments="EOL"
28552    new_path="$path"
28553
28554  windows_path="$new_path"
28555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28556    unix_path=`$CYGPATH -u "$windows_path"`
28557    new_path="$unix_path"
28558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28560    new_path="$unix_path"
28561  fi
28562
28563
28564    new_path=`$WHICH "$new_path" 2> /dev/null`
28565    # bat and cmd files are not always considered executable in MSYS causing which
28566    # to not find them
28567    if test "x$new_path" = x \
28568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28570      new_path="$path"
28571
28572  windows_path="$new_path"
28573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28574    unix_path=`$CYGPATH -u "$windows_path"`
28575    new_path="$unix_path"
28576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28578    new_path="$unix_path"
28579  fi
28580
28581    fi
28582
28583    if test "x$new_path" = x; then
28584      # It's still not found. Now this is an unrecoverable error.
28585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28586$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28587      has_space=`$ECHO "$complete" | $GREP " "`
28588      if test "x$has_space" != x; then
28589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28591      fi
28592      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28593    fi
28594  fi
28595
28596  # Now new_path has a complete unix path to the binary
28597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28598    # Keep paths in /bin as-is, but remove trailing .exe if any
28599    new_path="${new_path/%.exe/}"
28600    # Do not save /bin paths to all_fixpath_prefixes!
28601  else
28602    # Not in mixed or Windows style, start by that.
28603    new_path=`cmd //c echo $new_path`
28604
28605  input_path="$new_path"
28606  # Check if we need to convert this using DOS-style short mode. If the path
28607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28608  # take no chances and rewrite it.
28609  # Note: m4 eats our [], so we need to use [ and ] instead.
28610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28611  if test "x$has_forbidden_chars" != x; then
28612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28614  fi
28615
28616    # Output is in $new_path
28617
28618  windows_path="$new_path"
28619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28620    unix_path=`$CYGPATH -u "$windows_path"`
28621    new_path="$unix_path"
28622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28624    new_path="$unix_path"
28625  fi
28626
28627    # remove trailing .exe if any
28628    new_path="${new_path/%.exe/}"
28629
28630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28632  fi
28633
28634  else
28635    # We're on a posix platform. Hooray! :)
28636    # First separate the path from the arguments. This will split at the first
28637    # space.
28638    complete="$PROPER_COMPILER_CC"
28639    path="${complete%% *}"
28640    tmp="$complete EOL"
28641    arguments="${tmp#* }"
28642
28643    # Cannot rely on the command "which" here since it doesn't always work.
28644    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28645    if test -z "$is_absolute_path"; then
28646      # Path to executable is not absolute. Find it.
28647      IFS_save="$IFS"
28648      IFS=:
28649      for p in $PATH; do
28650        if test -f "$p/$path" && test -x "$p/$path"; then
28651          new_path="$p/$path"
28652          break
28653        fi
28654      done
28655      IFS="$IFS_save"
28656    else
28657      # This is an absolute path, we can use it without further modifications.
28658      new_path="$path"
28659    fi
28660
28661    if test "x$new_path" = x; then
28662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28663$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28664      has_space=`$ECHO "$complete" | $GREP " "`
28665      if test "x$has_space" != x; then
28666        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28668      fi
28669      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28670    fi
28671  fi
28672
28673  # Now join together the path and the arguments once again
28674  if test "x$arguments" != xEOL; then
28675    new_complete="$new_path ${arguments% *}"
28676  else
28677    new_complete="$new_path"
28678  fi
28679
28680  if test "x$complete" != "x$new_complete"; then
28681    PROPER_COMPILER_CC="$new_complete"
28682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28683$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28684  fi
28685
28686    PATH="$RETRY_COMPILER_SAVED_PATH"
28687
28688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28689$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28690
28691  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28692    # Follow a chain of symbolic links. Use readlink
28693    # where it exists, else fall back to horribly
28694    # complicated shell code.
28695    if test "x$READLINK_TESTED" != yes; then
28696      # On MacOSX there is a readlink tool with a different
28697      # purpose than the GNU readlink tool. Check the found readlink.
28698      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28699      if test "x$ISGNU" = x; then
28700        # A readlink that we do not know how to use.
28701        # Are there other non-GNU readlinks out there?
28702        READLINK_TESTED=yes
28703        READLINK=
28704      fi
28705    fi
28706
28707    if test "x$READLINK" != x; then
28708      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28709    else
28710      # Save the current directory for restoring afterwards
28711      STARTDIR=$PWD
28712      COUNTER=0
28713      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28714      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28715      cd $sym_link_dir
28716      # Use -P flag to resolve symlinks in directories.
28717      cd `$THEPWDCMD -P`
28718      sym_link_dir=`$THEPWDCMD -P`
28719      # Resolve file symlinks
28720      while test $COUNTER -lt 20; do
28721        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28722        if test "x$ISLINK" == x; then
28723          # This is not a symbolic link! We are done!
28724          break
28725        fi
28726        # Again resolve directory symlinks since the target of the just found
28727        # link could be in a different directory
28728        cd `$DIRNAME $ISLINK`
28729        sym_link_dir=`$THEPWDCMD -P`
28730        sym_link_file=`$BASENAME $ISLINK`
28731        let COUNTER=COUNTER+1
28732      done
28733      cd $STARTDIR
28734      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28735    fi
28736  fi
28737
28738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28739$as_echo "$PROPER_COMPILER_CC" >&6; }
28740    CC="$PROPER_COMPILER_CC"
28741  else
28742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28743$as_echo "no, keeping CC" >&6; }
28744  fi
28745
28746
28747  COMPILER=$CC
28748  COMPILER_NAME=$COMPILER_NAME
28749
28750  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28751    # cc -V output typically looks like
28752    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28753    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28754    # Check that this is likely to be the Solaris Studio cc.
28755    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28756    if test $? -ne 0; then
28757      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28758      { $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
28759$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28760      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28761$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28762      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28763$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28764      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28765    fi
28766    # Remove usage instructions (if present), and
28767    # collapse compiler output into a single line
28768    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28769        $SED -e 's/ *[Uu]sage:.*//'`
28770    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28771        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28772  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28773    # xlc -qversion output typically looks like
28774    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28775    #     Version: 11.01.0000.0015
28776    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28777    # Check that this is likely to be the IBM XL C compiler.
28778    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28779    if test $? -ne 0; then
28780      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28781      { $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
28782$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28783      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28784$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28785      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28786$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28787      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28788    fi
28789    # Collapse compiler output into a single line
28790    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28791    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28792        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28793  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28794    # There is no specific version flag, but all output starts with a version string.
28795    # First line typically looks something like:
28796    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28797    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28798    # Check that this is likely to be Microsoft CL.EXE.
28799    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28800    if test $? -ne 0; then
28801      { $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
28802$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28803      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28804$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28805      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28806    fi
28807    # Collapse compiler output into a single line
28808    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28809    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28810        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28811  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28812    # gcc --version output typically looks like
28813    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28814    #     Copyright (C) 2013 Free Software Foundation, Inc.
28815    #     This is free software; see the source for copying conditions.  There is NO
28816    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28817    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28818    # Check that this is likely to be GCC.
28819    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28820    if test $? -ne 0; then
28821      { $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
28822$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28823      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28824$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28825      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28826    fi
28827    # Remove Copyright and legalese from version string, and
28828    # collapse into a single line
28829    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28830        $SED -e 's/ *Copyright .*//'`
28831    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28832        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28833  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28834    # clang --version output typically looks like
28835    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28836    #    clang version 3.3 (tags/RELEASE_33/final)
28837    # or
28838    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28839    #    Target: x86_64-pc-linux-gnu
28840    #    Thread model: posix
28841    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28842    # Check that this is likely to be clang
28843    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28844    if test $? -ne 0; then
28845      { $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
28846$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28847      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28848$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28849      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28850    fi
28851    # Collapse compiler output into a single line
28852    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28853    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28854        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28855  else
28856      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28857  fi
28858  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28859  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28860  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28861  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28862
28863  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28864$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28865
28866
28867  # Now that we have resolved CC ourself, let autoconf have its go at it
28868  ac_ext=c
28869ac_cpp='$CPP $CPPFLAGS'
28870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28872ac_compiler_gnu=$ac_cv_c_compiler_gnu
28873if test -n "$ac_tool_prefix"; then
28874  for ac_prog in $CC
28875  do
28876    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28877set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28879$as_echo_n "checking for $ac_word... " >&6; }
28880if ${ac_cv_prog_CC+:} false; then :
28881  $as_echo_n "(cached) " >&6
28882else
28883  if test -n "$CC"; then
28884  ac_cv_prog_CC="$CC" # Let the user override the test.
28885else
28886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28887for as_dir in $PATH
28888do
28889  IFS=$as_save_IFS
28890  test -z "$as_dir" && as_dir=.
28891    for ac_exec_ext in '' $ac_executable_extensions; do
28892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28893    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28895    break 2
28896  fi
28897done
28898  done
28899IFS=$as_save_IFS
28900
28901fi
28902fi
28903CC=$ac_cv_prog_CC
28904if test -n "$CC"; then
28905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28906$as_echo "$CC" >&6; }
28907else
28908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28909$as_echo "no" >&6; }
28910fi
28911
28912
28913    test -n "$CC" && break
28914  done
28915fi
28916if test -z "$CC"; then
28917  ac_ct_CC=$CC
28918  for ac_prog in $CC
28919do
28920  # Extract the first word of "$ac_prog", so it can be a program name with args.
28921set dummy $ac_prog; ac_word=$2
28922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28923$as_echo_n "checking for $ac_word... " >&6; }
28924if ${ac_cv_prog_ac_ct_CC+:} false; then :
28925  $as_echo_n "(cached) " >&6
28926else
28927  if test -n "$ac_ct_CC"; then
28928  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28929else
28930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28931for as_dir in $PATH
28932do
28933  IFS=$as_save_IFS
28934  test -z "$as_dir" && as_dir=.
28935    for ac_exec_ext in '' $ac_executable_extensions; do
28936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28937    ac_cv_prog_ac_ct_CC="$ac_prog"
28938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28939    break 2
28940  fi
28941done
28942  done
28943IFS=$as_save_IFS
28944
28945fi
28946fi
28947ac_ct_CC=$ac_cv_prog_ac_ct_CC
28948if test -n "$ac_ct_CC"; then
28949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28950$as_echo "$ac_ct_CC" >&6; }
28951else
28952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28953$as_echo "no" >&6; }
28954fi
28955
28956
28957  test -n "$ac_ct_CC" && break
28958done
28959
28960  if test "x$ac_ct_CC" = x; then
28961    CC=""
28962  else
28963    case $cross_compiling:$ac_tool_warned in
28964yes:)
28965{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28966$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28967ac_tool_warned=yes ;;
28968esac
28969    CC=$ac_ct_CC
28970  fi
28971fi
28972
28973
28974test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28976as_fn_error $? "no acceptable C compiler found in \$PATH
28977See \`config.log' for more details" "$LINENO" 5; }
28978
28979# Provide some information about the compiler.
28980$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28981set X $ac_compile
28982ac_compiler=$2
28983for ac_option in --version -v -V -qversion; do
28984  { { ac_try="$ac_compiler $ac_option >&5"
28985case "(($ac_try" in
28986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28987  *) ac_try_echo=$ac_try;;
28988esac
28989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28990$as_echo "$ac_try_echo"; } >&5
28991  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28992  ac_status=$?
28993  if test -s conftest.err; then
28994    sed '10a\
28995... rest of stderr output deleted ...
28996         10q' conftest.err >conftest.er1
28997    cat conftest.er1 >&5
28998  fi
28999  rm -f conftest.er1 conftest.err
29000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29001  test $ac_status = 0; }
29002done
29003
29004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29005/* end confdefs.h.  */
29006
29007int
29008main ()
29009{
29010
29011  ;
29012  return 0;
29013}
29014_ACEOF
29015ac_clean_files_save=$ac_clean_files
29016ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29017# Try to create an executable without -o first, disregard a.out.
29018# It will help us diagnose broken compilers, and finding out an intuition
29019# of exeext.
29020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29021$as_echo_n "checking whether the C compiler works... " >&6; }
29022ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29023
29024# The possible output files:
29025ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29026
29027ac_rmfiles=
29028for ac_file in $ac_files
29029do
29030  case $ac_file in
29031    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29032    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29033  esac
29034done
29035rm -f $ac_rmfiles
29036
29037if { { ac_try="$ac_link_default"
29038case "(($ac_try" in
29039  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29040  *) ac_try_echo=$ac_try;;
29041esac
29042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29043$as_echo "$ac_try_echo"; } >&5
29044  (eval "$ac_link_default") 2>&5
29045  ac_status=$?
29046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29047  test $ac_status = 0; }; then :
29048  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29049# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29050# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29051# so that the user can short-circuit this test for compilers unknown to
29052# Autoconf.
29053for ac_file in $ac_files ''
29054do
29055  test -f "$ac_file" || continue
29056  case $ac_file in
29057    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29058	;;
29059    [ab].out )
29060	# We found the default executable, but exeext='' is most
29061	# certainly right.
29062	break;;
29063    *.* )
29064	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29065	then :; else
29066	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29067	fi
29068	# We set ac_cv_exeext here because the later test for it is not
29069	# safe: cross compilers may not add the suffix if given an `-o'
29070	# argument, so we may need to know it at that point already.
29071	# Even if this section looks crufty: it has the advantage of
29072	# actually working.
29073	break;;
29074    * )
29075	break;;
29076  esac
29077done
29078test "$ac_cv_exeext" = no && ac_cv_exeext=
29079
29080else
29081  ac_file=''
29082fi
29083if test -z "$ac_file"; then :
29084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29085$as_echo "no" >&6; }
29086$as_echo "$as_me: failed program was:" >&5
29087sed 's/^/| /' conftest.$ac_ext >&5
29088
29089{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29091as_fn_error 77 "C compiler cannot create executables
29092See \`config.log' for more details" "$LINENO" 5; }
29093else
29094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29095$as_echo "yes" >&6; }
29096fi
29097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29098$as_echo_n "checking for C compiler default output file name... " >&6; }
29099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29100$as_echo "$ac_file" >&6; }
29101ac_exeext=$ac_cv_exeext
29102
29103rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29104ac_clean_files=$ac_clean_files_save
29105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29106$as_echo_n "checking for suffix of executables... " >&6; }
29107if { { ac_try="$ac_link"
29108case "(($ac_try" in
29109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29110  *) ac_try_echo=$ac_try;;
29111esac
29112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29113$as_echo "$ac_try_echo"; } >&5
29114  (eval "$ac_link") 2>&5
29115  ac_status=$?
29116  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29117  test $ac_status = 0; }; then :
29118  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29119# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29120# work properly (i.e., refer to `conftest.exe'), while it won't with
29121# `rm'.
29122for ac_file in conftest.exe conftest conftest.*; do
29123  test -f "$ac_file" || continue
29124  case $ac_file in
29125    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29126    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29127	  break;;
29128    * ) break;;
29129  esac
29130done
29131else
29132  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29134as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29135See \`config.log' for more details" "$LINENO" 5; }
29136fi
29137rm -f conftest conftest$ac_cv_exeext
29138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29139$as_echo "$ac_cv_exeext" >&6; }
29140
29141rm -f conftest.$ac_ext
29142EXEEXT=$ac_cv_exeext
29143ac_exeext=$EXEEXT
29144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29145/* end confdefs.h.  */
29146#include <stdio.h>
29147int
29148main ()
29149{
29150FILE *f = fopen ("conftest.out", "w");
29151 return ferror (f) || fclose (f) != 0;
29152
29153  ;
29154  return 0;
29155}
29156_ACEOF
29157ac_clean_files="$ac_clean_files conftest.out"
29158# Check that the compiler produces executables we can run.  If not, either
29159# the compiler is broken, or we cross compile.
29160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29161$as_echo_n "checking whether we are cross compiling... " >&6; }
29162if test "$cross_compiling" != yes; then
29163  { { ac_try="$ac_link"
29164case "(($ac_try" in
29165  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29166  *) ac_try_echo=$ac_try;;
29167esac
29168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29169$as_echo "$ac_try_echo"; } >&5
29170  (eval "$ac_link") 2>&5
29171  ac_status=$?
29172  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29173  test $ac_status = 0; }
29174  if { ac_try='./conftest$ac_cv_exeext'
29175  { { case "(($ac_try" in
29176  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29177  *) ac_try_echo=$ac_try;;
29178esac
29179eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29180$as_echo "$ac_try_echo"; } >&5
29181  (eval "$ac_try") 2>&5
29182  ac_status=$?
29183  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29184  test $ac_status = 0; }; }; then
29185    cross_compiling=no
29186  else
29187    if test "$cross_compiling" = maybe; then
29188	cross_compiling=yes
29189    else
29190	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29192as_fn_error $? "cannot run C compiled programs.
29193If you meant to cross compile, use \`--host'.
29194See \`config.log' for more details" "$LINENO" 5; }
29195    fi
29196  fi
29197fi
29198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29199$as_echo "$cross_compiling" >&6; }
29200
29201rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29202ac_clean_files=$ac_clean_files_save
29203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29204$as_echo_n "checking for suffix of object files... " >&6; }
29205if ${ac_cv_objext+:} false; then :
29206  $as_echo_n "(cached) " >&6
29207else
29208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29209/* end confdefs.h.  */
29210
29211int
29212main ()
29213{
29214
29215  ;
29216  return 0;
29217}
29218_ACEOF
29219rm -f conftest.o conftest.obj
29220if { { ac_try="$ac_compile"
29221case "(($ac_try" in
29222  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29223  *) ac_try_echo=$ac_try;;
29224esac
29225eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29226$as_echo "$ac_try_echo"; } >&5
29227  (eval "$ac_compile") 2>&5
29228  ac_status=$?
29229  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29230  test $ac_status = 0; }; then :
29231  for ac_file in conftest.o conftest.obj conftest.*; do
29232  test -f "$ac_file" || continue;
29233  case $ac_file in
29234    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29235    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29236       break;;
29237  esac
29238done
29239else
29240  $as_echo "$as_me: failed program was:" >&5
29241sed 's/^/| /' conftest.$ac_ext >&5
29242
29243{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29245as_fn_error $? "cannot compute suffix of object files: cannot compile
29246See \`config.log' for more details" "$LINENO" 5; }
29247fi
29248rm -f conftest.$ac_cv_objext conftest.$ac_ext
29249fi
29250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29251$as_echo "$ac_cv_objext" >&6; }
29252OBJEXT=$ac_cv_objext
29253ac_objext=$OBJEXT
29254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29255$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29256if ${ac_cv_c_compiler_gnu+:} false; then :
29257  $as_echo_n "(cached) " >&6
29258else
29259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29260/* end confdefs.h.  */
29261
29262int
29263main ()
29264{
29265#ifndef __GNUC__
29266       choke me
29267#endif
29268
29269  ;
29270  return 0;
29271}
29272_ACEOF
29273if ac_fn_c_try_compile "$LINENO"; then :
29274  ac_compiler_gnu=yes
29275else
29276  ac_compiler_gnu=no
29277fi
29278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29279ac_cv_c_compiler_gnu=$ac_compiler_gnu
29280
29281fi
29282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29283$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29284if test $ac_compiler_gnu = yes; then
29285  GCC=yes
29286else
29287  GCC=
29288fi
29289ac_test_CFLAGS=${CFLAGS+set}
29290ac_save_CFLAGS=$CFLAGS
29291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29292$as_echo_n "checking whether $CC accepts -g... " >&6; }
29293if ${ac_cv_prog_cc_g+:} false; then :
29294  $as_echo_n "(cached) " >&6
29295else
29296  ac_save_c_werror_flag=$ac_c_werror_flag
29297   ac_c_werror_flag=yes
29298   ac_cv_prog_cc_g=no
29299   CFLAGS="-g"
29300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29301/* end confdefs.h.  */
29302
29303int
29304main ()
29305{
29306
29307  ;
29308  return 0;
29309}
29310_ACEOF
29311if ac_fn_c_try_compile "$LINENO"; then :
29312  ac_cv_prog_cc_g=yes
29313else
29314  CFLAGS=""
29315      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29316/* end confdefs.h.  */
29317
29318int
29319main ()
29320{
29321
29322  ;
29323  return 0;
29324}
29325_ACEOF
29326if ac_fn_c_try_compile "$LINENO"; then :
29327
29328else
29329  ac_c_werror_flag=$ac_save_c_werror_flag
29330	 CFLAGS="-g"
29331	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29332/* end confdefs.h.  */
29333
29334int
29335main ()
29336{
29337
29338  ;
29339  return 0;
29340}
29341_ACEOF
29342if ac_fn_c_try_compile "$LINENO"; then :
29343  ac_cv_prog_cc_g=yes
29344fi
29345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29346fi
29347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29348fi
29349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29350   ac_c_werror_flag=$ac_save_c_werror_flag
29351fi
29352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29353$as_echo "$ac_cv_prog_cc_g" >&6; }
29354if test "$ac_test_CFLAGS" = set; then
29355  CFLAGS=$ac_save_CFLAGS
29356elif test $ac_cv_prog_cc_g = yes; then
29357  if test "$GCC" = yes; then
29358    CFLAGS="-g -O2"
29359  else
29360    CFLAGS="-g"
29361  fi
29362else
29363  if test "$GCC" = yes; then
29364    CFLAGS="-O2"
29365  else
29366    CFLAGS=
29367  fi
29368fi
29369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29370$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29371if ${ac_cv_prog_cc_c89+:} false; then :
29372  $as_echo_n "(cached) " >&6
29373else
29374  ac_cv_prog_cc_c89=no
29375ac_save_CC=$CC
29376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29377/* end confdefs.h.  */
29378#include <stdarg.h>
29379#include <stdio.h>
29380struct stat;
29381/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29382struct buf { int x; };
29383FILE * (*rcsopen) (struct buf *, struct stat *, int);
29384static char *e (p, i)
29385     char **p;
29386     int i;
29387{
29388  return p[i];
29389}
29390static char *f (char * (*g) (char **, int), char **p, ...)
29391{
29392  char *s;
29393  va_list v;
29394  va_start (v,p);
29395  s = g (p, va_arg (v,int));
29396  va_end (v);
29397  return s;
29398}
29399
29400/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29401   function prototypes and stuff, but not '\xHH' hex character constants.
29402   These don't provoke an error unfortunately, instead are silently treated
29403   as 'x'.  The following induces an error, until -std is added to get
29404   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29405   array size at least.  It's necessary to write '\x00'==0 to get something
29406   that's true only with -std.  */
29407int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29408
29409/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29410   inside strings and character constants.  */
29411#define FOO(x) 'x'
29412int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29413
29414int test (int i, double x);
29415struct s1 {int (*f) (int a);};
29416struct s2 {int (*f) (double a);};
29417int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29418int argc;
29419char **argv;
29420int
29421main ()
29422{
29423return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29424  ;
29425  return 0;
29426}
29427_ACEOF
29428for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29429	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29430do
29431  CC="$ac_save_CC $ac_arg"
29432  if ac_fn_c_try_compile "$LINENO"; then :
29433  ac_cv_prog_cc_c89=$ac_arg
29434fi
29435rm -f core conftest.err conftest.$ac_objext
29436  test "x$ac_cv_prog_cc_c89" != "xno" && break
29437done
29438rm -f conftest.$ac_ext
29439CC=$ac_save_CC
29440
29441fi
29442# AC_CACHE_VAL
29443case "x$ac_cv_prog_cc_c89" in
29444  x)
29445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29446$as_echo "none needed" >&6; } ;;
29447  xno)
29448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29449$as_echo "unsupported" >&6; } ;;
29450  *)
29451    CC="$CC $ac_cv_prog_cc_c89"
29452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29453$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29454esac
29455if test "x$ac_cv_prog_cc_c89" != xno; then :
29456
29457fi
29458
29459ac_ext=cpp
29460ac_cpp='$CXXCPP $CPPFLAGS'
29461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29464
29465
29466
29467  COMPILER_NAME=C++
29468  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29469
29470  if test "x$CXX" != x; then
29471    # User has supplied compiler name already, always let that override.
29472    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29473$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29474    if test "x`basename $CXX`" = "x$CXX"; then
29475      # A command without a complete path is provided, search $PATH.
29476
29477      for ac_prog in $CXX
29478do
29479  # Extract the first word of "$ac_prog", so it can be a program name with args.
29480set dummy $ac_prog; ac_word=$2
29481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29482$as_echo_n "checking for $ac_word... " >&6; }
29483if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29484  $as_echo_n "(cached) " >&6
29485else
29486  case $POTENTIAL_CXX in
29487  [\\/]* | ?:[\\/]*)
29488  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29489  ;;
29490  *)
29491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29492for as_dir in $PATH
29493do
29494  IFS=$as_save_IFS
29495  test -z "$as_dir" && as_dir=.
29496    for ac_exec_ext in '' $ac_executable_extensions; do
29497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29498    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29500    break 2
29501  fi
29502done
29503  done
29504IFS=$as_save_IFS
29505
29506  ;;
29507esac
29508fi
29509POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29510if test -n "$POTENTIAL_CXX"; then
29511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29512$as_echo "$POTENTIAL_CXX" >&6; }
29513else
29514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29515$as_echo "no" >&6; }
29516fi
29517
29518
29519  test -n "$POTENTIAL_CXX" && break
29520done
29521
29522      if test "x$POTENTIAL_CXX" != x; then
29523        CXX=$POTENTIAL_CXX
29524      else
29525        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29526      fi
29527    else
29528      # Otherwise it might already be a complete path
29529      if test ! -x "$CXX"; then
29530        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29531      fi
29532    fi
29533  else
29534    # No user supplied value. Locate compiler ourselves.
29535
29536    # If we are cross compiling, assume cross compilation tools follows the
29537    # cross compilation standard where they are prefixed with the autoconf
29538    # standard name for the target. For example the binary
29539    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29540    # If we are not cross compiling, then the default compiler name will be
29541    # used.
29542
29543    CXX=
29544    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29545    # before checking the rest of the PATH.
29546    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29547    # step, this should not be necessary.
29548    if test -n "$TOOLCHAIN_PATH"; then
29549      PATH_save="$PATH"
29550      PATH="$TOOLCHAIN_PATH"
29551      for ac_prog in $SEARCH_LIST
29552do
29553  # Extract the first word of "$ac_prog", so it can be a program name with args.
29554set dummy $ac_prog; ac_word=$2
29555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29556$as_echo_n "checking for $ac_word... " >&6; }
29557if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29558  $as_echo_n "(cached) " >&6
29559else
29560  case $TOOLCHAIN_PATH_CXX in
29561  [\\/]* | ?:[\\/]*)
29562  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29563  ;;
29564  *)
29565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29566for as_dir in $PATH
29567do
29568  IFS=$as_save_IFS
29569  test -z "$as_dir" && as_dir=.
29570    for ac_exec_ext in '' $ac_executable_extensions; do
29571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29572    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29574    break 2
29575  fi
29576done
29577  done
29578IFS=$as_save_IFS
29579
29580  ;;
29581esac
29582fi
29583TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29584if test -n "$TOOLCHAIN_PATH_CXX"; then
29585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29586$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29587else
29588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29589$as_echo "no" >&6; }
29590fi
29591
29592
29593  test -n "$TOOLCHAIN_PATH_CXX" && break
29594done
29595
29596      CXX=$TOOLCHAIN_PATH_CXX
29597      PATH="$PATH_save"
29598    fi
29599
29600    # AC_PATH_PROGS can't be run multiple times with the same variable,
29601    # so create a new name for this run.
29602    if test "x$CXX" = x; then
29603      for ac_prog in $SEARCH_LIST
29604do
29605  # Extract the first word of "$ac_prog", so it can be a program name with args.
29606set dummy $ac_prog; ac_word=$2
29607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29608$as_echo_n "checking for $ac_word... " >&6; }
29609if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29610  $as_echo_n "(cached) " >&6
29611else
29612  case $POTENTIAL_CXX in
29613  [\\/]* | ?:[\\/]*)
29614  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29615  ;;
29616  *)
29617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29618for as_dir in $PATH
29619do
29620  IFS=$as_save_IFS
29621  test -z "$as_dir" && as_dir=.
29622    for ac_exec_ext in '' $ac_executable_extensions; do
29623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29624    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29626    break 2
29627  fi
29628done
29629  done
29630IFS=$as_save_IFS
29631
29632  ;;
29633esac
29634fi
29635POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29636if test -n "$POTENTIAL_CXX"; then
29637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29638$as_echo "$POTENTIAL_CXX" >&6; }
29639else
29640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29641$as_echo "no" >&6; }
29642fi
29643
29644
29645  test -n "$POTENTIAL_CXX" && break
29646done
29647
29648      CXX=$POTENTIAL_CXX
29649    fi
29650
29651    if test "x$CXX" = x; then
29652
29653  # Print a helpful message on how to acquire the necessary build dependency.
29654  # devkit is the help tag: freetype, cups, pulse, alsa etc
29655  MISSING_DEPENDENCY=devkit
29656
29657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29658    cygwin_help $MISSING_DEPENDENCY
29659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29660    msys_help $MISSING_DEPENDENCY
29661  else
29662    PKGHANDLER_COMMAND=
29663
29664    case $PKGHANDLER in
29665      apt-get)
29666        apt_help     $MISSING_DEPENDENCY ;;
29667      yum)
29668        yum_help     $MISSING_DEPENDENCY ;;
29669      port)
29670        port_help    $MISSING_DEPENDENCY ;;
29671      pkgutil)
29672        pkgutil_help $MISSING_DEPENDENCY ;;
29673      pkgadd)
29674        pkgadd_help  $MISSING_DEPENDENCY ;;
29675    esac
29676
29677    if test "x$PKGHANDLER_COMMAND" != x; then
29678      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29679    fi
29680  fi
29681
29682      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29683    fi
29684  fi
29685
29686  # Now we have a compiler binary in CXX. Make sure it's okay.
29687
29688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29689
29690  # First separate the path from the arguments. This will split at the first
29691  # space.
29692  complete="$CXX"
29693  path="${complete%% *}"
29694  tmp="$complete EOL"
29695  arguments="${tmp#* }"
29696
29697  # Input might be given as Windows format, start by converting to
29698  # unix format.
29699  new_path=`$CYGPATH -u "$path"`
29700
29701  # Now try to locate executable using which
29702  new_path=`$WHICH "$new_path" 2> /dev/null`
29703  # bat and cmd files are not always considered executable in cygwin causing which
29704  # to not find them
29705  if test "x$new_path" = x \
29706      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29707      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29708    new_path=`$CYGPATH -u "$path"`
29709  fi
29710  if test "x$new_path" = x; then
29711    # Oops. Which didn't find the executable.
29712    # The splitting of arguments from the executable at a space might have been incorrect,
29713    # since paths with space are more likely in Windows. Give it another try with the whole
29714    # argument.
29715    path="$complete"
29716    arguments="EOL"
29717    new_path=`$CYGPATH -u "$path"`
29718    new_path=`$WHICH "$new_path" 2> /dev/null`
29719    # bat and cmd files are not always considered executable in cygwin causing which
29720    # to not find them
29721    if test "x$new_path" = x \
29722        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29723        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29724      new_path=`$CYGPATH -u "$path"`
29725    fi
29726    if test "x$new_path" = x; then
29727      # It's still not found. Now this is an unrecoverable error.
29728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29729$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29730      has_space=`$ECHO "$complete" | $GREP " "`
29731      if test "x$has_space" != x; then
29732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29734      fi
29735      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29736    fi
29737  fi
29738
29739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29742  # "foo.exe" is OK but "foo" is an error.
29743  #
29744  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29745  # It is also a way to make sure we got the proper file name for the real test later on.
29746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29747  if test "x$test_shortpath" = x; then
29748    # Short path failed, file does not exist as specified.
29749    # Try adding .exe or .cmd
29750    if test -f "${new_path}.exe"; then
29751      input_to_shortpath="${new_path}.exe"
29752    elif test -f "${new_path}.cmd"; then
29753      input_to_shortpath="${new_path}.cmd"
29754    else
29755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29756$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29757      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29758$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29759      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29760    fi
29761  else
29762    input_to_shortpath="$new_path"
29763  fi
29764
29765  # Call helper function which possibly converts this using DOS-style short mode.
29766  # If so, the updated path is stored in $new_path.
29767  new_path="$input_to_shortpath"
29768
29769  input_path="$input_to_shortpath"
29770  # Check if we need to convert this using DOS-style short mode. If the path
29771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29772  # take no chances and rewrite it.
29773  # Note: m4 eats our [], so we need to use [ and ] instead.
29774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29775  if test "x$has_forbidden_chars" != x; then
29776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29780      # Going to short mode and back again did indeed matter. Since short mode is
29781      # case insensitive, let's make it lowercase to improve readability.
29782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29783      # Now convert it back to Unix-stile (cygpath)
29784      input_path=`$CYGPATH -u "$shortmode_path"`
29785      new_path="$input_path"
29786    fi
29787  fi
29788
29789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29790  if test "x$test_cygdrive_prefix" = x; then
29791    # As a simple fix, exclude /usr/bin since it's not a real path.
29792    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29794      # a path prefixed by /cygdrive for fixpath to work.
29795      new_path="$CYGWIN_ROOT_PATH$input_path"
29796    fi
29797  fi
29798
29799  # remove trailing .exe if any
29800  new_path="${new_path/%.exe/}"
29801
29802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29803
29804  # First separate the path from the arguments. This will split at the first
29805  # space.
29806  complete="$CXX"
29807  path="${complete%% *}"
29808  tmp="$complete EOL"
29809  arguments="${tmp#* }"
29810
29811  # Input might be given as Windows format, start by converting to
29812  # unix format.
29813  new_path="$path"
29814
29815  windows_path="$new_path"
29816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29817    unix_path=`$CYGPATH -u "$windows_path"`
29818    new_path="$unix_path"
29819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29821    new_path="$unix_path"
29822  fi
29823
29824
29825  # Now try to locate executable using which
29826  new_path=`$WHICH "$new_path" 2> /dev/null`
29827
29828  if test "x$new_path" = x; then
29829    # Oops. Which didn't find the executable.
29830    # The splitting of arguments from the executable at a space might have been incorrect,
29831    # since paths with space are more likely in Windows. Give it another try with the whole
29832    # argument.
29833    path="$complete"
29834    arguments="EOL"
29835    new_path="$path"
29836
29837  windows_path="$new_path"
29838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29839    unix_path=`$CYGPATH -u "$windows_path"`
29840    new_path="$unix_path"
29841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29843    new_path="$unix_path"
29844  fi
29845
29846
29847    new_path=`$WHICH "$new_path" 2> /dev/null`
29848    # bat and cmd files are not always considered executable in MSYS causing which
29849    # to not find them
29850    if test "x$new_path" = x \
29851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29853      new_path="$path"
29854
29855  windows_path="$new_path"
29856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29857    unix_path=`$CYGPATH -u "$windows_path"`
29858    new_path="$unix_path"
29859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29861    new_path="$unix_path"
29862  fi
29863
29864    fi
29865
29866    if test "x$new_path" = x; then
29867      # It's still not found. Now this is an unrecoverable error.
29868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29869$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29870      has_space=`$ECHO "$complete" | $GREP " "`
29871      if test "x$has_space" != x; then
29872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29874      fi
29875      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29876    fi
29877  fi
29878
29879  # Now new_path has a complete unix path to the binary
29880  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29881    # Keep paths in /bin as-is, but remove trailing .exe if any
29882    new_path="${new_path/%.exe/}"
29883    # Do not save /bin paths to all_fixpath_prefixes!
29884  else
29885    # Not in mixed or Windows style, start by that.
29886    new_path=`cmd //c echo $new_path`
29887
29888  input_path="$new_path"
29889  # Check if we need to convert this using DOS-style short mode. If the path
29890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29891  # take no chances and rewrite it.
29892  # Note: m4 eats our [], so we need to use [ and ] instead.
29893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29894  if test "x$has_forbidden_chars" != x; then
29895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29897  fi
29898
29899    # Output is in $new_path
29900
29901  windows_path="$new_path"
29902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29903    unix_path=`$CYGPATH -u "$windows_path"`
29904    new_path="$unix_path"
29905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29907    new_path="$unix_path"
29908  fi
29909
29910    # remove trailing .exe if any
29911    new_path="${new_path/%.exe/}"
29912
29913    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29914    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29915  fi
29916
29917  else
29918    # We're on a posix platform. Hooray! :)
29919    # First separate the path from the arguments. This will split at the first
29920    # space.
29921    complete="$CXX"
29922    path="${complete%% *}"
29923    tmp="$complete EOL"
29924    arguments="${tmp#* }"
29925
29926    # Cannot rely on the command "which" here since it doesn't always work.
29927    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29928    if test -z "$is_absolute_path"; then
29929      # Path to executable is not absolute. Find it.
29930      IFS_save="$IFS"
29931      IFS=:
29932      for p in $PATH; do
29933        if test -f "$p/$path" && test -x "$p/$path"; then
29934          new_path="$p/$path"
29935          break
29936        fi
29937      done
29938      IFS="$IFS_save"
29939    else
29940      # This is an absolute path, we can use it without further modifications.
29941      new_path="$path"
29942    fi
29943
29944    if test "x$new_path" = x; then
29945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29946$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29947      has_space=`$ECHO "$complete" | $GREP " "`
29948      if test "x$has_space" != x; then
29949        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29950$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29951      fi
29952      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29953    fi
29954  fi
29955
29956  # Now join together the path and the arguments once again
29957  if test "x$arguments" != xEOL; then
29958    new_complete="$new_path ${arguments% *}"
29959  else
29960    new_complete="$new_path"
29961  fi
29962
29963  if test "x$complete" != "x$new_complete"; then
29964    CXX="$new_complete"
29965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29966$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29967  fi
29968
29969  TEST_COMPILER="$CXX"
29970  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29971  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29972  if test "x$OPENJDK_BUILD_OS" != xaix; then
29973    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29975$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29976
29977  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29978    # Follow a chain of symbolic links. Use readlink
29979    # where it exists, else fall back to horribly
29980    # complicated shell code.
29981    if test "x$READLINK_TESTED" != yes; then
29982      # On MacOSX there is a readlink tool with a different
29983      # purpose than the GNU readlink tool. Check the found readlink.
29984      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29985      if test "x$ISGNU" = x; then
29986        # A readlink that we do not know how to use.
29987        # Are there other non-GNU readlinks out there?
29988        READLINK_TESTED=yes
29989        READLINK=
29990      fi
29991    fi
29992
29993    if test "x$READLINK" != x; then
29994      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29995    else
29996      # Save the current directory for restoring afterwards
29997      STARTDIR=$PWD
29998      COUNTER=0
29999      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30000      sym_link_file=`$BASENAME $TEST_COMPILER`
30001      cd $sym_link_dir
30002      # Use -P flag to resolve symlinks in directories.
30003      cd `$THEPWDCMD -P`
30004      sym_link_dir=`$THEPWDCMD -P`
30005      # Resolve file symlinks
30006      while test $COUNTER -lt 20; do
30007        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30008        if test "x$ISLINK" == x; then
30009          # This is not a symbolic link! We are done!
30010          break
30011        fi
30012        # Again resolve directory symlinks since the target of the just found
30013        # link could be in a different directory
30014        cd `$DIRNAME $ISLINK`
30015        sym_link_dir=`$THEPWDCMD -P`
30016        sym_link_file=`$BASENAME $ISLINK`
30017        let COUNTER=COUNTER+1
30018      done
30019      cd $STARTDIR
30020      TEST_COMPILER=$sym_link_dir/$sym_link_file
30021    fi
30022  fi
30023
30024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30025$as_echo "$TEST_COMPILER" >&6; }
30026  fi
30027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30028$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30029
30030  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30031  if test "x$COMPILER_BASENAME" = "xccache"; then
30032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30033$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30034    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30035    # We want to control ccache invocation ourselves, so ignore this cc and try
30036    # searching again.
30037
30038    # Remove the path to the fake ccache cc from the PATH
30039    RETRY_COMPILER_SAVED_PATH="$PATH"
30040    COMPILER_DIRNAME=`$DIRNAME $CXX`
30041    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30042
30043    # Try again looking for our compiler
30044    if test -n "$ac_tool_prefix"; then
30045  for ac_prog in $TOOLCHAIN_CXX_BINARY
30046  do
30047    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30050$as_echo_n "checking for $ac_word... " >&6; }
30051if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30052  $as_echo_n "(cached) " >&6
30053else
30054  if test -n "$PROPER_COMPILER_CXX"; then
30055  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30056else
30057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30058for as_dir in $PATH
30059do
30060  IFS=$as_save_IFS
30061  test -z "$as_dir" && as_dir=.
30062    for ac_exec_ext in '' $ac_executable_extensions; do
30063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30064    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30066    break 2
30067  fi
30068done
30069  done
30070IFS=$as_save_IFS
30071
30072fi
30073fi
30074PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30075if test -n "$PROPER_COMPILER_CXX"; then
30076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30077$as_echo "$PROPER_COMPILER_CXX" >&6; }
30078else
30079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30080$as_echo "no" >&6; }
30081fi
30082
30083
30084    test -n "$PROPER_COMPILER_CXX" && break
30085  done
30086fi
30087if test -z "$PROPER_COMPILER_CXX"; then
30088  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30089  for ac_prog in $TOOLCHAIN_CXX_BINARY
30090do
30091  # Extract the first word of "$ac_prog", so it can be a program name with args.
30092set dummy $ac_prog; ac_word=$2
30093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30094$as_echo_n "checking for $ac_word... " >&6; }
30095if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30096  $as_echo_n "(cached) " >&6
30097else
30098  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30099  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30100else
30101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30102for as_dir in $PATH
30103do
30104  IFS=$as_save_IFS
30105  test -z "$as_dir" && as_dir=.
30106    for ac_exec_ext in '' $ac_executable_extensions; do
30107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30108    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30110    break 2
30111  fi
30112done
30113  done
30114IFS=$as_save_IFS
30115
30116fi
30117fi
30118ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30119if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30121$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30122else
30123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30124$as_echo "no" >&6; }
30125fi
30126
30127
30128  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30129done
30130
30131  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30132    PROPER_COMPILER_CXX=""
30133  else
30134    case $cross_compiling:$ac_tool_warned in
30135yes:)
30136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30138ac_tool_warned=yes ;;
30139esac
30140    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30141  fi
30142fi
30143
30144
30145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30146
30147  # First separate the path from the arguments. This will split at the first
30148  # space.
30149  complete="$PROPER_COMPILER_CXX"
30150  path="${complete%% *}"
30151  tmp="$complete EOL"
30152  arguments="${tmp#* }"
30153
30154  # Input might be given as Windows format, start by converting to
30155  # unix format.
30156  new_path=`$CYGPATH -u "$path"`
30157
30158  # Now try to locate executable using which
30159  new_path=`$WHICH "$new_path" 2> /dev/null`
30160  # bat and cmd files are not always considered executable in cygwin causing which
30161  # to not find them
30162  if test "x$new_path" = x \
30163      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30164      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30165    new_path=`$CYGPATH -u "$path"`
30166  fi
30167  if test "x$new_path" = x; then
30168    # Oops. Which didn't find the executable.
30169    # The splitting of arguments from the executable at a space might have been incorrect,
30170    # since paths with space are more likely in Windows. Give it another try with the whole
30171    # argument.
30172    path="$complete"
30173    arguments="EOL"
30174    new_path=`$CYGPATH -u "$path"`
30175    new_path=`$WHICH "$new_path" 2> /dev/null`
30176    # bat and cmd files are not always considered executable in cygwin causing which
30177    # to not find them
30178    if test "x$new_path" = x \
30179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30181      new_path=`$CYGPATH -u "$path"`
30182    fi
30183    if test "x$new_path" = x; then
30184      # It's still not found. Now this is an unrecoverable error.
30185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30186$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30187      has_space=`$ECHO "$complete" | $GREP " "`
30188      if test "x$has_space" != x; then
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30191      fi
30192      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30193    fi
30194  fi
30195
30196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30199  # "foo.exe" is OK but "foo" is an error.
30200  #
30201  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30202  # It is also a way to make sure we got the proper file name for the real test later on.
30203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30204  if test "x$test_shortpath" = x; then
30205    # Short path failed, file does not exist as specified.
30206    # Try adding .exe or .cmd
30207    if test -f "${new_path}.exe"; then
30208      input_to_shortpath="${new_path}.exe"
30209    elif test -f "${new_path}.cmd"; then
30210      input_to_shortpath="${new_path}.cmd"
30211    else
30212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30213$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30214      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30215$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30216      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30217    fi
30218  else
30219    input_to_shortpath="$new_path"
30220  fi
30221
30222  # Call helper function which possibly converts this using DOS-style short mode.
30223  # If so, the updated path is stored in $new_path.
30224  new_path="$input_to_shortpath"
30225
30226  input_path="$input_to_shortpath"
30227  # Check if we need to convert this using DOS-style short mode. If the path
30228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30229  # take no chances and rewrite it.
30230  # Note: m4 eats our [], so we need to use [ and ] instead.
30231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30232  if test "x$has_forbidden_chars" != x; then
30233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30237      # Going to short mode and back again did indeed matter. Since short mode is
30238      # case insensitive, let's make it lowercase to improve readability.
30239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30240      # Now convert it back to Unix-stile (cygpath)
30241      input_path=`$CYGPATH -u "$shortmode_path"`
30242      new_path="$input_path"
30243    fi
30244  fi
30245
30246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30247  if test "x$test_cygdrive_prefix" = x; then
30248    # As a simple fix, exclude /usr/bin since it's not a real path.
30249    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30251      # a path prefixed by /cygdrive for fixpath to work.
30252      new_path="$CYGWIN_ROOT_PATH$input_path"
30253    fi
30254  fi
30255
30256  # remove trailing .exe if any
30257  new_path="${new_path/%.exe/}"
30258
30259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30260
30261  # First separate the path from the arguments. This will split at the first
30262  # space.
30263  complete="$PROPER_COMPILER_CXX"
30264  path="${complete%% *}"
30265  tmp="$complete EOL"
30266  arguments="${tmp#* }"
30267
30268  # Input might be given as Windows format, start by converting to
30269  # unix format.
30270  new_path="$path"
30271
30272  windows_path="$new_path"
30273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30274    unix_path=`$CYGPATH -u "$windows_path"`
30275    new_path="$unix_path"
30276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30278    new_path="$unix_path"
30279  fi
30280
30281
30282  # Now try to locate executable using which
30283  new_path=`$WHICH "$new_path" 2> /dev/null`
30284
30285  if test "x$new_path" = x; then
30286    # Oops. Which didn't find the executable.
30287    # The splitting of arguments from the executable at a space might have been incorrect,
30288    # since paths with space are more likely in Windows. Give it another try with the whole
30289    # argument.
30290    path="$complete"
30291    arguments="EOL"
30292    new_path="$path"
30293
30294  windows_path="$new_path"
30295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30296    unix_path=`$CYGPATH -u "$windows_path"`
30297    new_path="$unix_path"
30298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30300    new_path="$unix_path"
30301  fi
30302
30303
30304    new_path=`$WHICH "$new_path" 2> /dev/null`
30305    # bat and cmd files are not always considered executable in MSYS causing which
30306    # to not find them
30307    if test "x$new_path" = x \
30308        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30309        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30310      new_path="$path"
30311
30312  windows_path="$new_path"
30313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30314    unix_path=`$CYGPATH -u "$windows_path"`
30315    new_path="$unix_path"
30316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30318    new_path="$unix_path"
30319  fi
30320
30321    fi
30322
30323    if test "x$new_path" = x; then
30324      # It's still not found. Now this is an unrecoverable error.
30325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30326$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30327      has_space=`$ECHO "$complete" | $GREP " "`
30328      if test "x$has_space" != x; then
30329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30331      fi
30332      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30333    fi
30334  fi
30335
30336  # Now new_path has a complete unix path to the binary
30337  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30338    # Keep paths in /bin as-is, but remove trailing .exe if any
30339    new_path="${new_path/%.exe/}"
30340    # Do not save /bin paths to all_fixpath_prefixes!
30341  else
30342    # Not in mixed or Windows style, start by that.
30343    new_path=`cmd //c echo $new_path`
30344
30345  input_path="$new_path"
30346  # Check if we need to convert this using DOS-style short mode. If the path
30347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30348  # take no chances and rewrite it.
30349  # Note: m4 eats our [], so we need to use [ and ] instead.
30350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30351  if test "x$has_forbidden_chars" != x; then
30352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30354  fi
30355
30356    # Output is in $new_path
30357
30358  windows_path="$new_path"
30359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30360    unix_path=`$CYGPATH -u "$windows_path"`
30361    new_path="$unix_path"
30362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30364    new_path="$unix_path"
30365  fi
30366
30367    # remove trailing .exe if any
30368    new_path="${new_path/%.exe/}"
30369
30370    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30371    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30372  fi
30373
30374  else
30375    # We're on a posix platform. Hooray! :)
30376    # First separate the path from the arguments. This will split at the first
30377    # space.
30378    complete="$PROPER_COMPILER_CXX"
30379    path="${complete%% *}"
30380    tmp="$complete EOL"
30381    arguments="${tmp#* }"
30382
30383    # Cannot rely on the command "which" here since it doesn't always work.
30384    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30385    if test -z "$is_absolute_path"; then
30386      # Path to executable is not absolute. Find it.
30387      IFS_save="$IFS"
30388      IFS=:
30389      for p in $PATH; do
30390        if test -f "$p/$path" && test -x "$p/$path"; then
30391          new_path="$p/$path"
30392          break
30393        fi
30394      done
30395      IFS="$IFS_save"
30396    else
30397      # This is an absolute path, we can use it without further modifications.
30398      new_path="$path"
30399    fi
30400
30401    if test "x$new_path" = x; then
30402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30403$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30404      has_space=`$ECHO "$complete" | $GREP " "`
30405      if test "x$has_space" != x; then
30406        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30407$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30408      fi
30409      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30410    fi
30411  fi
30412
30413  # Now join together the path and the arguments once again
30414  if test "x$arguments" != xEOL; then
30415    new_complete="$new_path ${arguments% *}"
30416  else
30417    new_complete="$new_path"
30418  fi
30419
30420  if test "x$complete" != "x$new_complete"; then
30421    PROPER_COMPILER_CXX="$new_complete"
30422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30423$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30424  fi
30425
30426    PATH="$RETRY_COMPILER_SAVED_PATH"
30427
30428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30429$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30430
30431  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30432    # Follow a chain of symbolic links. Use readlink
30433    # where it exists, else fall back to horribly
30434    # complicated shell code.
30435    if test "x$READLINK_TESTED" != yes; then
30436      # On MacOSX there is a readlink tool with a different
30437      # purpose than the GNU readlink tool. Check the found readlink.
30438      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30439      if test "x$ISGNU" = x; then
30440        # A readlink that we do not know how to use.
30441        # Are there other non-GNU readlinks out there?
30442        READLINK_TESTED=yes
30443        READLINK=
30444      fi
30445    fi
30446
30447    if test "x$READLINK" != x; then
30448      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30449    else
30450      # Save the current directory for restoring afterwards
30451      STARTDIR=$PWD
30452      COUNTER=0
30453      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30454      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30455      cd $sym_link_dir
30456      # Use -P flag to resolve symlinks in directories.
30457      cd `$THEPWDCMD -P`
30458      sym_link_dir=`$THEPWDCMD -P`
30459      # Resolve file symlinks
30460      while test $COUNTER -lt 20; do
30461        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30462        if test "x$ISLINK" == x; then
30463          # This is not a symbolic link! We are done!
30464          break
30465        fi
30466        # Again resolve directory symlinks since the target of the just found
30467        # link could be in a different directory
30468        cd `$DIRNAME $ISLINK`
30469        sym_link_dir=`$THEPWDCMD -P`
30470        sym_link_file=`$BASENAME $ISLINK`
30471        let COUNTER=COUNTER+1
30472      done
30473      cd $STARTDIR
30474      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30475    fi
30476  fi
30477
30478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30479$as_echo "$PROPER_COMPILER_CXX" >&6; }
30480    CXX="$PROPER_COMPILER_CXX"
30481  else
30482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30483$as_echo "no, keeping CXX" >&6; }
30484  fi
30485
30486
30487  COMPILER=$CXX
30488  COMPILER_NAME=$COMPILER_NAME
30489
30490  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30491    # cc -V output typically looks like
30492    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30493    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30494    # Check that this is likely to be the Solaris Studio cc.
30495    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30496    if test $? -ne 0; then
30497      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30498      { $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
30499$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30500      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30501$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30502      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30503$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30504      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30505    fi
30506    # Remove usage instructions (if present), and
30507    # collapse compiler output into a single line
30508    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30509        $SED -e 's/ *[Uu]sage:.*//'`
30510    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30511        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30512  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30513    # xlc -qversion output typically looks like
30514    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30515    #     Version: 11.01.0000.0015
30516    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30517    # Check that this is likely to be the IBM XL C compiler.
30518    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30519    if test $? -ne 0; then
30520      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30521      { $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
30522$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30523      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30524$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30525      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30526$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30527      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30528    fi
30529    # Collapse compiler output into a single line
30530    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30531    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30532        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30533  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30534    # There is no specific version flag, but all output starts with a version string.
30535    # First line typically looks something like:
30536    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30537    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30538    # Check that this is likely to be Microsoft CL.EXE.
30539    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30540    if test $? -ne 0; then
30541      { $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
30542$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30543      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30544$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30545      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30546    fi
30547    # Collapse compiler output into a single line
30548    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30549    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30550        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30551  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30552    # gcc --version output typically looks like
30553    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30554    #     Copyright (C) 2013 Free Software Foundation, Inc.
30555    #     This is free software; see the source for copying conditions.  There is NO
30556    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30557    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30558    # Check that this is likely to be GCC.
30559    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30560    if test $? -ne 0; then
30561      { $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
30562$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30563      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30564$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30565      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30566    fi
30567    # Remove Copyright and legalese from version string, and
30568    # collapse into a single line
30569    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30570        $SED -e 's/ *Copyright .*//'`
30571    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30572        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30573  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30574    # clang --version output typically looks like
30575    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30576    #    clang version 3.3 (tags/RELEASE_33/final)
30577    # or
30578    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30579    #    Target: x86_64-pc-linux-gnu
30580    #    Thread model: posix
30581    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30582    # Check that this is likely to be clang
30583    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30584    if test $? -ne 0; then
30585      { $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
30586$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30587      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30588$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30589      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30590    fi
30591    # Collapse compiler output into a single line
30592    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30593    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30594        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30595  else
30596      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30597  fi
30598  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30599  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30600  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30601  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30602
30603  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30604$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30605
30606
30607  # Now that we have resolved CXX ourself, let autoconf have its go at it
30608  ac_ext=cpp
30609ac_cpp='$CXXCPP $CPPFLAGS'
30610ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30611ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30612ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30613if test -z "$CXX"; then
30614  if test -n "$CCC"; then
30615    CXX=$CCC
30616  else
30617    if test -n "$ac_tool_prefix"; then
30618  for ac_prog in $CXX
30619  do
30620    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30621set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30623$as_echo_n "checking for $ac_word... " >&6; }
30624if ${ac_cv_prog_CXX+:} false; then :
30625  $as_echo_n "(cached) " >&6
30626else
30627  if test -n "$CXX"; then
30628  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30629else
30630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30631for as_dir in $PATH
30632do
30633  IFS=$as_save_IFS
30634  test -z "$as_dir" && as_dir=.
30635    for ac_exec_ext in '' $ac_executable_extensions; do
30636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30637    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30639    break 2
30640  fi
30641done
30642  done
30643IFS=$as_save_IFS
30644
30645fi
30646fi
30647CXX=$ac_cv_prog_CXX
30648if test -n "$CXX"; then
30649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30650$as_echo "$CXX" >&6; }
30651else
30652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30653$as_echo "no" >&6; }
30654fi
30655
30656
30657    test -n "$CXX" && break
30658  done
30659fi
30660if test -z "$CXX"; then
30661  ac_ct_CXX=$CXX
30662  for ac_prog in $CXX
30663do
30664  # Extract the first word of "$ac_prog", so it can be a program name with args.
30665set dummy $ac_prog; ac_word=$2
30666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30667$as_echo_n "checking for $ac_word... " >&6; }
30668if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30669  $as_echo_n "(cached) " >&6
30670else
30671  if test -n "$ac_ct_CXX"; then
30672  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30673else
30674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30675for as_dir in $PATH
30676do
30677  IFS=$as_save_IFS
30678  test -z "$as_dir" && as_dir=.
30679    for ac_exec_ext in '' $ac_executable_extensions; do
30680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30681    ac_cv_prog_ac_ct_CXX="$ac_prog"
30682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30683    break 2
30684  fi
30685done
30686  done
30687IFS=$as_save_IFS
30688
30689fi
30690fi
30691ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30692if test -n "$ac_ct_CXX"; then
30693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30694$as_echo "$ac_ct_CXX" >&6; }
30695else
30696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30697$as_echo "no" >&6; }
30698fi
30699
30700
30701  test -n "$ac_ct_CXX" && break
30702done
30703
30704  if test "x$ac_ct_CXX" = x; then
30705    CXX="g++"
30706  else
30707    case $cross_compiling:$ac_tool_warned in
30708yes:)
30709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30711ac_tool_warned=yes ;;
30712esac
30713    CXX=$ac_ct_CXX
30714  fi
30715fi
30716
30717  fi
30718fi
30719# Provide some information about the compiler.
30720$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30721set X $ac_compile
30722ac_compiler=$2
30723for ac_option in --version -v -V -qversion; do
30724  { { ac_try="$ac_compiler $ac_option >&5"
30725case "(($ac_try" in
30726  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30727  *) ac_try_echo=$ac_try;;
30728esac
30729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30730$as_echo "$ac_try_echo"; } >&5
30731  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30732  ac_status=$?
30733  if test -s conftest.err; then
30734    sed '10a\
30735... rest of stderr output deleted ...
30736         10q' conftest.err >conftest.er1
30737    cat conftest.er1 >&5
30738  fi
30739  rm -f conftest.er1 conftest.err
30740  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30741  test $ac_status = 0; }
30742done
30743
30744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30745$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30746if ${ac_cv_cxx_compiler_gnu+:} false; then :
30747  $as_echo_n "(cached) " >&6
30748else
30749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750/* end confdefs.h.  */
30751
30752int
30753main ()
30754{
30755#ifndef __GNUC__
30756       choke me
30757#endif
30758
30759  ;
30760  return 0;
30761}
30762_ACEOF
30763if ac_fn_cxx_try_compile "$LINENO"; then :
30764  ac_compiler_gnu=yes
30765else
30766  ac_compiler_gnu=no
30767fi
30768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30769ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30770
30771fi
30772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30773$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30774if test $ac_compiler_gnu = yes; then
30775  GXX=yes
30776else
30777  GXX=
30778fi
30779ac_test_CXXFLAGS=${CXXFLAGS+set}
30780ac_save_CXXFLAGS=$CXXFLAGS
30781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30782$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30783if ${ac_cv_prog_cxx_g+:} false; then :
30784  $as_echo_n "(cached) " >&6
30785else
30786  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30787   ac_cxx_werror_flag=yes
30788   ac_cv_prog_cxx_g=no
30789   CXXFLAGS="-g"
30790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30791/* end confdefs.h.  */
30792
30793int
30794main ()
30795{
30796
30797  ;
30798  return 0;
30799}
30800_ACEOF
30801if ac_fn_cxx_try_compile "$LINENO"; then :
30802  ac_cv_prog_cxx_g=yes
30803else
30804  CXXFLAGS=""
30805      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30806/* end confdefs.h.  */
30807
30808int
30809main ()
30810{
30811
30812  ;
30813  return 0;
30814}
30815_ACEOF
30816if ac_fn_cxx_try_compile "$LINENO"; then :
30817
30818else
30819  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30820	 CXXFLAGS="-g"
30821	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30822/* end confdefs.h.  */
30823
30824int
30825main ()
30826{
30827
30828  ;
30829  return 0;
30830}
30831_ACEOF
30832if ac_fn_cxx_try_compile "$LINENO"; then :
30833  ac_cv_prog_cxx_g=yes
30834fi
30835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30836fi
30837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30838fi
30839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30840   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30841fi
30842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30843$as_echo "$ac_cv_prog_cxx_g" >&6; }
30844if test "$ac_test_CXXFLAGS" = set; then
30845  CXXFLAGS=$ac_save_CXXFLAGS
30846elif test $ac_cv_prog_cxx_g = yes; then
30847  if test "$GXX" = yes; then
30848    CXXFLAGS="-g -O2"
30849  else
30850    CXXFLAGS="-g"
30851  fi
30852else
30853  if test "$GXX" = yes; then
30854    CXXFLAGS="-O2"
30855  else
30856    CXXFLAGS=
30857  fi
30858fi
30859ac_ext=cpp
30860ac_cpp='$CXXCPP $CPPFLAGS'
30861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30864
30865
30866  #
30867  # Setup the preprocessor (CPP and CXXCPP)
30868  #
30869  ac_ext=c
30870ac_cpp='$CPP $CPPFLAGS'
30871ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30872ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30873ac_compiler_gnu=$ac_cv_c_compiler_gnu
30874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30875$as_echo_n "checking how to run the C preprocessor... " >&6; }
30876# On Suns, sometimes $CPP names a directory.
30877if test -n "$CPP" && test -d "$CPP"; then
30878  CPP=
30879fi
30880if test -z "$CPP"; then
30881  if ${ac_cv_prog_CPP+:} false; then :
30882  $as_echo_n "(cached) " >&6
30883else
30884      # Double quotes because CPP needs to be expanded
30885    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30886    do
30887      ac_preproc_ok=false
30888for ac_c_preproc_warn_flag in '' yes
30889do
30890  # Use a header file that comes with gcc, so configuring glibc
30891  # with a fresh cross-compiler works.
30892  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30893  # <limits.h> exists even on freestanding compilers.
30894  # On the NeXT, cc -E runs the code through the compiler's parser,
30895  # not just through cpp. "Syntax error" is here to catch this case.
30896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30897/* end confdefs.h.  */
30898#ifdef __STDC__
30899# include <limits.h>
30900#else
30901# include <assert.h>
30902#endif
30903		     Syntax error
30904_ACEOF
30905if ac_fn_c_try_cpp "$LINENO"; then :
30906
30907else
30908  # Broken: fails on valid input.
30909continue
30910fi
30911rm -f conftest.err conftest.i conftest.$ac_ext
30912
30913  # OK, works on sane cases.  Now check whether nonexistent headers
30914  # can be detected and how.
30915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30916/* end confdefs.h.  */
30917#include <ac_nonexistent.h>
30918_ACEOF
30919if ac_fn_c_try_cpp "$LINENO"; then :
30920  # Broken: success on invalid input.
30921continue
30922else
30923  # Passes both tests.
30924ac_preproc_ok=:
30925break
30926fi
30927rm -f conftest.err conftest.i conftest.$ac_ext
30928
30929done
30930# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30931rm -f conftest.i conftest.err conftest.$ac_ext
30932if $ac_preproc_ok; then :
30933  break
30934fi
30935
30936    done
30937    ac_cv_prog_CPP=$CPP
30938
30939fi
30940  CPP=$ac_cv_prog_CPP
30941else
30942  ac_cv_prog_CPP=$CPP
30943fi
30944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30945$as_echo "$CPP" >&6; }
30946ac_preproc_ok=false
30947for ac_c_preproc_warn_flag in '' yes
30948do
30949  # Use a header file that comes with gcc, so configuring glibc
30950  # with a fresh cross-compiler works.
30951  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30952  # <limits.h> exists even on freestanding compilers.
30953  # On the NeXT, cc -E runs the code through the compiler's parser,
30954  # not just through cpp. "Syntax error" is here to catch this case.
30955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30956/* end confdefs.h.  */
30957#ifdef __STDC__
30958# include <limits.h>
30959#else
30960# include <assert.h>
30961#endif
30962		     Syntax error
30963_ACEOF
30964if ac_fn_c_try_cpp "$LINENO"; then :
30965
30966else
30967  # Broken: fails on valid input.
30968continue
30969fi
30970rm -f conftest.err conftest.i conftest.$ac_ext
30971
30972  # OK, works on sane cases.  Now check whether nonexistent headers
30973  # can be detected and how.
30974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30975/* end confdefs.h.  */
30976#include <ac_nonexistent.h>
30977_ACEOF
30978if ac_fn_c_try_cpp "$LINENO"; then :
30979  # Broken: success on invalid input.
30980continue
30981else
30982  # Passes both tests.
30983ac_preproc_ok=:
30984break
30985fi
30986rm -f conftest.err conftest.i conftest.$ac_ext
30987
30988done
30989# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30990rm -f conftest.i conftest.err conftest.$ac_ext
30991if $ac_preproc_ok; then :
30992
30993else
30994  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30996as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30997See \`config.log' for more details" "$LINENO" 5; }
30998fi
30999
31000ac_ext=cpp
31001ac_cpp='$CXXCPP $CPPFLAGS'
31002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31005
31006
31007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31008
31009  # First separate the path from the arguments. This will split at the first
31010  # space.
31011  complete="$CPP"
31012  path="${complete%% *}"
31013  tmp="$complete EOL"
31014  arguments="${tmp#* }"
31015
31016  # Input might be given as Windows format, start by converting to
31017  # unix format.
31018  new_path=`$CYGPATH -u "$path"`
31019
31020  # Now try to locate executable using which
31021  new_path=`$WHICH "$new_path" 2> /dev/null`
31022  # bat and cmd files are not always considered executable in cygwin causing which
31023  # to not find them
31024  if test "x$new_path" = x \
31025      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31026      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31027    new_path=`$CYGPATH -u "$path"`
31028  fi
31029  if test "x$new_path" = x; then
31030    # Oops. Which didn't find the executable.
31031    # The splitting of arguments from the executable at a space might have been incorrect,
31032    # since paths with space are more likely in Windows. Give it another try with the whole
31033    # argument.
31034    path="$complete"
31035    arguments="EOL"
31036    new_path=`$CYGPATH -u "$path"`
31037    new_path=`$WHICH "$new_path" 2> /dev/null`
31038    # bat and cmd files are not always considered executable in cygwin causing which
31039    # to not find them
31040    if test "x$new_path" = x \
31041        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31042        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31043      new_path=`$CYGPATH -u "$path"`
31044    fi
31045    if test "x$new_path" = x; then
31046      # It's still not found. Now this is an unrecoverable error.
31047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31048$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31049      has_space=`$ECHO "$complete" | $GREP " "`
31050      if test "x$has_space" != x; then
31051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31053      fi
31054      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31055    fi
31056  fi
31057
31058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31061  # "foo.exe" is OK but "foo" is an error.
31062  #
31063  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31064  # It is also a way to make sure we got the proper file name for the real test later on.
31065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31066  if test "x$test_shortpath" = x; then
31067    # Short path failed, file does not exist as specified.
31068    # Try adding .exe or .cmd
31069    if test -f "${new_path}.exe"; then
31070      input_to_shortpath="${new_path}.exe"
31071    elif test -f "${new_path}.cmd"; then
31072      input_to_shortpath="${new_path}.cmd"
31073    else
31074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31075$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31076      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31077$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31078      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31079    fi
31080  else
31081    input_to_shortpath="$new_path"
31082  fi
31083
31084  # Call helper function which possibly converts this using DOS-style short mode.
31085  # If so, the updated path is stored in $new_path.
31086  new_path="$input_to_shortpath"
31087
31088  input_path="$input_to_shortpath"
31089  # Check if we need to convert this using DOS-style short mode. If the path
31090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31091  # take no chances and rewrite it.
31092  # Note: m4 eats our [], so we need to use [ and ] instead.
31093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31094  if test "x$has_forbidden_chars" != x; then
31095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31099      # Going to short mode and back again did indeed matter. Since short mode is
31100      # case insensitive, let's make it lowercase to improve readability.
31101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31102      # Now convert it back to Unix-stile (cygpath)
31103      input_path=`$CYGPATH -u "$shortmode_path"`
31104      new_path="$input_path"
31105    fi
31106  fi
31107
31108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31109  if test "x$test_cygdrive_prefix" = x; then
31110    # As a simple fix, exclude /usr/bin since it's not a real path.
31111    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31113      # a path prefixed by /cygdrive for fixpath to work.
31114      new_path="$CYGWIN_ROOT_PATH$input_path"
31115    fi
31116  fi
31117
31118  # remove trailing .exe if any
31119  new_path="${new_path/%.exe/}"
31120
31121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31122
31123  # First separate the path from the arguments. This will split at the first
31124  # space.
31125  complete="$CPP"
31126  path="${complete%% *}"
31127  tmp="$complete EOL"
31128  arguments="${tmp#* }"
31129
31130  # Input might be given as Windows format, start by converting to
31131  # unix format.
31132  new_path="$path"
31133
31134  windows_path="$new_path"
31135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31136    unix_path=`$CYGPATH -u "$windows_path"`
31137    new_path="$unix_path"
31138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31140    new_path="$unix_path"
31141  fi
31142
31143
31144  # Now try to locate executable using which
31145  new_path=`$WHICH "$new_path" 2> /dev/null`
31146
31147  if test "x$new_path" = x; then
31148    # Oops. Which didn't find the executable.
31149    # The splitting of arguments from the executable at a space might have been incorrect,
31150    # since paths with space are more likely in Windows. Give it another try with the whole
31151    # argument.
31152    path="$complete"
31153    arguments="EOL"
31154    new_path="$path"
31155
31156  windows_path="$new_path"
31157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31158    unix_path=`$CYGPATH -u "$windows_path"`
31159    new_path="$unix_path"
31160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31162    new_path="$unix_path"
31163  fi
31164
31165
31166    new_path=`$WHICH "$new_path" 2> /dev/null`
31167    # bat and cmd files are not always considered executable in MSYS causing which
31168    # to not find them
31169    if test "x$new_path" = x \
31170        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31171        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31172      new_path="$path"
31173
31174  windows_path="$new_path"
31175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31176    unix_path=`$CYGPATH -u "$windows_path"`
31177    new_path="$unix_path"
31178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31180    new_path="$unix_path"
31181  fi
31182
31183    fi
31184
31185    if test "x$new_path" = x; then
31186      # It's still not found. Now this is an unrecoverable error.
31187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31188$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31189      has_space=`$ECHO "$complete" | $GREP " "`
31190      if test "x$has_space" != x; then
31191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31193      fi
31194      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31195    fi
31196  fi
31197
31198  # Now new_path has a complete unix path to the binary
31199  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31200    # Keep paths in /bin as-is, but remove trailing .exe if any
31201    new_path="${new_path/%.exe/}"
31202    # Do not save /bin paths to all_fixpath_prefixes!
31203  else
31204    # Not in mixed or Windows style, start by that.
31205    new_path=`cmd //c echo $new_path`
31206
31207  input_path="$new_path"
31208  # Check if we need to convert this using DOS-style short mode. If the path
31209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31210  # take no chances and rewrite it.
31211  # Note: m4 eats our [], so we need to use [ and ] instead.
31212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31213  if test "x$has_forbidden_chars" != x; then
31214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31216  fi
31217
31218    # Output is in $new_path
31219
31220  windows_path="$new_path"
31221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31222    unix_path=`$CYGPATH -u "$windows_path"`
31223    new_path="$unix_path"
31224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31226    new_path="$unix_path"
31227  fi
31228
31229    # remove trailing .exe if any
31230    new_path="${new_path/%.exe/}"
31231
31232    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31233    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31234  fi
31235
31236  else
31237    # We're on a posix platform. Hooray! :)
31238    # First separate the path from the arguments. This will split at the first
31239    # space.
31240    complete="$CPP"
31241    path="${complete%% *}"
31242    tmp="$complete EOL"
31243    arguments="${tmp#* }"
31244
31245    # Cannot rely on the command "which" here since it doesn't always work.
31246    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31247    if test -z "$is_absolute_path"; then
31248      # Path to executable is not absolute. Find it.
31249      IFS_save="$IFS"
31250      IFS=:
31251      for p in $PATH; do
31252        if test -f "$p/$path" && test -x "$p/$path"; then
31253          new_path="$p/$path"
31254          break
31255        fi
31256      done
31257      IFS="$IFS_save"
31258    else
31259      # This is an absolute path, we can use it without further modifications.
31260      new_path="$path"
31261    fi
31262
31263    if test "x$new_path" = x; then
31264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31265$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31266      has_space=`$ECHO "$complete" | $GREP " "`
31267      if test "x$has_space" != x; then
31268        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31269$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31270      fi
31271      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31272    fi
31273  fi
31274
31275  # Now join together the path and the arguments once again
31276  if test "x$arguments" != xEOL; then
31277    new_complete="$new_path ${arguments% *}"
31278  else
31279    new_complete="$new_path"
31280  fi
31281
31282  if test "x$complete" != "x$new_complete"; then
31283    CPP="$new_complete"
31284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31285$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31286  fi
31287
31288  ac_ext=cpp
31289ac_cpp='$CXXCPP $CPPFLAGS'
31290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31294$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31295if test -z "$CXXCPP"; then
31296  if ${ac_cv_prog_CXXCPP+:} false; then :
31297  $as_echo_n "(cached) " >&6
31298else
31299      # Double quotes because CXXCPP needs to be expanded
31300    for CXXCPP in "$CXX -E" "/lib/cpp"
31301    do
31302      ac_preproc_ok=false
31303for ac_cxx_preproc_warn_flag in '' yes
31304do
31305  # Use a header file that comes with gcc, so configuring glibc
31306  # with a fresh cross-compiler works.
31307  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31308  # <limits.h> exists even on freestanding compilers.
31309  # On the NeXT, cc -E runs the code through the compiler's parser,
31310  # not just through cpp. "Syntax error" is here to catch this case.
31311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31312/* end confdefs.h.  */
31313#ifdef __STDC__
31314# include <limits.h>
31315#else
31316# include <assert.h>
31317#endif
31318		     Syntax error
31319_ACEOF
31320if ac_fn_cxx_try_cpp "$LINENO"; then :
31321
31322else
31323  # Broken: fails on valid input.
31324continue
31325fi
31326rm -f conftest.err conftest.i conftest.$ac_ext
31327
31328  # OK, works on sane cases.  Now check whether nonexistent headers
31329  # can be detected and how.
31330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31331/* end confdefs.h.  */
31332#include <ac_nonexistent.h>
31333_ACEOF
31334if ac_fn_cxx_try_cpp "$LINENO"; then :
31335  # Broken: success on invalid input.
31336continue
31337else
31338  # Passes both tests.
31339ac_preproc_ok=:
31340break
31341fi
31342rm -f conftest.err conftest.i conftest.$ac_ext
31343
31344done
31345# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31346rm -f conftest.i conftest.err conftest.$ac_ext
31347if $ac_preproc_ok; then :
31348  break
31349fi
31350
31351    done
31352    ac_cv_prog_CXXCPP=$CXXCPP
31353
31354fi
31355  CXXCPP=$ac_cv_prog_CXXCPP
31356else
31357  ac_cv_prog_CXXCPP=$CXXCPP
31358fi
31359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31360$as_echo "$CXXCPP" >&6; }
31361ac_preproc_ok=false
31362for ac_cxx_preproc_warn_flag in '' yes
31363do
31364  # Use a header file that comes with gcc, so configuring glibc
31365  # with a fresh cross-compiler works.
31366  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31367  # <limits.h> exists even on freestanding compilers.
31368  # On the NeXT, cc -E runs the code through the compiler's parser,
31369  # not just through cpp. "Syntax error" is here to catch this case.
31370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31371/* end confdefs.h.  */
31372#ifdef __STDC__
31373# include <limits.h>
31374#else
31375# include <assert.h>
31376#endif
31377		     Syntax error
31378_ACEOF
31379if ac_fn_cxx_try_cpp "$LINENO"; then :
31380
31381else
31382  # Broken: fails on valid input.
31383continue
31384fi
31385rm -f conftest.err conftest.i conftest.$ac_ext
31386
31387  # OK, works on sane cases.  Now check whether nonexistent headers
31388  # can be detected and how.
31389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31390/* end confdefs.h.  */
31391#include <ac_nonexistent.h>
31392_ACEOF
31393if ac_fn_cxx_try_cpp "$LINENO"; then :
31394  # Broken: success on invalid input.
31395continue
31396else
31397  # Passes both tests.
31398ac_preproc_ok=:
31399break
31400fi
31401rm -f conftest.err conftest.i conftest.$ac_ext
31402
31403done
31404# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31405rm -f conftest.i conftest.err conftest.$ac_ext
31406if $ac_preproc_ok; then :
31407
31408else
31409  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31411as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31412See \`config.log' for more details" "$LINENO" 5; }
31413fi
31414
31415ac_ext=cpp
31416ac_cpp='$CXXCPP $CPPFLAGS'
31417ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31418ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31419ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31420
31421
31422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31423
31424  # First separate the path from the arguments. This will split at the first
31425  # space.
31426  complete="$CXXCPP"
31427  path="${complete%% *}"
31428  tmp="$complete EOL"
31429  arguments="${tmp#* }"
31430
31431  # Input might be given as Windows format, start by converting to
31432  # unix format.
31433  new_path=`$CYGPATH -u "$path"`
31434
31435  # Now try to locate executable using which
31436  new_path=`$WHICH "$new_path" 2> /dev/null`
31437  # bat and cmd files are not always considered executable in cygwin causing which
31438  # to not find them
31439  if test "x$new_path" = x \
31440      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31441      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31442    new_path=`$CYGPATH -u "$path"`
31443  fi
31444  if test "x$new_path" = x; then
31445    # Oops. Which didn't find the executable.
31446    # The splitting of arguments from the executable at a space might have been incorrect,
31447    # since paths with space are more likely in Windows. Give it another try with the whole
31448    # argument.
31449    path="$complete"
31450    arguments="EOL"
31451    new_path=`$CYGPATH -u "$path"`
31452    new_path=`$WHICH "$new_path" 2> /dev/null`
31453    # bat and cmd files are not always considered executable in cygwin causing which
31454    # to not find them
31455    if test "x$new_path" = x \
31456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31458      new_path=`$CYGPATH -u "$path"`
31459    fi
31460    if test "x$new_path" = x; then
31461      # It's still not found. Now this is an unrecoverable error.
31462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31463$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31464      has_space=`$ECHO "$complete" | $GREP " "`
31465      if test "x$has_space" != x; then
31466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31468      fi
31469      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31470    fi
31471  fi
31472
31473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31476  # "foo.exe" is OK but "foo" is an error.
31477  #
31478  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31479  # It is also a way to make sure we got the proper file name for the real test later on.
31480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31481  if test "x$test_shortpath" = x; then
31482    # Short path failed, file does not exist as specified.
31483    # Try adding .exe or .cmd
31484    if test -f "${new_path}.exe"; then
31485      input_to_shortpath="${new_path}.exe"
31486    elif test -f "${new_path}.cmd"; then
31487      input_to_shortpath="${new_path}.cmd"
31488    else
31489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31490$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31491      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31492$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31493      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31494    fi
31495  else
31496    input_to_shortpath="$new_path"
31497  fi
31498
31499  # Call helper function which possibly converts this using DOS-style short mode.
31500  # If so, the updated path is stored in $new_path.
31501  new_path="$input_to_shortpath"
31502
31503  input_path="$input_to_shortpath"
31504  # Check if we need to convert this using DOS-style short mode. If the path
31505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31506  # take no chances and rewrite it.
31507  # Note: m4 eats our [], so we need to use [ and ] instead.
31508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31509  if test "x$has_forbidden_chars" != x; then
31510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31514      # Going to short mode and back again did indeed matter. Since short mode is
31515      # case insensitive, let's make it lowercase to improve readability.
31516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31517      # Now convert it back to Unix-stile (cygpath)
31518      input_path=`$CYGPATH -u "$shortmode_path"`
31519      new_path="$input_path"
31520    fi
31521  fi
31522
31523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31524  if test "x$test_cygdrive_prefix" = x; then
31525    # As a simple fix, exclude /usr/bin since it's not a real path.
31526    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31528      # a path prefixed by /cygdrive for fixpath to work.
31529      new_path="$CYGWIN_ROOT_PATH$input_path"
31530    fi
31531  fi
31532
31533  # remove trailing .exe if any
31534  new_path="${new_path/%.exe/}"
31535
31536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31537
31538  # First separate the path from the arguments. This will split at the first
31539  # space.
31540  complete="$CXXCPP"
31541  path="${complete%% *}"
31542  tmp="$complete EOL"
31543  arguments="${tmp#* }"
31544
31545  # Input might be given as Windows format, start by converting to
31546  # unix format.
31547  new_path="$path"
31548
31549  windows_path="$new_path"
31550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31551    unix_path=`$CYGPATH -u "$windows_path"`
31552    new_path="$unix_path"
31553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31555    new_path="$unix_path"
31556  fi
31557
31558
31559  # Now try to locate executable using which
31560  new_path=`$WHICH "$new_path" 2> /dev/null`
31561
31562  if test "x$new_path" = x; then
31563    # Oops. Which didn't find the executable.
31564    # The splitting of arguments from the executable at a space might have been incorrect,
31565    # since paths with space are more likely in Windows. Give it another try with the whole
31566    # argument.
31567    path="$complete"
31568    arguments="EOL"
31569    new_path="$path"
31570
31571  windows_path="$new_path"
31572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31573    unix_path=`$CYGPATH -u "$windows_path"`
31574    new_path="$unix_path"
31575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31577    new_path="$unix_path"
31578  fi
31579
31580
31581    new_path=`$WHICH "$new_path" 2> /dev/null`
31582    # bat and cmd files are not always considered executable in MSYS causing which
31583    # to not find them
31584    if test "x$new_path" = x \
31585        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31586        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31587      new_path="$path"
31588
31589  windows_path="$new_path"
31590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31591    unix_path=`$CYGPATH -u "$windows_path"`
31592    new_path="$unix_path"
31593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31595    new_path="$unix_path"
31596  fi
31597
31598    fi
31599
31600    if test "x$new_path" = x; then
31601      # It's still not found. Now this is an unrecoverable error.
31602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31603$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31604      has_space=`$ECHO "$complete" | $GREP " "`
31605      if test "x$has_space" != x; then
31606        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31607$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31608      fi
31609      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31610    fi
31611  fi
31612
31613  # Now new_path has a complete unix path to the binary
31614  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31615    # Keep paths in /bin as-is, but remove trailing .exe if any
31616    new_path="${new_path/%.exe/}"
31617    # Do not save /bin paths to all_fixpath_prefixes!
31618  else
31619    # Not in mixed or Windows style, start by that.
31620    new_path=`cmd //c echo $new_path`
31621
31622  input_path="$new_path"
31623  # Check if we need to convert this using DOS-style short mode. If the path
31624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31625  # take no chances and rewrite it.
31626  # Note: m4 eats our [], so we need to use [ and ] instead.
31627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31628  if test "x$has_forbidden_chars" != x; then
31629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31631  fi
31632
31633    # Output is in $new_path
31634
31635  windows_path="$new_path"
31636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31637    unix_path=`$CYGPATH -u "$windows_path"`
31638    new_path="$unix_path"
31639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31641    new_path="$unix_path"
31642  fi
31643
31644    # remove trailing .exe if any
31645    new_path="${new_path/%.exe/}"
31646
31647    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31648    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31649  fi
31650
31651  else
31652    # We're on a posix platform. Hooray! :)
31653    # First separate the path from the arguments. This will split at the first
31654    # space.
31655    complete="$CXXCPP"
31656    path="${complete%% *}"
31657    tmp="$complete EOL"
31658    arguments="${tmp#* }"
31659
31660    # Cannot rely on the command "which" here since it doesn't always work.
31661    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31662    if test -z "$is_absolute_path"; then
31663      # Path to executable is not absolute. Find it.
31664      IFS_save="$IFS"
31665      IFS=:
31666      for p in $PATH; do
31667        if test -f "$p/$path" && test -x "$p/$path"; then
31668          new_path="$p/$path"
31669          break
31670        fi
31671      done
31672      IFS="$IFS_save"
31673    else
31674      # This is an absolute path, we can use it without further modifications.
31675      new_path="$path"
31676    fi
31677
31678    if test "x$new_path" = x; then
31679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31680$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31681      has_space=`$ECHO "$complete" | $GREP " "`
31682      if test "x$has_space" != x; then
31683        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31684$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31685      fi
31686      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31687    fi
31688  fi
31689
31690  # Now join together the path and the arguments once again
31691  if test "x$arguments" != xEOL; then
31692    new_complete="$new_path ${arguments% *}"
31693  else
31694    new_complete="$new_path"
31695  fi
31696
31697  if test "x$complete" != "x$new_complete"; then
31698    CXXCPP="$new_complete"
31699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31700$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31701  fi
31702
31703
31704  #
31705  # Setup the linker (LD)
31706  #
31707  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31708    # In the Microsoft toolchain we have a separate LD command "link".
31709    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31710    # a cygwin program for something completely different.
31711    # Extract the first word of "link", so it can be a program name with args.
31712set dummy link; ac_word=$2
31713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31714$as_echo_n "checking for $ac_word... " >&6; }
31715if ${ac_cv_prog_LD+:} false; then :
31716  $as_echo_n "(cached) " >&6
31717else
31718  if test -n "$LD"; then
31719  ac_cv_prog_LD="$LD" # Let the user override the test.
31720else
31721  ac_prog_rejected=no
31722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31723for as_dir in $PATH
31724do
31725  IFS=$as_save_IFS
31726  test -z "$as_dir" && as_dir=.
31727    for ac_exec_ext in '' $ac_executable_extensions; do
31728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31729    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31730       ac_prog_rejected=yes
31731       continue
31732     fi
31733    ac_cv_prog_LD="link"
31734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31735    break 2
31736  fi
31737done
31738  done
31739IFS=$as_save_IFS
31740
31741if test $ac_prog_rejected = yes; then
31742  # We found a bogon in the path, so make sure we never use it.
31743  set dummy $ac_cv_prog_LD
31744  shift
31745  if test $# != 0; then
31746    # We chose a different compiler from the bogus one.
31747    # However, it has the same basename, so the bogon will be chosen
31748    # first if we set LD to just the basename; use the full file name.
31749    shift
31750    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31751  fi
31752fi
31753fi
31754fi
31755LD=$ac_cv_prog_LD
31756if test -n "$LD"; then
31757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31758$as_echo "$LD" >&6; }
31759else
31760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31761$as_echo "no" >&6; }
31762fi
31763
31764
31765
31766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31767
31768  # First separate the path from the arguments. This will split at the first
31769  # space.
31770  complete="$LD"
31771  path="${complete%% *}"
31772  tmp="$complete EOL"
31773  arguments="${tmp#* }"
31774
31775  # Input might be given as Windows format, start by converting to
31776  # unix format.
31777  new_path=`$CYGPATH -u "$path"`
31778
31779  # Now try to locate executable using which
31780  new_path=`$WHICH "$new_path" 2> /dev/null`
31781  # bat and cmd files are not always considered executable in cygwin causing which
31782  # to not find them
31783  if test "x$new_path" = x \
31784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31786    new_path=`$CYGPATH -u "$path"`
31787  fi
31788  if test "x$new_path" = x; then
31789    # Oops. Which didn't find the executable.
31790    # The splitting of arguments from the executable at a space might have been incorrect,
31791    # since paths with space are more likely in Windows. Give it another try with the whole
31792    # argument.
31793    path="$complete"
31794    arguments="EOL"
31795    new_path=`$CYGPATH -u "$path"`
31796    new_path=`$WHICH "$new_path" 2> /dev/null`
31797    # bat and cmd files are not always considered executable in cygwin causing which
31798    # to not find them
31799    if test "x$new_path" = x \
31800        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31801        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31802      new_path=`$CYGPATH -u "$path"`
31803    fi
31804    if test "x$new_path" = x; then
31805      # It's still not found. Now this is an unrecoverable error.
31806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31807$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31808      has_space=`$ECHO "$complete" | $GREP " "`
31809      if test "x$has_space" != x; then
31810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31812      fi
31813      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31814    fi
31815  fi
31816
31817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31820  # "foo.exe" is OK but "foo" is an error.
31821  #
31822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31823  # It is also a way to make sure we got the proper file name for the real test later on.
31824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31825  if test "x$test_shortpath" = x; then
31826    # Short path failed, file does not exist as specified.
31827    # Try adding .exe or .cmd
31828    if test -f "${new_path}.exe"; then
31829      input_to_shortpath="${new_path}.exe"
31830    elif test -f "${new_path}.cmd"; then
31831      input_to_shortpath="${new_path}.cmd"
31832    else
31833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31834$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31837      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31838    fi
31839  else
31840    input_to_shortpath="$new_path"
31841  fi
31842
31843  # Call helper function which possibly converts this using DOS-style short mode.
31844  # If so, the updated path is stored in $new_path.
31845  new_path="$input_to_shortpath"
31846
31847  input_path="$input_to_shortpath"
31848  # Check if we need to convert this using DOS-style short mode. If the path
31849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31850  # take no chances and rewrite it.
31851  # Note: m4 eats our [], so we need to use [ and ] instead.
31852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31853  if test "x$has_forbidden_chars" != x; then
31854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31858      # Going to short mode and back again did indeed matter. Since short mode is
31859      # case insensitive, let's make it lowercase to improve readability.
31860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31861      # Now convert it back to Unix-stile (cygpath)
31862      input_path=`$CYGPATH -u "$shortmode_path"`
31863      new_path="$input_path"
31864    fi
31865  fi
31866
31867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31868  if test "x$test_cygdrive_prefix" = x; then
31869    # As a simple fix, exclude /usr/bin since it's not a real path.
31870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31872      # a path prefixed by /cygdrive for fixpath to work.
31873      new_path="$CYGWIN_ROOT_PATH$input_path"
31874    fi
31875  fi
31876
31877  # remove trailing .exe if any
31878  new_path="${new_path/%.exe/}"
31879
31880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31881
31882  # First separate the path from the arguments. This will split at the first
31883  # space.
31884  complete="$LD"
31885  path="${complete%% *}"
31886  tmp="$complete EOL"
31887  arguments="${tmp#* }"
31888
31889  # Input might be given as Windows format, start by converting to
31890  # unix format.
31891  new_path="$path"
31892
31893  windows_path="$new_path"
31894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31895    unix_path=`$CYGPATH -u "$windows_path"`
31896    new_path="$unix_path"
31897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31899    new_path="$unix_path"
31900  fi
31901
31902
31903  # Now try to locate executable using which
31904  new_path=`$WHICH "$new_path" 2> /dev/null`
31905
31906  if test "x$new_path" = x; then
31907    # Oops. Which didn't find the executable.
31908    # The splitting of arguments from the executable at a space might have been incorrect,
31909    # since paths with space are more likely in Windows. Give it another try with the whole
31910    # argument.
31911    path="$complete"
31912    arguments="EOL"
31913    new_path="$path"
31914
31915  windows_path="$new_path"
31916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31917    unix_path=`$CYGPATH -u "$windows_path"`
31918    new_path="$unix_path"
31919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31921    new_path="$unix_path"
31922  fi
31923
31924
31925    new_path=`$WHICH "$new_path" 2> /dev/null`
31926    # bat and cmd files are not always considered executable in MSYS causing which
31927    # to not find them
31928    if test "x$new_path" = x \
31929        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31930        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31931      new_path="$path"
31932
31933  windows_path="$new_path"
31934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31935    unix_path=`$CYGPATH -u "$windows_path"`
31936    new_path="$unix_path"
31937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31939    new_path="$unix_path"
31940  fi
31941
31942    fi
31943
31944    if test "x$new_path" = x; then
31945      # It's still not found. Now this is an unrecoverable error.
31946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31947$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31948      has_space=`$ECHO "$complete" | $GREP " "`
31949      if test "x$has_space" != x; then
31950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31952      fi
31953      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31954    fi
31955  fi
31956
31957  # Now new_path has a complete unix path to the binary
31958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31959    # Keep paths in /bin as-is, but remove trailing .exe if any
31960    new_path="${new_path/%.exe/}"
31961    # Do not save /bin paths to all_fixpath_prefixes!
31962  else
31963    # Not in mixed or Windows style, start by that.
31964    new_path=`cmd //c echo $new_path`
31965
31966  input_path="$new_path"
31967  # Check if we need to convert this using DOS-style short mode. If the path
31968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31969  # take no chances and rewrite it.
31970  # Note: m4 eats our [], so we need to use [ and ] instead.
31971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31972  if test "x$has_forbidden_chars" != x; then
31973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31975  fi
31976
31977    # Output is in $new_path
31978
31979  windows_path="$new_path"
31980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31981    unix_path=`$CYGPATH -u "$windows_path"`
31982    new_path="$unix_path"
31983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31985    new_path="$unix_path"
31986  fi
31987
31988    # remove trailing .exe if any
31989    new_path="${new_path/%.exe/}"
31990
31991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31993  fi
31994
31995  else
31996    # We're on a posix platform. Hooray! :)
31997    # First separate the path from the arguments. This will split at the first
31998    # space.
31999    complete="$LD"
32000    path="${complete%% *}"
32001    tmp="$complete EOL"
32002    arguments="${tmp#* }"
32003
32004    # Cannot rely on the command "which" here since it doesn't always work.
32005    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32006    if test -z "$is_absolute_path"; then
32007      # Path to executable is not absolute. Find it.
32008      IFS_save="$IFS"
32009      IFS=:
32010      for p in $PATH; do
32011        if test -f "$p/$path" && test -x "$p/$path"; then
32012          new_path="$p/$path"
32013          break
32014        fi
32015      done
32016      IFS="$IFS_save"
32017    else
32018      # This is an absolute path, we can use it without further modifications.
32019      new_path="$path"
32020    fi
32021
32022    if test "x$new_path" = x; then
32023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32024$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32025      has_space=`$ECHO "$complete" | $GREP " "`
32026      if test "x$has_space" != x; then
32027        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32028$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32029      fi
32030      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32031    fi
32032  fi
32033
32034  # Now join together the path and the arguments once again
32035  if test "x$arguments" != xEOL; then
32036    new_complete="$new_path ${arguments% *}"
32037  else
32038    new_complete="$new_path"
32039  fi
32040
32041  if test "x$complete" != "x$new_complete"; then
32042    LD="$new_complete"
32043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32044$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32045  fi
32046
32047    # Verify that we indeed succeeded with this trick.
32048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32049$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32050    "$LD" --version > /dev/null
32051    if test $? -eq 0 ; then
32052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32053$as_echo "no" >&6; }
32054      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32055    else
32056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32057$as_echo "yes" >&6; }
32058    fi
32059    LDCXX="$LD"
32060  else
32061    # All other toolchains use the compiler to link.
32062    LD="$CC"
32063    LDCXX="$CXX"
32064  fi
32065
32066  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32067
32068
32069  #
32070  # Setup the assembler (AS)
32071  #
32072  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32073    # FIXME: should this really be solaris, or solstudio?
32074
32075
32076  # Publish this variable in the help.
32077
32078
32079  if test "x$AS" = x; then
32080    # The variable is not set by user, try to locate tool using the code snippet
32081    for ac_prog in as
32082do
32083  # Extract the first word of "$ac_prog", so it can be a program name with args.
32084set dummy $ac_prog; ac_word=$2
32085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32086$as_echo_n "checking for $ac_word... " >&6; }
32087if ${ac_cv_path_AS+:} false; then :
32088  $as_echo_n "(cached) " >&6
32089else
32090  case $AS in
32091  [\\/]* | ?:[\\/]*)
32092  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32093  ;;
32094  *)
32095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32096for as_dir in $PATH
32097do
32098  IFS=$as_save_IFS
32099  test -z "$as_dir" && as_dir=.
32100    for ac_exec_ext in '' $ac_executable_extensions; do
32101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32102    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32104    break 2
32105  fi
32106done
32107  done
32108IFS=$as_save_IFS
32109
32110  ;;
32111esac
32112fi
32113AS=$ac_cv_path_AS
32114if test -n "$AS"; then
32115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32116$as_echo "$AS" >&6; }
32117else
32118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32119$as_echo "no" >&6; }
32120fi
32121
32122
32123  test -n "$AS" && break
32124done
32125
32126  else
32127    # The variable is set, but is it from the command line or the environment?
32128
32129    # Try to remove the string !AS! from our list.
32130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32132      # If it failed, the variable was not from the command line. Ignore it,
32133      # but warn the user (except for BASH, which is always set by the calling BASH).
32134      if test "xAS" != xBASH; then
32135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32136$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32137      fi
32138      # Try to locate tool using the code snippet
32139      for ac_prog in as
32140do
32141  # Extract the first word of "$ac_prog", so it can be a program name with args.
32142set dummy $ac_prog; ac_word=$2
32143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32144$as_echo_n "checking for $ac_word... " >&6; }
32145if ${ac_cv_path_AS+:} false; then :
32146  $as_echo_n "(cached) " >&6
32147else
32148  case $AS in
32149  [\\/]* | ?:[\\/]*)
32150  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32151  ;;
32152  *)
32153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32154for as_dir in $PATH
32155do
32156  IFS=$as_save_IFS
32157  test -z "$as_dir" && as_dir=.
32158    for ac_exec_ext in '' $ac_executable_extensions; do
32159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32160    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32162    break 2
32163  fi
32164done
32165  done
32166IFS=$as_save_IFS
32167
32168  ;;
32169esac
32170fi
32171AS=$ac_cv_path_AS
32172if test -n "$AS"; then
32173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32174$as_echo "$AS" >&6; }
32175else
32176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32177$as_echo "no" >&6; }
32178fi
32179
32180
32181  test -n "$AS" && break
32182done
32183
32184    else
32185      # If it succeeded, then it was overridden by the user. We will use it
32186      # for the tool.
32187
32188      # First remove it from the list of overridden variables, so we can test
32189      # for unknown variables in the end.
32190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32191
32192      # Check if the provided tool contains a complete path.
32193      tool_specified="$AS"
32194      tool_basename="${tool_specified##*/}"
32195      if test "x$tool_basename" = "x$tool_specified"; then
32196        # A command without a complete path is provided, search $PATH.
32197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32198$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32199        # Extract the first word of "$tool_basename", so it can be a program name with args.
32200set dummy $tool_basename; ac_word=$2
32201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32202$as_echo_n "checking for $ac_word... " >&6; }
32203if ${ac_cv_path_AS+:} false; then :
32204  $as_echo_n "(cached) " >&6
32205else
32206  case $AS in
32207  [\\/]* | ?:[\\/]*)
32208  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32209  ;;
32210  *)
32211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32212for as_dir in $PATH
32213do
32214  IFS=$as_save_IFS
32215  test -z "$as_dir" && as_dir=.
32216    for ac_exec_ext in '' $ac_executable_extensions; do
32217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32218    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32220    break 2
32221  fi
32222done
32223  done
32224IFS=$as_save_IFS
32225
32226  ;;
32227esac
32228fi
32229AS=$ac_cv_path_AS
32230if test -n "$AS"; then
32231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32232$as_echo "$AS" >&6; }
32233else
32234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32235$as_echo "no" >&6; }
32236fi
32237
32238
32239        if test "x$AS" = x; then
32240          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32241        fi
32242      else
32243        # Otherwise we believe it is a complete path. Use it as it is.
32244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32245$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32247$as_echo_n "checking for AS... " >&6; }
32248        if test ! -x "$tool_specified"; then
32249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32250$as_echo "not found" >&6; }
32251          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32252        fi
32253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32254$as_echo "$tool_specified" >&6; }
32255      fi
32256    fi
32257  fi
32258
32259
32260
32261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32262
32263  # First separate the path from the arguments. This will split at the first
32264  # space.
32265  complete="$AS"
32266  path="${complete%% *}"
32267  tmp="$complete EOL"
32268  arguments="${tmp#* }"
32269
32270  # Input might be given as Windows format, start by converting to
32271  # unix format.
32272  new_path=`$CYGPATH -u "$path"`
32273
32274  # Now try to locate executable using which
32275  new_path=`$WHICH "$new_path" 2> /dev/null`
32276  # bat and cmd files are not always considered executable in cygwin causing which
32277  # to not find them
32278  if test "x$new_path" = x \
32279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32281    new_path=`$CYGPATH -u "$path"`
32282  fi
32283  if test "x$new_path" = x; then
32284    # Oops. Which didn't find the executable.
32285    # The splitting of arguments from the executable at a space might have been incorrect,
32286    # since paths with space are more likely in Windows. Give it another try with the whole
32287    # argument.
32288    path="$complete"
32289    arguments="EOL"
32290    new_path=`$CYGPATH -u "$path"`
32291    new_path=`$WHICH "$new_path" 2> /dev/null`
32292    # bat and cmd files are not always considered executable in cygwin causing which
32293    # to not find them
32294    if test "x$new_path" = x \
32295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32297      new_path=`$CYGPATH -u "$path"`
32298    fi
32299    if test "x$new_path" = x; then
32300      # It's still not found. Now this is an unrecoverable error.
32301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32302$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32303      has_space=`$ECHO "$complete" | $GREP " "`
32304      if test "x$has_space" != x; then
32305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32307      fi
32308      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32309    fi
32310  fi
32311
32312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32315  # "foo.exe" is OK but "foo" is an error.
32316  #
32317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32318  # It is also a way to make sure we got the proper file name for the real test later on.
32319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32320  if test "x$test_shortpath" = x; then
32321    # Short path failed, file does not exist as specified.
32322    # Try adding .exe or .cmd
32323    if test -f "${new_path}.exe"; then
32324      input_to_shortpath="${new_path}.exe"
32325    elif test -f "${new_path}.cmd"; then
32326      input_to_shortpath="${new_path}.cmd"
32327    else
32328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32329$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32332      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32333    fi
32334  else
32335    input_to_shortpath="$new_path"
32336  fi
32337
32338  # Call helper function which possibly converts this using DOS-style short mode.
32339  # If so, the updated path is stored in $new_path.
32340  new_path="$input_to_shortpath"
32341
32342  input_path="$input_to_shortpath"
32343  # Check if we need to convert this using DOS-style short mode. If the path
32344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32345  # take no chances and rewrite it.
32346  # Note: m4 eats our [], so we need to use [ and ] instead.
32347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32348  if test "x$has_forbidden_chars" != x; then
32349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32353      # Going to short mode and back again did indeed matter. Since short mode is
32354      # case insensitive, let's make it lowercase to improve readability.
32355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32356      # Now convert it back to Unix-stile (cygpath)
32357      input_path=`$CYGPATH -u "$shortmode_path"`
32358      new_path="$input_path"
32359    fi
32360  fi
32361
32362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32363  if test "x$test_cygdrive_prefix" = x; then
32364    # As a simple fix, exclude /usr/bin since it's not a real path.
32365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32367      # a path prefixed by /cygdrive for fixpath to work.
32368      new_path="$CYGWIN_ROOT_PATH$input_path"
32369    fi
32370  fi
32371
32372  # remove trailing .exe if any
32373  new_path="${new_path/%.exe/}"
32374
32375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32376
32377  # First separate the path from the arguments. This will split at the first
32378  # space.
32379  complete="$AS"
32380  path="${complete%% *}"
32381  tmp="$complete EOL"
32382  arguments="${tmp#* }"
32383
32384  # Input might be given as Windows format, start by converting to
32385  # unix format.
32386  new_path="$path"
32387
32388  windows_path="$new_path"
32389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32390    unix_path=`$CYGPATH -u "$windows_path"`
32391    new_path="$unix_path"
32392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32394    new_path="$unix_path"
32395  fi
32396
32397
32398  # Now try to locate executable using which
32399  new_path=`$WHICH "$new_path" 2> /dev/null`
32400
32401  if test "x$new_path" = x; then
32402    # Oops. Which didn't find the executable.
32403    # The splitting of arguments from the executable at a space might have been incorrect,
32404    # since paths with space are more likely in Windows. Give it another try with the whole
32405    # argument.
32406    path="$complete"
32407    arguments="EOL"
32408    new_path="$path"
32409
32410  windows_path="$new_path"
32411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32412    unix_path=`$CYGPATH -u "$windows_path"`
32413    new_path="$unix_path"
32414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32416    new_path="$unix_path"
32417  fi
32418
32419
32420    new_path=`$WHICH "$new_path" 2> /dev/null`
32421    # bat and cmd files are not always considered executable in MSYS causing which
32422    # to not find them
32423    if test "x$new_path" = x \
32424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32426      new_path="$path"
32427
32428  windows_path="$new_path"
32429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32430    unix_path=`$CYGPATH -u "$windows_path"`
32431    new_path="$unix_path"
32432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32434    new_path="$unix_path"
32435  fi
32436
32437    fi
32438
32439    if test "x$new_path" = x; then
32440      # It's still not found. Now this is an unrecoverable error.
32441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32442$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32443      has_space=`$ECHO "$complete" | $GREP " "`
32444      if test "x$has_space" != x; then
32445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32447      fi
32448      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32449    fi
32450  fi
32451
32452  # Now new_path has a complete unix path to the binary
32453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32454    # Keep paths in /bin as-is, but remove trailing .exe if any
32455    new_path="${new_path/%.exe/}"
32456    # Do not save /bin paths to all_fixpath_prefixes!
32457  else
32458    # Not in mixed or Windows style, start by that.
32459    new_path=`cmd //c echo $new_path`
32460
32461  input_path="$new_path"
32462  # Check if we need to convert this using DOS-style short mode. If the path
32463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32464  # take no chances and rewrite it.
32465  # Note: m4 eats our [], so we need to use [ and ] instead.
32466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32467  if test "x$has_forbidden_chars" != x; then
32468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32470  fi
32471
32472    # Output is in $new_path
32473
32474  windows_path="$new_path"
32475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32476    unix_path=`$CYGPATH -u "$windows_path"`
32477    new_path="$unix_path"
32478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32480    new_path="$unix_path"
32481  fi
32482
32483    # remove trailing .exe if any
32484    new_path="${new_path/%.exe/}"
32485
32486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32488  fi
32489
32490  else
32491    # We're on a posix platform. Hooray! :)
32492    # First separate the path from the arguments. This will split at the first
32493    # space.
32494    complete="$AS"
32495    path="${complete%% *}"
32496    tmp="$complete EOL"
32497    arguments="${tmp#* }"
32498
32499    # Cannot rely on the command "which" here since it doesn't always work.
32500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32501    if test -z "$is_absolute_path"; then
32502      # Path to executable is not absolute. Find it.
32503      IFS_save="$IFS"
32504      IFS=:
32505      for p in $PATH; do
32506        if test -f "$p/$path" && test -x "$p/$path"; then
32507          new_path="$p/$path"
32508          break
32509        fi
32510      done
32511      IFS="$IFS_save"
32512    else
32513      # This is an absolute path, we can use it without further modifications.
32514      new_path="$path"
32515    fi
32516
32517    if test "x$new_path" = x; then
32518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32519$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32520      has_space=`$ECHO "$complete" | $GREP " "`
32521      if test "x$has_space" != x; then
32522        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32524      fi
32525      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32526    fi
32527  fi
32528
32529  # Now join together the path and the arguments once again
32530  if test "x$arguments" != xEOL; then
32531    new_complete="$new_path ${arguments% *}"
32532  else
32533    new_complete="$new_path"
32534  fi
32535
32536  if test "x$complete" != "x$new_complete"; then
32537    AS="$new_complete"
32538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32539$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32540  fi
32541
32542  else
32543    # FIXME: is this correct for microsoft?
32544    AS="$CC -c"
32545  fi
32546
32547
32548  #
32549  # Setup the archiver (AR)
32550  #
32551  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32552    # The corresponding ar tool is lib.exe (used to create static libraries)
32553    # Extract the first word of "lib", so it can be a program name with args.
32554set dummy lib; ac_word=$2
32555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32556$as_echo_n "checking for $ac_word... " >&6; }
32557if ${ac_cv_prog_AR+:} false; then :
32558  $as_echo_n "(cached) " >&6
32559else
32560  if test -n "$AR"; then
32561  ac_cv_prog_AR="$AR" # Let the user override the test.
32562else
32563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32564for as_dir in $PATH
32565do
32566  IFS=$as_save_IFS
32567  test -z "$as_dir" && as_dir=.
32568    for ac_exec_ext in '' $ac_executable_extensions; do
32569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32570    ac_cv_prog_AR="lib"
32571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32572    break 2
32573  fi
32574done
32575  done
32576IFS=$as_save_IFS
32577
32578fi
32579fi
32580AR=$ac_cv_prog_AR
32581if test -n "$AR"; then
32582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32583$as_echo "$AR" >&6; }
32584else
32585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32586$as_echo "no" >&6; }
32587fi
32588
32589
32590  else
32591
32592
32593  # Publish this variable in the help.
32594
32595
32596  if test "x$AR" = x; then
32597    # The variable is not set by user, try to locate tool using the code snippet
32598    if test -n "$ac_tool_prefix"; then
32599  for ac_prog in ar
32600  do
32601    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32602set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32604$as_echo_n "checking for $ac_word... " >&6; }
32605if ${ac_cv_prog_AR+:} false; then :
32606  $as_echo_n "(cached) " >&6
32607else
32608  if test -n "$AR"; then
32609  ac_cv_prog_AR="$AR" # Let the user override the test.
32610else
32611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32612for as_dir in $PATH
32613do
32614  IFS=$as_save_IFS
32615  test -z "$as_dir" && as_dir=.
32616    for ac_exec_ext in '' $ac_executable_extensions; do
32617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32618    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32620    break 2
32621  fi
32622done
32623  done
32624IFS=$as_save_IFS
32625
32626fi
32627fi
32628AR=$ac_cv_prog_AR
32629if test -n "$AR"; then
32630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32631$as_echo "$AR" >&6; }
32632else
32633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32634$as_echo "no" >&6; }
32635fi
32636
32637
32638    test -n "$AR" && break
32639  done
32640fi
32641if test -z "$AR"; then
32642  ac_ct_AR=$AR
32643  for ac_prog in ar
32644do
32645  # Extract the first word of "$ac_prog", so it can be a program name with args.
32646set dummy $ac_prog; ac_word=$2
32647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32648$as_echo_n "checking for $ac_word... " >&6; }
32649if ${ac_cv_prog_ac_ct_AR+:} false; then :
32650  $as_echo_n "(cached) " >&6
32651else
32652  if test -n "$ac_ct_AR"; then
32653  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32654else
32655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32656for as_dir in $PATH
32657do
32658  IFS=$as_save_IFS
32659  test -z "$as_dir" && as_dir=.
32660    for ac_exec_ext in '' $ac_executable_extensions; do
32661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32662    ac_cv_prog_ac_ct_AR="$ac_prog"
32663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32664    break 2
32665  fi
32666done
32667  done
32668IFS=$as_save_IFS
32669
32670fi
32671fi
32672ac_ct_AR=$ac_cv_prog_ac_ct_AR
32673if test -n "$ac_ct_AR"; then
32674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32675$as_echo "$ac_ct_AR" >&6; }
32676else
32677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32678$as_echo "no" >&6; }
32679fi
32680
32681
32682  test -n "$ac_ct_AR" && break
32683done
32684
32685  if test "x$ac_ct_AR" = x; then
32686    AR=""
32687  else
32688    case $cross_compiling:$ac_tool_warned in
32689yes:)
32690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32692ac_tool_warned=yes ;;
32693esac
32694    AR=$ac_ct_AR
32695  fi
32696fi
32697
32698  else
32699    # The variable is set, but is it from the command line or the environment?
32700
32701    # Try to remove the string !AR! from our list.
32702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32704      # If it failed, the variable was not from the command line. Ignore it,
32705      # but warn the user (except for BASH, which is always set by the calling BASH).
32706      if test "xAR" != xBASH; then
32707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32708$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32709      fi
32710      # Try to locate tool using the code snippet
32711      if test -n "$ac_tool_prefix"; then
32712  for ac_prog in ar
32713  do
32714    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32715set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32717$as_echo_n "checking for $ac_word... " >&6; }
32718if ${ac_cv_prog_AR+:} false; then :
32719  $as_echo_n "(cached) " >&6
32720else
32721  if test -n "$AR"; then
32722  ac_cv_prog_AR="$AR" # Let the user override the test.
32723else
32724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32725for as_dir in $PATH
32726do
32727  IFS=$as_save_IFS
32728  test -z "$as_dir" && as_dir=.
32729    for ac_exec_ext in '' $ac_executable_extensions; do
32730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32731    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32733    break 2
32734  fi
32735done
32736  done
32737IFS=$as_save_IFS
32738
32739fi
32740fi
32741AR=$ac_cv_prog_AR
32742if test -n "$AR"; then
32743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32744$as_echo "$AR" >&6; }
32745else
32746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32747$as_echo "no" >&6; }
32748fi
32749
32750
32751    test -n "$AR" && break
32752  done
32753fi
32754if test -z "$AR"; then
32755  ac_ct_AR=$AR
32756  for ac_prog in ar
32757do
32758  # Extract the first word of "$ac_prog", so it can be a program name with args.
32759set dummy $ac_prog; ac_word=$2
32760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32761$as_echo_n "checking for $ac_word... " >&6; }
32762if ${ac_cv_prog_ac_ct_AR+:} false; then :
32763  $as_echo_n "(cached) " >&6
32764else
32765  if test -n "$ac_ct_AR"; then
32766  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32767else
32768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32769for as_dir in $PATH
32770do
32771  IFS=$as_save_IFS
32772  test -z "$as_dir" && as_dir=.
32773    for ac_exec_ext in '' $ac_executable_extensions; do
32774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32775    ac_cv_prog_ac_ct_AR="$ac_prog"
32776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32777    break 2
32778  fi
32779done
32780  done
32781IFS=$as_save_IFS
32782
32783fi
32784fi
32785ac_ct_AR=$ac_cv_prog_ac_ct_AR
32786if test -n "$ac_ct_AR"; then
32787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32788$as_echo "$ac_ct_AR" >&6; }
32789else
32790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32791$as_echo "no" >&6; }
32792fi
32793
32794
32795  test -n "$ac_ct_AR" && break
32796done
32797
32798  if test "x$ac_ct_AR" = x; then
32799    AR=""
32800  else
32801    case $cross_compiling:$ac_tool_warned in
32802yes:)
32803{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32804$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32805ac_tool_warned=yes ;;
32806esac
32807    AR=$ac_ct_AR
32808  fi
32809fi
32810
32811    else
32812      # If it succeeded, then it was overridden by the user. We will use it
32813      # for the tool.
32814
32815      # First remove it from the list of overridden variables, so we can test
32816      # for unknown variables in the end.
32817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32818
32819      # Check if the provided tool contains a complete path.
32820      tool_specified="$AR"
32821      tool_basename="${tool_specified##*/}"
32822      if test "x$tool_basename" = "x$tool_specified"; then
32823        # A command without a complete path is provided, search $PATH.
32824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32825$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32826        # Extract the first word of "$tool_basename", so it can be a program name with args.
32827set dummy $tool_basename; ac_word=$2
32828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32829$as_echo_n "checking for $ac_word... " >&6; }
32830if ${ac_cv_path_AR+:} false; then :
32831  $as_echo_n "(cached) " >&6
32832else
32833  case $AR in
32834  [\\/]* | ?:[\\/]*)
32835  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32836  ;;
32837  *)
32838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32839for as_dir in $PATH
32840do
32841  IFS=$as_save_IFS
32842  test -z "$as_dir" && as_dir=.
32843    for ac_exec_ext in '' $ac_executable_extensions; do
32844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32845    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32847    break 2
32848  fi
32849done
32850  done
32851IFS=$as_save_IFS
32852
32853  ;;
32854esac
32855fi
32856AR=$ac_cv_path_AR
32857if test -n "$AR"; then
32858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32859$as_echo "$AR" >&6; }
32860else
32861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32862$as_echo "no" >&6; }
32863fi
32864
32865
32866        if test "x$AR" = x; then
32867          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32868        fi
32869      else
32870        # Otherwise we believe it is a complete path. Use it as it is.
32871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32872$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32874$as_echo_n "checking for AR... " >&6; }
32875        if test ! -x "$tool_specified"; then
32876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32877$as_echo "not found" >&6; }
32878          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32879        fi
32880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32881$as_echo "$tool_specified" >&6; }
32882      fi
32883    fi
32884  fi
32885
32886
32887  fi
32888
32889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32890
32891  # First separate the path from the arguments. This will split at the first
32892  # space.
32893  complete="$AR"
32894  path="${complete%% *}"
32895  tmp="$complete EOL"
32896  arguments="${tmp#* }"
32897
32898  # Input might be given as Windows format, start by converting to
32899  # unix format.
32900  new_path=`$CYGPATH -u "$path"`
32901
32902  # Now try to locate executable using which
32903  new_path=`$WHICH "$new_path" 2> /dev/null`
32904  # bat and cmd files are not always considered executable in cygwin causing which
32905  # to not find them
32906  if test "x$new_path" = x \
32907      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32908      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32909    new_path=`$CYGPATH -u "$path"`
32910  fi
32911  if test "x$new_path" = x; then
32912    # Oops. Which didn't find the executable.
32913    # The splitting of arguments from the executable at a space might have been incorrect,
32914    # since paths with space are more likely in Windows. Give it another try with the whole
32915    # argument.
32916    path="$complete"
32917    arguments="EOL"
32918    new_path=`$CYGPATH -u "$path"`
32919    new_path=`$WHICH "$new_path" 2> /dev/null`
32920    # bat and cmd files are not always considered executable in cygwin causing which
32921    # to not find them
32922    if test "x$new_path" = x \
32923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32925      new_path=`$CYGPATH -u "$path"`
32926    fi
32927    if test "x$new_path" = x; then
32928      # It's still not found. Now this is an unrecoverable error.
32929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32930$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32931      has_space=`$ECHO "$complete" | $GREP " "`
32932      if test "x$has_space" != x; then
32933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32935      fi
32936      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32937    fi
32938  fi
32939
32940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32943  # "foo.exe" is OK but "foo" is an error.
32944  #
32945  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32946  # It is also a way to make sure we got the proper file name for the real test later on.
32947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32948  if test "x$test_shortpath" = x; then
32949    # Short path failed, file does not exist as specified.
32950    # Try adding .exe or .cmd
32951    if test -f "${new_path}.exe"; then
32952      input_to_shortpath="${new_path}.exe"
32953    elif test -f "${new_path}.cmd"; then
32954      input_to_shortpath="${new_path}.cmd"
32955    else
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32957$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32958      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32959$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32960      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32961    fi
32962  else
32963    input_to_shortpath="$new_path"
32964  fi
32965
32966  # Call helper function which possibly converts this using DOS-style short mode.
32967  # If so, the updated path is stored in $new_path.
32968  new_path="$input_to_shortpath"
32969
32970  input_path="$input_to_shortpath"
32971  # Check if we need to convert this using DOS-style short mode. If the path
32972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32973  # take no chances and rewrite it.
32974  # Note: m4 eats our [], so we need to use [ and ] instead.
32975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32976  if test "x$has_forbidden_chars" != x; then
32977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32981      # Going to short mode and back again did indeed matter. Since short mode is
32982      # case insensitive, let's make it lowercase to improve readability.
32983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32984      # Now convert it back to Unix-stile (cygpath)
32985      input_path=`$CYGPATH -u "$shortmode_path"`
32986      new_path="$input_path"
32987    fi
32988  fi
32989
32990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32991  if test "x$test_cygdrive_prefix" = x; then
32992    # As a simple fix, exclude /usr/bin since it's not a real path.
32993    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32995      # a path prefixed by /cygdrive for fixpath to work.
32996      new_path="$CYGWIN_ROOT_PATH$input_path"
32997    fi
32998  fi
32999
33000  # remove trailing .exe if any
33001  new_path="${new_path/%.exe/}"
33002
33003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33004
33005  # First separate the path from the arguments. This will split at the first
33006  # space.
33007  complete="$AR"
33008  path="${complete%% *}"
33009  tmp="$complete EOL"
33010  arguments="${tmp#* }"
33011
33012  # Input might be given as Windows format, start by converting to
33013  # unix format.
33014  new_path="$path"
33015
33016  windows_path="$new_path"
33017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33018    unix_path=`$CYGPATH -u "$windows_path"`
33019    new_path="$unix_path"
33020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33022    new_path="$unix_path"
33023  fi
33024
33025
33026  # Now try to locate executable using which
33027  new_path=`$WHICH "$new_path" 2> /dev/null`
33028
33029  if test "x$new_path" = x; then
33030    # Oops. Which didn't find the executable.
33031    # The splitting of arguments from the executable at a space might have been incorrect,
33032    # since paths with space are more likely in Windows. Give it another try with the whole
33033    # argument.
33034    path="$complete"
33035    arguments="EOL"
33036    new_path="$path"
33037
33038  windows_path="$new_path"
33039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33040    unix_path=`$CYGPATH -u "$windows_path"`
33041    new_path="$unix_path"
33042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33044    new_path="$unix_path"
33045  fi
33046
33047
33048    new_path=`$WHICH "$new_path" 2> /dev/null`
33049    # bat and cmd files are not always considered executable in MSYS causing which
33050    # to not find them
33051    if test "x$new_path" = x \
33052        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33053        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33054      new_path="$path"
33055
33056  windows_path="$new_path"
33057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33058    unix_path=`$CYGPATH -u "$windows_path"`
33059    new_path="$unix_path"
33060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33062    new_path="$unix_path"
33063  fi
33064
33065    fi
33066
33067    if test "x$new_path" = x; then
33068      # It's still not found. Now this is an unrecoverable error.
33069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33070$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33071      has_space=`$ECHO "$complete" | $GREP " "`
33072      if test "x$has_space" != x; then
33073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33075      fi
33076      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33077    fi
33078  fi
33079
33080  # Now new_path has a complete unix path to the binary
33081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33082    # Keep paths in /bin as-is, but remove trailing .exe if any
33083    new_path="${new_path/%.exe/}"
33084    # Do not save /bin paths to all_fixpath_prefixes!
33085  else
33086    # Not in mixed or Windows style, start by that.
33087    new_path=`cmd //c echo $new_path`
33088
33089  input_path="$new_path"
33090  # Check if we need to convert this using DOS-style short mode. If the path
33091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33092  # take no chances and rewrite it.
33093  # Note: m4 eats our [], so we need to use [ and ] instead.
33094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33095  if test "x$has_forbidden_chars" != x; then
33096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33098  fi
33099
33100    # Output is in $new_path
33101
33102  windows_path="$new_path"
33103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33104    unix_path=`$CYGPATH -u "$windows_path"`
33105    new_path="$unix_path"
33106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33108    new_path="$unix_path"
33109  fi
33110
33111    # remove trailing .exe if any
33112    new_path="${new_path/%.exe/}"
33113
33114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33116  fi
33117
33118  else
33119    # We're on a posix platform. Hooray! :)
33120    # First separate the path from the arguments. This will split at the first
33121    # space.
33122    complete="$AR"
33123    path="${complete%% *}"
33124    tmp="$complete EOL"
33125    arguments="${tmp#* }"
33126
33127    # Cannot rely on the command "which" here since it doesn't always work.
33128    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33129    if test -z "$is_absolute_path"; then
33130      # Path to executable is not absolute. Find it.
33131      IFS_save="$IFS"
33132      IFS=:
33133      for p in $PATH; do
33134        if test -f "$p/$path" && test -x "$p/$path"; then
33135          new_path="$p/$path"
33136          break
33137        fi
33138      done
33139      IFS="$IFS_save"
33140    else
33141      # This is an absolute path, we can use it without further modifications.
33142      new_path="$path"
33143    fi
33144
33145    if test "x$new_path" = x; then
33146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33147$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33148      has_space=`$ECHO "$complete" | $GREP " "`
33149      if test "x$has_space" != x; then
33150        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33151$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33152      fi
33153      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33154    fi
33155  fi
33156
33157  # Now join together the path and the arguments once again
33158  if test "x$arguments" != xEOL; then
33159    new_complete="$new_path ${arguments% *}"
33160  else
33161    new_complete="$new_path"
33162  fi
33163
33164  if test "x$complete" != "x$new_complete"; then
33165    AR="$new_complete"
33166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33167$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33168  fi
33169
33170
33171
33172  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33173    ac_ext=m
33174ac_cpp='$OBJCPP $CPPFLAGS'
33175ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33176ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33177ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33178if test -n "$ac_tool_prefix"; then
33179  for ac_prog in gcc objcc objc cc CC
33180  do
33181    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33182set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33184$as_echo_n "checking for $ac_word... " >&6; }
33185if ${ac_cv_prog_OBJC+:} false; then :
33186  $as_echo_n "(cached) " >&6
33187else
33188  if test -n "$OBJC"; then
33189  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33190else
33191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33192for as_dir in $PATH
33193do
33194  IFS=$as_save_IFS
33195  test -z "$as_dir" && as_dir=.
33196    for ac_exec_ext in '' $ac_executable_extensions; do
33197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33198    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33200    break 2
33201  fi
33202done
33203  done
33204IFS=$as_save_IFS
33205
33206fi
33207fi
33208OBJC=$ac_cv_prog_OBJC
33209if test -n "$OBJC"; then
33210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33211$as_echo "$OBJC" >&6; }
33212else
33213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33214$as_echo "no" >&6; }
33215fi
33216
33217
33218    test -n "$OBJC" && break
33219  done
33220fi
33221if test -z "$OBJC"; then
33222  ac_ct_OBJC=$OBJC
33223  for ac_prog in gcc objcc objc cc CC
33224do
33225  # Extract the first word of "$ac_prog", so it can be a program name with args.
33226set dummy $ac_prog; ac_word=$2
33227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33228$as_echo_n "checking for $ac_word... " >&6; }
33229if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33230  $as_echo_n "(cached) " >&6
33231else
33232  if test -n "$ac_ct_OBJC"; then
33233  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33234else
33235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33236for as_dir in $PATH
33237do
33238  IFS=$as_save_IFS
33239  test -z "$as_dir" && as_dir=.
33240    for ac_exec_ext in '' $ac_executable_extensions; do
33241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33242    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33244    break 2
33245  fi
33246done
33247  done
33248IFS=$as_save_IFS
33249
33250fi
33251fi
33252ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33253if test -n "$ac_ct_OBJC"; then
33254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33255$as_echo "$ac_ct_OBJC" >&6; }
33256else
33257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33258$as_echo "no" >&6; }
33259fi
33260
33261
33262  test -n "$ac_ct_OBJC" && break
33263done
33264
33265  if test "x$ac_ct_OBJC" = x; then
33266    OBJC="gcc"
33267  else
33268    case $cross_compiling:$ac_tool_warned in
33269yes:)
33270{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33271$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33272ac_tool_warned=yes ;;
33273esac
33274    OBJC=$ac_ct_OBJC
33275  fi
33276fi
33277
33278# Provide some information about the compiler.
33279$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33280set X $ac_compile
33281ac_compiler=$2
33282for ac_option in --version -v -V -qversion; do
33283  { { ac_try="$ac_compiler $ac_option >&5"
33284case "(($ac_try" in
33285  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33286  *) ac_try_echo=$ac_try;;
33287esac
33288eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33289$as_echo "$ac_try_echo"; } >&5
33290  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33291  ac_status=$?
33292  if test -s conftest.err; then
33293    sed '10a\
33294... rest of stderr output deleted ...
33295         10q' conftest.err >conftest.er1
33296    cat conftest.er1 >&5
33297  fi
33298  rm -f conftest.er1 conftest.err
33299  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33300  test $ac_status = 0; }
33301done
33302
33303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33304$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33305if ${ac_cv_objc_compiler_gnu+:} false; then :
33306  $as_echo_n "(cached) " >&6
33307else
33308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33309/* end confdefs.h.  */
33310
33311int
33312main ()
33313{
33314#ifndef __GNUC__
33315       choke me
33316#endif
33317
33318  ;
33319  return 0;
33320}
33321_ACEOF
33322if ac_fn_objc_try_compile "$LINENO"; then :
33323  ac_compiler_gnu=yes
33324else
33325  ac_compiler_gnu=no
33326fi
33327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33328ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33329
33330fi
33331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33332$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33333if test $ac_compiler_gnu = yes; then
33334  GOBJC=yes
33335else
33336  GOBJC=
33337fi
33338ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33339ac_save_OBJCFLAGS=$OBJCFLAGS
33340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33341$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33342if ${ac_cv_prog_objc_g+:} false; then :
33343  $as_echo_n "(cached) " >&6
33344else
33345  ac_save_objc_werror_flag=$ac_objc_werror_flag
33346   ac_objc_werror_flag=yes
33347   ac_cv_prog_objc_g=no
33348   OBJCFLAGS="-g"
33349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33350/* end confdefs.h.  */
33351
33352int
33353main ()
33354{
33355
33356  ;
33357  return 0;
33358}
33359_ACEOF
33360if ac_fn_objc_try_compile "$LINENO"; then :
33361  ac_cv_prog_objc_g=yes
33362else
33363  OBJCFLAGS=""
33364      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33365/* end confdefs.h.  */
33366
33367int
33368main ()
33369{
33370
33371  ;
33372  return 0;
33373}
33374_ACEOF
33375if ac_fn_objc_try_compile "$LINENO"; then :
33376
33377else
33378  ac_objc_werror_flag=$ac_save_objc_werror_flag
33379	 OBJCFLAGS="-g"
33380	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33381/* end confdefs.h.  */
33382
33383int
33384main ()
33385{
33386
33387  ;
33388  return 0;
33389}
33390_ACEOF
33391if ac_fn_objc_try_compile "$LINENO"; then :
33392  ac_cv_prog_objc_g=yes
33393fi
33394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33395fi
33396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33397fi
33398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33399   ac_objc_werror_flag=$ac_save_objc_werror_flag
33400fi
33401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33402$as_echo "$ac_cv_prog_objc_g" >&6; }
33403if test "$ac_test_OBJCFLAGS" = set; then
33404  OBJCFLAGS=$ac_save_OBJCFLAGS
33405elif test $ac_cv_prog_objc_g = yes; then
33406  if test "$GOBJC" = yes; then
33407    OBJCFLAGS="-g -O2"
33408  else
33409    OBJCFLAGS="-g"
33410  fi
33411else
33412  if test "$GOBJC" = yes; then
33413    OBJCFLAGS="-O2"
33414  else
33415    OBJCFLAGS=
33416  fi
33417fi
33418ac_ext=cpp
33419ac_cpp='$CXXCPP $CPPFLAGS'
33420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33423
33424
33425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33426
33427  # First separate the path from the arguments. This will split at the first
33428  # space.
33429  complete="$OBJC"
33430  path="${complete%% *}"
33431  tmp="$complete EOL"
33432  arguments="${tmp#* }"
33433
33434  # Input might be given as Windows format, start by converting to
33435  # unix format.
33436  new_path=`$CYGPATH -u "$path"`
33437
33438  # Now try to locate executable using which
33439  new_path=`$WHICH "$new_path" 2> /dev/null`
33440  # bat and cmd files are not always considered executable in cygwin causing which
33441  # to not find them
33442  if test "x$new_path" = x \
33443      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33444      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33445    new_path=`$CYGPATH -u "$path"`
33446  fi
33447  if test "x$new_path" = x; then
33448    # Oops. Which didn't find the executable.
33449    # The splitting of arguments from the executable at a space might have been incorrect,
33450    # since paths with space are more likely in Windows. Give it another try with the whole
33451    # argument.
33452    path="$complete"
33453    arguments="EOL"
33454    new_path=`$CYGPATH -u "$path"`
33455    new_path=`$WHICH "$new_path" 2> /dev/null`
33456    # bat and cmd files are not always considered executable in cygwin causing which
33457    # to not find them
33458    if test "x$new_path" = x \
33459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33461      new_path=`$CYGPATH -u "$path"`
33462    fi
33463    if test "x$new_path" = x; then
33464      # It's still not found. Now this is an unrecoverable error.
33465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33466$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33467      has_space=`$ECHO "$complete" | $GREP " "`
33468      if test "x$has_space" != x; then
33469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33471      fi
33472      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33473    fi
33474  fi
33475
33476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33479  # "foo.exe" is OK but "foo" is an error.
33480  #
33481  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33482  # It is also a way to make sure we got the proper file name for the real test later on.
33483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33484  if test "x$test_shortpath" = x; then
33485    # Short path failed, file does not exist as specified.
33486    # Try adding .exe or .cmd
33487    if test -f "${new_path}.exe"; then
33488      input_to_shortpath="${new_path}.exe"
33489    elif test -f "${new_path}.cmd"; then
33490      input_to_shortpath="${new_path}.cmd"
33491    else
33492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33493$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33496      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33497    fi
33498  else
33499    input_to_shortpath="$new_path"
33500  fi
33501
33502  # Call helper function which possibly converts this using DOS-style short mode.
33503  # If so, the updated path is stored in $new_path.
33504  new_path="$input_to_shortpath"
33505
33506  input_path="$input_to_shortpath"
33507  # Check if we need to convert this using DOS-style short mode. If the path
33508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33509  # take no chances and rewrite it.
33510  # Note: m4 eats our [], so we need to use [ and ] instead.
33511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33512  if test "x$has_forbidden_chars" != x; then
33513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33517      # Going to short mode and back again did indeed matter. Since short mode is
33518      # case insensitive, let's make it lowercase to improve readability.
33519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33520      # Now convert it back to Unix-stile (cygpath)
33521      input_path=`$CYGPATH -u "$shortmode_path"`
33522      new_path="$input_path"
33523    fi
33524  fi
33525
33526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33527  if test "x$test_cygdrive_prefix" = x; then
33528    # As a simple fix, exclude /usr/bin since it's not a real path.
33529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33531      # a path prefixed by /cygdrive for fixpath to work.
33532      new_path="$CYGWIN_ROOT_PATH$input_path"
33533    fi
33534  fi
33535
33536  # remove trailing .exe if any
33537  new_path="${new_path/%.exe/}"
33538
33539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33540
33541  # First separate the path from the arguments. This will split at the first
33542  # space.
33543  complete="$OBJC"
33544  path="${complete%% *}"
33545  tmp="$complete EOL"
33546  arguments="${tmp#* }"
33547
33548  # Input might be given as Windows format, start by converting to
33549  # unix format.
33550  new_path="$path"
33551
33552  windows_path="$new_path"
33553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33554    unix_path=`$CYGPATH -u "$windows_path"`
33555    new_path="$unix_path"
33556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33558    new_path="$unix_path"
33559  fi
33560
33561
33562  # Now try to locate executable using which
33563  new_path=`$WHICH "$new_path" 2> /dev/null`
33564
33565  if test "x$new_path" = x; then
33566    # Oops. Which didn't find the executable.
33567    # The splitting of arguments from the executable at a space might have been incorrect,
33568    # since paths with space are more likely in Windows. Give it another try with the whole
33569    # argument.
33570    path="$complete"
33571    arguments="EOL"
33572    new_path="$path"
33573
33574  windows_path="$new_path"
33575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33576    unix_path=`$CYGPATH -u "$windows_path"`
33577    new_path="$unix_path"
33578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33580    new_path="$unix_path"
33581  fi
33582
33583
33584    new_path=`$WHICH "$new_path" 2> /dev/null`
33585    # bat and cmd files are not always considered executable in MSYS causing which
33586    # to not find them
33587    if test "x$new_path" = x \
33588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33590      new_path="$path"
33591
33592  windows_path="$new_path"
33593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33594    unix_path=`$CYGPATH -u "$windows_path"`
33595    new_path="$unix_path"
33596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33598    new_path="$unix_path"
33599  fi
33600
33601    fi
33602
33603    if test "x$new_path" = x; then
33604      # It's still not found. Now this is an unrecoverable error.
33605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33606$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33607      has_space=`$ECHO "$complete" | $GREP " "`
33608      if test "x$has_space" != x; then
33609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33611      fi
33612      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33613    fi
33614  fi
33615
33616  # Now new_path has a complete unix path to the binary
33617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33618    # Keep paths in /bin as-is, but remove trailing .exe if any
33619    new_path="${new_path/%.exe/}"
33620    # Do not save /bin paths to all_fixpath_prefixes!
33621  else
33622    # Not in mixed or Windows style, start by that.
33623    new_path=`cmd //c echo $new_path`
33624
33625  input_path="$new_path"
33626  # Check if we need to convert this using DOS-style short mode. If the path
33627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33628  # take no chances and rewrite it.
33629  # Note: m4 eats our [], so we need to use [ and ] instead.
33630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33631  if test "x$has_forbidden_chars" != x; then
33632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33634  fi
33635
33636    # Output is in $new_path
33637
33638  windows_path="$new_path"
33639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33640    unix_path=`$CYGPATH -u "$windows_path"`
33641    new_path="$unix_path"
33642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33644    new_path="$unix_path"
33645  fi
33646
33647    # remove trailing .exe if any
33648    new_path="${new_path/%.exe/}"
33649
33650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33652  fi
33653
33654  else
33655    # We're on a posix platform. Hooray! :)
33656    # First separate the path from the arguments. This will split at the first
33657    # space.
33658    complete="$OBJC"
33659    path="${complete%% *}"
33660    tmp="$complete EOL"
33661    arguments="${tmp#* }"
33662
33663    # Cannot rely on the command "which" here since it doesn't always work.
33664    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33665    if test -z "$is_absolute_path"; then
33666      # Path to executable is not absolute. Find it.
33667      IFS_save="$IFS"
33668      IFS=:
33669      for p in $PATH; do
33670        if test -f "$p/$path" && test -x "$p/$path"; then
33671          new_path="$p/$path"
33672          break
33673        fi
33674      done
33675      IFS="$IFS_save"
33676    else
33677      # This is an absolute path, we can use it without further modifications.
33678      new_path="$path"
33679    fi
33680
33681    if test "x$new_path" = x; then
33682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33683$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33684      has_space=`$ECHO "$complete" | $GREP " "`
33685      if test "x$has_space" != x; then
33686        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33688      fi
33689      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33690    fi
33691  fi
33692
33693  # Now join together the path and the arguments once again
33694  if test "x$arguments" != xEOL; then
33695    new_complete="$new_path ${arguments% *}"
33696  else
33697    new_complete="$new_path"
33698  fi
33699
33700  if test "x$complete" != "x$new_complete"; then
33701    OBJC="$new_complete"
33702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33703$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33704  fi
33705
33706
33707
33708  # Publish this variable in the help.
33709
33710
33711  if test "x$LIPO" = x; then
33712    # The variable is not set by user, try to locate tool using the code snippet
33713    for ac_prog in lipo
33714do
33715  # Extract the first word of "$ac_prog", so it can be a program name with args.
33716set dummy $ac_prog; ac_word=$2
33717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33718$as_echo_n "checking for $ac_word... " >&6; }
33719if ${ac_cv_path_LIPO+:} false; then :
33720  $as_echo_n "(cached) " >&6
33721else
33722  case $LIPO in
33723  [\\/]* | ?:[\\/]*)
33724  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33725  ;;
33726  *)
33727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33728for as_dir in $PATH
33729do
33730  IFS=$as_save_IFS
33731  test -z "$as_dir" && as_dir=.
33732    for ac_exec_ext in '' $ac_executable_extensions; do
33733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33734    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33736    break 2
33737  fi
33738done
33739  done
33740IFS=$as_save_IFS
33741
33742  ;;
33743esac
33744fi
33745LIPO=$ac_cv_path_LIPO
33746if test -n "$LIPO"; then
33747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33748$as_echo "$LIPO" >&6; }
33749else
33750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33751$as_echo "no" >&6; }
33752fi
33753
33754
33755  test -n "$LIPO" && break
33756done
33757
33758  else
33759    # The variable is set, but is it from the command line or the environment?
33760
33761    # Try to remove the string !LIPO! from our list.
33762    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33763    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33764      # If it failed, the variable was not from the command line. Ignore it,
33765      # but warn the user (except for BASH, which is always set by the calling BASH).
33766      if test "xLIPO" != xBASH; then
33767        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33768$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33769      fi
33770      # Try to locate tool using the code snippet
33771      for ac_prog in lipo
33772do
33773  # Extract the first word of "$ac_prog", so it can be a program name with args.
33774set dummy $ac_prog; ac_word=$2
33775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33776$as_echo_n "checking for $ac_word... " >&6; }
33777if ${ac_cv_path_LIPO+:} false; then :
33778  $as_echo_n "(cached) " >&6
33779else
33780  case $LIPO in
33781  [\\/]* | ?:[\\/]*)
33782  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33783  ;;
33784  *)
33785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33786for as_dir in $PATH
33787do
33788  IFS=$as_save_IFS
33789  test -z "$as_dir" && as_dir=.
33790    for ac_exec_ext in '' $ac_executable_extensions; do
33791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33792    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33794    break 2
33795  fi
33796done
33797  done
33798IFS=$as_save_IFS
33799
33800  ;;
33801esac
33802fi
33803LIPO=$ac_cv_path_LIPO
33804if test -n "$LIPO"; then
33805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33806$as_echo "$LIPO" >&6; }
33807else
33808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33809$as_echo "no" >&6; }
33810fi
33811
33812
33813  test -n "$LIPO" && break
33814done
33815
33816    else
33817      # If it succeeded, then it was overridden by the user. We will use it
33818      # for the tool.
33819
33820      # First remove it from the list of overridden variables, so we can test
33821      # for unknown variables in the end.
33822      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33823
33824      # Check if the provided tool contains a complete path.
33825      tool_specified="$LIPO"
33826      tool_basename="${tool_specified##*/}"
33827      if test "x$tool_basename" = "x$tool_specified"; then
33828        # A command without a complete path is provided, search $PATH.
33829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33830$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33831        # Extract the first word of "$tool_basename", so it can be a program name with args.
33832set dummy $tool_basename; ac_word=$2
33833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33834$as_echo_n "checking for $ac_word... " >&6; }
33835if ${ac_cv_path_LIPO+:} false; then :
33836  $as_echo_n "(cached) " >&6
33837else
33838  case $LIPO in
33839  [\\/]* | ?:[\\/]*)
33840  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33841  ;;
33842  *)
33843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33844for as_dir in $PATH
33845do
33846  IFS=$as_save_IFS
33847  test -z "$as_dir" && as_dir=.
33848    for ac_exec_ext in '' $ac_executable_extensions; do
33849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33850    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33852    break 2
33853  fi
33854done
33855  done
33856IFS=$as_save_IFS
33857
33858  ;;
33859esac
33860fi
33861LIPO=$ac_cv_path_LIPO
33862if test -n "$LIPO"; then
33863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33864$as_echo "$LIPO" >&6; }
33865else
33866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33867$as_echo "no" >&6; }
33868fi
33869
33870
33871        if test "x$LIPO" = x; then
33872          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33873        fi
33874      else
33875        # Otherwise we believe it is a complete path. Use it as it is.
33876        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33877$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33879$as_echo_n "checking for LIPO... " >&6; }
33880        if test ! -x "$tool_specified"; then
33881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33882$as_echo "not found" >&6; }
33883          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33884        fi
33885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33886$as_echo "$tool_specified" >&6; }
33887      fi
33888    fi
33889  fi
33890
33891
33892
33893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33894
33895  # First separate the path from the arguments. This will split at the first
33896  # space.
33897  complete="$LIPO"
33898  path="${complete%% *}"
33899  tmp="$complete EOL"
33900  arguments="${tmp#* }"
33901
33902  # Input might be given as Windows format, start by converting to
33903  # unix format.
33904  new_path=`$CYGPATH -u "$path"`
33905
33906  # Now try to locate executable using which
33907  new_path=`$WHICH "$new_path" 2> /dev/null`
33908  # bat and cmd files are not always considered executable in cygwin causing which
33909  # to not find them
33910  if test "x$new_path" = x \
33911      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33912      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33913    new_path=`$CYGPATH -u "$path"`
33914  fi
33915  if test "x$new_path" = x; then
33916    # Oops. Which didn't find the executable.
33917    # The splitting of arguments from the executable at a space might have been incorrect,
33918    # since paths with space are more likely in Windows. Give it another try with the whole
33919    # argument.
33920    path="$complete"
33921    arguments="EOL"
33922    new_path=`$CYGPATH -u "$path"`
33923    new_path=`$WHICH "$new_path" 2> /dev/null`
33924    # bat and cmd files are not always considered executable in cygwin causing which
33925    # to not find them
33926    if test "x$new_path" = x \
33927        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33928        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33929      new_path=`$CYGPATH -u "$path"`
33930    fi
33931    if test "x$new_path" = x; then
33932      # It's still not found. Now this is an unrecoverable error.
33933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33934$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33935      has_space=`$ECHO "$complete" | $GREP " "`
33936      if test "x$has_space" != x; then
33937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33939      fi
33940      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33941    fi
33942  fi
33943
33944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33947  # "foo.exe" is OK but "foo" is an error.
33948  #
33949  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33950  # It is also a way to make sure we got the proper file name for the real test later on.
33951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33952  if test "x$test_shortpath" = x; then
33953    # Short path failed, file does not exist as specified.
33954    # Try adding .exe or .cmd
33955    if test -f "${new_path}.exe"; then
33956      input_to_shortpath="${new_path}.exe"
33957    elif test -f "${new_path}.cmd"; then
33958      input_to_shortpath="${new_path}.cmd"
33959    else
33960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33961$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33962      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33963$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33964      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33965    fi
33966  else
33967    input_to_shortpath="$new_path"
33968  fi
33969
33970  # Call helper function which possibly converts this using DOS-style short mode.
33971  # If so, the updated path is stored in $new_path.
33972  new_path="$input_to_shortpath"
33973
33974  input_path="$input_to_shortpath"
33975  # Check if we need to convert this using DOS-style short mode. If the path
33976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33977  # take no chances and rewrite it.
33978  # Note: m4 eats our [], so we need to use [ and ] instead.
33979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33980  if test "x$has_forbidden_chars" != x; then
33981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33985      # Going to short mode and back again did indeed matter. Since short mode is
33986      # case insensitive, let's make it lowercase to improve readability.
33987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33988      # Now convert it back to Unix-stile (cygpath)
33989      input_path=`$CYGPATH -u "$shortmode_path"`
33990      new_path="$input_path"
33991    fi
33992  fi
33993
33994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33995  if test "x$test_cygdrive_prefix" = x; then
33996    # As a simple fix, exclude /usr/bin since it's not a real path.
33997    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33999      # a path prefixed by /cygdrive for fixpath to work.
34000      new_path="$CYGWIN_ROOT_PATH$input_path"
34001    fi
34002  fi
34003
34004  # remove trailing .exe if any
34005  new_path="${new_path/%.exe/}"
34006
34007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34008
34009  # First separate the path from the arguments. This will split at the first
34010  # space.
34011  complete="$LIPO"
34012  path="${complete%% *}"
34013  tmp="$complete EOL"
34014  arguments="${tmp#* }"
34015
34016  # Input might be given as Windows format, start by converting to
34017  # unix format.
34018  new_path="$path"
34019
34020  windows_path="$new_path"
34021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34022    unix_path=`$CYGPATH -u "$windows_path"`
34023    new_path="$unix_path"
34024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34026    new_path="$unix_path"
34027  fi
34028
34029
34030  # Now try to locate executable using which
34031  new_path=`$WHICH "$new_path" 2> /dev/null`
34032
34033  if test "x$new_path" = x; then
34034    # Oops. Which didn't find the executable.
34035    # The splitting of arguments from the executable at a space might have been incorrect,
34036    # since paths with space are more likely in Windows. Give it another try with the whole
34037    # argument.
34038    path="$complete"
34039    arguments="EOL"
34040    new_path="$path"
34041
34042  windows_path="$new_path"
34043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34044    unix_path=`$CYGPATH -u "$windows_path"`
34045    new_path="$unix_path"
34046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34048    new_path="$unix_path"
34049  fi
34050
34051
34052    new_path=`$WHICH "$new_path" 2> /dev/null`
34053    # bat and cmd files are not always considered executable in MSYS causing which
34054    # to not find them
34055    if test "x$new_path" = x \
34056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34058      new_path="$path"
34059
34060  windows_path="$new_path"
34061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34062    unix_path=`$CYGPATH -u "$windows_path"`
34063    new_path="$unix_path"
34064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34066    new_path="$unix_path"
34067  fi
34068
34069    fi
34070
34071    if test "x$new_path" = x; then
34072      # It's still not found. Now this is an unrecoverable error.
34073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34074$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34075      has_space=`$ECHO "$complete" | $GREP " "`
34076      if test "x$has_space" != x; then
34077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34079      fi
34080      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34081    fi
34082  fi
34083
34084  # Now new_path has a complete unix path to the binary
34085  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34086    # Keep paths in /bin as-is, but remove trailing .exe if any
34087    new_path="${new_path/%.exe/}"
34088    # Do not save /bin paths to all_fixpath_prefixes!
34089  else
34090    # Not in mixed or Windows style, start by that.
34091    new_path=`cmd //c echo $new_path`
34092
34093  input_path="$new_path"
34094  # Check if we need to convert this using DOS-style short mode. If the path
34095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34096  # take no chances and rewrite it.
34097  # Note: m4 eats our [], so we need to use [ and ] instead.
34098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34099  if test "x$has_forbidden_chars" != x; then
34100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34102  fi
34103
34104    # Output is in $new_path
34105
34106  windows_path="$new_path"
34107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34108    unix_path=`$CYGPATH -u "$windows_path"`
34109    new_path="$unix_path"
34110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34112    new_path="$unix_path"
34113  fi
34114
34115    # remove trailing .exe if any
34116    new_path="${new_path/%.exe/}"
34117
34118    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34119    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34120  fi
34121
34122  else
34123    # We're on a posix platform. Hooray! :)
34124    # First separate the path from the arguments. This will split at the first
34125    # space.
34126    complete="$LIPO"
34127    path="${complete%% *}"
34128    tmp="$complete EOL"
34129    arguments="${tmp#* }"
34130
34131    # Cannot rely on the command "which" here since it doesn't always work.
34132    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34133    if test -z "$is_absolute_path"; then
34134      # Path to executable is not absolute. Find it.
34135      IFS_save="$IFS"
34136      IFS=:
34137      for p in $PATH; do
34138        if test -f "$p/$path" && test -x "$p/$path"; then
34139          new_path="$p/$path"
34140          break
34141        fi
34142      done
34143      IFS="$IFS_save"
34144    else
34145      # This is an absolute path, we can use it without further modifications.
34146      new_path="$path"
34147    fi
34148
34149    if test "x$new_path" = x; then
34150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34151$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34152      has_space=`$ECHO "$complete" | $GREP " "`
34153      if test "x$has_space" != x; then
34154        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34155$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34156      fi
34157      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34158    fi
34159  fi
34160
34161  # Now join together the path and the arguments once again
34162  if test "x$arguments" != xEOL; then
34163    new_complete="$new_path ${arguments% *}"
34164  else
34165    new_complete="$new_path"
34166  fi
34167
34168  if test "x$complete" != "x$new_complete"; then
34169    LIPO="$new_complete"
34170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34171$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34172  fi
34173
34174  else
34175    OBJC=
34176  fi
34177
34178  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34179    # Extract the first word of "mt", so it can be a program name with args.
34180set dummy mt; ac_word=$2
34181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34182$as_echo_n "checking for $ac_word... " >&6; }
34183if ${ac_cv_prog_MT+:} false; then :
34184  $as_echo_n "(cached) " >&6
34185else
34186  if test -n "$MT"; then
34187  ac_cv_prog_MT="$MT" # Let the user override the test.
34188else
34189  ac_prog_rejected=no
34190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34191for as_dir in $PATH
34192do
34193  IFS=$as_save_IFS
34194  test -z "$as_dir" && as_dir=.
34195    for ac_exec_ext in '' $ac_executable_extensions; do
34196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34197    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34198       ac_prog_rejected=yes
34199       continue
34200     fi
34201    ac_cv_prog_MT="mt"
34202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34203    break 2
34204  fi
34205done
34206  done
34207IFS=$as_save_IFS
34208
34209if test $ac_prog_rejected = yes; then
34210  # We found a bogon in the path, so make sure we never use it.
34211  set dummy $ac_cv_prog_MT
34212  shift
34213  if test $# != 0; then
34214    # We chose a different compiler from the bogus one.
34215    # However, it has the same basename, so the bogon will be chosen
34216    # first if we set MT to just the basename; use the full file name.
34217    shift
34218    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34219  fi
34220fi
34221fi
34222fi
34223MT=$ac_cv_prog_MT
34224if test -n "$MT"; then
34225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34226$as_echo "$MT" >&6; }
34227else
34228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34229$as_echo "no" >&6; }
34230fi
34231
34232
34233
34234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34235
34236  # First separate the path from the arguments. This will split at the first
34237  # space.
34238  complete="$MT"
34239  path="${complete%% *}"
34240  tmp="$complete EOL"
34241  arguments="${tmp#* }"
34242
34243  # Input might be given as Windows format, start by converting to
34244  # unix format.
34245  new_path=`$CYGPATH -u "$path"`
34246
34247  # Now try to locate executable using which
34248  new_path=`$WHICH "$new_path" 2> /dev/null`
34249  # bat and cmd files are not always considered executable in cygwin causing which
34250  # to not find them
34251  if test "x$new_path" = x \
34252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34254    new_path=`$CYGPATH -u "$path"`
34255  fi
34256  if test "x$new_path" = x; then
34257    # Oops. Which didn't find the executable.
34258    # The splitting of arguments from the executable at a space might have been incorrect,
34259    # since paths with space are more likely in Windows. Give it another try with the whole
34260    # argument.
34261    path="$complete"
34262    arguments="EOL"
34263    new_path=`$CYGPATH -u "$path"`
34264    new_path=`$WHICH "$new_path" 2> /dev/null`
34265    # bat and cmd files are not always considered executable in cygwin causing which
34266    # to not find them
34267    if test "x$new_path" = x \
34268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34270      new_path=`$CYGPATH -u "$path"`
34271    fi
34272    if test "x$new_path" = x; then
34273      # It's still not found. Now this is an unrecoverable error.
34274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34275$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34276      has_space=`$ECHO "$complete" | $GREP " "`
34277      if test "x$has_space" != x; then
34278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34280      fi
34281      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34282    fi
34283  fi
34284
34285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34288  # "foo.exe" is OK but "foo" is an error.
34289  #
34290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34291  # It is also a way to make sure we got the proper file name for the real test later on.
34292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34293  if test "x$test_shortpath" = x; then
34294    # Short path failed, file does not exist as specified.
34295    # Try adding .exe or .cmd
34296    if test -f "${new_path}.exe"; then
34297      input_to_shortpath="${new_path}.exe"
34298    elif test -f "${new_path}.cmd"; then
34299      input_to_shortpath="${new_path}.cmd"
34300    else
34301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34302$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34305      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34306    fi
34307  else
34308    input_to_shortpath="$new_path"
34309  fi
34310
34311  # Call helper function which possibly converts this using DOS-style short mode.
34312  # If so, the updated path is stored in $new_path.
34313  new_path="$input_to_shortpath"
34314
34315  input_path="$input_to_shortpath"
34316  # Check if we need to convert this using DOS-style short mode. If the path
34317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34318  # take no chances and rewrite it.
34319  # Note: m4 eats our [], so we need to use [ and ] instead.
34320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34321  if test "x$has_forbidden_chars" != x; then
34322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34326      # Going to short mode and back again did indeed matter. Since short mode is
34327      # case insensitive, let's make it lowercase to improve readability.
34328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34329      # Now convert it back to Unix-stile (cygpath)
34330      input_path=`$CYGPATH -u "$shortmode_path"`
34331      new_path="$input_path"
34332    fi
34333  fi
34334
34335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34336  if test "x$test_cygdrive_prefix" = x; then
34337    # As a simple fix, exclude /usr/bin since it's not a real path.
34338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34340      # a path prefixed by /cygdrive for fixpath to work.
34341      new_path="$CYGWIN_ROOT_PATH$input_path"
34342    fi
34343  fi
34344
34345  # remove trailing .exe if any
34346  new_path="${new_path/%.exe/}"
34347
34348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34349
34350  # First separate the path from the arguments. This will split at the first
34351  # space.
34352  complete="$MT"
34353  path="${complete%% *}"
34354  tmp="$complete EOL"
34355  arguments="${tmp#* }"
34356
34357  # Input might be given as Windows format, start by converting to
34358  # unix format.
34359  new_path="$path"
34360
34361  windows_path="$new_path"
34362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34363    unix_path=`$CYGPATH -u "$windows_path"`
34364    new_path="$unix_path"
34365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34367    new_path="$unix_path"
34368  fi
34369
34370
34371  # Now try to locate executable using which
34372  new_path=`$WHICH "$new_path" 2> /dev/null`
34373
34374  if test "x$new_path" = x; then
34375    # Oops. Which didn't find the executable.
34376    # The splitting of arguments from the executable at a space might have been incorrect,
34377    # since paths with space are more likely in Windows. Give it another try with the whole
34378    # argument.
34379    path="$complete"
34380    arguments="EOL"
34381    new_path="$path"
34382
34383  windows_path="$new_path"
34384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34385    unix_path=`$CYGPATH -u "$windows_path"`
34386    new_path="$unix_path"
34387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34389    new_path="$unix_path"
34390  fi
34391
34392
34393    new_path=`$WHICH "$new_path" 2> /dev/null`
34394    # bat and cmd files are not always considered executable in MSYS causing which
34395    # to not find them
34396    if test "x$new_path" = x \
34397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34399      new_path="$path"
34400
34401  windows_path="$new_path"
34402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34403    unix_path=`$CYGPATH -u "$windows_path"`
34404    new_path="$unix_path"
34405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34407    new_path="$unix_path"
34408  fi
34409
34410    fi
34411
34412    if test "x$new_path" = x; then
34413      # It's still not found. Now this is an unrecoverable error.
34414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34415$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34416      has_space=`$ECHO "$complete" | $GREP " "`
34417      if test "x$has_space" != x; then
34418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34420      fi
34421      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34422    fi
34423  fi
34424
34425  # Now new_path has a complete unix path to the binary
34426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34427    # Keep paths in /bin as-is, but remove trailing .exe if any
34428    new_path="${new_path/%.exe/}"
34429    # Do not save /bin paths to all_fixpath_prefixes!
34430  else
34431    # Not in mixed or Windows style, start by that.
34432    new_path=`cmd //c echo $new_path`
34433
34434  input_path="$new_path"
34435  # Check if we need to convert this using DOS-style short mode. If the path
34436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34437  # take no chances and rewrite it.
34438  # Note: m4 eats our [], so we need to use [ and ] instead.
34439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34440  if test "x$has_forbidden_chars" != x; then
34441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34443  fi
34444
34445    # Output is in $new_path
34446
34447  windows_path="$new_path"
34448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34449    unix_path=`$CYGPATH -u "$windows_path"`
34450    new_path="$unix_path"
34451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34453    new_path="$unix_path"
34454  fi
34455
34456    # remove trailing .exe if any
34457    new_path="${new_path/%.exe/}"
34458
34459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34461  fi
34462
34463  else
34464    # We're on a posix platform. Hooray! :)
34465    # First separate the path from the arguments. This will split at the first
34466    # space.
34467    complete="$MT"
34468    path="${complete%% *}"
34469    tmp="$complete EOL"
34470    arguments="${tmp#* }"
34471
34472    # Cannot rely on the command "which" here since it doesn't always work.
34473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34474    if test -z "$is_absolute_path"; then
34475      # Path to executable is not absolute. Find it.
34476      IFS_save="$IFS"
34477      IFS=:
34478      for p in $PATH; do
34479        if test -f "$p/$path" && test -x "$p/$path"; then
34480          new_path="$p/$path"
34481          break
34482        fi
34483      done
34484      IFS="$IFS_save"
34485    else
34486      # This is an absolute path, we can use it without further modifications.
34487      new_path="$path"
34488    fi
34489
34490    if test "x$new_path" = x; then
34491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34492$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34493      has_space=`$ECHO "$complete" | $GREP " "`
34494      if test "x$has_space" != x; then
34495        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34497      fi
34498      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34499    fi
34500  fi
34501
34502  # Now join together the path and the arguments once again
34503  if test "x$arguments" != xEOL; then
34504    new_complete="$new_path ${arguments% *}"
34505  else
34506    new_complete="$new_path"
34507  fi
34508
34509  if test "x$complete" != "x$new_complete"; then
34510    MT="$new_complete"
34511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34512$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34513  fi
34514
34515    # Setup the resource compiler (RC)
34516    # Extract the first word of "rc", so it can be a program name with args.
34517set dummy rc; ac_word=$2
34518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34519$as_echo_n "checking for $ac_word... " >&6; }
34520if ${ac_cv_prog_RC+:} false; then :
34521  $as_echo_n "(cached) " >&6
34522else
34523  if test -n "$RC"; then
34524  ac_cv_prog_RC="$RC" # Let the user override the test.
34525else
34526  ac_prog_rejected=no
34527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34528for as_dir in $PATH
34529do
34530  IFS=$as_save_IFS
34531  test -z "$as_dir" && as_dir=.
34532    for ac_exec_ext in '' $ac_executable_extensions; do
34533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34534    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34535       ac_prog_rejected=yes
34536       continue
34537     fi
34538    ac_cv_prog_RC="rc"
34539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34540    break 2
34541  fi
34542done
34543  done
34544IFS=$as_save_IFS
34545
34546if test $ac_prog_rejected = yes; then
34547  # We found a bogon in the path, so make sure we never use it.
34548  set dummy $ac_cv_prog_RC
34549  shift
34550  if test $# != 0; then
34551    # We chose a different compiler from the bogus one.
34552    # However, it has the same basename, so the bogon will be chosen
34553    # first if we set RC to just the basename; use the full file name.
34554    shift
34555    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34556  fi
34557fi
34558fi
34559fi
34560RC=$ac_cv_prog_RC
34561if test -n "$RC"; then
34562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34563$as_echo "$RC" >&6; }
34564else
34565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34566$as_echo "no" >&6; }
34567fi
34568
34569
34570
34571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34572
34573  # First separate the path from the arguments. This will split at the first
34574  # space.
34575  complete="$RC"
34576  path="${complete%% *}"
34577  tmp="$complete EOL"
34578  arguments="${tmp#* }"
34579
34580  # Input might be given as Windows format, start by converting to
34581  # unix format.
34582  new_path=`$CYGPATH -u "$path"`
34583
34584  # Now try to locate executable using which
34585  new_path=`$WHICH "$new_path" 2> /dev/null`
34586  # bat and cmd files are not always considered executable in cygwin causing which
34587  # to not find them
34588  if test "x$new_path" = x \
34589      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34590      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34591    new_path=`$CYGPATH -u "$path"`
34592  fi
34593  if test "x$new_path" = x; then
34594    # Oops. Which didn't find the executable.
34595    # The splitting of arguments from the executable at a space might have been incorrect,
34596    # since paths with space are more likely in Windows. Give it another try with the whole
34597    # argument.
34598    path="$complete"
34599    arguments="EOL"
34600    new_path=`$CYGPATH -u "$path"`
34601    new_path=`$WHICH "$new_path" 2> /dev/null`
34602    # bat and cmd files are not always considered executable in cygwin causing which
34603    # to not find them
34604    if test "x$new_path" = x \
34605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34607      new_path=`$CYGPATH -u "$path"`
34608    fi
34609    if test "x$new_path" = x; then
34610      # It's still not found. Now this is an unrecoverable error.
34611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34612$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34613      has_space=`$ECHO "$complete" | $GREP " "`
34614      if test "x$has_space" != x; then
34615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34617      fi
34618      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34619    fi
34620  fi
34621
34622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34625  # "foo.exe" is OK but "foo" is an error.
34626  #
34627  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34628  # It is also a way to make sure we got the proper file name for the real test later on.
34629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34630  if test "x$test_shortpath" = x; then
34631    # Short path failed, file does not exist as specified.
34632    # Try adding .exe or .cmd
34633    if test -f "${new_path}.exe"; then
34634      input_to_shortpath="${new_path}.exe"
34635    elif test -f "${new_path}.cmd"; then
34636      input_to_shortpath="${new_path}.cmd"
34637    else
34638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34639$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34640      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34641$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34642      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34643    fi
34644  else
34645    input_to_shortpath="$new_path"
34646  fi
34647
34648  # Call helper function which possibly converts this using DOS-style short mode.
34649  # If so, the updated path is stored in $new_path.
34650  new_path="$input_to_shortpath"
34651
34652  input_path="$input_to_shortpath"
34653  # Check if we need to convert this using DOS-style short mode. If the path
34654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34655  # take no chances and rewrite it.
34656  # Note: m4 eats our [], so we need to use [ and ] instead.
34657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34658  if test "x$has_forbidden_chars" != x; then
34659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34663      # Going to short mode and back again did indeed matter. Since short mode is
34664      # case insensitive, let's make it lowercase to improve readability.
34665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34666      # Now convert it back to Unix-stile (cygpath)
34667      input_path=`$CYGPATH -u "$shortmode_path"`
34668      new_path="$input_path"
34669    fi
34670  fi
34671
34672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34673  if test "x$test_cygdrive_prefix" = x; then
34674    # As a simple fix, exclude /usr/bin since it's not a real path.
34675    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34677      # a path prefixed by /cygdrive for fixpath to work.
34678      new_path="$CYGWIN_ROOT_PATH$input_path"
34679    fi
34680  fi
34681
34682  # remove trailing .exe if any
34683  new_path="${new_path/%.exe/}"
34684
34685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34686
34687  # First separate the path from the arguments. This will split at the first
34688  # space.
34689  complete="$RC"
34690  path="${complete%% *}"
34691  tmp="$complete EOL"
34692  arguments="${tmp#* }"
34693
34694  # Input might be given as Windows format, start by converting to
34695  # unix format.
34696  new_path="$path"
34697
34698  windows_path="$new_path"
34699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34700    unix_path=`$CYGPATH -u "$windows_path"`
34701    new_path="$unix_path"
34702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34704    new_path="$unix_path"
34705  fi
34706
34707
34708  # Now try to locate executable using which
34709  new_path=`$WHICH "$new_path" 2> /dev/null`
34710
34711  if test "x$new_path" = x; then
34712    # Oops. Which didn't find the executable.
34713    # The splitting of arguments from the executable at a space might have been incorrect,
34714    # since paths with space are more likely in Windows. Give it another try with the whole
34715    # argument.
34716    path="$complete"
34717    arguments="EOL"
34718    new_path="$path"
34719
34720  windows_path="$new_path"
34721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34722    unix_path=`$CYGPATH -u "$windows_path"`
34723    new_path="$unix_path"
34724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34726    new_path="$unix_path"
34727  fi
34728
34729
34730    new_path=`$WHICH "$new_path" 2> /dev/null`
34731    # bat and cmd files are not always considered executable in MSYS causing which
34732    # to not find them
34733    if test "x$new_path" = x \
34734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34736      new_path="$path"
34737
34738  windows_path="$new_path"
34739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34740    unix_path=`$CYGPATH -u "$windows_path"`
34741    new_path="$unix_path"
34742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34744    new_path="$unix_path"
34745  fi
34746
34747    fi
34748
34749    if test "x$new_path" = x; then
34750      # It's still not found. Now this is an unrecoverable error.
34751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34752$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34753      has_space=`$ECHO "$complete" | $GREP " "`
34754      if test "x$has_space" != x; then
34755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34757      fi
34758      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34759    fi
34760  fi
34761
34762  # Now new_path has a complete unix path to the binary
34763  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34764    # Keep paths in /bin as-is, but remove trailing .exe if any
34765    new_path="${new_path/%.exe/}"
34766    # Do not save /bin paths to all_fixpath_prefixes!
34767  else
34768    # Not in mixed or Windows style, start by that.
34769    new_path=`cmd //c echo $new_path`
34770
34771  input_path="$new_path"
34772  # Check if we need to convert this using DOS-style short mode. If the path
34773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34774  # take no chances and rewrite it.
34775  # Note: m4 eats our [], so we need to use [ and ] instead.
34776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34777  if test "x$has_forbidden_chars" != x; then
34778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34780  fi
34781
34782    # Output is in $new_path
34783
34784  windows_path="$new_path"
34785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34786    unix_path=`$CYGPATH -u "$windows_path"`
34787    new_path="$unix_path"
34788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34790    new_path="$unix_path"
34791  fi
34792
34793    # remove trailing .exe if any
34794    new_path="${new_path/%.exe/}"
34795
34796    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34797    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34798  fi
34799
34800  else
34801    # We're on a posix platform. Hooray! :)
34802    # First separate the path from the arguments. This will split at the first
34803    # space.
34804    complete="$RC"
34805    path="${complete%% *}"
34806    tmp="$complete EOL"
34807    arguments="${tmp#* }"
34808
34809    # Cannot rely on the command "which" here since it doesn't always work.
34810    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34811    if test -z "$is_absolute_path"; then
34812      # Path to executable is not absolute. Find it.
34813      IFS_save="$IFS"
34814      IFS=:
34815      for p in $PATH; do
34816        if test -f "$p/$path" && test -x "$p/$path"; then
34817          new_path="$p/$path"
34818          break
34819        fi
34820      done
34821      IFS="$IFS_save"
34822    else
34823      # This is an absolute path, we can use it without further modifications.
34824      new_path="$path"
34825    fi
34826
34827    if test "x$new_path" = x; then
34828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34829$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34830      has_space=`$ECHO "$complete" | $GREP " "`
34831      if test "x$has_space" != x; then
34832        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34833$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34834      fi
34835      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34836    fi
34837  fi
34838
34839  # Now join together the path and the arguments once again
34840  if test "x$arguments" != xEOL; then
34841    new_complete="$new_path ${arguments% *}"
34842  else
34843    new_complete="$new_path"
34844  fi
34845
34846  if test "x$complete" != "x$new_complete"; then
34847    RC="$new_complete"
34848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34849$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34850  fi
34851
34852    # Extract the first word of "dumpbin", so it can be a program name with args.
34853set dummy dumpbin; ac_word=$2
34854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34855$as_echo_n "checking for $ac_word... " >&6; }
34856if ${ac_cv_prog_DUMPBIN+:} false; then :
34857  $as_echo_n "(cached) " >&6
34858else
34859  if test -n "$DUMPBIN"; then
34860  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34861else
34862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34863for as_dir in $PATH
34864do
34865  IFS=$as_save_IFS
34866  test -z "$as_dir" && as_dir=.
34867    for ac_exec_ext in '' $ac_executable_extensions; do
34868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34869    ac_cv_prog_DUMPBIN="dumpbin"
34870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34871    break 2
34872  fi
34873done
34874  done
34875IFS=$as_save_IFS
34876
34877fi
34878fi
34879DUMPBIN=$ac_cv_prog_DUMPBIN
34880if test -n "$DUMPBIN"; then
34881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34882$as_echo "$DUMPBIN" >&6; }
34883else
34884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34885$as_echo "no" >&6; }
34886fi
34887
34888
34889
34890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34891
34892  # First separate the path from the arguments. This will split at the first
34893  # space.
34894  complete="$DUMPBIN"
34895  path="${complete%% *}"
34896  tmp="$complete EOL"
34897  arguments="${tmp#* }"
34898
34899  # Input might be given as Windows format, start by converting to
34900  # unix format.
34901  new_path=`$CYGPATH -u "$path"`
34902
34903  # Now try to locate executable using which
34904  new_path=`$WHICH "$new_path" 2> /dev/null`
34905  # bat and cmd files are not always considered executable in cygwin causing which
34906  # to not find them
34907  if test "x$new_path" = x \
34908      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34909      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34910    new_path=`$CYGPATH -u "$path"`
34911  fi
34912  if test "x$new_path" = x; then
34913    # Oops. Which didn't find the executable.
34914    # The splitting of arguments from the executable at a space might have been incorrect,
34915    # since paths with space are more likely in Windows. Give it another try with the whole
34916    # argument.
34917    path="$complete"
34918    arguments="EOL"
34919    new_path=`$CYGPATH -u "$path"`
34920    new_path=`$WHICH "$new_path" 2> /dev/null`
34921    # bat and cmd files are not always considered executable in cygwin causing which
34922    # to not find them
34923    if test "x$new_path" = x \
34924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34926      new_path=`$CYGPATH -u "$path"`
34927    fi
34928    if test "x$new_path" = x; then
34929      # It's still not found. Now this is an unrecoverable error.
34930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34931$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34932      has_space=`$ECHO "$complete" | $GREP " "`
34933      if test "x$has_space" != x; then
34934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34936      fi
34937      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34938    fi
34939  fi
34940
34941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34944  # "foo.exe" is OK but "foo" is an error.
34945  #
34946  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34947  # It is also a way to make sure we got the proper file name for the real test later on.
34948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34949  if test "x$test_shortpath" = x; then
34950    # Short path failed, file does not exist as specified.
34951    # Try adding .exe or .cmd
34952    if test -f "${new_path}.exe"; then
34953      input_to_shortpath="${new_path}.exe"
34954    elif test -f "${new_path}.cmd"; then
34955      input_to_shortpath="${new_path}.cmd"
34956    else
34957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34958$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34959      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34960$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34961      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34962    fi
34963  else
34964    input_to_shortpath="$new_path"
34965  fi
34966
34967  # Call helper function which possibly converts this using DOS-style short mode.
34968  # If so, the updated path is stored in $new_path.
34969  new_path="$input_to_shortpath"
34970
34971  input_path="$input_to_shortpath"
34972  # Check if we need to convert this using DOS-style short mode. If the path
34973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34974  # take no chances and rewrite it.
34975  # Note: m4 eats our [], so we need to use [ and ] instead.
34976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34977  if test "x$has_forbidden_chars" != x; then
34978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34982      # Going to short mode and back again did indeed matter. Since short mode is
34983      # case insensitive, let's make it lowercase to improve readability.
34984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34985      # Now convert it back to Unix-stile (cygpath)
34986      input_path=`$CYGPATH -u "$shortmode_path"`
34987      new_path="$input_path"
34988    fi
34989  fi
34990
34991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34992  if test "x$test_cygdrive_prefix" = x; then
34993    # As a simple fix, exclude /usr/bin since it's not a real path.
34994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34996      # a path prefixed by /cygdrive for fixpath to work.
34997      new_path="$CYGWIN_ROOT_PATH$input_path"
34998    fi
34999  fi
35000
35001  # remove trailing .exe if any
35002  new_path="${new_path/%.exe/}"
35003
35004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35005
35006  # First separate the path from the arguments. This will split at the first
35007  # space.
35008  complete="$DUMPBIN"
35009  path="${complete%% *}"
35010  tmp="$complete EOL"
35011  arguments="${tmp#* }"
35012
35013  # Input might be given as Windows format, start by converting to
35014  # unix format.
35015  new_path="$path"
35016
35017  windows_path="$new_path"
35018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35019    unix_path=`$CYGPATH -u "$windows_path"`
35020    new_path="$unix_path"
35021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35023    new_path="$unix_path"
35024  fi
35025
35026
35027  # Now try to locate executable using which
35028  new_path=`$WHICH "$new_path" 2> /dev/null`
35029
35030  if test "x$new_path" = x; then
35031    # Oops. Which didn't find the executable.
35032    # The splitting of arguments from the executable at a space might have been incorrect,
35033    # since paths with space are more likely in Windows. Give it another try with the whole
35034    # argument.
35035    path="$complete"
35036    arguments="EOL"
35037    new_path="$path"
35038
35039  windows_path="$new_path"
35040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35041    unix_path=`$CYGPATH -u "$windows_path"`
35042    new_path="$unix_path"
35043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35045    new_path="$unix_path"
35046  fi
35047
35048
35049    new_path=`$WHICH "$new_path" 2> /dev/null`
35050    # bat and cmd files are not always considered executable in MSYS causing which
35051    # to not find them
35052    if test "x$new_path" = x \
35053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35055      new_path="$path"
35056
35057  windows_path="$new_path"
35058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35059    unix_path=`$CYGPATH -u "$windows_path"`
35060    new_path="$unix_path"
35061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35063    new_path="$unix_path"
35064  fi
35065
35066    fi
35067
35068    if test "x$new_path" = x; then
35069      # It's still not found. Now this is an unrecoverable error.
35070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35071$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35072      has_space=`$ECHO "$complete" | $GREP " "`
35073      if test "x$has_space" != x; then
35074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35076      fi
35077      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35078    fi
35079  fi
35080
35081  # Now new_path has a complete unix path to the binary
35082  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35083    # Keep paths in /bin as-is, but remove trailing .exe if any
35084    new_path="${new_path/%.exe/}"
35085    # Do not save /bin paths to all_fixpath_prefixes!
35086  else
35087    # Not in mixed or Windows style, start by that.
35088    new_path=`cmd //c echo $new_path`
35089
35090  input_path="$new_path"
35091  # Check if we need to convert this using DOS-style short mode. If the path
35092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35093  # take no chances and rewrite it.
35094  # Note: m4 eats our [], so we need to use [ and ] instead.
35095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35096  if test "x$has_forbidden_chars" != x; then
35097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35099  fi
35100
35101    # Output is in $new_path
35102
35103  windows_path="$new_path"
35104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35105    unix_path=`$CYGPATH -u "$windows_path"`
35106    new_path="$unix_path"
35107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35109    new_path="$unix_path"
35110  fi
35111
35112    # remove trailing .exe if any
35113    new_path="${new_path/%.exe/}"
35114
35115    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35116    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35117  fi
35118
35119  else
35120    # We're on a posix platform. Hooray! :)
35121    # First separate the path from the arguments. This will split at the first
35122    # space.
35123    complete="$DUMPBIN"
35124    path="${complete%% *}"
35125    tmp="$complete EOL"
35126    arguments="${tmp#* }"
35127
35128    # Cannot rely on the command "which" here since it doesn't always work.
35129    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35130    if test -z "$is_absolute_path"; then
35131      # Path to executable is not absolute. Find it.
35132      IFS_save="$IFS"
35133      IFS=:
35134      for p in $PATH; do
35135        if test -f "$p/$path" && test -x "$p/$path"; then
35136          new_path="$p/$path"
35137          break
35138        fi
35139      done
35140      IFS="$IFS_save"
35141    else
35142      # This is an absolute path, we can use it without further modifications.
35143      new_path="$path"
35144    fi
35145
35146    if test "x$new_path" = x; then
35147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35148$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35149      has_space=`$ECHO "$complete" | $GREP " "`
35150      if test "x$has_space" != x; then
35151        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35153      fi
35154      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35155    fi
35156  fi
35157
35158  # Now join together the path and the arguments once again
35159  if test "x$arguments" != xEOL; then
35160    new_complete="$new_path ${arguments% *}"
35161  else
35162    new_complete="$new_path"
35163  fi
35164
35165  if test "x$complete" != "x$new_complete"; then
35166    DUMPBIN="$new_complete"
35167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35168$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35169  fi
35170
35171    # We need to check for 'msbuild.exe' because at the place where we expect to
35172    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35173    # won't find the 'msbuild.exe' executable in that case (and the
35174    # 'ac_executable_extensions' is unusable due to performance reasons).
35175    # Notice that we intentionally don't fix up the path to MSBUILD because we
35176    # will call it in a DOS shell during freetype detection on Windows (see
35177    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35178    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35179set dummy msbuild.exe; ac_word=$2
35180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35181$as_echo_n "checking for $ac_word... " >&6; }
35182if ${ac_cv_prog_MSBUILD+:} false; then :
35183  $as_echo_n "(cached) " >&6
35184else
35185  if test -n "$MSBUILD"; then
35186  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35187else
35188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35189for as_dir in $PATH
35190do
35191  IFS=$as_save_IFS
35192  test -z "$as_dir" && as_dir=.
35193    for ac_exec_ext in '' $ac_executable_extensions; do
35194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35195    ac_cv_prog_MSBUILD="msbuild.exe"
35196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35197    break 2
35198  fi
35199done
35200  done
35201IFS=$as_save_IFS
35202
35203fi
35204fi
35205MSBUILD=$ac_cv_prog_MSBUILD
35206if test -n "$MSBUILD"; then
35207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35208$as_echo "$MSBUILD" >&6; }
35209else
35210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35211$as_echo "no" >&6; }
35212fi
35213
35214
35215  fi
35216
35217  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35218
35219
35220  # Publish this variable in the help.
35221
35222
35223  if test "x$STRIP" = x; then
35224    # The variable is not set by user, try to locate tool using the code snippet
35225    for ac_prog in strip
35226do
35227  # Extract the first word of "$ac_prog", so it can be a program name with args.
35228set dummy $ac_prog; ac_word=$2
35229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35230$as_echo_n "checking for $ac_word... " >&6; }
35231if ${ac_cv_path_STRIP+:} false; then :
35232  $as_echo_n "(cached) " >&6
35233else
35234  case $STRIP in
35235  [\\/]* | ?:[\\/]*)
35236  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35237  ;;
35238  *)
35239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35240for as_dir in $PATH
35241do
35242  IFS=$as_save_IFS
35243  test -z "$as_dir" && as_dir=.
35244    for ac_exec_ext in '' $ac_executable_extensions; do
35245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35246    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35248    break 2
35249  fi
35250done
35251  done
35252IFS=$as_save_IFS
35253
35254  ;;
35255esac
35256fi
35257STRIP=$ac_cv_path_STRIP
35258if test -n "$STRIP"; then
35259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35260$as_echo "$STRIP" >&6; }
35261else
35262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35263$as_echo "no" >&6; }
35264fi
35265
35266
35267  test -n "$STRIP" && break
35268done
35269
35270  else
35271    # The variable is set, but is it from the command line or the environment?
35272
35273    # Try to remove the string !STRIP! from our list.
35274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35276      # If it failed, the variable was not from the command line. Ignore it,
35277      # but warn the user (except for BASH, which is always set by the calling BASH).
35278      if test "xSTRIP" != xBASH; then
35279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35280$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35281      fi
35282      # Try to locate tool using the code snippet
35283      for ac_prog in strip
35284do
35285  # Extract the first word of "$ac_prog", so it can be a program name with args.
35286set dummy $ac_prog; ac_word=$2
35287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35288$as_echo_n "checking for $ac_word... " >&6; }
35289if ${ac_cv_path_STRIP+:} false; then :
35290  $as_echo_n "(cached) " >&6
35291else
35292  case $STRIP in
35293  [\\/]* | ?:[\\/]*)
35294  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35295  ;;
35296  *)
35297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35298for as_dir in $PATH
35299do
35300  IFS=$as_save_IFS
35301  test -z "$as_dir" && as_dir=.
35302    for ac_exec_ext in '' $ac_executable_extensions; do
35303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35304    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35306    break 2
35307  fi
35308done
35309  done
35310IFS=$as_save_IFS
35311
35312  ;;
35313esac
35314fi
35315STRIP=$ac_cv_path_STRIP
35316if test -n "$STRIP"; then
35317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35318$as_echo "$STRIP" >&6; }
35319else
35320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35321$as_echo "no" >&6; }
35322fi
35323
35324
35325  test -n "$STRIP" && break
35326done
35327
35328    else
35329      # If it succeeded, then it was overridden by the user. We will use it
35330      # for the tool.
35331
35332      # First remove it from the list of overridden variables, so we can test
35333      # for unknown variables in the end.
35334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35335
35336      # Check if the provided tool contains a complete path.
35337      tool_specified="$STRIP"
35338      tool_basename="${tool_specified##*/}"
35339      if test "x$tool_basename" = "x$tool_specified"; then
35340        # A command without a complete path is provided, search $PATH.
35341        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35342$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35343        # Extract the first word of "$tool_basename", so it can be a program name with args.
35344set dummy $tool_basename; ac_word=$2
35345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35346$as_echo_n "checking for $ac_word... " >&6; }
35347if ${ac_cv_path_STRIP+:} false; then :
35348  $as_echo_n "(cached) " >&6
35349else
35350  case $STRIP in
35351  [\\/]* | ?:[\\/]*)
35352  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35353  ;;
35354  *)
35355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35356for as_dir in $PATH
35357do
35358  IFS=$as_save_IFS
35359  test -z "$as_dir" && as_dir=.
35360    for ac_exec_ext in '' $ac_executable_extensions; do
35361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35362    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35364    break 2
35365  fi
35366done
35367  done
35368IFS=$as_save_IFS
35369
35370  ;;
35371esac
35372fi
35373STRIP=$ac_cv_path_STRIP
35374if test -n "$STRIP"; then
35375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35376$as_echo "$STRIP" >&6; }
35377else
35378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35379$as_echo "no" >&6; }
35380fi
35381
35382
35383        if test "x$STRIP" = x; then
35384          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35385        fi
35386      else
35387        # Otherwise we believe it is a complete path. Use it as it is.
35388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35389$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35391$as_echo_n "checking for STRIP... " >&6; }
35392        if test ! -x "$tool_specified"; then
35393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35394$as_echo "not found" >&6; }
35395          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35396        fi
35397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35398$as_echo "$tool_specified" >&6; }
35399      fi
35400    fi
35401  fi
35402
35403
35404
35405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35406
35407  # First separate the path from the arguments. This will split at the first
35408  # space.
35409  complete="$STRIP"
35410  path="${complete%% *}"
35411  tmp="$complete EOL"
35412  arguments="${tmp#* }"
35413
35414  # Input might be given as Windows format, start by converting to
35415  # unix format.
35416  new_path=`$CYGPATH -u "$path"`
35417
35418  # Now try to locate executable using which
35419  new_path=`$WHICH "$new_path" 2> /dev/null`
35420  # bat and cmd files are not always considered executable in cygwin causing which
35421  # to not find them
35422  if test "x$new_path" = x \
35423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35425    new_path=`$CYGPATH -u "$path"`
35426  fi
35427  if test "x$new_path" = x; then
35428    # Oops. Which didn't find the executable.
35429    # The splitting of arguments from the executable at a space might have been incorrect,
35430    # since paths with space are more likely in Windows. Give it another try with the whole
35431    # argument.
35432    path="$complete"
35433    arguments="EOL"
35434    new_path=`$CYGPATH -u "$path"`
35435    new_path=`$WHICH "$new_path" 2> /dev/null`
35436    # bat and cmd files are not always considered executable in cygwin causing which
35437    # to not find them
35438    if test "x$new_path" = x \
35439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35441      new_path=`$CYGPATH -u "$path"`
35442    fi
35443    if test "x$new_path" = x; then
35444      # It's still not found. Now this is an unrecoverable error.
35445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35446$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35447      has_space=`$ECHO "$complete" | $GREP " "`
35448      if test "x$has_space" != x; then
35449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35451      fi
35452      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35453    fi
35454  fi
35455
35456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35459  # "foo.exe" is OK but "foo" is an error.
35460  #
35461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35462  # It is also a way to make sure we got the proper file name for the real test later on.
35463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35464  if test "x$test_shortpath" = x; then
35465    # Short path failed, file does not exist as specified.
35466    # Try adding .exe or .cmd
35467    if test -f "${new_path}.exe"; then
35468      input_to_shortpath="${new_path}.exe"
35469    elif test -f "${new_path}.cmd"; then
35470      input_to_shortpath="${new_path}.cmd"
35471    else
35472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35473$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35476      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35477    fi
35478  else
35479    input_to_shortpath="$new_path"
35480  fi
35481
35482  # Call helper function which possibly converts this using DOS-style short mode.
35483  # If so, the updated path is stored in $new_path.
35484  new_path="$input_to_shortpath"
35485
35486  input_path="$input_to_shortpath"
35487  # Check if we need to convert this using DOS-style short mode. If the path
35488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35489  # take no chances and rewrite it.
35490  # Note: m4 eats our [], so we need to use [ and ] instead.
35491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35492  if test "x$has_forbidden_chars" != x; then
35493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35497      # Going to short mode and back again did indeed matter. Since short mode is
35498      # case insensitive, let's make it lowercase to improve readability.
35499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35500      # Now convert it back to Unix-stile (cygpath)
35501      input_path=`$CYGPATH -u "$shortmode_path"`
35502      new_path="$input_path"
35503    fi
35504  fi
35505
35506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35507  if test "x$test_cygdrive_prefix" = x; then
35508    # As a simple fix, exclude /usr/bin since it's not a real path.
35509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35511      # a path prefixed by /cygdrive for fixpath to work.
35512      new_path="$CYGWIN_ROOT_PATH$input_path"
35513    fi
35514  fi
35515
35516  # remove trailing .exe if any
35517  new_path="${new_path/%.exe/}"
35518
35519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35520
35521  # First separate the path from the arguments. This will split at the first
35522  # space.
35523  complete="$STRIP"
35524  path="${complete%% *}"
35525  tmp="$complete EOL"
35526  arguments="${tmp#* }"
35527
35528  # Input might be given as Windows format, start by converting to
35529  # unix format.
35530  new_path="$path"
35531
35532  windows_path="$new_path"
35533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35534    unix_path=`$CYGPATH -u "$windows_path"`
35535    new_path="$unix_path"
35536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35538    new_path="$unix_path"
35539  fi
35540
35541
35542  # Now try to locate executable using which
35543  new_path=`$WHICH "$new_path" 2> /dev/null`
35544
35545  if test "x$new_path" = x; then
35546    # Oops. Which didn't find the executable.
35547    # The splitting of arguments from the executable at a space might have been incorrect,
35548    # since paths with space are more likely in Windows. Give it another try with the whole
35549    # argument.
35550    path="$complete"
35551    arguments="EOL"
35552    new_path="$path"
35553
35554  windows_path="$new_path"
35555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35556    unix_path=`$CYGPATH -u "$windows_path"`
35557    new_path="$unix_path"
35558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35560    new_path="$unix_path"
35561  fi
35562
35563
35564    new_path=`$WHICH "$new_path" 2> /dev/null`
35565    # bat and cmd files are not always considered executable in MSYS causing which
35566    # to not find them
35567    if test "x$new_path" = x \
35568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35570      new_path="$path"
35571
35572  windows_path="$new_path"
35573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35574    unix_path=`$CYGPATH -u "$windows_path"`
35575    new_path="$unix_path"
35576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35578    new_path="$unix_path"
35579  fi
35580
35581    fi
35582
35583    if test "x$new_path" = x; then
35584      # It's still not found. Now this is an unrecoverable error.
35585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35586$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35587      has_space=`$ECHO "$complete" | $GREP " "`
35588      if test "x$has_space" != x; then
35589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35591      fi
35592      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35593    fi
35594  fi
35595
35596  # Now new_path has a complete unix path to the binary
35597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35598    # Keep paths in /bin as-is, but remove trailing .exe if any
35599    new_path="${new_path/%.exe/}"
35600    # Do not save /bin paths to all_fixpath_prefixes!
35601  else
35602    # Not in mixed or Windows style, start by that.
35603    new_path=`cmd //c echo $new_path`
35604
35605  input_path="$new_path"
35606  # Check if we need to convert this using DOS-style short mode. If the path
35607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35608  # take no chances and rewrite it.
35609  # Note: m4 eats our [], so we need to use [ and ] instead.
35610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35611  if test "x$has_forbidden_chars" != x; then
35612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35614  fi
35615
35616    # Output is in $new_path
35617
35618  windows_path="$new_path"
35619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35620    unix_path=`$CYGPATH -u "$windows_path"`
35621    new_path="$unix_path"
35622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35624    new_path="$unix_path"
35625  fi
35626
35627    # remove trailing .exe if any
35628    new_path="${new_path/%.exe/}"
35629
35630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35632  fi
35633
35634  else
35635    # We're on a posix platform. Hooray! :)
35636    # First separate the path from the arguments. This will split at the first
35637    # space.
35638    complete="$STRIP"
35639    path="${complete%% *}"
35640    tmp="$complete EOL"
35641    arguments="${tmp#* }"
35642
35643    # Cannot rely on the command "which" here since it doesn't always work.
35644    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35645    if test -z "$is_absolute_path"; then
35646      # Path to executable is not absolute. Find it.
35647      IFS_save="$IFS"
35648      IFS=:
35649      for p in $PATH; do
35650        if test -f "$p/$path" && test -x "$p/$path"; then
35651          new_path="$p/$path"
35652          break
35653        fi
35654      done
35655      IFS="$IFS_save"
35656    else
35657      # This is an absolute path, we can use it without further modifications.
35658      new_path="$path"
35659    fi
35660
35661    if test "x$new_path" = x; then
35662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35663$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35664      has_space=`$ECHO "$complete" | $GREP " "`
35665      if test "x$has_space" != x; then
35666        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35668      fi
35669      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35670    fi
35671  fi
35672
35673  # Now join together the path and the arguments once again
35674  if test "x$arguments" != xEOL; then
35675    new_complete="$new_path ${arguments% *}"
35676  else
35677    new_complete="$new_path"
35678  fi
35679
35680  if test "x$complete" != "x$new_complete"; then
35681    STRIP="$new_complete"
35682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35683$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35684  fi
35685
35686
35687
35688  # Publish this variable in the help.
35689
35690
35691  if test "x$NM" = x; then
35692    # The variable is not set by user, try to locate tool using the code snippet
35693    for ac_prog in nm
35694do
35695  # Extract the first word of "$ac_prog", so it can be a program name with args.
35696set dummy $ac_prog; ac_word=$2
35697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35698$as_echo_n "checking for $ac_word... " >&6; }
35699if ${ac_cv_path_NM+:} false; then :
35700  $as_echo_n "(cached) " >&6
35701else
35702  case $NM in
35703  [\\/]* | ?:[\\/]*)
35704  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35705  ;;
35706  *)
35707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35708for as_dir in $PATH
35709do
35710  IFS=$as_save_IFS
35711  test -z "$as_dir" && as_dir=.
35712    for ac_exec_ext in '' $ac_executable_extensions; do
35713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35714    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35716    break 2
35717  fi
35718done
35719  done
35720IFS=$as_save_IFS
35721
35722  ;;
35723esac
35724fi
35725NM=$ac_cv_path_NM
35726if test -n "$NM"; then
35727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35728$as_echo "$NM" >&6; }
35729else
35730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35731$as_echo "no" >&6; }
35732fi
35733
35734
35735  test -n "$NM" && break
35736done
35737
35738  else
35739    # The variable is set, but is it from the command line or the environment?
35740
35741    # Try to remove the string !NM! from our list.
35742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35744      # If it failed, the variable was not from the command line. Ignore it,
35745      # but warn the user (except for BASH, which is always set by the calling BASH).
35746      if test "xNM" != xBASH; then
35747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35748$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35749      fi
35750      # Try to locate tool using the code snippet
35751      for ac_prog in nm
35752do
35753  # Extract the first word of "$ac_prog", so it can be a program name with args.
35754set dummy $ac_prog; ac_word=$2
35755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35756$as_echo_n "checking for $ac_word... " >&6; }
35757if ${ac_cv_path_NM+:} false; then :
35758  $as_echo_n "(cached) " >&6
35759else
35760  case $NM in
35761  [\\/]* | ?:[\\/]*)
35762  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35763  ;;
35764  *)
35765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35766for as_dir in $PATH
35767do
35768  IFS=$as_save_IFS
35769  test -z "$as_dir" && as_dir=.
35770    for ac_exec_ext in '' $ac_executable_extensions; do
35771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35772    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35774    break 2
35775  fi
35776done
35777  done
35778IFS=$as_save_IFS
35779
35780  ;;
35781esac
35782fi
35783NM=$ac_cv_path_NM
35784if test -n "$NM"; then
35785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35786$as_echo "$NM" >&6; }
35787else
35788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35789$as_echo "no" >&6; }
35790fi
35791
35792
35793  test -n "$NM" && break
35794done
35795
35796    else
35797      # If it succeeded, then it was overridden by the user. We will use it
35798      # for the tool.
35799
35800      # First remove it from the list of overridden variables, so we can test
35801      # for unknown variables in the end.
35802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35803
35804      # Check if the provided tool contains a complete path.
35805      tool_specified="$NM"
35806      tool_basename="${tool_specified##*/}"
35807      if test "x$tool_basename" = "x$tool_specified"; then
35808        # A command without a complete path is provided, search $PATH.
35809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35810$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35811        # Extract the first word of "$tool_basename", so it can be a program name with args.
35812set dummy $tool_basename; ac_word=$2
35813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35814$as_echo_n "checking for $ac_word... " >&6; }
35815if ${ac_cv_path_NM+:} false; then :
35816  $as_echo_n "(cached) " >&6
35817else
35818  case $NM in
35819  [\\/]* | ?:[\\/]*)
35820  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35821  ;;
35822  *)
35823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35824for as_dir in $PATH
35825do
35826  IFS=$as_save_IFS
35827  test -z "$as_dir" && as_dir=.
35828    for ac_exec_ext in '' $ac_executable_extensions; do
35829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35830    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35832    break 2
35833  fi
35834done
35835  done
35836IFS=$as_save_IFS
35837
35838  ;;
35839esac
35840fi
35841NM=$ac_cv_path_NM
35842if test -n "$NM"; then
35843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35844$as_echo "$NM" >&6; }
35845else
35846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35847$as_echo "no" >&6; }
35848fi
35849
35850
35851        if test "x$NM" = x; then
35852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35853        fi
35854      else
35855        # Otherwise we believe it is a complete path. Use it as it is.
35856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35857$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35859$as_echo_n "checking for NM... " >&6; }
35860        if test ! -x "$tool_specified"; then
35861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35862$as_echo "not found" >&6; }
35863          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35864        fi
35865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35866$as_echo "$tool_specified" >&6; }
35867      fi
35868    fi
35869  fi
35870
35871
35872
35873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35874
35875  # First separate the path from the arguments. This will split at the first
35876  # space.
35877  complete="$NM"
35878  path="${complete%% *}"
35879  tmp="$complete EOL"
35880  arguments="${tmp#* }"
35881
35882  # Input might be given as Windows format, start by converting to
35883  # unix format.
35884  new_path=`$CYGPATH -u "$path"`
35885
35886  # Now try to locate executable using which
35887  new_path=`$WHICH "$new_path" 2> /dev/null`
35888  # bat and cmd files are not always considered executable in cygwin causing which
35889  # to not find them
35890  if test "x$new_path" = x \
35891      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35892      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35893    new_path=`$CYGPATH -u "$path"`
35894  fi
35895  if test "x$new_path" = x; then
35896    # Oops. Which didn't find the executable.
35897    # The splitting of arguments from the executable at a space might have been incorrect,
35898    # since paths with space are more likely in Windows. Give it another try with the whole
35899    # argument.
35900    path="$complete"
35901    arguments="EOL"
35902    new_path=`$CYGPATH -u "$path"`
35903    new_path=`$WHICH "$new_path" 2> /dev/null`
35904    # bat and cmd files are not always considered executable in cygwin causing which
35905    # to not find them
35906    if test "x$new_path" = x \
35907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35909      new_path=`$CYGPATH -u "$path"`
35910    fi
35911    if test "x$new_path" = x; then
35912      # It's still not found. Now this is an unrecoverable error.
35913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35914$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35915      has_space=`$ECHO "$complete" | $GREP " "`
35916      if test "x$has_space" != x; then
35917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35919      fi
35920      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35921    fi
35922  fi
35923
35924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35927  # "foo.exe" is OK but "foo" is an error.
35928  #
35929  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35930  # It is also a way to make sure we got the proper file name for the real test later on.
35931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35932  if test "x$test_shortpath" = x; then
35933    # Short path failed, file does not exist as specified.
35934    # Try adding .exe or .cmd
35935    if test -f "${new_path}.exe"; then
35936      input_to_shortpath="${new_path}.exe"
35937    elif test -f "${new_path}.cmd"; then
35938      input_to_shortpath="${new_path}.cmd"
35939    else
35940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35941$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35942      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35943$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35944      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35945    fi
35946  else
35947    input_to_shortpath="$new_path"
35948  fi
35949
35950  # Call helper function which possibly converts this using DOS-style short mode.
35951  # If so, the updated path is stored in $new_path.
35952  new_path="$input_to_shortpath"
35953
35954  input_path="$input_to_shortpath"
35955  # Check if we need to convert this using DOS-style short mode. If the path
35956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35957  # take no chances and rewrite it.
35958  # Note: m4 eats our [], so we need to use [ and ] instead.
35959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35960  if test "x$has_forbidden_chars" != x; then
35961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35965      # Going to short mode and back again did indeed matter. Since short mode is
35966      # case insensitive, let's make it lowercase to improve readability.
35967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35968      # Now convert it back to Unix-stile (cygpath)
35969      input_path=`$CYGPATH -u "$shortmode_path"`
35970      new_path="$input_path"
35971    fi
35972  fi
35973
35974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35975  if test "x$test_cygdrive_prefix" = x; then
35976    # As a simple fix, exclude /usr/bin since it's not a real path.
35977    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35979      # a path prefixed by /cygdrive for fixpath to work.
35980      new_path="$CYGWIN_ROOT_PATH$input_path"
35981    fi
35982  fi
35983
35984  # remove trailing .exe if any
35985  new_path="${new_path/%.exe/}"
35986
35987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35988
35989  # First separate the path from the arguments. This will split at the first
35990  # space.
35991  complete="$NM"
35992  path="${complete%% *}"
35993  tmp="$complete EOL"
35994  arguments="${tmp#* }"
35995
35996  # Input might be given as Windows format, start by converting to
35997  # unix format.
35998  new_path="$path"
35999
36000  windows_path="$new_path"
36001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36002    unix_path=`$CYGPATH -u "$windows_path"`
36003    new_path="$unix_path"
36004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36006    new_path="$unix_path"
36007  fi
36008
36009
36010  # Now try to locate executable using which
36011  new_path=`$WHICH "$new_path" 2> /dev/null`
36012
36013  if test "x$new_path" = x; then
36014    # Oops. Which didn't find the executable.
36015    # The splitting of arguments from the executable at a space might have been incorrect,
36016    # since paths with space are more likely in Windows. Give it another try with the whole
36017    # argument.
36018    path="$complete"
36019    arguments="EOL"
36020    new_path="$path"
36021
36022  windows_path="$new_path"
36023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36024    unix_path=`$CYGPATH -u "$windows_path"`
36025    new_path="$unix_path"
36026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36028    new_path="$unix_path"
36029  fi
36030
36031
36032    new_path=`$WHICH "$new_path" 2> /dev/null`
36033    # bat and cmd files are not always considered executable in MSYS causing which
36034    # to not find them
36035    if test "x$new_path" = x \
36036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36038      new_path="$path"
36039
36040  windows_path="$new_path"
36041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36042    unix_path=`$CYGPATH -u "$windows_path"`
36043    new_path="$unix_path"
36044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36046    new_path="$unix_path"
36047  fi
36048
36049    fi
36050
36051    if test "x$new_path" = x; then
36052      # It's still not found. Now this is an unrecoverable error.
36053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36054$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36055      has_space=`$ECHO "$complete" | $GREP " "`
36056      if test "x$has_space" != x; then
36057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36059      fi
36060      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36061    fi
36062  fi
36063
36064  # Now new_path has a complete unix path to the binary
36065  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36066    # Keep paths in /bin as-is, but remove trailing .exe if any
36067    new_path="${new_path/%.exe/}"
36068    # Do not save /bin paths to all_fixpath_prefixes!
36069  else
36070    # Not in mixed or Windows style, start by that.
36071    new_path=`cmd //c echo $new_path`
36072
36073  input_path="$new_path"
36074  # Check if we need to convert this using DOS-style short mode. If the path
36075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36076  # take no chances and rewrite it.
36077  # Note: m4 eats our [], so we need to use [ and ] instead.
36078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36079  if test "x$has_forbidden_chars" != x; then
36080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36082  fi
36083
36084    # Output is in $new_path
36085
36086  windows_path="$new_path"
36087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36088    unix_path=`$CYGPATH -u "$windows_path"`
36089    new_path="$unix_path"
36090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36092    new_path="$unix_path"
36093  fi
36094
36095    # remove trailing .exe if any
36096    new_path="${new_path/%.exe/}"
36097
36098    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36099    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36100  fi
36101
36102  else
36103    # We're on a posix platform. Hooray! :)
36104    # First separate the path from the arguments. This will split at the first
36105    # space.
36106    complete="$NM"
36107    path="${complete%% *}"
36108    tmp="$complete EOL"
36109    arguments="${tmp#* }"
36110
36111    # Cannot rely on the command "which" here since it doesn't always work.
36112    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36113    if test -z "$is_absolute_path"; then
36114      # Path to executable is not absolute. Find it.
36115      IFS_save="$IFS"
36116      IFS=:
36117      for p in $PATH; do
36118        if test -f "$p/$path" && test -x "$p/$path"; then
36119          new_path="$p/$path"
36120          break
36121        fi
36122      done
36123      IFS="$IFS_save"
36124    else
36125      # This is an absolute path, we can use it without further modifications.
36126      new_path="$path"
36127    fi
36128
36129    if test "x$new_path" = x; then
36130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36131$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36132      has_space=`$ECHO "$complete" | $GREP " "`
36133      if test "x$has_space" != x; then
36134        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36135$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36136      fi
36137      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36138    fi
36139  fi
36140
36141  # Now join together the path and the arguments once again
36142  if test "x$arguments" != xEOL; then
36143    new_complete="$new_path ${arguments% *}"
36144  else
36145    new_complete="$new_path"
36146  fi
36147
36148  if test "x$complete" != "x$new_complete"; then
36149    NM="$new_complete"
36150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36151$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36152  fi
36153
36154
36155
36156  # Publish this variable in the help.
36157
36158
36159  if test "x$GNM" = x; then
36160    # The variable is not set by user, try to locate tool using the code snippet
36161    for ac_prog in gnm
36162do
36163  # Extract the first word of "$ac_prog", so it can be a program name with args.
36164set dummy $ac_prog; ac_word=$2
36165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36166$as_echo_n "checking for $ac_word... " >&6; }
36167if ${ac_cv_path_GNM+:} false; then :
36168  $as_echo_n "(cached) " >&6
36169else
36170  case $GNM in
36171  [\\/]* | ?:[\\/]*)
36172  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36173  ;;
36174  *)
36175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36176for as_dir in $PATH
36177do
36178  IFS=$as_save_IFS
36179  test -z "$as_dir" && as_dir=.
36180    for ac_exec_ext in '' $ac_executable_extensions; do
36181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36182    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36184    break 2
36185  fi
36186done
36187  done
36188IFS=$as_save_IFS
36189
36190  ;;
36191esac
36192fi
36193GNM=$ac_cv_path_GNM
36194if test -n "$GNM"; then
36195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36196$as_echo "$GNM" >&6; }
36197else
36198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36199$as_echo "no" >&6; }
36200fi
36201
36202
36203  test -n "$GNM" && break
36204done
36205
36206  else
36207    # The variable is set, but is it from the command line or the environment?
36208
36209    # Try to remove the string !GNM! from our list.
36210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36212      # If it failed, the variable was not from the command line. Ignore it,
36213      # but warn the user (except for BASH, which is always set by the calling BASH).
36214      if test "xGNM" != xBASH; then
36215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36216$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36217      fi
36218      # Try to locate tool using the code snippet
36219      for ac_prog in gnm
36220do
36221  # Extract the first word of "$ac_prog", so it can be a program name with args.
36222set dummy $ac_prog; ac_word=$2
36223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36224$as_echo_n "checking for $ac_word... " >&6; }
36225if ${ac_cv_path_GNM+:} false; then :
36226  $as_echo_n "(cached) " >&6
36227else
36228  case $GNM in
36229  [\\/]* | ?:[\\/]*)
36230  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36231  ;;
36232  *)
36233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36234for as_dir in $PATH
36235do
36236  IFS=$as_save_IFS
36237  test -z "$as_dir" && as_dir=.
36238    for ac_exec_ext in '' $ac_executable_extensions; do
36239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36240    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36242    break 2
36243  fi
36244done
36245  done
36246IFS=$as_save_IFS
36247
36248  ;;
36249esac
36250fi
36251GNM=$ac_cv_path_GNM
36252if test -n "$GNM"; then
36253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36254$as_echo "$GNM" >&6; }
36255else
36256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36257$as_echo "no" >&6; }
36258fi
36259
36260
36261  test -n "$GNM" && break
36262done
36263
36264    else
36265      # If it succeeded, then it was overridden by the user. We will use it
36266      # for the tool.
36267
36268      # First remove it from the list of overridden variables, so we can test
36269      # for unknown variables in the end.
36270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36271
36272      # Check if the provided tool contains a complete path.
36273      tool_specified="$GNM"
36274      tool_basename="${tool_specified##*/}"
36275      if test "x$tool_basename" = "x$tool_specified"; then
36276        # A command without a complete path is provided, search $PATH.
36277        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36278$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36279        # Extract the first word of "$tool_basename", so it can be a program name with args.
36280set dummy $tool_basename; ac_word=$2
36281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36282$as_echo_n "checking for $ac_word... " >&6; }
36283if ${ac_cv_path_GNM+:} false; then :
36284  $as_echo_n "(cached) " >&6
36285else
36286  case $GNM in
36287  [\\/]* | ?:[\\/]*)
36288  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36289  ;;
36290  *)
36291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36292for as_dir in $PATH
36293do
36294  IFS=$as_save_IFS
36295  test -z "$as_dir" && as_dir=.
36296    for ac_exec_ext in '' $ac_executable_extensions; do
36297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36298    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36300    break 2
36301  fi
36302done
36303  done
36304IFS=$as_save_IFS
36305
36306  ;;
36307esac
36308fi
36309GNM=$ac_cv_path_GNM
36310if test -n "$GNM"; then
36311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36312$as_echo "$GNM" >&6; }
36313else
36314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36315$as_echo "no" >&6; }
36316fi
36317
36318
36319        if test "x$GNM" = x; then
36320          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36321        fi
36322      else
36323        # Otherwise we believe it is a complete path. Use it as it is.
36324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36325$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36327$as_echo_n "checking for GNM... " >&6; }
36328        if test ! -x "$tool_specified"; then
36329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36330$as_echo "not found" >&6; }
36331          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36332        fi
36333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36334$as_echo "$tool_specified" >&6; }
36335      fi
36336    fi
36337  fi
36338
36339
36340
36341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36342
36343  # First separate the path from the arguments. This will split at the first
36344  # space.
36345  complete="$GNM"
36346  path="${complete%% *}"
36347  tmp="$complete EOL"
36348  arguments="${tmp#* }"
36349
36350  # Input might be given as Windows format, start by converting to
36351  # unix format.
36352  new_path=`$CYGPATH -u "$path"`
36353
36354  # Now try to locate executable using which
36355  new_path=`$WHICH "$new_path" 2> /dev/null`
36356  # bat and cmd files are not always considered executable in cygwin causing which
36357  # to not find them
36358  if test "x$new_path" = x \
36359      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36360      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36361    new_path=`$CYGPATH -u "$path"`
36362  fi
36363  if test "x$new_path" = x; then
36364    # Oops. Which didn't find the executable.
36365    # The splitting of arguments from the executable at a space might have been incorrect,
36366    # since paths with space are more likely in Windows. Give it another try with the whole
36367    # argument.
36368    path="$complete"
36369    arguments="EOL"
36370    new_path=`$CYGPATH -u "$path"`
36371    new_path=`$WHICH "$new_path" 2> /dev/null`
36372    # bat and cmd files are not always considered executable in cygwin causing which
36373    # to not find them
36374    if test "x$new_path" = x \
36375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36377      new_path=`$CYGPATH -u "$path"`
36378    fi
36379    if test "x$new_path" = x; then
36380      # It's still not found. Now this is an unrecoverable error.
36381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36382$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36383      has_space=`$ECHO "$complete" | $GREP " "`
36384      if test "x$has_space" != x; then
36385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36387      fi
36388      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36389    fi
36390  fi
36391
36392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36395  # "foo.exe" is OK but "foo" is an error.
36396  #
36397  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36398  # It is also a way to make sure we got the proper file name for the real test later on.
36399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36400  if test "x$test_shortpath" = x; then
36401    # Short path failed, file does not exist as specified.
36402    # Try adding .exe or .cmd
36403    if test -f "${new_path}.exe"; then
36404      input_to_shortpath="${new_path}.exe"
36405    elif test -f "${new_path}.cmd"; then
36406      input_to_shortpath="${new_path}.cmd"
36407    else
36408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36409$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36410      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36411$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36412      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36413    fi
36414  else
36415    input_to_shortpath="$new_path"
36416  fi
36417
36418  # Call helper function which possibly converts this using DOS-style short mode.
36419  # If so, the updated path is stored in $new_path.
36420  new_path="$input_to_shortpath"
36421
36422  input_path="$input_to_shortpath"
36423  # Check if we need to convert this using DOS-style short mode. If the path
36424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36425  # take no chances and rewrite it.
36426  # Note: m4 eats our [], so we need to use [ and ] instead.
36427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36428  if test "x$has_forbidden_chars" != x; then
36429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36433      # Going to short mode and back again did indeed matter. Since short mode is
36434      # case insensitive, let's make it lowercase to improve readability.
36435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36436      # Now convert it back to Unix-stile (cygpath)
36437      input_path=`$CYGPATH -u "$shortmode_path"`
36438      new_path="$input_path"
36439    fi
36440  fi
36441
36442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36443  if test "x$test_cygdrive_prefix" = x; then
36444    # As a simple fix, exclude /usr/bin since it's not a real path.
36445    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36447      # a path prefixed by /cygdrive for fixpath to work.
36448      new_path="$CYGWIN_ROOT_PATH$input_path"
36449    fi
36450  fi
36451
36452  # remove trailing .exe if any
36453  new_path="${new_path/%.exe/}"
36454
36455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36456
36457  # First separate the path from the arguments. This will split at the first
36458  # space.
36459  complete="$GNM"
36460  path="${complete%% *}"
36461  tmp="$complete EOL"
36462  arguments="${tmp#* }"
36463
36464  # Input might be given as Windows format, start by converting to
36465  # unix format.
36466  new_path="$path"
36467
36468  windows_path="$new_path"
36469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36470    unix_path=`$CYGPATH -u "$windows_path"`
36471    new_path="$unix_path"
36472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36474    new_path="$unix_path"
36475  fi
36476
36477
36478  # Now try to locate executable using which
36479  new_path=`$WHICH "$new_path" 2> /dev/null`
36480
36481  if test "x$new_path" = x; then
36482    # Oops. Which didn't find the executable.
36483    # The splitting of arguments from the executable at a space might have been incorrect,
36484    # since paths with space are more likely in Windows. Give it another try with the whole
36485    # argument.
36486    path="$complete"
36487    arguments="EOL"
36488    new_path="$path"
36489
36490  windows_path="$new_path"
36491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36492    unix_path=`$CYGPATH -u "$windows_path"`
36493    new_path="$unix_path"
36494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36496    new_path="$unix_path"
36497  fi
36498
36499
36500    new_path=`$WHICH "$new_path" 2> /dev/null`
36501    # bat and cmd files are not always considered executable in MSYS causing which
36502    # to not find them
36503    if test "x$new_path" = x \
36504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36506      new_path="$path"
36507
36508  windows_path="$new_path"
36509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36510    unix_path=`$CYGPATH -u "$windows_path"`
36511    new_path="$unix_path"
36512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36514    new_path="$unix_path"
36515  fi
36516
36517    fi
36518
36519    if test "x$new_path" = x; then
36520      # It's still not found. Now this is an unrecoverable error.
36521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36522$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36523      has_space=`$ECHO "$complete" | $GREP " "`
36524      if test "x$has_space" != x; then
36525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36527      fi
36528      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36529    fi
36530  fi
36531
36532  # Now new_path has a complete unix path to the binary
36533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36534    # Keep paths in /bin as-is, but remove trailing .exe if any
36535    new_path="${new_path/%.exe/}"
36536    # Do not save /bin paths to all_fixpath_prefixes!
36537  else
36538    # Not in mixed or Windows style, start by that.
36539    new_path=`cmd //c echo $new_path`
36540
36541  input_path="$new_path"
36542  # Check if we need to convert this using DOS-style short mode. If the path
36543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36544  # take no chances and rewrite it.
36545  # Note: m4 eats our [], so we need to use [ and ] instead.
36546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36547  if test "x$has_forbidden_chars" != x; then
36548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36550  fi
36551
36552    # Output is in $new_path
36553
36554  windows_path="$new_path"
36555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36556    unix_path=`$CYGPATH -u "$windows_path"`
36557    new_path="$unix_path"
36558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36560    new_path="$unix_path"
36561  fi
36562
36563    # remove trailing .exe if any
36564    new_path="${new_path/%.exe/}"
36565
36566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36568  fi
36569
36570  else
36571    # We're on a posix platform. Hooray! :)
36572    # First separate the path from the arguments. This will split at the first
36573    # space.
36574    complete="$GNM"
36575    path="${complete%% *}"
36576    tmp="$complete EOL"
36577    arguments="${tmp#* }"
36578
36579    # Cannot rely on the command "which" here since it doesn't always work.
36580    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36581    if test -z "$is_absolute_path"; then
36582      # Path to executable is not absolute. Find it.
36583      IFS_save="$IFS"
36584      IFS=:
36585      for p in $PATH; do
36586        if test -f "$p/$path" && test -x "$p/$path"; then
36587          new_path="$p/$path"
36588          break
36589        fi
36590      done
36591      IFS="$IFS_save"
36592    else
36593      # This is an absolute path, we can use it without further modifications.
36594      new_path="$path"
36595    fi
36596
36597    if test "x$new_path" = x; then
36598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36599$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36600      has_space=`$ECHO "$complete" | $GREP " "`
36601      if test "x$has_space" != x; then
36602        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36603$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36604      fi
36605      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36606    fi
36607  fi
36608
36609  # Now join together the path and the arguments once again
36610  if test "x$arguments" != xEOL; then
36611    new_complete="$new_path ${arguments% *}"
36612  else
36613    new_complete="$new_path"
36614  fi
36615
36616  if test "x$complete" != "x$new_complete"; then
36617    GNM="$new_complete"
36618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36619$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36620  fi
36621
36622
36623
36624
36625  # Publish this variable in the help.
36626
36627
36628  if test "x$MCS" = x; then
36629    # The variable is not set by user, try to locate tool using the code snippet
36630    for ac_prog in mcs
36631do
36632  # Extract the first word of "$ac_prog", so it can be a program name with args.
36633set dummy $ac_prog; ac_word=$2
36634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36635$as_echo_n "checking for $ac_word... " >&6; }
36636if ${ac_cv_path_MCS+:} false; then :
36637  $as_echo_n "(cached) " >&6
36638else
36639  case $MCS in
36640  [\\/]* | ?:[\\/]*)
36641  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36642  ;;
36643  *)
36644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36645for as_dir in $PATH
36646do
36647  IFS=$as_save_IFS
36648  test -z "$as_dir" && as_dir=.
36649    for ac_exec_ext in '' $ac_executable_extensions; do
36650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36651    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36653    break 2
36654  fi
36655done
36656  done
36657IFS=$as_save_IFS
36658
36659  ;;
36660esac
36661fi
36662MCS=$ac_cv_path_MCS
36663if test -n "$MCS"; then
36664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36665$as_echo "$MCS" >&6; }
36666else
36667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36668$as_echo "no" >&6; }
36669fi
36670
36671
36672  test -n "$MCS" && break
36673done
36674
36675  else
36676    # The variable is set, but is it from the command line or the environment?
36677
36678    # Try to remove the string !MCS! from our list.
36679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36681      # If it failed, the variable was not from the command line. Ignore it,
36682      # but warn the user (except for BASH, which is always set by the calling BASH).
36683      if test "xMCS" != xBASH; then
36684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36685$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36686      fi
36687      # Try to locate tool using the code snippet
36688      for ac_prog in mcs
36689do
36690  # Extract the first word of "$ac_prog", so it can be a program name with args.
36691set dummy $ac_prog; ac_word=$2
36692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36693$as_echo_n "checking for $ac_word... " >&6; }
36694if ${ac_cv_path_MCS+:} false; then :
36695  $as_echo_n "(cached) " >&6
36696else
36697  case $MCS in
36698  [\\/]* | ?:[\\/]*)
36699  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36700  ;;
36701  *)
36702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36703for as_dir in $PATH
36704do
36705  IFS=$as_save_IFS
36706  test -z "$as_dir" && as_dir=.
36707    for ac_exec_ext in '' $ac_executable_extensions; do
36708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36709    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36711    break 2
36712  fi
36713done
36714  done
36715IFS=$as_save_IFS
36716
36717  ;;
36718esac
36719fi
36720MCS=$ac_cv_path_MCS
36721if test -n "$MCS"; then
36722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36723$as_echo "$MCS" >&6; }
36724else
36725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36726$as_echo "no" >&6; }
36727fi
36728
36729
36730  test -n "$MCS" && break
36731done
36732
36733    else
36734      # If it succeeded, then it was overridden by the user. We will use it
36735      # for the tool.
36736
36737      # First remove it from the list of overridden variables, so we can test
36738      # for unknown variables in the end.
36739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36740
36741      # Check if the provided tool contains a complete path.
36742      tool_specified="$MCS"
36743      tool_basename="${tool_specified##*/}"
36744      if test "x$tool_basename" = "x$tool_specified"; then
36745        # A command without a complete path is provided, search $PATH.
36746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36747$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36748        # Extract the first word of "$tool_basename", so it can be a program name with args.
36749set dummy $tool_basename; ac_word=$2
36750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36751$as_echo_n "checking for $ac_word... " >&6; }
36752if ${ac_cv_path_MCS+:} false; then :
36753  $as_echo_n "(cached) " >&6
36754else
36755  case $MCS in
36756  [\\/]* | ?:[\\/]*)
36757  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36758  ;;
36759  *)
36760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36761for as_dir in $PATH
36762do
36763  IFS=$as_save_IFS
36764  test -z "$as_dir" && as_dir=.
36765    for ac_exec_ext in '' $ac_executable_extensions; do
36766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36767    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36769    break 2
36770  fi
36771done
36772  done
36773IFS=$as_save_IFS
36774
36775  ;;
36776esac
36777fi
36778MCS=$ac_cv_path_MCS
36779if test -n "$MCS"; then
36780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36781$as_echo "$MCS" >&6; }
36782else
36783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36784$as_echo "no" >&6; }
36785fi
36786
36787
36788        if test "x$MCS" = x; then
36789          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36790        fi
36791      else
36792        # Otherwise we believe it is a complete path. Use it as it is.
36793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36794$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36796$as_echo_n "checking for MCS... " >&6; }
36797        if test ! -x "$tool_specified"; then
36798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36799$as_echo "not found" >&6; }
36800          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36801        fi
36802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36803$as_echo "$tool_specified" >&6; }
36804      fi
36805    fi
36806  fi
36807
36808
36809
36810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36811
36812  # First separate the path from the arguments. This will split at the first
36813  # space.
36814  complete="$MCS"
36815  path="${complete%% *}"
36816  tmp="$complete EOL"
36817  arguments="${tmp#* }"
36818
36819  # Input might be given as Windows format, start by converting to
36820  # unix format.
36821  new_path=`$CYGPATH -u "$path"`
36822
36823  # Now try to locate executable using which
36824  new_path=`$WHICH "$new_path" 2> /dev/null`
36825  # bat and cmd files are not always considered executable in cygwin causing which
36826  # to not find them
36827  if test "x$new_path" = x \
36828      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36829      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36830    new_path=`$CYGPATH -u "$path"`
36831  fi
36832  if test "x$new_path" = x; then
36833    # Oops. Which didn't find the executable.
36834    # The splitting of arguments from the executable at a space might have been incorrect,
36835    # since paths with space are more likely in Windows. Give it another try with the whole
36836    # argument.
36837    path="$complete"
36838    arguments="EOL"
36839    new_path=`$CYGPATH -u "$path"`
36840    new_path=`$WHICH "$new_path" 2> /dev/null`
36841    # bat and cmd files are not always considered executable in cygwin causing which
36842    # to not find them
36843    if test "x$new_path" = x \
36844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36846      new_path=`$CYGPATH -u "$path"`
36847    fi
36848    if test "x$new_path" = x; then
36849      # It's still not found. Now this is an unrecoverable error.
36850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36851$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36852      has_space=`$ECHO "$complete" | $GREP " "`
36853      if test "x$has_space" != x; then
36854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36856      fi
36857      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36858    fi
36859  fi
36860
36861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36864  # "foo.exe" is OK but "foo" is an error.
36865  #
36866  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36867  # It is also a way to make sure we got the proper file name for the real test later on.
36868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36869  if test "x$test_shortpath" = x; then
36870    # Short path failed, file does not exist as specified.
36871    # Try adding .exe or .cmd
36872    if test -f "${new_path}.exe"; then
36873      input_to_shortpath="${new_path}.exe"
36874    elif test -f "${new_path}.cmd"; then
36875      input_to_shortpath="${new_path}.cmd"
36876    else
36877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36878$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36881      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36882    fi
36883  else
36884    input_to_shortpath="$new_path"
36885  fi
36886
36887  # Call helper function which possibly converts this using DOS-style short mode.
36888  # If so, the updated path is stored in $new_path.
36889  new_path="$input_to_shortpath"
36890
36891  input_path="$input_to_shortpath"
36892  # Check if we need to convert this using DOS-style short mode. If the path
36893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36894  # take no chances and rewrite it.
36895  # Note: m4 eats our [], so we need to use [ and ] instead.
36896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36897  if test "x$has_forbidden_chars" != x; then
36898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36902      # Going to short mode and back again did indeed matter. Since short mode is
36903      # case insensitive, let's make it lowercase to improve readability.
36904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36905      # Now convert it back to Unix-stile (cygpath)
36906      input_path=`$CYGPATH -u "$shortmode_path"`
36907      new_path="$input_path"
36908    fi
36909  fi
36910
36911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36912  if test "x$test_cygdrive_prefix" = x; then
36913    # As a simple fix, exclude /usr/bin since it's not a real path.
36914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36916      # a path prefixed by /cygdrive for fixpath to work.
36917      new_path="$CYGWIN_ROOT_PATH$input_path"
36918    fi
36919  fi
36920
36921  # remove trailing .exe if any
36922  new_path="${new_path/%.exe/}"
36923
36924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36925
36926  # First separate the path from the arguments. This will split at the first
36927  # space.
36928  complete="$MCS"
36929  path="${complete%% *}"
36930  tmp="$complete EOL"
36931  arguments="${tmp#* }"
36932
36933  # Input might be given as Windows format, start by converting to
36934  # unix format.
36935  new_path="$path"
36936
36937  windows_path="$new_path"
36938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36939    unix_path=`$CYGPATH -u "$windows_path"`
36940    new_path="$unix_path"
36941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36943    new_path="$unix_path"
36944  fi
36945
36946
36947  # Now try to locate executable using which
36948  new_path=`$WHICH "$new_path" 2> /dev/null`
36949
36950  if test "x$new_path" = x; then
36951    # Oops. Which didn't find the executable.
36952    # The splitting of arguments from the executable at a space might have been incorrect,
36953    # since paths with space are more likely in Windows. Give it another try with the whole
36954    # argument.
36955    path="$complete"
36956    arguments="EOL"
36957    new_path="$path"
36958
36959  windows_path="$new_path"
36960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36961    unix_path=`$CYGPATH -u "$windows_path"`
36962    new_path="$unix_path"
36963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36965    new_path="$unix_path"
36966  fi
36967
36968
36969    new_path=`$WHICH "$new_path" 2> /dev/null`
36970    # bat and cmd files are not always considered executable in MSYS causing which
36971    # to not find them
36972    if test "x$new_path" = x \
36973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36975      new_path="$path"
36976
36977  windows_path="$new_path"
36978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36979    unix_path=`$CYGPATH -u "$windows_path"`
36980    new_path="$unix_path"
36981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36983    new_path="$unix_path"
36984  fi
36985
36986    fi
36987
36988    if test "x$new_path" = x; then
36989      # It's still not found. Now this is an unrecoverable error.
36990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36991$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36992      has_space=`$ECHO "$complete" | $GREP " "`
36993      if test "x$has_space" != x; then
36994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36996      fi
36997      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36998    fi
36999  fi
37000
37001  # Now new_path has a complete unix path to the binary
37002  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37003    # Keep paths in /bin as-is, but remove trailing .exe if any
37004    new_path="${new_path/%.exe/}"
37005    # Do not save /bin paths to all_fixpath_prefixes!
37006  else
37007    # Not in mixed or Windows style, start by that.
37008    new_path=`cmd //c echo $new_path`
37009
37010  input_path="$new_path"
37011  # Check if we need to convert this using DOS-style short mode. If the path
37012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37013  # take no chances and rewrite it.
37014  # Note: m4 eats our [], so we need to use [ and ] instead.
37015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37016  if test "x$has_forbidden_chars" != x; then
37017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37019  fi
37020
37021    # Output is in $new_path
37022
37023  windows_path="$new_path"
37024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37025    unix_path=`$CYGPATH -u "$windows_path"`
37026    new_path="$unix_path"
37027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37029    new_path="$unix_path"
37030  fi
37031
37032    # remove trailing .exe if any
37033    new_path="${new_path/%.exe/}"
37034
37035    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37036    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37037  fi
37038
37039  else
37040    # We're on a posix platform. Hooray! :)
37041    # First separate the path from the arguments. This will split at the first
37042    # space.
37043    complete="$MCS"
37044    path="${complete%% *}"
37045    tmp="$complete EOL"
37046    arguments="${tmp#* }"
37047
37048    # Cannot rely on the command "which" here since it doesn't always work.
37049    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37050    if test -z "$is_absolute_path"; then
37051      # Path to executable is not absolute. Find it.
37052      IFS_save="$IFS"
37053      IFS=:
37054      for p in $PATH; do
37055        if test -f "$p/$path" && test -x "$p/$path"; then
37056          new_path="$p/$path"
37057          break
37058        fi
37059      done
37060      IFS="$IFS_save"
37061    else
37062      # This is an absolute path, we can use it without further modifications.
37063      new_path="$path"
37064    fi
37065
37066    if test "x$new_path" = x; then
37067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37068$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37069      has_space=`$ECHO "$complete" | $GREP " "`
37070      if test "x$has_space" != x; then
37071        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37072$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37073      fi
37074      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37075    fi
37076  fi
37077
37078  # Now join together the path and the arguments once again
37079  if test "x$arguments" != xEOL; then
37080    new_complete="$new_path ${arguments% *}"
37081  else
37082    new_complete="$new_path"
37083  fi
37084
37085  if test "x$complete" != "x$new_complete"; then
37086    MCS="$new_complete"
37087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37088$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37089  fi
37090
37091  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37092    # FIXME: we should unify this with the solaris case above.
37093
37094
37095  # Publish this variable in the help.
37096
37097
37098  if test "x$STRIP" = x; then
37099    # The variable is not set by user, try to locate tool using the code snippet
37100    if test -n "$ac_tool_prefix"; then
37101  for ac_prog in strip
37102  do
37103    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37104set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37106$as_echo_n "checking for $ac_word... " >&6; }
37107if ${ac_cv_prog_STRIP+:} false; then :
37108  $as_echo_n "(cached) " >&6
37109else
37110  if test -n "$STRIP"; then
37111  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37112else
37113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37114for as_dir in $PATH
37115do
37116  IFS=$as_save_IFS
37117  test -z "$as_dir" && as_dir=.
37118    for ac_exec_ext in '' $ac_executable_extensions; do
37119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37120    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37122    break 2
37123  fi
37124done
37125  done
37126IFS=$as_save_IFS
37127
37128fi
37129fi
37130STRIP=$ac_cv_prog_STRIP
37131if test -n "$STRIP"; then
37132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37133$as_echo "$STRIP" >&6; }
37134else
37135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37136$as_echo "no" >&6; }
37137fi
37138
37139
37140    test -n "$STRIP" && break
37141  done
37142fi
37143if test -z "$STRIP"; then
37144  ac_ct_STRIP=$STRIP
37145  for ac_prog in strip
37146do
37147  # Extract the first word of "$ac_prog", so it can be a program name with args.
37148set dummy $ac_prog; ac_word=$2
37149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37150$as_echo_n "checking for $ac_word... " >&6; }
37151if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37152  $as_echo_n "(cached) " >&6
37153else
37154  if test -n "$ac_ct_STRIP"; then
37155  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37156else
37157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37158for as_dir in $PATH
37159do
37160  IFS=$as_save_IFS
37161  test -z "$as_dir" && as_dir=.
37162    for ac_exec_ext in '' $ac_executable_extensions; do
37163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37164    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37166    break 2
37167  fi
37168done
37169  done
37170IFS=$as_save_IFS
37171
37172fi
37173fi
37174ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37175if test -n "$ac_ct_STRIP"; then
37176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37177$as_echo "$ac_ct_STRIP" >&6; }
37178else
37179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37180$as_echo "no" >&6; }
37181fi
37182
37183
37184  test -n "$ac_ct_STRIP" && break
37185done
37186
37187  if test "x$ac_ct_STRIP" = x; then
37188    STRIP=""
37189  else
37190    case $cross_compiling:$ac_tool_warned in
37191yes:)
37192{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37193$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37194ac_tool_warned=yes ;;
37195esac
37196    STRIP=$ac_ct_STRIP
37197  fi
37198fi
37199
37200  else
37201    # The variable is set, but is it from the command line or the environment?
37202
37203    # Try to remove the string !STRIP! from our list.
37204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37206      # If it failed, the variable was not from the command line. Ignore it,
37207      # but warn the user (except for BASH, which is always set by the calling BASH).
37208      if test "xSTRIP" != xBASH; then
37209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37210$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37211      fi
37212      # Try to locate tool using the code snippet
37213      if test -n "$ac_tool_prefix"; then
37214  for ac_prog in strip
37215  do
37216    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37217set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37219$as_echo_n "checking for $ac_word... " >&6; }
37220if ${ac_cv_prog_STRIP+:} false; then :
37221  $as_echo_n "(cached) " >&6
37222else
37223  if test -n "$STRIP"; then
37224  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37225else
37226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37227for as_dir in $PATH
37228do
37229  IFS=$as_save_IFS
37230  test -z "$as_dir" && as_dir=.
37231    for ac_exec_ext in '' $ac_executable_extensions; do
37232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37233    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37235    break 2
37236  fi
37237done
37238  done
37239IFS=$as_save_IFS
37240
37241fi
37242fi
37243STRIP=$ac_cv_prog_STRIP
37244if test -n "$STRIP"; then
37245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37246$as_echo "$STRIP" >&6; }
37247else
37248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37249$as_echo "no" >&6; }
37250fi
37251
37252
37253    test -n "$STRIP" && break
37254  done
37255fi
37256if test -z "$STRIP"; then
37257  ac_ct_STRIP=$STRIP
37258  for ac_prog in strip
37259do
37260  # Extract the first word of "$ac_prog", so it can be a program name with args.
37261set dummy $ac_prog; ac_word=$2
37262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37263$as_echo_n "checking for $ac_word... " >&6; }
37264if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37265  $as_echo_n "(cached) " >&6
37266else
37267  if test -n "$ac_ct_STRIP"; then
37268  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37269else
37270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37271for as_dir in $PATH
37272do
37273  IFS=$as_save_IFS
37274  test -z "$as_dir" && as_dir=.
37275    for ac_exec_ext in '' $ac_executable_extensions; do
37276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37277    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37279    break 2
37280  fi
37281done
37282  done
37283IFS=$as_save_IFS
37284
37285fi
37286fi
37287ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37288if test -n "$ac_ct_STRIP"; then
37289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37290$as_echo "$ac_ct_STRIP" >&6; }
37291else
37292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37293$as_echo "no" >&6; }
37294fi
37295
37296
37297  test -n "$ac_ct_STRIP" && break
37298done
37299
37300  if test "x$ac_ct_STRIP" = x; then
37301    STRIP=""
37302  else
37303    case $cross_compiling:$ac_tool_warned in
37304yes:)
37305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37307ac_tool_warned=yes ;;
37308esac
37309    STRIP=$ac_ct_STRIP
37310  fi
37311fi
37312
37313    else
37314      # If it succeeded, then it was overridden by the user. We will use it
37315      # for the tool.
37316
37317      # First remove it from the list of overridden variables, so we can test
37318      # for unknown variables in the end.
37319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37320
37321      # Check if the provided tool contains a complete path.
37322      tool_specified="$STRIP"
37323      tool_basename="${tool_specified##*/}"
37324      if test "x$tool_basename" = "x$tool_specified"; then
37325        # A command without a complete path is provided, search $PATH.
37326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37327$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37328        # Extract the first word of "$tool_basename", so it can be a program name with args.
37329set dummy $tool_basename; ac_word=$2
37330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37331$as_echo_n "checking for $ac_word... " >&6; }
37332if ${ac_cv_path_STRIP+:} false; then :
37333  $as_echo_n "(cached) " >&6
37334else
37335  case $STRIP in
37336  [\\/]* | ?:[\\/]*)
37337  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37338  ;;
37339  *)
37340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37341for as_dir in $PATH
37342do
37343  IFS=$as_save_IFS
37344  test -z "$as_dir" && as_dir=.
37345    for ac_exec_ext in '' $ac_executable_extensions; do
37346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37347    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37349    break 2
37350  fi
37351done
37352  done
37353IFS=$as_save_IFS
37354
37355  ;;
37356esac
37357fi
37358STRIP=$ac_cv_path_STRIP
37359if test -n "$STRIP"; then
37360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37361$as_echo "$STRIP" >&6; }
37362else
37363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37364$as_echo "no" >&6; }
37365fi
37366
37367
37368        if test "x$STRIP" = x; then
37369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37370        fi
37371      else
37372        # Otherwise we believe it is a complete path. Use it as it is.
37373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37374$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37376$as_echo_n "checking for STRIP... " >&6; }
37377        if test ! -x "$tool_specified"; then
37378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37379$as_echo "not found" >&6; }
37380          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37381        fi
37382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37383$as_echo "$tool_specified" >&6; }
37384      fi
37385    fi
37386  fi
37387
37388
37389
37390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37391
37392  # First separate the path from the arguments. This will split at the first
37393  # space.
37394  complete="$STRIP"
37395  path="${complete%% *}"
37396  tmp="$complete EOL"
37397  arguments="${tmp#* }"
37398
37399  # Input might be given as Windows format, start by converting to
37400  # unix format.
37401  new_path=`$CYGPATH -u "$path"`
37402
37403  # Now try to locate executable using which
37404  new_path=`$WHICH "$new_path" 2> /dev/null`
37405  # bat and cmd files are not always considered executable in cygwin causing which
37406  # to not find them
37407  if test "x$new_path" = x \
37408      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37409      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37410    new_path=`$CYGPATH -u "$path"`
37411  fi
37412  if test "x$new_path" = x; then
37413    # Oops. Which didn't find the executable.
37414    # The splitting of arguments from the executable at a space might have been incorrect,
37415    # since paths with space are more likely in Windows. Give it another try with the whole
37416    # argument.
37417    path="$complete"
37418    arguments="EOL"
37419    new_path=`$CYGPATH -u "$path"`
37420    new_path=`$WHICH "$new_path" 2> /dev/null`
37421    # bat and cmd files are not always considered executable in cygwin causing which
37422    # to not find them
37423    if test "x$new_path" = x \
37424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37426      new_path=`$CYGPATH -u "$path"`
37427    fi
37428    if test "x$new_path" = x; then
37429      # It's still not found. Now this is an unrecoverable error.
37430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37431$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37432      has_space=`$ECHO "$complete" | $GREP " "`
37433      if test "x$has_space" != x; then
37434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37436      fi
37437      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37438    fi
37439  fi
37440
37441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37444  # "foo.exe" is OK but "foo" is an error.
37445  #
37446  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37447  # It is also a way to make sure we got the proper file name for the real test later on.
37448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37449  if test "x$test_shortpath" = x; then
37450    # Short path failed, file does not exist as specified.
37451    # Try adding .exe or .cmd
37452    if test -f "${new_path}.exe"; then
37453      input_to_shortpath="${new_path}.exe"
37454    elif test -f "${new_path}.cmd"; then
37455      input_to_shortpath="${new_path}.cmd"
37456    else
37457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37458$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37459      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37460$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37461      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37462    fi
37463  else
37464    input_to_shortpath="$new_path"
37465  fi
37466
37467  # Call helper function which possibly converts this using DOS-style short mode.
37468  # If so, the updated path is stored in $new_path.
37469  new_path="$input_to_shortpath"
37470
37471  input_path="$input_to_shortpath"
37472  # Check if we need to convert this using DOS-style short mode. If the path
37473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37474  # take no chances and rewrite it.
37475  # Note: m4 eats our [], so we need to use [ and ] instead.
37476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37477  if test "x$has_forbidden_chars" != x; then
37478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37482      # Going to short mode and back again did indeed matter. Since short mode is
37483      # case insensitive, let's make it lowercase to improve readability.
37484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37485      # Now convert it back to Unix-stile (cygpath)
37486      input_path=`$CYGPATH -u "$shortmode_path"`
37487      new_path="$input_path"
37488    fi
37489  fi
37490
37491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37492  if test "x$test_cygdrive_prefix" = x; then
37493    # As a simple fix, exclude /usr/bin since it's not a real path.
37494    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37496      # a path prefixed by /cygdrive for fixpath to work.
37497      new_path="$CYGWIN_ROOT_PATH$input_path"
37498    fi
37499  fi
37500
37501  # remove trailing .exe if any
37502  new_path="${new_path/%.exe/}"
37503
37504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37505
37506  # First separate the path from the arguments. This will split at the first
37507  # space.
37508  complete="$STRIP"
37509  path="${complete%% *}"
37510  tmp="$complete EOL"
37511  arguments="${tmp#* }"
37512
37513  # Input might be given as Windows format, start by converting to
37514  # unix format.
37515  new_path="$path"
37516
37517  windows_path="$new_path"
37518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37519    unix_path=`$CYGPATH -u "$windows_path"`
37520    new_path="$unix_path"
37521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37523    new_path="$unix_path"
37524  fi
37525
37526
37527  # Now try to locate executable using which
37528  new_path=`$WHICH "$new_path" 2> /dev/null`
37529
37530  if test "x$new_path" = x; then
37531    # Oops. Which didn't find the executable.
37532    # The splitting of arguments from the executable at a space might have been incorrect,
37533    # since paths with space are more likely in Windows. Give it another try with the whole
37534    # argument.
37535    path="$complete"
37536    arguments="EOL"
37537    new_path="$path"
37538
37539  windows_path="$new_path"
37540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37541    unix_path=`$CYGPATH -u "$windows_path"`
37542    new_path="$unix_path"
37543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37545    new_path="$unix_path"
37546  fi
37547
37548
37549    new_path=`$WHICH "$new_path" 2> /dev/null`
37550    # bat and cmd files are not always considered executable in MSYS causing which
37551    # to not find them
37552    if test "x$new_path" = x \
37553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37555      new_path="$path"
37556
37557  windows_path="$new_path"
37558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37559    unix_path=`$CYGPATH -u "$windows_path"`
37560    new_path="$unix_path"
37561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37563    new_path="$unix_path"
37564  fi
37565
37566    fi
37567
37568    if test "x$new_path" = x; then
37569      # It's still not found. Now this is an unrecoverable error.
37570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37571$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37572      has_space=`$ECHO "$complete" | $GREP " "`
37573      if test "x$has_space" != x; then
37574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37576      fi
37577      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37578    fi
37579  fi
37580
37581  # Now new_path has a complete unix path to the binary
37582  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37583    # Keep paths in /bin as-is, but remove trailing .exe if any
37584    new_path="${new_path/%.exe/}"
37585    # Do not save /bin paths to all_fixpath_prefixes!
37586  else
37587    # Not in mixed or Windows style, start by that.
37588    new_path=`cmd //c echo $new_path`
37589
37590  input_path="$new_path"
37591  # Check if we need to convert this using DOS-style short mode. If the path
37592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37593  # take no chances and rewrite it.
37594  # Note: m4 eats our [], so we need to use [ and ] instead.
37595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37596  if test "x$has_forbidden_chars" != x; then
37597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37599  fi
37600
37601    # Output is in $new_path
37602
37603  windows_path="$new_path"
37604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37605    unix_path=`$CYGPATH -u "$windows_path"`
37606    new_path="$unix_path"
37607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37609    new_path="$unix_path"
37610  fi
37611
37612    # remove trailing .exe if any
37613    new_path="${new_path/%.exe/}"
37614
37615    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37616    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37617  fi
37618
37619  else
37620    # We're on a posix platform. Hooray! :)
37621    # First separate the path from the arguments. This will split at the first
37622    # space.
37623    complete="$STRIP"
37624    path="${complete%% *}"
37625    tmp="$complete EOL"
37626    arguments="${tmp#* }"
37627
37628    # Cannot rely on the command "which" here since it doesn't always work.
37629    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37630    if test -z "$is_absolute_path"; then
37631      # Path to executable is not absolute. Find it.
37632      IFS_save="$IFS"
37633      IFS=:
37634      for p in $PATH; do
37635        if test -f "$p/$path" && test -x "$p/$path"; then
37636          new_path="$p/$path"
37637          break
37638        fi
37639      done
37640      IFS="$IFS_save"
37641    else
37642      # This is an absolute path, we can use it without further modifications.
37643      new_path="$path"
37644    fi
37645
37646    if test "x$new_path" = x; then
37647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37648$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37649      has_space=`$ECHO "$complete" | $GREP " "`
37650      if test "x$has_space" != x; then
37651        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37652$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37653      fi
37654      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37655    fi
37656  fi
37657
37658  # Now join together the path and the arguments once again
37659  if test "x$arguments" != xEOL; then
37660    new_complete="$new_path ${arguments% *}"
37661  else
37662    new_complete="$new_path"
37663  fi
37664
37665  if test "x$complete" != "x$new_complete"; then
37666    STRIP="$new_complete"
37667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37668$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37669  fi
37670
37671
37672
37673  # Publish this variable in the help.
37674
37675
37676  if test "x$NM" = x; then
37677    # The variable is not set by user, try to locate tool using the code snippet
37678    if test -n "$ac_tool_prefix"; then
37679  for ac_prog in nm
37680  do
37681    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37682set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37684$as_echo_n "checking for $ac_word... " >&6; }
37685if ${ac_cv_prog_NM+:} false; then :
37686  $as_echo_n "(cached) " >&6
37687else
37688  if test -n "$NM"; then
37689  ac_cv_prog_NM="$NM" # Let the user override the test.
37690else
37691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37692for as_dir in $PATH
37693do
37694  IFS=$as_save_IFS
37695  test -z "$as_dir" && as_dir=.
37696    for ac_exec_ext in '' $ac_executable_extensions; do
37697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37698    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37700    break 2
37701  fi
37702done
37703  done
37704IFS=$as_save_IFS
37705
37706fi
37707fi
37708NM=$ac_cv_prog_NM
37709if test -n "$NM"; then
37710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37711$as_echo "$NM" >&6; }
37712else
37713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37714$as_echo "no" >&6; }
37715fi
37716
37717
37718    test -n "$NM" && break
37719  done
37720fi
37721if test -z "$NM"; then
37722  ac_ct_NM=$NM
37723  for ac_prog in nm
37724do
37725  # Extract the first word of "$ac_prog", so it can be a program name with args.
37726set dummy $ac_prog; ac_word=$2
37727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37728$as_echo_n "checking for $ac_word... " >&6; }
37729if ${ac_cv_prog_ac_ct_NM+:} false; then :
37730  $as_echo_n "(cached) " >&6
37731else
37732  if test -n "$ac_ct_NM"; then
37733  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37734else
37735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37736for as_dir in $PATH
37737do
37738  IFS=$as_save_IFS
37739  test -z "$as_dir" && as_dir=.
37740    for ac_exec_ext in '' $ac_executable_extensions; do
37741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37742    ac_cv_prog_ac_ct_NM="$ac_prog"
37743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37744    break 2
37745  fi
37746done
37747  done
37748IFS=$as_save_IFS
37749
37750fi
37751fi
37752ac_ct_NM=$ac_cv_prog_ac_ct_NM
37753if test -n "$ac_ct_NM"; then
37754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37755$as_echo "$ac_ct_NM" >&6; }
37756else
37757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37758$as_echo "no" >&6; }
37759fi
37760
37761
37762  test -n "$ac_ct_NM" && break
37763done
37764
37765  if test "x$ac_ct_NM" = x; then
37766    NM=""
37767  else
37768    case $cross_compiling:$ac_tool_warned in
37769yes:)
37770{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37771$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37772ac_tool_warned=yes ;;
37773esac
37774    NM=$ac_ct_NM
37775  fi
37776fi
37777
37778  else
37779    # The variable is set, but is it from the command line or the environment?
37780
37781    # Try to remove the string !NM! from our list.
37782    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37783    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37784      # If it failed, the variable was not from the command line. Ignore it,
37785      # but warn the user (except for BASH, which is always set by the calling BASH).
37786      if test "xNM" != xBASH; then
37787        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37788$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37789      fi
37790      # Try to locate tool using the code snippet
37791      if test -n "$ac_tool_prefix"; then
37792  for ac_prog in nm
37793  do
37794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37797$as_echo_n "checking for $ac_word... " >&6; }
37798if ${ac_cv_prog_NM+:} false; then :
37799  $as_echo_n "(cached) " >&6
37800else
37801  if test -n "$NM"; then
37802  ac_cv_prog_NM="$NM" # Let the user override the test.
37803else
37804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37805for as_dir in $PATH
37806do
37807  IFS=$as_save_IFS
37808  test -z "$as_dir" && as_dir=.
37809    for ac_exec_ext in '' $ac_executable_extensions; do
37810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37811    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37813    break 2
37814  fi
37815done
37816  done
37817IFS=$as_save_IFS
37818
37819fi
37820fi
37821NM=$ac_cv_prog_NM
37822if test -n "$NM"; then
37823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37824$as_echo "$NM" >&6; }
37825else
37826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37827$as_echo "no" >&6; }
37828fi
37829
37830
37831    test -n "$NM" && break
37832  done
37833fi
37834if test -z "$NM"; then
37835  ac_ct_NM=$NM
37836  for ac_prog in nm
37837do
37838  # Extract the first word of "$ac_prog", so it can be a program name with args.
37839set dummy $ac_prog; ac_word=$2
37840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37841$as_echo_n "checking for $ac_word... " >&6; }
37842if ${ac_cv_prog_ac_ct_NM+:} false; then :
37843  $as_echo_n "(cached) " >&6
37844else
37845  if test -n "$ac_ct_NM"; then
37846  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37847else
37848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37849for as_dir in $PATH
37850do
37851  IFS=$as_save_IFS
37852  test -z "$as_dir" && as_dir=.
37853    for ac_exec_ext in '' $ac_executable_extensions; do
37854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37855    ac_cv_prog_ac_ct_NM="$ac_prog"
37856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37857    break 2
37858  fi
37859done
37860  done
37861IFS=$as_save_IFS
37862
37863fi
37864fi
37865ac_ct_NM=$ac_cv_prog_ac_ct_NM
37866if test -n "$ac_ct_NM"; then
37867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37868$as_echo "$ac_ct_NM" >&6; }
37869else
37870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37871$as_echo "no" >&6; }
37872fi
37873
37874
37875  test -n "$ac_ct_NM" && break
37876done
37877
37878  if test "x$ac_ct_NM" = x; then
37879    NM=""
37880  else
37881    case $cross_compiling:$ac_tool_warned in
37882yes:)
37883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37885ac_tool_warned=yes ;;
37886esac
37887    NM=$ac_ct_NM
37888  fi
37889fi
37890
37891    else
37892      # If it succeeded, then it was overridden by the user. We will use it
37893      # for the tool.
37894
37895      # First remove it from the list of overridden variables, so we can test
37896      # for unknown variables in the end.
37897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37898
37899      # Check if the provided tool contains a complete path.
37900      tool_specified="$NM"
37901      tool_basename="${tool_specified##*/}"
37902      if test "x$tool_basename" = "x$tool_specified"; then
37903        # A command without a complete path is provided, search $PATH.
37904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37905$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37906        # Extract the first word of "$tool_basename", so it can be a program name with args.
37907set dummy $tool_basename; ac_word=$2
37908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37909$as_echo_n "checking for $ac_word... " >&6; }
37910if ${ac_cv_path_NM+:} false; then :
37911  $as_echo_n "(cached) " >&6
37912else
37913  case $NM in
37914  [\\/]* | ?:[\\/]*)
37915  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37916  ;;
37917  *)
37918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37919for as_dir in $PATH
37920do
37921  IFS=$as_save_IFS
37922  test -z "$as_dir" && as_dir=.
37923    for ac_exec_ext in '' $ac_executable_extensions; do
37924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37925    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37927    break 2
37928  fi
37929done
37930  done
37931IFS=$as_save_IFS
37932
37933  ;;
37934esac
37935fi
37936NM=$ac_cv_path_NM
37937if test -n "$NM"; then
37938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37939$as_echo "$NM" >&6; }
37940else
37941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37942$as_echo "no" >&6; }
37943fi
37944
37945
37946        if test "x$NM" = x; then
37947          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37948        fi
37949      else
37950        # Otherwise we believe it is a complete path. Use it as it is.
37951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37952$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37954$as_echo_n "checking for NM... " >&6; }
37955        if test ! -x "$tool_specified"; then
37956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37957$as_echo "not found" >&6; }
37958          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37959        fi
37960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37961$as_echo "$tool_specified" >&6; }
37962      fi
37963    fi
37964  fi
37965
37966
37967
37968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37969
37970  # First separate the path from the arguments. This will split at the first
37971  # space.
37972  complete="$NM"
37973  path="${complete%% *}"
37974  tmp="$complete EOL"
37975  arguments="${tmp#* }"
37976
37977  # Input might be given as Windows format, start by converting to
37978  # unix format.
37979  new_path=`$CYGPATH -u "$path"`
37980
37981  # Now try to locate executable using which
37982  new_path=`$WHICH "$new_path" 2> /dev/null`
37983  # bat and cmd files are not always considered executable in cygwin causing which
37984  # to not find them
37985  if test "x$new_path" = x \
37986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37988    new_path=`$CYGPATH -u "$path"`
37989  fi
37990  if test "x$new_path" = x; then
37991    # Oops. Which didn't find the executable.
37992    # The splitting of arguments from the executable at a space might have been incorrect,
37993    # since paths with space are more likely in Windows. Give it another try with the whole
37994    # argument.
37995    path="$complete"
37996    arguments="EOL"
37997    new_path=`$CYGPATH -u "$path"`
37998    new_path=`$WHICH "$new_path" 2> /dev/null`
37999    # bat and cmd files are not always considered executable in cygwin causing which
38000    # to not find them
38001    if test "x$new_path" = x \
38002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38004      new_path=`$CYGPATH -u "$path"`
38005    fi
38006    if test "x$new_path" = x; then
38007      # It's still not found. Now this is an unrecoverable error.
38008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38009$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38010      has_space=`$ECHO "$complete" | $GREP " "`
38011      if test "x$has_space" != x; then
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38014      fi
38015      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38016    fi
38017  fi
38018
38019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38022  # "foo.exe" is OK but "foo" is an error.
38023  #
38024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38025  # It is also a way to make sure we got the proper file name for the real test later on.
38026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38027  if test "x$test_shortpath" = x; then
38028    # Short path failed, file does not exist as specified.
38029    # Try adding .exe or .cmd
38030    if test -f "${new_path}.exe"; then
38031      input_to_shortpath="${new_path}.exe"
38032    elif test -f "${new_path}.cmd"; then
38033      input_to_shortpath="${new_path}.cmd"
38034    else
38035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38036$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38039      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38040    fi
38041  else
38042    input_to_shortpath="$new_path"
38043  fi
38044
38045  # Call helper function which possibly converts this using DOS-style short mode.
38046  # If so, the updated path is stored in $new_path.
38047  new_path="$input_to_shortpath"
38048
38049  input_path="$input_to_shortpath"
38050  # Check if we need to convert this using DOS-style short mode. If the path
38051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38052  # take no chances and rewrite it.
38053  # Note: m4 eats our [], so we need to use [ and ] instead.
38054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38055  if test "x$has_forbidden_chars" != x; then
38056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38060      # Going to short mode and back again did indeed matter. Since short mode is
38061      # case insensitive, let's make it lowercase to improve readability.
38062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38063      # Now convert it back to Unix-stile (cygpath)
38064      input_path=`$CYGPATH -u "$shortmode_path"`
38065      new_path="$input_path"
38066    fi
38067  fi
38068
38069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38070  if test "x$test_cygdrive_prefix" = x; then
38071    # As a simple fix, exclude /usr/bin since it's not a real path.
38072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38074      # a path prefixed by /cygdrive for fixpath to work.
38075      new_path="$CYGWIN_ROOT_PATH$input_path"
38076    fi
38077  fi
38078
38079  # remove trailing .exe if any
38080  new_path="${new_path/%.exe/}"
38081
38082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38083
38084  # First separate the path from the arguments. This will split at the first
38085  # space.
38086  complete="$NM"
38087  path="${complete%% *}"
38088  tmp="$complete EOL"
38089  arguments="${tmp#* }"
38090
38091  # Input might be given as Windows format, start by converting to
38092  # unix format.
38093  new_path="$path"
38094
38095  windows_path="$new_path"
38096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38097    unix_path=`$CYGPATH -u "$windows_path"`
38098    new_path="$unix_path"
38099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38101    new_path="$unix_path"
38102  fi
38103
38104
38105  # Now try to locate executable using which
38106  new_path=`$WHICH "$new_path" 2> /dev/null`
38107
38108  if test "x$new_path" = x; then
38109    # Oops. Which didn't find the executable.
38110    # The splitting of arguments from the executable at a space might have been incorrect,
38111    # since paths with space are more likely in Windows. Give it another try with the whole
38112    # argument.
38113    path="$complete"
38114    arguments="EOL"
38115    new_path="$path"
38116
38117  windows_path="$new_path"
38118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38119    unix_path=`$CYGPATH -u "$windows_path"`
38120    new_path="$unix_path"
38121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38123    new_path="$unix_path"
38124  fi
38125
38126
38127    new_path=`$WHICH "$new_path" 2> /dev/null`
38128    # bat and cmd files are not always considered executable in MSYS causing which
38129    # to not find them
38130    if test "x$new_path" = x \
38131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38133      new_path="$path"
38134
38135  windows_path="$new_path"
38136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38137    unix_path=`$CYGPATH -u "$windows_path"`
38138    new_path="$unix_path"
38139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38141    new_path="$unix_path"
38142  fi
38143
38144    fi
38145
38146    if test "x$new_path" = x; then
38147      # It's still not found. Now this is an unrecoverable error.
38148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38149$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38150      has_space=`$ECHO "$complete" | $GREP " "`
38151      if test "x$has_space" != x; then
38152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38154      fi
38155      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38156    fi
38157  fi
38158
38159  # Now new_path has a complete unix path to the binary
38160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38161    # Keep paths in /bin as-is, but remove trailing .exe if any
38162    new_path="${new_path/%.exe/}"
38163    # Do not save /bin paths to all_fixpath_prefixes!
38164  else
38165    # Not in mixed or Windows style, start by that.
38166    new_path=`cmd //c echo $new_path`
38167
38168  input_path="$new_path"
38169  # Check if we need to convert this using DOS-style short mode. If the path
38170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38171  # take no chances and rewrite it.
38172  # Note: m4 eats our [], so we need to use [ and ] instead.
38173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38174  if test "x$has_forbidden_chars" != x; then
38175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38177  fi
38178
38179    # Output is in $new_path
38180
38181  windows_path="$new_path"
38182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38183    unix_path=`$CYGPATH -u "$windows_path"`
38184    new_path="$unix_path"
38185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38187    new_path="$unix_path"
38188  fi
38189
38190    # remove trailing .exe if any
38191    new_path="${new_path/%.exe/}"
38192
38193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38195  fi
38196
38197  else
38198    # We're on a posix platform. Hooray! :)
38199    # First separate the path from the arguments. This will split at the first
38200    # space.
38201    complete="$NM"
38202    path="${complete%% *}"
38203    tmp="$complete EOL"
38204    arguments="${tmp#* }"
38205
38206    # Cannot rely on the command "which" here since it doesn't always work.
38207    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38208    if test -z "$is_absolute_path"; then
38209      # Path to executable is not absolute. Find it.
38210      IFS_save="$IFS"
38211      IFS=:
38212      for p in $PATH; do
38213        if test -f "$p/$path" && test -x "$p/$path"; then
38214          new_path="$p/$path"
38215          break
38216        fi
38217      done
38218      IFS="$IFS_save"
38219    else
38220      # This is an absolute path, we can use it without further modifications.
38221      new_path="$path"
38222    fi
38223
38224    if test "x$new_path" = x; then
38225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38226$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38227      has_space=`$ECHO "$complete" | $GREP " "`
38228      if test "x$has_space" != x; then
38229        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38231      fi
38232      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38233    fi
38234  fi
38235
38236  # Now join together the path and the arguments once again
38237  if test "x$arguments" != xEOL; then
38238    new_complete="$new_path ${arguments% *}"
38239  else
38240    new_complete="$new_path"
38241  fi
38242
38243  if test "x$complete" != "x$new_complete"; then
38244    NM="$new_complete"
38245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38246$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38247  fi
38248
38249    GNM="$NM"
38250
38251  fi
38252
38253  # objcopy is used for moving debug symbols to separate files when
38254  # full debug symbols are enabled.
38255  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38256
38257
38258  # Publish this variable in the help.
38259
38260
38261  if test "x$OBJCOPY" = x; then
38262    # The variable is not set by user, try to locate tool using the code snippet
38263    if test -n "$ac_tool_prefix"; then
38264  for ac_prog in gobjcopy objcopy
38265  do
38266    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38267set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38269$as_echo_n "checking for $ac_word... " >&6; }
38270if ${ac_cv_prog_OBJCOPY+:} false; then :
38271  $as_echo_n "(cached) " >&6
38272else
38273  if test -n "$OBJCOPY"; then
38274  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38275else
38276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38277for as_dir in $PATH
38278do
38279  IFS=$as_save_IFS
38280  test -z "$as_dir" && as_dir=.
38281    for ac_exec_ext in '' $ac_executable_extensions; do
38282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38283    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38285    break 2
38286  fi
38287done
38288  done
38289IFS=$as_save_IFS
38290
38291fi
38292fi
38293OBJCOPY=$ac_cv_prog_OBJCOPY
38294if test -n "$OBJCOPY"; then
38295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38296$as_echo "$OBJCOPY" >&6; }
38297else
38298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38299$as_echo "no" >&6; }
38300fi
38301
38302
38303    test -n "$OBJCOPY" && break
38304  done
38305fi
38306if test -z "$OBJCOPY"; then
38307  ac_ct_OBJCOPY=$OBJCOPY
38308  for ac_prog in gobjcopy objcopy
38309do
38310  # Extract the first word of "$ac_prog", so it can be a program name with args.
38311set dummy $ac_prog; ac_word=$2
38312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38313$as_echo_n "checking for $ac_word... " >&6; }
38314if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38315  $as_echo_n "(cached) " >&6
38316else
38317  if test -n "$ac_ct_OBJCOPY"; then
38318  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38319else
38320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38321for as_dir in $PATH
38322do
38323  IFS=$as_save_IFS
38324  test -z "$as_dir" && as_dir=.
38325    for ac_exec_ext in '' $ac_executable_extensions; do
38326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38327    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38329    break 2
38330  fi
38331done
38332  done
38333IFS=$as_save_IFS
38334
38335fi
38336fi
38337ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38338if test -n "$ac_ct_OBJCOPY"; then
38339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38340$as_echo "$ac_ct_OBJCOPY" >&6; }
38341else
38342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38343$as_echo "no" >&6; }
38344fi
38345
38346
38347  test -n "$ac_ct_OBJCOPY" && break
38348done
38349
38350  if test "x$ac_ct_OBJCOPY" = x; then
38351    OBJCOPY=""
38352  else
38353    case $cross_compiling:$ac_tool_warned in
38354yes:)
38355{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38356$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38357ac_tool_warned=yes ;;
38358esac
38359    OBJCOPY=$ac_ct_OBJCOPY
38360  fi
38361fi
38362
38363  else
38364    # The variable is set, but is it from the command line or the environment?
38365
38366    # Try to remove the string !OBJCOPY! from our list.
38367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38369      # If it failed, the variable was not from the command line. Ignore it,
38370      # but warn the user (except for BASH, which is always set by the calling BASH).
38371      if test "xOBJCOPY" != xBASH; then
38372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38373$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38374      fi
38375      # Try to locate tool using the code snippet
38376      if test -n "$ac_tool_prefix"; then
38377  for ac_prog in gobjcopy objcopy
38378  do
38379    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38380set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38382$as_echo_n "checking for $ac_word... " >&6; }
38383if ${ac_cv_prog_OBJCOPY+:} false; then :
38384  $as_echo_n "(cached) " >&6
38385else
38386  if test -n "$OBJCOPY"; then
38387  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38388else
38389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38390for as_dir in $PATH
38391do
38392  IFS=$as_save_IFS
38393  test -z "$as_dir" && as_dir=.
38394    for ac_exec_ext in '' $ac_executable_extensions; do
38395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38396    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38398    break 2
38399  fi
38400done
38401  done
38402IFS=$as_save_IFS
38403
38404fi
38405fi
38406OBJCOPY=$ac_cv_prog_OBJCOPY
38407if test -n "$OBJCOPY"; then
38408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38409$as_echo "$OBJCOPY" >&6; }
38410else
38411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38412$as_echo "no" >&6; }
38413fi
38414
38415
38416    test -n "$OBJCOPY" && break
38417  done
38418fi
38419if test -z "$OBJCOPY"; then
38420  ac_ct_OBJCOPY=$OBJCOPY
38421  for ac_prog in gobjcopy objcopy
38422do
38423  # Extract the first word of "$ac_prog", so it can be a program name with args.
38424set dummy $ac_prog; ac_word=$2
38425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38426$as_echo_n "checking for $ac_word... " >&6; }
38427if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38428  $as_echo_n "(cached) " >&6
38429else
38430  if test -n "$ac_ct_OBJCOPY"; then
38431  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38432else
38433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38434for as_dir in $PATH
38435do
38436  IFS=$as_save_IFS
38437  test -z "$as_dir" && as_dir=.
38438    for ac_exec_ext in '' $ac_executable_extensions; do
38439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38440    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38442    break 2
38443  fi
38444done
38445  done
38446IFS=$as_save_IFS
38447
38448fi
38449fi
38450ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38451if test -n "$ac_ct_OBJCOPY"; then
38452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38453$as_echo "$ac_ct_OBJCOPY" >&6; }
38454else
38455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38456$as_echo "no" >&6; }
38457fi
38458
38459
38460  test -n "$ac_ct_OBJCOPY" && break
38461done
38462
38463  if test "x$ac_ct_OBJCOPY" = x; then
38464    OBJCOPY=""
38465  else
38466    case $cross_compiling:$ac_tool_warned in
38467yes:)
38468{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38469$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38470ac_tool_warned=yes ;;
38471esac
38472    OBJCOPY=$ac_ct_OBJCOPY
38473  fi
38474fi
38475
38476    else
38477      # If it succeeded, then it was overridden by the user. We will use it
38478      # for the tool.
38479
38480      # First remove it from the list of overridden variables, so we can test
38481      # for unknown variables in the end.
38482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38483
38484      # Check if the provided tool contains a complete path.
38485      tool_specified="$OBJCOPY"
38486      tool_basename="${tool_specified##*/}"
38487      if test "x$tool_basename" = "x$tool_specified"; then
38488        # A command without a complete path is provided, search $PATH.
38489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38490$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38491        # Extract the first word of "$tool_basename", so it can be a program name with args.
38492set dummy $tool_basename; ac_word=$2
38493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38494$as_echo_n "checking for $ac_word... " >&6; }
38495if ${ac_cv_path_OBJCOPY+:} false; then :
38496  $as_echo_n "(cached) " >&6
38497else
38498  case $OBJCOPY in
38499  [\\/]* | ?:[\\/]*)
38500  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38501  ;;
38502  *)
38503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38504for as_dir in $PATH
38505do
38506  IFS=$as_save_IFS
38507  test -z "$as_dir" && as_dir=.
38508    for ac_exec_ext in '' $ac_executable_extensions; do
38509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38510    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38512    break 2
38513  fi
38514done
38515  done
38516IFS=$as_save_IFS
38517
38518  ;;
38519esac
38520fi
38521OBJCOPY=$ac_cv_path_OBJCOPY
38522if test -n "$OBJCOPY"; then
38523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38524$as_echo "$OBJCOPY" >&6; }
38525else
38526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38527$as_echo "no" >&6; }
38528fi
38529
38530
38531        if test "x$OBJCOPY" = x; then
38532          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38533        fi
38534      else
38535        # Otherwise we believe it is a complete path. Use it as it is.
38536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38537$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38539$as_echo_n "checking for OBJCOPY... " >&6; }
38540        if test ! -x "$tool_specified"; then
38541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38542$as_echo "not found" >&6; }
38543          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38544        fi
38545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38546$as_echo "$tool_specified" >&6; }
38547      fi
38548    fi
38549  fi
38550
38551
38552    # Only call fixup if objcopy was found.
38553    if test -n "$OBJCOPY"; then
38554
38555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38556
38557  # First separate the path from the arguments. This will split at the first
38558  # space.
38559  complete="$OBJCOPY"
38560  path="${complete%% *}"
38561  tmp="$complete EOL"
38562  arguments="${tmp#* }"
38563
38564  # Input might be given as Windows format, start by converting to
38565  # unix format.
38566  new_path=`$CYGPATH -u "$path"`
38567
38568  # Now try to locate executable using which
38569  new_path=`$WHICH "$new_path" 2> /dev/null`
38570  # bat and cmd files are not always considered executable in cygwin causing which
38571  # to not find them
38572  if test "x$new_path" = x \
38573      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38574      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38575    new_path=`$CYGPATH -u "$path"`
38576  fi
38577  if test "x$new_path" = x; then
38578    # Oops. Which didn't find the executable.
38579    # The splitting of arguments from the executable at a space might have been incorrect,
38580    # since paths with space are more likely in Windows. Give it another try with the whole
38581    # argument.
38582    path="$complete"
38583    arguments="EOL"
38584    new_path=`$CYGPATH -u "$path"`
38585    new_path=`$WHICH "$new_path" 2> /dev/null`
38586    # bat and cmd files are not always considered executable in cygwin causing which
38587    # to not find them
38588    if test "x$new_path" = x \
38589        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38590        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38591      new_path=`$CYGPATH -u "$path"`
38592    fi
38593    if test "x$new_path" = x; then
38594      # It's still not found. Now this is an unrecoverable error.
38595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38596$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38597      has_space=`$ECHO "$complete" | $GREP " "`
38598      if test "x$has_space" != x; then
38599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38601      fi
38602      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38603    fi
38604  fi
38605
38606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38609  # "foo.exe" is OK but "foo" is an error.
38610  #
38611  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38612  # It is also a way to make sure we got the proper file name for the real test later on.
38613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38614  if test "x$test_shortpath" = x; then
38615    # Short path failed, file does not exist as specified.
38616    # Try adding .exe or .cmd
38617    if test -f "${new_path}.exe"; then
38618      input_to_shortpath="${new_path}.exe"
38619    elif test -f "${new_path}.cmd"; then
38620      input_to_shortpath="${new_path}.cmd"
38621    else
38622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38623$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38624      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38625$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38626      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38627    fi
38628  else
38629    input_to_shortpath="$new_path"
38630  fi
38631
38632  # Call helper function which possibly converts this using DOS-style short mode.
38633  # If so, the updated path is stored in $new_path.
38634  new_path="$input_to_shortpath"
38635
38636  input_path="$input_to_shortpath"
38637  # Check if we need to convert this using DOS-style short mode. If the path
38638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38639  # take no chances and rewrite it.
38640  # Note: m4 eats our [], so we need to use [ and ] instead.
38641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38642  if test "x$has_forbidden_chars" != x; then
38643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38647      # Going to short mode and back again did indeed matter. Since short mode is
38648      # case insensitive, let's make it lowercase to improve readability.
38649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38650      # Now convert it back to Unix-stile (cygpath)
38651      input_path=`$CYGPATH -u "$shortmode_path"`
38652      new_path="$input_path"
38653    fi
38654  fi
38655
38656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38657  if test "x$test_cygdrive_prefix" = x; then
38658    # As a simple fix, exclude /usr/bin since it's not a real path.
38659    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38661      # a path prefixed by /cygdrive for fixpath to work.
38662      new_path="$CYGWIN_ROOT_PATH$input_path"
38663    fi
38664  fi
38665
38666  # remove trailing .exe if any
38667  new_path="${new_path/%.exe/}"
38668
38669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38670
38671  # First separate the path from the arguments. This will split at the first
38672  # space.
38673  complete="$OBJCOPY"
38674  path="${complete%% *}"
38675  tmp="$complete EOL"
38676  arguments="${tmp#* }"
38677
38678  # Input might be given as Windows format, start by converting to
38679  # unix format.
38680  new_path="$path"
38681
38682  windows_path="$new_path"
38683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38684    unix_path=`$CYGPATH -u "$windows_path"`
38685    new_path="$unix_path"
38686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38688    new_path="$unix_path"
38689  fi
38690
38691
38692  # Now try to locate executable using which
38693  new_path=`$WHICH "$new_path" 2> /dev/null`
38694
38695  if test "x$new_path" = x; then
38696    # Oops. Which didn't find the executable.
38697    # The splitting of arguments from the executable at a space might have been incorrect,
38698    # since paths with space are more likely in Windows. Give it another try with the whole
38699    # argument.
38700    path="$complete"
38701    arguments="EOL"
38702    new_path="$path"
38703
38704  windows_path="$new_path"
38705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38706    unix_path=`$CYGPATH -u "$windows_path"`
38707    new_path="$unix_path"
38708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38710    new_path="$unix_path"
38711  fi
38712
38713
38714    new_path=`$WHICH "$new_path" 2> /dev/null`
38715    # bat and cmd files are not always considered executable in MSYS causing which
38716    # to not find them
38717    if test "x$new_path" = x \
38718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38720      new_path="$path"
38721
38722  windows_path="$new_path"
38723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38724    unix_path=`$CYGPATH -u "$windows_path"`
38725    new_path="$unix_path"
38726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38728    new_path="$unix_path"
38729  fi
38730
38731    fi
38732
38733    if test "x$new_path" = x; then
38734      # It's still not found. Now this is an unrecoverable error.
38735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38736$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38737      has_space=`$ECHO "$complete" | $GREP " "`
38738      if test "x$has_space" != x; then
38739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38741      fi
38742      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38743    fi
38744  fi
38745
38746  # Now new_path has a complete unix path to the binary
38747  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38748    # Keep paths in /bin as-is, but remove trailing .exe if any
38749    new_path="${new_path/%.exe/}"
38750    # Do not save /bin paths to all_fixpath_prefixes!
38751  else
38752    # Not in mixed or Windows style, start by that.
38753    new_path=`cmd //c echo $new_path`
38754
38755  input_path="$new_path"
38756  # Check if we need to convert this using DOS-style short mode. If the path
38757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38758  # take no chances and rewrite it.
38759  # Note: m4 eats our [], so we need to use [ and ] instead.
38760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38761  if test "x$has_forbidden_chars" != x; then
38762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38764  fi
38765
38766    # Output is in $new_path
38767
38768  windows_path="$new_path"
38769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38770    unix_path=`$CYGPATH -u "$windows_path"`
38771    new_path="$unix_path"
38772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38774    new_path="$unix_path"
38775  fi
38776
38777    # remove trailing .exe if any
38778    new_path="${new_path/%.exe/}"
38779
38780    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38781    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38782  fi
38783
38784  else
38785    # We're on a posix platform. Hooray! :)
38786    # First separate the path from the arguments. This will split at the first
38787    # space.
38788    complete="$OBJCOPY"
38789    path="${complete%% *}"
38790    tmp="$complete EOL"
38791    arguments="${tmp#* }"
38792
38793    # Cannot rely on the command "which" here since it doesn't always work.
38794    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38795    if test -z "$is_absolute_path"; then
38796      # Path to executable is not absolute. Find it.
38797      IFS_save="$IFS"
38798      IFS=:
38799      for p in $PATH; do
38800        if test -f "$p/$path" && test -x "$p/$path"; then
38801          new_path="$p/$path"
38802          break
38803        fi
38804      done
38805      IFS="$IFS_save"
38806    else
38807      # This is an absolute path, we can use it without further modifications.
38808      new_path="$path"
38809    fi
38810
38811    if test "x$new_path" = x; then
38812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38813$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38814      has_space=`$ECHO "$complete" | $GREP " "`
38815      if test "x$has_space" != x; then
38816        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38817$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38818      fi
38819      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38820    fi
38821  fi
38822
38823  # Now join together the path and the arguments once again
38824  if test "x$arguments" != xEOL; then
38825    new_complete="$new_path ${arguments% *}"
38826  else
38827    new_complete="$new_path"
38828  fi
38829
38830  if test "x$complete" != "x$new_complete"; then
38831    OBJCOPY="$new_complete"
38832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38833$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38834  fi
38835
38836    fi
38837  fi
38838
38839
38840
38841  # Publish this variable in the help.
38842
38843
38844  if test "x$OBJDUMP" = x; then
38845    # The variable is not set by user, try to locate tool using the code snippet
38846    if test -n "$ac_tool_prefix"; then
38847  for ac_prog in gobjdump objdump
38848  do
38849    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38850set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38852$as_echo_n "checking for $ac_word... " >&6; }
38853if ${ac_cv_prog_OBJDUMP+:} false; then :
38854  $as_echo_n "(cached) " >&6
38855else
38856  if test -n "$OBJDUMP"; then
38857  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38858else
38859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38860for as_dir in $PATH
38861do
38862  IFS=$as_save_IFS
38863  test -z "$as_dir" && as_dir=.
38864    for ac_exec_ext in '' $ac_executable_extensions; do
38865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38866    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38868    break 2
38869  fi
38870done
38871  done
38872IFS=$as_save_IFS
38873
38874fi
38875fi
38876OBJDUMP=$ac_cv_prog_OBJDUMP
38877if test -n "$OBJDUMP"; then
38878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38879$as_echo "$OBJDUMP" >&6; }
38880else
38881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38882$as_echo "no" >&6; }
38883fi
38884
38885
38886    test -n "$OBJDUMP" && break
38887  done
38888fi
38889if test -z "$OBJDUMP"; then
38890  ac_ct_OBJDUMP=$OBJDUMP
38891  for ac_prog in gobjdump objdump
38892do
38893  # Extract the first word of "$ac_prog", so it can be a program name with args.
38894set dummy $ac_prog; ac_word=$2
38895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38896$as_echo_n "checking for $ac_word... " >&6; }
38897if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38898  $as_echo_n "(cached) " >&6
38899else
38900  if test -n "$ac_ct_OBJDUMP"; then
38901  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38902else
38903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38904for as_dir in $PATH
38905do
38906  IFS=$as_save_IFS
38907  test -z "$as_dir" && as_dir=.
38908    for ac_exec_ext in '' $ac_executable_extensions; do
38909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38910    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38912    break 2
38913  fi
38914done
38915  done
38916IFS=$as_save_IFS
38917
38918fi
38919fi
38920ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38921if test -n "$ac_ct_OBJDUMP"; then
38922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38923$as_echo "$ac_ct_OBJDUMP" >&6; }
38924else
38925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38926$as_echo "no" >&6; }
38927fi
38928
38929
38930  test -n "$ac_ct_OBJDUMP" && break
38931done
38932
38933  if test "x$ac_ct_OBJDUMP" = x; then
38934    OBJDUMP=""
38935  else
38936    case $cross_compiling:$ac_tool_warned in
38937yes:)
38938{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38940ac_tool_warned=yes ;;
38941esac
38942    OBJDUMP=$ac_ct_OBJDUMP
38943  fi
38944fi
38945
38946  else
38947    # The variable is set, but is it from the command line or the environment?
38948
38949    # Try to remove the string !OBJDUMP! from our list.
38950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38952      # If it failed, the variable was not from the command line. Ignore it,
38953      # but warn the user (except for BASH, which is always set by the calling BASH).
38954      if test "xOBJDUMP" != xBASH; then
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38956$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38957      fi
38958      # Try to locate tool using the code snippet
38959      if test -n "$ac_tool_prefix"; then
38960  for ac_prog in gobjdump objdump
38961  do
38962    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38963set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38965$as_echo_n "checking for $ac_word... " >&6; }
38966if ${ac_cv_prog_OBJDUMP+:} false; then :
38967  $as_echo_n "(cached) " >&6
38968else
38969  if test -n "$OBJDUMP"; then
38970  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38971else
38972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38973for as_dir in $PATH
38974do
38975  IFS=$as_save_IFS
38976  test -z "$as_dir" && as_dir=.
38977    for ac_exec_ext in '' $ac_executable_extensions; do
38978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38979    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38981    break 2
38982  fi
38983done
38984  done
38985IFS=$as_save_IFS
38986
38987fi
38988fi
38989OBJDUMP=$ac_cv_prog_OBJDUMP
38990if test -n "$OBJDUMP"; then
38991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38992$as_echo "$OBJDUMP" >&6; }
38993else
38994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38995$as_echo "no" >&6; }
38996fi
38997
38998
38999    test -n "$OBJDUMP" && break
39000  done
39001fi
39002if test -z "$OBJDUMP"; then
39003  ac_ct_OBJDUMP=$OBJDUMP
39004  for ac_prog in gobjdump objdump
39005do
39006  # Extract the first word of "$ac_prog", so it can be a program name with args.
39007set dummy $ac_prog; ac_word=$2
39008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39009$as_echo_n "checking for $ac_word... " >&6; }
39010if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39011  $as_echo_n "(cached) " >&6
39012else
39013  if test -n "$ac_ct_OBJDUMP"; then
39014  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39015else
39016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39017for as_dir in $PATH
39018do
39019  IFS=$as_save_IFS
39020  test -z "$as_dir" && as_dir=.
39021    for ac_exec_ext in '' $ac_executable_extensions; do
39022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39023    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39025    break 2
39026  fi
39027done
39028  done
39029IFS=$as_save_IFS
39030
39031fi
39032fi
39033ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39034if test -n "$ac_ct_OBJDUMP"; then
39035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39036$as_echo "$ac_ct_OBJDUMP" >&6; }
39037else
39038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39039$as_echo "no" >&6; }
39040fi
39041
39042
39043  test -n "$ac_ct_OBJDUMP" && break
39044done
39045
39046  if test "x$ac_ct_OBJDUMP" = x; then
39047    OBJDUMP=""
39048  else
39049    case $cross_compiling:$ac_tool_warned in
39050yes:)
39051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39053ac_tool_warned=yes ;;
39054esac
39055    OBJDUMP=$ac_ct_OBJDUMP
39056  fi
39057fi
39058
39059    else
39060      # If it succeeded, then it was overridden by the user. We will use it
39061      # for the tool.
39062
39063      # First remove it from the list of overridden variables, so we can test
39064      # for unknown variables in the end.
39065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39066
39067      # Check if the provided tool contains a complete path.
39068      tool_specified="$OBJDUMP"
39069      tool_basename="${tool_specified##*/}"
39070      if test "x$tool_basename" = "x$tool_specified"; then
39071        # A command without a complete path is provided, search $PATH.
39072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39073$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39074        # Extract the first word of "$tool_basename", so it can be a program name with args.
39075set dummy $tool_basename; ac_word=$2
39076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39077$as_echo_n "checking for $ac_word... " >&6; }
39078if ${ac_cv_path_OBJDUMP+:} false; then :
39079  $as_echo_n "(cached) " >&6
39080else
39081  case $OBJDUMP in
39082  [\\/]* | ?:[\\/]*)
39083  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39084  ;;
39085  *)
39086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39087for as_dir in $PATH
39088do
39089  IFS=$as_save_IFS
39090  test -z "$as_dir" && as_dir=.
39091    for ac_exec_ext in '' $ac_executable_extensions; do
39092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39093    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39095    break 2
39096  fi
39097done
39098  done
39099IFS=$as_save_IFS
39100
39101  ;;
39102esac
39103fi
39104OBJDUMP=$ac_cv_path_OBJDUMP
39105if test -n "$OBJDUMP"; then
39106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39107$as_echo "$OBJDUMP" >&6; }
39108else
39109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39110$as_echo "no" >&6; }
39111fi
39112
39113
39114        if test "x$OBJDUMP" = x; then
39115          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39116        fi
39117      else
39118        # Otherwise we believe it is a complete path. Use it as it is.
39119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39120$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39122$as_echo_n "checking for OBJDUMP... " >&6; }
39123        if test ! -x "$tool_specified"; then
39124          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39125$as_echo "not found" >&6; }
39126          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39127        fi
39128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39129$as_echo "$tool_specified" >&6; }
39130      fi
39131    fi
39132  fi
39133
39134
39135  if test "x$OBJDUMP" != x; then
39136    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39137    # bails if argument is missing.
39138
39139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39140
39141  # First separate the path from the arguments. This will split at the first
39142  # space.
39143  complete="$OBJDUMP"
39144  path="${complete%% *}"
39145  tmp="$complete EOL"
39146  arguments="${tmp#* }"
39147
39148  # Input might be given as Windows format, start by converting to
39149  # unix format.
39150  new_path=`$CYGPATH -u "$path"`
39151
39152  # Now try to locate executable using which
39153  new_path=`$WHICH "$new_path" 2> /dev/null`
39154  # bat and cmd files are not always considered executable in cygwin causing which
39155  # to not find them
39156  if test "x$new_path" = x \
39157      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39158      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39159    new_path=`$CYGPATH -u "$path"`
39160  fi
39161  if test "x$new_path" = x; then
39162    # Oops. Which didn't find the executable.
39163    # The splitting of arguments from the executable at a space might have been incorrect,
39164    # since paths with space are more likely in Windows. Give it another try with the whole
39165    # argument.
39166    path="$complete"
39167    arguments="EOL"
39168    new_path=`$CYGPATH -u "$path"`
39169    new_path=`$WHICH "$new_path" 2> /dev/null`
39170    # bat and cmd files are not always considered executable in cygwin causing which
39171    # to not find them
39172    if test "x$new_path" = x \
39173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39175      new_path=`$CYGPATH -u "$path"`
39176    fi
39177    if test "x$new_path" = x; then
39178      # It's still not found. Now this is an unrecoverable error.
39179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39180$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39181      has_space=`$ECHO "$complete" | $GREP " "`
39182      if test "x$has_space" != x; then
39183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39185      fi
39186      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39187    fi
39188  fi
39189
39190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39193  # "foo.exe" is OK but "foo" is an error.
39194  #
39195  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39196  # It is also a way to make sure we got the proper file name for the real test later on.
39197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39198  if test "x$test_shortpath" = x; then
39199    # Short path failed, file does not exist as specified.
39200    # Try adding .exe or .cmd
39201    if test -f "${new_path}.exe"; then
39202      input_to_shortpath="${new_path}.exe"
39203    elif test -f "${new_path}.cmd"; then
39204      input_to_shortpath="${new_path}.cmd"
39205    else
39206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39207$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39208      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39209$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39210      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39211    fi
39212  else
39213    input_to_shortpath="$new_path"
39214  fi
39215
39216  # Call helper function which possibly converts this using DOS-style short mode.
39217  # If so, the updated path is stored in $new_path.
39218  new_path="$input_to_shortpath"
39219
39220  input_path="$input_to_shortpath"
39221  # Check if we need to convert this using DOS-style short mode. If the path
39222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39223  # take no chances and rewrite it.
39224  # Note: m4 eats our [], so we need to use [ and ] instead.
39225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39226  if test "x$has_forbidden_chars" != x; then
39227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39231      # Going to short mode and back again did indeed matter. Since short mode is
39232      # case insensitive, let's make it lowercase to improve readability.
39233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39234      # Now convert it back to Unix-stile (cygpath)
39235      input_path=`$CYGPATH -u "$shortmode_path"`
39236      new_path="$input_path"
39237    fi
39238  fi
39239
39240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39241  if test "x$test_cygdrive_prefix" = x; then
39242    # As a simple fix, exclude /usr/bin since it's not a real path.
39243    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39245      # a path prefixed by /cygdrive for fixpath to work.
39246      new_path="$CYGWIN_ROOT_PATH$input_path"
39247    fi
39248  fi
39249
39250  # remove trailing .exe if any
39251  new_path="${new_path/%.exe/}"
39252
39253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39254
39255  # First separate the path from the arguments. This will split at the first
39256  # space.
39257  complete="$OBJDUMP"
39258  path="${complete%% *}"
39259  tmp="$complete EOL"
39260  arguments="${tmp#* }"
39261
39262  # Input might be given as Windows format, start by converting to
39263  # unix format.
39264  new_path="$path"
39265
39266  windows_path="$new_path"
39267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39268    unix_path=`$CYGPATH -u "$windows_path"`
39269    new_path="$unix_path"
39270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39272    new_path="$unix_path"
39273  fi
39274
39275
39276  # Now try to locate executable using which
39277  new_path=`$WHICH "$new_path" 2> /dev/null`
39278
39279  if test "x$new_path" = x; then
39280    # Oops. Which didn't find the executable.
39281    # The splitting of arguments from the executable at a space might have been incorrect,
39282    # since paths with space are more likely in Windows. Give it another try with the whole
39283    # argument.
39284    path="$complete"
39285    arguments="EOL"
39286    new_path="$path"
39287
39288  windows_path="$new_path"
39289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39290    unix_path=`$CYGPATH -u "$windows_path"`
39291    new_path="$unix_path"
39292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39294    new_path="$unix_path"
39295  fi
39296
39297
39298    new_path=`$WHICH "$new_path" 2> /dev/null`
39299    # bat and cmd files are not always considered executable in MSYS causing which
39300    # to not find them
39301    if test "x$new_path" = x \
39302        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39303        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39304      new_path="$path"
39305
39306  windows_path="$new_path"
39307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39308    unix_path=`$CYGPATH -u "$windows_path"`
39309    new_path="$unix_path"
39310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39312    new_path="$unix_path"
39313  fi
39314
39315    fi
39316
39317    if test "x$new_path" = x; then
39318      # It's still not found. Now this is an unrecoverable error.
39319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39320$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39321      has_space=`$ECHO "$complete" | $GREP " "`
39322      if test "x$has_space" != x; then
39323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39325      fi
39326      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39327    fi
39328  fi
39329
39330  # Now new_path has a complete unix path to the binary
39331  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39332    # Keep paths in /bin as-is, but remove trailing .exe if any
39333    new_path="${new_path/%.exe/}"
39334    # Do not save /bin paths to all_fixpath_prefixes!
39335  else
39336    # Not in mixed or Windows style, start by that.
39337    new_path=`cmd //c echo $new_path`
39338
39339  input_path="$new_path"
39340  # Check if we need to convert this using DOS-style short mode. If the path
39341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39342  # take no chances and rewrite it.
39343  # Note: m4 eats our [], so we need to use [ and ] instead.
39344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39345  if test "x$has_forbidden_chars" != x; then
39346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39348  fi
39349
39350    # Output is in $new_path
39351
39352  windows_path="$new_path"
39353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39354    unix_path=`$CYGPATH -u "$windows_path"`
39355    new_path="$unix_path"
39356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39358    new_path="$unix_path"
39359  fi
39360
39361    # remove trailing .exe if any
39362    new_path="${new_path/%.exe/}"
39363
39364    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39365    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39366  fi
39367
39368  else
39369    # We're on a posix platform. Hooray! :)
39370    # First separate the path from the arguments. This will split at the first
39371    # space.
39372    complete="$OBJDUMP"
39373    path="${complete%% *}"
39374    tmp="$complete EOL"
39375    arguments="${tmp#* }"
39376
39377    # Cannot rely on the command "which" here since it doesn't always work.
39378    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39379    if test -z "$is_absolute_path"; then
39380      # Path to executable is not absolute. Find it.
39381      IFS_save="$IFS"
39382      IFS=:
39383      for p in $PATH; do
39384        if test -f "$p/$path" && test -x "$p/$path"; then
39385          new_path="$p/$path"
39386          break
39387        fi
39388      done
39389      IFS="$IFS_save"
39390    else
39391      # This is an absolute path, we can use it without further modifications.
39392      new_path="$path"
39393    fi
39394
39395    if test "x$new_path" = x; then
39396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39397$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39398      has_space=`$ECHO "$complete" | $GREP " "`
39399      if test "x$has_space" != x; then
39400        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39401$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39402      fi
39403      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39404    fi
39405  fi
39406
39407  # Now join together the path and the arguments once again
39408  if test "x$arguments" != xEOL; then
39409    new_complete="$new_path ${arguments% *}"
39410  else
39411    new_complete="$new_path"
39412  fi
39413
39414  if test "x$complete" != "x$new_complete"; then
39415    OBJDUMP="$new_complete"
39416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39417$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39418  fi
39419
39420  fi
39421
39422
39423  # Restore old path.
39424  PATH="$OLD_PATH"
39425
39426  # Restore the flags to the user specified values.
39427  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39428  CFLAGS="$ORG_CFLAGS"
39429  CXXFLAGS="$ORG_CXXFLAGS"
39430  OBJCFLAGS="$ORG_OBJCFLAGS"
39431
39432
39433# Finally do some processing after the detection phase
39434
39435  if test "x$COMPILE_TYPE" = "xcross"; then
39436    # Now we need to find a C/C++ compiler that can build executables for the
39437    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39438    # used once. Also, we need to do this without adding a tools dir to the
39439    # path, otherwise we might pick up cross-compilers which don't use standard
39440    # naming.
39441
39442    # FIXME: we should list the discovered compilers as an exclude pattern!
39443    # If we do that, we can do this detection before POST_DETECTION, and still
39444    # find the build compilers in the tools dir, if needed.
39445
39446
39447  # Publish this variable in the help.
39448
39449
39450  if test "x$BUILD_CC" = x; then
39451    # The variable is not set by user, try to locate tool using the code snippet
39452    for ac_prog in cl cc gcc
39453do
39454  # Extract the first word of "$ac_prog", so it can be a program name with args.
39455set dummy $ac_prog; ac_word=$2
39456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39457$as_echo_n "checking for $ac_word... " >&6; }
39458if ${ac_cv_path_BUILD_CC+:} false; then :
39459  $as_echo_n "(cached) " >&6
39460else
39461  case $BUILD_CC in
39462  [\\/]* | ?:[\\/]*)
39463  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39464  ;;
39465  *)
39466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39467for as_dir in $PATH
39468do
39469  IFS=$as_save_IFS
39470  test -z "$as_dir" && as_dir=.
39471    for ac_exec_ext in '' $ac_executable_extensions; do
39472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39473    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39475    break 2
39476  fi
39477done
39478  done
39479IFS=$as_save_IFS
39480
39481  ;;
39482esac
39483fi
39484BUILD_CC=$ac_cv_path_BUILD_CC
39485if test -n "$BUILD_CC"; then
39486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39487$as_echo "$BUILD_CC" >&6; }
39488else
39489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39490$as_echo "no" >&6; }
39491fi
39492
39493
39494  test -n "$BUILD_CC" && break
39495done
39496
39497  else
39498    # The variable is set, but is it from the command line or the environment?
39499
39500    # Try to remove the string !BUILD_CC! from our list.
39501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39503      # If it failed, the variable was not from the command line. Ignore it,
39504      # but warn the user (except for BASH, which is always set by the calling BASH).
39505      if test "xBUILD_CC" != xBASH; then
39506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39507$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39508      fi
39509      # Try to locate tool using the code snippet
39510      for ac_prog in cl cc gcc
39511do
39512  # Extract the first word of "$ac_prog", so it can be a program name with args.
39513set dummy $ac_prog; ac_word=$2
39514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39515$as_echo_n "checking for $ac_word... " >&6; }
39516if ${ac_cv_path_BUILD_CC+:} false; then :
39517  $as_echo_n "(cached) " >&6
39518else
39519  case $BUILD_CC in
39520  [\\/]* | ?:[\\/]*)
39521  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39522  ;;
39523  *)
39524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39525for as_dir in $PATH
39526do
39527  IFS=$as_save_IFS
39528  test -z "$as_dir" && as_dir=.
39529    for ac_exec_ext in '' $ac_executable_extensions; do
39530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39531    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39533    break 2
39534  fi
39535done
39536  done
39537IFS=$as_save_IFS
39538
39539  ;;
39540esac
39541fi
39542BUILD_CC=$ac_cv_path_BUILD_CC
39543if test -n "$BUILD_CC"; then
39544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39545$as_echo "$BUILD_CC" >&6; }
39546else
39547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39548$as_echo "no" >&6; }
39549fi
39550
39551
39552  test -n "$BUILD_CC" && break
39553done
39554
39555    else
39556      # If it succeeded, then it was overridden by the user. We will use it
39557      # for the tool.
39558
39559      # First remove it from the list of overridden variables, so we can test
39560      # for unknown variables in the end.
39561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39562
39563      # Check if the provided tool contains a complete path.
39564      tool_specified="$BUILD_CC"
39565      tool_basename="${tool_specified##*/}"
39566      if test "x$tool_basename" = "x$tool_specified"; then
39567        # A command without a complete path is provided, search $PATH.
39568        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39569$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39570        # Extract the first word of "$tool_basename", so it can be a program name with args.
39571set dummy $tool_basename; ac_word=$2
39572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39573$as_echo_n "checking for $ac_word... " >&6; }
39574if ${ac_cv_path_BUILD_CC+:} false; then :
39575  $as_echo_n "(cached) " >&6
39576else
39577  case $BUILD_CC in
39578  [\\/]* | ?:[\\/]*)
39579  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39580  ;;
39581  *)
39582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39583for as_dir in $PATH
39584do
39585  IFS=$as_save_IFS
39586  test -z "$as_dir" && as_dir=.
39587    for ac_exec_ext in '' $ac_executable_extensions; do
39588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39589    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39591    break 2
39592  fi
39593done
39594  done
39595IFS=$as_save_IFS
39596
39597  ;;
39598esac
39599fi
39600BUILD_CC=$ac_cv_path_BUILD_CC
39601if test -n "$BUILD_CC"; then
39602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39603$as_echo "$BUILD_CC" >&6; }
39604else
39605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39606$as_echo "no" >&6; }
39607fi
39608
39609
39610        if test "x$BUILD_CC" = x; then
39611          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39612        fi
39613      else
39614        # Otherwise we believe it is a complete path. Use it as it is.
39615        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39616$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39618$as_echo_n "checking for BUILD_CC... " >&6; }
39619        if test ! -x "$tool_specified"; then
39620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39621$as_echo "not found" >&6; }
39622          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39623        fi
39624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39625$as_echo "$tool_specified" >&6; }
39626      fi
39627    fi
39628  fi
39629
39630
39631
39632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39633
39634  # First separate the path from the arguments. This will split at the first
39635  # space.
39636  complete="$BUILD_CC"
39637  path="${complete%% *}"
39638  tmp="$complete EOL"
39639  arguments="${tmp#* }"
39640
39641  # Input might be given as Windows format, start by converting to
39642  # unix format.
39643  new_path=`$CYGPATH -u "$path"`
39644
39645  # Now try to locate executable using which
39646  new_path=`$WHICH "$new_path" 2> /dev/null`
39647  # bat and cmd files are not always considered executable in cygwin causing which
39648  # to not find them
39649  if test "x$new_path" = x \
39650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39652    new_path=`$CYGPATH -u "$path"`
39653  fi
39654  if test "x$new_path" = x; then
39655    # Oops. Which didn't find the executable.
39656    # The splitting of arguments from the executable at a space might have been incorrect,
39657    # since paths with space are more likely in Windows. Give it another try with the whole
39658    # argument.
39659    path="$complete"
39660    arguments="EOL"
39661    new_path=`$CYGPATH -u "$path"`
39662    new_path=`$WHICH "$new_path" 2> /dev/null`
39663    # bat and cmd files are not always considered executable in cygwin causing which
39664    # to not find them
39665    if test "x$new_path" = x \
39666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39668      new_path=`$CYGPATH -u "$path"`
39669    fi
39670    if test "x$new_path" = x; then
39671      # It's still not found. Now this is an unrecoverable error.
39672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39673$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39674      has_space=`$ECHO "$complete" | $GREP " "`
39675      if test "x$has_space" != x; then
39676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39678      fi
39679      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39680    fi
39681  fi
39682
39683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39686  # "foo.exe" is OK but "foo" is an error.
39687  #
39688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39689  # It is also a way to make sure we got the proper file name for the real test later on.
39690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39691  if test "x$test_shortpath" = x; then
39692    # Short path failed, file does not exist as specified.
39693    # Try adding .exe or .cmd
39694    if test -f "${new_path}.exe"; then
39695      input_to_shortpath="${new_path}.exe"
39696    elif test -f "${new_path}.cmd"; then
39697      input_to_shortpath="${new_path}.cmd"
39698    else
39699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39700$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39703      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39704    fi
39705  else
39706    input_to_shortpath="$new_path"
39707  fi
39708
39709  # Call helper function which possibly converts this using DOS-style short mode.
39710  # If so, the updated path is stored in $new_path.
39711  new_path="$input_to_shortpath"
39712
39713  input_path="$input_to_shortpath"
39714  # Check if we need to convert this using DOS-style short mode. If the path
39715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39716  # take no chances and rewrite it.
39717  # Note: m4 eats our [], so we need to use [ and ] instead.
39718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39719  if test "x$has_forbidden_chars" != x; then
39720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39724      # Going to short mode and back again did indeed matter. Since short mode is
39725      # case insensitive, let's make it lowercase to improve readability.
39726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39727      # Now convert it back to Unix-stile (cygpath)
39728      input_path=`$CYGPATH -u "$shortmode_path"`
39729      new_path="$input_path"
39730    fi
39731  fi
39732
39733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39734  if test "x$test_cygdrive_prefix" = x; then
39735    # As a simple fix, exclude /usr/bin since it's not a real path.
39736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39738      # a path prefixed by /cygdrive for fixpath to work.
39739      new_path="$CYGWIN_ROOT_PATH$input_path"
39740    fi
39741  fi
39742
39743  # remove trailing .exe if any
39744  new_path="${new_path/%.exe/}"
39745
39746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39747
39748  # First separate the path from the arguments. This will split at the first
39749  # space.
39750  complete="$BUILD_CC"
39751  path="${complete%% *}"
39752  tmp="$complete EOL"
39753  arguments="${tmp#* }"
39754
39755  # Input might be given as Windows format, start by converting to
39756  # unix format.
39757  new_path="$path"
39758
39759  windows_path="$new_path"
39760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39761    unix_path=`$CYGPATH -u "$windows_path"`
39762    new_path="$unix_path"
39763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39765    new_path="$unix_path"
39766  fi
39767
39768
39769  # Now try to locate executable using which
39770  new_path=`$WHICH "$new_path" 2> /dev/null`
39771
39772  if test "x$new_path" = x; then
39773    # Oops. Which didn't find the executable.
39774    # The splitting of arguments from the executable at a space might have been incorrect,
39775    # since paths with space are more likely in Windows. Give it another try with the whole
39776    # argument.
39777    path="$complete"
39778    arguments="EOL"
39779    new_path="$path"
39780
39781  windows_path="$new_path"
39782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39783    unix_path=`$CYGPATH -u "$windows_path"`
39784    new_path="$unix_path"
39785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39787    new_path="$unix_path"
39788  fi
39789
39790
39791    new_path=`$WHICH "$new_path" 2> /dev/null`
39792    # bat and cmd files are not always considered executable in MSYS causing which
39793    # to not find them
39794    if test "x$new_path" = x \
39795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39797      new_path="$path"
39798
39799  windows_path="$new_path"
39800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39801    unix_path=`$CYGPATH -u "$windows_path"`
39802    new_path="$unix_path"
39803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39805    new_path="$unix_path"
39806  fi
39807
39808    fi
39809
39810    if test "x$new_path" = x; then
39811      # It's still not found. Now this is an unrecoverable error.
39812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39813$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39814      has_space=`$ECHO "$complete" | $GREP " "`
39815      if test "x$has_space" != x; then
39816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39818      fi
39819      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39820    fi
39821  fi
39822
39823  # Now new_path has a complete unix path to the binary
39824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39825    # Keep paths in /bin as-is, but remove trailing .exe if any
39826    new_path="${new_path/%.exe/}"
39827    # Do not save /bin paths to all_fixpath_prefixes!
39828  else
39829    # Not in mixed or Windows style, start by that.
39830    new_path=`cmd //c echo $new_path`
39831
39832  input_path="$new_path"
39833  # Check if we need to convert this using DOS-style short mode. If the path
39834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39835  # take no chances and rewrite it.
39836  # Note: m4 eats our [], so we need to use [ and ] instead.
39837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39838  if test "x$has_forbidden_chars" != x; then
39839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39841  fi
39842
39843    # Output is in $new_path
39844
39845  windows_path="$new_path"
39846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39847    unix_path=`$CYGPATH -u "$windows_path"`
39848    new_path="$unix_path"
39849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39851    new_path="$unix_path"
39852  fi
39853
39854    # remove trailing .exe if any
39855    new_path="${new_path/%.exe/}"
39856
39857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39859  fi
39860
39861  else
39862    # We're on a posix platform. Hooray! :)
39863    # First separate the path from the arguments. This will split at the first
39864    # space.
39865    complete="$BUILD_CC"
39866    path="${complete%% *}"
39867    tmp="$complete EOL"
39868    arguments="${tmp#* }"
39869
39870    # Cannot rely on the command "which" here since it doesn't always work.
39871    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39872    if test -z "$is_absolute_path"; then
39873      # Path to executable is not absolute. Find it.
39874      IFS_save="$IFS"
39875      IFS=:
39876      for p in $PATH; do
39877        if test -f "$p/$path" && test -x "$p/$path"; then
39878          new_path="$p/$path"
39879          break
39880        fi
39881      done
39882      IFS="$IFS_save"
39883    else
39884      # This is an absolute path, we can use it without further modifications.
39885      new_path="$path"
39886    fi
39887
39888    if test "x$new_path" = x; then
39889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39890$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39891      has_space=`$ECHO "$complete" | $GREP " "`
39892      if test "x$has_space" != x; then
39893        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39895      fi
39896      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39897    fi
39898  fi
39899
39900  # Now join together the path and the arguments once again
39901  if test "x$arguments" != xEOL; then
39902    new_complete="$new_path ${arguments% *}"
39903  else
39904    new_complete="$new_path"
39905  fi
39906
39907  if test "x$complete" != "x$new_complete"; then
39908    BUILD_CC="$new_complete"
39909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39910$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39911  fi
39912
39913
39914
39915  # Publish this variable in the help.
39916
39917
39918  if test "x$BUILD_CXX" = x; then
39919    # The variable is not set by user, try to locate tool using the code snippet
39920    for ac_prog in cl CC g++
39921do
39922  # Extract the first word of "$ac_prog", so it can be a program name with args.
39923set dummy $ac_prog; ac_word=$2
39924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39925$as_echo_n "checking for $ac_word... " >&6; }
39926if ${ac_cv_path_BUILD_CXX+:} false; then :
39927  $as_echo_n "(cached) " >&6
39928else
39929  case $BUILD_CXX in
39930  [\\/]* | ?:[\\/]*)
39931  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39932  ;;
39933  *)
39934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39935for as_dir in $PATH
39936do
39937  IFS=$as_save_IFS
39938  test -z "$as_dir" && as_dir=.
39939    for ac_exec_ext in '' $ac_executable_extensions; do
39940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39941    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39943    break 2
39944  fi
39945done
39946  done
39947IFS=$as_save_IFS
39948
39949  ;;
39950esac
39951fi
39952BUILD_CXX=$ac_cv_path_BUILD_CXX
39953if test -n "$BUILD_CXX"; then
39954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39955$as_echo "$BUILD_CXX" >&6; }
39956else
39957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39958$as_echo "no" >&6; }
39959fi
39960
39961
39962  test -n "$BUILD_CXX" && break
39963done
39964
39965  else
39966    # The variable is set, but is it from the command line or the environment?
39967
39968    # Try to remove the string !BUILD_CXX! from our list.
39969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39971      # If it failed, the variable was not from the command line. Ignore it,
39972      # but warn the user (except for BASH, which is always set by the calling BASH).
39973      if test "xBUILD_CXX" != xBASH; then
39974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39975$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39976      fi
39977      # Try to locate tool using the code snippet
39978      for ac_prog in cl CC g++
39979do
39980  # Extract the first word of "$ac_prog", so it can be a program name with args.
39981set dummy $ac_prog; ac_word=$2
39982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39983$as_echo_n "checking for $ac_word... " >&6; }
39984if ${ac_cv_path_BUILD_CXX+:} false; then :
39985  $as_echo_n "(cached) " >&6
39986else
39987  case $BUILD_CXX in
39988  [\\/]* | ?:[\\/]*)
39989  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39990  ;;
39991  *)
39992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39993for as_dir in $PATH
39994do
39995  IFS=$as_save_IFS
39996  test -z "$as_dir" && as_dir=.
39997    for ac_exec_ext in '' $ac_executable_extensions; do
39998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39999    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40001    break 2
40002  fi
40003done
40004  done
40005IFS=$as_save_IFS
40006
40007  ;;
40008esac
40009fi
40010BUILD_CXX=$ac_cv_path_BUILD_CXX
40011if test -n "$BUILD_CXX"; then
40012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40013$as_echo "$BUILD_CXX" >&6; }
40014else
40015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40016$as_echo "no" >&6; }
40017fi
40018
40019
40020  test -n "$BUILD_CXX" && break
40021done
40022
40023    else
40024      # If it succeeded, then it was overridden by the user. We will use it
40025      # for the tool.
40026
40027      # First remove it from the list of overridden variables, so we can test
40028      # for unknown variables in the end.
40029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40030
40031      # Check if the provided tool contains a complete path.
40032      tool_specified="$BUILD_CXX"
40033      tool_basename="${tool_specified##*/}"
40034      if test "x$tool_basename" = "x$tool_specified"; then
40035        # A command without a complete path is provided, search $PATH.
40036        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40037$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40038        # Extract the first word of "$tool_basename", so it can be a program name with args.
40039set dummy $tool_basename; ac_word=$2
40040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40041$as_echo_n "checking for $ac_word... " >&6; }
40042if ${ac_cv_path_BUILD_CXX+:} false; then :
40043  $as_echo_n "(cached) " >&6
40044else
40045  case $BUILD_CXX in
40046  [\\/]* | ?:[\\/]*)
40047  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40048  ;;
40049  *)
40050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40051for as_dir in $PATH
40052do
40053  IFS=$as_save_IFS
40054  test -z "$as_dir" && as_dir=.
40055    for ac_exec_ext in '' $ac_executable_extensions; do
40056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40057    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40059    break 2
40060  fi
40061done
40062  done
40063IFS=$as_save_IFS
40064
40065  ;;
40066esac
40067fi
40068BUILD_CXX=$ac_cv_path_BUILD_CXX
40069if test -n "$BUILD_CXX"; then
40070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40071$as_echo "$BUILD_CXX" >&6; }
40072else
40073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40074$as_echo "no" >&6; }
40075fi
40076
40077
40078        if test "x$BUILD_CXX" = x; then
40079          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40080        fi
40081      else
40082        # Otherwise we believe it is a complete path. Use it as it is.
40083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40084$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40086$as_echo_n "checking for BUILD_CXX... " >&6; }
40087        if test ! -x "$tool_specified"; then
40088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40089$as_echo "not found" >&6; }
40090          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40091        fi
40092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40093$as_echo "$tool_specified" >&6; }
40094      fi
40095    fi
40096  fi
40097
40098
40099
40100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40101
40102  # First separate the path from the arguments. This will split at the first
40103  # space.
40104  complete="$BUILD_CXX"
40105  path="${complete%% *}"
40106  tmp="$complete EOL"
40107  arguments="${tmp#* }"
40108
40109  # Input might be given as Windows format, start by converting to
40110  # unix format.
40111  new_path=`$CYGPATH -u "$path"`
40112
40113  # Now try to locate executable using which
40114  new_path=`$WHICH "$new_path" 2> /dev/null`
40115  # bat and cmd files are not always considered executable in cygwin causing which
40116  # to not find them
40117  if test "x$new_path" = x \
40118      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40119      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40120    new_path=`$CYGPATH -u "$path"`
40121  fi
40122  if test "x$new_path" = x; then
40123    # Oops. Which didn't find the executable.
40124    # The splitting of arguments from the executable at a space might have been incorrect,
40125    # since paths with space are more likely in Windows. Give it another try with the whole
40126    # argument.
40127    path="$complete"
40128    arguments="EOL"
40129    new_path=`$CYGPATH -u "$path"`
40130    new_path=`$WHICH "$new_path" 2> /dev/null`
40131    # bat and cmd files are not always considered executable in cygwin causing which
40132    # to not find them
40133    if test "x$new_path" = x \
40134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40136      new_path=`$CYGPATH -u "$path"`
40137    fi
40138    if test "x$new_path" = x; then
40139      # It's still not found. Now this is an unrecoverable error.
40140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40141$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40142      has_space=`$ECHO "$complete" | $GREP " "`
40143      if test "x$has_space" != x; then
40144        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40145$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40146      fi
40147      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40148    fi
40149  fi
40150
40151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40154  # "foo.exe" is OK but "foo" is an error.
40155  #
40156  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40157  # It is also a way to make sure we got the proper file name for the real test later on.
40158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40159  if test "x$test_shortpath" = x; then
40160    # Short path failed, file does not exist as specified.
40161    # Try adding .exe or .cmd
40162    if test -f "${new_path}.exe"; then
40163      input_to_shortpath="${new_path}.exe"
40164    elif test -f "${new_path}.cmd"; then
40165      input_to_shortpath="${new_path}.cmd"
40166    else
40167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40168$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40169      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40170$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40171      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40172    fi
40173  else
40174    input_to_shortpath="$new_path"
40175  fi
40176
40177  # Call helper function which possibly converts this using DOS-style short mode.
40178  # If so, the updated path is stored in $new_path.
40179  new_path="$input_to_shortpath"
40180
40181  input_path="$input_to_shortpath"
40182  # Check if we need to convert this using DOS-style short mode. If the path
40183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40184  # take no chances and rewrite it.
40185  # Note: m4 eats our [], so we need to use [ and ] instead.
40186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40187  if test "x$has_forbidden_chars" != x; then
40188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40192      # Going to short mode and back again did indeed matter. Since short mode is
40193      # case insensitive, let's make it lowercase to improve readability.
40194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40195      # Now convert it back to Unix-stile (cygpath)
40196      input_path=`$CYGPATH -u "$shortmode_path"`
40197      new_path="$input_path"
40198    fi
40199  fi
40200
40201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40202  if test "x$test_cygdrive_prefix" = x; then
40203    # As a simple fix, exclude /usr/bin since it's not a real path.
40204    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40206      # a path prefixed by /cygdrive for fixpath to work.
40207      new_path="$CYGWIN_ROOT_PATH$input_path"
40208    fi
40209  fi
40210
40211  # remove trailing .exe if any
40212  new_path="${new_path/%.exe/}"
40213
40214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40215
40216  # First separate the path from the arguments. This will split at the first
40217  # space.
40218  complete="$BUILD_CXX"
40219  path="${complete%% *}"
40220  tmp="$complete EOL"
40221  arguments="${tmp#* }"
40222
40223  # Input might be given as Windows format, start by converting to
40224  # unix format.
40225  new_path="$path"
40226
40227  windows_path="$new_path"
40228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40229    unix_path=`$CYGPATH -u "$windows_path"`
40230    new_path="$unix_path"
40231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40233    new_path="$unix_path"
40234  fi
40235
40236
40237  # Now try to locate executable using which
40238  new_path=`$WHICH "$new_path" 2> /dev/null`
40239
40240  if test "x$new_path" = x; then
40241    # Oops. Which didn't find the executable.
40242    # The splitting of arguments from the executable at a space might have been incorrect,
40243    # since paths with space are more likely in Windows. Give it another try with the whole
40244    # argument.
40245    path="$complete"
40246    arguments="EOL"
40247    new_path="$path"
40248
40249  windows_path="$new_path"
40250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40251    unix_path=`$CYGPATH -u "$windows_path"`
40252    new_path="$unix_path"
40253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40255    new_path="$unix_path"
40256  fi
40257
40258
40259    new_path=`$WHICH "$new_path" 2> /dev/null`
40260    # bat and cmd files are not always considered executable in MSYS causing which
40261    # to not find them
40262    if test "x$new_path" = x \
40263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40265      new_path="$path"
40266
40267  windows_path="$new_path"
40268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40269    unix_path=`$CYGPATH -u "$windows_path"`
40270    new_path="$unix_path"
40271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40273    new_path="$unix_path"
40274  fi
40275
40276    fi
40277
40278    if test "x$new_path" = x; then
40279      # It's still not found. Now this is an unrecoverable error.
40280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40281$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40282      has_space=`$ECHO "$complete" | $GREP " "`
40283      if test "x$has_space" != x; then
40284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40286      fi
40287      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40288    fi
40289  fi
40290
40291  # Now new_path has a complete unix path to the binary
40292  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40293    # Keep paths in /bin as-is, but remove trailing .exe if any
40294    new_path="${new_path/%.exe/}"
40295    # Do not save /bin paths to all_fixpath_prefixes!
40296  else
40297    # Not in mixed or Windows style, start by that.
40298    new_path=`cmd //c echo $new_path`
40299
40300  input_path="$new_path"
40301  # Check if we need to convert this using DOS-style short mode. If the path
40302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40303  # take no chances and rewrite it.
40304  # Note: m4 eats our [], so we need to use [ and ] instead.
40305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40306  if test "x$has_forbidden_chars" != x; then
40307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40309  fi
40310
40311    # Output is in $new_path
40312
40313  windows_path="$new_path"
40314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40315    unix_path=`$CYGPATH -u "$windows_path"`
40316    new_path="$unix_path"
40317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40319    new_path="$unix_path"
40320  fi
40321
40322    # remove trailing .exe if any
40323    new_path="${new_path/%.exe/}"
40324
40325    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40326    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40327  fi
40328
40329  else
40330    # We're on a posix platform. Hooray! :)
40331    # First separate the path from the arguments. This will split at the first
40332    # space.
40333    complete="$BUILD_CXX"
40334    path="${complete%% *}"
40335    tmp="$complete EOL"
40336    arguments="${tmp#* }"
40337
40338    # Cannot rely on the command "which" here since it doesn't always work.
40339    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40340    if test -z "$is_absolute_path"; then
40341      # Path to executable is not absolute. Find it.
40342      IFS_save="$IFS"
40343      IFS=:
40344      for p in $PATH; do
40345        if test -f "$p/$path" && test -x "$p/$path"; then
40346          new_path="$p/$path"
40347          break
40348        fi
40349      done
40350      IFS="$IFS_save"
40351    else
40352      # This is an absolute path, we can use it without further modifications.
40353      new_path="$path"
40354    fi
40355
40356    if test "x$new_path" = x; then
40357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40358$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40359      has_space=`$ECHO "$complete" | $GREP " "`
40360      if test "x$has_space" != x; then
40361        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40362$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40363      fi
40364      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40365    fi
40366  fi
40367
40368  # Now join together the path and the arguments once again
40369  if test "x$arguments" != xEOL; then
40370    new_complete="$new_path ${arguments% *}"
40371  else
40372    new_complete="$new_path"
40373  fi
40374
40375  if test "x$complete" != "x$new_complete"; then
40376    BUILD_CXX="$new_complete"
40377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40378$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40379  fi
40380
40381
40382
40383  # Publish this variable in the help.
40384
40385
40386  if test "x$BUILD_LD" = x; then
40387    # The variable is not set by user, try to locate tool using the code snippet
40388    for ac_prog in ld
40389do
40390  # Extract the first word of "$ac_prog", so it can be a program name with args.
40391set dummy $ac_prog; ac_word=$2
40392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40393$as_echo_n "checking for $ac_word... " >&6; }
40394if ${ac_cv_path_BUILD_LD+:} false; then :
40395  $as_echo_n "(cached) " >&6
40396else
40397  case $BUILD_LD in
40398  [\\/]* | ?:[\\/]*)
40399  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40400  ;;
40401  *)
40402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40403for as_dir in $PATH
40404do
40405  IFS=$as_save_IFS
40406  test -z "$as_dir" && as_dir=.
40407    for ac_exec_ext in '' $ac_executable_extensions; do
40408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40409    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40411    break 2
40412  fi
40413done
40414  done
40415IFS=$as_save_IFS
40416
40417  ;;
40418esac
40419fi
40420BUILD_LD=$ac_cv_path_BUILD_LD
40421if test -n "$BUILD_LD"; then
40422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40423$as_echo "$BUILD_LD" >&6; }
40424else
40425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40426$as_echo "no" >&6; }
40427fi
40428
40429
40430  test -n "$BUILD_LD" && break
40431done
40432
40433  else
40434    # The variable is set, but is it from the command line or the environment?
40435
40436    # Try to remove the string !BUILD_LD! from our list.
40437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40439      # If it failed, the variable was not from the command line. Ignore it,
40440      # but warn the user (except for BASH, which is always set by the calling BASH).
40441      if test "xBUILD_LD" != xBASH; then
40442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40443$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40444      fi
40445      # Try to locate tool using the code snippet
40446      for ac_prog in ld
40447do
40448  # Extract the first word of "$ac_prog", so it can be a program name with args.
40449set dummy $ac_prog; ac_word=$2
40450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40451$as_echo_n "checking for $ac_word... " >&6; }
40452if ${ac_cv_path_BUILD_LD+:} false; then :
40453  $as_echo_n "(cached) " >&6
40454else
40455  case $BUILD_LD in
40456  [\\/]* | ?:[\\/]*)
40457  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40458  ;;
40459  *)
40460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40461for as_dir in $PATH
40462do
40463  IFS=$as_save_IFS
40464  test -z "$as_dir" && as_dir=.
40465    for ac_exec_ext in '' $ac_executable_extensions; do
40466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40467    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40469    break 2
40470  fi
40471done
40472  done
40473IFS=$as_save_IFS
40474
40475  ;;
40476esac
40477fi
40478BUILD_LD=$ac_cv_path_BUILD_LD
40479if test -n "$BUILD_LD"; then
40480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40481$as_echo "$BUILD_LD" >&6; }
40482else
40483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40484$as_echo "no" >&6; }
40485fi
40486
40487
40488  test -n "$BUILD_LD" && break
40489done
40490
40491    else
40492      # If it succeeded, then it was overridden by the user. We will use it
40493      # for the tool.
40494
40495      # First remove it from the list of overridden variables, so we can test
40496      # for unknown variables in the end.
40497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40498
40499      # Check if the provided tool contains a complete path.
40500      tool_specified="$BUILD_LD"
40501      tool_basename="${tool_specified##*/}"
40502      if test "x$tool_basename" = "x$tool_specified"; then
40503        # A command without a complete path is provided, search $PATH.
40504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40505$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40506        # Extract the first word of "$tool_basename", so it can be a program name with args.
40507set dummy $tool_basename; ac_word=$2
40508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40509$as_echo_n "checking for $ac_word... " >&6; }
40510if ${ac_cv_path_BUILD_LD+:} false; then :
40511  $as_echo_n "(cached) " >&6
40512else
40513  case $BUILD_LD in
40514  [\\/]* | ?:[\\/]*)
40515  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40516  ;;
40517  *)
40518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40519for as_dir in $PATH
40520do
40521  IFS=$as_save_IFS
40522  test -z "$as_dir" && as_dir=.
40523    for ac_exec_ext in '' $ac_executable_extensions; do
40524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40525    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40527    break 2
40528  fi
40529done
40530  done
40531IFS=$as_save_IFS
40532
40533  ;;
40534esac
40535fi
40536BUILD_LD=$ac_cv_path_BUILD_LD
40537if test -n "$BUILD_LD"; then
40538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40539$as_echo "$BUILD_LD" >&6; }
40540else
40541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40542$as_echo "no" >&6; }
40543fi
40544
40545
40546        if test "x$BUILD_LD" = x; then
40547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40548        fi
40549      else
40550        # Otherwise we believe it is a complete path. Use it as it is.
40551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40552$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40554$as_echo_n "checking for BUILD_LD... " >&6; }
40555        if test ! -x "$tool_specified"; then
40556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40557$as_echo "not found" >&6; }
40558          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40559        fi
40560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40561$as_echo "$tool_specified" >&6; }
40562      fi
40563    fi
40564  fi
40565
40566
40567
40568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40569
40570  # First separate the path from the arguments. This will split at the first
40571  # space.
40572  complete="$BUILD_LD"
40573  path="${complete%% *}"
40574  tmp="$complete EOL"
40575  arguments="${tmp#* }"
40576
40577  # Input might be given as Windows format, start by converting to
40578  # unix format.
40579  new_path=`$CYGPATH -u "$path"`
40580
40581  # Now try to locate executable using which
40582  new_path=`$WHICH "$new_path" 2> /dev/null`
40583  # bat and cmd files are not always considered executable in cygwin causing which
40584  # to not find them
40585  if test "x$new_path" = x \
40586      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40587      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40588    new_path=`$CYGPATH -u "$path"`
40589  fi
40590  if test "x$new_path" = x; then
40591    # Oops. Which didn't find the executable.
40592    # The splitting of arguments from the executable at a space might have been incorrect,
40593    # since paths with space are more likely in Windows. Give it another try with the whole
40594    # argument.
40595    path="$complete"
40596    arguments="EOL"
40597    new_path=`$CYGPATH -u "$path"`
40598    new_path=`$WHICH "$new_path" 2> /dev/null`
40599    # bat and cmd files are not always considered executable in cygwin causing which
40600    # to not find them
40601    if test "x$new_path" = x \
40602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40604      new_path=`$CYGPATH -u "$path"`
40605    fi
40606    if test "x$new_path" = x; then
40607      # It's still not found. Now this is an unrecoverable error.
40608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40609$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40610      has_space=`$ECHO "$complete" | $GREP " "`
40611      if test "x$has_space" != x; then
40612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40614      fi
40615      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40616    fi
40617  fi
40618
40619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40622  # "foo.exe" is OK but "foo" is an error.
40623  #
40624  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40625  # It is also a way to make sure we got the proper file name for the real test later on.
40626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40627  if test "x$test_shortpath" = x; then
40628    # Short path failed, file does not exist as specified.
40629    # Try adding .exe or .cmd
40630    if test -f "${new_path}.exe"; then
40631      input_to_shortpath="${new_path}.exe"
40632    elif test -f "${new_path}.cmd"; then
40633      input_to_shortpath="${new_path}.cmd"
40634    else
40635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40636$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40637      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40638$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40639      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40640    fi
40641  else
40642    input_to_shortpath="$new_path"
40643  fi
40644
40645  # Call helper function which possibly converts this using DOS-style short mode.
40646  # If so, the updated path is stored in $new_path.
40647  new_path="$input_to_shortpath"
40648
40649  input_path="$input_to_shortpath"
40650  # Check if we need to convert this using DOS-style short mode. If the path
40651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40652  # take no chances and rewrite it.
40653  # Note: m4 eats our [], so we need to use [ and ] instead.
40654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40655  if test "x$has_forbidden_chars" != x; then
40656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40660      # Going to short mode and back again did indeed matter. Since short mode is
40661      # case insensitive, let's make it lowercase to improve readability.
40662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40663      # Now convert it back to Unix-stile (cygpath)
40664      input_path=`$CYGPATH -u "$shortmode_path"`
40665      new_path="$input_path"
40666    fi
40667  fi
40668
40669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40670  if test "x$test_cygdrive_prefix" = x; then
40671    # As a simple fix, exclude /usr/bin since it's not a real path.
40672    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40674      # a path prefixed by /cygdrive for fixpath to work.
40675      new_path="$CYGWIN_ROOT_PATH$input_path"
40676    fi
40677  fi
40678
40679  # remove trailing .exe if any
40680  new_path="${new_path/%.exe/}"
40681
40682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40683
40684  # First separate the path from the arguments. This will split at the first
40685  # space.
40686  complete="$BUILD_LD"
40687  path="${complete%% *}"
40688  tmp="$complete EOL"
40689  arguments="${tmp#* }"
40690
40691  # Input might be given as Windows format, start by converting to
40692  # unix format.
40693  new_path="$path"
40694
40695  windows_path="$new_path"
40696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40697    unix_path=`$CYGPATH -u "$windows_path"`
40698    new_path="$unix_path"
40699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40701    new_path="$unix_path"
40702  fi
40703
40704
40705  # Now try to locate executable using which
40706  new_path=`$WHICH "$new_path" 2> /dev/null`
40707
40708  if test "x$new_path" = x; then
40709    # Oops. Which didn't find the executable.
40710    # The splitting of arguments from the executable at a space might have been incorrect,
40711    # since paths with space are more likely in Windows. Give it another try with the whole
40712    # argument.
40713    path="$complete"
40714    arguments="EOL"
40715    new_path="$path"
40716
40717  windows_path="$new_path"
40718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40719    unix_path=`$CYGPATH -u "$windows_path"`
40720    new_path="$unix_path"
40721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40723    new_path="$unix_path"
40724  fi
40725
40726
40727    new_path=`$WHICH "$new_path" 2> /dev/null`
40728    # bat and cmd files are not always considered executable in MSYS causing which
40729    # to not find them
40730    if test "x$new_path" = x \
40731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40733      new_path="$path"
40734
40735  windows_path="$new_path"
40736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40737    unix_path=`$CYGPATH -u "$windows_path"`
40738    new_path="$unix_path"
40739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40741    new_path="$unix_path"
40742  fi
40743
40744    fi
40745
40746    if test "x$new_path" = x; then
40747      # It's still not found. Now this is an unrecoverable error.
40748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40749$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40750      has_space=`$ECHO "$complete" | $GREP " "`
40751      if test "x$has_space" != x; then
40752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40754      fi
40755      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40756    fi
40757  fi
40758
40759  # Now new_path has a complete unix path to the binary
40760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40761    # Keep paths in /bin as-is, but remove trailing .exe if any
40762    new_path="${new_path/%.exe/}"
40763    # Do not save /bin paths to all_fixpath_prefixes!
40764  else
40765    # Not in mixed or Windows style, start by that.
40766    new_path=`cmd //c echo $new_path`
40767
40768  input_path="$new_path"
40769  # Check if we need to convert this using DOS-style short mode. If the path
40770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40771  # take no chances and rewrite it.
40772  # Note: m4 eats our [], so we need to use [ and ] instead.
40773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40774  if test "x$has_forbidden_chars" != x; then
40775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40777  fi
40778
40779    # Output is in $new_path
40780
40781  windows_path="$new_path"
40782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40783    unix_path=`$CYGPATH -u "$windows_path"`
40784    new_path="$unix_path"
40785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40787    new_path="$unix_path"
40788  fi
40789
40790    # remove trailing .exe if any
40791    new_path="${new_path/%.exe/}"
40792
40793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40795  fi
40796
40797  else
40798    # We're on a posix platform. Hooray! :)
40799    # First separate the path from the arguments. This will split at the first
40800    # space.
40801    complete="$BUILD_LD"
40802    path="${complete%% *}"
40803    tmp="$complete EOL"
40804    arguments="${tmp#* }"
40805
40806    # Cannot rely on the command "which" here since it doesn't always work.
40807    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40808    if test -z "$is_absolute_path"; then
40809      # Path to executable is not absolute. Find it.
40810      IFS_save="$IFS"
40811      IFS=:
40812      for p in $PATH; do
40813        if test -f "$p/$path" && test -x "$p/$path"; then
40814          new_path="$p/$path"
40815          break
40816        fi
40817      done
40818      IFS="$IFS_save"
40819    else
40820      # This is an absolute path, we can use it without further modifications.
40821      new_path="$path"
40822    fi
40823
40824    if test "x$new_path" = x; then
40825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40826$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40827      has_space=`$ECHO "$complete" | $GREP " "`
40828      if test "x$has_space" != x; then
40829        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40831      fi
40832      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40833    fi
40834  fi
40835
40836  # Now join together the path and the arguments once again
40837  if test "x$arguments" != xEOL; then
40838    new_complete="$new_path ${arguments% *}"
40839  else
40840    new_complete="$new_path"
40841  fi
40842
40843  if test "x$complete" != "x$new_complete"; then
40844    BUILD_LD="$new_complete"
40845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40846$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40847  fi
40848
40849  else
40850    # If we are not cross compiling, use the normal target compilers for
40851    # building the build platform executables.
40852    BUILD_CC="$CC"
40853    BUILD_CXX="$CXX"
40854    BUILD_LD="$LD"
40855  fi
40856
40857
40858
40859
40860
40861
40862  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40863    # For hotspot, we need these in Windows mixed path,
40864    # so rewrite them all. Need added .exe suffix.
40865    HOTSPOT_CXX="$CXX.exe"
40866    HOTSPOT_LD="$LD.exe"
40867    HOTSPOT_MT="$MT.exe"
40868    HOTSPOT_RC="$RC.exe"
40869
40870  unix_path="$HOTSPOT_CXX"
40871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40872    windows_path=`$CYGPATH -m "$unix_path"`
40873    HOTSPOT_CXX="$windows_path"
40874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40875    windows_path=`cmd //c echo $unix_path`
40876    HOTSPOT_CXX="$windows_path"
40877  fi
40878
40879
40880  unix_path="$HOTSPOT_LD"
40881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40882    windows_path=`$CYGPATH -m "$unix_path"`
40883    HOTSPOT_LD="$windows_path"
40884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40885    windows_path=`cmd //c echo $unix_path`
40886    HOTSPOT_LD="$windows_path"
40887  fi
40888
40889
40890  unix_path="$HOTSPOT_MT"
40891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40892    windows_path=`$CYGPATH -m "$unix_path"`
40893    HOTSPOT_MT="$windows_path"
40894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40895    windows_path=`cmd //c echo $unix_path`
40896    HOTSPOT_MT="$windows_path"
40897  fi
40898
40899
40900  unix_path="$HOTSPOT_RC"
40901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40902    windows_path=`$CYGPATH -m "$unix_path"`
40903    HOTSPOT_RC="$windows_path"
40904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40905    windows_path=`cmd //c echo $unix_path`
40906    HOTSPOT_RC="$windows_path"
40907  fi
40908
40909
40910
40911  else
40912    HOTSPOT_CXX="$CXX"
40913    HOTSPOT_LD="$LD"
40914  fi
40915
40916
40917
40918  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40919    USE_CLANG=true
40920  fi
40921
40922
40923  # LDEXE is the linker to use, when creating executables. Not really used.
40924  # FIXME: These should just be removed!
40925  LDEXE="$LD"
40926  LDEXECXX="$LDCXX"
40927
40928
40929
40930
40931
40932
40933  # The package path is used only on macosx?
40934  # FIXME: clean this up, and/or move it elsewhere.
40935  PACKAGE_PATH=/opt/local
40936
40937
40938  # Check for extra potential brokenness.
40939  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40940    # On Windows, double-check that we got the right compiler.
40941    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40942    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40943    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40944      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40945        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40946      fi
40947    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40948      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40949        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40950      fi
40951    fi
40952  fi
40953
40954  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40955    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40956    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40957    # This is later checked when setting flags.
40958
40959    # "-Og" suppported for GCC 4.8 and later
40960    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40961
40962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40963$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40964  supports=yes
40965
40966  saved_cflags="$CFLAGS"
40967  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40968  ac_ext=c
40969ac_cpp='$CPP $CPPFLAGS'
40970ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40971ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40972ac_compiler_gnu=$ac_cv_c_compiler_gnu
40973
40974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40975/* end confdefs.h.  */
40976int i;
40977_ACEOF
40978if ac_fn_c_try_compile "$LINENO"; then :
40979
40980else
40981  supports=no
40982fi
40983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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  CFLAGS="$saved_cflags"
40991
40992  saved_cxxflags="$CXXFLAGS"
40993  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40994  ac_ext=cpp
40995ac_cpp='$CXXCPP $CPPFLAGS'
40996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40999
41000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41001/* end confdefs.h.  */
41002int i;
41003_ACEOF
41004if ac_fn_cxx_try_compile "$LINENO"; then :
41005
41006else
41007  supports=no
41008fi
41009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41010  ac_ext=cpp
41011ac_cpp='$CXXCPP $CPPFLAGS'
41012ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41013ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41014ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41015
41016  CXXFLAGS="$saved_cxxflags"
41017
41018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41019$as_echo "$supports" >&6; }
41020  if test "x$supports" = "xyes" ; then
41021    HAS_CFLAG_OPTIMIZE_DEBUG=true
41022  else
41023    HAS_CFLAG_OPTIMIZE_DEBUG=false
41024  fi
41025
41026
41027    # "-fsanitize=undefined" supported for GCC 4.9 and later
41028    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
41029
41030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
41031$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
41032  supports=yes
41033
41034  saved_cflags="$CFLAGS"
41035  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41036  ac_ext=c
41037ac_cpp='$CPP $CPPFLAGS'
41038ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41039ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41040ac_compiler_gnu=$ac_cv_c_compiler_gnu
41041
41042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41043/* end confdefs.h.  */
41044int i;
41045_ACEOF
41046if ac_fn_c_try_compile "$LINENO"; then :
41047
41048else
41049  supports=no
41050fi
41051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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  CFLAGS="$saved_cflags"
41059
41060  saved_cxxflags="$CXXFLAGS"
41061  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41062  ac_ext=cpp
41063ac_cpp='$CXXCPP $CPPFLAGS'
41064ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41065ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41066ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41067
41068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41069/* end confdefs.h.  */
41070int i;
41071_ACEOF
41072if ac_fn_cxx_try_compile "$LINENO"; then :
41073
41074else
41075  supports=no
41076fi
41077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41078  ac_ext=cpp
41079ac_cpp='$CXXCPP $CPPFLAGS'
41080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41083
41084  CXXFLAGS="$saved_cxxflags"
41085
41086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41087$as_echo "$supports" >&6; }
41088  if test "x$supports" = "xyes" ; then
41089    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
41090  else
41091    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
41092  fi
41093
41094
41095    # "-z relro" supported in GNU binutils 2.17 and later
41096    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41097
41098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41099$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41100  supports=yes
41101
41102  saved_ldflags="$LDFLAGS"
41103  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41104  ac_ext=c
41105ac_cpp='$CPP $CPPFLAGS'
41106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41108ac_compiler_gnu=$ac_cv_c_compiler_gnu
41109
41110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41111/* end confdefs.h.  */
41112
41113int
41114main ()
41115{
41116
41117  ;
41118  return 0;
41119}
41120_ACEOF
41121if ac_fn_c_try_link "$LINENO"; then :
41122
41123else
41124  supports=no
41125fi
41126rm -f core conftest.err conftest.$ac_objext \
41127    conftest$ac_exeext conftest.$ac_ext
41128  ac_ext=cpp
41129ac_cpp='$CXXCPP $CPPFLAGS'
41130ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41131ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41132ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41133
41134  LDFLAGS="$saved_ldflags"
41135
41136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41137$as_echo "$supports" >&6; }
41138  if test "x$supports" = "xyes" ; then
41139    HAS_LINKER_RELRO=true
41140  else
41141    HAS_LINKER_RELRO=false
41142  fi
41143
41144
41145    # "-z now" supported in GNU binutils 2.11 and later
41146    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41147
41148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41149$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41150  supports=yes
41151
41152  saved_ldflags="$LDFLAGS"
41153  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41154  ac_ext=c
41155ac_cpp='$CPP $CPPFLAGS'
41156ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41157ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41158ac_compiler_gnu=$ac_cv_c_compiler_gnu
41159
41160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41161/* end confdefs.h.  */
41162
41163int
41164main ()
41165{
41166
41167  ;
41168  return 0;
41169}
41170_ACEOF
41171if ac_fn_c_try_link "$LINENO"; then :
41172
41173else
41174  supports=no
41175fi
41176rm -f core conftest.err conftest.$ac_objext \
41177    conftest$ac_exeext conftest.$ac_ext
41178  ac_ext=cpp
41179ac_cpp='$CXXCPP $CPPFLAGS'
41180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41183
41184  LDFLAGS="$saved_ldflags"
41185
41186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41187$as_echo "$supports" >&6; }
41188  if test "x$supports" = "xyes" ; then
41189    HAS_LINKER_NOW=true
41190  else
41191    HAS_LINKER_NOW=false
41192  fi
41193
41194  fi
41195
41196  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41197  # in executable.'
41198  USING_BROKEN_SUSE_LD=no
41199  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41201$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41202    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41203    $ECHO "int main() { }" > main.c
41204    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41206$as_echo "no" >&6; }
41207      USING_BROKEN_SUSE_LD=no
41208    else
41209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41210$as_echo "yes" >&6; }
41211      USING_BROKEN_SUSE_LD=yes
41212    fi
41213    rm -rf version-script.map main.c a.out
41214  fi
41215
41216
41217
41218# Setup the JTReg Regression Test Harness.
41219
41220
41221# Check whether --with-jtreg was given.
41222if test "${with_jtreg+set}" = set; then :
41223  withval=$with_jtreg;
41224else
41225  with_jtreg=no
41226fi
41227
41228
41229  if test "x$with_jtreg" = xno; then
41230    # jtreg disabled
41231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41232$as_echo_n "checking for jtreg... " >&6; }
41233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41234$as_echo "no" >&6; }
41235  else
41236    if test "x$with_jtreg" != xyes; then
41237      # with path specified.
41238      JT_HOME="$with_jtreg"
41239    fi
41240
41241    if test "x$JT_HOME" != x; then
41242      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41243$as_echo_n "checking for jtreg... " >&6; }
41244
41245      # use JT_HOME enviroment var.
41246
41247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41248
41249  # Input might be given as Windows format, start by converting to
41250  # unix format.
41251  path="$JT_HOME"
41252  new_path=`$CYGPATH -u "$path"`
41253
41254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41257  # "foo.exe" is OK but "foo" is an error.
41258  #
41259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41260  # It is also a way to make sure we got the proper file name for the real test later on.
41261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41262  if test "x$test_shortpath" = x; then
41263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41264$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41265    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41266  fi
41267
41268  # Call helper function which possibly converts this using DOS-style short mode.
41269  # If so, the updated path is stored in $new_path.
41270
41271  input_path="$new_path"
41272  # Check if we need to convert this using DOS-style short mode. If the path
41273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41274  # take no chances and rewrite it.
41275  # Note: m4 eats our [], so we need to use [ and ] instead.
41276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41277  if test "x$has_forbidden_chars" != x; then
41278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41282      # Going to short mode and back again did indeed matter. Since short mode is
41283      # case insensitive, let's make it lowercase to improve readability.
41284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41285      # Now convert it back to Unix-stile (cygpath)
41286      input_path=`$CYGPATH -u "$shortmode_path"`
41287      new_path="$input_path"
41288    fi
41289  fi
41290
41291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41292  if test "x$test_cygdrive_prefix" = x; then
41293    # As a simple fix, exclude /usr/bin since it's not a real path.
41294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41296      # a path prefixed by /cygdrive for fixpath to work.
41297      new_path="$CYGWIN_ROOT_PATH$input_path"
41298    fi
41299  fi
41300
41301
41302  if test "x$path" != "x$new_path"; then
41303    JT_HOME="$new_path"
41304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41305$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41306  fi
41307
41308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41309
41310  path="$JT_HOME"
41311  has_colon=`$ECHO $path | $GREP ^.:`
41312  new_path="$path"
41313  if test "x$has_colon" = x; then
41314    # Not in mixed or Windows style, start by that.
41315    new_path=`cmd //c echo $path`
41316  fi
41317
41318
41319  input_path="$new_path"
41320  # Check if we need to convert this using DOS-style short mode. If the path
41321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41322  # take no chances and rewrite it.
41323  # Note: m4 eats our [], so we need to use [ and ] instead.
41324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41325  if test "x$has_forbidden_chars" != x; then
41326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41328  fi
41329
41330
41331  windows_path="$new_path"
41332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41333    unix_path=`$CYGPATH -u "$windows_path"`
41334    new_path="$unix_path"
41335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41337    new_path="$unix_path"
41338  fi
41339
41340  if test "x$path" != "x$new_path"; then
41341    JT_HOME="$new_path"
41342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41343$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41344  fi
41345
41346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41348
41349  else
41350    # We're on a posix platform. Hooray! :)
41351    path="$JT_HOME"
41352    has_space=`$ECHO "$path" | $GREP " "`
41353    if test "x$has_space" != x; then
41354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41355$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41356      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41357    fi
41358
41359    # Use eval to expand a potential ~
41360    eval path="$path"
41361    if test ! -f "$path" && test ! -d "$path"; then
41362      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41363    fi
41364
41365    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41366  fi
41367
41368
41369      # jtreg win32 script works for everybody
41370      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41371
41372      if test ! -f "$JTREGEXE"; then
41373        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41374      fi
41375
41376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41377$as_echo "$JTREGEXE" >&6; }
41378    else
41379      # try to find jtreg on path
41380
41381
41382
41383  # Publish this variable in the help.
41384
41385
41386  if test "x$JTREGEXE" = x; then
41387    # The variable is not set by user, try to locate tool using the code snippet
41388    for ac_prog in jtreg
41389do
41390  # Extract the first word of "$ac_prog", so it can be a program name with args.
41391set dummy $ac_prog; ac_word=$2
41392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41393$as_echo_n "checking for $ac_word... " >&6; }
41394if ${ac_cv_path_JTREGEXE+:} false; then :
41395  $as_echo_n "(cached) " >&6
41396else
41397  case $JTREGEXE in
41398  [\\/]* | ?:[\\/]*)
41399  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41400  ;;
41401  *)
41402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41403for as_dir in $PATH
41404do
41405  IFS=$as_save_IFS
41406  test -z "$as_dir" && as_dir=.
41407    for ac_exec_ext in '' $ac_executable_extensions; do
41408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41409    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41411    break 2
41412  fi
41413done
41414  done
41415IFS=$as_save_IFS
41416
41417  ;;
41418esac
41419fi
41420JTREGEXE=$ac_cv_path_JTREGEXE
41421if test -n "$JTREGEXE"; then
41422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41423$as_echo "$JTREGEXE" >&6; }
41424else
41425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41426$as_echo "no" >&6; }
41427fi
41428
41429
41430  test -n "$JTREGEXE" && break
41431done
41432
41433  else
41434    # The variable is set, but is it from the command line or the environment?
41435
41436    # Try to remove the string !JTREGEXE! from our list.
41437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41439      # If it failed, the variable was not from the command line. Ignore it,
41440      # but warn the user (except for BASH, which is always set by the calling BASH).
41441      if test "xJTREGEXE" != xBASH; then
41442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41443$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41444      fi
41445      # Try to locate tool using the code snippet
41446      for ac_prog in jtreg
41447do
41448  # Extract the first word of "$ac_prog", so it can be a program name with args.
41449set dummy $ac_prog; ac_word=$2
41450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41451$as_echo_n "checking for $ac_word... " >&6; }
41452if ${ac_cv_path_JTREGEXE+:} false; then :
41453  $as_echo_n "(cached) " >&6
41454else
41455  case $JTREGEXE in
41456  [\\/]* | ?:[\\/]*)
41457  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41458  ;;
41459  *)
41460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41461for as_dir in $PATH
41462do
41463  IFS=$as_save_IFS
41464  test -z "$as_dir" && as_dir=.
41465    for ac_exec_ext in '' $ac_executable_extensions; do
41466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41467    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41469    break 2
41470  fi
41471done
41472  done
41473IFS=$as_save_IFS
41474
41475  ;;
41476esac
41477fi
41478JTREGEXE=$ac_cv_path_JTREGEXE
41479if test -n "$JTREGEXE"; then
41480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41481$as_echo "$JTREGEXE" >&6; }
41482else
41483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41484$as_echo "no" >&6; }
41485fi
41486
41487
41488  test -n "$JTREGEXE" && break
41489done
41490
41491    else
41492      # If it succeeded, then it was overridden by the user. We will use it
41493      # for the tool.
41494
41495      # First remove it from the list of overridden variables, so we can test
41496      # for unknown variables in the end.
41497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41498
41499      # Check if the provided tool contains a complete path.
41500      tool_specified="$JTREGEXE"
41501      tool_basename="${tool_specified##*/}"
41502      if test "x$tool_basename" = "x$tool_specified"; then
41503        # A command without a complete path is provided, search $PATH.
41504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41505$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41506        # Extract the first word of "$tool_basename", so it can be a program name with args.
41507set dummy $tool_basename; ac_word=$2
41508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41509$as_echo_n "checking for $ac_word... " >&6; }
41510if ${ac_cv_path_JTREGEXE+:} false; then :
41511  $as_echo_n "(cached) " >&6
41512else
41513  case $JTREGEXE in
41514  [\\/]* | ?:[\\/]*)
41515  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41516  ;;
41517  *)
41518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41519for as_dir in $PATH
41520do
41521  IFS=$as_save_IFS
41522  test -z "$as_dir" && as_dir=.
41523    for ac_exec_ext in '' $ac_executable_extensions; do
41524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41525    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41527    break 2
41528  fi
41529done
41530  done
41531IFS=$as_save_IFS
41532
41533  ;;
41534esac
41535fi
41536JTREGEXE=$ac_cv_path_JTREGEXE
41537if test -n "$JTREGEXE"; then
41538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41539$as_echo "$JTREGEXE" >&6; }
41540else
41541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41542$as_echo "no" >&6; }
41543fi
41544
41545
41546        if test "x$JTREGEXE" = x; then
41547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41548        fi
41549      else
41550        # Otherwise we believe it is a complete path. Use it as it is.
41551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41552$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41554$as_echo_n "checking for JTREGEXE... " >&6; }
41555        if test ! -x "$tool_specified"; then
41556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41557$as_echo "not found" >&6; }
41558          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41559        fi
41560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41561$as_echo "$tool_specified" >&6; }
41562      fi
41563    fi
41564  fi
41565
41566
41567
41568  if test "x$JTREGEXE" = x; then
41569    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41570  fi
41571
41572
41573      JT_HOME="`$DIRNAME $JTREGEXE`"
41574    fi
41575  fi
41576
41577
41578
41579
41580
41581
41582  # Option used to tell the compiler whether to create 32- or 64-bit executables
41583  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41584    COMPILER_TARGET_BITS_FLAG="-q"
41585  else
41586    COMPILER_TARGET_BITS_FLAG="-m"
41587  fi
41588
41589
41590  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41591  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41592    ARFLAGS="-r"
41593  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41594    ARFLAGS="-X64"
41595  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41596    # lib.exe is used as AR to create static libraries.
41597    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41598  else
41599    ARFLAGS=""
41600  fi
41601
41602
41603  ## Setup strip.
41604  # FIXME: should this really be per platform, or should it be per toolchain type?
41605  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41606  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41607  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41608    STRIPFLAGS="-g"
41609  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41610    STRIPFLAGS="-x"
41611  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41612    STRIPFLAGS="-S"
41613  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41614    STRIPFLAGS="-X32_64"
41615  fi
41616
41617  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41618    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41619  fi
41620
41621
41622  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41623    # FIXME: break out into MCSFLAGS
41624    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41625  fi
41626
41627
41628  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41629    CC_OUT_OPTION=-Fo
41630    EXE_OUT_OPTION=-out:
41631    LD_OUT_OPTION=-out:
41632    AR_OUT_OPTION=-out:
41633  else
41634    # The option used to specify the target .o,.a or .so file.
41635    # When compiling, how to specify the to be created object file.
41636    CC_OUT_OPTION='-o$(SPACE)'
41637    # When linking, how to specify the to be created executable.
41638    EXE_OUT_OPTION='-o$(SPACE)'
41639    # When linking, how to specify the to be created dynamically linkable library.
41640    LD_OUT_OPTION='-o$(SPACE)'
41641    # When archiving, how to specify the to be create static archive for object files.
41642    AR_OUT_OPTION='rcs$(SPACE)'
41643  fi
41644
41645
41646
41647
41648
41649  # On Windows, we need to set RC flags.
41650  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41651    RC_FLAGS="-nologo -l 0x409 -r"
41652    if test "x$VARIANT" = xOPT; then
41653      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41654    fi
41655
41656    # The version variables used to create RC_FLAGS may be overridden
41657    # in a custom configure script, or possibly the command line.
41658    # Let those variables be expanded at make time in spec.gmk.
41659    # The \$ are escaped to the shell, and the $(...) variables
41660    # are evaluated by make.
41661    RC_FLAGS="$RC_FLAGS \
41662        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41663        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41664        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41665        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41666        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41667        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41668        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41669  fi
41670
41671
41672  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41673    # silence copyright notice and other headers.
41674    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41675  fi
41676
41677  if test "x$SYSROOT" != "x"; then
41678    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41679      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41680        # Solaris Studio does not have a concept of sysroot. Instead we must
41681        # make sure the default include and lib dirs are appended to each
41682        # compile and link command line.
41683        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41684        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41685            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41686            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41687      fi
41688    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41689      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41690      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41691      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41692    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41693      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41694      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41695    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41696      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41697      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41698    fi
41699    # Propagate the sysroot args to hotspot
41700    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41701    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41702    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41703  fi
41704
41705  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41706  # set this here so it doesn't have to be peppered throughout the forest
41707  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41708    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41709    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41710  fi
41711
41712
41713
41714
41715
41716# FIXME: Currently we must test this after toolchain but before flags. Fix!
41717
41718# Now we can test some aspects on the target using configure macros.
41719
41720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41721$as_echo_n "checking for ANSI C header files... " >&6; }
41722if ${ac_cv_header_stdc+:} false; then :
41723  $as_echo_n "(cached) " >&6
41724else
41725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41726/* end confdefs.h.  */
41727#include <stdlib.h>
41728#include <stdarg.h>
41729#include <string.h>
41730#include <float.h>
41731
41732int
41733main ()
41734{
41735
41736  ;
41737  return 0;
41738}
41739_ACEOF
41740if ac_fn_cxx_try_compile "$LINENO"; then :
41741  ac_cv_header_stdc=yes
41742else
41743  ac_cv_header_stdc=no
41744fi
41745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41746
41747if test $ac_cv_header_stdc = yes; then
41748  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41750/* end confdefs.h.  */
41751#include <string.h>
41752
41753_ACEOF
41754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41755  $EGREP "memchr" >/dev/null 2>&1; then :
41756
41757else
41758  ac_cv_header_stdc=no
41759fi
41760rm -f conftest*
41761
41762fi
41763
41764if test $ac_cv_header_stdc = yes; then
41765  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41767/* end confdefs.h.  */
41768#include <stdlib.h>
41769
41770_ACEOF
41771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41772  $EGREP "free" >/dev/null 2>&1; then :
41773
41774else
41775  ac_cv_header_stdc=no
41776fi
41777rm -f conftest*
41778
41779fi
41780
41781if test $ac_cv_header_stdc = yes; then
41782  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41783  if test "$cross_compiling" = yes; then :
41784  :
41785else
41786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41787/* end confdefs.h.  */
41788#include <ctype.h>
41789#include <stdlib.h>
41790#if ((' ' & 0x0FF) == 0x020)
41791# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41792# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41793#else
41794# define ISLOWER(c) \
41795		   (('a' <= (c) && (c) <= 'i') \
41796		     || ('j' <= (c) && (c) <= 'r') \
41797		     || ('s' <= (c) && (c) <= 'z'))
41798# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41799#endif
41800
41801#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41802int
41803main ()
41804{
41805  int i;
41806  for (i = 0; i < 256; i++)
41807    if (XOR (islower (i), ISLOWER (i))
41808	|| toupper (i) != TOUPPER (i))
41809      return 2;
41810  return 0;
41811}
41812_ACEOF
41813if ac_fn_cxx_try_run "$LINENO"; then :
41814
41815else
41816  ac_cv_header_stdc=no
41817fi
41818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41819  conftest.$ac_objext conftest.beam conftest.$ac_ext
41820fi
41821
41822fi
41823fi
41824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41825$as_echo "$ac_cv_header_stdc" >&6; }
41826if test $ac_cv_header_stdc = yes; then
41827
41828$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41829
41830fi
41831
41832# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41833for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41834		  inttypes.h stdint.h unistd.h
41835do :
41836  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41837ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41838"
41839if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41840  cat >>confdefs.h <<_ACEOF
41841#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41842_ACEOF
41843
41844fi
41845
41846done
41847
41848
41849
41850  ###############################################################################
41851  #
41852  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41853  # (The JVM can use 32 or 64 bit Java pointers but that decision
41854  # is made at runtime.)
41855  #
41856
41857  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41858    # Always specify -m flag on Solaris
41859    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41860
41861  # When we add flags to the "official" CFLAGS etc, we need to
41862  # keep track of these additions in ADDED_CFLAGS etc. These
41863  # will later be checked to make sure only controlled additions
41864  # have been made to CFLAGS etc.
41865  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41866  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41867  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41868
41869  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41870  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41871  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41872
41873  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41874  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41875  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41876
41877  elif test "x$COMPILE_TYPE" = xreduced; then
41878    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41879      # Specify -m if running reduced on other Posix platforms
41880
41881  # When we add flags to the "official" CFLAGS etc, we need to
41882  # keep track of these additions in ADDED_CFLAGS etc. These
41883  # will later be checked to make sure only controlled additions
41884  # have been made to CFLAGS etc.
41885  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41886  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41887  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41888
41889  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41890  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41891  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41892
41893  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41894  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41895  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41896
41897    fi
41898  fi
41899
41900  # Make compilation sanity check
41901  for ac_header in stdio.h
41902do :
41903  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41904if test "x$ac_cv_header_stdio_h" = xyes; then :
41905  cat >>confdefs.h <<_ACEOF
41906#define HAVE_STDIO_H 1
41907_ACEOF
41908
41909else
41910
41911    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41912$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41913    if test "x$COMPILE_TYPE" = xreduced; then
41914      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41915$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41916    elif test "x$COMPILE_TYPE" = xcross; then
41917      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41918$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41919    fi
41920    as_fn_error $? "Cannot continue." "$LINENO" 5
41921
41922fi
41923
41924done
41925
41926
41927  # The cast to long int works around a bug in the HP C Compiler
41928# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41929# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41930# This bug is HP SR number 8606223364.
41931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41932$as_echo_n "checking size of int *... " >&6; }
41933if ${ac_cv_sizeof_int_p+:} false; then :
41934  $as_echo_n "(cached) " >&6
41935else
41936  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41937
41938else
41939  if test "$ac_cv_type_int_p" = yes; then
41940     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41941$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41942as_fn_error 77 "cannot compute sizeof (int *)
41943See \`config.log' for more details" "$LINENO" 5; }
41944   else
41945     ac_cv_sizeof_int_p=0
41946   fi
41947fi
41948
41949fi
41950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41951$as_echo "$ac_cv_sizeof_int_p" >&6; }
41952
41953
41954
41955cat >>confdefs.h <<_ACEOF
41956#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41957_ACEOF
41958
41959
41960
41961  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41962  if test "x$ac_cv_sizeof_int_p" = x; then
41963    # The test failed, lets stick to the assumed value.
41964    { $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
41965$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41966  else
41967    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41968
41969    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41970      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41971      # Let's try to implicitely set the compilers target architecture and retry the test
41972      { $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
41973$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;}
41974      { $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
41975$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;}
41976
41977  # When we add flags to the "official" CFLAGS etc, we need to
41978  # keep track of these additions in ADDED_CFLAGS etc. These
41979  # will later be checked to make sure only controlled additions
41980  # have been made to CFLAGS etc.
41981  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41982  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41983  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41984
41985  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41986  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41987  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41988
41989  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41990  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41991  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41992
41993
41994      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41995      unset ac_cv_sizeof_int_p
41996      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41997      cat >>confdefs.h <<_ACEOF
41998#undef SIZEOF_INT_P
41999_ACEOF
42000
42001      # The cast to long int works around a bug in the HP C Compiler
42002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42004# This bug is HP SR number 8606223364.
42005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42006$as_echo_n "checking size of int *... " >&6; }
42007if ${ac_cv_sizeof_int_p+:} false; then :
42008  $as_echo_n "(cached) " >&6
42009else
42010  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42011
42012else
42013  if test "$ac_cv_type_int_p" = yes; then
42014     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42016as_fn_error 77 "cannot compute sizeof (int *)
42017See \`config.log' for more details" "$LINENO" 5; }
42018   else
42019     ac_cv_sizeof_int_p=0
42020   fi
42021fi
42022
42023fi
42024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42025$as_echo "$ac_cv_sizeof_int_p" >&6; }
42026
42027
42028
42029cat >>confdefs.h <<_ACEOF
42030#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42031_ACEOF
42032
42033
42034
42035      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42036
42037      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42038        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
42039      fi
42040    fi
42041  fi
42042
42043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42044$as_echo_n "checking for target address size... " >&6; }
42045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42046$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42047
42048
42049  ###############################################################################
42050  #
42051  # Is the target little of big endian?
42052  #
42053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42054$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42055if ${ac_cv_c_bigendian+:} false; then :
42056  $as_echo_n "(cached) " >&6
42057else
42058  ac_cv_c_bigendian=unknown
42059    # See if we're dealing with a universal compiler.
42060    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42061/* end confdefs.h.  */
42062#ifndef __APPLE_CC__
42063	       not a universal capable compiler
42064	     #endif
42065	     typedef int dummy;
42066
42067_ACEOF
42068if ac_fn_cxx_try_compile "$LINENO"; then :
42069
42070	# Check for potential -arch flags.  It is not universal unless
42071	# there are at least two -arch flags with different values.
42072	ac_arch=
42073	ac_prev=
42074	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42075	 if test -n "$ac_prev"; then
42076	   case $ac_word in
42077	     i?86 | x86_64 | ppc | ppc64)
42078	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42079		 ac_arch=$ac_word
42080	       else
42081		 ac_cv_c_bigendian=universal
42082		 break
42083	       fi
42084	       ;;
42085	   esac
42086	   ac_prev=
42087	 elif test "x$ac_word" = "x-arch"; then
42088	   ac_prev=arch
42089	 fi
42090       done
42091fi
42092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42093    if test $ac_cv_c_bigendian = unknown; then
42094      # See if sys/param.h defines the BYTE_ORDER macro.
42095      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42096/* end confdefs.h.  */
42097#include <sys/types.h>
42098	     #include <sys/param.h>
42099
42100int
42101main ()
42102{
42103#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42104		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42105		     && LITTLE_ENDIAN)
42106	      bogus endian macros
42107	     #endif
42108
42109  ;
42110  return 0;
42111}
42112_ACEOF
42113if ac_fn_cxx_try_compile "$LINENO"; then :
42114  # It does; now see whether it defined to BIG_ENDIAN or not.
42115	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42116/* end confdefs.h.  */
42117#include <sys/types.h>
42118		#include <sys/param.h>
42119
42120int
42121main ()
42122{
42123#if BYTE_ORDER != BIG_ENDIAN
42124		 not big endian
42125		#endif
42126
42127  ;
42128  return 0;
42129}
42130_ACEOF
42131if ac_fn_cxx_try_compile "$LINENO"; then :
42132  ac_cv_c_bigendian=yes
42133else
42134  ac_cv_c_bigendian=no
42135fi
42136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42137fi
42138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42139    fi
42140    if test $ac_cv_c_bigendian = unknown; then
42141      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42142      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42143/* end confdefs.h.  */
42144#include <limits.h>
42145
42146int
42147main ()
42148{
42149#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42150	      bogus endian macros
42151	     #endif
42152
42153  ;
42154  return 0;
42155}
42156_ACEOF
42157if ac_fn_cxx_try_compile "$LINENO"; then :
42158  # It does; now see whether it defined to _BIG_ENDIAN or not.
42159	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42160/* end confdefs.h.  */
42161#include <limits.h>
42162
42163int
42164main ()
42165{
42166#ifndef _BIG_ENDIAN
42167		 not big endian
42168		#endif
42169
42170  ;
42171  return 0;
42172}
42173_ACEOF
42174if ac_fn_cxx_try_compile "$LINENO"; then :
42175  ac_cv_c_bigendian=yes
42176else
42177  ac_cv_c_bigendian=no
42178fi
42179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42180fi
42181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42182    fi
42183    if test $ac_cv_c_bigendian = unknown; then
42184      # Compile a test program.
42185      if test "$cross_compiling" = yes; then :
42186  # Try to guess by grepping values from an object file.
42187	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42188/* end confdefs.h.  */
42189short int ascii_mm[] =
42190		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42191		short int ascii_ii[] =
42192		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42193		int use_ascii (int i) {
42194		  return ascii_mm[i] + ascii_ii[i];
42195		}
42196		short int ebcdic_ii[] =
42197		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42198		short int ebcdic_mm[] =
42199		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42200		int use_ebcdic (int i) {
42201		  return ebcdic_mm[i] + ebcdic_ii[i];
42202		}
42203		extern int foo;
42204
42205int
42206main ()
42207{
42208return use_ascii (foo) == use_ebcdic (foo);
42209  ;
42210  return 0;
42211}
42212_ACEOF
42213if ac_fn_cxx_try_compile "$LINENO"; then :
42214  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42215	      ac_cv_c_bigendian=yes
42216	    fi
42217	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42218	      if test "$ac_cv_c_bigendian" = unknown; then
42219		ac_cv_c_bigendian=no
42220	      else
42221		# finding both strings is unlikely to happen, but who knows?
42222		ac_cv_c_bigendian=unknown
42223	      fi
42224	    fi
42225fi
42226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42227else
42228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42229/* end confdefs.h.  */
42230$ac_includes_default
42231int
42232main ()
42233{
42234
42235	     /* Are we little or big endian?  From Harbison&Steele.  */
42236	     union
42237	     {
42238	       long int l;
42239	       char c[sizeof (long int)];
42240	     } u;
42241	     u.l = 1;
42242	     return u.c[sizeof (long int) - 1] == 1;
42243
42244  ;
42245  return 0;
42246}
42247_ACEOF
42248if ac_fn_cxx_try_run "$LINENO"; then :
42249  ac_cv_c_bigendian=no
42250else
42251  ac_cv_c_bigendian=yes
42252fi
42253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42254  conftest.$ac_objext conftest.beam conftest.$ac_ext
42255fi
42256
42257    fi
42258fi
42259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42260$as_echo "$ac_cv_c_bigendian" >&6; }
42261 case $ac_cv_c_bigendian in #(
42262   yes)
42263     ENDIAN="big";; #(
42264   no)
42265     ENDIAN="little" ;; #(
42266   universal)
42267     ENDIAN="universal_endianness"
42268     ;; #(
42269   *)
42270     ENDIAN="unknown" ;;
42271 esac
42272
42273
42274  if test "x$ENDIAN" = xuniversal_endianness; then
42275    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42276  fi
42277  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42278    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
42279  fi
42280
42281
42282# Configure flags for the tools
42283
42284  ###############################################################################
42285  #
42286  # How to compile shared libraries.
42287  #
42288
42289  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42290    PICFLAG="-fPIC"
42291    C_FLAG_REORDER=''
42292    CXX_FLAG_REORDER=''
42293
42294    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42295      # Linking is different on MacOSX
42296      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42297      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42298      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42299      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42300      SET_SHARED_LIBRARY_MAPFILE=''
42301    else
42302      # Default works for linux, might work on other platforms as well.
42303      SHARED_LIBRARY_FLAGS='-shared'
42304      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42305      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42306      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42307      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42308    fi
42309  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42310    PICFLAG=''
42311    C_FLAG_REORDER=''
42312    CXX_FLAG_REORDER=''
42313
42314    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42315      # Linking is different on MacOSX
42316      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42317      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42318      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42319      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42320      SET_SHARED_LIBRARY_MAPFILE=''
42321    else
42322      # Default works for linux, might work on other platforms as well.
42323      SHARED_LIBRARY_FLAGS='-shared'
42324      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42325      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42326      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42327      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42328    fi
42329  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42330    PICFLAG="-KPIC"
42331    C_FLAG_REORDER='-xF'
42332    CXX_FLAG_REORDER='-xF'
42333    SHARED_LIBRARY_FLAGS="-G"
42334    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42335    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42336    SET_SHARED_LIBRARY_NAME=''
42337    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42338  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42339    PICFLAG="-qpic=large"
42340    C_FLAG_REORDER=''
42341    CXX_FLAG_REORDER=''
42342    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42343    SET_EXECUTABLE_ORIGIN=""
42344    SET_SHARED_LIBRARY_ORIGIN=''
42345    SET_SHARED_LIBRARY_NAME=''
42346    SET_SHARED_LIBRARY_MAPFILE=''
42347  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42348    PICFLAG=""
42349    C_FLAG_REORDER=''
42350    CXX_FLAG_REORDER=''
42351    SHARED_LIBRARY_FLAGS="-LD"
42352    SET_EXECUTABLE_ORIGIN=''
42353    SET_SHARED_LIBRARY_ORIGIN=''
42354    SET_SHARED_LIBRARY_NAME=''
42355    SET_SHARED_LIBRARY_MAPFILE=''
42356  fi
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42367    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42368    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42369    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42370  fi
42371  # The (cross) compiler is now configured, we can now test capabilities
42372  # of the target platform.
42373
42374
42375
42376  ###############################################################################
42377  #
42378  # Setup the opt flags for different compilers
42379  # and different operating systems.
42380  #
42381
42382  # FIXME: this was indirectly the old default, but just inherited.
42383  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42384  #   C_FLAG_DEPS="-MMD -MF"
42385  # fi
42386
42387  # Generate make dependency files
42388  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42389    C_FLAG_DEPS="-MMD -MF"
42390  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42391    C_FLAG_DEPS="-MMD -MF"
42392  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42393    C_FLAG_DEPS="-xMMD -xMF"
42394  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42395    C_FLAG_DEPS="-qmakedep=gcc -MF"
42396  fi
42397  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42398
42399
42400
42401  # Debug symbols
42402  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42403    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42404      # reduce from default "-g2" option to save space
42405      CFLAGS_DEBUG_SYMBOLS="-g1"
42406      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42407    else
42408      CFLAGS_DEBUG_SYMBOLS="-g"
42409      CXXFLAGS_DEBUG_SYMBOLS="-g"
42410    fi
42411  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42412    CFLAGS_DEBUG_SYMBOLS="-g"
42413    CXXFLAGS_DEBUG_SYMBOLS="-g"
42414  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42415    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42416    # FIXME: likely a bug, this disables debug symbols rather than enables them
42417    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42418  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42419    CFLAGS_DEBUG_SYMBOLS="-g"
42420    CXXFLAGS_DEBUG_SYMBOLS="-g"
42421  fi
42422
42423
42424
42425  # bounds, memory and behavior checking options
42426  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42427    case $DEBUG_LEVEL in
42428    release )
42429      # no adjustment
42430      ;;
42431    fastdebug )
42432      # no adjustment
42433      ;;
42434    slowdebug )
42435      # Add runtime stack smashing and undefined behavior checks
42436      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42437      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42438      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42439        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
42440        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
42441      fi
42442      ;;
42443    esac
42444  fi
42445
42446
42447
42448  # Optimization levels
42449  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42450    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42451
42452    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42453      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42454      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42455      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42456      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42457      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42458      C_O_FLAG_NONE="-xregs=no%frameptr"
42459      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42460      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42461      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42462      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42463      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42464      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42465        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42466        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42467      fi
42468    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42469      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42470      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42471      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42472      C_O_FLAG_DEBUG=""
42473      C_O_FLAG_NONE=""
42474      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42475      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42476      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42477      C_O_FLAG_DEBUG=""
42478      CXX_O_FLAG_NONE=""
42479    fi
42480  else
42481    # The remaining toolchains share opt flags between CC and CXX;
42482    # setup for C and duplicate afterwards.
42483    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42484      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42485        # On MacOSX we optimize for size, something
42486        # we should do for all platforms?
42487        C_O_FLAG_HIGHEST="-Os"
42488        C_O_FLAG_HI="-Os"
42489        C_O_FLAG_NORM="-Os"
42490      else
42491        C_O_FLAG_HIGHEST="-O3"
42492        C_O_FLAG_HI="-O3"
42493        C_O_FLAG_NORM="-O2"
42494      fi
42495      C_O_FLAG_DEBUG="-O0"
42496      C_O_FLAG_NONE="-O0"
42497    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42498      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42499        # On MacOSX we optimize for size, something
42500        # we should do for all platforms?
42501        C_O_FLAG_HIGHEST="-Os"
42502        C_O_FLAG_HI="-Os"
42503        C_O_FLAG_NORM="-Os"
42504      else
42505        C_O_FLAG_HIGHEST="-O3"
42506        C_O_FLAG_HI="-O3"
42507        C_O_FLAG_NORM="-O2"
42508      fi
42509      C_O_FLAG_DEBUG="-O0"
42510      C_O_FLAG_NONE="-O0"
42511    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42512      C_O_FLAG_HIGHEST="-O3"
42513      C_O_FLAG_HI="-O3 -qstrict"
42514      C_O_FLAG_NORM="-O2"
42515      C_O_FLAG_DEBUG="-qnoopt"
42516      C_O_FLAG_NONE="-qnoop"
42517    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42518      C_O_FLAG_HIGHEST="-O2"
42519      C_O_FLAG_HI="-O1"
42520      C_O_FLAG_NORM="-O1"
42521      C_O_FLAG_DEBUG="-Od"
42522      C_O_FLAG_NONE="-Od"
42523    fi
42524    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42525    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42526    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42527    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42528    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42529  fi
42530
42531  # Adjust optimization flags according to debug level.
42532  case $DEBUG_LEVEL in
42533    release )
42534      # no adjustment
42535      ;;
42536    fastdebug )
42537      # Not quite so much optimization
42538      C_O_FLAG_HI="$C_O_FLAG_NORM"
42539      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42540      ;;
42541    slowdebug )
42542      # Disable optimization
42543      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42544      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42545      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42546      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42547      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42548      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42549      ;;
42550  esac
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564  # Special extras...
42565  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42566    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42567      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42568      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42569    fi
42570  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42571    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42572    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42573    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42574  fi
42575
42576  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42577    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42578$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42579  fi
42580
42581  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42582    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42583$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42584  fi
42585
42586  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42587    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42588$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42589  fi
42590
42591
42592# Check whether --with-extra-cflags was given.
42593if test "${with_extra_cflags+set}" = set; then :
42594  withval=$with_extra_cflags;
42595fi
42596
42597
42598
42599# Check whether --with-extra-cxxflags was given.
42600if test "${with_extra_cxxflags+set}" = set; then :
42601  withval=$with_extra_cxxflags;
42602fi
42603
42604
42605
42606# Check whether --with-extra-ldflags was given.
42607if test "${with_extra_ldflags+set}" = set; then :
42608  withval=$with_extra_ldflags;
42609fi
42610
42611
42612  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42613  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42614  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42615
42616  # Hotspot needs these set in their legacy form
42617  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42618  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42619  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42620
42621
42622
42623
42624
42625  ###############################################################################
42626  #
42627  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42628  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42629  #
42630
42631  # Setup compiler/platform specific flags into
42632  #    CFLAGS_JDK    - C Compiler flags
42633  #    CXXFLAGS_JDK  - C++ Compiler flags
42634  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42635  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42636    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42637        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42638    case $OPENJDK_TARGET_CPU_ARCH in
42639      arm )
42640        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42641        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42642        ;;
42643      ppc )
42644        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42645        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42646        ;;
42647      * )
42648        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42649        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42650        ;;
42651    esac
42652  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42653    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42654    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42655      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42656      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42657    fi
42658
42659    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42660    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42661  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42662    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42663    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42664  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42665    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42666    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42667    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42668    -DWIN32 -DIAL"
42669    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42670      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42671    else
42672      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42673    fi
42674  fi
42675
42676  ###############################################################################
42677
42678  # Adjust flags according to debug level.
42679  case $DEBUG_LEVEL in
42680    fastdebug | slowdebug )
42681      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42682      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42683      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42684      ;;
42685    release )
42686      ;;
42687    * )
42688      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42689      ;;
42690  esac
42691
42692  # Setup LP64
42693  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42694
42695  # Set some common defines. These works for all compilers, but assume
42696  # -D is universally accepted.
42697
42698  # Setup endianness
42699  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42700    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42701    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42702    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42703    #   Note: -Dmacro         is the same as    #define macro 1
42704    #         -Dmacro=        is the same as    #define macro
42705    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42706      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42707    else
42708      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42709    fi
42710  else
42711    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42712    # are defined in the system?
42713    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42714      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42715    else
42716      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42717    fi
42718  fi
42719
42720  # Setup target OS define. Use OS target name but in upper case.
42721  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42722  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42723
42724  # Setup target CPU
42725  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42726
42727  # Setup debug/release defines
42728  if test "x$DEBUG_LEVEL" = xrelease; then
42729    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42730    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42731      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42732    fi
42733  else
42734    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42735  fi
42736
42737  # Setup release name
42738  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42739
42740
42741  # Set some additional per-OS defines.
42742  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42743    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42744  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42745    # FIXME: PPC64 should not be here.
42746    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42747  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42748    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42749  fi
42750
42751  # Additional macosx handling
42752  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42753    # Setting these parameters makes it an error to link to macosx APIs that are
42754    # newer than the given OS version and makes the linked binaries compatible
42755    # even if built on a newer version of the OS.
42756    # The expected format is X.Y.Z
42757    MACOSX_VERSION_MIN=10.7.0
42758
42759
42760    # The macro takes the version with no dots, ex: 1070
42761    # Let the flags variables get resolved in make for easier override on make
42762    # command line.
42763    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42764    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42765  fi
42766
42767  # Setup some hard coded includes
42768  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42769      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42770      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42771      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
42772
42773  # The shared libraries are compiled using the picflag.
42774  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42775  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42776
42777  # Executable flags
42778  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42779  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42780
42781
42782
42783
42784
42785
42786  # Setup LDFLAGS et al.
42787  #
42788
42789  # Now this is odd. The JDK native libraries have to link against libjvm.so
42790  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42791  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42792  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42793  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42794  # libraries will link to whatever is in memory. Yuck.
42795  #
42796  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42797  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42798    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42799    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42800      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42801    fi
42802    # TODO: make -debug optional "--disable-full-debug-symbols"
42803    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42804  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42805    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42806    # We have previously set HAS_GNU_HASH if this is the case
42807    if test -n "$HAS_GNU_HASH"; then
42808      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42809    fi
42810    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42811      # And since we now know that the linker is gnu, then add -z defs, to forbid
42812      # undefined symbols in object files.
42813      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42814      case $DEBUG_LEVEL in
42815        release )
42816          # tell linker to optimize libraries.
42817          # Should this be supplied to the OSS linker as well?
42818          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42819          ;;
42820        slowdebug )
42821          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42822            # do relocations at load
42823            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42824            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42825          fi
42826          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42827            # mark relocations read only
42828            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42829            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42830          fi
42831          ;;
42832        fastdebug )
42833          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42834            # mark relocations read only
42835            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42836            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42837          fi
42838          ;;
42839        * )
42840          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42841          ;;
42842        esac
42843    fi
42844  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42845    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42846    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42847  fi
42848
42849  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42850    # If undefined behaviour detection is enabled then we need to tell linker.
42851    case $DEBUG_LEVEL in
42852      release | fastdebug )
42853        ;;
42854      slowdebug )
42855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42856$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42857        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42858          # enable undefined behaviour checking
42859          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42860          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42861        fi
42862        ;;
42863      * )
42864        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42865        ;;
42866    esac
42867  fi
42868
42869  # Customize LDFLAGS for executables
42870
42871  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42872
42873  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42874    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42875      LDFLAGS_STACK_SIZE=1048576
42876    else
42877      LDFLAGS_STACK_SIZE=327680
42878    fi
42879    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42880  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42881    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42882  fi
42883
42884  # Customize LDFLAGS for libs
42885  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42886
42887  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42888    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42889    LDFLAGS_JDKLIB_SUFFIX=""
42890  else
42891    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42892        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42893
42894    # On some platforms (mac) the linker warns about non existing -L dirs.
42895    # Add server first if available. Linking aginst client does not always produce the same results.
42896    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42897    # Default to server for other variants.
42898    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42899      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42900    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42901      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42902    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42903      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42904    else
42905      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42906    fi
42907
42908    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42909    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42910      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42911    fi
42912  fi
42913
42914
42915
42916
42917
42918
42919
42920
42921  # Some Zero and Shark settings.
42922  # ZERO_ARCHFLAG tells the compiler which mode to build for
42923  case "${OPENJDK_TARGET_CPU}" in
42924    s390)
42925      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42926      ;;
42927    *)
42928      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42929  esac
42930
42931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42932$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42933  supports=yes
42934
42935  saved_cflags="$CFLAGS"
42936  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42937  ac_ext=c
42938ac_cpp='$CPP $CPPFLAGS'
42939ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42940ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42941ac_compiler_gnu=$ac_cv_c_compiler_gnu
42942
42943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42944/* end confdefs.h.  */
42945int i;
42946_ACEOF
42947if ac_fn_c_try_compile "$LINENO"; then :
42948
42949else
42950  supports=no
42951fi
42952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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  CFLAGS="$saved_cflags"
42960
42961  saved_cxxflags="$CXXFLAGS"
42962  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42963  ac_ext=cpp
42964ac_cpp='$CXXCPP $CPPFLAGS'
42965ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42966ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42967ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42968
42969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42970/* end confdefs.h.  */
42971int i;
42972_ACEOF
42973if ac_fn_cxx_try_compile "$LINENO"; then :
42974
42975else
42976  supports=no
42977fi
42978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42979  ac_ext=cpp
42980ac_cpp='$CXXCPP $CPPFLAGS'
42981ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42982ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42983ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42984
42985  CXXFLAGS="$saved_cxxflags"
42986
42987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42988$as_echo "$supports" >&6; }
42989  if test "x$supports" = "xyes" ; then
42990    :
42991  else
42992    ZERO_ARCHFLAG=""
42993  fi
42994
42995
42996
42997  # Check that the compiler supports -mX (or -qX on AIX) flags
42998  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42999
43000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43001$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43002  supports=yes
43003
43004  saved_cflags="$CFLAGS"
43005  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43006  ac_ext=c
43007ac_cpp='$CPP $CPPFLAGS'
43008ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43009ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43010ac_compiler_gnu=$ac_cv_c_compiler_gnu
43011
43012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43013/* end confdefs.h.  */
43014int i;
43015_ACEOF
43016if ac_fn_c_try_compile "$LINENO"; then :
43017
43018else
43019  supports=no
43020fi
43021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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  CFLAGS="$saved_cflags"
43029
43030  saved_cxxflags="$CXXFLAGS"
43031  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43032  ac_ext=cpp
43033ac_cpp='$CXXCPP $CPPFLAGS'
43034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43037
43038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43039/* end confdefs.h.  */
43040int i;
43041_ACEOF
43042if ac_fn_cxx_try_compile "$LINENO"; then :
43043
43044else
43045  supports=no
43046fi
43047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43048  ac_ext=cpp
43049ac_cpp='$CXXCPP $CPPFLAGS'
43050ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43051ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43052ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43053
43054  CXXFLAGS="$saved_cxxflags"
43055
43056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43057$as_echo "$supports" >&6; }
43058  if test "x$supports" = "xyes" ; then
43059    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43060  else
43061    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43062  fi
43063
43064
43065
43066  case "${TOOLCHAIN_TYPE}" in
43067    microsoft)
43068      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43069      ;;
43070    solstudio)
43071      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43072      ;;
43073    gcc)
43074      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43075      ;;
43076    clang)
43077      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43078      ;;
43079  esac
43080
43081
43082
43083# Setup debug symbols (need objcopy from the toolchain for that)
43084
43085  #
43086  # ENABLE_DEBUG_SYMBOLS
43087  # This must be done after the toolchain is setup, since we're looking at objcopy.
43088  #
43089  # Check whether --enable-debug-symbols was given.
43090if test "${enable_debug_symbols+set}" = set; then :
43091  enableval=$enable_debug_symbols;
43092fi
43093
43094
43095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43096$as_echo_n "checking if we should generate debug symbols... " >&6; }
43097
43098  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43099    # explicit enabling of enable-debug-symbols and can't find objcopy
43100    #   this is an error
43101    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43102  fi
43103
43104  if test "x$enable_debug_symbols" = "xyes"; then
43105    ENABLE_DEBUG_SYMBOLS=true
43106  elif test "x$enable_debug_symbols" = "xno"; then
43107    ENABLE_DEBUG_SYMBOLS=false
43108  else
43109    # Default is on if objcopy is found
43110    if test "x$OBJCOPY" != x; then
43111      ENABLE_DEBUG_SYMBOLS=true
43112    # MacOS X and Windows don't use objcopy but default is on for those OSes
43113    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43114      ENABLE_DEBUG_SYMBOLS=true
43115    else
43116      ENABLE_DEBUG_SYMBOLS=false
43117    fi
43118  fi
43119
43120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43121$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43122
43123  #
43124  # ZIP_DEBUGINFO_FILES
43125  #
43126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43127$as_echo_n "checking if we should zip debug-info files... " >&6; }
43128  # Check whether --enable-zip-debug-info was given.
43129if test "${enable_zip_debug_info+set}" = set; then :
43130  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43131else
43132  enable_zip_debug_info="yes"
43133fi
43134
43135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43136$as_echo "${enable_zip_debug_info}" >&6; }
43137
43138  if test "x${enable_zip_debug_info}" = "xno"; then
43139    ZIP_DEBUGINFO_FILES=false
43140  else
43141    ZIP_DEBUGINFO_FILES=true
43142  fi
43143
43144
43145
43146
43147
43148###############################################################################
43149#
43150# Check dependencies for external and internal libraries.
43151#
43152###############################################################################
43153
43154# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43155
43156  # When using cygwin or msys, we need a wrapper binary that renames
43157  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43158  # @files and rewrites these too! This wrapper binary is
43159  # called fixpath.
43160  FIXPATH=
43161  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43163$as_echo_n "checking if fixpath can be created... " >&6; }
43164    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43165    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43166    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43167      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43168      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43169      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43170      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43171    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43172      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43173      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43174
43175      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43176      # @ was chosen as separator to minimize risk of other tools messing around with it
43177      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43178      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43179
43180      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43181    fi
43182    rm -f $OUTPUT_ROOT/fixpath*
43183    cd $OUTPUT_ROOT
43184    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43185    cd $CURDIR
43186
43187    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43189$as_echo "no" >&6; }
43190      cat $OUTPUT_ROOT/fixpath1.log
43191      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43192    fi
43193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43194$as_echo "yes" >&6; }
43195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43196$as_echo_n "checking if fixpath.exe works... " >&6; }
43197    cd $OUTPUT_ROOT
43198    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43199    cd $CURDIR
43200    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43202$as_echo "no" >&6; }
43203      cat $OUTPUT_ROOT/fixpath2.log
43204      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43205    fi
43206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43207$as_echo "yes" >&6; }
43208    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43209  fi
43210
43211
43212
43213
43214
43215
43216  ###############################################################################
43217  #
43218  # OS specific settings that we never will need to probe.
43219  #
43220  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43222$as_echo_n "checking what is not needed on Linux?... " >&6; }
43223    PULSE_NOT_NEEDED=yes
43224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43225$as_echo "pulse" >&6; }
43226  fi
43227
43228  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43230$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43231    ALSA_NOT_NEEDED=yes
43232    PULSE_NOT_NEEDED=yes
43233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43234$as_echo "alsa pulse" >&6; }
43235  fi
43236
43237  if test "x$OPENJDK_TARGET_OS" = xaix; then
43238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43239$as_echo_n "checking what is not needed on AIX?... " >&6; }
43240    ALSA_NOT_NEEDED=yes
43241    PULSE_NOT_NEEDED=yes
43242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43243$as_echo "alsa pulse" >&6; }
43244  fi
43245
43246
43247  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43249$as_echo_n "checking what is not needed on Windows?... " >&6; }
43250    CUPS_NOT_NEEDED=yes
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 cups pulse x11" >&5
43255$as_echo "alsa cups pulse x11" >&6; }
43256  fi
43257
43258  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43260$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43261    ALSA_NOT_NEEDED=yes
43262    PULSE_NOT_NEEDED=yes
43263    X11_NOT_NEEDED=yes
43264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43265$as_echo "alsa pulse x11" >&6; }
43266  fi
43267
43268  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43270$as_echo_n "checking what is not needed on bsd?... " >&6; }
43271    ALSA_NOT_NEEDED=yes
43272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43273$as_echo "alsa" >&6; }
43274  fi
43275
43276  if test "x$OPENJDK" = "xfalse"; then
43277    FREETYPE_NOT_NEEDED=yes
43278  fi
43279
43280  if test "x$SUPPORT_HEADFUL" = xno; then
43281    X11_NOT_NEEDED=yes
43282  fi
43283
43284
43285
43286  ###############################################################################
43287  #
43288  # Check for X Windows
43289  #
43290
43291  if test "x$X11_NOT_NEEDED" = xyes; then
43292    if test "x${with_x}" != x; then
43293      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43294$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43295    fi
43296    X_CFLAGS=
43297    X_LIBS=
43298  else
43299    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43300    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43301    # --x-libraries for the sysroot, if that seems to be correct.
43302    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43303      if test "x$SYSROOT" != "x"; then
43304        if test "x$x_includes" = xNONE; then
43305          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43306            x_includes="$SYSROOT/usr/X11R6/include"
43307          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43308            x_includes="$SYSROOT/usr/include"
43309          fi
43310        fi
43311        if test "x$x_libraries" = xNONE; then
43312          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43313            x_libraries="$SYSROOT/usr/X11R6/lib"
43314          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43315            x_libraries="$SYSROOT/usr/lib64"
43316          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43317            x_libraries="$SYSROOT/usr/lib"
43318          fi
43319        fi
43320      fi
43321    fi
43322
43323    # Now let autoconf do it's magic
43324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43325$as_echo_n "checking for X... " >&6; }
43326
43327
43328# Check whether --with-x was given.
43329if test "${with_x+set}" = set; then :
43330  withval=$with_x;
43331fi
43332
43333# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43334if test "x$with_x" = xno; then
43335  # The user explicitly disabled X.
43336  have_x=disabled
43337else
43338  case $x_includes,$x_libraries in #(
43339    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43340    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43341  $as_echo_n "(cached) " >&6
43342else
43343  # One or both of the vars are not set, and there is no cached value.
43344ac_x_includes=no ac_x_libraries=no
43345rm -f -r conftest.dir
43346if mkdir conftest.dir; then
43347  cd conftest.dir
43348  cat >Imakefile <<'_ACEOF'
43349incroot:
43350	@echo incroot='${INCROOT}'
43351usrlibdir:
43352	@echo usrlibdir='${USRLIBDIR}'
43353libdir:
43354	@echo libdir='${LIBDIR}'
43355_ACEOF
43356  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43357    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43358    for ac_var in incroot usrlibdir libdir; do
43359      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43360    done
43361    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43362    for ac_extension in a so sl dylib la dll; do
43363      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43364	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43365	ac_im_usrlibdir=$ac_im_libdir; break
43366      fi
43367    done
43368    # Screen out bogus values from the imake configuration.  They are
43369    # bogus both because they are the default anyway, and because
43370    # using them would break gcc on systems where it needs fixed includes.
43371    case $ac_im_incroot in
43372	/usr/include) ac_x_includes= ;;
43373	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43374    esac
43375    case $ac_im_usrlibdir in
43376	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43377	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43378    esac
43379  fi
43380  cd ..
43381  rm -f -r conftest.dir
43382fi
43383
43384# Standard set of common directories for X headers.
43385# Check X11 before X11Rn because it is often a symlink to the current release.
43386ac_x_header_dirs='
43387/usr/X11/include
43388/usr/X11R7/include
43389/usr/X11R6/include
43390/usr/X11R5/include
43391/usr/X11R4/include
43392
43393/usr/include/X11
43394/usr/include/X11R7
43395/usr/include/X11R6
43396/usr/include/X11R5
43397/usr/include/X11R4
43398
43399/usr/local/X11/include
43400/usr/local/X11R7/include
43401/usr/local/X11R6/include
43402/usr/local/X11R5/include
43403/usr/local/X11R4/include
43404
43405/usr/local/include/X11
43406/usr/local/include/X11R7
43407/usr/local/include/X11R6
43408/usr/local/include/X11R5
43409/usr/local/include/X11R4
43410
43411/usr/X386/include
43412/usr/x386/include
43413/usr/XFree86/include/X11
43414
43415/usr/include
43416/usr/local/include
43417/usr/unsupported/include
43418/usr/athena/include
43419/usr/local/x11r5/include
43420/usr/lpp/Xamples/include
43421
43422/usr/openwin/include
43423/usr/openwin/share/include'
43424
43425if test "$ac_x_includes" = no; then
43426  # Guess where to find include files, by looking for Xlib.h.
43427  # First, try using that file with no special directory specified.
43428  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43429/* end confdefs.h.  */
43430#include <X11/Xlib.h>
43431_ACEOF
43432if ac_fn_cxx_try_cpp "$LINENO"; then :
43433  # We can compile using X headers with no special include directory.
43434ac_x_includes=
43435else
43436  for ac_dir in $ac_x_header_dirs; do
43437  if test -r "$ac_dir/X11/Xlib.h"; then
43438    ac_x_includes=$ac_dir
43439    break
43440  fi
43441done
43442fi
43443rm -f conftest.err conftest.i conftest.$ac_ext
43444fi # $ac_x_includes = no
43445
43446if test "$ac_x_libraries" = no; then
43447  # Check for the libraries.
43448  # See if we find them without any special options.
43449  # Don't add to $LIBS permanently.
43450  ac_save_LIBS=$LIBS
43451  LIBS="-lX11 $LIBS"
43452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43453/* end confdefs.h.  */
43454#include <X11/Xlib.h>
43455int
43456main ()
43457{
43458XrmInitialize ()
43459  ;
43460  return 0;
43461}
43462_ACEOF
43463if ac_fn_cxx_try_link "$LINENO"; then :
43464  LIBS=$ac_save_LIBS
43465# We can link X programs with no special library path.
43466ac_x_libraries=
43467else
43468  LIBS=$ac_save_LIBS
43469for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43470do
43471  # Don't even attempt the hair of trying to link an X program!
43472  for ac_extension in a so sl dylib la dll; do
43473    if test -r "$ac_dir/libX11.$ac_extension"; then
43474      ac_x_libraries=$ac_dir
43475      break 2
43476    fi
43477  done
43478done
43479fi
43480rm -f core conftest.err conftest.$ac_objext \
43481    conftest$ac_exeext conftest.$ac_ext
43482fi # $ac_x_libraries = no
43483
43484case $ac_x_includes,$ac_x_libraries in #(
43485  no,* | *,no | *\'*)
43486    # Didn't find X, or a directory has "'" in its name.
43487    ac_cv_have_x="have_x=no";; #(
43488  *)
43489    # Record where we found X for the cache.
43490    ac_cv_have_x="have_x=yes\
43491	ac_x_includes='$ac_x_includes'\
43492	ac_x_libraries='$ac_x_libraries'"
43493esac
43494fi
43495;; #(
43496    *) have_x=yes;;
43497  esac
43498  eval "$ac_cv_have_x"
43499fi # $with_x != no
43500
43501if test "$have_x" != yes; then
43502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43503$as_echo "$have_x" >&6; }
43504  no_x=yes
43505else
43506  # If each of the values was on the command line, it overrides each guess.
43507  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43508  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43509  # Update the cache value to reflect the command line values.
43510  ac_cv_have_x="have_x=yes\
43511	ac_x_includes='$x_includes'\
43512	ac_x_libraries='$x_libraries'"
43513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43514$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43515fi
43516
43517    if test "$no_x" = yes; then
43518  # Not all programs may use this symbol, but it does not hurt to define it.
43519
43520$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43521
43522  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43523else
43524  if test -n "$x_includes"; then
43525    X_CFLAGS="$X_CFLAGS -I$x_includes"
43526  fi
43527
43528  # It would also be nice to do this for all -L options, not just this one.
43529  if test -n "$x_libraries"; then
43530    X_LIBS="$X_LIBS -L$x_libraries"
43531    # For Solaris; some versions of Sun CC require a space after -R and
43532    # others require no space.  Words are not sufficient . . . .
43533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43534$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43535    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43536    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43537    ac_cxx_werror_flag=yes
43538    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43539/* end confdefs.h.  */
43540
43541int
43542main ()
43543{
43544
43545  ;
43546  return 0;
43547}
43548_ACEOF
43549if ac_fn_cxx_try_link "$LINENO"; then :
43550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43551$as_echo "no" >&6; }
43552       X_LIBS="$X_LIBS -R$x_libraries"
43553else
43554  LIBS="$ac_xsave_LIBS -R $x_libraries"
43555       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43556/* end confdefs.h.  */
43557
43558int
43559main ()
43560{
43561
43562  ;
43563  return 0;
43564}
43565_ACEOF
43566if ac_fn_cxx_try_link "$LINENO"; then :
43567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43568$as_echo "yes" >&6; }
43569	  X_LIBS="$X_LIBS -R $x_libraries"
43570else
43571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43572$as_echo "neither works" >&6; }
43573fi
43574rm -f core conftest.err conftest.$ac_objext \
43575    conftest$ac_exeext conftest.$ac_ext
43576fi
43577rm -f core conftest.err conftest.$ac_objext \
43578    conftest$ac_exeext conftest.$ac_ext
43579    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43580    LIBS=$ac_xsave_LIBS
43581  fi
43582
43583  # Check for system-dependent libraries X programs must link with.
43584  # Do this before checking for the system-independent R6 libraries
43585  # (-lICE), since we may need -lsocket or whatever for X linking.
43586
43587  if test "$ISC" = yes; then
43588    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43589  else
43590    # Martyn Johnson says this is needed for Ultrix, if the X
43591    # libraries were built with DECnet support.  And Karl Berry says
43592    # the Alpha needs dnet_stub (dnet does not exist).
43593    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43594    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43595/* end confdefs.h.  */
43596
43597/* Override any GCC internal prototype to avoid an error.
43598   Use char because int might match the return type of a GCC
43599   builtin and then its argument prototype would still apply.  */
43600#ifdef __cplusplus
43601extern "C"
43602#endif
43603char XOpenDisplay ();
43604int
43605main ()
43606{
43607return XOpenDisplay ();
43608  ;
43609  return 0;
43610}
43611_ACEOF
43612if ac_fn_cxx_try_link "$LINENO"; then :
43613
43614else
43615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43616$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43617if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43618  $as_echo_n "(cached) " >&6
43619else
43620  ac_check_lib_save_LIBS=$LIBS
43621LIBS="-ldnet  $LIBS"
43622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43623/* end confdefs.h.  */
43624
43625/* Override any GCC internal prototype to avoid an error.
43626   Use char because int might match the return type of a GCC
43627   builtin and then its argument prototype would still apply.  */
43628#ifdef __cplusplus
43629extern "C"
43630#endif
43631char dnet_ntoa ();
43632int
43633main ()
43634{
43635return dnet_ntoa ();
43636  ;
43637  return 0;
43638}
43639_ACEOF
43640if ac_fn_cxx_try_link "$LINENO"; then :
43641  ac_cv_lib_dnet_dnet_ntoa=yes
43642else
43643  ac_cv_lib_dnet_dnet_ntoa=no
43644fi
43645rm -f core conftest.err conftest.$ac_objext \
43646    conftest$ac_exeext conftest.$ac_ext
43647LIBS=$ac_check_lib_save_LIBS
43648fi
43649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43650$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43651if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43652  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43653fi
43654
43655    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43657$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43658if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43659  $as_echo_n "(cached) " >&6
43660else
43661  ac_check_lib_save_LIBS=$LIBS
43662LIBS="-ldnet_stub  $LIBS"
43663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43664/* end confdefs.h.  */
43665
43666/* Override any GCC internal prototype to avoid an error.
43667   Use char because int might match the return type of a GCC
43668   builtin and then its argument prototype would still apply.  */
43669#ifdef __cplusplus
43670extern "C"
43671#endif
43672char dnet_ntoa ();
43673int
43674main ()
43675{
43676return dnet_ntoa ();
43677  ;
43678  return 0;
43679}
43680_ACEOF
43681if ac_fn_cxx_try_link "$LINENO"; then :
43682  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43683else
43684  ac_cv_lib_dnet_stub_dnet_ntoa=no
43685fi
43686rm -f core conftest.err conftest.$ac_objext \
43687    conftest$ac_exeext conftest.$ac_ext
43688LIBS=$ac_check_lib_save_LIBS
43689fi
43690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43691$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43692if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43693  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43694fi
43695
43696    fi
43697fi
43698rm -f core conftest.err conftest.$ac_objext \
43699    conftest$ac_exeext conftest.$ac_ext
43700    LIBS="$ac_xsave_LIBS"
43701
43702    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43703    # to get the SysV transport functions.
43704    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43705    # needs -lnsl.
43706    # The nsl library prevents programs from opening the X display
43707    # on Irix 5.2, according to T.E. Dickey.
43708    # The functions gethostbyname, getservbyname, and inet_addr are
43709    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43710    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43711if test "x$ac_cv_func_gethostbyname" = xyes; then :
43712
43713fi
43714
43715    if test $ac_cv_func_gethostbyname = no; then
43716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43717$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43718if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43719  $as_echo_n "(cached) " >&6
43720else
43721  ac_check_lib_save_LIBS=$LIBS
43722LIBS="-lnsl  $LIBS"
43723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43724/* end confdefs.h.  */
43725
43726/* Override any GCC internal prototype to avoid an error.
43727   Use char because int might match the return type of a GCC
43728   builtin and then its argument prototype would still apply.  */
43729#ifdef __cplusplus
43730extern "C"
43731#endif
43732char gethostbyname ();
43733int
43734main ()
43735{
43736return gethostbyname ();
43737  ;
43738  return 0;
43739}
43740_ACEOF
43741if ac_fn_cxx_try_link "$LINENO"; then :
43742  ac_cv_lib_nsl_gethostbyname=yes
43743else
43744  ac_cv_lib_nsl_gethostbyname=no
43745fi
43746rm -f core conftest.err conftest.$ac_objext \
43747    conftest$ac_exeext conftest.$ac_ext
43748LIBS=$ac_check_lib_save_LIBS
43749fi
43750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43751$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43752if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43753  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43754fi
43755
43756      if test $ac_cv_lib_nsl_gethostbyname = no; then
43757	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43758$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43759if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43760  $as_echo_n "(cached) " >&6
43761else
43762  ac_check_lib_save_LIBS=$LIBS
43763LIBS="-lbsd  $LIBS"
43764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43765/* end confdefs.h.  */
43766
43767/* Override any GCC internal prototype to avoid an error.
43768   Use char because int might match the return type of a GCC
43769   builtin and then its argument prototype would still apply.  */
43770#ifdef __cplusplus
43771extern "C"
43772#endif
43773char gethostbyname ();
43774int
43775main ()
43776{
43777return gethostbyname ();
43778  ;
43779  return 0;
43780}
43781_ACEOF
43782if ac_fn_cxx_try_link "$LINENO"; then :
43783  ac_cv_lib_bsd_gethostbyname=yes
43784else
43785  ac_cv_lib_bsd_gethostbyname=no
43786fi
43787rm -f core conftest.err conftest.$ac_objext \
43788    conftest$ac_exeext conftest.$ac_ext
43789LIBS=$ac_check_lib_save_LIBS
43790fi
43791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43792$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43793if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43794  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43795fi
43796
43797      fi
43798    fi
43799
43800    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43801    # socket/setsockopt and other routines are undefined under SCO ODT
43802    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43803    # on later versions), says Simon Leinen: it contains gethostby*
43804    # variants that don't use the name server (or something).  -lsocket
43805    # must be given before -lnsl if both are needed.  We assume that
43806    # if connect needs -lnsl, so does gethostbyname.
43807    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43808if test "x$ac_cv_func_connect" = xyes; then :
43809
43810fi
43811
43812    if test $ac_cv_func_connect = no; then
43813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43814$as_echo_n "checking for connect in -lsocket... " >&6; }
43815if ${ac_cv_lib_socket_connect+:} false; then :
43816  $as_echo_n "(cached) " >&6
43817else
43818  ac_check_lib_save_LIBS=$LIBS
43819LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43821/* end confdefs.h.  */
43822
43823/* Override any GCC internal prototype to avoid an error.
43824   Use char because int might match the return type of a GCC
43825   builtin and then its argument prototype would still apply.  */
43826#ifdef __cplusplus
43827extern "C"
43828#endif
43829char connect ();
43830int
43831main ()
43832{
43833return connect ();
43834  ;
43835  return 0;
43836}
43837_ACEOF
43838if ac_fn_cxx_try_link "$LINENO"; then :
43839  ac_cv_lib_socket_connect=yes
43840else
43841  ac_cv_lib_socket_connect=no
43842fi
43843rm -f core conftest.err conftest.$ac_objext \
43844    conftest$ac_exeext conftest.$ac_ext
43845LIBS=$ac_check_lib_save_LIBS
43846fi
43847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43848$as_echo "$ac_cv_lib_socket_connect" >&6; }
43849if test "x$ac_cv_lib_socket_connect" = xyes; then :
43850  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43851fi
43852
43853    fi
43854
43855    # Guillermo Gomez says -lposix is necessary on A/UX.
43856    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43857if test "x$ac_cv_func_remove" = xyes; then :
43858
43859fi
43860
43861    if test $ac_cv_func_remove = no; then
43862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43863$as_echo_n "checking for remove in -lposix... " >&6; }
43864if ${ac_cv_lib_posix_remove+:} false; then :
43865  $as_echo_n "(cached) " >&6
43866else
43867  ac_check_lib_save_LIBS=$LIBS
43868LIBS="-lposix  $LIBS"
43869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43870/* end confdefs.h.  */
43871
43872/* Override any GCC internal prototype to avoid an error.
43873   Use char because int might match the return type of a GCC
43874   builtin and then its argument prototype would still apply.  */
43875#ifdef __cplusplus
43876extern "C"
43877#endif
43878char remove ();
43879int
43880main ()
43881{
43882return remove ();
43883  ;
43884  return 0;
43885}
43886_ACEOF
43887if ac_fn_cxx_try_link "$LINENO"; then :
43888  ac_cv_lib_posix_remove=yes
43889else
43890  ac_cv_lib_posix_remove=no
43891fi
43892rm -f core conftest.err conftest.$ac_objext \
43893    conftest$ac_exeext conftest.$ac_ext
43894LIBS=$ac_check_lib_save_LIBS
43895fi
43896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43897$as_echo "$ac_cv_lib_posix_remove" >&6; }
43898if test "x$ac_cv_lib_posix_remove" = xyes; then :
43899  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43900fi
43901
43902    fi
43903
43904    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43905    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43906if test "x$ac_cv_func_shmat" = xyes; then :
43907
43908fi
43909
43910    if test $ac_cv_func_shmat = no; then
43911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43912$as_echo_n "checking for shmat in -lipc... " >&6; }
43913if ${ac_cv_lib_ipc_shmat+:} false; then :
43914  $as_echo_n "(cached) " >&6
43915else
43916  ac_check_lib_save_LIBS=$LIBS
43917LIBS="-lipc  $LIBS"
43918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43919/* end confdefs.h.  */
43920
43921/* Override any GCC internal prototype to avoid an error.
43922   Use char because int might match the return type of a GCC
43923   builtin and then its argument prototype would still apply.  */
43924#ifdef __cplusplus
43925extern "C"
43926#endif
43927char shmat ();
43928int
43929main ()
43930{
43931return shmat ();
43932  ;
43933  return 0;
43934}
43935_ACEOF
43936if ac_fn_cxx_try_link "$LINENO"; then :
43937  ac_cv_lib_ipc_shmat=yes
43938else
43939  ac_cv_lib_ipc_shmat=no
43940fi
43941rm -f core conftest.err conftest.$ac_objext \
43942    conftest$ac_exeext conftest.$ac_ext
43943LIBS=$ac_check_lib_save_LIBS
43944fi
43945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43946$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43947if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43948  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43949fi
43950
43951    fi
43952  fi
43953
43954  # Check for libraries that X11R6 Xt/Xaw programs need.
43955  ac_save_LDFLAGS=$LDFLAGS
43956  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43957  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43958  # check for ICE first), but we must link in the order -lSM -lICE or
43959  # we get undefined symbols.  So assume we have SM if we have ICE.
43960  # These have to be linked with before -lX11, unlike the other
43961  # libraries we check for below, so use a different variable.
43962  # John Interrante, Karl Berry
43963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43964$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43965if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43966  $as_echo_n "(cached) " >&6
43967else
43968  ac_check_lib_save_LIBS=$LIBS
43969LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43971/* end confdefs.h.  */
43972
43973/* Override any GCC internal prototype to avoid an error.
43974   Use char because int might match the return type of a GCC
43975   builtin and then its argument prototype would still apply.  */
43976#ifdef __cplusplus
43977extern "C"
43978#endif
43979char IceConnectionNumber ();
43980int
43981main ()
43982{
43983return IceConnectionNumber ();
43984  ;
43985  return 0;
43986}
43987_ACEOF
43988if ac_fn_cxx_try_link "$LINENO"; then :
43989  ac_cv_lib_ICE_IceConnectionNumber=yes
43990else
43991  ac_cv_lib_ICE_IceConnectionNumber=no
43992fi
43993rm -f core conftest.err conftest.$ac_objext \
43994    conftest$ac_exeext conftest.$ac_ext
43995LIBS=$ac_check_lib_save_LIBS
43996fi
43997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43998$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43999if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44000  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44001fi
44002
44003  LDFLAGS=$ac_save_LDFLAGS
44004
44005fi
44006
44007
44008    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44009    # this doesn't make sense so we remove it.
44010    if test "x$COMPILE_TYPE" = xcross; then
44011      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44012    fi
44013
44014    if test "x$no_x" = xyes; then
44015
44016  # Print a helpful message on how to acquire the necessary build dependency.
44017  # x11 is the help tag: freetype, cups, pulse, alsa etc
44018  MISSING_DEPENDENCY=x11
44019
44020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44021    cygwin_help $MISSING_DEPENDENCY
44022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44023    msys_help $MISSING_DEPENDENCY
44024  else
44025    PKGHANDLER_COMMAND=
44026
44027    case $PKGHANDLER in
44028      apt-get)
44029        apt_help     $MISSING_DEPENDENCY ;;
44030      yum)
44031        yum_help     $MISSING_DEPENDENCY ;;
44032      port)
44033        port_help    $MISSING_DEPENDENCY ;;
44034      pkgutil)
44035        pkgutil_help $MISSING_DEPENDENCY ;;
44036      pkgadd)
44037        pkgadd_help  $MISSING_DEPENDENCY ;;
44038    esac
44039
44040    if test "x$PKGHANDLER_COMMAND" != x; then
44041      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44042    fi
44043  fi
44044
44045      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44046    fi
44047
44048    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44049      OPENWIN_HOME="/usr/openwin"
44050      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44051      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44052          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44053          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44054          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44055    fi
44056
44057    ac_ext=c
44058ac_cpp='$CPP $CPPFLAGS'
44059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44061ac_compiler_gnu=$ac_cv_c_compiler_gnu
44062
44063    OLD_CFLAGS="$CFLAGS"
44064    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44065
44066    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44067    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44068do :
44069  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44070ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44071          # include <X11/Xlib.h>
44072          # include <X11/Xutil.h>
44073
44074
44075"
44076if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44077  cat >>confdefs.h <<_ACEOF
44078#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44079_ACEOF
44080 X11_HEADERS_OK=yes
44081else
44082  X11_HEADERS_OK=no; break
44083fi
44084
44085done
44086
44087
44088    if test "x$X11_HEADERS_OK" = xno; then
44089
44090  # Print a helpful message on how to acquire the necessary build dependency.
44091  # x11 is the help tag: freetype, cups, pulse, alsa etc
44092  MISSING_DEPENDENCY=x11
44093
44094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44095    cygwin_help $MISSING_DEPENDENCY
44096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44097    msys_help $MISSING_DEPENDENCY
44098  else
44099    PKGHANDLER_COMMAND=
44100
44101    case $PKGHANDLER in
44102      apt-get)
44103        apt_help     $MISSING_DEPENDENCY ;;
44104      yum)
44105        yum_help     $MISSING_DEPENDENCY ;;
44106      port)
44107        port_help    $MISSING_DEPENDENCY ;;
44108      pkgutil)
44109        pkgutil_help $MISSING_DEPENDENCY ;;
44110      pkgadd)
44111        pkgadd_help  $MISSING_DEPENDENCY ;;
44112    esac
44113
44114    if test "x$PKGHANDLER_COMMAND" != x; then
44115      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44116    fi
44117  fi
44118
44119      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44120    fi
44121
44122    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44123    # defined in libawt_xawt.
44124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44125$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44126    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44127/* end confdefs.h.  */
44128#include <X11/extensions/Xrender.h>
44129int
44130main ()
44131{
44132XLinearGradient x;
44133  ;
44134  return 0;
44135}
44136_ACEOF
44137if ac_fn_c_try_compile "$LINENO"; then :
44138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44139$as_echo "yes" >&6; }
44140else
44141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44142$as_echo "no" >&6; }
44143         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44144fi
44145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44146
44147    CFLAGS="$OLD_CFLAGS"
44148    ac_ext=cpp
44149ac_cpp='$CXXCPP $CPPFLAGS'
44150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44153
44154  fi # X11_NOT_NEEDED
44155
44156
44157
44158
44159
44160
44161  ###############################################################################
44162  #
44163  # The common unix printing system cups is used to print from java.
44164  #
44165
44166# Check whether --with-cups was given.
44167if test "${with_cups+set}" = set; then :
44168  withval=$with_cups;
44169fi
44170
44171
44172# Check whether --with-cups-include was given.
44173if test "${with_cups_include+set}" = set; then :
44174  withval=$with_cups_include;
44175fi
44176
44177
44178  if test "x$CUPS_NOT_NEEDED" = xyes; then
44179    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44180      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44181$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44182    fi
44183    CUPS_CFLAGS=
44184  else
44185    CUPS_FOUND=no
44186
44187    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44188      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44189    fi
44190
44191    if test "x${with_cups}" != x; then
44192      CUPS_CFLAGS="-I${with_cups}/include"
44193      CUPS_FOUND=yes
44194    fi
44195    if test "x${with_cups_include}" != x; then
44196      CUPS_CFLAGS="-I${with_cups_include}"
44197      CUPS_FOUND=yes
44198    fi
44199    if test "x$CUPS_FOUND" = xno; then
44200
44201
44202  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44203    # Source the builddeps file again, to make sure it uses the latest variables!
44204    . $builddepsfile
44205    # Look for a target and build machine specific resource!
44206    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44207    if test "x$resource" = x; then
44208      # Ok, lets instead look for a target specific resource
44209      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44210    fi
44211    if test "x$resource" = x; then
44212      # Ok, lets instead look for a build specific resource
44213      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44214    fi
44215    if test "x$resource" = x; then
44216      # Ok, lets instead look for a generic resource
44217      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44218      resource=${builddep_cups}
44219    fi
44220    if test "x$resource" != x; then
44221      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44222$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44223      # If the resource in the builddeps.conf file is an existing directory,
44224      # for example /java/linux/cups
44225      if test -d ${resource}; then
44226        depdir=${resource}
44227      else
44228
44229  # cups is for example mymodule
44230  # $resource is for example libs/general/libmymod_1_2_3.zip
44231  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44232  # $with_builddeps_dir is for example /localhome/builddeps
44233  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44234  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44235  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44236  filename=`basename $resource`
44237  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44238  filebase=${filename%%.*}
44239  extension=${filename#*.}
44240  installdir=$with_builddeps_dir/$filebase
44241  if test ! -f $installdir/$filename.unpacked; then
44242    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44243$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44244    if test ! -d $installdir; then
44245      mkdir -p $installdir
44246    fi
44247    if test ! -d $installdir; then
44248      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44249    fi
44250    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44251    touch $tmpfile
44252    if test ! -f $tmpfile; then
44253      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44254    fi
44255
44256  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44257  # $tmpfile is the local file name for the downloaded file.
44258  VALID_TOOL=no
44259  if test "x$BDEPS_FTP" = xwget; then
44260    VALID_TOOL=yes
44261    wget -O $tmpfile $with_builddeps_server/$resource
44262  fi
44263  if test "x$BDEPS_FTP" = xlftp; then
44264    VALID_TOOL=yes
44265    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44266  fi
44267  if test "x$BDEPS_FTP" = xftp; then
44268    VALID_TOOL=yes
44269    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44270    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44271    FTPUSERPWD=${FTPSERVER%%@*}
44272    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44273      FTPUSER=${userpwd%%:*}
44274      FTPPWD=${userpwd#*@}
44275      FTPSERVER=${FTPSERVER#*@}
44276    else
44277      FTPUSER=ftp
44278      FTPPWD=ftp
44279    fi
44280    # the "pass" command does not work on some
44281    # ftp clients (read ftp.exe) but if it works,
44282    # passive mode is better!
44283    ( \
44284        echo "user $FTPUSER $FTPPWD"        ; \
44285        echo "pass"                         ; \
44286        echo "bin"                          ; \
44287        echo "get $FTPPATH $tmpfile"              ; \
44288    ) | ftp -in $FTPSERVER
44289  fi
44290  if test "x$VALID_TOOL" != xyes; then
44291    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44292  fi
44293
44294    mv $tmpfile $installdir/$filename
44295    if test ! -s $installdir/$filename; then
44296      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44297    fi
44298    case "$extension" in
44299      zip)  echo "Unzipping $installdir/$filename..."
44300        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44301        ;;
44302      tar.gz) echo "Untaring $installdir/$filename..."
44303        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44304        ;;
44305      tgz) echo "Untaring $installdir/$filename..."
44306        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44307        ;;
44308      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44309        ;;
44310    esac
44311  fi
44312  if test -f $installdir/$filename.unpacked; then
44313    depdir=$installdir
44314  fi
44315
44316      fi
44317      # Source the builddeps file again, because in the previous command, the depdir
44318      # was updated to point at the current build dependency install directory.
44319      . $builddepsfile
44320      # Now extract variables from the builddeps.conf files.
44321      theroot=${builddep_cups_ROOT}
44322      thecflags=${builddep_cups_CFLAGS}
44323      thelibs=${builddep_cups_LIBS}
44324      if test "x$depdir" = x; then
44325        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44326      fi
44327      CUPS=$depdir
44328      if test "x$theroot" != x; then
44329        CUPS="$theroot"
44330      fi
44331      if test "x$thecflags" != x; then
44332        CUPS_CFLAGS="$thecflags"
44333      fi
44334      if test "x$thelibs" != x; then
44335        CUPS_LIBS="$thelibs"
44336      fi
44337      CUPS_FOUND=yes
44338
44339    fi
44340
44341  fi
44342
44343    fi
44344    if test "x$CUPS_FOUND" = xno; then
44345      # Are the cups headers installed in the default /usr/include location?
44346      for ac_header in cups/cups.h cups/ppd.h
44347do :
44348  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44349ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44350if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44351  cat >>confdefs.h <<_ACEOF
44352#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44353_ACEOF
44354
44355            CUPS_FOUND=yes
44356            CUPS_CFLAGS=
44357            DEFAULT_CUPS=yes
44358
44359
44360fi
44361
44362done
44363
44364    fi
44365    if test "x$CUPS_FOUND" = xno; then
44366      # Getting nervous now? Lets poke around for standard Solaris third-party
44367      # package installation locations.
44368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44369$as_echo_n "checking for cups headers... " >&6; }
44370      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44371        # An SFW package seems to be installed!
44372        CUPS_FOUND=yes
44373        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44374      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44375        # A CSW package seems to be installed!
44376        CUPS_FOUND=yes
44377        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44378      fi
44379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44380$as_echo "$CUPS_FOUND" >&6; }
44381    fi
44382    if test "x$CUPS_FOUND" = xno; then
44383
44384  # Print a helpful message on how to acquire the necessary build dependency.
44385  # cups is the help tag: freetype, cups, pulse, alsa etc
44386  MISSING_DEPENDENCY=cups
44387
44388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389    cygwin_help $MISSING_DEPENDENCY
44390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44391    msys_help $MISSING_DEPENDENCY
44392  else
44393    PKGHANDLER_COMMAND=
44394
44395    case $PKGHANDLER in
44396      apt-get)
44397        apt_help     $MISSING_DEPENDENCY ;;
44398      yum)
44399        yum_help     $MISSING_DEPENDENCY ;;
44400      port)
44401        port_help    $MISSING_DEPENDENCY ;;
44402      pkgutil)
44403        pkgutil_help $MISSING_DEPENDENCY ;;
44404      pkgadd)
44405        pkgadd_help  $MISSING_DEPENDENCY ;;
44406    esac
44407
44408    if test "x$PKGHANDLER_COMMAND" != x; then
44409      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44410    fi
44411  fi
44412
44413      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44414    fi
44415  fi
44416
44417
44418
44419
44420
44421
44422  ###############################################################################
44423  #
44424  # The ubiquitous freetype library is used to render fonts.
44425  #
44426
44427# Check whether --with-freetype was given.
44428if test "${with_freetype+set}" = set; then :
44429  withval=$with_freetype;
44430fi
44431
44432
44433# Check whether --with-freetype-include was given.
44434if test "${with_freetype_include+set}" = set; then :
44435  withval=$with_freetype_include;
44436fi
44437
44438
44439# Check whether --with-freetype-lib was given.
44440if test "${with_freetype_lib+set}" = set; then :
44441  withval=$with_freetype_lib;
44442fi
44443
44444
44445# Check whether --with-freetype-src was given.
44446if test "${with_freetype_src+set}" = set; then :
44447  withval=$with_freetype_src;
44448fi
44449
44450  # Check whether --enable-freetype-bundling was given.
44451if test "${enable_freetype_bundling+set}" = set; then :
44452  enableval=$enable_freetype_bundling;
44453fi
44454
44455
44456  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44457  FREETYPE_BASE_NAME=freetype
44458  FREETYPE_CFLAGS=
44459  FREETYPE_LIBS=
44460  FREETYPE_BUNDLE_LIB_PATH=
44461
44462  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44463    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
44464      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44465$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44466    fi
44467    if test "x$enable_freetype_bundling" != x; then
44468      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44469$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44470    fi
44471  else
44472    # freetype is needed to build; go get it!
44473
44474    BUNDLE_FREETYPE="$enable_freetype_bundling"
44475
44476    if  test "x$with_freetype_src" != x; then
44477      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44478        # Try to build freetype if --with-freetype-src was given on Windows
44479
44480  FREETYPE_SRC_PATH="$with_freetype_src"
44481  BUILD_FREETYPE=yes
44482
44483  # Check if the freetype sources are acessible..
44484  if ! test -d $FREETYPE_SRC_PATH; then
44485    { $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
44486$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44487    BUILD_FREETYPE=no
44488  fi
44489  # ..and contain a vc2010 project file
44490  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44491  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44492    { $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
44493$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44494    BUILD_FREETYPE=no
44495  fi
44496  # Now check if configure found a version of 'msbuild.exe'
44497  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44499$as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44500    BUILD_FREETYPE=no
44501  fi
44502
44503  # Ready to go..
44504  if test "x$BUILD_FREETYPE" = xyes; then
44505
44506    # msbuild requires trailing slashes for output directories
44507    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44508    freetype_lib_path_unix="$freetype_lib_path"
44509    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44510
44511  unix_path="$vcxproj_path"
44512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44513    windows_path=`$CYGPATH -m "$unix_path"`
44514    vcxproj_path="$windows_path"
44515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44516    windows_path=`cmd //c echo $unix_path`
44517    vcxproj_path="$windows_path"
44518  fi
44519
44520
44521  unix_path="$freetype_lib_path"
44522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44523    windows_path=`$CYGPATH -m "$unix_path"`
44524    freetype_lib_path="$windows_path"
44525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44526    windows_path=`cmd //c echo $unix_path`
44527    freetype_lib_path="$windows_path"
44528  fi
44529
44530
44531  unix_path="$freetype_obj_path"
44532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44533    windows_path=`$CYGPATH -m "$unix_path"`
44534    freetype_obj_path="$windows_path"
44535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44536    windows_path=`cmd //c echo $unix_path`
44537    freetype_obj_path="$windows_path"
44538  fi
44539
44540    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44541      freetype_platform=x64
44542    else
44543      freetype_platform=win32
44544    fi
44545
44546    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44547    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44548    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44549    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44550    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44551$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44552
44553    # First we try to build the freetype.dll
44554    $ECHO -e "@echo off\n"\
44555	     "$MSBUILD $vcxproj_path "\
44556		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44557		       "/p:Configuration=\"Release Multithreaded\" "\
44558		       "/p:Platform=$freetype_platform "\
44559		       "/p:ConfigurationType=DynamicLibrary "\
44560		       "/p:TargetName=freetype "\
44561		       "/p:OutDir=\"$freetype_lib_path\" "\
44562		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44563    cmd /c freetype.bat
44564
44565    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44566      # If that succeeds we also build freetype.lib
44567      $ECHO -e "@echo off\n"\
44568	       "$MSBUILD $vcxproj_path "\
44569			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44570			 "/p:Configuration=\"Release Multithreaded\" "\
44571			 "/p:Platform=$freetype_platform "\
44572			 "/p:ConfigurationType=StaticLibrary "\
44573			 "/p:TargetName=freetype "\
44574			 "/p:OutDir=\"$freetype_lib_path\" "\
44575			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44576      cmd /c freetype.bat
44577
44578      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44579	# Once we build both, lib and dll, set freetype lib and include path appropriately
44580	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44581	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44582	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44583$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44584      else
44585	BUILD_FREETYPE=no
44586      fi
44587    else
44588      BUILD_FREETYPE=no
44589    fi
44590  fi
44591
44592        if test "x$BUILD_FREETYPE" = xyes; then
44593          # Okay, we built it. Check that it works.
44594
44595  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44596  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44597  METHOD="--with-freetype-src"
44598
44599  # Let's start with an optimistic view of the world :-)
44600  FOUND_FREETYPE=yes
44601
44602  # First look for the canonical freetype main include file ft2build.h.
44603  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44604    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44605    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44606    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44607      # Fail.
44608      FOUND_FREETYPE=no
44609    fi
44610  fi
44611
44612  if test "x$FOUND_FREETYPE" = xyes; then
44613    # Include file found, let's continue the sanity check.
44614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44615$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44616
44617    # Reset to default value
44618    FREETYPE_BASE_NAME=freetype
44619    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44620    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44621      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44622          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44623        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44624        # for the .6 version explicitly.
44625        FREETYPE_BASE_NAME=freetype.6
44626        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44627        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44628$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44629      else
44630        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44631$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44632        FOUND_FREETYPE=no
44633      fi
44634    else
44635      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44636        # On Windows, we will need both .lib and .dll file.
44637        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44638          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44640          FOUND_FREETYPE=no
44641        fi
44642      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44643          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44644        # Found lib in isa dir, use that instead.
44645        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44646        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44647$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44648      fi
44649    fi
44650  fi
44651
44652  if test "x$FOUND_FREETYPE" = xyes; then
44653
44654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44655
44656  # Input might be given as Windows format, start by converting to
44657  # unix format.
44658  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44659  new_path=`$CYGPATH -u "$path"`
44660
44661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44664  # "foo.exe" is OK but "foo" is an error.
44665  #
44666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44667  # It is also a way to make sure we got the proper file name for the real test later on.
44668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44669  if test "x$test_shortpath" = x; then
44670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44671$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44672    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44673  fi
44674
44675  # Call helper function which possibly converts this using DOS-style short mode.
44676  # If so, the updated path is stored in $new_path.
44677
44678  input_path="$new_path"
44679  # Check if we need to convert this using DOS-style short mode. If the path
44680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44681  # take no chances and rewrite it.
44682  # Note: m4 eats our [], so we need to use [ and ] instead.
44683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44684  if test "x$has_forbidden_chars" != x; then
44685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44689      # Going to short mode and back again did indeed matter. Since short mode is
44690      # case insensitive, let's make it lowercase to improve readability.
44691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44692      # Now convert it back to Unix-stile (cygpath)
44693      input_path=`$CYGPATH -u "$shortmode_path"`
44694      new_path="$input_path"
44695    fi
44696  fi
44697
44698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44699  if test "x$test_cygdrive_prefix" = x; then
44700    # As a simple fix, exclude /usr/bin since it's not a real path.
44701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44703      # a path prefixed by /cygdrive for fixpath to work.
44704      new_path="$CYGWIN_ROOT_PATH$input_path"
44705    fi
44706  fi
44707
44708
44709  if test "x$path" != "x$new_path"; then
44710    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44713  fi
44714
44715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44716
44717  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44718  has_colon=`$ECHO $path | $GREP ^.:`
44719  new_path="$path"
44720  if test "x$has_colon" = x; then
44721    # Not in mixed or Windows style, start by that.
44722    new_path=`cmd //c echo $path`
44723  fi
44724
44725
44726  input_path="$new_path"
44727  # Check if we need to convert this using DOS-style short mode. If the path
44728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44729  # take no chances and rewrite it.
44730  # Note: m4 eats our [], so we need to use [ and ] instead.
44731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44732  if test "x$has_forbidden_chars" != x; then
44733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44735  fi
44736
44737
44738  windows_path="$new_path"
44739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44740    unix_path=`$CYGPATH -u "$windows_path"`
44741    new_path="$unix_path"
44742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44744    new_path="$unix_path"
44745  fi
44746
44747  if test "x$path" != "x$new_path"; then
44748    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44751  fi
44752
44753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44755
44756  else
44757    # We're on a posix platform. Hooray! :)
44758    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44759    has_space=`$ECHO "$path" | $GREP " "`
44760    if test "x$has_space" != x; then
44761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44762$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44763      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44764    fi
44765
44766    # Use eval to expand a potential ~
44767    eval path="$path"
44768    if test ! -f "$path" && test ! -d "$path"; then
44769      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44770    fi
44771
44772    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44773  fi
44774
44775
44776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44777
44778  # Input might be given as Windows format, start by converting to
44779  # unix format.
44780  path="$POTENTIAL_FREETYPE_LIB_PATH"
44781  new_path=`$CYGPATH -u "$path"`
44782
44783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44786  # "foo.exe" is OK but "foo" is an error.
44787  #
44788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44789  # It is also a way to make sure we got the proper file name for the real test later on.
44790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44791  if test "x$test_shortpath" = x; then
44792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44794    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44795  fi
44796
44797  # Call helper function which possibly converts this using DOS-style short mode.
44798  # If so, the updated path is stored in $new_path.
44799
44800  input_path="$new_path"
44801  # Check if we need to convert this using DOS-style short mode. If the path
44802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44803  # take no chances and rewrite it.
44804  # Note: m4 eats our [], so we need to use [ and ] instead.
44805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44806  if test "x$has_forbidden_chars" != x; then
44807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44811      # Going to short mode and back again did indeed matter. Since short mode is
44812      # case insensitive, let's make it lowercase to improve readability.
44813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44814      # Now convert it back to Unix-stile (cygpath)
44815      input_path=`$CYGPATH -u "$shortmode_path"`
44816      new_path="$input_path"
44817    fi
44818  fi
44819
44820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44821  if test "x$test_cygdrive_prefix" = x; then
44822    # As a simple fix, exclude /usr/bin since it's not a real path.
44823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44825      # a path prefixed by /cygdrive for fixpath to work.
44826      new_path="$CYGWIN_ROOT_PATH$input_path"
44827    fi
44828  fi
44829
44830
44831  if test "x$path" != "x$new_path"; then
44832    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44834$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44835  fi
44836
44837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44838
44839  path="$POTENTIAL_FREETYPE_LIB_PATH"
44840  has_colon=`$ECHO $path | $GREP ^.:`
44841  new_path="$path"
44842  if test "x$has_colon" = x; then
44843    # Not in mixed or Windows style, start by that.
44844    new_path=`cmd //c echo $path`
44845  fi
44846
44847
44848  input_path="$new_path"
44849  # Check if we need to convert this using DOS-style short mode. If the path
44850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44851  # take no chances and rewrite it.
44852  # Note: m4 eats our [], so we need to use [ and ] instead.
44853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44854  if test "x$has_forbidden_chars" != x; then
44855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44857  fi
44858
44859
44860  windows_path="$new_path"
44861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44862    unix_path=`$CYGPATH -u "$windows_path"`
44863    new_path="$unix_path"
44864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44866    new_path="$unix_path"
44867  fi
44868
44869  if test "x$path" != "x$new_path"; then
44870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44873  fi
44874
44875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44877
44878  else
44879    # We're on a posix platform. Hooray! :)
44880    path="$POTENTIAL_FREETYPE_LIB_PATH"
44881    has_space=`$ECHO "$path" | $GREP " "`
44882    if test "x$has_space" != x; then
44883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44885      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44886    fi
44887
44888    # Use eval to expand a potential ~
44889    eval path="$path"
44890    if test ! -f "$path" && test ! -d "$path"; then
44891      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44892    fi
44893
44894    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44895  fi
44896
44897
44898    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44900$as_echo_n "checking for freetype includes... " >&6; }
44901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44902$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44903    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44905$as_echo_n "checking for freetype libraries... " >&6; }
44906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44907$as_echo "$FREETYPE_LIB_PATH" >&6; }
44908  fi
44909
44910          if test "x$FOUND_FREETYPE" != xyes; then
44911            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44912          fi
44913        else
44914          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44915$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44916          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44917        fi
44918      else
44919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44920$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44921      fi
44922    fi
44923
44924    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44925      # User has specified settings
44926
44927      if test "x$BUNDLE_FREETYPE" = x; then
44928        # If not specified, default is to bundle freetype
44929        BUNDLE_FREETYPE=yes
44930      fi
44931
44932      if test "x$with_freetype" != x; then
44933        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44934        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44935      fi
44936
44937      # Allow --with-freetype-lib and --with-freetype-include to override
44938      if test "x$with_freetype_include" != x; then
44939        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44940      fi
44941      if test "x$with_freetype_lib" != x; then
44942        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44943      fi
44944
44945      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44946        # Okay, we got it. Check that it works.
44947
44948  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44949  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44950  METHOD="--with-freetype"
44951
44952  # Let's start with an optimistic view of the world :-)
44953  FOUND_FREETYPE=yes
44954
44955  # First look for the canonical freetype main include file ft2build.h.
44956  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44957    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44958    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44959    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44960      # Fail.
44961      FOUND_FREETYPE=no
44962    fi
44963  fi
44964
44965  if test "x$FOUND_FREETYPE" = xyes; then
44966    # Include file found, let's continue the sanity check.
44967    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44968$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44969
44970    # Reset to default value
44971    FREETYPE_BASE_NAME=freetype
44972    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44973    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44974      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44975          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44976        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44977        # for the .6 version explicitly.
44978        FREETYPE_BASE_NAME=freetype.6
44979        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44980        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44981$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44982      else
44983        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44984$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44985        FOUND_FREETYPE=no
44986      fi
44987    else
44988      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44989        # On Windows, we will need both .lib and .dll file.
44990        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44991          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44992$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44993          FOUND_FREETYPE=no
44994        fi
44995      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44996          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44997        # Found lib in isa dir, use that instead.
44998        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44999        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45000$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45001      fi
45002    fi
45003  fi
45004
45005  if test "x$FOUND_FREETYPE" = xyes; then
45006
45007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45008
45009  # Input might be given as Windows format, start by converting to
45010  # unix format.
45011  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45012  new_path=`$CYGPATH -u "$path"`
45013
45014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45017  # "foo.exe" is OK but "foo" is an error.
45018  #
45019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45020  # It is also a way to make sure we got the proper file name for the real test later on.
45021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45022  if test "x$test_shortpath" = x; then
45023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45025    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45026  fi
45027
45028  # Call helper function which possibly converts this using DOS-style short mode.
45029  # If so, the updated path is stored in $new_path.
45030
45031  input_path="$new_path"
45032  # Check if we need to convert this using DOS-style short mode. If the path
45033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45034  # take no chances and rewrite it.
45035  # Note: m4 eats our [], so we need to use [ and ] instead.
45036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45037  if test "x$has_forbidden_chars" != x; then
45038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45042      # Going to short mode and back again did indeed matter. Since short mode is
45043      # case insensitive, let's make it lowercase to improve readability.
45044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45045      # Now convert it back to Unix-stile (cygpath)
45046      input_path=`$CYGPATH -u "$shortmode_path"`
45047      new_path="$input_path"
45048    fi
45049  fi
45050
45051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45052  if test "x$test_cygdrive_prefix" = x; then
45053    # As a simple fix, exclude /usr/bin since it's not a real path.
45054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45056      # a path prefixed by /cygdrive for fixpath to work.
45057      new_path="$CYGWIN_ROOT_PATH$input_path"
45058    fi
45059  fi
45060
45061
45062  if test "x$path" != "x$new_path"; then
45063    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45065$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45066  fi
45067
45068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45069
45070  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45071  has_colon=`$ECHO $path | $GREP ^.:`
45072  new_path="$path"
45073  if test "x$has_colon" = x; then
45074    # Not in mixed or Windows style, start by that.
45075    new_path=`cmd //c echo $path`
45076  fi
45077
45078
45079  input_path="$new_path"
45080  # Check if we need to convert this using DOS-style short mode. If the path
45081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45082  # take no chances and rewrite it.
45083  # Note: m4 eats our [], so we need to use [ and ] instead.
45084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45085  if test "x$has_forbidden_chars" != x; then
45086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45088  fi
45089
45090
45091  windows_path="$new_path"
45092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45093    unix_path=`$CYGPATH -u "$windows_path"`
45094    new_path="$unix_path"
45095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45097    new_path="$unix_path"
45098  fi
45099
45100  if test "x$path" != "x$new_path"; then
45101    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45103$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45104  fi
45105
45106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45108
45109  else
45110    # We're on a posix platform. Hooray! :)
45111    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45112    has_space=`$ECHO "$path" | $GREP " "`
45113    if test "x$has_space" != x; then
45114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45116      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45117    fi
45118
45119    # Use eval to expand a potential ~
45120    eval path="$path"
45121    if test ! -f "$path" && test ! -d "$path"; then
45122      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45123    fi
45124
45125    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45126  fi
45127
45128
45129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45130
45131  # Input might be given as Windows format, start by converting to
45132  # unix format.
45133  path="$POTENTIAL_FREETYPE_LIB_PATH"
45134  new_path=`$CYGPATH -u "$path"`
45135
45136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45139  # "foo.exe" is OK but "foo" is an error.
45140  #
45141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45142  # It is also a way to make sure we got the proper file name for the real test later on.
45143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45144  if test "x$test_shortpath" = x; then
45145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45146$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45147    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45148  fi
45149
45150  # Call helper function which possibly converts this using DOS-style short mode.
45151  # If so, the updated path is stored in $new_path.
45152
45153  input_path="$new_path"
45154  # Check if we need to convert this using DOS-style short mode. If the path
45155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45156  # take no chances and rewrite it.
45157  # Note: m4 eats our [], so we need to use [ and ] instead.
45158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45159  if test "x$has_forbidden_chars" != x; then
45160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45164      # Going to short mode and back again did indeed matter. Since short mode is
45165      # case insensitive, let's make it lowercase to improve readability.
45166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45167      # Now convert it back to Unix-stile (cygpath)
45168      input_path=`$CYGPATH -u "$shortmode_path"`
45169      new_path="$input_path"
45170    fi
45171  fi
45172
45173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45174  if test "x$test_cygdrive_prefix" = x; then
45175    # As a simple fix, exclude /usr/bin since it's not a real path.
45176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45178      # a path prefixed by /cygdrive for fixpath to work.
45179      new_path="$CYGWIN_ROOT_PATH$input_path"
45180    fi
45181  fi
45182
45183
45184  if test "x$path" != "x$new_path"; then
45185    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45188  fi
45189
45190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45191
45192  path="$POTENTIAL_FREETYPE_LIB_PATH"
45193  has_colon=`$ECHO $path | $GREP ^.:`
45194  new_path="$path"
45195  if test "x$has_colon" = x; then
45196    # Not in mixed or Windows style, start by that.
45197    new_path=`cmd //c echo $path`
45198  fi
45199
45200
45201  input_path="$new_path"
45202  # Check if we need to convert this using DOS-style short mode. If the path
45203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45204  # take no chances and rewrite it.
45205  # Note: m4 eats our [], so we need to use [ and ] instead.
45206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45207  if test "x$has_forbidden_chars" != x; then
45208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45210  fi
45211
45212
45213  windows_path="$new_path"
45214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45215    unix_path=`$CYGPATH -u "$windows_path"`
45216    new_path="$unix_path"
45217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45219    new_path="$unix_path"
45220  fi
45221
45222  if test "x$path" != "x$new_path"; then
45223    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45225$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45226  fi
45227
45228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45230
45231  else
45232    # We're on a posix platform. Hooray! :)
45233    path="$POTENTIAL_FREETYPE_LIB_PATH"
45234    has_space=`$ECHO "$path" | $GREP " "`
45235    if test "x$has_space" != x; then
45236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45237$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45238      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45239    fi
45240
45241    # Use eval to expand a potential ~
45242    eval path="$path"
45243    if test ! -f "$path" && test ! -d "$path"; then
45244      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45245    fi
45246
45247    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45248  fi
45249
45250
45251    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45253$as_echo_n "checking for freetype includes... " >&6; }
45254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45255$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45256    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45258$as_echo_n "checking for freetype libraries... " >&6; }
45259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45260$as_echo "$FREETYPE_LIB_PATH" >&6; }
45261  fi
45262
45263        if test "x$FOUND_FREETYPE" != xyes; then
45264          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45265        fi
45266      else
45267        # User specified only one of lib or include. This is an error.
45268        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45269          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45270$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45271          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45272        else
45273          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45274$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45275          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45276        fi
45277      fi
45278    else
45279      # User did not specify settings, but we need freetype. Try to locate it.
45280
45281      if test "x$BUNDLE_FREETYPE" = x; then
45282        # If not specified, default is to bundle freetype only on windows
45283        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45284          BUNDLE_FREETYPE=yes
45285        else
45286          BUNDLE_FREETYPE=no
45287        fi
45288      fi
45289
45290      if test "x$FOUND_FREETYPE" != xyes; then
45291        # Check builddeps
45292
45293
45294  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45295    # Source the builddeps file again, to make sure it uses the latest variables!
45296    . $builddepsfile
45297    # Look for a target and build machine specific resource!
45298    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45299    if test "x$resource" = x; then
45300      # Ok, lets instead look for a target specific resource
45301      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45302    fi
45303    if test "x$resource" = x; then
45304      # Ok, lets instead look for a build specific resource
45305      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45306    fi
45307    if test "x$resource" = x; then
45308      # Ok, lets instead look for a generic resource
45309      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45310      resource=${builddep_freetype2}
45311    fi
45312    if test "x$resource" != x; then
45313      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45314$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45315      # If the resource in the builddeps.conf file is an existing directory,
45316      # for example /java/linux/cups
45317      if test -d ${resource}; then
45318        depdir=${resource}
45319      else
45320
45321  # freetype2 is for example mymodule
45322  # $resource is for example libs/general/libmymod_1_2_3.zip
45323  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45324  # $with_builddeps_dir is for example /localhome/builddeps
45325  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45326  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45327  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45328  filename=`basename $resource`
45329  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45330  filebase=${filename%%.*}
45331  extension=${filename#*.}
45332  installdir=$with_builddeps_dir/$filebase
45333  if test ! -f $installdir/$filename.unpacked; then
45334    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45335$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45336    if test ! -d $installdir; then
45337      mkdir -p $installdir
45338    fi
45339    if test ! -d $installdir; then
45340      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45341    fi
45342    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45343    touch $tmpfile
45344    if test ! -f $tmpfile; then
45345      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45346    fi
45347
45348  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45349  # $tmpfile is the local file name for the downloaded file.
45350  VALID_TOOL=no
45351  if test "x$BDEPS_FTP" = xwget; then
45352    VALID_TOOL=yes
45353    wget -O $tmpfile $with_builddeps_server/$resource
45354  fi
45355  if test "x$BDEPS_FTP" = xlftp; then
45356    VALID_TOOL=yes
45357    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45358  fi
45359  if test "x$BDEPS_FTP" = xftp; then
45360    VALID_TOOL=yes
45361    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45362    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45363    FTPUSERPWD=${FTPSERVER%%@*}
45364    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45365      FTPUSER=${userpwd%%:*}
45366      FTPPWD=${userpwd#*@}
45367      FTPSERVER=${FTPSERVER#*@}
45368    else
45369      FTPUSER=ftp
45370      FTPPWD=ftp
45371    fi
45372    # the "pass" command does not work on some
45373    # ftp clients (read ftp.exe) but if it works,
45374    # passive mode is better!
45375    ( \
45376        echo "user $FTPUSER $FTPPWD"        ; \
45377        echo "pass"                         ; \
45378        echo "bin"                          ; \
45379        echo "get $FTPPATH $tmpfile"              ; \
45380    ) | ftp -in $FTPSERVER
45381  fi
45382  if test "x$VALID_TOOL" != xyes; then
45383    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45384  fi
45385
45386    mv $tmpfile $installdir/$filename
45387    if test ! -s $installdir/$filename; then
45388      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45389    fi
45390    case "$extension" in
45391      zip)  echo "Unzipping $installdir/$filename..."
45392        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45393        ;;
45394      tar.gz) echo "Untaring $installdir/$filename..."
45395        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45396        ;;
45397      tgz) echo "Untaring $installdir/$filename..."
45398        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45399        ;;
45400      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45401        ;;
45402    esac
45403  fi
45404  if test -f $installdir/$filename.unpacked; then
45405    depdir=$installdir
45406  fi
45407
45408      fi
45409      # Source the builddeps file again, because in the previous command, the depdir
45410      # was updated to point at the current build dependency install directory.
45411      . $builddepsfile
45412      # Now extract variables from the builddeps.conf files.
45413      theroot=${builddep_freetype2_ROOT}
45414      thecflags=${builddep_freetype2_CFLAGS}
45415      thelibs=${builddep_freetype2_LIBS}
45416      if test "x$depdir" = x; then
45417        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45418      fi
45419      FREETYPE=$depdir
45420      if test "x$theroot" != x; then
45421        FREETYPE="$theroot"
45422      fi
45423      if test "x$thecflags" != x; then
45424        FREETYPE_CFLAGS="$thecflags"
45425      fi
45426      if test "x$thelibs" != x; then
45427        FREETYPE_LIBS="$thelibs"
45428      fi
45429      FOUND_FREETYPE=yes
45430      else FOUND_FREETYPE=no
45431
45432    fi
45433    else FOUND_FREETYPE=no
45434
45435  fi
45436
45437        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45438        if test "x$FOUND_FREETYPE" = xyes; then
45439          if test "x$BUNDLE_FREETYPE" = xyes; then
45440            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45441$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45442            FOUND_FREETYPE=no
45443          else
45444            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45445$as_echo_n "checking for freetype... " >&6; }
45446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45447$as_echo "yes (using builddeps)" >&6; }
45448          fi
45449        fi
45450      fi
45451
45452      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45453      if test "x$SYSROOT" = x; then
45454        if test "x$FOUND_FREETYPE" != xyes; then
45455          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45456          if test "x$PKG_CONFIG" != x; then
45457
45458pkg_failed=no
45459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45460$as_echo_n "checking for FREETYPE... " >&6; }
45461
45462if test -n "$FREETYPE_CFLAGS"; then
45463    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45464 elif test -n "$PKG_CONFIG"; then
45465    if test -n "$PKG_CONFIG" && \
45466    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45467  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45468  ac_status=$?
45469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45470  test $ac_status = 0; }; then
45471  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45472else
45473  pkg_failed=yes
45474fi
45475 else
45476    pkg_failed=untried
45477fi
45478if test -n "$FREETYPE_LIBS"; then
45479    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45480 elif test -n "$PKG_CONFIG"; then
45481    if test -n "$PKG_CONFIG" && \
45482    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45483  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45484  ac_status=$?
45485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45486  test $ac_status = 0; }; then
45487  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45488else
45489  pkg_failed=yes
45490fi
45491 else
45492    pkg_failed=untried
45493fi
45494
45495
45496
45497if test $pkg_failed = yes; then
45498
45499if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45500        _pkg_short_errors_supported=yes
45501else
45502        _pkg_short_errors_supported=no
45503fi
45504        if test $_pkg_short_errors_supported = yes; then
45505	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45506        else
45507	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45508        fi
45509	# Put the nasty error message in config.log where it belongs
45510	echo "$FREETYPE_PKG_ERRORS" >&5
45511
45512	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45513$as_echo "no" >&6; }
45514                FOUND_FREETYPE=no
45515elif test $pkg_failed = untried; then
45516	FOUND_FREETYPE=no
45517else
45518	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45519	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45521$as_echo "yes" >&6; }
45522	FOUND_FREETYPE=yes
45523fi
45524            if test "x$FOUND_FREETYPE" = xyes; then
45525              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45526              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45527              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45528              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45529                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45530              fi
45531              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45532              if test "x$BUNDLE_FREETYPE" = xyes; then
45533                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45534$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45535                FOUND_FREETYPE=no
45536              else
45537                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45538$as_echo_n "checking for freetype... " >&6; }
45539                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45540$as_echo "yes (using pkg-config)" >&6; }
45541              fi
45542            fi
45543          fi
45544        fi
45545      fi
45546
45547      if test "x$FOUND_FREETYPE" != xyes; then
45548        # Check in well-known locations
45549        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45550          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45551
45552  windows_path="$FREETYPE_BASE_DIR"
45553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45554    unix_path=`$CYGPATH -u "$windows_path"`
45555    FREETYPE_BASE_DIR="$unix_path"
45556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45558    FREETYPE_BASE_DIR="$unix_path"
45559  fi
45560
45561
45562  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45563  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45564  METHOD="well-known location"
45565
45566  # Let's start with an optimistic view of the world :-)
45567  FOUND_FREETYPE=yes
45568
45569  # First look for the canonical freetype main include file ft2build.h.
45570  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45571    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45572    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45573    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45574      # Fail.
45575      FOUND_FREETYPE=no
45576    fi
45577  fi
45578
45579  if test "x$FOUND_FREETYPE" = xyes; then
45580    # Include file found, let's continue the sanity check.
45581    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45582$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45583
45584    # Reset to default value
45585    FREETYPE_BASE_NAME=freetype
45586    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45587    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45588      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45589          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45590        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45591        # for the .6 version explicitly.
45592        FREETYPE_BASE_NAME=freetype.6
45593        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45594        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45595$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45596      else
45597        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45598$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45599        FOUND_FREETYPE=no
45600      fi
45601    else
45602      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45603        # On Windows, we will need both .lib and .dll file.
45604        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45605          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45606$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45607          FOUND_FREETYPE=no
45608        fi
45609      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45610          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45611        # Found lib in isa dir, use that instead.
45612        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45613        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45614$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45615      fi
45616    fi
45617  fi
45618
45619  if test "x$FOUND_FREETYPE" = xyes; then
45620
45621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45622
45623  # Input might be given as Windows format, start by converting to
45624  # unix format.
45625  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45626  new_path=`$CYGPATH -u "$path"`
45627
45628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45631  # "foo.exe" is OK but "foo" is an error.
45632  #
45633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45634  # It is also a way to make sure we got the proper file name for the real test later on.
45635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45636  if test "x$test_shortpath" = x; then
45637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45638$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45639    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45640  fi
45641
45642  # Call helper function which possibly converts this using DOS-style short mode.
45643  # If so, the updated path is stored in $new_path.
45644
45645  input_path="$new_path"
45646  # Check if we need to convert this using DOS-style short mode. If the path
45647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45648  # take no chances and rewrite it.
45649  # Note: m4 eats our [], so we need to use [ and ] instead.
45650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45651  if test "x$has_forbidden_chars" != x; then
45652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45656      # Going to short mode and back again did indeed matter. Since short mode is
45657      # case insensitive, let's make it lowercase to improve readability.
45658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45659      # Now convert it back to Unix-stile (cygpath)
45660      input_path=`$CYGPATH -u "$shortmode_path"`
45661      new_path="$input_path"
45662    fi
45663  fi
45664
45665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45666  if test "x$test_cygdrive_prefix" = x; then
45667    # As a simple fix, exclude /usr/bin since it's not a real path.
45668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45670      # a path prefixed by /cygdrive for fixpath to work.
45671      new_path="$CYGWIN_ROOT_PATH$input_path"
45672    fi
45673  fi
45674
45675
45676  if test "x$path" != "x$new_path"; then
45677    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45680  fi
45681
45682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45683
45684  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45685  has_colon=`$ECHO $path | $GREP ^.:`
45686  new_path="$path"
45687  if test "x$has_colon" = x; then
45688    # Not in mixed or Windows style, start by that.
45689    new_path=`cmd //c echo $path`
45690  fi
45691
45692
45693  input_path="$new_path"
45694  # Check if we need to convert this using DOS-style short mode. If the path
45695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45696  # take no chances and rewrite it.
45697  # Note: m4 eats our [], so we need to use [ and ] instead.
45698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45699  if test "x$has_forbidden_chars" != x; then
45700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45702  fi
45703
45704
45705  windows_path="$new_path"
45706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45707    unix_path=`$CYGPATH -u "$windows_path"`
45708    new_path="$unix_path"
45709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45711    new_path="$unix_path"
45712  fi
45713
45714  if test "x$path" != "x$new_path"; then
45715    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45718  fi
45719
45720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45722
45723  else
45724    # We're on a posix platform. Hooray! :)
45725    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45726    has_space=`$ECHO "$path" | $GREP " "`
45727    if test "x$has_space" != x; then
45728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45730      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45731    fi
45732
45733    # Use eval to expand a potential ~
45734    eval path="$path"
45735    if test ! -f "$path" && test ! -d "$path"; then
45736      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45737    fi
45738
45739    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45740  fi
45741
45742
45743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45744
45745  # Input might be given as Windows format, start by converting to
45746  # unix format.
45747  path="$POTENTIAL_FREETYPE_LIB_PATH"
45748  new_path=`$CYGPATH -u "$path"`
45749
45750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45753  # "foo.exe" is OK but "foo" is an error.
45754  #
45755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45756  # It is also a way to make sure we got the proper file name for the real test later on.
45757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45758  if test "x$test_shortpath" = x; then
45759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45760$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45761    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45762  fi
45763
45764  # Call helper function which possibly converts this using DOS-style short mode.
45765  # If so, the updated path is stored in $new_path.
45766
45767  input_path="$new_path"
45768  # Check if we need to convert this using DOS-style short mode. If the path
45769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45770  # take no chances and rewrite it.
45771  # Note: m4 eats our [], so we need to use [ and ] instead.
45772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45773  if test "x$has_forbidden_chars" != x; then
45774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45778      # Going to short mode and back again did indeed matter. Since short mode is
45779      # case insensitive, let's make it lowercase to improve readability.
45780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45781      # Now convert it back to Unix-stile (cygpath)
45782      input_path=`$CYGPATH -u "$shortmode_path"`
45783      new_path="$input_path"
45784    fi
45785  fi
45786
45787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45788  if test "x$test_cygdrive_prefix" = x; then
45789    # As a simple fix, exclude /usr/bin since it's not a real path.
45790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45792      # a path prefixed by /cygdrive for fixpath to work.
45793      new_path="$CYGWIN_ROOT_PATH$input_path"
45794    fi
45795  fi
45796
45797
45798  if test "x$path" != "x$new_path"; then
45799    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45801$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45802  fi
45803
45804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45805
45806  path="$POTENTIAL_FREETYPE_LIB_PATH"
45807  has_colon=`$ECHO $path | $GREP ^.:`
45808  new_path="$path"
45809  if test "x$has_colon" = x; then
45810    # Not in mixed or Windows style, start by that.
45811    new_path=`cmd //c echo $path`
45812  fi
45813
45814
45815  input_path="$new_path"
45816  # Check if we need to convert this using DOS-style short mode. If the path
45817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45818  # take no chances and rewrite it.
45819  # Note: m4 eats our [], so we need to use [ and ] instead.
45820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45821  if test "x$has_forbidden_chars" != x; then
45822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45824  fi
45825
45826
45827  windows_path="$new_path"
45828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45829    unix_path=`$CYGPATH -u "$windows_path"`
45830    new_path="$unix_path"
45831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45833    new_path="$unix_path"
45834  fi
45835
45836  if test "x$path" != "x$new_path"; then
45837    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45840  fi
45841
45842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45844
45845  else
45846    # We're on a posix platform. Hooray! :)
45847    path="$POTENTIAL_FREETYPE_LIB_PATH"
45848    has_space=`$ECHO "$path" | $GREP " "`
45849    if test "x$has_space" != x; then
45850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45852      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45853    fi
45854
45855    # Use eval to expand a potential ~
45856    eval path="$path"
45857    if test ! -f "$path" && test ! -d "$path"; then
45858      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45859    fi
45860
45861    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45862  fi
45863
45864
45865    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45867$as_echo_n "checking for freetype includes... " >&6; }
45868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45869$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45870    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45872$as_echo_n "checking for freetype libraries... " >&6; }
45873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45874$as_echo "$FREETYPE_LIB_PATH" >&6; }
45875  fi
45876
45877          if test "x$FOUND_FREETYPE" != xyes; then
45878            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45879
45880  windows_path="$FREETYPE_BASE_DIR"
45881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45882    unix_path=`$CYGPATH -u "$windows_path"`
45883    FREETYPE_BASE_DIR="$unix_path"
45884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45886    FREETYPE_BASE_DIR="$unix_path"
45887  fi
45888
45889
45890  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45891  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45892  METHOD="well-known location"
45893
45894  # Let's start with an optimistic view of the world :-)
45895  FOUND_FREETYPE=yes
45896
45897  # First look for the canonical freetype main include file ft2build.h.
45898  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45899    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45900    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45901    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45902      # Fail.
45903      FOUND_FREETYPE=no
45904    fi
45905  fi
45906
45907  if test "x$FOUND_FREETYPE" = xyes; then
45908    # Include file found, let's continue the sanity check.
45909    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45910$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45911
45912    # Reset to default value
45913    FREETYPE_BASE_NAME=freetype
45914    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45915    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45916      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45917          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45918        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45919        # for the .6 version explicitly.
45920        FREETYPE_BASE_NAME=freetype.6
45921        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45922        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45923$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45924      else
45925        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45926$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45927        FOUND_FREETYPE=no
45928      fi
45929    else
45930      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45931        # On Windows, we will need both .lib and .dll file.
45932        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45933          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45934$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45935          FOUND_FREETYPE=no
45936        fi
45937      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45938          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45939        # Found lib in isa dir, use that instead.
45940        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45941        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45942$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45943      fi
45944    fi
45945  fi
45946
45947  if test "x$FOUND_FREETYPE" = xyes; then
45948
45949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45950
45951  # Input might be given as Windows format, start by converting to
45952  # unix format.
45953  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45954  new_path=`$CYGPATH -u "$path"`
45955
45956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45959  # "foo.exe" is OK but "foo" is an error.
45960  #
45961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45962  # It is also a way to make sure we got the proper file name for the real test later on.
45963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45964  if test "x$test_shortpath" = x; then
45965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45966$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45967    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45968  fi
45969
45970  # Call helper function which possibly converts this using DOS-style short mode.
45971  # If so, the updated path is stored in $new_path.
45972
45973  input_path="$new_path"
45974  # Check if we need to convert this using DOS-style short mode. If the path
45975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45976  # take no chances and rewrite it.
45977  # Note: m4 eats our [], so we need to use [ and ] instead.
45978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45979  if test "x$has_forbidden_chars" != x; then
45980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45984      # Going to short mode and back again did indeed matter. Since short mode is
45985      # case insensitive, let's make it lowercase to improve readability.
45986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45987      # Now convert it back to Unix-stile (cygpath)
45988      input_path=`$CYGPATH -u "$shortmode_path"`
45989      new_path="$input_path"
45990    fi
45991  fi
45992
45993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45994  if test "x$test_cygdrive_prefix" = x; then
45995    # As a simple fix, exclude /usr/bin since it's not a real path.
45996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45998      # a path prefixed by /cygdrive for fixpath to work.
45999      new_path="$CYGWIN_ROOT_PATH$input_path"
46000    fi
46001  fi
46002
46003
46004  if test "x$path" != "x$new_path"; then
46005    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46007$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46008  fi
46009
46010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46011
46012  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46013  has_colon=`$ECHO $path | $GREP ^.:`
46014  new_path="$path"
46015  if test "x$has_colon" = x; then
46016    # Not in mixed or Windows style, start by that.
46017    new_path=`cmd //c echo $path`
46018  fi
46019
46020
46021  input_path="$new_path"
46022  # Check if we need to convert this using DOS-style short mode. If the path
46023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46024  # take no chances and rewrite it.
46025  # Note: m4 eats our [], so we need to use [ and ] instead.
46026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46027  if test "x$has_forbidden_chars" != x; then
46028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46030  fi
46031
46032
46033  windows_path="$new_path"
46034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46035    unix_path=`$CYGPATH -u "$windows_path"`
46036    new_path="$unix_path"
46037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46039    new_path="$unix_path"
46040  fi
46041
46042  if test "x$path" != "x$new_path"; then
46043    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46046  fi
46047
46048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46050
46051  else
46052    # We're on a posix platform. Hooray! :)
46053    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46054    has_space=`$ECHO "$path" | $GREP " "`
46055    if test "x$has_space" != x; then
46056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46057$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46058      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46059    fi
46060
46061    # Use eval to expand a potential ~
46062    eval path="$path"
46063    if test ! -f "$path" && test ! -d "$path"; then
46064      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46065    fi
46066
46067    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46068  fi
46069
46070
46071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46072
46073  # Input might be given as Windows format, start by converting to
46074  # unix format.
46075  path="$POTENTIAL_FREETYPE_LIB_PATH"
46076  new_path=`$CYGPATH -u "$path"`
46077
46078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46081  # "foo.exe" is OK but "foo" is an error.
46082  #
46083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46084  # It is also a way to make sure we got the proper file name for the real test later on.
46085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46086  if test "x$test_shortpath" = x; then
46087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46089    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46090  fi
46091
46092  # Call helper function which possibly converts this using DOS-style short mode.
46093  # If so, the updated path is stored in $new_path.
46094
46095  input_path="$new_path"
46096  # Check if we need to convert this using DOS-style short mode. If the path
46097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46098  # take no chances and rewrite it.
46099  # Note: m4 eats our [], so we need to use [ and ] instead.
46100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46101  if test "x$has_forbidden_chars" != x; then
46102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46106      # Going to short mode and back again did indeed matter. Since short mode is
46107      # case insensitive, let's make it lowercase to improve readability.
46108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46109      # Now convert it back to Unix-stile (cygpath)
46110      input_path=`$CYGPATH -u "$shortmode_path"`
46111      new_path="$input_path"
46112    fi
46113  fi
46114
46115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46116  if test "x$test_cygdrive_prefix" = x; then
46117    # As a simple fix, exclude /usr/bin since it's not a real path.
46118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46120      # a path prefixed by /cygdrive for fixpath to work.
46121      new_path="$CYGWIN_ROOT_PATH$input_path"
46122    fi
46123  fi
46124
46125
46126  if test "x$path" != "x$new_path"; then
46127    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46129$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46130  fi
46131
46132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46133
46134  path="$POTENTIAL_FREETYPE_LIB_PATH"
46135  has_colon=`$ECHO $path | $GREP ^.:`
46136  new_path="$path"
46137  if test "x$has_colon" = x; then
46138    # Not in mixed or Windows style, start by that.
46139    new_path=`cmd //c echo $path`
46140  fi
46141
46142
46143  input_path="$new_path"
46144  # Check if we need to convert this using DOS-style short mode. If the path
46145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46146  # take no chances and rewrite it.
46147  # Note: m4 eats our [], so we need to use [ and ] instead.
46148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46149  if test "x$has_forbidden_chars" != x; then
46150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46152  fi
46153
46154
46155  windows_path="$new_path"
46156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46157    unix_path=`$CYGPATH -u "$windows_path"`
46158    new_path="$unix_path"
46159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46161    new_path="$unix_path"
46162  fi
46163
46164  if test "x$path" != "x$new_path"; then
46165    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46168  fi
46169
46170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46172
46173  else
46174    # We're on a posix platform. Hooray! :)
46175    path="$POTENTIAL_FREETYPE_LIB_PATH"
46176    has_space=`$ECHO "$path" | $GREP " "`
46177    if test "x$has_space" != x; then
46178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46180      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46181    fi
46182
46183    # Use eval to expand a potential ~
46184    eval path="$path"
46185    if test ! -f "$path" && test ! -d "$path"; then
46186      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46187    fi
46188
46189    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46190  fi
46191
46192
46193    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46195$as_echo_n "checking for freetype includes... " >&6; }
46196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46197$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46198    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46200$as_echo_n "checking for freetype libraries... " >&6; }
46201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46202$as_echo "$FREETYPE_LIB_PATH" >&6; }
46203  fi
46204
46205          fi
46206        else
46207          FREETYPE_BASE_DIR="$SYSROOT/usr"
46208
46209  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46210  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46211  METHOD="well-known location"
46212
46213  # Let's start with an optimistic view of the world :-)
46214  FOUND_FREETYPE=yes
46215
46216  # First look for the canonical freetype main include file ft2build.h.
46217  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46218    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46219    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46220    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46221      # Fail.
46222      FOUND_FREETYPE=no
46223    fi
46224  fi
46225
46226  if test "x$FOUND_FREETYPE" = xyes; then
46227    # Include file found, let's continue the sanity check.
46228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46229$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46230
46231    # Reset to default value
46232    FREETYPE_BASE_NAME=freetype
46233    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46234    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46235      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46236          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46237        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46238        # for the .6 version explicitly.
46239        FREETYPE_BASE_NAME=freetype.6
46240        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46241        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46242$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46243      else
46244        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46245$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46246        FOUND_FREETYPE=no
46247      fi
46248    else
46249      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46250        # On Windows, we will need both .lib and .dll file.
46251        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46252          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46253$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46254          FOUND_FREETYPE=no
46255        fi
46256      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46257          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46258        # Found lib in isa dir, use that instead.
46259        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46260        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46261$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46262      fi
46263    fi
46264  fi
46265
46266  if test "x$FOUND_FREETYPE" = xyes; then
46267
46268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46269
46270  # Input might be given as Windows format, start by converting to
46271  # unix format.
46272  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46273  new_path=`$CYGPATH -u "$path"`
46274
46275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46278  # "foo.exe" is OK but "foo" is an error.
46279  #
46280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46281  # It is also a way to make sure we got the proper file name for the real test later on.
46282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46283  if test "x$test_shortpath" = x; then
46284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46285$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46286    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46287  fi
46288
46289  # Call helper function which possibly converts this using DOS-style short mode.
46290  # If so, the updated path is stored in $new_path.
46291
46292  input_path="$new_path"
46293  # Check if we need to convert this using DOS-style short mode. If the path
46294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46295  # take no chances and rewrite it.
46296  # Note: m4 eats our [], so we need to use [ and ] instead.
46297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46298  if test "x$has_forbidden_chars" != x; then
46299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46303      # Going to short mode and back again did indeed matter. Since short mode is
46304      # case insensitive, let's make it lowercase to improve readability.
46305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46306      # Now convert it back to Unix-stile (cygpath)
46307      input_path=`$CYGPATH -u "$shortmode_path"`
46308      new_path="$input_path"
46309    fi
46310  fi
46311
46312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46313  if test "x$test_cygdrive_prefix" = x; then
46314    # As a simple fix, exclude /usr/bin since it's not a real path.
46315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46317      # a path prefixed by /cygdrive for fixpath to work.
46318      new_path="$CYGWIN_ROOT_PATH$input_path"
46319    fi
46320  fi
46321
46322
46323  if test "x$path" != "x$new_path"; then
46324    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46326$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46327  fi
46328
46329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46330
46331  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46332  has_colon=`$ECHO $path | $GREP ^.:`
46333  new_path="$path"
46334  if test "x$has_colon" = x; then
46335    # Not in mixed or Windows style, start by that.
46336    new_path=`cmd //c echo $path`
46337  fi
46338
46339
46340  input_path="$new_path"
46341  # Check if we need to convert this using DOS-style short mode. If the path
46342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46343  # take no chances and rewrite it.
46344  # Note: m4 eats our [], so we need to use [ and ] instead.
46345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46346  if test "x$has_forbidden_chars" != x; then
46347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46349  fi
46350
46351
46352  windows_path="$new_path"
46353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46354    unix_path=`$CYGPATH -u "$windows_path"`
46355    new_path="$unix_path"
46356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46358    new_path="$unix_path"
46359  fi
46360
46361  if test "x$path" != "x$new_path"; then
46362    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46364$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46365  fi
46366
46367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46369
46370  else
46371    # We're on a posix platform. Hooray! :)
46372    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46373    has_space=`$ECHO "$path" | $GREP " "`
46374    if test "x$has_space" != x; then
46375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46376$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46377      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46378    fi
46379
46380    # Use eval to expand a potential ~
46381    eval path="$path"
46382    if test ! -f "$path" && test ! -d "$path"; then
46383      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46384    fi
46385
46386    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46387  fi
46388
46389
46390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46391
46392  # Input might be given as Windows format, start by converting to
46393  # unix format.
46394  path="$POTENTIAL_FREETYPE_LIB_PATH"
46395  new_path=`$CYGPATH -u "$path"`
46396
46397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46400  # "foo.exe" is OK but "foo" is an error.
46401  #
46402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46403  # It is also a way to make sure we got the proper file name for the real test later on.
46404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46405  if test "x$test_shortpath" = x; then
46406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46407$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46408    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46409  fi
46410
46411  # Call helper function which possibly converts this using DOS-style short mode.
46412  # If so, the updated path is stored in $new_path.
46413
46414  input_path="$new_path"
46415  # Check if we need to convert this using DOS-style short mode. If the path
46416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46417  # take no chances and rewrite it.
46418  # Note: m4 eats our [], so we need to use [ and ] instead.
46419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46420  if test "x$has_forbidden_chars" != x; then
46421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46425      # Going to short mode and back again did indeed matter. Since short mode is
46426      # case insensitive, let's make it lowercase to improve readability.
46427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46428      # Now convert it back to Unix-stile (cygpath)
46429      input_path=`$CYGPATH -u "$shortmode_path"`
46430      new_path="$input_path"
46431    fi
46432  fi
46433
46434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46435  if test "x$test_cygdrive_prefix" = x; then
46436    # As a simple fix, exclude /usr/bin since it's not a real path.
46437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46439      # a path prefixed by /cygdrive for fixpath to work.
46440      new_path="$CYGWIN_ROOT_PATH$input_path"
46441    fi
46442  fi
46443
46444
46445  if test "x$path" != "x$new_path"; then
46446    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46448$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46449  fi
46450
46451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46452
46453  path="$POTENTIAL_FREETYPE_LIB_PATH"
46454  has_colon=`$ECHO $path | $GREP ^.:`
46455  new_path="$path"
46456  if test "x$has_colon" = x; then
46457    # Not in mixed or Windows style, start by that.
46458    new_path=`cmd //c echo $path`
46459  fi
46460
46461
46462  input_path="$new_path"
46463  # Check if we need to convert this using DOS-style short mode. If the path
46464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46465  # take no chances and rewrite it.
46466  # Note: m4 eats our [], so we need to use [ and ] instead.
46467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46468  if test "x$has_forbidden_chars" != x; then
46469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46471  fi
46472
46473
46474  windows_path="$new_path"
46475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46476    unix_path=`$CYGPATH -u "$windows_path"`
46477    new_path="$unix_path"
46478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46480    new_path="$unix_path"
46481  fi
46482
46483  if test "x$path" != "x$new_path"; then
46484    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46486$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46487  fi
46488
46489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46491
46492  else
46493    # We're on a posix platform. Hooray! :)
46494    path="$POTENTIAL_FREETYPE_LIB_PATH"
46495    has_space=`$ECHO "$path" | $GREP " "`
46496    if test "x$has_space" != x; then
46497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46499      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46500    fi
46501
46502    # Use eval to expand a potential ~
46503    eval path="$path"
46504    if test ! -f "$path" && test ! -d "$path"; then
46505      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46506    fi
46507
46508    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46509  fi
46510
46511
46512    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46514$as_echo_n "checking for freetype includes... " >&6; }
46515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46516$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46517    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46519$as_echo_n "checking for freetype libraries... " >&6; }
46520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46521$as_echo "$FREETYPE_LIB_PATH" >&6; }
46522  fi
46523
46524
46525          if test "x$FOUND_FREETYPE" != xyes; then
46526            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46527
46528  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46529  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46530  METHOD="well-known location"
46531
46532  # Let's start with an optimistic view of the world :-)
46533  FOUND_FREETYPE=yes
46534
46535  # First look for the canonical freetype main include file ft2build.h.
46536  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46537    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46538    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46539    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46540      # Fail.
46541      FOUND_FREETYPE=no
46542    fi
46543  fi
46544
46545  if test "x$FOUND_FREETYPE" = xyes; then
46546    # Include file found, let's continue the sanity check.
46547    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46548$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46549
46550    # Reset to default value
46551    FREETYPE_BASE_NAME=freetype
46552    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46553    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46554      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46555          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46556        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46557        # for the .6 version explicitly.
46558        FREETYPE_BASE_NAME=freetype.6
46559        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46560        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46561$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46562      else
46563        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46564$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46565        FOUND_FREETYPE=no
46566      fi
46567    else
46568      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46569        # On Windows, we will need both .lib and .dll file.
46570        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46571          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46572$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46573          FOUND_FREETYPE=no
46574        fi
46575      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46576          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46577        # Found lib in isa dir, use that instead.
46578        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46579        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46580$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46581      fi
46582    fi
46583  fi
46584
46585  if test "x$FOUND_FREETYPE" = xyes; then
46586
46587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46588
46589  # Input might be given as Windows format, start by converting to
46590  # unix format.
46591  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46592  new_path=`$CYGPATH -u "$path"`
46593
46594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46597  # "foo.exe" is OK but "foo" is an error.
46598  #
46599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46600  # It is also a way to make sure we got the proper file name for the real test later on.
46601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46602  if test "x$test_shortpath" = x; then
46603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46605    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46606  fi
46607
46608  # Call helper function which possibly converts this using DOS-style short mode.
46609  # If so, the updated path is stored in $new_path.
46610
46611  input_path="$new_path"
46612  # Check if we need to convert this using DOS-style short mode. If the path
46613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46614  # take no chances and rewrite it.
46615  # Note: m4 eats our [], so we need to use [ and ] instead.
46616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46617  if test "x$has_forbidden_chars" != x; then
46618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46622      # Going to short mode and back again did indeed matter. Since short mode is
46623      # case insensitive, let's make it lowercase to improve readability.
46624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46625      # Now convert it back to Unix-stile (cygpath)
46626      input_path=`$CYGPATH -u "$shortmode_path"`
46627      new_path="$input_path"
46628    fi
46629  fi
46630
46631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46632  if test "x$test_cygdrive_prefix" = x; then
46633    # As a simple fix, exclude /usr/bin since it's not a real path.
46634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46636      # a path prefixed by /cygdrive for fixpath to work.
46637      new_path="$CYGWIN_ROOT_PATH$input_path"
46638    fi
46639  fi
46640
46641
46642  if test "x$path" != "x$new_path"; then
46643    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46646  fi
46647
46648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46649
46650  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46651  has_colon=`$ECHO $path | $GREP ^.:`
46652  new_path="$path"
46653  if test "x$has_colon" = x; then
46654    # Not in mixed or Windows style, start by that.
46655    new_path=`cmd //c echo $path`
46656  fi
46657
46658
46659  input_path="$new_path"
46660  # Check if we need to convert this using DOS-style short mode. If the path
46661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46662  # take no chances and rewrite it.
46663  # Note: m4 eats our [], so we need to use [ and ] instead.
46664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46665  if test "x$has_forbidden_chars" != x; then
46666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46668  fi
46669
46670
46671  windows_path="$new_path"
46672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46673    unix_path=`$CYGPATH -u "$windows_path"`
46674    new_path="$unix_path"
46675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46677    new_path="$unix_path"
46678  fi
46679
46680  if test "x$path" != "x$new_path"; then
46681    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46684  fi
46685
46686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46688
46689  else
46690    # We're on a posix platform. Hooray! :)
46691    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46692    has_space=`$ECHO "$path" | $GREP " "`
46693    if test "x$has_space" != x; then
46694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46696      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46697    fi
46698
46699    # Use eval to expand a potential ~
46700    eval path="$path"
46701    if test ! -f "$path" && test ! -d "$path"; then
46702      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46703    fi
46704
46705    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46706  fi
46707
46708
46709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46710
46711  # Input might be given as Windows format, start by converting to
46712  # unix format.
46713  path="$POTENTIAL_FREETYPE_LIB_PATH"
46714  new_path=`$CYGPATH -u "$path"`
46715
46716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46719  # "foo.exe" is OK but "foo" is an error.
46720  #
46721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46722  # It is also a way to make sure we got the proper file name for the real test later on.
46723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46724  if test "x$test_shortpath" = x; then
46725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46727    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46728  fi
46729
46730  # Call helper function which possibly converts this using DOS-style short mode.
46731  # If so, the updated path is stored in $new_path.
46732
46733  input_path="$new_path"
46734  # Check if we need to convert this using DOS-style short mode. If the path
46735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46736  # take no chances and rewrite it.
46737  # Note: m4 eats our [], so we need to use [ and ] instead.
46738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46739  if test "x$has_forbidden_chars" != x; then
46740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46744      # Going to short mode and back again did indeed matter. Since short mode is
46745      # case insensitive, let's make it lowercase to improve readability.
46746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46747      # Now convert it back to Unix-stile (cygpath)
46748      input_path=`$CYGPATH -u "$shortmode_path"`
46749      new_path="$input_path"
46750    fi
46751  fi
46752
46753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46754  if test "x$test_cygdrive_prefix" = x; then
46755    # As a simple fix, exclude /usr/bin since it's not a real path.
46756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46758      # a path prefixed by /cygdrive for fixpath to work.
46759      new_path="$CYGWIN_ROOT_PATH$input_path"
46760    fi
46761  fi
46762
46763
46764  if test "x$path" != "x$new_path"; then
46765    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46768  fi
46769
46770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46771
46772  path="$POTENTIAL_FREETYPE_LIB_PATH"
46773  has_colon=`$ECHO $path | $GREP ^.:`
46774  new_path="$path"
46775  if test "x$has_colon" = x; then
46776    # Not in mixed or Windows style, start by that.
46777    new_path=`cmd //c echo $path`
46778  fi
46779
46780
46781  input_path="$new_path"
46782  # Check if we need to convert this using DOS-style short mode. If the path
46783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46784  # take no chances and rewrite it.
46785  # Note: m4 eats our [], so we need to use [ and ] instead.
46786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46787  if test "x$has_forbidden_chars" != x; then
46788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46790  fi
46791
46792
46793  windows_path="$new_path"
46794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46795    unix_path=`$CYGPATH -u "$windows_path"`
46796    new_path="$unix_path"
46797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46799    new_path="$unix_path"
46800  fi
46801
46802  if test "x$path" != "x$new_path"; then
46803    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46806  fi
46807
46808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46810
46811  else
46812    # We're on a posix platform. Hooray! :)
46813    path="$POTENTIAL_FREETYPE_LIB_PATH"
46814    has_space=`$ECHO "$path" | $GREP " "`
46815    if test "x$has_space" != x; then
46816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46818      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46819    fi
46820
46821    # Use eval to expand a potential ~
46822    eval path="$path"
46823    if test ! -f "$path" && test ! -d "$path"; then
46824      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46825    fi
46826
46827    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46828  fi
46829
46830
46831    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46832    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46833$as_echo_n "checking for freetype includes... " >&6; }
46834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46835$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46836    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46838$as_echo_n "checking for freetype libraries... " >&6; }
46839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46840$as_echo "$FREETYPE_LIB_PATH" >&6; }
46841  fi
46842
46843          fi
46844
46845          if test "x$FOUND_FREETYPE" != xyes; then
46846            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46847
46848  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46849  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46850  METHOD="well-known location"
46851
46852  # Let's start with an optimistic view of the world :-)
46853  FOUND_FREETYPE=yes
46854
46855  # First look for the canonical freetype main include file ft2build.h.
46856  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46857    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46858    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46859    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46860      # Fail.
46861      FOUND_FREETYPE=no
46862    fi
46863  fi
46864
46865  if test "x$FOUND_FREETYPE" = xyes; then
46866    # Include file found, let's continue the sanity check.
46867    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46868$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46869
46870    # Reset to default value
46871    FREETYPE_BASE_NAME=freetype
46872    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46873    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46874      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46875          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46876        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46877        # for the .6 version explicitly.
46878        FREETYPE_BASE_NAME=freetype.6
46879        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46880        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46881$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46882      else
46883        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46884$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46885        FOUND_FREETYPE=no
46886      fi
46887    else
46888      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46889        # On Windows, we will need both .lib and .dll file.
46890        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46891          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46892$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46893          FOUND_FREETYPE=no
46894        fi
46895      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46896          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46897        # Found lib in isa dir, use that instead.
46898        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46899        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46900$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46901      fi
46902    fi
46903  fi
46904
46905  if test "x$FOUND_FREETYPE" = xyes; then
46906
46907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46908
46909  # Input might be given as Windows format, start by converting to
46910  # unix format.
46911  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46912  new_path=`$CYGPATH -u "$path"`
46913
46914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46917  # "foo.exe" is OK but "foo" is an error.
46918  #
46919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46920  # It is also a way to make sure we got the proper file name for the real test later on.
46921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46922  if test "x$test_shortpath" = x; then
46923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46924$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46925    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46926  fi
46927
46928  # Call helper function which possibly converts this using DOS-style short mode.
46929  # If so, the updated path is stored in $new_path.
46930
46931  input_path="$new_path"
46932  # Check if we need to convert this using DOS-style short mode. If the path
46933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46934  # take no chances and rewrite it.
46935  # Note: m4 eats our [], so we need to use [ and ] instead.
46936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46937  if test "x$has_forbidden_chars" != x; then
46938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46942      # Going to short mode and back again did indeed matter. Since short mode is
46943      # case insensitive, let's make it lowercase to improve readability.
46944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46945      # Now convert it back to Unix-stile (cygpath)
46946      input_path=`$CYGPATH -u "$shortmode_path"`
46947      new_path="$input_path"
46948    fi
46949  fi
46950
46951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46952  if test "x$test_cygdrive_prefix" = x; then
46953    # As a simple fix, exclude /usr/bin since it's not a real path.
46954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46956      # a path prefixed by /cygdrive for fixpath to work.
46957      new_path="$CYGWIN_ROOT_PATH$input_path"
46958    fi
46959  fi
46960
46961
46962  if test "x$path" != "x$new_path"; then
46963    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46965$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46966  fi
46967
46968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46969
46970  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46971  has_colon=`$ECHO $path | $GREP ^.:`
46972  new_path="$path"
46973  if test "x$has_colon" = x; then
46974    # Not in mixed or Windows style, start by that.
46975    new_path=`cmd //c echo $path`
46976  fi
46977
46978
46979  input_path="$new_path"
46980  # Check if we need to convert this using DOS-style short mode. If the path
46981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46982  # take no chances and rewrite it.
46983  # Note: m4 eats our [], so we need to use [ and ] instead.
46984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46985  if test "x$has_forbidden_chars" != x; then
46986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46988  fi
46989
46990
46991  windows_path="$new_path"
46992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46993    unix_path=`$CYGPATH -u "$windows_path"`
46994    new_path="$unix_path"
46995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46997    new_path="$unix_path"
46998  fi
46999
47000  if test "x$path" != "x$new_path"; then
47001    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47003$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47004  fi
47005
47006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47008
47009  else
47010    # We're on a posix platform. Hooray! :)
47011    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47012    has_space=`$ECHO "$path" | $GREP " "`
47013    if test "x$has_space" != x; then
47014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47016      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47017    fi
47018
47019    # Use eval to expand a potential ~
47020    eval path="$path"
47021    if test ! -f "$path" && test ! -d "$path"; then
47022      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47023    fi
47024
47025    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47026  fi
47027
47028
47029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47030
47031  # Input might be given as Windows format, start by converting to
47032  # unix format.
47033  path="$POTENTIAL_FREETYPE_LIB_PATH"
47034  new_path=`$CYGPATH -u "$path"`
47035
47036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47039  # "foo.exe" is OK but "foo" is an error.
47040  #
47041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47042  # It is also a way to make sure we got the proper file name for the real test later on.
47043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47044  if test "x$test_shortpath" = x; then
47045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47047    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47048  fi
47049
47050  # Call helper function which possibly converts this using DOS-style short mode.
47051  # If so, the updated path is stored in $new_path.
47052
47053  input_path="$new_path"
47054  # Check if we need to convert this using DOS-style short mode. If the path
47055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47056  # take no chances and rewrite it.
47057  # Note: m4 eats our [], so we need to use [ and ] instead.
47058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47059  if test "x$has_forbidden_chars" != x; then
47060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47064      # Going to short mode and back again did indeed matter. Since short mode is
47065      # case insensitive, let's make it lowercase to improve readability.
47066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47067      # Now convert it back to Unix-stile (cygpath)
47068      input_path=`$CYGPATH -u "$shortmode_path"`
47069      new_path="$input_path"
47070    fi
47071  fi
47072
47073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47074  if test "x$test_cygdrive_prefix" = x; then
47075    # As a simple fix, exclude /usr/bin since it's not a real path.
47076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47078      # a path prefixed by /cygdrive for fixpath to work.
47079      new_path="$CYGWIN_ROOT_PATH$input_path"
47080    fi
47081  fi
47082
47083
47084  if test "x$path" != "x$new_path"; then
47085    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47088  fi
47089
47090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47091
47092  path="$POTENTIAL_FREETYPE_LIB_PATH"
47093  has_colon=`$ECHO $path | $GREP ^.:`
47094  new_path="$path"
47095  if test "x$has_colon" = x; then
47096    # Not in mixed or Windows style, start by that.
47097    new_path=`cmd //c echo $path`
47098  fi
47099
47100
47101  input_path="$new_path"
47102  # Check if we need to convert this using DOS-style short mode. If the path
47103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47104  # take no chances and rewrite it.
47105  # Note: m4 eats our [], so we need to use [ and ] instead.
47106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47107  if test "x$has_forbidden_chars" != x; then
47108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47110  fi
47111
47112
47113  windows_path="$new_path"
47114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47115    unix_path=`$CYGPATH -u "$windows_path"`
47116    new_path="$unix_path"
47117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47119    new_path="$unix_path"
47120  fi
47121
47122  if test "x$path" != "x$new_path"; then
47123    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47125$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47126  fi
47127
47128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47130
47131  else
47132    # We're on a posix platform. Hooray! :)
47133    path="$POTENTIAL_FREETYPE_LIB_PATH"
47134    has_space=`$ECHO "$path" | $GREP " "`
47135    if test "x$has_space" != x; then
47136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47139    fi
47140
47141    # Use eval to expand a potential ~
47142    eval path="$path"
47143    if test ! -f "$path" && test ! -d "$path"; then
47144      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47145    fi
47146
47147    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47148  fi
47149
47150
47151    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47153$as_echo_n "checking for freetype includes... " >&6; }
47154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47155$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47156    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47158$as_echo_n "checking for freetype libraries... " >&6; }
47159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47160$as_echo "$FREETYPE_LIB_PATH" >&6; }
47161  fi
47162
47163          fi
47164
47165          if test "x$FOUND_FREETYPE" != xyes; then
47166            FREETYPE_BASE_DIR="$SYSROOT/usr"
47167            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47168
47169  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47170  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47171  METHOD="well-known location"
47172
47173  # Let's start with an optimistic view of the world :-)
47174  FOUND_FREETYPE=yes
47175
47176  # First look for the canonical freetype main include file ft2build.h.
47177  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47178    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47179    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47180    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47181      # Fail.
47182      FOUND_FREETYPE=no
47183    fi
47184  fi
47185
47186  if test "x$FOUND_FREETYPE" = xyes; then
47187    # Include file found, let's continue the sanity check.
47188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47189$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47190
47191    # Reset to default value
47192    FREETYPE_BASE_NAME=freetype
47193    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47194    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47195      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47196          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47197        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47198        # for the .6 version explicitly.
47199        FREETYPE_BASE_NAME=freetype.6
47200        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47201        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47202$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47203      else
47204        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47205$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47206        FOUND_FREETYPE=no
47207      fi
47208    else
47209      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47210        # On Windows, we will need both .lib and .dll file.
47211        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47212          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47213$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47214          FOUND_FREETYPE=no
47215        fi
47216      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47217          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47218        # Found lib in isa dir, use that instead.
47219        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47220        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47221$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47222      fi
47223    fi
47224  fi
47225
47226  if test "x$FOUND_FREETYPE" = xyes; then
47227
47228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47229
47230  # Input might be given as Windows format, start by converting to
47231  # unix format.
47232  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47233  new_path=`$CYGPATH -u "$path"`
47234
47235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47238  # "foo.exe" is OK but "foo" is an error.
47239  #
47240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47241  # It is also a way to make sure we got the proper file name for the real test later on.
47242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47243  if test "x$test_shortpath" = x; then
47244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47245$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47246    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47247  fi
47248
47249  # Call helper function which possibly converts this using DOS-style short mode.
47250  # If so, the updated path is stored in $new_path.
47251
47252  input_path="$new_path"
47253  # Check if we need to convert this using DOS-style short mode. If the path
47254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47255  # take no chances and rewrite it.
47256  # Note: m4 eats our [], so we need to use [ and ] instead.
47257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47258  if test "x$has_forbidden_chars" != x; then
47259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47263      # Going to short mode and back again did indeed matter. Since short mode is
47264      # case insensitive, let's make it lowercase to improve readability.
47265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47266      # Now convert it back to Unix-stile (cygpath)
47267      input_path=`$CYGPATH -u "$shortmode_path"`
47268      new_path="$input_path"
47269    fi
47270  fi
47271
47272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47273  if test "x$test_cygdrive_prefix" = x; then
47274    # As a simple fix, exclude /usr/bin since it's not a real path.
47275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47277      # a path prefixed by /cygdrive for fixpath to work.
47278      new_path="$CYGWIN_ROOT_PATH$input_path"
47279    fi
47280  fi
47281
47282
47283  if test "x$path" != "x$new_path"; then
47284    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47286$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47287  fi
47288
47289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47290
47291  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47292  has_colon=`$ECHO $path | $GREP ^.:`
47293  new_path="$path"
47294  if test "x$has_colon" = x; then
47295    # Not in mixed or Windows style, start by that.
47296    new_path=`cmd //c echo $path`
47297  fi
47298
47299
47300  input_path="$new_path"
47301  # Check if we need to convert this using DOS-style short mode. If the path
47302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47303  # take no chances and rewrite it.
47304  # Note: m4 eats our [], so we need to use [ and ] instead.
47305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47306  if test "x$has_forbidden_chars" != x; then
47307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47309  fi
47310
47311
47312  windows_path="$new_path"
47313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47314    unix_path=`$CYGPATH -u "$windows_path"`
47315    new_path="$unix_path"
47316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47318    new_path="$unix_path"
47319  fi
47320
47321  if test "x$path" != "x$new_path"; then
47322    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47324$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47325  fi
47326
47327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47329
47330  else
47331    # We're on a posix platform. Hooray! :)
47332    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47333    has_space=`$ECHO "$path" | $GREP " "`
47334    if test "x$has_space" != x; then
47335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47337      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47338    fi
47339
47340    # Use eval to expand a potential ~
47341    eval path="$path"
47342    if test ! -f "$path" && test ! -d "$path"; then
47343      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47344    fi
47345
47346    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47347  fi
47348
47349
47350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47351
47352  # Input might be given as Windows format, start by converting to
47353  # unix format.
47354  path="$POTENTIAL_FREETYPE_LIB_PATH"
47355  new_path=`$CYGPATH -u "$path"`
47356
47357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47360  # "foo.exe" is OK but "foo" is an error.
47361  #
47362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47363  # It is also a way to make sure we got the proper file name for the real test later on.
47364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47365  if test "x$test_shortpath" = x; then
47366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47368    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47369  fi
47370
47371  # Call helper function which possibly converts this using DOS-style short mode.
47372  # If so, the updated path is stored in $new_path.
47373
47374  input_path="$new_path"
47375  # Check if we need to convert this using DOS-style short mode. If the path
47376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47377  # take no chances and rewrite it.
47378  # Note: m4 eats our [], so we need to use [ and ] instead.
47379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47380  if test "x$has_forbidden_chars" != x; then
47381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47385      # Going to short mode and back again did indeed matter. Since short mode is
47386      # case insensitive, let's make it lowercase to improve readability.
47387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47388      # Now convert it back to Unix-stile (cygpath)
47389      input_path=`$CYGPATH -u "$shortmode_path"`
47390      new_path="$input_path"
47391    fi
47392  fi
47393
47394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47395  if test "x$test_cygdrive_prefix" = x; then
47396    # As a simple fix, exclude /usr/bin since it's not a real path.
47397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47399      # a path prefixed by /cygdrive for fixpath to work.
47400      new_path="$CYGWIN_ROOT_PATH$input_path"
47401    fi
47402  fi
47403
47404
47405  if test "x$path" != "x$new_path"; then
47406    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47409  fi
47410
47411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47412
47413  path="$POTENTIAL_FREETYPE_LIB_PATH"
47414  has_colon=`$ECHO $path | $GREP ^.:`
47415  new_path="$path"
47416  if test "x$has_colon" = x; then
47417    # Not in mixed or Windows style, start by that.
47418    new_path=`cmd //c echo $path`
47419  fi
47420
47421
47422  input_path="$new_path"
47423  # Check if we need to convert this using DOS-style short mode. If the path
47424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47425  # take no chances and rewrite it.
47426  # Note: m4 eats our [], so we need to use [ and ] instead.
47427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47428  if test "x$has_forbidden_chars" != x; then
47429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47431  fi
47432
47433
47434  windows_path="$new_path"
47435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47436    unix_path=`$CYGPATH -u "$windows_path"`
47437    new_path="$unix_path"
47438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47440    new_path="$unix_path"
47441  fi
47442
47443  if test "x$path" != "x$new_path"; then
47444    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47447  fi
47448
47449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47451
47452  else
47453    # We're on a posix platform. Hooray! :)
47454    path="$POTENTIAL_FREETYPE_LIB_PATH"
47455    has_space=`$ECHO "$path" | $GREP " "`
47456    if test "x$has_space" != x; then
47457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47458$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47459      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47460    fi
47461
47462    # Use eval to expand a potential ~
47463    eval path="$path"
47464    if test ! -f "$path" && test ! -d "$path"; then
47465      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47466    fi
47467
47468    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47469  fi
47470
47471
47472    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47474$as_echo_n "checking for freetype includes... " >&6; }
47475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47476$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47477    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47479$as_echo_n "checking for freetype libraries... " >&6; }
47480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47481$as_echo "$FREETYPE_LIB_PATH" >&6; }
47482  fi
47483
47484            else
47485
47486  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47487  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47488  METHOD="well-known location"
47489
47490  # Let's start with an optimistic view of the world :-)
47491  FOUND_FREETYPE=yes
47492
47493  # First look for the canonical freetype main include file ft2build.h.
47494  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47495    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47496    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47497    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47498      # Fail.
47499      FOUND_FREETYPE=no
47500    fi
47501  fi
47502
47503  if test "x$FOUND_FREETYPE" = xyes; then
47504    # Include file found, let's continue the sanity check.
47505    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47506$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47507
47508    # Reset to default value
47509    FREETYPE_BASE_NAME=freetype
47510    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47511    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47512      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47513          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47514        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47515        # for the .6 version explicitly.
47516        FREETYPE_BASE_NAME=freetype.6
47517        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47518        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47519$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47520      else
47521        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47522$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47523        FOUND_FREETYPE=no
47524      fi
47525    else
47526      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47527        # On Windows, we will need both .lib and .dll file.
47528        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47529          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47530$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47531          FOUND_FREETYPE=no
47532        fi
47533      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47534          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47535        # Found lib in isa dir, use that instead.
47536        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47537        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47538$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47539      fi
47540    fi
47541  fi
47542
47543  if test "x$FOUND_FREETYPE" = xyes; then
47544
47545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47546
47547  # Input might be given as Windows format, start by converting to
47548  # unix format.
47549  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47550  new_path=`$CYGPATH -u "$path"`
47551
47552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47555  # "foo.exe" is OK but "foo" is an error.
47556  #
47557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47558  # It is also a way to make sure we got the proper file name for the real test later on.
47559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47560  if test "x$test_shortpath" = x; then
47561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47563    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47564  fi
47565
47566  # Call helper function which possibly converts this using DOS-style short mode.
47567  # If so, the updated path is stored in $new_path.
47568
47569  input_path="$new_path"
47570  # Check if we need to convert this using DOS-style short mode. If the path
47571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47572  # take no chances and rewrite it.
47573  # Note: m4 eats our [], so we need to use [ and ] instead.
47574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47575  if test "x$has_forbidden_chars" != x; then
47576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47580      # Going to short mode and back again did indeed matter. Since short mode is
47581      # case insensitive, let's make it lowercase to improve readability.
47582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47583      # Now convert it back to Unix-stile (cygpath)
47584      input_path=`$CYGPATH -u "$shortmode_path"`
47585      new_path="$input_path"
47586    fi
47587  fi
47588
47589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47590  if test "x$test_cygdrive_prefix" = x; then
47591    # As a simple fix, exclude /usr/bin since it's not a real path.
47592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47594      # a path prefixed by /cygdrive for fixpath to work.
47595      new_path="$CYGWIN_ROOT_PATH$input_path"
47596    fi
47597  fi
47598
47599
47600  if test "x$path" != "x$new_path"; then
47601    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47604  fi
47605
47606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47607
47608  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47609  has_colon=`$ECHO $path | $GREP ^.:`
47610  new_path="$path"
47611  if test "x$has_colon" = x; then
47612    # Not in mixed or Windows style, start by that.
47613    new_path=`cmd //c echo $path`
47614  fi
47615
47616
47617  input_path="$new_path"
47618  # Check if we need to convert this using DOS-style short mode. If the path
47619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47620  # take no chances and rewrite it.
47621  # Note: m4 eats our [], so we need to use [ and ] instead.
47622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47623  if test "x$has_forbidden_chars" != x; then
47624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47626  fi
47627
47628
47629  windows_path="$new_path"
47630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47631    unix_path=`$CYGPATH -u "$windows_path"`
47632    new_path="$unix_path"
47633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47635    new_path="$unix_path"
47636  fi
47637
47638  if test "x$path" != "x$new_path"; then
47639    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47641$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47642  fi
47643
47644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47646
47647  else
47648    # We're on a posix platform. Hooray! :)
47649    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47650    has_space=`$ECHO "$path" | $GREP " "`
47651    if test "x$has_space" != x; then
47652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47654      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47655    fi
47656
47657    # Use eval to expand a potential ~
47658    eval path="$path"
47659    if test ! -f "$path" && test ! -d "$path"; then
47660      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47661    fi
47662
47663    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47664  fi
47665
47666
47667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47668
47669  # Input might be given as Windows format, start by converting to
47670  # unix format.
47671  path="$POTENTIAL_FREETYPE_LIB_PATH"
47672  new_path=`$CYGPATH -u "$path"`
47673
47674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47677  # "foo.exe" is OK but "foo" is an error.
47678  #
47679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47680  # It is also a way to make sure we got the proper file name for the real test later on.
47681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47682  if test "x$test_shortpath" = x; then
47683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47686  fi
47687
47688  # Call helper function which possibly converts this using DOS-style short mode.
47689  # If so, the updated path is stored in $new_path.
47690
47691  input_path="$new_path"
47692  # Check if we need to convert this using DOS-style short mode. If the path
47693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47694  # take no chances and rewrite it.
47695  # Note: m4 eats our [], so we need to use [ and ] instead.
47696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47697  if test "x$has_forbidden_chars" != x; then
47698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47702      # Going to short mode and back again did indeed matter. Since short mode is
47703      # case insensitive, let's make it lowercase to improve readability.
47704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47705      # Now convert it back to Unix-stile (cygpath)
47706      input_path=`$CYGPATH -u "$shortmode_path"`
47707      new_path="$input_path"
47708    fi
47709  fi
47710
47711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47712  if test "x$test_cygdrive_prefix" = x; then
47713    # As a simple fix, exclude /usr/bin since it's not a real path.
47714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47716      # a path prefixed by /cygdrive for fixpath to work.
47717      new_path="$CYGWIN_ROOT_PATH$input_path"
47718    fi
47719  fi
47720
47721
47722  if test "x$path" != "x$new_path"; then
47723    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47726  fi
47727
47728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47729
47730  path="$POTENTIAL_FREETYPE_LIB_PATH"
47731  has_colon=`$ECHO $path | $GREP ^.:`
47732  new_path="$path"
47733  if test "x$has_colon" = x; then
47734    # Not in mixed or Windows style, start by that.
47735    new_path=`cmd //c echo $path`
47736  fi
47737
47738
47739  input_path="$new_path"
47740  # Check if we need to convert this using DOS-style short mode. If the path
47741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47742  # take no chances and rewrite it.
47743  # Note: m4 eats our [], so we need to use [ and ] instead.
47744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47745  if test "x$has_forbidden_chars" != x; then
47746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47748  fi
47749
47750
47751  windows_path="$new_path"
47752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47753    unix_path=`$CYGPATH -u "$windows_path"`
47754    new_path="$unix_path"
47755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47757    new_path="$unix_path"
47758  fi
47759
47760  if test "x$path" != "x$new_path"; then
47761    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47764  fi
47765
47766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47768
47769  else
47770    # We're on a posix platform. Hooray! :)
47771    path="$POTENTIAL_FREETYPE_LIB_PATH"
47772    has_space=`$ECHO "$path" | $GREP " "`
47773    if test "x$has_space" != x; then
47774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47776      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47777    fi
47778
47779    # Use eval to expand a potential ~
47780    eval path="$path"
47781    if test ! -f "$path" && test ! -d "$path"; then
47782      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47783    fi
47784
47785    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47786  fi
47787
47788
47789    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47791$as_echo_n "checking for freetype includes... " >&6; }
47792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47793$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47794    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47796$as_echo_n "checking for freetype libraries... " >&6; }
47797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47798$as_echo "$FREETYPE_LIB_PATH" >&6; }
47799  fi
47800
47801              if test "x$FOUND_FREETYPE" != xyes; then
47802
47803  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47804  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47805  METHOD="well-known location"
47806
47807  # Let's start with an optimistic view of the world :-)
47808  FOUND_FREETYPE=yes
47809
47810  # First look for the canonical freetype main include file ft2build.h.
47811  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47812    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47813    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47814    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47815      # Fail.
47816      FOUND_FREETYPE=no
47817    fi
47818  fi
47819
47820  if test "x$FOUND_FREETYPE" = xyes; then
47821    # Include file found, let's continue the sanity check.
47822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47823$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47824
47825    # Reset to default value
47826    FREETYPE_BASE_NAME=freetype
47827    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47828    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47829      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47830          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47831        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47832        # for the .6 version explicitly.
47833        FREETYPE_BASE_NAME=freetype.6
47834        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47835        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47836$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47837      else
47838        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47839$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47840        FOUND_FREETYPE=no
47841      fi
47842    else
47843      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47844        # On Windows, we will need both .lib and .dll file.
47845        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47846          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47847$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47848          FOUND_FREETYPE=no
47849        fi
47850      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47851          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47852        # Found lib in isa dir, use that instead.
47853        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47854        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47855$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47856      fi
47857    fi
47858  fi
47859
47860  if test "x$FOUND_FREETYPE" = xyes; then
47861
47862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47863
47864  # Input might be given as Windows format, start by converting to
47865  # unix format.
47866  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47867  new_path=`$CYGPATH -u "$path"`
47868
47869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47872  # "foo.exe" is OK but "foo" is an error.
47873  #
47874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47875  # It is also a way to make sure we got the proper file name for the real test later on.
47876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47877  if test "x$test_shortpath" = x; then
47878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47880    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47881  fi
47882
47883  # Call helper function which possibly converts this using DOS-style short mode.
47884  # If so, the updated path is stored in $new_path.
47885
47886  input_path="$new_path"
47887  # Check if we need to convert this using DOS-style short mode. If the path
47888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47889  # take no chances and rewrite it.
47890  # Note: m4 eats our [], so we need to use [ and ] instead.
47891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47892  if test "x$has_forbidden_chars" != x; then
47893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47897      # Going to short mode and back again did indeed matter. Since short mode is
47898      # case insensitive, let's make it lowercase to improve readability.
47899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47900      # Now convert it back to Unix-stile (cygpath)
47901      input_path=`$CYGPATH -u "$shortmode_path"`
47902      new_path="$input_path"
47903    fi
47904  fi
47905
47906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47907  if test "x$test_cygdrive_prefix" = x; then
47908    # As a simple fix, exclude /usr/bin since it's not a real path.
47909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47911      # a path prefixed by /cygdrive for fixpath to work.
47912      new_path="$CYGWIN_ROOT_PATH$input_path"
47913    fi
47914  fi
47915
47916
47917  if test "x$path" != "x$new_path"; then
47918    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47920$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47921  fi
47922
47923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47924
47925  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47926  has_colon=`$ECHO $path | $GREP ^.:`
47927  new_path="$path"
47928  if test "x$has_colon" = x; then
47929    # Not in mixed or Windows style, start by that.
47930    new_path=`cmd //c echo $path`
47931  fi
47932
47933
47934  input_path="$new_path"
47935  # Check if we need to convert this using DOS-style short mode. If the path
47936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47937  # take no chances and rewrite it.
47938  # Note: m4 eats our [], so we need to use [ and ] instead.
47939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47940  if test "x$has_forbidden_chars" != x; then
47941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47943  fi
47944
47945
47946  windows_path="$new_path"
47947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47948    unix_path=`$CYGPATH -u "$windows_path"`
47949    new_path="$unix_path"
47950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47952    new_path="$unix_path"
47953  fi
47954
47955  if test "x$path" != "x$new_path"; then
47956    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47958$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47959  fi
47960
47961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47963
47964  else
47965    # We're on a posix platform. Hooray! :)
47966    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47967    has_space=`$ECHO "$path" | $GREP " "`
47968    if test "x$has_space" != x; then
47969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47971      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47972    fi
47973
47974    # Use eval to expand a potential ~
47975    eval path="$path"
47976    if test ! -f "$path" && test ! -d "$path"; then
47977      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47978    fi
47979
47980    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47981  fi
47982
47983
47984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47985
47986  # Input might be given as Windows format, start by converting to
47987  # unix format.
47988  path="$POTENTIAL_FREETYPE_LIB_PATH"
47989  new_path=`$CYGPATH -u "$path"`
47990
47991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47994  # "foo.exe" is OK but "foo" is an error.
47995  #
47996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47997  # It is also a way to make sure we got the proper file name for the real test later on.
47998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47999  if test "x$test_shortpath" = x; then
48000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48001$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48002    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48003  fi
48004
48005  # Call helper function which possibly converts this using DOS-style short mode.
48006  # If so, the updated path is stored in $new_path.
48007
48008  input_path="$new_path"
48009  # Check if we need to convert this using DOS-style short mode. If the path
48010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48011  # take no chances and rewrite it.
48012  # Note: m4 eats our [], so we need to use [ and ] instead.
48013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48014  if test "x$has_forbidden_chars" != x; then
48015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48019      # Going to short mode and back again did indeed matter. Since short mode is
48020      # case insensitive, let's make it lowercase to improve readability.
48021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48022      # Now convert it back to Unix-stile (cygpath)
48023      input_path=`$CYGPATH -u "$shortmode_path"`
48024      new_path="$input_path"
48025    fi
48026  fi
48027
48028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48029  if test "x$test_cygdrive_prefix" = x; then
48030    # As a simple fix, exclude /usr/bin since it's not a real path.
48031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48033      # a path prefixed by /cygdrive for fixpath to work.
48034      new_path="$CYGWIN_ROOT_PATH$input_path"
48035    fi
48036  fi
48037
48038
48039  if test "x$path" != "x$new_path"; then
48040    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48042$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48043  fi
48044
48045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48046
48047  path="$POTENTIAL_FREETYPE_LIB_PATH"
48048  has_colon=`$ECHO $path | $GREP ^.:`
48049  new_path="$path"
48050  if test "x$has_colon" = x; then
48051    # Not in mixed or Windows style, start by that.
48052    new_path=`cmd //c echo $path`
48053  fi
48054
48055
48056  input_path="$new_path"
48057  # Check if we need to convert this using DOS-style short mode. If the path
48058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48059  # take no chances and rewrite it.
48060  # Note: m4 eats our [], so we need to use [ and ] instead.
48061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48062  if test "x$has_forbidden_chars" != x; then
48063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48065  fi
48066
48067
48068  windows_path="$new_path"
48069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48070    unix_path=`$CYGPATH -u "$windows_path"`
48071    new_path="$unix_path"
48072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48074    new_path="$unix_path"
48075  fi
48076
48077  if test "x$path" != "x$new_path"; then
48078    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48080$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48081  fi
48082
48083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48085
48086  else
48087    # We're on a posix platform. Hooray! :)
48088    path="$POTENTIAL_FREETYPE_LIB_PATH"
48089    has_space=`$ECHO "$path" | $GREP " "`
48090    if test "x$has_space" != x; then
48091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48093      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48094    fi
48095
48096    # Use eval to expand a potential ~
48097    eval path="$path"
48098    if test ! -f "$path" && test ! -d "$path"; then
48099      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48100    fi
48101
48102    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48103  fi
48104
48105
48106    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48108$as_echo_n "checking for freetype includes... " >&6; }
48109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48110$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48111    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48113$as_echo_n "checking for freetype libraries... " >&6; }
48114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48115$as_echo "$FREETYPE_LIB_PATH" >&6; }
48116  fi
48117
48118              fi
48119            fi
48120          fi
48121        fi
48122      fi # end check in well-known locations
48123
48124      if test "x$FOUND_FREETYPE" != xyes; then
48125
48126  # Print a helpful message on how to acquire the necessary build dependency.
48127  # freetype is the help tag: freetype, cups, pulse, alsa etc
48128  MISSING_DEPENDENCY=freetype
48129
48130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48131    cygwin_help $MISSING_DEPENDENCY
48132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48133    msys_help $MISSING_DEPENDENCY
48134  else
48135    PKGHANDLER_COMMAND=
48136
48137    case $PKGHANDLER in
48138      apt-get)
48139        apt_help     $MISSING_DEPENDENCY ;;
48140      yum)
48141        yum_help     $MISSING_DEPENDENCY ;;
48142      port)
48143        port_help    $MISSING_DEPENDENCY ;;
48144      pkgutil)
48145        pkgutil_help $MISSING_DEPENDENCY ;;
48146      pkgadd)
48147        pkgadd_help  $MISSING_DEPENDENCY ;;
48148    esac
48149
48150    if test "x$PKGHANDLER_COMMAND" != x; then
48151      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48152    fi
48153  fi
48154
48155        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48156      fi
48157    fi # end user specified settings
48158
48159    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48160    if test "x$FREETYPE_CFLAGS" = x; then
48161
48162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48163
48164  # Input might be given as Windows format, start by converting to
48165  # unix format.
48166  path="$FREETYPE_INCLUDE_PATH"
48167  new_path=`$CYGPATH -u "$path"`
48168
48169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48172  # "foo.exe" is OK but "foo" is an error.
48173  #
48174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48175  # It is also a way to make sure we got the proper file name for the real test later on.
48176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48177  if test "x$test_shortpath" = x; then
48178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48179$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48180    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48181  fi
48182
48183  # Call helper function which possibly converts this using DOS-style short mode.
48184  # If so, the updated path is stored in $new_path.
48185
48186  input_path="$new_path"
48187  # Check if we need to convert this using DOS-style short mode. If the path
48188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48189  # take no chances and rewrite it.
48190  # Note: m4 eats our [], so we need to use [ and ] instead.
48191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48192  if test "x$has_forbidden_chars" != x; then
48193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48197      # Going to short mode and back again did indeed matter. Since short mode is
48198      # case insensitive, let's make it lowercase to improve readability.
48199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48200      # Now convert it back to Unix-stile (cygpath)
48201      input_path=`$CYGPATH -u "$shortmode_path"`
48202      new_path="$input_path"
48203    fi
48204  fi
48205
48206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48207  if test "x$test_cygdrive_prefix" = x; then
48208    # As a simple fix, exclude /usr/bin since it's not a real path.
48209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48211      # a path prefixed by /cygdrive for fixpath to work.
48212      new_path="$CYGWIN_ROOT_PATH$input_path"
48213    fi
48214  fi
48215
48216
48217  if test "x$path" != "x$new_path"; then
48218    FREETYPE_INCLUDE_PATH="$new_path"
48219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48220$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48221  fi
48222
48223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48224
48225  path="$FREETYPE_INCLUDE_PATH"
48226  has_colon=`$ECHO $path | $GREP ^.:`
48227  new_path="$path"
48228  if test "x$has_colon" = x; then
48229    # Not in mixed or Windows style, start by that.
48230    new_path=`cmd //c echo $path`
48231  fi
48232
48233
48234  input_path="$new_path"
48235  # Check if we need to convert this using DOS-style short mode. If the path
48236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48237  # take no chances and rewrite it.
48238  # Note: m4 eats our [], so we need to use [ and ] instead.
48239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48240  if test "x$has_forbidden_chars" != x; then
48241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48243  fi
48244
48245
48246  windows_path="$new_path"
48247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48248    unix_path=`$CYGPATH -u "$windows_path"`
48249    new_path="$unix_path"
48250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48252    new_path="$unix_path"
48253  fi
48254
48255  if test "x$path" != "x$new_path"; then
48256    FREETYPE_INCLUDE_PATH="$new_path"
48257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48258$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48259  fi
48260
48261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48263
48264  else
48265    # We're on a posix platform. Hooray! :)
48266    path="$FREETYPE_INCLUDE_PATH"
48267    has_space=`$ECHO "$path" | $GREP " "`
48268    if test "x$has_space" != x; then
48269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48270$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48271      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48272    fi
48273
48274    # Use eval to expand a potential ~
48275    eval path="$path"
48276    if test ! -f "$path" && test ! -d "$path"; then
48277      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48278    fi
48279
48280    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48281  fi
48282
48283      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48284        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48285      else
48286        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48287      fi
48288    fi
48289
48290    if test "x$FREETYPE_LIBS" = x; then
48291
48292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48293
48294  # Input might be given as Windows format, start by converting to
48295  # unix format.
48296  path="$FREETYPE_LIB_PATH"
48297  new_path=`$CYGPATH -u "$path"`
48298
48299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48302  # "foo.exe" is OK but "foo" is an error.
48303  #
48304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48305  # It is also a way to make sure we got the proper file name for the real test later on.
48306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48307  if test "x$test_shortpath" = x; then
48308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48309$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48310    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48311  fi
48312
48313  # Call helper function which possibly converts this using DOS-style short mode.
48314  # If so, the updated path is stored in $new_path.
48315
48316  input_path="$new_path"
48317  # Check if we need to convert this using DOS-style short mode. If the path
48318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48319  # take no chances and rewrite it.
48320  # Note: m4 eats our [], so we need to use [ and ] instead.
48321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48322  if test "x$has_forbidden_chars" != x; then
48323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48327      # Going to short mode and back again did indeed matter. Since short mode is
48328      # case insensitive, let's make it lowercase to improve readability.
48329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48330      # Now convert it back to Unix-stile (cygpath)
48331      input_path=`$CYGPATH -u "$shortmode_path"`
48332      new_path="$input_path"
48333    fi
48334  fi
48335
48336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48337  if test "x$test_cygdrive_prefix" = x; then
48338    # As a simple fix, exclude /usr/bin since it's not a real path.
48339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48341      # a path prefixed by /cygdrive for fixpath to work.
48342      new_path="$CYGWIN_ROOT_PATH$input_path"
48343    fi
48344  fi
48345
48346
48347  if test "x$path" != "x$new_path"; then
48348    FREETYPE_LIB_PATH="$new_path"
48349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48350$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48351  fi
48352
48353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48354
48355  path="$FREETYPE_LIB_PATH"
48356  has_colon=`$ECHO $path | $GREP ^.:`
48357  new_path="$path"
48358  if test "x$has_colon" = x; then
48359    # Not in mixed or Windows style, start by that.
48360    new_path=`cmd //c echo $path`
48361  fi
48362
48363
48364  input_path="$new_path"
48365  # Check if we need to convert this using DOS-style short mode. If the path
48366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48367  # take no chances and rewrite it.
48368  # Note: m4 eats our [], so we need to use [ and ] instead.
48369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48370  if test "x$has_forbidden_chars" != x; then
48371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48373  fi
48374
48375
48376  windows_path="$new_path"
48377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48378    unix_path=`$CYGPATH -u "$windows_path"`
48379    new_path="$unix_path"
48380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48382    new_path="$unix_path"
48383  fi
48384
48385  if test "x$path" != "x$new_path"; then
48386    FREETYPE_LIB_PATH="$new_path"
48387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48388$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48389  fi
48390
48391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48393
48394  else
48395    # We're on a posix platform. Hooray! :)
48396    path="$FREETYPE_LIB_PATH"
48397    has_space=`$ECHO "$path" | $GREP " "`
48398    if test "x$has_space" != x; then
48399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48400$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48402    fi
48403
48404    # Use eval to expand a potential ~
48405    eval path="$path"
48406    if test ! -f "$path" && test ! -d "$path"; then
48407      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48408    fi
48409
48410    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48411  fi
48412
48413      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48414        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48415      else
48416        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48417      fi
48418    fi
48419
48420    # Try to compile it
48421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48422$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48423    ac_ext=cpp
48424ac_cpp='$CXXCPP $CPPFLAGS'
48425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48428
48429    PREV_CXXCFLAGS="$CXXFLAGS"
48430    PREV_LIBS="$LIBS"
48431    PREV_CXX="$CXX"
48432    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48433    LIBS="$LIBS $FREETYPE_LIBS"
48434    CXX="$FIXPATH $CXX"
48435    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48436/* end confdefs.h.  */
48437
48438          #include<ft2build.h>
48439          #include FT_FREETYPE_H
48440          int main () {
48441            FT_Init_FreeType(NULL);
48442            return 0;
48443          }
48444
48445_ACEOF
48446if ac_fn_cxx_try_link "$LINENO"; then :
48447
48448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48449$as_echo "yes" >&6; }
48450
48451else
48452
48453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48454$as_echo "no" >&6; }
48455          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48456$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48457          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48458$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48459
48460
48461  # Print a helpful message on how to acquire the necessary build dependency.
48462  # freetype is the help tag: freetype, cups, pulse, alsa etc
48463  MISSING_DEPENDENCY=freetype
48464
48465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48466    cygwin_help $MISSING_DEPENDENCY
48467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48468    msys_help $MISSING_DEPENDENCY
48469  else
48470    PKGHANDLER_COMMAND=
48471
48472    case $PKGHANDLER in
48473      apt-get)
48474        apt_help     $MISSING_DEPENDENCY ;;
48475      yum)
48476        yum_help     $MISSING_DEPENDENCY ;;
48477      port)
48478        port_help    $MISSING_DEPENDENCY ;;
48479      pkgutil)
48480        pkgutil_help $MISSING_DEPENDENCY ;;
48481      pkgadd)
48482        pkgadd_help  $MISSING_DEPENDENCY ;;
48483    esac
48484
48485    if test "x$PKGHANDLER_COMMAND" != x; then
48486      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48487    fi
48488  fi
48489
48490
48491          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48492
48493
48494fi
48495rm -f core conftest.err conftest.$ac_objext \
48496    conftest$ac_exeext conftest.$ac_ext
48497    CXXCFLAGS="$PREV_CXXFLAGS"
48498    LIBS="$PREV_LIBS"
48499    CXX="$PREV_CXX"
48500    ac_ext=cpp
48501ac_cpp='$CXXCPP $CPPFLAGS'
48502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48505
48506
48507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48508$as_echo_n "checking if we should bundle freetype... " >&6; }
48509    if test "x$BUNDLE_FREETYPE" = xyes; then
48510      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48511    fi
48512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48513$as_echo "$BUNDLE_FREETYPE" >&6; }
48514
48515  fi # end freetype needed
48516
48517
48518
48519
48520
48521
48522
48523  ###############################################################################
48524  #
48525  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48526  #
48527
48528# Check whether --with-alsa was given.
48529if test "${with_alsa+set}" = set; then :
48530  withval=$with_alsa;
48531fi
48532
48533
48534# Check whether --with-alsa-include was given.
48535if test "${with_alsa_include+set}" = set; then :
48536  withval=$with_alsa_include;
48537fi
48538
48539
48540# Check whether --with-alsa-lib was given.
48541if test "${with_alsa_lib+set}" = set; then :
48542  withval=$with_alsa_lib;
48543fi
48544
48545
48546  if test "x$ALSA_NOT_NEEDED" = xyes; then
48547    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48548      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48549$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48550    fi
48551    ALSA_CFLAGS=
48552    ALSA_LIBS=
48553  else
48554    ALSA_FOUND=no
48555
48556    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48557      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48558    fi
48559
48560    if test "x${with_alsa}" != x; then
48561      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48562      ALSA_CFLAGS="-I${with_alsa}/include"
48563      ALSA_FOUND=yes
48564    fi
48565    if test "x${with_alsa_include}" != x; then
48566      ALSA_CFLAGS="-I${with_alsa_include}"
48567      ALSA_FOUND=yes
48568    fi
48569    if test "x${with_alsa_lib}" != x; then
48570      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48571      ALSA_FOUND=yes
48572    fi
48573    if test "x$ALSA_FOUND" = xno; then
48574
48575
48576  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48577    # Source the builddeps file again, to make sure it uses the latest variables!
48578    . $builddepsfile
48579    # Look for a target and build machine specific resource!
48580    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48581    if test "x$resource" = x; then
48582      # Ok, lets instead look for a target specific resource
48583      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48584    fi
48585    if test "x$resource" = x; then
48586      # Ok, lets instead look for a build specific resource
48587      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48588    fi
48589    if test "x$resource" = x; then
48590      # Ok, lets instead look for a generic resource
48591      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48592      resource=${builddep_alsa}
48593    fi
48594    if test "x$resource" != x; then
48595      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48596$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48597      # If the resource in the builddeps.conf file is an existing directory,
48598      # for example /java/linux/cups
48599      if test -d ${resource}; then
48600        depdir=${resource}
48601      else
48602
48603  # alsa is for example mymodule
48604  # $resource is for example libs/general/libmymod_1_2_3.zip
48605  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48606  # $with_builddeps_dir is for example /localhome/builddeps
48607  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48608  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48609  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48610  filename=`basename $resource`
48611  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48612  filebase=${filename%%.*}
48613  extension=${filename#*.}
48614  installdir=$with_builddeps_dir/$filebase
48615  if test ! -f $installdir/$filename.unpacked; then
48616    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48617$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48618    if test ! -d $installdir; then
48619      mkdir -p $installdir
48620    fi
48621    if test ! -d $installdir; then
48622      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48623    fi
48624    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48625    touch $tmpfile
48626    if test ! -f $tmpfile; then
48627      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48628    fi
48629
48630  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48631  # $tmpfile is the local file name for the downloaded file.
48632  VALID_TOOL=no
48633  if test "x$BDEPS_FTP" = xwget; then
48634    VALID_TOOL=yes
48635    wget -O $tmpfile $with_builddeps_server/$resource
48636  fi
48637  if test "x$BDEPS_FTP" = xlftp; then
48638    VALID_TOOL=yes
48639    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48640  fi
48641  if test "x$BDEPS_FTP" = xftp; then
48642    VALID_TOOL=yes
48643    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48644    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48645    FTPUSERPWD=${FTPSERVER%%@*}
48646    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48647      FTPUSER=${userpwd%%:*}
48648      FTPPWD=${userpwd#*@}
48649      FTPSERVER=${FTPSERVER#*@}
48650    else
48651      FTPUSER=ftp
48652      FTPPWD=ftp
48653    fi
48654    # the "pass" command does not work on some
48655    # ftp clients (read ftp.exe) but if it works,
48656    # passive mode is better!
48657    ( \
48658        echo "user $FTPUSER $FTPPWD"        ; \
48659        echo "pass"                         ; \
48660        echo "bin"                          ; \
48661        echo "get $FTPPATH $tmpfile"              ; \
48662    ) | ftp -in $FTPSERVER
48663  fi
48664  if test "x$VALID_TOOL" != xyes; then
48665    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48666  fi
48667
48668    mv $tmpfile $installdir/$filename
48669    if test ! -s $installdir/$filename; then
48670      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48671    fi
48672    case "$extension" in
48673      zip)  echo "Unzipping $installdir/$filename..."
48674        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48675        ;;
48676      tar.gz) echo "Untaring $installdir/$filename..."
48677        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48678        ;;
48679      tgz) echo "Untaring $installdir/$filename..."
48680        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48681        ;;
48682      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48683        ;;
48684    esac
48685  fi
48686  if test -f $installdir/$filename.unpacked; then
48687    depdir=$installdir
48688  fi
48689
48690      fi
48691      # Source the builddeps file again, because in the previous command, the depdir
48692      # was updated to point at the current build dependency install directory.
48693      . $builddepsfile
48694      # Now extract variables from the builddeps.conf files.
48695      theroot=${builddep_alsa_ROOT}
48696      thecflags=${builddep_alsa_CFLAGS}
48697      thelibs=${builddep_alsa_LIBS}
48698      if test "x$depdir" = x; then
48699        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48700      fi
48701      ALSA=$depdir
48702      if test "x$theroot" != x; then
48703        ALSA="$theroot"
48704      fi
48705      if test "x$thecflags" != x; then
48706        ALSA_CFLAGS="$thecflags"
48707      fi
48708      if test "x$thelibs" != x; then
48709        ALSA_LIBS="$thelibs"
48710      fi
48711      ALSA_FOUND=yes
48712      else ALSA_FOUND=no
48713
48714    fi
48715    else ALSA_FOUND=no
48716
48717  fi
48718
48719    fi
48720    # Do not try pkg-config if we have a sysroot set.
48721    if test "x$SYSROOT" = x; then
48722      if test "x$ALSA_FOUND" = xno; then
48723
48724pkg_failed=no
48725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48726$as_echo_n "checking for ALSA... " >&6; }
48727
48728if test -n "$ALSA_CFLAGS"; then
48729    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48730 elif test -n "$PKG_CONFIG"; then
48731    if test -n "$PKG_CONFIG" && \
48732    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48733  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48734  ac_status=$?
48735  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48736  test $ac_status = 0; }; then
48737  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48738else
48739  pkg_failed=yes
48740fi
48741 else
48742    pkg_failed=untried
48743fi
48744if test -n "$ALSA_LIBS"; then
48745    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48746 elif test -n "$PKG_CONFIG"; then
48747    if test -n "$PKG_CONFIG" && \
48748    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48749  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48750  ac_status=$?
48751  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48752  test $ac_status = 0; }; then
48753  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48754else
48755  pkg_failed=yes
48756fi
48757 else
48758    pkg_failed=untried
48759fi
48760
48761
48762
48763if test $pkg_failed = yes; then
48764
48765if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48766        _pkg_short_errors_supported=yes
48767else
48768        _pkg_short_errors_supported=no
48769fi
48770        if test $_pkg_short_errors_supported = yes; then
48771	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48772        else
48773	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48774        fi
48775	# Put the nasty error message in config.log where it belongs
48776	echo "$ALSA_PKG_ERRORS" >&5
48777
48778	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48779$as_echo "no" >&6; }
48780                ALSA_FOUND=no
48781elif test $pkg_failed = untried; then
48782	ALSA_FOUND=no
48783else
48784	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48785	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48787$as_echo "yes" >&6; }
48788	ALSA_FOUND=yes
48789fi
48790      fi
48791    fi
48792    if test "x$ALSA_FOUND" = xno; then
48793      for ac_header in alsa/asoundlib.h
48794do :
48795  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48796if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48797  cat >>confdefs.h <<_ACEOF
48798#define HAVE_ALSA_ASOUNDLIB_H 1
48799_ACEOF
48800
48801            ALSA_FOUND=yes
48802            ALSA_CFLAGS=-Iignoreme
48803            ALSA_LIBS=-lasound
48804            DEFAULT_ALSA=yes
48805
48806else
48807  ALSA_FOUND=no
48808fi
48809
48810done
48811
48812    fi
48813    if test "x$ALSA_FOUND" = xno; then
48814
48815  # Print a helpful message on how to acquire the necessary build dependency.
48816  # alsa is the help tag: freetype, cups, pulse, alsa etc
48817  MISSING_DEPENDENCY=alsa
48818
48819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48820    cygwin_help $MISSING_DEPENDENCY
48821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48822    msys_help $MISSING_DEPENDENCY
48823  else
48824    PKGHANDLER_COMMAND=
48825
48826    case $PKGHANDLER in
48827      apt-get)
48828        apt_help     $MISSING_DEPENDENCY ;;
48829      yum)
48830        yum_help     $MISSING_DEPENDENCY ;;
48831      port)
48832        port_help    $MISSING_DEPENDENCY ;;
48833      pkgutil)
48834        pkgutil_help $MISSING_DEPENDENCY ;;
48835      pkgadd)
48836        pkgadd_help  $MISSING_DEPENDENCY ;;
48837    esac
48838
48839    if test "x$PKGHANDLER_COMMAND" != x; then
48840      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48841    fi
48842  fi
48843
48844      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48845    fi
48846  fi
48847
48848
48849
48850
48851
48852
48853  ###############################################################################
48854  #
48855  # Check for the jpeg library
48856  #
48857
48858
48859# Check whether --with-libjpeg was given.
48860if test "${with_libjpeg+set}" = set; then :
48861  withval=$with_libjpeg;
48862fi
48863
48864
48865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48866$as_echo_n "checking for which libjpeg to use... " >&6; }
48867
48868  # default is bundled
48869  DEFAULT_LIBJPEG=bundled
48870
48871  #
48872  # if user didn't specify, use DEFAULT_LIBJPEG
48873  #
48874  if test "x${with_libjpeg}" = "x"; then
48875    with_libjpeg=${DEFAULT_LIBJPEG}
48876  fi
48877
48878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48879$as_echo "${with_libjpeg}" >&6; }
48880
48881  if test "x${with_libjpeg}" = "xbundled"; then
48882    USE_EXTERNAL_LIBJPEG=false
48883  elif test "x${with_libjpeg}" = "xsystem"; then
48884    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48885if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48886
48887else
48888   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48889fi
48890
48891
48892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48893$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48894if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48895  $as_echo_n "(cached) " >&6
48896else
48897  ac_check_lib_save_LIBS=$LIBS
48898LIBS="-ljpeg  $LIBS"
48899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48900/* end confdefs.h.  */
48901
48902/* Override any GCC internal prototype to avoid an error.
48903   Use char because int might match the return type of a GCC
48904   builtin and then its argument prototype would still apply.  */
48905#ifdef __cplusplus
48906extern "C"
48907#endif
48908char jpeg_CreateDecompress ();
48909int
48910main ()
48911{
48912return jpeg_CreateDecompress ();
48913  ;
48914  return 0;
48915}
48916_ACEOF
48917if ac_fn_cxx_try_link "$LINENO"; then :
48918  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48919else
48920  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48921fi
48922rm -f core conftest.err conftest.$ac_objext \
48923    conftest$ac_exeext conftest.$ac_ext
48924LIBS=$ac_check_lib_save_LIBS
48925fi
48926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48927$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48928if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48929  cat >>confdefs.h <<_ACEOF
48930#define HAVE_LIBJPEG 1
48931_ACEOF
48932
48933  LIBS="-ljpeg $LIBS"
48934
48935else
48936   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48937fi
48938
48939
48940    USE_EXTERNAL_LIBJPEG=true
48941  else
48942    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48943  fi
48944
48945
48946
48947  ###############################################################################
48948  #
48949  # Check for the gif library
48950  #
48951
48952
48953# Check whether --with-giflib was given.
48954if test "${with_giflib+set}" = set; then :
48955  withval=$with_giflib;
48956fi
48957
48958
48959
48960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48961$as_echo_n "checking for which giflib to use... " >&6; }
48962
48963  # default is bundled
48964  DEFAULT_GIFLIB=bundled
48965
48966  #
48967  # if user didn't specify, use DEFAULT_GIFLIB
48968  #
48969  if test "x${with_giflib}" = "x"; then
48970    with_giflib=${DEFAULT_GIFLIB}
48971  fi
48972
48973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48974$as_echo "${with_giflib}" >&6; }
48975
48976  if test "x${with_giflib}" = "xbundled"; then
48977    USE_EXTERNAL_LIBGIF=false
48978  elif test "x${with_giflib}" = "xsystem"; then
48979    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48980if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48981
48982else
48983   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48984fi
48985
48986
48987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48988$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48989if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48990  $as_echo_n "(cached) " >&6
48991else
48992  ac_check_lib_save_LIBS=$LIBS
48993LIBS="-lgif  $LIBS"
48994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48995/* end confdefs.h.  */
48996
48997/* Override any GCC internal prototype to avoid an error.
48998   Use char because int might match the return type of a GCC
48999   builtin and then its argument prototype would still apply.  */
49000#ifdef __cplusplus
49001extern "C"
49002#endif
49003char DGifGetCode ();
49004int
49005main ()
49006{
49007return DGifGetCode ();
49008  ;
49009  return 0;
49010}
49011_ACEOF
49012if ac_fn_cxx_try_link "$LINENO"; then :
49013  ac_cv_lib_gif_DGifGetCode=yes
49014else
49015  ac_cv_lib_gif_DGifGetCode=no
49016fi
49017rm -f core conftest.err conftest.$ac_objext \
49018    conftest$ac_exeext conftest.$ac_ext
49019LIBS=$ac_check_lib_save_LIBS
49020fi
49021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49022$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49023if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49024  cat >>confdefs.h <<_ACEOF
49025#define HAVE_LIBGIF 1
49026_ACEOF
49027
49028  LIBS="-lgif $LIBS"
49029
49030else
49031   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49032fi
49033
49034
49035    USE_EXTERNAL_LIBGIF=true
49036  else
49037    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49038  fi
49039
49040
49041  ###############################################################################
49042  #
49043  # Check for the lcms2 library
49044  #
49045
49046
49047# Check whether --with-lcms was given.
49048if test "${with_lcms+set}" = set; then :
49049  withval=$with_lcms;
49050fi
49051
49052
49053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49054$as_echo_n "checking for which lcms to use... " >&6; }
49055
49056  DEFAULT_LCMS=bundled
49057
49058  #
49059  # If user didn't specify, use DEFAULT_LCMS
49060  #
49061  if test "x${with_lcms}" = "x"; then
49062      with_lcms=${DEFAULT_LCMS}
49063  fi
49064
49065  if test "x${with_lcms}" = "xbundled"; then
49066    USE_EXTERNAL_LCMS=false
49067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49068$as_echo "bundled" >&6; }
49069  elif test "x${with_lcms}" = "xsystem"; then
49070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49071$as_echo "system" >&6; }
49072
49073pkg_failed=no
49074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49075$as_echo_n "checking for LCMS... " >&6; }
49076
49077if test -n "$LCMS_CFLAGS"; then
49078    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49079 elif test -n "$PKG_CONFIG"; then
49080    if test -n "$PKG_CONFIG" && \
49081    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49082  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49083  ac_status=$?
49084  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49085  test $ac_status = 0; }; then
49086  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49087else
49088  pkg_failed=yes
49089fi
49090 else
49091    pkg_failed=untried
49092fi
49093if test -n "$LCMS_LIBS"; then
49094    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49095 elif test -n "$PKG_CONFIG"; then
49096    if test -n "$PKG_CONFIG" && \
49097    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49098  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49099  ac_status=$?
49100  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49101  test $ac_status = 0; }; then
49102  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49103else
49104  pkg_failed=yes
49105fi
49106 else
49107    pkg_failed=untried
49108fi
49109
49110
49111
49112if test $pkg_failed = yes; then
49113
49114if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49115        _pkg_short_errors_supported=yes
49116else
49117        _pkg_short_errors_supported=no
49118fi
49119        if test $_pkg_short_errors_supported = yes; then
49120	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49121        else
49122	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49123        fi
49124	# Put the nasty error message in config.log where it belongs
49125	echo "$LCMS_PKG_ERRORS" >&5
49126
49127	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49128$as_echo "no" >&6; }
49129                LCMS_FOUND=no
49130elif test $pkg_failed = untried; then
49131	LCMS_FOUND=no
49132else
49133	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49134	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49136$as_echo "yes" >&6; }
49137	LCMS_FOUND=yes
49138fi
49139    if test "x${LCMS_FOUND}" = "xyes"; then
49140      USE_EXTERNAL_LCMS=true
49141    else
49142      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49143    fi
49144  else
49145    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49146  fi
49147
49148
49149
49150  ###############################################################################
49151  #
49152  # Check for the png library
49153  #
49154
49155
49156# Check whether --with-libpng was given.
49157if test "${with_libpng+set}" = set; then :
49158  withval=$with_libpng;
49159fi
49160
49161
49162
49163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49164$as_echo_n "checking for which libpng to use... " >&6; }
49165
49166  # default is bundled
49167  DEFAULT_LIBPNG=bundled
49168
49169  #
49170  # if user didn't specify, use DEFAULT_LIBPNG
49171  #
49172  if test "x${with_libpng}" = "x"; then
49173      with_libpng=${DEFAULT_LIBPNG}
49174  fi
49175
49176  if test "x${with_libpng}" = "xbundled"; then
49177      USE_EXTERNAL_LIBPNG=false
49178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49179$as_echo "bundled" >&6; }
49180  elif test "x${with_libpng}" = "xsystem"; then
49181
49182pkg_failed=no
49183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49184$as_echo_n "checking for PNG... " >&6; }
49185
49186if test -n "$PNG_CFLAGS"; then
49187    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49188 elif test -n "$PKG_CONFIG"; then
49189    if test -n "$PKG_CONFIG" && \
49190    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49191  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49192  ac_status=$?
49193  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49194  test $ac_status = 0; }; then
49195  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49196else
49197  pkg_failed=yes
49198fi
49199 else
49200    pkg_failed=untried
49201fi
49202if test -n "$PNG_LIBS"; then
49203    pkg_cv_PNG_LIBS="$PNG_LIBS"
49204 elif test -n "$PKG_CONFIG"; then
49205    if test -n "$PKG_CONFIG" && \
49206    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49207  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49208  ac_status=$?
49209  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49210  test $ac_status = 0; }; then
49211  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49212else
49213  pkg_failed=yes
49214fi
49215 else
49216    pkg_failed=untried
49217fi
49218
49219
49220
49221if test $pkg_failed = yes; then
49222
49223if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49224        _pkg_short_errors_supported=yes
49225else
49226        _pkg_short_errors_supported=no
49227fi
49228        if test $_pkg_short_errors_supported = yes; then
49229	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49230        else
49231	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49232        fi
49233	# Put the nasty error message in config.log where it belongs
49234	echo "$PNG_PKG_ERRORS" >&5
49235
49236	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49237$as_echo "no" >&6; }
49238                 LIBPNG_FOUND=no
49239elif test $pkg_failed = untried; then
49240	 LIBPNG_FOUND=no
49241else
49242	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49243	PNG_LIBS=$pkg_cv_PNG_LIBS
49244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49245$as_echo "yes" >&6; }
49246	 LIBPNG_FOUND=yes
49247fi
49248      if test "x${LIBPNG_FOUND}" = "xyes"; then
49249          USE_EXTERNAL_LIBPNG=true
49250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49251$as_echo "system" >&6; }
49252      else
49253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49254$as_echo "system not found" >&6; }
49255          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49256      fi
49257  else
49258      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49259  fi
49260
49261
49262  ###############################################################################
49263  #
49264  # Check for the zlib library
49265  #
49266
49267
49268# Check whether --with-zlib was given.
49269if test "${with_zlib+set}" = set; then :
49270  withval=$with_zlib;
49271fi
49272
49273
49274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49275$as_echo_n "checking for compress in -lz... " >&6; }
49276if ${ac_cv_lib_z_compress+:} false; then :
49277  $as_echo_n "(cached) " >&6
49278else
49279  ac_check_lib_save_LIBS=$LIBS
49280LIBS="-lz  $LIBS"
49281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49282/* end confdefs.h.  */
49283
49284/* Override any GCC internal prototype to avoid an error.
49285   Use char because int might match the return type of a GCC
49286   builtin and then its argument prototype would still apply.  */
49287#ifdef __cplusplus
49288extern "C"
49289#endif
49290char compress ();
49291int
49292main ()
49293{
49294return compress ();
49295  ;
49296  return 0;
49297}
49298_ACEOF
49299if ac_fn_cxx_try_link "$LINENO"; then :
49300  ac_cv_lib_z_compress=yes
49301else
49302  ac_cv_lib_z_compress=no
49303fi
49304rm -f core conftest.err conftest.$ac_objext \
49305    conftest$ac_exeext conftest.$ac_ext
49306LIBS=$ac_check_lib_save_LIBS
49307fi
49308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49309$as_echo "$ac_cv_lib_z_compress" >&6; }
49310if test "x$ac_cv_lib_z_compress" = xyes; then :
49311   ZLIB_FOUND=yes
49312else
49313   ZLIB_FOUND=no
49314fi
49315
49316
49317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49318$as_echo_n "checking for which zlib to use... " >&6; }
49319
49320  DEFAULT_ZLIB=bundled
49321  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49322    #
49323    # On macosx default is system...on others default is
49324    #
49325    DEFAULT_ZLIB=system
49326  fi
49327
49328  if test "x${ZLIB_FOUND}" != "xyes"; then
49329    #
49330    # If we don't find any system...set default to bundled
49331    #
49332    DEFAULT_ZLIB=bundled
49333  fi
49334
49335  #
49336  # If user didn't specify, use DEFAULT_ZLIB
49337  #
49338  if test "x${with_zlib}" = "x"; then
49339    with_zlib=${DEFAULT_ZLIB}
49340  fi
49341
49342  if test "x${with_zlib}" = "xbundled"; then
49343    USE_EXTERNAL_LIBZ=false
49344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49345$as_echo "bundled" >&6; }
49346  elif test "x${with_zlib}" = "xsystem"; then
49347    if test "x${ZLIB_FOUND}" = "xyes"; then
49348      USE_EXTERNAL_LIBZ=true
49349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49350$as_echo "system" >&6; }
49351    else
49352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49353$as_echo "system not found" >&6; }
49354      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49355    fi
49356  else
49357    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49358  fi
49359
49360
49361
49362  ###############################################################################
49363  LIBZIP_CAN_USE_MMAP=true
49364
49365
49366
49367  ###############################################################################
49368  #
49369  # Check if altzone exists in time.h
49370  #
49371
49372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49373/* end confdefs.h.  */
49374#include <time.h>
49375int
49376main ()
49377{
49378return (int)altzone;
49379  ;
49380  return 0;
49381}
49382_ACEOF
49383if ac_fn_cxx_try_link "$LINENO"; then :
49384  has_altzone=yes
49385else
49386  has_altzone=no
49387fi
49388rm -f core conftest.err conftest.$ac_objext \
49389    conftest$ac_exeext conftest.$ac_ext
49390  if test "x$has_altzone" = xyes; then
49391
49392$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49393
49394  fi
49395
49396  ###############################################################################
49397  #
49398  # Check the maths library
49399  #
49400
49401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49402$as_echo_n "checking for cos in -lm... " >&6; }
49403if ${ac_cv_lib_m_cos+:} false; then :
49404  $as_echo_n "(cached) " >&6
49405else
49406  ac_check_lib_save_LIBS=$LIBS
49407LIBS="-lm  $LIBS"
49408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49409/* end confdefs.h.  */
49410
49411/* Override any GCC internal prototype to avoid an error.
49412   Use char because int might match the return type of a GCC
49413   builtin and then its argument prototype would still apply.  */
49414#ifdef __cplusplus
49415extern "C"
49416#endif
49417char cos ();
49418int
49419main ()
49420{
49421return cos ();
49422  ;
49423  return 0;
49424}
49425_ACEOF
49426if ac_fn_cxx_try_link "$LINENO"; then :
49427  ac_cv_lib_m_cos=yes
49428else
49429  ac_cv_lib_m_cos=no
49430fi
49431rm -f core conftest.err conftest.$ac_objext \
49432    conftest$ac_exeext conftest.$ac_ext
49433LIBS=$ac_check_lib_save_LIBS
49434fi
49435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49436$as_echo "$ac_cv_lib_m_cos" >&6; }
49437if test "x$ac_cv_lib_m_cos" = xyes; then :
49438  cat >>confdefs.h <<_ACEOF
49439#define HAVE_LIBM 1
49440_ACEOF
49441
49442  LIBS="-lm $LIBS"
49443
49444else
49445
49446        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49447$as_echo "$as_me: Maths library was not found" >&6;}
49448
49449
49450fi
49451
49452
49453
49454  ###############################################################################
49455  #
49456  # Check for libdl.so
49457
49458  save_LIBS="$LIBS"
49459  LIBS=""
49460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49461$as_echo_n "checking for dlopen in -ldl... " >&6; }
49462if ${ac_cv_lib_dl_dlopen+:} false; then :
49463  $as_echo_n "(cached) " >&6
49464else
49465  ac_check_lib_save_LIBS=$LIBS
49466LIBS="-ldl  $LIBS"
49467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49468/* end confdefs.h.  */
49469
49470/* Override any GCC internal prototype to avoid an error.
49471   Use char because int might match the return type of a GCC
49472   builtin and then its argument prototype would still apply.  */
49473#ifdef __cplusplus
49474extern "C"
49475#endif
49476char dlopen ();
49477int
49478main ()
49479{
49480return dlopen ();
49481  ;
49482  return 0;
49483}
49484_ACEOF
49485if ac_fn_cxx_try_link "$LINENO"; then :
49486  ac_cv_lib_dl_dlopen=yes
49487else
49488  ac_cv_lib_dl_dlopen=no
49489fi
49490rm -f core conftest.err conftest.$ac_objext \
49491    conftest$ac_exeext conftest.$ac_ext
49492LIBS=$ac_check_lib_save_LIBS
49493fi
49494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49495$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49496if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49497  cat >>confdefs.h <<_ACEOF
49498#define HAVE_LIBDL 1
49499_ACEOF
49500
49501  LIBS="-ldl $LIBS"
49502
49503fi
49504
49505  LIBDL="$LIBS"
49506
49507  LIBS="$save_LIBS"
49508
49509
49510  ###############################################################################
49511  #
49512  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49513  # dynamic build is configured on command line.
49514  #
49515
49516# Check whether --with-stdc++lib was given.
49517if test "${with_stdc__lib+set}" = set; then :
49518  withval=$with_stdc__lib;
49519        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49520                && test "x$with_stdc__lib" != xdefault; then
49521          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49522        fi
49523
49524else
49525  with_stdc__lib=default
49526
49527fi
49528
49529
49530  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49531    # Test if -lstdc++ works.
49532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49533$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49534    ac_ext=cpp
49535ac_cpp='$CXXCPP $CPPFLAGS'
49536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49539
49540    OLD_CXXFLAGS="$CXXFLAGS"
49541    CXXFLAGS="$CXXFLAGS -lstdc++"
49542    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49543/* end confdefs.h.  */
49544
49545int
49546main ()
49547{
49548return 0;
49549  ;
49550  return 0;
49551}
49552_ACEOF
49553if ac_fn_cxx_try_link "$LINENO"; then :
49554  has_dynamic_libstdcxx=yes
49555else
49556  has_dynamic_libstdcxx=no
49557fi
49558rm -f core conftest.err conftest.$ac_objext \
49559    conftest$ac_exeext conftest.$ac_ext
49560    CXXFLAGS="$OLD_CXXFLAGS"
49561    ac_ext=cpp
49562ac_cpp='$CXXCPP $CPPFLAGS'
49563ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49564ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49565ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49566
49567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49568$as_echo "$has_dynamic_libstdcxx" >&6; }
49569
49570    # Test if stdc++ can be linked statically.
49571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49572$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49573    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49574    ac_ext=cpp
49575ac_cpp='$CXXCPP $CPPFLAGS'
49576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49579
49580    OLD_LIBS="$LIBS"
49581    OLD_CXX="$CXX"
49582    LIBS="$STATIC_STDCXX_FLAGS"
49583    CXX="$CC"
49584    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49585/* end confdefs.h.  */
49586
49587int
49588main ()
49589{
49590return 0;
49591  ;
49592  return 0;
49593}
49594_ACEOF
49595if ac_fn_cxx_try_link "$LINENO"; then :
49596  has_static_libstdcxx=yes
49597else
49598  has_static_libstdcxx=no
49599fi
49600rm -f core conftest.err conftest.$ac_objext \
49601    conftest$ac_exeext conftest.$ac_ext
49602    LIBS="$OLD_LIBS"
49603    CXX="$OLD_CXX"
49604    ac_ext=cpp
49605ac_cpp='$CXXCPP $CPPFLAGS'
49606ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49607ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49608ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49609
49610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49611$as_echo "$has_static_libstdcxx" >&6; }
49612
49613    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49614      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49615    fi
49616
49617    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49618      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49619    fi
49620
49621    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49622      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49623    fi
49624
49625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49626$as_echo_n "checking how to link with libstdc++... " >&6; }
49627    # If dynamic was requested, it's available since it would fail above otherwise.
49628    # If dynamic wasn't requested, go with static unless it isn't available.
49629    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49630      LIBCXX="$LIBCXX -lstdc++"
49631      LDCXX="$CXX"
49632      STATIC_CXX_SETTING="STATIC_CXX=false"
49633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49634$as_echo "dynamic" >&6; }
49635    else
49636      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49637      LDCXX="$CC"
49638      STATIC_CXX_SETTING="STATIC_CXX=true"
49639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49640$as_echo "static" >&6; }
49641    fi
49642  fi
49643
49644
49645  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49646    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49647
49648pkg_failed=no
49649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49650$as_echo_n "checking for LIBFFI... " >&6; }
49651
49652if test -n "$LIBFFI_CFLAGS"; then
49653    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49654 elif test -n "$PKG_CONFIG"; then
49655    if test -n "$PKG_CONFIG" && \
49656    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49657  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49658  ac_status=$?
49659  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49660  test $ac_status = 0; }; then
49661  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49662else
49663  pkg_failed=yes
49664fi
49665 else
49666    pkg_failed=untried
49667fi
49668if test -n "$LIBFFI_LIBS"; then
49669    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49670 elif test -n "$PKG_CONFIG"; then
49671    if test -n "$PKG_CONFIG" && \
49672    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49673  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49674  ac_status=$?
49675  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49676  test $ac_status = 0; }; then
49677  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49678else
49679  pkg_failed=yes
49680fi
49681 else
49682    pkg_failed=untried
49683fi
49684
49685
49686
49687if test $pkg_failed = yes; then
49688
49689if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49690        _pkg_short_errors_supported=yes
49691else
49692        _pkg_short_errors_supported=no
49693fi
49694        if test $_pkg_short_errors_supported = yes; then
49695	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49696        else
49697	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49698        fi
49699	# Put the nasty error message in config.log where it belongs
49700	echo "$LIBFFI_PKG_ERRORS" >&5
49701
49702	as_fn_error $? "Package requirements (libffi) were not met:
49703
49704$LIBFFI_PKG_ERRORS
49705
49706Consider adjusting the PKG_CONFIG_PATH environment variable if you
49707installed software in a non-standard prefix.
49708
49709Alternatively, you may set the environment variables LIBFFI_CFLAGS
49710and LIBFFI_LIBS to avoid the need to call pkg-config.
49711See the pkg-config man page for more details.
49712" "$LINENO" 5
49713elif test $pkg_failed = untried; then
49714	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49716as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49717is in your PATH or set the PKG_CONFIG environment variable to the full
49718path to pkg-config.
49719
49720Alternatively, you may set the environment variables LIBFFI_CFLAGS
49721and LIBFFI_LIBS to avoid the need to call pkg-config.
49722See the pkg-config man page for more details.
49723
49724To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49725See \`config.log' for more details" "$LINENO" 5; }
49726else
49727	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49728	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49730$as_echo "yes" >&6; }
49731	:
49732fi
49733
49734  fi
49735
49736  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49737    # Extract the first word of "llvm-config", so it can be a program name with args.
49738set dummy llvm-config; ac_word=$2
49739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49740$as_echo_n "checking for $ac_word... " >&6; }
49741if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49742  $as_echo_n "(cached) " >&6
49743else
49744  if test -n "$LLVM_CONFIG"; then
49745  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49746else
49747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49748for as_dir in $PATH
49749do
49750  IFS=$as_save_IFS
49751  test -z "$as_dir" && as_dir=.
49752    for ac_exec_ext in '' $ac_executable_extensions; do
49753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49754    ac_cv_prog_LLVM_CONFIG="llvm-config"
49755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49756    break 2
49757  fi
49758done
49759  done
49760IFS=$as_save_IFS
49761
49762fi
49763fi
49764LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49765if test -n "$LLVM_CONFIG"; then
49766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49767$as_echo "$LLVM_CONFIG" >&6; }
49768else
49769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49770$as_echo "no" >&6; }
49771fi
49772
49773
49774
49775    if test "x$LLVM_CONFIG" != xllvm-config; then
49776      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49777    fi
49778
49779    llvm_components="jit mcjit engine nativecodegen native"
49780    unset LLVM_CFLAGS
49781    for flag in $("$LLVM_CONFIG" --cxxflags); do
49782      if echo "${flag}" | grep -q '^-[ID]'; then
49783        if test "${flag}" != "-D_DEBUG" ; then
49784          if test "${LLVM_CFLAGS}" != "" ; then
49785            LLVM_CFLAGS="${LLVM_CFLAGS} "
49786          fi
49787          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49788        fi
49789      fi
49790    done
49791    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49792    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49793
49794    unset LLVM_LDFLAGS
49795    for flag in $("${LLVM_CONFIG}" --ldflags); do
49796      if echo "${flag}" | grep -q '^-L'; then
49797        if test "${LLVM_LDFLAGS}" != ""; then
49798          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49799        fi
49800        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49801      fi
49802    done
49803
49804    unset LLVM_LIBS
49805    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49806      if echo "${flag}" | grep -q '^-l'; then
49807        if test "${LLVM_LIBS}" != ""; then
49808          LLVM_LIBS="${LLVM_LIBS} "
49809        fi
49810        LLVM_LIBS="${LLVM_LIBS}${flag}"
49811      fi
49812    done
49813
49814
49815
49816
49817  fi
49818
49819  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49820  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49821    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49822  fi
49823
49824  # TODO better (platform agnostic) test
49825  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49826    LIBCXX="-lstdc++"
49827  fi
49828
49829
49830
49831
49832  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49833
49834
49835# Check whether --with-msvcr-dll was given.
49836if test "${with_msvcr_dll+set}" = set; then :
49837  withval=$with_msvcr_dll;
49838fi
49839
49840
49841  if test "x$with_msvcr_dll" != x; then
49842    # If given explicitely by user, do not probe. If not present, fail directly.
49843
49844  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49845  METHOD="--with-msvcr-dll"
49846  if test -e "$POSSIBLE_MSVCR_DLL"; then
49847    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49848$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49849
49850    # Need to check if the found msvcr is correct architecture
49851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49852$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49853    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49855      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49856      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49857      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49858        CORRECT_MSVCR_ARCH="PE32 executable"
49859      else
49860        CORRECT_MSVCR_ARCH="PE32+ executable"
49861      fi
49862    else
49863      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49864        CORRECT_MSVCR_ARCH=386
49865      else
49866        CORRECT_MSVCR_ARCH=x86-64
49867      fi
49868    fi
49869    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49871$as_echo "ok" >&6; }
49872      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49873      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49874$as_echo_n "checking for msvcr100.dll... " >&6; }
49875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49876$as_echo "$MSVCR_DLL" >&6; }
49877    else
49878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49879$as_echo "incorrect, ignoring" >&6; }
49880      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49881$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49882    fi
49883  fi
49884
49885    if test "x$MSVCR_DLL" = x; then
49886      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49887    fi
49888  fi
49889
49890  if test "x$MSVCR_DLL" = x; then
49891    # Probe: Using well-known location from Visual Studio 10.0
49892    if test "x$VCINSTALLDIR" != x; then
49893      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49894
49895  windows_path="$CYGWIN_VC_INSTALL_DIR"
49896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49897    unix_path=`$CYGPATH -u "$windows_path"`
49898    CYGWIN_VC_INSTALL_DIR="$unix_path"
49899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49901    CYGWIN_VC_INSTALL_DIR="$unix_path"
49902  fi
49903
49904      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49905        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49906      else
49907        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49908      fi
49909
49910  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49911  METHOD="well-known location in VCINSTALLDIR"
49912  if test -e "$POSSIBLE_MSVCR_DLL"; then
49913    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49914$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49915
49916    # Need to check if the found msvcr is correct architecture
49917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49918$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49919    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49921      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49922      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49923      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49924        CORRECT_MSVCR_ARCH="PE32 executable"
49925      else
49926        CORRECT_MSVCR_ARCH="PE32+ executable"
49927      fi
49928    else
49929      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49930        CORRECT_MSVCR_ARCH=386
49931      else
49932        CORRECT_MSVCR_ARCH=x86-64
49933      fi
49934    fi
49935    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49937$as_echo "ok" >&6; }
49938      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49940$as_echo_n "checking for msvcr100.dll... " >&6; }
49941      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49942$as_echo "$MSVCR_DLL" >&6; }
49943    else
49944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49945$as_echo "incorrect, ignoring" >&6; }
49946      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49947$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49948    fi
49949  fi
49950
49951    fi
49952  fi
49953
49954  if test "x$MSVCR_DLL" = x; then
49955    # Probe: Check in the Boot JDK directory.
49956    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49957
49958  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49959  METHOD="well-known location in Boot JDK"
49960  if test -e "$POSSIBLE_MSVCR_DLL"; then
49961    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49962$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49963
49964    # Need to check if the found msvcr is correct architecture
49965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49966$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49967    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49969      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49970      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49971      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49972        CORRECT_MSVCR_ARCH="PE32 executable"
49973      else
49974        CORRECT_MSVCR_ARCH="PE32+ executable"
49975      fi
49976    else
49977      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49978        CORRECT_MSVCR_ARCH=386
49979      else
49980        CORRECT_MSVCR_ARCH=x86-64
49981      fi
49982    fi
49983    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49985$as_echo "ok" >&6; }
49986      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49987      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49988$as_echo_n "checking for msvcr100.dll... " >&6; }
49989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49990$as_echo "$MSVCR_DLL" >&6; }
49991    else
49992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49993$as_echo "incorrect, ignoring" >&6; }
49994      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49995$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49996    fi
49997  fi
49998
49999  fi
50000
50001  if test "x$MSVCR_DLL" = x; then
50002    # Probe: Look in the Windows system32 directory
50003    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50004
50005  windows_path="$CYGWIN_SYSTEMROOT"
50006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50007    unix_path=`$CYGPATH -u "$windows_path"`
50008    CYGWIN_SYSTEMROOT="$unix_path"
50009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50011    CYGWIN_SYSTEMROOT="$unix_path"
50012  fi
50013
50014    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
50015
50016  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50017  METHOD="well-known location in SYSTEMROOT"
50018  if test -e "$POSSIBLE_MSVCR_DLL"; then
50019    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50020$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50021
50022    # Need to check if the found msvcr is correct architecture
50023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50024$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50025    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50027      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50028      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50029      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50030        CORRECT_MSVCR_ARCH="PE32 executable"
50031      else
50032        CORRECT_MSVCR_ARCH="PE32+ executable"
50033      fi
50034    else
50035      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50036        CORRECT_MSVCR_ARCH=386
50037      else
50038        CORRECT_MSVCR_ARCH=x86-64
50039      fi
50040    fi
50041    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50043$as_echo "ok" >&6; }
50044      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50046$as_echo_n "checking for msvcr100.dll... " >&6; }
50047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50048$as_echo "$MSVCR_DLL" >&6; }
50049    else
50050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50051$as_echo "incorrect, ignoring" >&6; }
50052      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50053$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50054    fi
50055  fi
50056
50057  fi
50058
50059  if test "x$MSVCR_DLL" = x; then
50060    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50061    if test "x$VS100COMNTOOLS" != x; then
50062      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50063
50064  windows_path="$CYGWIN_VS_TOOLS_DIR"
50065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50066    unix_path=`$CYGPATH -u "$windows_path"`
50067    CYGWIN_VS_TOOLS_DIR="$unix_path"
50068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50070    CYGWIN_VS_TOOLS_DIR="$unix_path"
50071  fi
50072
50073      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50074        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
50075      else
50076        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
50077      fi
50078
50079  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50080  METHOD="search of VS100COMNTOOLS"
50081  if test -e "$POSSIBLE_MSVCR_DLL"; then
50082    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50083$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50084
50085    # Need to check if the found msvcr is correct architecture
50086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50087$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50088    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50090      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50091      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50092      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50093        CORRECT_MSVCR_ARCH="PE32 executable"
50094      else
50095        CORRECT_MSVCR_ARCH="PE32+ executable"
50096      fi
50097    else
50098      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50099        CORRECT_MSVCR_ARCH=386
50100      else
50101        CORRECT_MSVCR_ARCH=x86-64
50102      fi
50103    fi
50104    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50106$as_echo "ok" >&6; }
50107      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50108      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50109$as_echo_n "checking for msvcr100.dll... " >&6; }
50110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50111$as_echo "$MSVCR_DLL" >&6; }
50112    else
50113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50114$as_echo "incorrect, ignoring" >&6; }
50115      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50116$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50117    fi
50118  fi
50119
50120    fi
50121  fi
50122
50123  if test "x$MSVCR_DLL" = x; then
50124    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50125    # (This was the original behaviour; kept since it might turn up something)
50126    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50127      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50128        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
50129      else
50130        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50131        if test "x$POSSIBLE_MSVCR_DLL" = x; then
50132          # We're grasping at straws now...
50133          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
50134        fi
50135      fi
50136
50137
50138  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50139  METHOD="search of VCINSTALLDIR"
50140  if test -e "$POSSIBLE_MSVCR_DLL"; then
50141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
50142$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
50143
50144    # Need to check if the found msvcr is correct architecture
50145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
50146$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
50147    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
50148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50149      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50150      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50151      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50152        CORRECT_MSVCR_ARCH="PE32 executable"
50153      else
50154        CORRECT_MSVCR_ARCH="PE32+ executable"
50155      fi
50156    else
50157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50158        CORRECT_MSVCR_ARCH=386
50159      else
50160        CORRECT_MSVCR_ARCH=x86-64
50161      fi
50162    fi
50163    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50165$as_echo "ok" >&6; }
50166      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
50167      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50168$as_echo_n "checking for msvcr100.dll... " >&6; }
50169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
50170$as_echo "$MSVCR_DLL" >&6; }
50171    else
50172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50173$as_echo "incorrect, ignoring" >&6; }
50174      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
50175$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
50176    fi
50177  fi
50178
50179    fi
50180  fi
50181
50182  if test "x$MSVCR_DLL" = x; then
50183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
50184$as_echo_n "checking for msvcr100.dll... " >&6; }
50185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50186$as_echo "no" >&6; }
50187    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
50188  fi
50189
50190
50191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50192
50193  # Input might be given as Windows format, start by converting to
50194  # unix format.
50195  path="$MSVCR_DLL"
50196  new_path=`$CYGPATH -u "$path"`
50197
50198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50201  # "foo.exe" is OK but "foo" is an error.
50202  #
50203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50204  # It is also a way to make sure we got the proper file name for the real test later on.
50205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50206  if test "x$test_shortpath" = x; then
50207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50208$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50209    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50210  fi
50211
50212  # Call helper function which possibly converts this using DOS-style short mode.
50213  # If so, the updated path is stored in $new_path.
50214
50215  input_path="$new_path"
50216  # Check if we need to convert this using DOS-style short mode. If the path
50217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50218  # take no chances and rewrite it.
50219  # Note: m4 eats our [], so we need to use [ and ] instead.
50220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50221  if test "x$has_forbidden_chars" != x; then
50222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50226      # Going to short mode and back again did indeed matter. Since short mode is
50227      # case insensitive, let's make it lowercase to improve readability.
50228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50229      # Now convert it back to Unix-stile (cygpath)
50230      input_path=`$CYGPATH -u "$shortmode_path"`
50231      new_path="$input_path"
50232    fi
50233  fi
50234
50235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50236  if test "x$test_cygdrive_prefix" = x; then
50237    # As a simple fix, exclude /usr/bin since it's not a real path.
50238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50240      # a path prefixed by /cygdrive for fixpath to work.
50241      new_path="$CYGWIN_ROOT_PATH$input_path"
50242    fi
50243  fi
50244
50245
50246  if test "x$path" != "x$new_path"; then
50247    MSVCR_DLL="$new_path"
50248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50249$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50250  fi
50251
50252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50253
50254  path="$MSVCR_DLL"
50255  has_colon=`$ECHO $path | $GREP ^.:`
50256  new_path="$path"
50257  if test "x$has_colon" = x; then
50258    # Not in mixed or Windows style, start by that.
50259    new_path=`cmd //c echo $path`
50260  fi
50261
50262
50263  input_path="$new_path"
50264  # Check if we need to convert this using DOS-style short mode. If the path
50265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50266  # take no chances and rewrite it.
50267  # Note: m4 eats our [], so we need to use [ and ] instead.
50268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50269  if test "x$has_forbidden_chars" != x; then
50270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50272  fi
50273
50274
50275  windows_path="$new_path"
50276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50277    unix_path=`$CYGPATH -u "$windows_path"`
50278    new_path="$unix_path"
50279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50281    new_path="$unix_path"
50282  fi
50283
50284  if test "x$path" != "x$new_path"; then
50285    MSVCR_DLL="$new_path"
50286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50287$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50288  fi
50289
50290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50292
50293  else
50294    # We're on a posix platform. Hooray! :)
50295    path="$MSVCR_DLL"
50296    has_space=`$ECHO "$path" | $GREP " "`
50297    if test "x$has_space" != x; then
50298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50299$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50300      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50301    fi
50302
50303    # Use eval to expand a potential ~
50304    eval path="$path"
50305    if test ! -f "$path" && test ! -d "$path"; then
50306      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50307    fi
50308
50309    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50310  fi
50311
50312
50313
50314
50315# Check whether --with-dxsdk was given.
50316if test "${with_dxsdk+set}" = set; then :
50317  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50318$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50319fi
50320
50321
50322
50323
50324# Check whether --with-dxsdk-lib was given.
50325if test "${with_dxsdk_lib+set}" = set; then :
50326  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50327$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50328fi
50329
50330
50331
50332
50333# Check whether --with-dxsdk-include was given.
50334if test "${with_dxsdk_include+set}" = set; then :
50335  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50336$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50337fi
50338
50339
50340  fi
50341
50342
50343
50344###############################################################################
50345#
50346# We need to do some final tweaking, when everything else is done.
50347#
50348###############################################################################
50349
50350
50351  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50352
50353
50354  # The name of the Service Agent jar.
50355  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50356  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50357    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50358  fi
50359
50360
50361
50362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50363$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50364
50365    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50366      ENABLE_INTREE_EC=yes
50367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50368$as_echo "yes" >&6; }
50369    else
50370      ENABLE_INTREE_EC=no
50371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50372$as_echo "no" >&6; }
50373    fi
50374
50375
50376
50377
50378###############################################################################
50379#
50380# Configure parts of the build that only affect the build performance,
50381# not the result.
50382#
50383###############################################################################
50384
50385
50386  # How many cores do we have on this build system?
50387
50388# Check whether --with-num-cores was given.
50389if test "${with_num_cores+set}" = set; then :
50390  withval=$with_num_cores;
50391fi
50392
50393  if test "x$with_num_cores" = x; then
50394    # The number of cores were not specified, try to probe them.
50395
50396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50397$as_echo_n "checking for number of cores... " >&6; }
50398  NUM_CORES=1
50399  FOUND_CORES=no
50400
50401  if test -f /proc/cpuinfo; then
50402    # Looks like a Linux (or cygwin) system
50403    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50404    FOUND_CORES=yes
50405  elif test -x /usr/sbin/psrinfo; then
50406    # Looks like a Solaris system
50407    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50408    FOUND_CORES=yes
50409  elif test -x /usr/sbin/system_profiler; then
50410    # Looks like a MacOSX system
50411    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50412    FOUND_CORES=yes
50413  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50414    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50415    FOUND_CORES=yes
50416  elif test -n "$NUMBER_OF_PROCESSORS"; then
50417    # On windows, look in the env
50418    NUM_CORES=$NUMBER_OF_PROCESSORS
50419    FOUND_CORES=yes
50420  fi
50421
50422  if test "x$FOUND_CORES" = xyes; then
50423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50424$as_echo "$NUM_CORES" >&6; }
50425  else
50426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50427$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50428    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50429$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50430  fi
50431
50432  else
50433    NUM_CORES=$with_num_cores
50434  fi
50435
50436
50437
50438  # How much memory do we have on this build system?
50439
50440# Check whether --with-memory-size was given.
50441if test "${with_memory_size+set}" = set; then :
50442  withval=$with_memory_size;
50443fi
50444
50445  if test "x$with_memory_size" = x; then
50446    # The memory size was not specified, try to probe it.
50447
50448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50449$as_echo_n "checking for memory size... " >&6; }
50450  # Default to 1024 MB
50451  MEMORY_SIZE=1024
50452  FOUND_MEM=no
50453
50454  if test -f /proc/meminfo; then
50455    # Looks like a Linux (or cygwin) system
50456    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50457    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50458    FOUND_MEM=yes
50459  elif test -x /usr/sbin/prtconf; then
50460    # Looks like a Solaris or AIX system
50461    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50462    FOUND_MEM=yes
50463  elif test -x /usr/sbin/system_profiler; then
50464    # Looks like a MacOSX system
50465    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50466    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50467    FOUND_MEM=yes
50468  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50469    # Windows, but without cygwin
50470    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50471    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50472    FOUND_MEM=yes
50473  fi
50474
50475  if test "x$FOUND_MEM" = xyes; then
50476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50477$as_echo "$MEMORY_SIZE MB" >&6; }
50478  else
50479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50480$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50482$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50483  fi
50484
50485  else
50486    MEMORY_SIZE=$with_memory_size
50487  fi
50488
50489
50490
50491  # Provide a decent default number of parallel jobs for make depending on
50492  # number of cores, amount of memory and machine architecture.
50493
50494# Check whether --with-jobs was given.
50495if test "${with_jobs+set}" = set; then :
50496  withval=$with_jobs;
50497fi
50498
50499  if test "x$with_jobs" = x; then
50500    # Number of jobs was not specified, calculate.
50501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50502$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50503    # Approximate memory in GB.
50504    memory_gb=`expr $MEMORY_SIZE / 1024`
50505    # Pick the lowest of memory in gb and number of cores.
50506    if test "$memory_gb" -lt "$NUM_CORES"; then
50507      JOBS="$memory_gb"
50508    else
50509      JOBS="$NUM_CORES"
50510      # On bigger machines, leave some room for other processes to run
50511      if test "$JOBS" -gt "4"; then
50512        JOBS=`expr $JOBS '*' 90 / 100`
50513      fi
50514    fi
50515    # Cap number of jobs to 16
50516    if test "$JOBS" -gt "16"; then
50517      JOBS=16
50518    fi
50519    if test "$JOBS" -eq "0"; then
50520      JOBS=1
50521    fi
50522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50523$as_echo "$JOBS" >&6; }
50524  else
50525    JOBS=$with_jobs
50526  fi
50527
50528
50529
50530# Setup arguments for the boot jdk (after cores and memory have been setup)
50531
50532  ##############################################################################
50533  #
50534  # Specify jvm options for anything that is run with the Boot JDK.
50535  # Not all JVM:s accept the same arguments on the command line.
50536  #
50537
50538# Check whether --with-boot-jdk-jvmargs was given.
50539if test "${with_boot_jdk_jvmargs+set}" = set; then :
50540  withval=$with_boot_jdk_jvmargs;
50541fi
50542
50543
50544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50545$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50546
50547  # Disable special log output when a debug build is used as Boot JDK...
50548
50549  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50550  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50551  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50552  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50553  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50554  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50555    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50556    JVM_ARG_OK=true
50557  else
50558    $ECHO "Arg failed:" >&5
50559    $ECHO "$OUTPUT" >&5
50560    JVM_ARG_OK=false
50561  fi
50562
50563
50564  # Apply user provided options.
50565
50566  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50567  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50568  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50569  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50570  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50571  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50572    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50573    JVM_ARG_OK=true
50574  else
50575    $ECHO "Arg failed:" >&5
50576    $ECHO "$OUTPUT" >&5
50577    JVM_ARG_OK=false
50578  fi
50579
50580
50581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50582$as_echo "$boot_jdk_jvmargs" >&6; }
50583
50584  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50585  JAVA_FLAGS=$boot_jdk_jvmargs
50586
50587
50588
50589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50590$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50591
50592  # Starting amount of heap memory.
50593
50594  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50595  $ECHO "Command: $JAVA -Xms64M -version" >&5
50596  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50597  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50598  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50599  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50600    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50601    JVM_ARG_OK=true
50602  else
50603    $ECHO "Arg failed:" >&5
50604    $ECHO "$OUTPUT" >&5
50605    JVM_ARG_OK=false
50606  fi
50607
50608
50609  # Maximum amount of heap memory.
50610  # Maximum stack size.
50611  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50612  if test "x$BUILD_NUM_BITS" = x32; then
50613    if test "$JVM_MAX_HEAP" -gt "1100"; then
50614      JVM_MAX_HEAP=1100
50615    elif test "$JVM_MAX_HEAP" -lt "512"; then
50616      JVM_MAX_HEAP=512
50617    fi
50618    STACK_SIZE=768
50619  else
50620    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50621    # pointers are used. Apparently, we need to increase the heap and stack
50622    # space for the jvm. More specifically, when running javac to build huge
50623    # jdk batch
50624    if test "$JVM_MAX_HEAP" -gt "1600"; then
50625      JVM_MAX_HEAP=1600
50626    elif test "$JVM_MAX_HEAP" -lt "512"; then
50627      JVM_MAX_HEAP=512
50628    fi
50629    STACK_SIZE=1536
50630  fi
50631
50632  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50633  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50634  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50635  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50636  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50637  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50638    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50639    JVM_ARG_OK=true
50640  else
50641    $ECHO "Arg failed:" >&5
50642    $ECHO "$OUTPUT" >&5
50643    JVM_ARG_OK=false
50644  fi
50645
50646
50647  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50648  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50649  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50650  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50651  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50652  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50653    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50654    JVM_ARG_OK=true
50655  else
50656    $ECHO "Arg failed:" >&5
50657    $ECHO "$OUTPUT" >&5
50658    JVM_ARG_OK=false
50659  fi
50660
50661
50662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50663$as_echo "$boot_jdk_jvmargs_big" >&6; }
50664
50665  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50666
50667
50668
50669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50670$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50671
50672  # Use serial gc for small short lived tools if possible
50673
50674  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50675  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50676  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50677  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50678  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50679  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50680    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50681    JVM_ARG_OK=true
50682  else
50683    $ECHO "Arg failed:" >&5
50684    $ECHO "$OUTPUT" >&5
50685    JVM_ARG_OK=false
50686  fi
50687
50688
50689  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50690  $ECHO "Command: $JAVA -Xms32M -version" >&5
50691  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50692  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50693  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50694  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50695    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50696    JVM_ARG_OK=true
50697  else
50698    $ECHO "Arg failed:" >&5
50699    $ECHO "$OUTPUT" >&5
50700    JVM_ARG_OK=false
50701  fi
50702
50703
50704  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50705  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50706  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50707  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50708  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50709  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50710    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50711    JVM_ARG_OK=true
50712  else
50713    $ECHO "Arg failed:" >&5
50714    $ECHO "$OUTPUT" >&5
50715    JVM_ARG_OK=false
50716  fi
50717
50718
50719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50720$as_echo "$boot_jdk_jvmargs_small" >&6; }
50721
50722  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50723
50724
50725  JAVA_TOOL_FLAGS_SMALL=""
50726  for f in $JAVA_FLAGS_SMALL; do
50727    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50728  done
50729
50730
50731
50732# Setup smart javac (after cores and memory have been setup)
50733
50734
50735# Check whether --with-sjavac-server-java was given.
50736if test "${with_sjavac_server_java+set}" = set; then :
50737  withval=$with_sjavac_server_java;
50738fi
50739
50740
50741  if test "x$with_sjavac_server_java" != x; then
50742    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50743    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50744    if test "x$FOUND_VERSION" = x; then
50745      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50746    fi
50747  else
50748    SJAVAC_SERVER_JAVA="$JAVA"
50749  fi
50750
50751
50752  if test "$MEMORY_SIZE" -gt "3000"; then
50753
50754  $ECHO "Check if jvm arg is ok: -d64" >&5
50755  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50756  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50757  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50758  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50759  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50760    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50761    JVM_ARG_OK=true
50762  else
50763    $ECHO "Arg failed:" >&5
50764    $ECHO "$OUTPUT" >&5
50765    JVM_ARG_OK=false
50766  fi
50767
50768    if test "$JVM_ARG_OK" = true; then
50769      JVM_64BIT=true
50770      JVM_ARG_OK=false
50771    fi
50772  fi
50773
50774  MX_VALUE=`expr $MEMORY_SIZE / 2`
50775  if test "$JVM_64BIT" = true; then
50776    # Set ms lower than mx since more than one instance of the server might
50777    # get launched at the same time before they figure out which instance won.
50778    MS_VALUE=512
50779    if test "$MX_VALUE" -gt "2048"; then
50780      MX_VALUE=2048
50781    fi
50782  else
50783    MS_VALUE=256
50784    if test "$MX_VALUE" -gt "1500"; then
50785      MX_VALUE=1500
50786    fi
50787  fi
50788  if test "$MX_VALUE" -lt "512"; then
50789    MX_VALUE=512
50790  fi
50791
50792  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50793  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50794  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50795  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50796  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50797  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50798    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50799    JVM_ARG_OK=true
50800  else
50801    $ECHO "Arg failed:" >&5
50802    $ECHO "$OUTPUT" >&5
50803    JVM_ARG_OK=false
50804  fi
50805
50806
50807
50808  # Check whether --enable-sjavac was given.
50809if test "${enable_sjavac+set}" = set; then :
50810  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50811else
50812  ENABLE_SJAVAC='no'
50813fi
50814
50815  if test "x$JVM_ARG_OK" = "xfalse"; then
50816    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50817$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50818    ENABLE_SJAVAC=no;
50819  fi
50820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50821$as_echo_n "checking whether to use sjavac... " >&6; }
50822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50823$as_echo "$ENABLE_SJAVAC" >&6; }
50824
50825
50826  if test "x$ENABLE_SJAVAC" = xyes; then
50827    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50828  else
50829    SJAVAC_SERVER_DIR=
50830  fi
50831
50832
50833
50834# Can the C/C++ compiler use precompiled headers?
50835
50836
50837  ###############################################################################
50838  #
50839  # Can the C/C++ compiler use precompiled headers?
50840  #
50841  # Check whether --enable-precompiled-headers was given.
50842if test "${enable_precompiled_headers+set}" = set; then :
50843  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50844else
50845  ENABLE_PRECOMPH=yes
50846fi
50847
50848
50849  USE_PRECOMPILED_HEADER=1
50850  if test "x$ENABLE_PRECOMPH" = xno; then
50851    USE_PRECOMPILED_HEADER=0
50852  fi
50853
50854  if test "x$ENABLE_PRECOMPH" = xyes; then
50855    # Check that the compiler actually supports precomp headers.
50856    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50858$as_echo_n "checking that precompiled headers work... " >&6; }
50859      echo "int alfa();" > conftest.h
50860      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50861      if test ! -f conftest.hpp.gch; then
50862        USE_PRECOMPILED_HEADER=0
50863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50864$as_echo "no" >&6; }
50865      else
50866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50867$as_echo "yes" >&6; }
50868      fi
50869      rm -f conftest.h conftest.hpp.gch
50870    fi
50871  fi
50872
50873
50874
50875
50876# Setup use of ccache, if available
50877
50878  # Check whether --enable-ccache was given.
50879if test "${enable_ccache+set}" = set; then :
50880  enableval=$enable_ccache;
50881fi
50882
50883
50884  CCACHE=
50885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50886$as_echo_n "checking is ccache enabled... " >&6; }
50887  ENABLE_CCACHE=$enable_ccache
50888  if test "x$enable_ccache" = xyes; then
50889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50890$as_echo "yes" >&6; }
50891    OLD_PATH="$PATH"
50892    if test "x$TOOLCHAIN_PATH" != x; then
50893      PATH=$TOOLCHAIN_PATH:$PATH
50894    fi
50895
50896
50897
50898  # Publish this variable in the help.
50899
50900
50901  if test "x$CCACHE" = x; then
50902    # The variable is not set by user, try to locate tool using the code snippet
50903    for ac_prog in ccache
50904do
50905  # Extract the first word of "$ac_prog", so it can be a program name with args.
50906set dummy $ac_prog; ac_word=$2
50907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50908$as_echo_n "checking for $ac_word... " >&6; }
50909if ${ac_cv_path_CCACHE+:} false; then :
50910  $as_echo_n "(cached) " >&6
50911else
50912  case $CCACHE in
50913  [\\/]* | ?:[\\/]*)
50914  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50915  ;;
50916  *)
50917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50918for as_dir in $PATH
50919do
50920  IFS=$as_save_IFS
50921  test -z "$as_dir" && as_dir=.
50922    for ac_exec_ext in '' $ac_executable_extensions; do
50923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50924    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50926    break 2
50927  fi
50928done
50929  done
50930IFS=$as_save_IFS
50931
50932  ;;
50933esac
50934fi
50935CCACHE=$ac_cv_path_CCACHE
50936if test -n "$CCACHE"; then
50937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50938$as_echo "$CCACHE" >&6; }
50939else
50940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50941$as_echo "no" >&6; }
50942fi
50943
50944
50945  test -n "$CCACHE" && break
50946done
50947
50948  else
50949    # The variable is set, but is it from the command line or the environment?
50950
50951    # Try to remove the string !CCACHE! from our list.
50952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50954      # If it failed, the variable was not from the command line. Ignore it,
50955      # but warn the user (except for BASH, which is always set by the calling BASH).
50956      if test "xCCACHE" != xBASH; then
50957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50958$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50959      fi
50960      # Try to locate tool using the code snippet
50961      for ac_prog in ccache
50962do
50963  # Extract the first word of "$ac_prog", so it can be a program name with args.
50964set dummy $ac_prog; ac_word=$2
50965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50966$as_echo_n "checking for $ac_word... " >&6; }
50967if ${ac_cv_path_CCACHE+:} false; then :
50968  $as_echo_n "(cached) " >&6
50969else
50970  case $CCACHE in
50971  [\\/]* | ?:[\\/]*)
50972  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50973  ;;
50974  *)
50975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50976for as_dir in $PATH
50977do
50978  IFS=$as_save_IFS
50979  test -z "$as_dir" && as_dir=.
50980    for ac_exec_ext in '' $ac_executable_extensions; do
50981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50982    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50984    break 2
50985  fi
50986done
50987  done
50988IFS=$as_save_IFS
50989
50990  ;;
50991esac
50992fi
50993CCACHE=$ac_cv_path_CCACHE
50994if test -n "$CCACHE"; then
50995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50996$as_echo "$CCACHE" >&6; }
50997else
50998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50999$as_echo "no" >&6; }
51000fi
51001
51002
51003  test -n "$CCACHE" && break
51004done
51005
51006    else
51007      # If it succeeded, then it was overridden by the user. We will use it
51008      # for the tool.
51009
51010      # First remove it from the list of overridden variables, so we can test
51011      # for unknown variables in the end.
51012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51013
51014      # Check if the provided tool contains a complete path.
51015      tool_specified="$CCACHE"
51016      tool_basename="${tool_specified##*/}"
51017      if test "x$tool_basename" = "x$tool_specified"; then
51018        # A command without a complete path is provided, search $PATH.
51019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51020$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51021        # Extract the first word of "$tool_basename", so it can be a program name with args.
51022set dummy $tool_basename; ac_word=$2
51023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51024$as_echo_n "checking for $ac_word... " >&6; }
51025if ${ac_cv_path_CCACHE+:} false; then :
51026  $as_echo_n "(cached) " >&6
51027else
51028  case $CCACHE in
51029  [\\/]* | ?:[\\/]*)
51030  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51031  ;;
51032  *)
51033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51034for as_dir in $PATH
51035do
51036  IFS=$as_save_IFS
51037  test -z "$as_dir" && as_dir=.
51038    for ac_exec_ext in '' $ac_executable_extensions; do
51039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51040    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51042    break 2
51043  fi
51044done
51045  done
51046IFS=$as_save_IFS
51047
51048  ;;
51049esac
51050fi
51051CCACHE=$ac_cv_path_CCACHE
51052if test -n "$CCACHE"; then
51053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51054$as_echo "$CCACHE" >&6; }
51055else
51056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51057$as_echo "no" >&6; }
51058fi
51059
51060
51061        if test "x$CCACHE" = x; then
51062          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51063        fi
51064      else
51065        # Otherwise we believe it is a complete path. Use it as it is.
51066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51067$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51069$as_echo_n "checking for CCACHE... " >&6; }
51070        if test ! -x "$tool_specified"; then
51071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51072$as_echo "not found" >&6; }
51073          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51074        fi
51075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51076$as_echo "$tool_specified" >&6; }
51077      fi
51078    fi
51079  fi
51080
51081
51082
51083  if test "x$CCACHE" = x; then
51084    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51085  fi
51086
51087
51088    CCACHE_STATUS="enabled"
51089    PATH="$OLD_PATH"
51090  elif test "x$enable_ccache" = xno; then
51091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51092$as_echo "no, explicitly disabled" >&6; }
51093  elif test "x$enable_ccache" = x; then
51094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51095$as_echo "no" >&6; }
51096  else
51097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51098$as_echo "unknown" >&6; }
51099    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51100  fi
51101
51102
51103
51104# Check whether --with-ccache-dir was given.
51105if test "${with_ccache_dir+set}" = set; then :
51106  withval=$with_ccache_dir;
51107fi
51108
51109
51110  if test "x$with_ccache_dir" != x; then
51111    # When using a non home ccache directory, assume the use is to share ccache files
51112    # with other users. Thus change the umask.
51113    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51114    if test "x$CCACHE" = x; then
51115      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51116$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51117    fi
51118  fi
51119
51120  if test "x$CCACHE" != x; then
51121
51122  if test "x$CCACHE" != x; then
51123    # Only use ccache if it is 3.1.4 or later, which supports
51124    # precompiled headers.
51125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51126$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51127    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51128    if test "x$HAS_GOOD_CCACHE" = x; then
51129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51130$as_echo "no, disabling ccache" >&6; }
51131      CCACHE=
51132      CCACHE_STATUS="disabled"
51133    else
51134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51135$as_echo "yes" >&6; }
51136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51137$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51138      PUSHED_FLAGS="$CXXFLAGS"
51139      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51140      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51141/* end confdefs.h.  */
51142
51143int
51144main ()
51145{
51146
51147  ;
51148  return 0;
51149}
51150_ACEOF
51151if ac_fn_cxx_try_compile "$LINENO"; then :
51152  CC_KNOWS_CCACHE_TRICK=yes
51153else
51154  CC_KNOWS_CCACHE_TRICK=no
51155fi
51156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51157      CXXFLAGS="$PUSHED_FLAGS"
51158      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51160$as_echo "yes" >&6; }
51161      else
51162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51163$as_echo "no, disabling ccaching of precompiled headers" >&6; }
51164        CCACHE=
51165        CCACHE_STATUS="disabled"
51166      fi
51167    fi
51168  fi
51169
51170  if test "x$CCACHE" != x; then
51171    CCACHE_SLOPPINESS=time_macros
51172    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51173    CCACHE_FLAGS=-fpch-preprocess
51174
51175    if test "x$SET_CCACHE_DIR" != x; then
51176      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51177      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51178    fi
51179  fi
51180
51181  fi
51182
51183
51184###############################################################################
51185#
51186# And now the finish...
51187#
51188###############################################################################
51189
51190# Check for some common pitfalls
51191
51192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51193    file_to_test="$SRC_ROOT/LICENSE"
51194    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51195      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
51196    fi
51197  fi
51198
51199
51200  # Did user specify any unknown variables?
51201
51202  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51203    # Replace the separating ! with spaces before presenting for end user.
51204    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51205    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51206$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51207  fi
51208
51209
51210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51211$as_echo_n "checking if build directory is on local disk... " >&6; }
51212
51213  # df -l lists only local disks; if the given directory is not found then
51214  # a non-zero exit code is given
51215  if test "x$DF" = x; then
51216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51217      # msys does not have df; use Windows "net use" instead.
51218      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51219      if test "x$IS_NETWORK_DISK" = x; then
51220        OUTPUT_DIR_IS_LOCAL="yes"
51221      else
51222        OUTPUT_DIR_IS_LOCAL="no"
51223      fi
51224    else
51225      # No df here, say it's local
51226      OUTPUT_DIR_IS_LOCAL="yes"
51227    fi
51228  else
51229    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51230      OUTPUT_DIR_IS_LOCAL="yes"
51231    else
51232      OUTPUT_DIR_IS_LOCAL="no"
51233    fi
51234  fi
51235
51236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51237$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51238
51239
51240
51241  # Check if the user has any old-style ALT_ variables set.
51242  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51243
51244  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51245  # Since we can't properly handle the dependencies for this, warn the user about the situation
51246  if test -e $OUTPUT_ROOT/spec.gmk; then
51247    IS_RECONFIGURE=yes
51248  else
51249    IS_RECONFIGURE=no
51250  fi
51251
51252
51253# At the end, call the custom hook. (Dummy macro if no custom sources available)
51254
51255
51256# We're messing a bit with internal autoconf variables to put the config.status
51257# in the output directory instead of the current directory.
51258CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51259
51260# Create the actual output files. Now the main work of configure is done.
51261cat >confcache <<\_ACEOF
51262# This file is a shell script that caches the results of configure
51263# tests run on this system so they can be shared between configure
51264# scripts and configure runs, see configure's option --config-cache.
51265# It is not useful on other systems.  If it contains results you don't
51266# want to keep, you may remove or edit it.
51267#
51268# config.status only pays attention to the cache file if you give it
51269# the --recheck option to rerun configure.
51270#
51271# `ac_cv_env_foo' variables (set or unset) will be overridden when
51272# loading this file, other *unset* `ac_cv_foo' will be assigned the
51273# following values.
51274
51275_ACEOF
51276
51277# The following way of writing the cache mishandles newlines in values,
51278# but we know of no workaround that is simple, portable, and efficient.
51279# So, we kill variables containing newlines.
51280# Ultrix sh set writes to stderr and can't be redirected directly,
51281# and sets the high bit in the cache file unless we assign to the vars.
51282(
51283  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51284    eval ac_val=\$$ac_var
51285    case $ac_val in #(
51286    *${as_nl}*)
51287      case $ac_var in #(
51288      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51289$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51290      esac
51291      case $ac_var in #(
51292      _ | IFS | as_nl) ;; #(
51293      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51294      *) { eval $ac_var=; unset $ac_var;} ;;
51295      esac ;;
51296    esac
51297  done
51298
51299  (set) 2>&1 |
51300    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51301    *${as_nl}ac_space=\ *)
51302      # `set' does not quote correctly, so add quotes: double-quote
51303      # substitution turns \\\\ into \\, and sed turns \\ into \.
51304      sed -n \
51305	"s/'/'\\\\''/g;
51306	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51307      ;; #(
51308    *)
51309      # `set' quotes correctly as required by POSIX, so do not add quotes.
51310      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51311      ;;
51312    esac |
51313    sort
51314) |
51315  sed '
51316     /^ac_cv_env_/b end
51317     t clear
51318     :clear
51319     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51320     t end
51321     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51322     :end' >>confcache
51323if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51324  if test -w "$cache_file"; then
51325    if test "x$cache_file" != "x/dev/null"; then
51326      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51327$as_echo "$as_me: updating cache $cache_file" >&6;}
51328      if test ! -f "$cache_file" || test -h "$cache_file"; then
51329	cat confcache >"$cache_file"
51330      else
51331        case $cache_file in #(
51332        */* | ?:*)
51333	  mv -f confcache "$cache_file"$$ &&
51334	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51335        *)
51336	  mv -f confcache "$cache_file" ;;
51337	esac
51338      fi
51339    fi
51340  else
51341    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51342$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51343  fi
51344fi
51345rm -f confcache
51346
51347test "x$prefix" = xNONE && prefix=$ac_default_prefix
51348# Let make expand exec_prefix.
51349test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51350
51351# Transform confdefs.h into DEFS.
51352# Protect against shell expansion while executing Makefile rules.
51353# Protect against Makefile macro expansion.
51354#
51355# If the first sed substitution is executed (which looks for macros that
51356# take arguments), then branch to the quote section.  Otherwise,
51357# look for a macro that doesn't take arguments.
51358ac_script='
51359:mline
51360/\\$/{
51361 N
51362 s,\\\n,,
51363 b mline
51364}
51365t clear
51366:clear
51367s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51368t quote
51369s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51370t quote
51371b any
51372:quote
51373s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51374s/\[/\\&/g
51375s/\]/\\&/g
51376s/\$/$$/g
51377H
51378:any
51379${
51380	g
51381	s/^\n//
51382	s/\n/ /g
51383	p
51384}
51385'
51386DEFS=`sed -n "$ac_script" confdefs.h`
51387
51388
51389ac_libobjs=
51390ac_ltlibobjs=
51391U=
51392for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51393  # 1. Remove the extension, and $U if already installed.
51394  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51395  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51396  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51397  #    will be set to the directory where LIBOBJS objects are built.
51398  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51399  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51400done
51401LIBOBJS=$ac_libobjs
51402
51403LTLIBOBJS=$ac_ltlibobjs
51404
51405
51406
51407: "${CONFIG_STATUS=./config.status}"
51408ac_write_fail=0
51409ac_clean_files_save=$ac_clean_files
51410ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51411{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51412$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51413as_write_fail=0
51414cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51415#! $SHELL
51416# Generated by $as_me.
51417# Run this file to recreate the current configuration.
51418# Compiler output produced by configure, useful for debugging
51419# configure, is in config.log if it exists.
51420
51421debug=false
51422ac_cs_recheck=false
51423ac_cs_silent=false
51424
51425SHELL=\${CONFIG_SHELL-$SHELL}
51426export SHELL
51427_ASEOF
51428cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51429## -------------------- ##
51430## M4sh Initialization. ##
51431## -------------------- ##
51432
51433# Be more Bourne compatible
51434DUALCASE=1; export DUALCASE # for MKS sh
51435if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51436  emulate sh
51437  NULLCMD=:
51438  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51439  # is contrary to our usage.  Disable this feature.
51440  alias -g '${1+"$@"}'='"$@"'
51441  setopt NO_GLOB_SUBST
51442else
51443  case `(set -o) 2>/dev/null` in #(
51444  *posix*) :
51445    set -o posix ;; #(
51446  *) :
51447     ;;
51448esac
51449fi
51450
51451
51452as_nl='
51453'
51454export as_nl
51455# Printing a long string crashes Solaris 7 /usr/bin/printf.
51456as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51457as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51458as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51459# Prefer a ksh shell builtin over an external printf program on Solaris,
51460# but without wasting forks for bash or zsh.
51461if test -z "$BASH_VERSION$ZSH_VERSION" \
51462    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51463  as_echo='print -r --'
51464  as_echo_n='print -rn --'
51465elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51466  as_echo='printf %s\n'
51467  as_echo_n='printf %s'
51468else
51469  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51470    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51471    as_echo_n='/usr/ucb/echo -n'
51472  else
51473    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51474    as_echo_n_body='eval
51475      arg=$1;
51476      case $arg in #(
51477      *"$as_nl"*)
51478	expr "X$arg" : "X\\(.*\\)$as_nl";
51479	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51480      esac;
51481      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51482    '
51483    export as_echo_n_body
51484    as_echo_n='sh -c $as_echo_n_body as_echo'
51485  fi
51486  export as_echo_body
51487  as_echo='sh -c $as_echo_body as_echo'
51488fi
51489
51490# The user is always right.
51491if test "${PATH_SEPARATOR+set}" != set; then
51492  PATH_SEPARATOR=:
51493  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51494    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51495      PATH_SEPARATOR=';'
51496  }
51497fi
51498
51499
51500# IFS
51501# We need space, tab and new line, in precisely that order.  Quoting is
51502# there to prevent editors from complaining about space-tab.
51503# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51504# splitting by setting IFS to empty value.)
51505IFS=" ""	$as_nl"
51506
51507# Find who we are.  Look in the path if we contain no directory separator.
51508as_myself=
51509case $0 in #((
51510  *[\\/]* ) as_myself=$0 ;;
51511  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51512for as_dir in $PATH
51513do
51514  IFS=$as_save_IFS
51515  test -z "$as_dir" && as_dir=.
51516    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51517  done
51518IFS=$as_save_IFS
51519
51520     ;;
51521esac
51522# We did not find ourselves, most probably we were run as `sh COMMAND'
51523# in which case we are not to be found in the path.
51524if test "x$as_myself" = x; then
51525  as_myself=$0
51526fi
51527if test ! -f "$as_myself"; then
51528  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51529  exit 1
51530fi
51531
51532# Unset variables that we do not need and which cause bugs (e.g. in
51533# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51534# suppresses any "Segmentation fault" message there.  '((' could
51535# trigger a bug in pdksh 5.2.14.
51536for as_var in BASH_ENV ENV MAIL MAILPATH
51537do eval test x\${$as_var+set} = xset \
51538  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51539done
51540PS1='$ '
51541PS2='> '
51542PS4='+ '
51543
51544# NLS nuisances.
51545LC_ALL=C
51546export LC_ALL
51547LANGUAGE=C
51548export LANGUAGE
51549
51550# CDPATH.
51551(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51552
51553
51554# as_fn_error STATUS ERROR [LINENO LOG_FD]
51555# ----------------------------------------
51556# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51557# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51558# script with STATUS, using 1 if that was 0.
51559as_fn_error ()
51560{
51561  as_status=$1; test $as_status -eq 0 && as_status=1
51562  if test "$4"; then
51563    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51564    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51565  fi
51566  $as_echo "$as_me: error: $2" >&2
51567  as_fn_exit $as_status
51568} # as_fn_error
51569
51570
51571# as_fn_set_status STATUS
51572# -----------------------
51573# Set $? to STATUS, without forking.
51574as_fn_set_status ()
51575{
51576  return $1
51577} # as_fn_set_status
51578
51579# as_fn_exit STATUS
51580# -----------------
51581# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51582as_fn_exit ()
51583{
51584  set +e
51585  as_fn_set_status $1
51586  exit $1
51587} # as_fn_exit
51588
51589# as_fn_unset VAR
51590# ---------------
51591# Portably unset VAR.
51592as_fn_unset ()
51593{
51594  { eval $1=; unset $1;}
51595}
51596as_unset=as_fn_unset
51597# as_fn_append VAR VALUE
51598# ----------------------
51599# Append the text in VALUE to the end of the definition contained in VAR. Take
51600# advantage of any shell optimizations that allow amortized linear growth over
51601# repeated appends, instead of the typical quadratic growth present in naive
51602# implementations.
51603if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51604  eval 'as_fn_append ()
51605  {
51606    eval $1+=\$2
51607  }'
51608else
51609  as_fn_append ()
51610  {
51611    eval $1=\$$1\$2
51612  }
51613fi # as_fn_append
51614
51615# as_fn_arith ARG...
51616# ------------------
51617# Perform arithmetic evaluation on the ARGs, and store the result in the
51618# global $as_val. Take advantage of shells that can avoid forks. The arguments
51619# must be portable across $(()) and expr.
51620if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51621  eval 'as_fn_arith ()
51622  {
51623    as_val=$(( $* ))
51624  }'
51625else
51626  as_fn_arith ()
51627  {
51628    as_val=`expr "$@" || test $? -eq 1`
51629  }
51630fi # as_fn_arith
51631
51632
51633if expr a : '\(a\)' >/dev/null 2>&1 &&
51634   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51635  as_expr=expr
51636else
51637  as_expr=false
51638fi
51639
51640if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51641  as_basename=basename
51642else
51643  as_basename=false
51644fi
51645
51646if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51647  as_dirname=dirname
51648else
51649  as_dirname=false
51650fi
51651
51652as_me=`$as_basename -- "$0" ||
51653$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51654	 X"$0" : 'X\(//\)$' \| \
51655	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51656$as_echo X/"$0" |
51657    sed '/^.*\/\([^/][^/]*\)\/*$/{
51658	    s//\1/
51659	    q
51660	  }
51661	  /^X\/\(\/\/\)$/{
51662	    s//\1/
51663	    q
51664	  }
51665	  /^X\/\(\/\).*/{
51666	    s//\1/
51667	    q
51668	  }
51669	  s/.*/./; q'`
51670
51671# Avoid depending upon Character Ranges.
51672as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51673as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51674as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51675as_cr_digits='0123456789'
51676as_cr_alnum=$as_cr_Letters$as_cr_digits
51677
51678ECHO_C= ECHO_N= ECHO_T=
51679case `echo -n x` in #(((((
51680-n*)
51681  case `echo 'xy\c'` in
51682  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51683  xy)  ECHO_C='\c';;
51684  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51685       ECHO_T='	';;
51686  esac;;
51687*)
51688  ECHO_N='-n';;
51689esac
51690
51691rm -f conf$$ conf$$.exe conf$$.file
51692if test -d conf$$.dir; then
51693  rm -f conf$$.dir/conf$$.file
51694else
51695  rm -f conf$$.dir
51696  mkdir conf$$.dir 2>/dev/null
51697fi
51698if (echo >conf$$.file) 2>/dev/null; then
51699  if ln -s conf$$.file conf$$ 2>/dev/null; then
51700    as_ln_s='ln -s'
51701    # ... but there are two gotchas:
51702    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51703    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51704    # In both cases, we have to default to `cp -pR'.
51705    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51706      as_ln_s='cp -pR'
51707  elif ln conf$$.file conf$$ 2>/dev/null; then
51708    as_ln_s=ln
51709  else
51710    as_ln_s='cp -pR'
51711  fi
51712else
51713  as_ln_s='cp -pR'
51714fi
51715rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51716rmdir conf$$.dir 2>/dev/null
51717
51718
51719# as_fn_mkdir_p
51720# -------------
51721# Create "$as_dir" as a directory, including parents if necessary.
51722as_fn_mkdir_p ()
51723{
51724
51725  case $as_dir in #(
51726  -*) as_dir=./$as_dir;;
51727  esac
51728  test -d "$as_dir" || eval $as_mkdir_p || {
51729    as_dirs=
51730    while :; do
51731      case $as_dir in #(
51732      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51733      *) as_qdir=$as_dir;;
51734      esac
51735      as_dirs="'$as_qdir' $as_dirs"
51736      as_dir=`$as_dirname -- "$as_dir" ||
51737$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51738	 X"$as_dir" : 'X\(//\)[^/]' \| \
51739	 X"$as_dir" : 'X\(//\)$' \| \
51740	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51741$as_echo X"$as_dir" |
51742    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51743	    s//\1/
51744	    q
51745	  }
51746	  /^X\(\/\/\)[^/].*/{
51747	    s//\1/
51748	    q
51749	  }
51750	  /^X\(\/\/\)$/{
51751	    s//\1/
51752	    q
51753	  }
51754	  /^X\(\/\).*/{
51755	    s//\1/
51756	    q
51757	  }
51758	  s/.*/./; q'`
51759      test -d "$as_dir" && break
51760    done
51761    test -z "$as_dirs" || eval "mkdir $as_dirs"
51762  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51763
51764
51765} # as_fn_mkdir_p
51766if mkdir -p . 2>/dev/null; then
51767  as_mkdir_p='mkdir -p "$as_dir"'
51768else
51769  test -d ./-p && rmdir ./-p
51770  as_mkdir_p=false
51771fi
51772
51773
51774# as_fn_executable_p FILE
51775# -----------------------
51776# Test if FILE is an executable regular file.
51777as_fn_executable_p ()
51778{
51779  test -f "$1" && test -x "$1"
51780} # as_fn_executable_p
51781as_test_x='test -x'
51782as_executable_p=as_fn_executable_p
51783
51784# Sed expression to map a string onto a valid CPP name.
51785as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51786
51787# Sed expression to map a string onto a valid variable name.
51788as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51789
51790
51791exec 6>&1
51792## ----------------------------------- ##
51793## Main body of $CONFIG_STATUS script. ##
51794## ----------------------------------- ##
51795_ASEOF
51796test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51797
51798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51799# Save the log message, to keep $0 and so on meaningful, and to
51800# report actual input values of CONFIG_FILES etc. instead of their
51801# values after options handling.
51802ac_log="
51803This file was extended by OpenJDK $as_me jdk9, which was
51804generated by GNU Autoconf 2.69.  Invocation command line was
51805
51806  CONFIG_FILES    = $CONFIG_FILES
51807  CONFIG_HEADERS  = $CONFIG_HEADERS
51808  CONFIG_LINKS    = $CONFIG_LINKS
51809  CONFIG_COMMANDS = $CONFIG_COMMANDS
51810  $ $0 $@
51811
51812on `(hostname || uname -n) 2>/dev/null | sed 1q`
51813"
51814
51815_ACEOF
51816
51817case $ac_config_files in *"
51818"*) set x $ac_config_files; shift; ac_config_files=$*;;
51819esac
51820
51821
51822
51823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51824# Files that config.status was made for.
51825config_files="$ac_config_files"
51826
51827_ACEOF
51828
51829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51830ac_cs_usage="\
51831\`$as_me' instantiates files and other configuration actions
51832from templates according to the current configuration.  Unless the files
51833and actions are specified as TAGs, all are instantiated by default.
51834
51835Usage: $0 [OPTION]... [TAG]...
51836
51837  -h, --help       print this help, then exit
51838  -V, --version    print version number and configuration settings, then exit
51839      --config     print configuration, then exit
51840  -q, --quiet, --silent
51841                   do not print progress messages
51842  -d, --debug      don't remove temporary files
51843      --recheck    update $as_me by reconfiguring in the same conditions
51844      --file=FILE[:TEMPLATE]
51845                   instantiate the configuration file FILE
51846
51847Configuration files:
51848$config_files
51849
51850Report bugs to <build-dev@openjdk.java.net>.
51851OpenJDK home page: <http://openjdk.java.net>."
51852
51853_ACEOF
51854cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51855ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51856ac_cs_version="\\
51857OpenJDK config.status jdk9
51858configured by $0, generated by GNU Autoconf 2.69,
51859  with options \\"\$ac_cs_config\\"
51860
51861Copyright (C) 2012 Free Software Foundation, Inc.
51862This config.status script is free software; the Free Software Foundation
51863gives unlimited permission to copy, distribute and modify it."
51864
51865ac_pwd='$ac_pwd'
51866srcdir='$srcdir'
51867AWK='$AWK'
51868test -n "\$AWK" || AWK=awk
51869_ACEOF
51870
51871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51872# The default lists apply if the user does not specify any file.
51873ac_need_defaults=:
51874while test $# != 0
51875do
51876  case $1 in
51877  --*=?*)
51878    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51879    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51880    ac_shift=:
51881    ;;
51882  --*=)
51883    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51884    ac_optarg=
51885    ac_shift=:
51886    ;;
51887  *)
51888    ac_option=$1
51889    ac_optarg=$2
51890    ac_shift=shift
51891    ;;
51892  esac
51893
51894  case $ac_option in
51895  # Handling of the options.
51896  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51897    ac_cs_recheck=: ;;
51898  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51899    $as_echo "$ac_cs_version"; exit ;;
51900  --config | --confi | --conf | --con | --co | --c )
51901    $as_echo "$ac_cs_config"; exit ;;
51902  --debug | --debu | --deb | --de | --d | -d )
51903    debug=: ;;
51904  --file | --fil | --fi | --f )
51905    $ac_shift
51906    case $ac_optarg in
51907    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51908    '') as_fn_error $? "missing file argument" ;;
51909    esac
51910    as_fn_append CONFIG_FILES " '$ac_optarg'"
51911    ac_need_defaults=false;;
51912  --he | --h |  --help | --hel | -h )
51913    $as_echo "$ac_cs_usage"; exit ;;
51914  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51915  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51916    ac_cs_silent=: ;;
51917
51918  # This is an error.
51919  -*) as_fn_error $? "unrecognized option: \`$1'
51920Try \`$0 --help' for more information." ;;
51921
51922  *) as_fn_append ac_config_targets " $1"
51923     ac_need_defaults=false ;;
51924
51925  esac
51926  shift
51927done
51928
51929ac_configure_extra_args=
51930
51931if $ac_cs_silent; then
51932  exec 6>/dev/null
51933  ac_configure_extra_args="$ac_configure_extra_args --silent"
51934fi
51935
51936_ACEOF
51937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51938if \$ac_cs_recheck; then
51939  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51940  shift
51941  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51942  CONFIG_SHELL='$SHELL'
51943  export CONFIG_SHELL
51944  exec "\$@"
51945fi
51946
51947_ACEOF
51948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51949exec 5>>config.log
51950{
51951  echo
51952  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51953## Running $as_me. ##
51954_ASBOX
51955  $as_echo "$ac_log"
51956} >&5
51957
51958_ACEOF
51959cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51960_ACEOF
51961
51962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51963
51964# Handling of arguments.
51965for ac_config_target in $ac_config_targets
51966do
51967  case $ac_config_target in
51968    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51969    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51970    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51971    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51972    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51973
51974  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51975  esac
51976done
51977
51978
51979# If the user did not use the arguments to specify the items to instantiate,
51980# then the envvar interface is used.  Set only those that are not.
51981# We use the long form for the default assignment because of an extremely
51982# bizarre bug on SunOS 4.1.3.
51983if $ac_need_defaults; then
51984  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51985fi
51986
51987# Have a temporary directory for convenience.  Make it in the build tree
51988# simply because there is no reason against having it here, and in addition,
51989# creating and moving files from /tmp can sometimes cause problems.
51990# Hook for its removal unless debugging.
51991# Note that there is a small window in which the directory will not be cleaned:
51992# after its creation but before its name has been assigned to `$tmp'.
51993$debug ||
51994{
51995  tmp= ac_tmp=
51996  trap 'exit_status=$?
51997  : "${ac_tmp:=$tmp}"
51998  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51999' 0
52000  trap 'as_fn_exit 1' 1 2 13 15
52001}
52002# Create a (secure) tmp directory for tmp files.
52003
52004{
52005  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52006  test -d "$tmp"
52007}  ||
52008{
52009  tmp=./conf$$-$RANDOM
52010  (umask 077 && mkdir "$tmp")
52011} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52012ac_tmp=$tmp
52013
52014# Set up the scripts for CONFIG_FILES section.
52015# No need to generate them if there are no CONFIG_FILES.
52016# This happens for instance with `./config.status config.h'.
52017if test -n "$CONFIG_FILES"; then
52018
52019
52020ac_cr=`echo X | tr X '\015'`
52021# On cygwin, bash can eat \r inside `` if the user requested igncr.
52022# But we know of no other shell where ac_cr would be empty at this
52023# point, so we can use a bashism as a fallback.
52024if test "x$ac_cr" = x; then
52025  eval ac_cr=\$\'\\r\'
52026fi
52027ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52028if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52029  ac_cs_awk_cr='\\r'
52030else
52031  ac_cs_awk_cr=$ac_cr
52032fi
52033
52034echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52035_ACEOF
52036
52037
52038{
52039  echo "cat >conf$$subs.awk <<_ACEOF" &&
52040  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52041  echo "_ACEOF"
52042} >conf$$subs.sh ||
52043  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52044ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52045ac_delim='%!_!# '
52046for ac_last_try in false false false false false :; do
52047  . ./conf$$subs.sh ||
52048    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52049
52050  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52051  if test $ac_delim_n = $ac_delim_num; then
52052    break
52053  elif $ac_last_try; then
52054    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52055  else
52056    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52057  fi
52058done
52059rm -f conf$$subs.sh
52060
52061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52062cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52063_ACEOF
52064sed -n '
52065h
52066s/^/S["/; s/!.*/"]=/
52067p
52068g
52069s/^[^!]*!//
52070:repl
52071t repl
52072s/'"$ac_delim"'$//
52073t delim
52074:nl
52075h
52076s/\(.\{148\}\)..*/\1/
52077t more1
52078s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52079p
52080n
52081b repl
52082:more1
52083s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52084p
52085g
52086s/.\{148\}//
52087t nl
52088:delim
52089h
52090s/\(.\{148\}\)..*/\1/
52091t more2
52092s/["\\]/\\&/g; s/^/"/; s/$/"/
52093p
52094b
52095:more2
52096s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52097p
52098g
52099s/.\{148\}//
52100t delim
52101' <conf$$subs.awk | sed '
52102/^[^""]/{
52103  N
52104  s/\n//
52105}
52106' >>$CONFIG_STATUS || ac_write_fail=1
52107rm -f conf$$subs.awk
52108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52109_ACAWK
52110cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52111  for (key in S) S_is_set[key] = 1
52112  FS = ""
52113
52114}
52115{
52116  line = $ 0
52117  nfields = split(line, field, "@")
52118  substed = 0
52119  len = length(field[1])
52120  for (i = 2; i < nfields; i++) {
52121    key = field[i]
52122    keylen = length(key)
52123    if (S_is_set[key]) {
52124      value = S[key]
52125      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52126      len += length(value) + length(field[++i])
52127      substed = 1
52128    } else
52129      len += 1 + keylen
52130  }
52131
52132  print line
52133}
52134
52135_ACAWK
52136_ACEOF
52137cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52138if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52139  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52140else
52141  cat
52142fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52143  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52144_ACEOF
52145
52146# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52147# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52148# trailing colons and then remove the whole line if VPATH becomes empty
52149# (actually we leave an empty line to preserve line numbers).
52150if test "x$srcdir" = x.; then
52151  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52152h
52153s///
52154s/^/:/
52155s/[	 ]*$/:/
52156s/:\$(srcdir):/:/g
52157s/:\${srcdir}:/:/g
52158s/:@srcdir@:/:/g
52159s/^:*//
52160s/:*$//
52161x
52162s/\(=[	 ]*\).*/\1/
52163G
52164s/\n//
52165s/^[^=]*=[	 ]*$//
52166}'
52167fi
52168
52169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52170fi # test -n "$CONFIG_FILES"
52171
52172
52173eval set X "  :F $CONFIG_FILES      "
52174shift
52175for ac_tag
52176do
52177  case $ac_tag in
52178  :[FHLC]) ac_mode=$ac_tag; continue;;
52179  esac
52180  case $ac_mode$ac_tag in
52181  :[FHL]*:*);;
52182  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52183  :[FH]-) ac_tag=-:-;;
52184  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52185  esac
52186  ac_save_IFS=$IFS
52187  IFS=:
52188  set x $ac_tag
52189  IFS=$ac_save_IFS
52190  shift
52191  ac_file=$1
52192  shift
52193
52194  case $ac_mode in
52195  :L) ac_source=$1;;
52196  :[FH])
52197    ac_file_inputs=
52198    for ac_f
52199    do
52200      case $ac_f in
52201      -) ac_f="$ac_tmp/stdin";;
52202      *) # Look for the file first in the build tree, then in the source tree
52203	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52204	 # because $ac_f cannot contain `:'.
52205	 test -f "$ac_f" ||
52206	   case $ac_f in
52207	   [\\/$]*) false;;
52208	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52209	   esac ||
52210	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52211      esac
52212      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52213      as_fn_append ac_file_inputs " '$ac_f'"
52214    done
52215
52216    # Let's still pretend it is `configure' which instantiates (i.e., don't
52217    # use $as_me), people would be surprised to read:
52218    #    /* config.h.  Generated by config.status.  */
52219    configure_input='Generated from '`
52220	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52221	`' by configure.'
52222    if test x"$ac_file" != x-; then
52223      configure_input="$ac_file.  $configure_input"
52224      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52225$as_echo "$as_me: creating $ac_file" >&6;}
52226    fi
52227    # Neutralize special characters interpreted by sed in replacement strings.
52228    case $configure_input in #(
52229    *\&* | *\|* | *\\* )
52230       ac_sed_conf_input=`$as_echo "$configure_input" |
52231       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52232    *) ac_sed_conf_input=$configure_input;;
52233    esac
52234
52235    case $ac_tag in
52236    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52237      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52238    esac
52239    ;;
52240  esac
52241
52242  ac_dir=`$as_dirname -- "$ac_file" ||
52243$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52244	 X"$ac_file" : 'X\(//\)[^/]' \| \
52245	 X"$ac_file" : 'X\(//\)$' \| \
52246	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52247$as_echo X"$ac_file" |
52248    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52249	    s//\1/
52250	    q
52251	  }
52252	  /^X\(\/\/\)[^/].*/{
52253	    s//\1/
52254	    q
52255	  }
52256	  /^X\(\/\/\)$/{
52257	    s//\1/
52258	    q
52259	  }
52260	  /^X\(\/\).*/{
52261	    s//\1/
52262	    q
52263	  }
52264	  s/.*/./; q'`
52265  as_dir="$ac_dir"; as_fn_mkdir_p
52266  ac_builddir=.
52267
52268case "$ac_dir" in
52269.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52270*)
52271  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52272  # A ".." for each directory in $ac_dir_suffix.
52273  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52274  case $ac_top_builddir_sub in
52275  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52276  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52277  esac ;;
52278esac
52279ac_abs_top_builddir=$ac_pwd
52280ac_abs_builddir=$ac_pwd$ac_dir_suffix
52281# for backward compatibility:
52282ac_top_builddir=$ac_top_build_prefix
52283
52284case $srcdir in
52285  .)  # We are building in place.
52286    ac_srcdir=.
52287    ac_top_srcdir=$ac_top_builddir_sub
52288    ac_abs_top_srcdir=$ac_pwd ;;
52289  [\\/]* | ?:[\\/]* )  # Absolute name.
52290    ac_srcdir=$srcdir$ac_dir_suffix;
52291    ac_top_srcdir=$srcdir
52292    ac_abs_top_srcdir=$srcdir ;;
52293  *) # Relative name.
52294    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52295    ac_top_srcdir=$ac_top_build_prefix$srcdir
52296    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52297esac
52298ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52299
52300
52301  case $ac_mode in
52302  :F)
52303  #
52304  # CONFIG_FILE
52305  #
52306
52307_ACEOF
52308
52309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52310# If the template does not know about datarootdir, expand it.
52311# FIXME: This hack should be removed a few years after 2.60.
52312ac_datarootdir_hack=; ac_datarootdir_seen=
52313ac_sed_dataroot='
52314/datarootdir/ {
52315  p
52316  q
52317}
52318/@datadir@/p
52319/@docdir@/p
52320/@infodir@/p
52321/@localedir@/p
52322/@mandir@/p'
52323case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52324*datarootdir*) ac_datarootdir_seen=yes;;
52325*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52326  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52327$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52328_ACEOF
52329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52330  ac_datarootdir_hack='
52331  s&@datadir@&$datadir&g
52332  s&@docdir@&$docdir&g
52333  s&@infodir@&$infodir&g
52334  s&@localedir@&$localedir&g
52335  s&@mandir@&$mandir&g
52336  s&\\\${datarootdir}&$datarootdir&g' ;;
52337esac
52338_ACEOF
52339
52340# Neutralize VPATH when `$srcdir' = `.'.
52341# Shell code in configure.ac might set extrasub.
52342# FIXME: do we really want to maintain this feature?
52343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52344ac_sed_extra="$ac_vpsub
52345$extrasub
52346_ACEOF
52347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52348:t
52349/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52350s|@configure_input@|$ac_sed_conf_input|;t t
52351s&@top_builddir@&$ac_top_builddir_sub&;t t
52352s&@top_build_prefix@&$ac_top_build_prefix&;t t
52353s&@srcdir@&$ac_srcdir&;t t
52354s&@abs_srcdir@&$ac_abs_srcdir&;t t
52355s&@top_srcdir@&$ac_top_srcdir&;t t
52356s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52357s&@builddir@&$ac_builddir&;t t
52358s&@abs_builddir@&$ac_abs_builddir&;t t
52359s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52360$ac_datarootdir_hack
52361"
52362eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52363  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52364
52365test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52366  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52367  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52368      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52369  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52370which seems to be undefined.  Please make sure it is defined" >&5
52371$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52372which seems to be undefined.  Please make sure it is defined" >&2;}
52373
52374  rm -f "$ac_tmp/stdin"
52375  case $ac_file in
52376  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52377  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52378  esac \
52379  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52380 ;;
52381
52382
52383
52384  esac
52385
52386done # for ac_tag
52387
52388
52389as_fn_exit 0
52390_ACEOF
52391ac_clean_files=$ac_clean_files_save
52392
52393test $ac_write_fail = 0 ||
52394  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52395
52396
52397# configure is writing to config.log, and then calls config.status.
52398# config.status does its own redirection, appending to config.log.
52399# Unfortunately, on DOS this fails, as config.log is still kept open
52400# by configure, so config.status won't be able to write to it; its
52401# output is simply discarded.  So we exec the FD to /dev/null,
52402# effectively closing config.log, so it can be properly (re)opened and
52403# appended to by config.status.  When coming back to configure, we
52404# need to make the FD available again.
52405if test "$no_create" != yes; then
52406  ac_cs_success=:
52407  ac_config_status_args=
52408  test "$silent" = yes &&
52409    ac_config_status_args="$ac_config_status_args --quiet"
52410  exec 5>/dev/null
52411  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52412  exec 5>>config.log
52413  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52414  # would make configure fail if this is the last instruction.
52415  $ac_cs_success || as_fn_exit 1
52416fi
52417if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52418  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52419$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52420fi
52421
52422
52423# Try to move the config.log file to the output directory.
52424if test -e ./config.log; then
52425  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52426fi
52427
52428# Make the compare script executable
52429$CHMOD +x $OUTPUT_ROOT/compare.sh
52430
52431# Finally output some useful information to the user
52432
52433  # Finally output some useful information to the user
52434
52435  printf "\n"
52436  printf "====================================================\n"
52437  if test "x$no_create" != "xyes"; then
52438    if test "x$IS_RECONFIGURE" != "xyes"; then
52439      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
52440    else
52441      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
52442    fi
52443  else
52444    if test "x$IS_RECONFIGURE" != "xyes"; then
52445      printf "A configuration has been successfully checked but not created\n"
52446    else
52447      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
52448    fi
52449  fi
52450  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52451    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52452  else
52453    printf "using default settings.\n"
52454  fi
52455
52456  printf "\n"
52457  printf "Configuration summary:\n"
52458  printf "* Debug level:    $DEBUG_LEVEL\n"
52459  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52460  printf "* JDK variant:    $JDK_VARIANT\n"
52461  printf "* JVM variants:   $with_jvm_variants\n"
52462  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52463
52464  printf "\n"
52465  printf "Tools summary:\n"
52466  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52467    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52468  fi
52469  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52470  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52471  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52472  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52473
52474  printf "\n"
52475  printf "Build performance summary:\n"
52476  printf "* Cores to use:   $JOBS\n"
52477  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52478  if test "x$CCACHE_STATUS" != "x"; then
52479    printf "* ccache status:  $CCACHE_STATUS\n"
52480  fi
52481  printf "\n"
52482
52483  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52484    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52485    printf "will result in longer build times.\n"
52486    printf "\n"
52487  fi
52488
52489  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52490    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52491    printf "These are not respected, and will be ignored. It is recommended\n"
52492    printf "that you clean your environment. The following variables are set:\n"
52493    printf "$FOUND_ALT_VARIABLES\n"
52494    printf "\n"
52495  fi
52496
52497  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52498    printf "WARNING: Your build output directory is not on a local disk.\n"
52499    printf "This will severely degrade build performance!\n"
52500    printf "It is recommended that you create an output directory on a local disk,\n"
52501    printf "and run the configure script again from that directory.\n"
52502    printf "\n"
52503  fi
52504
52505  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52506    printf "WARNING: The result of this configuration has overridden an older\n"
52507    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52508    printf "proper build. Failure to do so might result in strange build problems.\n"
52509    printf "\n"
52510  fi
52511
52512  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52513    printf "WARNING: The result of this configuration was not saved.\n"
52514    printf "You should run without '--no-create | -n' to create the configuration.\n"
52515    printf "\n"
52516  fi
52517
52518
52519