generated-configure.sh revision 1629:f105fbc01fd7
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
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
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
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844RMICONNECTOR_IIOP
845UNLIMITED_CRYPTO
846CACERTS_FILE
847TEST_IN_BUILD
848BUILD_HEADLESS
849SUPPORT_HEADFUL
850SUPPORT_HEADLESS
851BDEPS_FTP
852BDEPS_UNZIP
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857BASH_ARGS
858SETFILE
859CODESIGN
860XATTR
861DSYMUTIL
862IS_GNU_TIME
863TIME
864STAT
865HG
866READELF
867OTOOL
868LDD
869ZIP
870UNZIP
871FIND_DELETE
872OUTPUT_SYNC
873OUTPUT_SYNC_SUPPORTED
874MAKE
875CHECK_TOOLSDIR_MAKE
876CHECK_TOOLSDIR_GMAKE
877CHECK_MAKE
878CHECK_GMAKE
879PKGHANDLER
880CONFIGURESUPPORT_OUTPUTDIR
881OUTPUT_ROOT
882CONF_NAME
883SPEC
884SDKROOT
885XCODEBUILD
886BUILD_VARIANT_RELEASE
887DEBUG_CLASSFILES
888FASTDEBUG
889VARIANT
890DEBUG_LEVEL
891MACOSX_UNIVERSAL
892INCLUDE_SA
893JVM_VARIANT_CORE
894JVM_VARIANT_ZEROSHARK
895JVM_VARIANT_ZERO
896JVM_VARIANT_KERNEL
897JVM_VARIANT_MINIMAL1
898JVM_VARIANT_CLIENT
899JVM_VARIANT_SERVER
900JVM_VARIANTS
901JVM_INTERPRETER
902JDK_VARIANT
903SET_OPENJDK
904CANONICAL_TOPDIR
905ORIGINAL_TOPDIR
906TOPDIR
907PATH_SEP
908ZERO_ARCHDEF
909DEFINE_CROSS_COMPILE_ARCH
910LP64
911OPENJDK_TARGET_OS_EXPORT_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_TYPE
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_TYPE
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
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995ORIGINAL_PATH
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_copyright_year
1069with_boot_jdk
1070with_add_source_root
1071with_override_source_root
1072with_adds_and_overrides
1073with_override_langtools
1074with_override_corba
1075with_override_jaxp
1076with_override_jaxws
1077with_override_hotspot
1078with_override_nashorn
1079with_override_jdk
1080with_import_hotspot
1081with_toolchain_type
1082with_toolchain_version
1083with_jtreg
1084with_extra_cflags
1085with_extra_cxxflags
1086with_extra_ldflags
1087enable_warnings_as_errors
1088enable_debug_symbols
1089enable_zip_debug_info
1090enable_native_coverage
1091with_x
1092with_cups
1093with_cups_include
1094with_freetype
1095with_freetype_include
1096with_freetype_lib
1097with_freetype_src
1098enable_freetype_bundling
1099with_alsa
1100with_alsa_include
1101with_alsa_lib
1102with_libjpeg
1103with_giflib
1104with_lcms
1105with_libpng
1106with_zlib
1107with_stdc__lib
1108with_msvcr_dll
1109with_msvcp_dll
1110with_dxsdk
1111with_dxsdk_lib
1112with_dxsdk_include
1113with_num_cores
1114with_memory_size
1115with_jobs
1116with_boot_jdk_jvmargs
1117with_sjavac_server_java
1118enable_sjavac
1119enable_precompiled_headers
1120enable_ccache
1121with_ccache_dir
1122'
1123      ac_precious_vars='build_alias
1124host_alias
1125target_alias
1126BASENAME
1127BASH
1128CAT
1129CHMOD
1130CMP
1131COMM
1132CP
1133CUT
1134DATE
1135DIFF
1136DIRNAME
1137ECHO
1138EXPR
1139FILE
1140FIND
1141HEAD
1142LN
1143LS
1144MKDIR
1145MKTEMP
1146MV
1147NAWK
1148PRINTF
1149RM
1150SH
1151SORT
1152TAIL
1153TAR
1154TEE
1155TOUCH
1156TR
1157UNAME
1158UNIQ
1159WC
1160WHICH
1161XARGS
1162AWK
1163GREP
1164EGREP
1165FGREP
1166SED
1167CYGPATH
1168READLINK
1169DF
1170CPIO
1171UNZIP
1172ZIP
1173LDD
1174OTOOL
1175READELF
1176HG
1177STAT
1178TIME
1179DSYMUTIL
1180XATTR
1181CODESIGN
1182SETFILE
1183PKG_CONFIG
1184JAVA
1185JAVAC
1186JAVAH
1187JAR
1188JARSIGNER
1189CC
1190CFLAGS
1191LDFLAGS
1192LIBS
1193CPPFLAGS
1194CXX
1195CXXFLAGS
1196CCC
1197CPP
1198CXXCPP
1199AS
1200AR
1201LIPO
1202STRIP
1203NM
1204GNM
1205OBJCOPY
1206OBJDUMP
1207BUILD_CC
1208BUILD_CXX
1209BUILD_LD
1210JTREGEXE
1211XMKMF
1212FREETYPE_CFLAGS
1213FREETYPE_LIBS
1214ALSA_CFLAGS
1215ALSA_LIBS
1216LCMS_CFLAGS
1217LCMS_LIBS
1218PNG_CFLAGS
1219PNG_LIBS
1220LIBFFI_CFLAGS
1221LIBFFI_LIBS
1222CCACHE'
1223
1224
1225# Initialize some variables set by options.
1226ac_init_help=
1227ac_init_version=false
1228ac_unrecognized_opts=
1229ac_unrecognized_sep=
1230# The variables have the same names as the options, with
1231# dashes changed to underlines.
1232cache_file=/dev/null
1233exec_prefix=NONE
1234no_create=
1235no_recursion=
1236prefix=NONE
1237program_prefix=NONE
1238program_suffix=NONE
1239program_transform_name=s,x,x,
1240silent=
1241site=
1242srcdir=
1243verbose=
1244x_includes=NONE
1245x_libraries=NONE
1246
1247# Installation directory options.
1248# These are left unexpanded so users can "make install exec_prefix=/foo"
1249# and all the variables that are supposed to be based on exec_prefix
1250# by default will actually change.
1251# Use braces instead of parens because sh, perl, etc. also accept them.
1252# (The list follows the same order as the GNU Coding Standards.)
1253bindir='${exec_prefix}/bin'
1254sbindir='${exec_prefix}/sbin'
1255libexecdir='${exec_prefix}/libexec'
1256datarootdir='${prefix}/share'
1257datadir='${datarootdir}'
1258sysconfdir='${prefix}/etc'
1259sharedstatedir='${prefix}/com'
1260localstatedir='${prefix}/var'
1261includedir='${prefix}/include'
1262oldincludedir='/usr/include'
1263docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1264infodir='${datarootdir}/info'
1265htmldir='${docdir}'
1266dvidir='${docdir}'
1267pdfdir='${docdir}'
1268psdir='${docdir}'
1269libdir='${exec_prefix}/lib'
1270localedir='${datarootdir}/locale'
1271mandir='${datarootdir}/man'
1272
1273ac_prev=
1274ac_dashdash=
1275for ac_option
1276do
1277  # If the previous option needs an argument, assign it.
1278  if test -n "$ac_prev"; then
1279    eval $ac_prev=\$ac_option
1280    ac_prev=
1281    continue
1282  fi
1283
1284  case $ac_option in
1285  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1286  *=)   ac_optarg= ;;
1287  *)    ac_optarg=yes ;;
1288  esac
1289
1290  # Accept the important Cygnus configure options, so we can diagnose typos.
1291
1292  case $ac_dashdash$ac_option in
1293  --)
1294    ac_dashdash=yes ;;
1295
1296  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1297    ac_prev=bindir ;;
1298  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1299    bindir=$ac_optarg ;;
1300
1301  -build | --build | --buil | --bui | --bu)
1302    ac_prev=build_alias ;;
1303  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1304    build_alias=$ac_optarg ;;
1305
1306  -cache-file | --cache-file | --cache-fil | --cache-fi \
1307  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1308    ac_prev=cache_file ;;
1309  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1310  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1311    cache_file=$ac_optarg ;;
1312
1313  --config-cache | -C)
1314    cache_file=config.cache ;;
1315
1316  -datadir | --datadir | --datadi | --datad)
1317    ac_prev=datadir ;;
1318  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1319    datadir=$ac_optarg ;;
1320
1321  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1322  | --dataroo | --dataro | --datar)
1323    ac_prev=datarootdir ;;
1324  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1325  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1326    datarootdir=$ac_optarg ;;
1327
1328  -disable-* | --disable-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid feature name: $ac_useropt"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"enable_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval enable_$ac_useropt=no ;;
1343
1344  -docdir | --docdir | --docdi | --doc | --do)
1345    ac_prev=docdir ;;
1346  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1347    docdir=$ac_optarg ;;
1348
1349  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1350    ac_prev=dvidir ;;
1351  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1352    dvidir=$ac_optarg ;;
1353
1354  -enable-* | --enable-*)
1355    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1356    # Reject names that are not valid shell variable names.
1357    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358      as_fn_error $? "invalid feature name: $ac_useropt"
1359    ac_useropt_orig=$ac_useropt
1360    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361    case $ac_user_opts in
1362      *"
1363"enable_$ac_useropt"
1364"*) ;;
1365      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1366	 ac_unrecognized_sep=', ';;
1367    esac
1368    eval enable_$ac_useropt=\$ac_optarg ;;
1369
1370  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1371  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1372  | --exec | --exe | --ex)
1373    ac_prev=exec_prefix ;;
1374  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1375  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1376  | --exec=* | --exe=* | --ex=*)
1377    exec_prefix=$ac_optarg ;;
1378
1379  -gas | --gas | --ga | --g)
1380    # Obsolete; use --with-gas.
1381    with_gas=yes ;;
1382
1383  -help | --help | --hel | --he | -h)
1384    ac_init_help=long ;;
1385  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1386    ac_init_help=recursive ;;
1387  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1388    ac_init_help=short ;;
1389
1390  -host | --host | --hos | --ho)
1391    ac_prev=host_alias ;;
1392  -host=* | --host=* | --hos=* | --ho=*)
1393    host_alias=$ac_optarg ;;
1394
1395  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1396    ac_prev=htmldir ;;
1397  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1398  | --ht=*)
1399    htmldir=$ac_optarg ;;
1400
1401  -includedir | --includedir | --includedi | --included | --include \
1402  | --includ | --inclu | --incl | --inc)
1403    ac_prev=includedir ;;
1404  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1405  | --includ=* | --inclu=* | --incl=* | --inc=*)
1406    includedir=$ac_optarg ;;
1407
1408  -infodir | --infodir | --infodi | --infod | --info | --inf)
1409    ac_prev=infodir ;;
1410  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1411    infodir=$ac_optarg ;;
1412
1413  -libdir | --libdir | --libdi | --libd)
1414    ac_prev=libdir ;;
1415  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1416    libdir=$ac_optarg ;;
1417
1418  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1419  | --libexe | --libex | --libe)
1420    ac_prev=libexecdir ;;
1421  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1422  | --libexe=* | --libex=* | --libe=*)
1423    libexecdir=$ac_optarg ;;
1424
1425  -localedir | --localedir | --localedi | --localed | --locale)
1426    ac_prev=localedir ;;
1427  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1428    localedir=$ac_optarg ;;
1429
1430  -localstatedir | --localstatedir | --localstatedi | --localstated \
1431  | --localstate | --localstat | --localsta | --localst | --locals)
1432    ac_prev=localstatedir ;;
1433  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1434  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1435    localstatedir=$ac_optarg ;;
1436
1437  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1438    ac_prev=mandir ;;
1439  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1440    mandir=$ac_optarg ;;
1441
1442  -nfp | --nfp | --nf)
1443    # Obsolete; use --without-fp.
1444    with_fp=no ;;
1445
1446  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1447  | --no-cr | --no-c | -n)
1448    no_create=yes ;;
1449
1450  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1451  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1452    no_recursion=yes ;;
1453
1454  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1455  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1456  | --oldin | --oldi | --old | --ol | --o)
1457    ac_prev=oldincludedir ;;
1458  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1459  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1460  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1461    oldincludedir=$ac_optarg ;;
1462
1463  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1464    ac_prev=prefix ;;
1465  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1466    prefix=$ac_optarg ;;
1467
1468  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1469  | --program-pre | --program-pr | --program-p)
1470    ac_prev=program_prefix ;;
1471  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1472  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1473    program_prefix=$ac_optarg ;;
1474
1475  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1476  | --program-suf | --program-su | --program-s)
1477    ac_prev=program_suffix ;;
1478  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1479  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1480    program_suffix=$ac_optarg ;;
1481
1482  -program-transform-name | --program-transform-name \
1483  | --program-transform-nam | --program-transform-na \
1484  | --program-transform-n | --program-transform- \
1485  | --program-transform | --program-transfor \
1486  | --program-transfo | --program-transf \
1487  | --program-trans | --program-tran \
1488  | --progr-tra | --program-tr | --program-t)
1489    ac_prev=program_transform_name ;;
1490  -program-transform-name=* | --program-transform-name=* \
1491  | --program-transform-nam=* | --program-transform-na=* \
1492  | --program-transform-n=* | --program-transform-=* \
1493  | --program-transform=* | --program-transfor=* \
1494  | --program-transfo=* | --program-transf=* \
1495  | --program-trans=* | --program-tran=* \
1496  | --progr-tra=* | --program-tr=* | --program-t=*)
1497    program_transform_name=$ac_optarg ;;
1498
1499  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1500    ac_prev=pdfdir ;;
1501  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1502    pdfdir=$ac_optarg ;;
1503
1504  -psdir | --psdir | --psdi | --psd | --ps)
1505    ac_prev=psdir ;;
1506  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1507    psdir=$ac_optarg ;;
1508
1509  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510  | -silent | --silent | --silen | --sile | --sil)
1511    silent=yes ;;
1512
1513  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1514    ac_prev=sbindir ;;
1515  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1516  | --sbi=* | --sb=*)
1517    sbindir=$ac_optarg ;;
1518
1519  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1520  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1521  | --sharedst | --shareds | --shared | --share | --shar \
1522  | --sha | --sh)
1523    ac_prev=sharedstatedir ;;
1524  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1525  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1526  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1527  | --sha=* | --sh=*)
1528    sharedstatedir=$ac_optarg ;;
1529
1530  -site | --site | --sit)
1531    ac_prev=site ;;
1532  -site=* | --site=* | --sit=*)
1533    site=$ac_optarg ;;
1534
1535  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1536    ac_prev=srcdir ;;
1537  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1538    srcdir=$ac_optarg ;;
1539
1540  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1541  | --syscon | --sysco | --sysc | --sys | --sy)
1542    ac_prev=sysconfdir ;;
1543  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1544  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1545    sysconfdir=$ac_optarg ;;
1546
1547  -target | --target | --targe | --targ | --tar | --ta | --t)
1548    ac_prev=target_alias ;;
1549  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1550    target_alias=$ac_optarg ;;
1551
1552  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1553    verbose=yes ;;
1554
1555  -version | --version | --versio | --versi | --vers | -V)
1556    ac_init_version=: ;;
1557
1558  -with-* | --with-*)
1559    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1560    # Reject names that are not valid shell variable names.
1561    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1562      as_fn_error $? "invalid package name: $ac_useropt"
1563    ac_useropt_orig=$ac_useropt
1564    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1565    case $ac_user_opts in
1566      *"
1567"with_$ac_useropt"
1568"*) ;;
1569      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1570	 ac_unrecognized_sep=', ';;
1571    esac
1572    eval with_$ac_useropt=\$ac_optarg ;;
1573
1574  -without-* | --without-*)
1575    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1576    # Reject names that are not valid shell variable names.
1577    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578      as_fn_error $? "invalid package name: $ac_useropt"
1579    ac_useropt_orig=$ac_useropt
1580    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581    case $ac_user_opts in
1582      *"
1583"with_$ac_useropt"
1584"*) ;;
1585      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1586	 ac_unrecognized_sep=', ';;
1587    esac
1588    eval with_$ac_useropt=no ;;
1589
1590  --x)
1591    # Obsolete; use --with-x.
1592    with_x=yes ;;
1593
1594  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1595  | --x-incl | --x-inc | --x-in | --x-i)
1596    ac_prev=x_includes ;;
1597  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1598  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1599    x_includes=$ac_optarg ;;
1600
1601  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1602  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1603    ac_prev=x_libraries ;;
1604  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1605  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1606    x_libraries=$ac_optarg ;;
1607
1608  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1609Try \`$0 --help' for more information"
1610    ;;
1611
1612  *=*)
1613    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1614    # Reject names that are not valid shell variable names.
1615    case $ac_envvar in #(
1616      '' | [0-9]* | *[!_$as_cr_alnum]* )
1617      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1618    esac
1619    eval $ac_envvar=\$ac_optarg
1620    export $ac_envvar ;;
1621
1622  *)
1623    # FIXME: should be removed in autoconf 3.0.
1624    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1625    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1626      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1627    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1628    ;;
1629
1630  esac
1631done
1632
1633if test -n "$ac_prev"; then
1634  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1635  as_fn_error $? "missing argument to $ac_option"
1636fi
1637
1638if test -n "$ac_unrecognized_opts"; then
1639  case $enable_option_checking in
1640    no) ;;
1641    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1642    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1643  esac
1644fi
1645
1646# Check all directory arguments for consistency.
1647for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1648		datadir sysconfdir sharedstatedir localstatedir includedir \
1649		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1650		libdir localedir mandir
1651do
1652  eval ac_val=\$$ac_var
1653  # Remove trailing slashes.
1654  case $ac_val in
1655    */ )
1656      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1657      eval $ac_var=\$ac_val;;
1658  esac
1659  # Be sure to have absolute directory names.
1660  case $ac_val in
1661    [\\/$]* | ?:[\\/]* )  continue;;
1662    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1663  esac
1664  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1665done
1666
1667# There might be people who depend on the old broken behavior: `$host'
1668# used to hold the argument of --host etc.
1669# FIXME: To remove some day.
1670build=$build_alias
1671host=$host_alias
1672target=$target_alias
1673
1674# FIXME: To remove some day.
1675if test "x$host_alias" != x; then
1676  if test "x$build_alias" = x; then
1677    cross_compiling=maybe
1678  elif test "x$build_alias" != "x$host_alias"; then
1679    cross_compiling=yes
1680  fi
1681fi
1682
1683ac_tool_prefix=
1684test -n "$host_alias" && ac_tool_prefix=$host_alias-
1685
1686test "$silent" = yes && exec 6>/dev/null
1687
1688
1689ac_pwd=`pwd` && test -n "$ac_pwd" &&
1690ac_ls_di=`ls -di .` &&
1691ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1692  as_fn_error $? "working directory cannot be determined"
1693test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1694  as_fn_error $? "pwd does not report name of working directory"
1695
1696
1697# Find the source files, if location was not specified.
1698if test -z "$srcdir"; then
1699  ac_srcdir_defaulted=yes
1700  # Try the directory containing this script, then the parent directory.
1701  ac_confdir=`$as_dirname -- "$as_myself" ||
1702$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1703	 X"$as_myself" : 'X\(//\)[^/]' \| \
1704	 X"$as_myself" : 'X\(//\)$' \| \
1705	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1706$as_echo X"$as_myself" |
1707    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)[^/].*/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)$/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\).*/{
1720	    s//\1/
1721	    q
1722	  }
1723	  s/.*/./; q'`
1724  srcdir=$ac_confdir
1725  if test ! -r "$srcdir/$ac_unique_file"; then
1726    srcdir=..
1727  fi
1728else
1729  ac_srcdir_defaulted=no
1730fi
1731if test ! -r "$srcdir/$ac_unique_file"; then
1732  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1733  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1734fi
1735ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1736ac_abs_confdir=`(
1737	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1738	pwd)`
1739# When building in place, set srcdir=.
1740if test "$ac_abs_confdir" = "$ac_pwd"; then
1741  srcdir=.
1742fi
1743# Remove unnecessary trailing slashes from srcdir.
1744# Double slashes in file names in object file debugging info
1745# mess up M-x gdb in Emacs.
1746case $srcdir in
1747*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1748esac
1749for ac_var in $ac_precious_vars; do
1750  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_env_${ac_var}_value=\$${ac_var}
1752  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1754done
1755
1756#
1757# Report the --help message.
1758#
1759if test "$ac_init_help" = "long"; then
1760  # Omit some internal or obsolete options to make the list less imposing.
1761  # This message is too long to be a string in the A/UX 3.1 sh.
1762  cat <<_ACEOF
1763\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1764
1765Usage: $0 [OPTION]... [VAR=VALUE]...
1766
1767To assign environment variables (e.g., CC, CFLAGS...), specify them as
1768VAR=VALUE.  See below for descriptions of some of the useful variables.
1769
1770Defaults for the options are specified in brackets.
1771
1772Configuration:
1773  -h, --help              display this help and exit
1774      --help=short        display options specific to this package
1775      --help=recursive    display the short help of all the included packages
1776  -V, --version           display version information and exit
1777  -q, --quiet, --silent   do not print \`checking ...' messages
1778      --cache-file=FILE   cache test results in FILE [disabled]
1779  -C, --config-cache      alias for \`--cache-file=config.cache'
1780  -n, --no-create         do not create output files
1781      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1782
1783Installation directories:
1784  --prefix=PREFIX         install architecture-independent files in PREFIX
1785                          [$ac_default_prefix]
1786  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1787                          [PREFIX]
1788
1789By default, \`make install' will install all the files in
1790\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1791an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1792for instance \`--prefix=\$HOME'.
1793
1794For better control, use the options below.
1795
1796Fine tuning of the installation directories:
1797  --bindir=DIR            user executables [EPREFIX/bin]
1798  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1799  --libexecdir=DIR        program executables [EPREFIX/libexec]
1800  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1801  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1802  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1803  --libdir=DIR            object code libraries [EPREFIX/lib]
1804  --includedir=DIR        C header files [PREFIX/include]
1805  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1806  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1807  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1808  --infodir=DIR           info documentation [DATAROOTDIR/info]
1809  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1810  --mandir=DIR            man documentation [DATAROOTDIR/man]
1811  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1812  --htmldir=DIR           html documentation [DOCDIR]
1813  --dvidir=DIR            dvi documentation [DOCDIR]
1814  --pdfdir=DIR            pdf documentation [DOCDIR]
1815  --psdir=DIR             ps documentation [DOCDIR]
1816_ACEOF
1817
1818  cat <<\_ACEOF
1819
1820X features:
1821  --x-includes=DIR    X include files are in DIR
1822  --x-libraries=DIR   X library files are in DIR
1823
1824System types:
1825  --build=BUILD     configure for building on BUILD [guessed]
1826  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1827  --target=TARGET   configure for building compilers for TARGET [HOST]
1828_ACEOF
1829fi
1830
1831if test -n "$ac_init_help"; then
1832  case $ac_init_help in
1833     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1834   esac
1835  cat <<\_ACEOF
1836
1837Optional Features:
1838  --disable-option-checking  ignore unrecognized --enable/--with options
1839  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1840  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1841  --enable-openjdk-only   suppress building custom source even if present
1842                          [disabled]
1843  --enable-debug          set the debug level to fastdebug (shorthand for
1844                          --with-debug-level=fastdebug) [disabled]
1845  --disable-headful       disable building headful support (graphical UI
1846                          support) [enabled]
1847  --enable-hotspot-test-in-build
1848                          run the Queens test after Hotspot build [disabled]
1849  --enable-unlimited-crypto
1850                          Enable unlimited crypto policy [disabled]
1851  --enable-rmiconnector-iiop
1852                          enable the JMX RMIConnector iiop transport
1853                          [disabled]
1854  --disable-warnings-as-errors
1855                          do not consider native warnings to be an error
1856                          [enabled]
1857  --disable-debug-symbols disable generation of debug symbols [enabled]
1858  --disable-zip-debug-info
1859                          disable zipping of debug-info files [enabled]
1860  --enable-native-coverage
1861                          enable native compilation with code coverage
1862                          data[disabled]
1863  --disable-freetype-bundling
1864                          disable bundling of the freetype library with the
1865                          build result [enabled on Windows or when using
1866                          --with-freetype, disabled otherwise]
1867  --enable-sjavac         use sjavac to do fast incremental compiles
1868                          [disabled]
1869  --disable-precompiled-headers
1870                          disable using precompiled headers when compiling C++
1871                          [enabled]
1872  --enable-ccache         enable using ccache to speed up recompilations
1873                          [disabled]
1874
1875Optional Packages:
1876  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1877  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1878  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1879                          support it), e.g. --with-target-bits=32 [guessed]
1880  --with-custom-make-dir  Deprecated. Option is kept for backwards
1881                          compatibility and is ignored
1882  --with-jdk-variant      JDK variant to build (normal) [normal]
1883  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1884  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1885                          client, minimal1, kernel, zero, zeroshark, core)
1886                          [server]
1887  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1888                          optimized (HotSpot build only)) [release]
1889  --with-devkit           use this devkit for compilers, tools and resources
1890  --with-sys-root         alias for --with-sysroot for backwards compatability
1891  --with-sysroot          use this directory as sysroot
1892  --with-tools-dir        alias for --with-toolchain-path for backwards
1893                          compatibility
1894  --with-toolchain-path   prepend these directories when searching for
1895                          toolchain binaries (compilers etc)
1896  --with-extra-path       prepend these directories to the default path
1897  --with-sdk-name         use the platform SDK of the given name. [macosx]
1898  --with-conf-name        use this as the name of the configuration [generated
1899                          from important configuration options]
1900  --with-output-sync      set make output sync type if supported by make.
1901                          [recurse]
1902  --with-builddeps-conf   use this configuration file for the builddeps
1903  --with-builddeps-server download and use build dependencies from this server
1904                          url
1905  --with-builddeps-dir    store downloaded build dependencies here
1906                          [/localhome/builddeps]
1907  --with-builddeps-group  chgrp the downloaded build dependencies to this
1908                          group
1909  --with-cacerts-file     specify alternative cacerts file
1910  --with-milestone        Set milestone value for build [internal]
1911  --with-update-version   Set update version value for build [b00]
1912  --with-user-release-suffix
1913                          Add a custom string to the version string if build
1914                          number is not set.[username_builddateb00]
1915  --with-build-number     Set build number value for build [b00]
1916  --with-copyright-year   Set copyright year value for build [current year]
1917  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1918  --with-add-source-root  for each and every source directory, look in this
1919                          additional source root for the same directory; if it
1920                          exists and have files in it, include it in the build
1921  --with-override-source-root
1922                          for each and every source directory, look in this
1923                          override source root for the same directory; if it
1924                          exists, use that directory instead and ignore the
1925                          directory in the original source root
1926  --with-adds-and-overrides
1927                          use the subdirs 'adds' and 'overrides' in the
1928                          specified directory as add-source-root and
1929                          override-source-root
1930  --with-override-langtools
1931                          use this langtools dir for the build
1932  --with-override-corba   use this corba dir for the build
1933  --with-override-jaxp    use this jaxp dir for the build
1934  --with-override-jaxws   use this jaxws dir for the build
1935  --with-override-hotspot use this hotspot dir for the build
1936  --with-override-nashorn use this nashorn dir for the build
1937  --with-override-jdk     use this jdk dir for the build
1938  --with-import-hotspot   import hotspot binaries from this jdk image or
1939                          hotspot build dist dir instead of building from
1940                          source
1941  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1942                          to show possible values [platform dependent]
1943  --with-toolchain-version
1944                          the version of the toolchain to look for, use
1945                          '--help' to show possible values [platform
1946                          dependent]
1947  --with-jtreg            Regression Test Harness [probed]
1948  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1949  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1950  --with-extra-ldflags    extra flags to be used when linking jdk
1951  --with-x                use the X Window System
1952  --with-cups             specify prefix directory for the cups package
1953                          (expecting the headers under PATH/include)
1954  --with-cups-include     specify directory for the cups include files
1955  --with-freetype         specify prefix directory for the freetype package
1956                          (expecting the libraries under PATH/lib and the
1957                          headers under PATH/include)
1958  --with-freetype-include specify directory for the freetype include files
1959  --with-freetype-lib     specify directory for the freetype library
1960  --with-freetype-src     specify directory with freetype sources to
1961                          automatically build the library (experimental,
1962                          Windows-only)
1963  --with-alsa             specify prefix directory for the alsa package
1964                          (expecting the libraries under PATH/lib and the
1965                          headers under PATH/include)
1966  --with-alsa-include     specify directory for the alsa include files
1967  --with-alsa-lib         specify directory for the alsa library
1968  --with-libjpeg          use libjpeg from build system or OpenJDK source
1969                          (system, bundled) [bundled]
1970  --with-giflib           use giflib from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-lcms             use lcms2 from build system or OpenJDK source
1973                          (system, bundled) [bundled]
1974  --with-libpng           use libpng from build system or OpenJDK source
1975                          (system, bundled) [bundled]
1976  --with-zlib             use zlib from build system or OpenJDK source
1977                          (system, bundled) [bundled]
1978  --with-stdc++lib=<static>,<dynamic>,<default>
1979                          force linking of the C++ runtime on Linux to either
1980                          static or dynamic, default is static with dynamic as
1981                          fallback
1982  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1983                          (Windows only) [probed]
1984  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1985                          (Windows only) [probed]
1986  --with-dxsdk            Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-dxsdk-include    Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-num-cores        number of cores in the build system, e.g.
1993                          --with-num-cores=8 [probed]
1994  --with-memory-size      memory (in MB) available in the build system, e.g.
1995                          --with-memory-size=1024 [probed]
1996  --with-jobs             number of parallel jobs to let make run [calculated
1997                          based on cores and memory]
1998  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1999                          invocations of boot JDK, overriding the default
2000                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2001                          -enableassertions"
2002  --with-sjavac-server-java
2003                          use this java binary for running the sjavac
2004                          background server [Boot JDK java]
2005  --with-ccache-dir       where to store ccache files [~/.ccache]
2006
2007Some influential environment variables:
2008  BASENAME    Override default value for BASENAME
2009  BASH        Override default value for BASH
2010  CAT         Override default value for CAT
2011  CHMOD       Override default value for CHMOD
2012  CMP         Override default value for CMP
2013  COMM        Override default value for COMM
2014  CP          Override default value for CP
2015  CUT         Override default value for CUT
2016  DATE        Override default value for DATE
2017  DIFF        Override default value for DIFF
2018  DIRNAME     Override default value for DIRNAME
2019  ECHO        Override default value for ECHO
2020  EXPR        Override default value for EXPR
2021  FILE        Override default value for FILE
2022  FIND        Override default value for FIND
2023  HEAD        Override default value for HEAD
2024  LN          Override default value for LN
2025  LS          Override default value for LS
2026  MKDIR       Override default value for MKDIR
2027  MKTEMP      Override default value for MKTEMP
2028  MV          Override default value for MV
2029  NAWK        Override default value for NAWK
2030  PRINTF      Override default value for PRINTF
2031  RM          Override default value for RM
2032  SH          Override default value for SH
2033  SORT        Override default value for SORT
2034  TAIL        Override default value for TAIL
2035  TAR         Override default value for TAR
2036  TEE         Override default value for TEE
2037  TOUCH       Override default value for TOUCH
2038  TR          Override default value for TR
2039  UNAME       Override default value for UNAME
2040  UNIQ        Override default value for UNIQ
2041  WC          Override default value for WC
2042  WHICH       Override default value for WHICH
2043  XARGS       Override default value for XARGS
2044  AWK         Override default value for AWK
2045  GREP        Override default value for GREP
2046  EGREP       Override default value for EGREP
2047  FGREP       Override default value for FGREP
2048  SED         Override default value for SED
2049  CYGPATH     Override default value for CYGPATH
2050  READLINK    Override default value for READLINK
2051  DF          Override default value for DF
2052  CPIO        Override default value for CPIO
2053  UNZIP       Override default value for UNZIP
2054  ZIP         Override default value for ZIP
2055  LDD         Override default value for LDD
2056  OTOOL       Override default value for OTOOL
2057  READELF     Override default value for READELF
2058  HG          Override default value for HG
2059  STAT        Override default value for STAT
2060  TIME        Override default value for TIME
2061  DSYMUTIL    Override default value for DSYMUTIL
2062  XATTR       Override default value for XATTR
2063  CODESIGN    Override default value for CODESIGN
2064  SETFILE     Override default value for SETFILE
2065  PKG_CONFIG  path to pkg-config utility
2066  JAVA        Override default value for JAVA
2067  JAVAC       Override default value for JAVAC
2068  JAVAH       Override default value for JAVAH
2069  JAR         Override default value for JAR
2070  JARSIGNER   Override default value for JARSIGNER
2071  CC          C compiler command
2072  CFLAGS      C compiler flags
2073  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2074              nonstandard directory <lib dir>
2075  LIBS        libraries to pass to the linker, e.g. -l<library>
2076  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2077              you have headers in a nonstandard directory <include dir>
2078  CXX         C++ compiler command
2079  CXXFLAGS    C++ compiler flags
2080  CPP         C preprocessor
2081  CXXCPP      C++ preprocessor
2082  AS          Override default value for AS
2083  AR          Override default value for AR
2084  LIPO        Override default value for LIPO
2085  STRIP       Override default value for STRIP
2086  NM          Override default value for NM
2087  GNM         Override default value for GNM
2088  OBJCOPY     Override default value for OBJCOPY
2089  OBJDUMP     Override default value for OBJDUMP
2090  BUILD_CC    Override default value for BUILD_CC
2091  BUILD_CXX   Override default value for BUILD_CXX
2092  BUILD_LD    Override default value for BUILD_LD
2093  JTREGEXE    Override default value for JTREGEXE
2094  XMKMF       Path to xmkmf, Makefile generator for X Window System
2095  FREETYPE_CFLAGS
2096              C compiler flags for FREETYPE, overriding pkg-config
2097  FREETYPE_LIBS
2098              linker flags for FREETYPE, overriding pkg-config
2099  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2100  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2101  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2102  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2103  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2104  PNG_LIBS    linker flags for PNG, overriding pkg-config
2105  LIBFFI_CFLAGS
2106              C compiler flags for LIBFFI, overriding pkg-config
2107  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2108  CCACHE      Override default value for CCACHE
2109
2110Use these variables to override the choices made by `configure' or to help
2111it to find libraries and programs with nonstandard names/locations.
2112
2113Report bugs to <build-dev@openjdk.java.net>.
2114OpenJDK home page: <http://openjdk.java.net>.
2115_ACEOF
2116ac_status=$?
2117fi
2118
2119if test "$ac_init_help" = "recursive"; then
2120  # If there are subdirs, report their specific --help.
2121  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2122    test -d "$ac_dir" ||
2123      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2124      continue
2125    ac_builddir=.
2126
2127case "$ac_dir" in
2128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2129*)
2130  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2131  # A ".." for each directory in $ac_dir_suffix.
2132  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2133  case $ac_top_builddir_sub in
2134  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2135  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2136  esac ;;
2137esac
2138ac_abs_top_builddir=$ac_pwd
2139ac_abs_builddir=$ac_pwd$ac_dir_suffix
2140# for backward compatibility:
2141ac_top_builddir=$ac_top_build_prefix
2142
2143case $srcdir in
2144  .)  # We are building in place.
2145    ac_srcdir=.
2146    ac_top_srcdir=$ac_top_builddir_sub
2147    ac_abs_top_srcdir=$ac_pwd ;;
2148  [\\/]* | ?:[\\/]* )  # Absolute name.
2149    ac_srcdir=$srcdir$ac_dir_suffix;
2150    ac_top_srcdir=$srcdir
2151    ac_abs_top_srcdir=$srcdir ;;
2152  *) # Relative name.
2153    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2154    ac_top_srcdir=$ac_top_build_prefix$srcdir
2155    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2156esac
2157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2158
2159    cd "$ac_dir" || { ac_status=$?; continue; }
2160    # Check for guested configure.
2161    if test -f "$ac_srcdir/configure.gnu"; then
2162      echo &&
2163      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2164    elif test -f "$ac_srcdir/configure"; then
2165      echo &&
2166      $SHELL "$ac_srcdir/configure" --help=recursive
2167    else
2168      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2169    fi || ac_status=$?
2170    cd "$ac_pwd" || { ac_status=$?; break; }
2171  done
2172fi
2173
2174test -n "$ac_init_help" && exit $ac_status
2175if $ac_init_version; then
2176  cat <<\_ACEOF
2177OpenJDK configure jdk9
2178generated by GNU Autoconf 2.69
2179
2180Copyright (C) 2012 Free Software Foundation, Inc.
2181This configure script is free software; the Free Software Foundation
2182gives unlimited permission to copy, distribute and modify it.
2183_ACEOF
2184  exit
2185fi
2186
2187## ------------------------ ##
2188## Autoconf initialization. ##
2189## ------------------------ ##
2190
2191# ac_fn_c_try_compile LINENO
2192# --------------------------
2193# Try to compile conftest.$ac_ext, and return whether this succeeded.
2194ac_fn_c_try_compile ()
2195{
2196  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197  rm -f conftest.$ac_objext
2198  if { { ac_try="$ac_compile"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_compile") 2>conftest.err
2206  ac_status=$?
2207  if test -s conftest.err; then
2208    grep -v '^ *+' conftest.err >conftest.er1
2209    cat conftest.er1 >&5
2210    mv -f conftest.er1 conftest.err
2211  fi
2212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2213  test $ac_status = 0; } && {
2214	 test -z "$ac_c_werror_flag" ||
2215	 test ! -s conftest.err
2216       } && test -s conftest.$ac_objext; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: failed program was:" >&5
2220sed 's/^/| /' conftest.$ac_ext >&5
2221
2222	ac_retval=1
2223fi
2224  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2225  as_fn_set_status $ac_retval
2226
2227} # ac_fn_c_try_compile
2228
2229# ac_fn_cxx_try_compile LINENO
2230# ----------------------------
2231# Try to compile conftest.$ac_ext, and return whether this succeeded.
2232ac_fn_cxx_try_compile ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  rm -f conftest.$ac_objext
2236  if { { ac_try="$ac_compile"
2237case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_compile") 2>conftest.err
2244  ac_status=$?
2245  if test -s conftest.err; then
2246    grep -v '^ *+' conftest.err >conftest.er1
2247    cat conftest.er1 >&5
2248    mv -f conftest.er1 conftest.err
2249  fi
2250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2251  test $ac_status = 0; } && {
2252	 test -z "$ac_cxx_werror_flag" ||
2253	 test ! -s conftest.err
2254       } && test -s conftest.$ac_objext; then :
2255  ac_retval=0
2256else
2257  $as_echo "$as_me: failed program was:" >&5
2258sed 's/^/| /' conftest.$ac_ext >&5
2259
2260	ac_retval=1
2261fi
2262  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263  as_fn_set_status $ac_retval
2264
2265} # ac_fn_cxx_try_compile
2266
2267# ac_fn_c_try_cpp LINENO
2268# ----------------------
2269# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2270ac_fn_c_try_cpp ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  if { { ac_try="$ac_cpp conftest.$ac_ext"
2274case "(($ac_try" in
2275  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2276  *) ac_try_echo=$ac_try;;
2277esac
2278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2279$as_echo "$ac_try_echo"; } >&5
2280  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2281  ac_status=$?
2282  if test -s conftest.err; then
2283    grep -v '^ *+' conftest.err >conftest.er1
2284    cat conftest.er1 >&5
2285    mv -f conftest.er1 conftest.err
2286  fi
2287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2288  test $ac_status = 0; } > conftest.i && {
2289	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2290	 test ! -s conftest.err
2291       }; then :
2292  ac_retval=0
2293else
2294  $as_echo "$as_me: failed program was:" >&5
2295sed 's/^/| /' conftest.$ac_ext >&5
2296
2297    ac_retval=1
2298fi
2299  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2300  as_fn_set_status $ac_retval
2301
2302} # ac_fn_c_try_cpp
2303
2304# ac_fn_cxx_try_cpp LINENO
2305# ------------------------
2306# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2307ac_fn_cxx_try_cpp ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if { { ac_try="$ac_cpp conftest.$ac_ext"
2311case "(($ac_try" in
2312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313  *) ac_try_echo=$ac_try;;
2314esac
2315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316$as_echo "$ac_try_echo"; } >&5
2317  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2318  ac_status=$?
2319  if test -s conftest.err; then
2320    grep -v '^ *+' conftest.err >conftest.er1
2321    cat conftest.er1 >&5
2322    mv -f conftest.er1 conftest.err
2323  fi
2324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2325  test $ac_status = 0; } > conftest.i && {
2326	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2327	 test ! -s conftest.err
2328       }; then :
2329  ac_retval=0
2330else
2331  $as_echo "$as_me: failed program was:" >&5
2332sed 's/^/| /' conftest.$ac_ext >&5
2333
2334    ac_retval=1
2335fi
2336  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337  as_fn_set_status $ac_retval
2338
2339} # ac_fn_cxx_try_cpp
2340
2341# ac_fn_c_try_link LINENO
2342# -----------------------
2343# Try to link conftest.$ac_ext, and return whether this succeeded.
2344ac_fn_c_try_link ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  rm -f conftest.$ac_objext conftest$ac_exeext
2348  if { { ac_try="$ac_link"
2349case "(($ac_try" in
2350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2351  *) ac_try_echo=$ac_try;;
2352esac
2353eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2354$as_echo "$ac_try_echo"; } >&5
2355  (eval "$ac_link") 2>conftest.err
2356  ac_status=$?
2357  if test -s conftest.err; then
2358    grep -v '^ *+' conftest.err >conftest.er1
2359    cat conftest.er1 >&5
2360    mv -f conftest.er1 conftest.err
2361  fi
2362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2363  test $ac_status = 0; } && {
2364	 test -z "$ac_c_werror_flag" ||
2365	 test ! -s conftest.err
2366       } && test -s conftest$ac_exeext && {
2367	 test "$cross_compiling" = yes ||
2368	 test -x conftest$ac_exeext
2369       }; then :
2370  ac_retval=0
2371else
2372  $as_echo "$as_me: failed program was:" >&5
2373sed 's/^/| /' conftest.$ac_ext >&5
2374
2375	ac_retval=1
2376fi
2377  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2378  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2379  # interfere with the next link command; also delete a directory that is
2380  # left behind by Apple's compiler.  We do this before executing the actions.
2381  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2382  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2383  as_fn_set_status $ac_retval
2384
2385} # ac_fn_c_try_link
2386
2387# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2388# ---------------------------------------------------------
2389# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2390# the include files in INCLUDES and setting the cache variable VAR
2391# accordingly.
2392ac_fn_cxx_check_header_mongrel ()
2393{
2394  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395  if eval \${$3+:} false; then :
2396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2397$as_echo_n "checking for $2... " >&6; }
2398if eval \${$3+:} false; then :
2399  $as_echo_n "(cached) " >&6
2400fi
2401eval ac_res=\$$3
2402	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403$as_echo "$ac_res" >&6; }
2404else
2405  # Is the header compilable?
2406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2407$as_echo_n "checking $2 usability... " >&6; }
2408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h.  */
2410$4
2411#include <$2>
2412_ACEOF
2413if ac_fn_cxx_try_compile "$LINENO"; then :
2414  ac_header_compiler=yes
2415else
2416  ac_header_compiler=no
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2420$as_echo "$ac_header_compiler" >&6; }
2421
2422# Is the header present?
2423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2424$as_echo_n "checking $2 presence... " >&6; }
2425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h.  */
2427#include <$2>
2428_ACEOF
2429if ac_fn_cxx_try_cpp "$LINENO"; then :
2430  ac_header_preproc=yes
2431else
2432  ac_header_preproc=no
2433fi
2434rm -f conftest.err conftest.i conftest.$ac_ext
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2436$as_echo "$ac_header_preproc" >&6; }
2437
2438# So?  What about this header?
2439case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2440  yes:no: )
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2442$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2444$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2445    ;;
2446  no:yes:* )
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2448$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2450$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2452$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2454$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2456$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2457( $as_echo "## ----------------------------------------- ##
2458## Report this to build-dev@openjdk.java.net ##
2459## ----------------------------------------- ##"
2460     ) | sed "s/^/$as_me: WARNING:     /" >&2
2461    ;;
2462esac
2463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2464$as_echo_n "checking for $2... " >&6; }
2465if eval \${$3+:} false; then :
2466  $as_echo_n "(cached) " >&6
2467else
2468  eval "$3=\$ac_header_compiler"
2469fi
2470eval ac_res=\$$3
2471	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2472$as_echo "$ac_res" >&6; }
2473fi
2474  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2475
2476} # ac_fn_cxx_check_header_mongrel
2477
2478# ac_fn_cxx_try_run LINENO
2479# ------------------------
2480# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2481# that executables *can* be run.
2482ac_fn_cxx_try_run ()
2483{
2484  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2485  if { { ac_try="$ac_link"
2486case "(($ac_try" in
2487  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2488  *) ac_try_echo=$ac_try;;
2489esac
2490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2491$as_echo "$ac_try_echo"; } >&5
2492  (eval "$ac_link") 2>&5
2493  ac_status=$?
2494  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2495  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2496  { { case "(($ac_try" in
2497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498  *) ac_try_echo=$ac_try;;
2499esac
2500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501$as_echo "$ac_try_echo"; } >&5
2502  (eval "$ac_try") 2>&5
2503  ac_status=$?
2504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2505  test $ac_status = 0; }; }; then :
2506  ac_retval=0
2507else
2508  $as_echo "$as_me: program exited with status $ac_status" >&5
2509       $as_echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512       ac_retval=$ac_status
2513fi
2514  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2515  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516  as_fn_set_status $ac_retval
2517
2518} # ac_fn_cxx_try_run
2519
2520# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2521# ---------------------------------------------------------
2522# Tests whether HEADER exists and can be compiled using the include files in
2523# INCLUDES, setting the cache variable VAR accordingly.
2524ac_fn_cxx_check_header_compile ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534$4
2535#include <$2>
2536_ACEOF
2537if ac_fn_cxx_try_compile "$LINENO"; then :
2538  eval "$3=yes"
2539else
2540  eval "$3=no"
2541fi
2542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2543fi
2544eval ac_res=\$$3
2545	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2546$as_echo "$ac_res" >&6; }
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548
2549} # ac_fn_cxx_check_header_compile
2550
2551# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2552# ----------------------------------------------
2553# Tries to find the compile-time value of EXPR in a program that includes
2554# INCLUDES, setting VAR accordingly. Returns whether the value could be
2555# computed
2556ac_fn_cxx_compute_int ()
2557{
2558  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2559  if test "$cross_compiling" = yes; then
2560    # Depending upon the size, compute the lo and hi bounds.
2561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564int
2565main ()
2566{
2567static int test_array [1 - 2 * !(($2) >= 0)];
2568test_array [0] = 0;
2569return test_array [0];
2570
2571  ;
2572  return 0;
2573}
2574_ACEOF
2575if ac_fn_cxx_try_compile "$LINENO"; then :
2576  ac_lo=0 ac_mid=0
2577  while :; do
2578    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579/* end confdefs.h.  */
2580$4
2581int
2582main ()
2583{
2584static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2585test_array [0] = 0;
2586return test_array [0];
2587
2588  ;
2589  return 0;
2590}
2591_ACEOF
2592if ac_fn_cxx_try_compile "$LINENO"; then :
2593  ac_hi=$ac_mid; break
2594else
2595  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2596			if test $ac_lo -le $ac_mid; then
2597			  ac_lo= ac_hi=
2598			  break
2599			fi
2600			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2601fi
2602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2603  done
2604else
2605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608int
2609main ()
2610{
2611static int test_array [1 - 2 * !(($2) < 0)];
2612test_array [0] = 0;
2613return test_array [0];
2614
2615  ;
2616  return 0;
2617}
2618_ACEOF
2619if ac_fn_cxx_try_compile "$LINENO"; then :
2620  ac_hi=-1 ac_mid=-1
2621  while :; do
2622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624$4
2625int
2626main ()
2627{
2628static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2629test_array [0] = 0;
2630return test_array [0];
2631
2632  ;
2633  return 0;
2634}
2635_ACEOF
2636if ac_fn_cxx_try_compile "$LINENO"; then :
2637  ac_lo=$ac_mid; break
2638else
2639  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2640			if test $ac_mid -le $ac_hi; then
2641			  ac_lo= ac_hi=
2642			  break
2643			fi
2644			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2645fi
2646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2647  done
2648else
2649  ac_lo= ac_hi=
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652fi
2653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2654# Binary search between lo and hi bounds.
2655while test "x$ac_lo" != "x$ac_hi"; do
2656  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658/* end confdefs.h.  */
2659$4
2660int
2661main ()
2662{
2663static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2664test_array [0] = 0;
2665return test_array [0];
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_compile "$LINENO"; then :
2672  ac_hi=$ac_mid
2673else
2674  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677done
2678case $ac_lo in #((
2679?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2680'') ac_retval=1 ;;
2681esac
2682  else
2683    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h.  */
2685$4
2686static long int longval () { return $2; }
2687static unsigned long int ulongval () { return $2; }
2688#include <stdio.h>
2689#include <stdlib.h>
2690int
2691main ()
2692{
2693
2694  FILE *f = fopen ("conftest.val", "w");
2695  if (! f)
2696    return 1;
2697  if (($2) < 0)
2698    {
2699      long int i = longval ();
2700      if (i != ($2))
2701	return 1;
2702      fprintf (f, "%ld", i);
2703    }
2704  else
2705    {
2706      unsigned long int i = ulongval ();
2707      if (i != ($2))
2708	return 1;
2709      fprintf (f, "%lu", i);
2710    }
2711  /* Do not output a trailing newline, as this causes \r\n confusion
2712     on some platforms.  */
2713  return ferror (f) || fclose (f) != 0;
2714
2715  ;
2716  return 0;
2717}
2718_ACEOF
2719if ac_fn_cxx_try_run "$LINENO"; then :
2720  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2721else
2722  ac_retval=1
2723fi
2724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2725  conftest.$ac_objext conftest.beam conftest.$ac_ext
2726rm -f conftest.val
2727
2728  fi
2729  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730  as_fn_set_status $ac_retval
2731
2732} # ac_fn_cxx_compute_int
2733
2734# ac_fn_cxx_try_link LINENO
2735# -------------------------
2736# Try to link conftest.$ac_ext, and return whether this succeeded.
2737ac_fn_cxx_try_link ()
2738{
2739  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2740  rm -f conftest.$ac_objext conftest$ac_exeext
2741  if { { ac_try="$ac_link"
2742case "(($ac_try" in
2743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2744  *) ac_try_echo=$ac_try;;
2745esac
2746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2747$as_echo "$ac_try_echo"; } >&5
2748  (eval "$ac_link") 2>conftest.err
2749  ac_status=$?
2750  if test -s conftest.err; then
2751    grep -v '^ *+' conftest.err >conftest.er1
2752    cat conftest.er1 >&5
2753    mv -f conftest.er1 conftest.err
2754  fi
2755  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2756  test $ac_status = 0; } && {
2757	 test -z "$ac_cxx_werror_flag" ||
2758	 test ! -s conftest.err
2759       } && test -s conftest$ac_exeext && {
2760	 test "$cross_compiling" = yes ||
2761	 test -x conftest$ac_exeext
2762       }; then :
2763  ac_retval=0
2764else
2765  $as_echo "$as_me: failed program was:" >&5
2766sed 's/^/| /' conftest.$ac_ext >&5
2767
2768	ac_retval=1
2769fi
2770  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2771  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2772  # interfere with the next link command; also delete a directory that is
2773  # left behind by Apple's compiler.  We do this before executing the actions.
2774  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2775  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2776  as_fn_set_status $ac_retval
2777
2778} # ac_fn_cxx_try_link
2779
2780# ac_fn_cxx_check_func LINENO FUNC VAR
2781# ------------------------------------
2782# Tests whether FUNC exists, setting the cache variable VAR accordingly
2783ac_fn_cxx_check_func ()
2784{
2785  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2787$as_echo_n "checking for $2... " >&6; }
2788if eval \${$3+:} false; then :
2789  $as_echo_n "(cached) " >&6
2790else
2791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2792/* end confdefs.h.  */
2793/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2794   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2795#define $2 innocuous_$2
2796
2797/* System header to define __stub macros and hopefully few prototypes,
2798    which can conflict with char $2 (); below.
2799    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2800    <limits.h> exists even on freestanding compilers.  */
2801
2802#ifdef __STDC__
2803# include <limits.h>
2804#else
2805# include <assert.h>
2806#endif
2807
2808#undef $2
2809
2810/* Override any GCC internal prototype to avoid an error.
2811   Use char because int might match the return type of a GCC
2812   builtin and then its argument prototype would still apply.  */
2813#ifdef __cplusplus
2814extern "C"
2815#endif
2816char $2 ();
2817/* The GNU C library defines this for functions which it implements
2818    to always fail with ENOSYS.  Some functions are actually named
2819    something starting with __ and the normal name is an alias.  */
2820#if defined __stub_$2 || defined __stub___$2
2821choke me
2822#endif
2823
2824int
2825main ()
2826{
2827return $2 ();
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_link "$LINENO"; then :
2833  eval "$3=yes"
2834else
2835  eval "$3=no"
2836fi
2837rm -f core conftest.err conftest.$ac_objext \
2838    conftest$ac_exeext conftest.$ac_ext
2839fi
2840eval ac_res=\$$3
2841	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2842$as_echo "$ac_res" >&6; }
2843  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2844
2845} # ac_fn_cxx_check_func
2846
2847# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2848# -------------------------------------------------------
2849# Tests whether HEADER exists and can be compiled using the include files in
2850# INCLUDES, setting the cache variable VAR accordingly.
2851ac_fn_c_check_header_compile ()
2852{
2853  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855$as_echo_n "checking for $2... " >&6; }
2856if eval \${$3+:} false; then :
2857  $as_echo_n "(cached) " >&6
2858else
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862#include <$2>
2863_ACEOF
2864if ac_fn_c_try_compile "$LINENO"; then :
2865  eval "$3=yes"
2866else
2867  eval "$3=no"
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871eval ac_res=\$$3
2872	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2873$as_echo "$ac_res" >&6; }
2874  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2875
2876} # ac_fn_c_check_header_compile
2877cat >config.log <<_ACEOF
2878This file contains any messages produced by compilers while
2879running configure, to aid debugging if configure makes a mistake.
2880
2881It was created by OpenJDK $as_me jdk9, which was
2882generated by GNU Autoconf 2.69.  Invocation command line was
2883
2884  $ $0 $@
2885
2886_ACEOF
2887exec 5>>config.log
2888{
2889cat <<_ASUNAME
2890## --------- ##
2891## Platform. ##
2892## --------- ##
2893
2894hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2895uname -m = `(uname -m) 2>/dev/null || echo unknown`
2896uname -r = `(uname -r) 2>/dev/null || echo unknown`
2897uname -s = `(uname -s) 2>/dev/null || echo unknown`
2898uname -v = `(uname -v) 2>/dev/null || echo unknown`
2899
2900/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2901/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2902
2903/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2904/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2905/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2906/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2907/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2908/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2909/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2910
2911_ASUNAME
2912
2913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2914for as_dir in $PATH
2915do
2916  IFS=$as_save_IFS
2917  test -z "$as_dir" && as_dir=.
2918    $as_echo "PATH: $as_dir"
2919  done
2920IFS=$as_save_IFS
2921
2922} >&5
2923
2924cat >&5 <<_ACEOF
2925
2926
2927## ----------- ##
2928## Core tests. ##
2929## ----------- ##
2930
2931_ACEOF
2932
2933
2934# Keep a trace of the command line.
2935# Strip out --no-create and --no-recursion so they do not pile up.
2936# Strip out --silent because we don't want to record it for future runs.
2937# Also quote any args containing shell meta-characters.
2938# Make two passes to allow for proper duplicate-argument suppression.
2939ac_configure_args=
2940ac_configure_args0=
2941ac_configure_args1=
2942ac_must_keep_next=false
2943for ac_pass in 1 2
2944do
2945  for ac_arg
2946  do
2947    case $ac_arg in
2948    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2949    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2950    | -silent | --silent | --silen | --sile | --sil)
2951      continue ;;
2952    *\'*)
2953      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2954    esac
2955    case $ac_pass in
2956    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2957    2)
2958      as_fn_append ac_configure_args1 " '$ac_arg'"
2959      if test $ac_must_keep_next = true; then
2960	ac_must_keep_next=false # Got value, back to normal.
2961      else
2962	case $ac_arg in
2963	  *=* | --config-cache | -C | -disable-* | --disable-* \
2964	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2965	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2966	  | -with-* | --with-* | -without-* | --without-* | --x)
2967	    case "$ac_configure_args0 " in
2968	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2969	    esac
2970	    ;;
2971	  -* ) ac_must_keep_next=true ;;
2972	esac
2973      fi
2974      as_fn_append ac_configure_args " '$ac_arg'"
2975      ;;
2976    esac
2977  done
2978done
2979{ ac_configure_args0=; unset ac_configure_args0;}
2980{ ac_configure_args1=; unset ac_configure_args1;}
2981
2982# When interrupted or exit'd, cleanup temporary files, and complete
2983# config.log.  We remove comments because anyway the quotes in there
2984# would cause problems or look ugly.
2985# WARNING: Use '\'' to represent an apostrophe within the trap.
2986# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2987trap 'exit_status=$?
2988  # Save into config.log some information that might help in debugging.
2989  {
2990    echo
2991
2992    $as_echo "## ---------------- ##
2993## Cache variables. ##
2994## ---------------- ##"
2995    echo
2996    # The following way of writing the cache mishandles newlines in values,
2997(
2998  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2999    eval ac_val=\$$ac_var
3000    case $ac_val in #(
3001    *${as_nl}*)
3002      case $ac_var in #(
3003      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3004$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3005      esac
3006      case $ac_var in #(
3007      _ | IFS | as_nl) ;; #(
3008      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3009      *) { eval $ac_var=; unset $ac_var;} ;;
3010      esac ;;
3011    esac
3012  done
3013  (set) 2>&1 |
3014    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3015    *${as_nl}ac_space=\ *)
3016      sed -n \
3017	"s/'\''/'\''\\\\'\'''\''/g;
3018	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3019      ;; #(
3020    *)
3021      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3022      ;;
3023    esac |
3024    sort
3025)
3026    echo
3027
3028    $as_echo "## ----------------- ##
3029## Output variables. ##
3030## ----------------- ##"
3031    echo
3032    for ac_var in $ac_subst_vars
3033    do
3034      eval ac_val=\$$ac_var
3035      case $ac_val in
3036      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3037      esac
3038      $as_echo "$ac_var='\''$ac_val'\''"
3039    done | sort
3040    echo
3041
3042    if test -n "$ac_subst_files"; then
3043      $as_echo "## ------------------- ##
3044## File substitutions. ##
3045## ------------------- ##"
3046      echo
3047      for ac_var in $ac_subst_files
3048      do
3049	eval ac_val=\$$ac_var
3050	case $ac_val in
3051	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3052	esac
3053	$as_echo "$ac_var='\''$ac_val'\''"
3054      done | sort
3055      echo
3056    fi
3057
3058    if test -s confdefs.h; then
3059      $as_echo "## ----------- ##
3060## confdefs.h. ##
3061## ----------- ##"
3062      echo
3063      cat confdefs.h
3064      echo
3065    fi
3066    test "$ac_signal" != 0 &&
3067      $as_echo "$as_me: caught signal $ac_signal"
3068    $as_echo "$as_me: exit $exit_status"
3069  } >&5
3070  rm -f core *.core core.conftest.* &&
3071    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3072    exit $exit_status
3073' 0
3074for ac_signal in 1 2 13 15; do
3075  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3076done
3077ac_signal=0
3078
3079# confdefs.h avoids OS command line length limits that DEFS can exceed.
3080rm -f -r conftest* confdefs.h
3081
3082$as_echo "/* confdefs.h */" > confdefs.h
3083
3084# Predefined preprocessor variables.
3085
3086cat >>confdefs.h <<_ACEOF
3087#define PACKAGE_NAME "$PACKAGE_NAME"
3088_ACEOF
3089
3090cat >>confdefs.h <<_ACEOF
3091#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3092_ACEOF
3093
3094cat >>confdefs.h <<_ACEOF
3095#define PACKAGE_VERSION "$PACKAGE_VERSION"
3096_ACEOF
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_STRING "$PACKAGE_STRING"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_URL "$PACKAGE_URL"
3108_ACEOF
3109
3110
3111# Let the site file select an alternate cache file if it wants to.
3112# Prefer an explicitly selected file to automatically selected ones.
3113ac_site_file1=NONE
3114ac_site_file2=NONE
3115if test -n "$CONFIG_SITE"; then
3116  # We do not want a PATH search for config.site.
3117  case $CONFIG_SITE in #((
3118    -*)  ac_site_file1=./$CONFIG_SITE;;
3119    */*) ac_site_file1=$CONFIG_SITE;;
3120    *)   ac_site_file1=./$CONFIG_SITE;;
3121  esac
3122elif test "x$prefix" != xNONE; then
3123  ac_site_file1=$prefix/share/config.site
3124  ac_site_file2=$prefix/etc/config.site
3125else
3126  ac_site_file1=$ac_default_prefix/share/config.site
3127  ac_site_file2=$ac_default_prefix/etc/config.site
3128fi
3129for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3130do
3131  test "x$ac_site_file" = xNONE && continue
3132  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3133    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3134$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3135    sed 's/^/| /' "$ac_site_file" >&5
3136    . "$ac_site_file" \
3137      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3139as_fn_error $? "failed to load site script $ac_site_file
3140See \`config.log' for more details" "$LINENO" 5; }
3141  fi
3142done
3143
3144if test -r "$cache_file"; then
3145  # Some versions of bash will fail to source /dev/null (special files
3146  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3147  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3148    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3149$as_echo "$as_me: loading cache $cache_file" >&6;}
3150    case $cache_file in
3151      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3152      *)                      . "./$cache_file";;
3153    esac
3154  fi
3155else
3156  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3157$as_echo "$as_me: creating cache $cache_file" >&6;}
3158  >$cache_file
3159fi
3160
3161# Check that the precious variables saved in the cache have kept the same
3162# value.
3163ac_cache_corrupted=false
3164for ac_var in $ac_precious_vars; do
3165  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3166  eval ac_new_set=\$ac_env_${ac_var}_set
3167  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3168  eval ac_new_val=\$ac_env_${ac_var}_value
3169  case $ac_old_set,$ac_new_set in
3170    set,)
3171      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3172$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3173      ac_cache_corrupted=: ;;
3174    ,set)
3175      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3176$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3177      ac_cache_corrupted=: ;;
3178    ,);;
3179    *)
3180      if test "x$ac_old_val" != "x$ac_new_val"; then
3181	# differences in whitespace do not lead to failure.
3182	ac_old_val_w=`echo x $ac_old_val`
3183	ac_new_val_w=`echo x $ac_new_val`
3184	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3185	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3186$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3187	  ac_cache_corrupted=:
3188	else
3189	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3190$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3191	  eval $ac_var=\$ac_old_val
3192	fi
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3194$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3195	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3196$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3197      fi;;
3198  esac
3199  # Pass precious variables to config.status.
3200  if test "$ac_new_set" = set; then
3201    case $ac_new_val in
3202    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3203    *) ac_arg=$ac_var=$ac_new_val ;;
3204    esac
3205    case " $ac_configure_args " in
3206      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3207      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3208    esac
3209  fi
3210done
3211if $ac_cache_corrupted; then
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3214  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3215$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3216  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3217fi
3218## -------------------- ##
3219## Main body of script. ##
3220## -------------------- ##
3221
3222ac_ext=c
3223ac_cpp='$CPP $CPPFLAGS'
3224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226ac_compiler_gnu=$ac_cv_c_compiler_gnu
3227
3228
3229
3230ac_aux_dir=
3231for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3232  if test -f "$ac_dir/install-sh"; then
3233    ac_aux_dir=$ac_dir
3234    ac_install_sh="$ac_aux_dir/install-sh -c"
3235    break
3236  elif test -f "$ac_dir/install.sh"; then
3237    ac_aux_dir=$ac_dir
3238    ac_install_sh="$ac_aux_dir/install.sh -c"
3239    break
3240  elif test -f "$ac_dir/shtool"; then
3241    ac_aux_dir=$ac_dir
3242    ac_install_sh="$ac_aux_dir/shtool install -c"
3243    break
3244  fi
3245done
3246if test -z "$ac_aux_dir"; then
3247  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
3248fi
3249
3250# These three variables are undocumented and unsupported,
3251# and are intended to be withdrawn in a future Autoconf release.
3252# They can cause serious problems if a builder's source tree is in a directory
3253# whose full name contains unusual characters.
3254ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3255ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3256ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3257
3258
3259# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3260
3261#
3262# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286#
3287# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3288#
3289# This program is free software; you can redistribute it and/or modify
3290# it under the terms of the GNU General Public License as published by
3291# the Free Software Foundation; either version 2 of the License, or
3292# (at your option) any later version.
3293#
3294# This program is distributed in the hope that it will be useful, but
3295# WITHOUT ANY WARRANTY; without even the implied warranty of
3296# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3297# General Public License for more details.
3298#
3299# You should have received a copy of the GNU General Public License
3300# along with this program; if not, write to the Free Software
3301# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3302#
3303# As a special exception to the GNU General Public License, if you
3304# distribute this file as part of a program that contains a
3305# configuration script generated by Autoconf, you may include it under
3306# the same distribution terms that you use for the rest of that program.
3307
3308# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3309# ----------------------------------
3310# PKG_PROG_PKG_CONFIG
3311
3312# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3313#
3314# Check to see whether a particular set of modules exists.  Similar
3315# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3316#
3317#
3318# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3319# this or PKG_CHECK_MODULES is called, or make sure to call
3320# PKG_CHECK_EXISTS manually
3321# --------------------------------------------------------------
3322
3323
3324
3325# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3326# ---------------------------------------------
3327# _PKG_CONFIG
3328
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330# -----------------------------
3331# _PKG_SHORT_ERRORS_SUPPORTED
3332
3333
3334# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3335# [ACTION-IF-NOT-FOUND])
3336#
3337#
3338# Note that if there is a possibility the first call to
3339# PKG_CHECK_MODULES might not happen, you should be sure to include an
3340# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3341#
3342#
3343# --------------------------------------------------------------
3344# PKG_CHECK_MODULES
3345
3346
3347# Include these first...
3348#
3349# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3350# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3351#
3352# This code is free software; you can redistribute it and/or modify it
3353# under the terms of the GNU General Public License version 2 only, as
3354# published by the Free Software Foundation.  Oracle designates this
3355# particular file as subject to the "Classpath" exception as provided
3356# by Oracle in the LICENSE file that accompanied this code.
3357#
3358# This code is distributed in the hope that it will be useful, but WITHOUT
3359# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3360# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3361# version 2 for more details (a copy is included in the LICENSE file that
3362# accompanied this code).
3363#
3364# You should have received a copy of the GNU General Public License version
3365# 2 along with this work; if not, write to the Free Software Foundation,
3366# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3367#
3368# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3369# or visit www.oracle.com if you need additional information or have any
3370# questions.
3371#
3372
3373# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3374# If so, then append $1 to $2 \
3375# Also set JVM_ARG_OK to true/false depending on outcome.
3376
3377
3378# Appends a string to a path variable, only adding the : when needed.
3379
3380
3381# Prepends a string to a path variable, only adding the : when needed.
3382
3383
3384# This will make sure the given variable points to a full and proper
3385# path. This means:
3386# 1) There will be no spaces in the path. On unix platforms,
3387#    spaces in the path will result in an error. On Windows,
3388#    the path will be rewritten using short-style to be space-free.
3389# 2) The path will be absolute, and it will be in unix-style (on
3390#     cygwin).
3391# $1: The name of the variable to fix
3392
3393
3394# This will make sure the given variable points to a executable
3395# with a full and proper path. This means:
3396# 1) There will be no spaces in the path. On unix platforms,
3397#    spaces in the path will result in an error. On Windows,
3398#    the path will be rewritten using short-style to be space-free.
3399# 2) The path will be absolute, and it will be in unix-style (on
3400#     cygwin).
3401# Any arguments given to the executable is preserved.
3402# If the input variable does not have a directory specification, then
3403# it need to be in the PATH.
3404# $1: The name of the variable to fix
3405
3406
3407
3408
3409# Register a --with argument but mark it as deprecated
3410# $1: The name of the with argument to deprecate, not including --with-
3411
3412
3413# Register a --enable argument but mark it as deprecated
3414# $1: The name of the with argument to deprecate, not including --enable-
3415# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3416
3417
3418
3419
3420# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3421# $1: variable to check
3422
3423
3424# Check that there are no unprocessed overridden variables left.
3425# If so, they are an incorrect argument and we will exit with an error.
3426
3427
3428# Setup a tool for the given variable. If correctly specified by the user,
3429# use that value, otherwise search for the tool using the supplied code snippet.
3430# $1: variable to set
3431# $2: code snippet to call to look for the tool
3432
3433
3434# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3435# $1: variable to set
3436# $2: executable name (or list of names) to look for
3437
3438
3439# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3440# $1: variable to set
3441# $2: executable name (or list of names) to look for
3442
3443
3444# Like BASIC_PATH_PROGS but fails if no tool was found.
3445# $1: variable to set
3446# $2: executable name (or list of names) to look for
3447
3448
3449# Like BASIC_SETUP_TOOL but fails if no tool was found.
3450# $1: variable to set
3451# $2: autoconf macro to call to look for the special tool
3452
3453
3454# Setup the most fundamental tools that relies on not much else to set up,
3455# but is used by much of the early bootstrap code.
3456
3457
3458# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3459
3460
3461# Evaluates platform specific overrides for devkit variables.
3462# $1: Name of variable
3463
3464
3465
3466
3467
3468
3469#%%% Simple tools %%%
3470
3471# Check if we have found a usable version of make
3472# $1: the path to a potential make binary (or empty)
3473# $2: the description on how we found this
3474
3475
3476
3477
3478# Goes looking for a usable version of GNU make.
3479
3480
3481
3482
3483
3484
3485# Check if build directory is on local disk. If not possible to determine,
3486# we prefer to claim it's local.
3487# Argument 1: directory to test
3488# Argument 2: what to do if it is on local disk
3489# Argument 3: what to do otherwise (remote disk or failure)
3490
3491
3492# Check that source files have basic read permissions set. This might
3493# not be the case in cygwin in certain conditions.
3494
3495
3496
3497
3498# Check for support for specific options in bash
3499
3500
3501# Code to run after AC_OUTPUT
3502
3503
3504#
3505# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3507#
3508# This code is free software; you can redistribute it and/or modify it
3509# under the terms of the GNU General Public License version 2 only, as
3510# published by the Free Software Foundation.  Oracle designates this
3511# particular file as subject to the "Classpath" exception as provided
3512# by Oracle in the LICENSE file that accompanied this code.
3513#
3514# This code is distributed in the hope that it will be useful, but WITHOUT
3515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3517# version 2 for more details (a copy is included in the LICENSE file that
3518# accompanied this code).
3519#
3520# You should have received a copy of the GNU General Public License version
3521# 2 along with this work; if not, write to the Free Software Foundation,
3522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3523#
3524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3525# or visit www.oracle.com if you need additional information or have any
3526# questions.
3527#
3528
3529
3530
3531
3532
3533# Helper function which possibly converts a path using DOS-style short mode.
3534# If so, the updated path is stored in $new_path.
3535# $1: The path to check
3536
3537
3538# Helper function which possibly converts a path using DOS-style short mode.
3539# If so, the updated path is stored in $new_path.
3540# $1: The path to check
3541
3542
3543# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3544# and could probably be heavily simplified. However, all changes in this
3545# area tend to need lot of testing in different scenarios, and in lack of
3546# proper unit testing, cleaning this up has not been deemed worth the effort
3547# at the moment.
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3558
3559
3560
3561
3562#
3563# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3565#
3566# This code is free software; you can redistribute it and/or modify it
3567# under the terms of the GNU General Public License version 2 only, as
3568# published by the Free Software Foundation.  Oracle designates this
3569# particular file as subject to the "Classpath" exception as provided
3570# by Oracle in the LICENSE file that accompanied this code.
3571#
3572# This code is distributed in the hope that it will be useful, but WITHOUT
3573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3575# version 2 for more details (a copy is included in the LICENSE file that
3576# accompanied this code).
3577#
3578# You should have received a copy of the GNU General Public License version
3579# 2 along with this work; if not, write to the Free Software Foundation,
3580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3581#
3582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3583# or visit www.oracle.com if you need additional information or have any
3584# questions.
3585#
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597# ... then the rest
3598#
3599# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3600# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601#
3602# This code is free software; you can redistribute it and/or modify it
3603# under the terms of the GNU General Public License version 2 only, as
3604# published by the Free Software Foundation.  Oracle designates this
3605# particular file as subject to the "Classpath" exception as provided
3606# by Oracle in the LICENSE file that accompanied this code.
3607#
3608# This code is distributed in the hope that it will be useful, but WITHOUT
3609# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611# version 2 for more details (a copy is included in the LICENSE file that
3612# accompanied this code).
3613#
3614# You should have received a copy of the GNU General Public License version
3615# 2 along with this work; if not, write to the Free Software Foundation,
3616# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617#
3618# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619# or visit www.oracle.com if you need additional information or have any
3620# questions.
3621#
3622
3623########################################################################
3624# This file handles detection of the Boot JDK. The Boot JDK detection
3625# process has been developed as a response to solve a complex real-world
3626# problem. Initially, it was simple, but it has grown as platform after
3627# platform, idiosyncracy after idiosyncracy has been supported.
3628#
3629# The basic idea is this:
3630# 1) You need an acceptable *) JDK to use as a Boot JDK
3631# 2) There are several ways to locate a JDK, that are mostly platform
3632#    dependent **)
3633# 3) You can have multiple JDKs installed
3634# 4) If possible, configure should try to dig out an acceptable JDK
3635#    automatically, without having to resort to command-line options
3636#
3637# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3638#     javac) and not a JRE, etc.
3639#
3640# **) On Windows we typically use a well-known path.
3641#     On MacOSX we typically use the tool java_home.
3642#     On Linux we typically find javac in the $PATH, and then follow a
3643#     chain of symlinks that often ends up in a real JDK.
3644#
3645# This leads to the code where we check in different ways to locate a
3646# JDK, and if one is found, check if it is acceptable. If not, we print
3647# our reasons for rejecting it (useful when debugging non-working
3648# configure situations) and continue checking the next one.
3649########################################################################
3650
3651# Execute the check given as argument, and verify the result
3652# If the Boot JDK was previously found, do nothing
3653# $1 A command line (typically autoconf macro) to execute
3654
3655
3656# Test: Is bootjdk explicitely set by command line arguments?
3657
3658
3659# Test: Is bootjdk available from builddeps?
3660
3661
3662# Test: Is $JAVA_HOME set?
3663
3664
3665# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3666
3667
3668# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3669# $1: Argument to the java_home binary (optional)
3670
3671
3672# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3673
3674
3675# Look for a jdk in the given path. If there are multiple, try to select the newest.
3676# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3677# $1 = Path to directory containing jdk installations.
3678# $2 = String to append to the found JDK directory to get the proper JDK home
3679
3680
3681# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3682# environmental variable as base for where to look.
3683# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3684
3685
3686# Test: Is there a JDK installed in default, well-known locations?
3687
3688
3689# Check that a command-line tool in the Boot JDK is correct
3690# $1 = name of variable to assign
3691# $2 = name of binary
3692
3693
3694###############################################################################
3695#
3696# We need a Boot JDK to bootstrap the build.
3697#
3698
3699
3700
3701
3702
3703#
3704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3706#
3707# This code is free software; you can redistribute it and/or modify it
3708# under the terms of the GNU General Public License version 2 only, as
3709# published by the Free Software Foundation.  Oracle designates this
3710# particular file as subject to the "Classpath" exception as provided
3711# by Oracle in the LICENSE file that accompanied this code.
3712#
3713# This code is distributed in the hope that it will be useful, but WITHOUT
3714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3716# version 2 for more details (a copy is included in the LICENSE file that
3717# accompanied this code).
3718#
3719# You should have received a copy of the GNU General Public License version
3720# 2 along with this work; if not, write to the Free Software Foundation,
3721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3722#
3723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3724# or visit www.oracle.com if you need additional information or have any
3725# questions.
3726#
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747#
3748# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776# Documentation on common flags used for solstudio in HIGHEST.
3777#
3778# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3779#          done with care, there are some assumptions below that need to
3780#          be understood about the use of pointers, and IEEE behavior.
3781#
3782# -fns: Use non-standard floating point mode (not IEEE 754)
3783# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3784# -fsingle: Use single precision floating point with 'float'
3785# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3786#   (Source with excessing pointer casting and data access with mixed
3787#    pointer types are not recommended)
3788# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3789#   (If you expect perfect errno behavior, do not use this)
3790# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3791# -xrestrict: Pointer parameters to functions do not overlap
3792#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3793#    If you pass in multiple pointers to the same data, do not use this)
3794# -xlibmil: Inline some library routines
3795#   (If you expect perfect errno behavior, do not use this)
3796# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3797#   (If you expect perfect errno behavior, do not use this)
3798#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3799
3800    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3801    # Bug?
3802    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3803    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3804    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3805    #fi
3806
3807
3808
3809
3810
3811# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3812#                                   [RUN-IF-FALSE])
3813# ------------------------------------------------------------
3814# Check that the c and c++ compilers support an argument
3815
3816
3817# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3818#                                    [RUN-IF-FALSE])
3819# ------------------------------------------------------------
3820# Check that the linker support an argument
3821
3822
3823
3824
3825#
3826# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3827# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3828#
3829# This code is free software; you can redistribute it and/or modify it
3830# under the terms of the GNU General Public License version 2 only, as
3831# published by the Free Software Foundation.  Oracle designates this
3832# particular file as subject to the "Classpath" exception as provided
3833# by Oracle in the LICENSE file that accompanied this code.
3834#
3835# This code is distributed in the hope that it will be useful, but WITHOUT
3836# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3837# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3838# version 2 for more details (a copy is included in the LICENSE file that
3839# accompanied this code).
3840#
3841# You should have received a copy of the GNU General Public License version
3842# 2 along with this work; if not, write to the Free Software Foundation,
3843# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3844#
3845# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3846# or visit www.oracle.com if you need additional information or have any
3847# questions.
3848#
3849
3850
3851
3852
3853
3854cygwin_help() {
3855  case $1 in
3856    unzip)
3857      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3858      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3859      ;;
3860    zip)
3861      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3862      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3863      ;;
3864    make)
3865      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3867      ;;
3868    freetype)
3869      HELP_MSG="
3870The freetype library can now be build during the configure process.
3871Download the freetype sources and unpack them into an arbitrary directory:
3872
3873wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3874tar -xzf freetype-2.5.3.tar.gz
3875
3876Then run configure with '--with-freetype-src=<freetype_src>'. This will
3877automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3878builds or into '<freetype_src>/lib32' for 32-bit builds.
3879Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3880and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3881      ;;
3882  esac
3883}
3884
3885msys_help() {
3886  PKGHANDLER_COMMAND=""
3887}
3888
3889apt_help() {
3890  case $1 in
3891    devkit)
3892      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3893    openjdk)
3894      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3895    alsa)
3896      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3897    cups)
3898      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3899    freetype)
3900      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3901    pulse)
3902      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3903    x11)
3904      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3905    ccache)
3906      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3907  esac
3908}
3909
3910yum_help() {
3911  case $1 in
3912    devkit)
3913      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3914    openjdk)
3915      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3916    alsa)
3917      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3918    cups)
3919      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3920    freetype)
3921      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3922    pulse)
3923      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3924    x11)
3925      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3926    ccache)
3927      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3928  esac
3929}
3930
3931port_help() {
3932  PKGHANDLER_COMMAND=""
3933}
3934
3935pkgutil_help() {
3936  PKGHANDLER_COMMAND=""
3937}
3938
3939pkgadd_help() {
3940  PKGHANDLER_COMMAND=""
3941}
3942
3943# This function will check if we're called from the "configure" wrapper while
3944# printing --help. If so, we will print out additional information that can
3945# only be extracted within the autoconf script, and then exit. This must be
3946# called at the very beginning in configure.ac.
3947
3948
3949
3950
3951
3952
3953#
3954# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3956#
3957# This code is free software; you can redistribute it and/or modify it
3958# under the terms of the GNU General Public License version 2 only, as
3959# published by the Free Software Foundation.  Oracle designates this
3960# particular file as subject to the "Classpath" exception as provided
3961# by Oracle in the LICENSE file that accompanied this code.
3962#
3963# This code is distributed in the hope that it will be useful, but WITHOUT
3964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3966# version 2 for more details (a copy is included in the LICENSE file that
3967# accompanied this code).
3968#
3969# You should have received a copy of the GNU General Public License version
3970# 2 along with this work; if not, write to the Free Software Foundation,
3971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3972#
3973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3974# or visit www.oracle.com if you need additional information or have any
3975# questions.
3976#
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987###############################################################################
3988#
3989# Should we build only OpenJDK even if closed sources are present?
3990#
3991
3992
3993
3994
3995###############################################################################
3996#
3997# Setup version numbers
3998#
3999
4000
4001
4002
4003
4004
4005################################################################################
4006#
4007# Gcov coverage data for hotspot
4008#
4009
4010
4011#
4012# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4013# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4014#
4015# This code is free software; you can redistribute it and/or modify it
4016# under the terms of the GNU General Public License version 2 only, as
4017# published by the Free Software Foundation.  Oracle designates this
4018# particular file as subject to the "Classpath" exception as provided
4019# by Oracle in the LICENSE file that accompanied this code.
4020#
4021# This code is distributed in the hope that it will be useful, but WITHOUT
4022# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4023# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4024# version 2 for more details (a copy is included in the LICENSE file that
4025# accompanied this code).
4026#
4027# You should have received a copy of the GNU General Public License version
4028# 2 along with this work; if not, write to the Free Software Foundation,
4029# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4030#
4031# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4032# or visit www.oracle.com if you need additional information or have any
4033# questions.
4034#
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056#
4057# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4058# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4059#
4060# This code is free software; you can redistribute it and/or modify it
4061# under the terms of the GNU General Public License version 2 only, as
4062# published by the Free Software Foundation.  Oracle designates this
4063# particular file as subject to the "Classpath" exception as provided
4064# by Oracle in the LICENSE file that accompanied this code.
4065#
4066# This code is distributed in the hope that it will be useful, but WITHOUT
4067# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4068# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4069# version 2 for more details (a copy is included in the LICENSE file that
4070# accompanied this code).
4071#
4072# You should have received a copy of the GNU General Public License version
4073# 2 along with this work; if not, write to the Free Software Foundation,
4074# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4075#
4076# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4077# or visit www.oracle.com if you need additional information or have any
4078# questions.
4079#
4080
4081# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082# Converts autoconf style CPU name to OpenJDK style, into
4083# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4084
4085
4086# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4087# Converts autoconf style OS name to OpenJDK style, into
4088# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4089
4090
4091# Expects $host_os $host_cpu $build_os and $build_cpu
4092# and $with_target_bits to have been setup!
4093#
4094# Translate the standard triplet(quadruplet) definition
4095# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4096# OPENJDK_BUILD_OS, etc.
4097
4098
4099# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4100# accordingly. Must be done after setting up build and target system, but before
4101# doing anything else with these values.
4102
4103
4104# Setup the legacy variables, for controlling the old makefiles.
4105#
4106
4107
4108
4109
4110#%%% Build and target systems %%%
4111
4112
4113
4114
4115# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4116# Add -mX to various FLAGS variables.
4117
4118
4119
4120
4121
4122
4123#
4124# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4125# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4126#
4127# This code is free software; you can redistribute it and/or modify it
4128# under the terms of the GNU General Public License version 2 only, as
4129# published by the Free Software Foundation.  Oracle designates this
4130# particular file as subject to the "Classpath" exception as provided
4131# by Oracle in the LICENSE file that accompanied this code.
4132#
4133# This code is distributed in the hope that it will be useful, but WITHOUT
4134# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4135# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4136# version 2 for more details (a copy is included in the LICENSE file that
4137# accompanied this code).
4138#
4139# You should have received a copy of the GNU General Public License version
4140# 2 along with this work; if not, write to the Free Software Foundation,
4141# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4142#
4143# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4144# or visit www.oracle.com if you need additional information or have any
4145# questions.
4146#
4147
4148
4149
4150
4151
4152
4153
4154
4155#
4156# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4157# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4158#
4159# This code is free software; you can redistribute it and/or modify it
4160# under the terms of the GNU General Public License version 2 only, as
4161# published by the Free Software Foundation.  Oracle designates this
4162# particular file as subject to the "Classpath" exception as provided
4163# by Oracle in the LICENSE file that accompanied this code.
4164#
4165# This code is distributed in the hope that it will be useful, but WITHOUT
4166# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4167# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4168# version 2 for more details (a copy is included in the LICENSE file that
4169# accompanied this code).
4170#
4171# You should have received a copy of the GNU General Public License version
4172# 2 along with this work; if not, write to the Free Software Foundation,
4173# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4174#
4175# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4176# or visit www.oracle.com if you need additional information or have any
4177# questions.
4178#
4179
4180########################################################################
4181# This file is responsible for detecting, verifying and setting up the
4182# toolchain, i.e. the compiler, linker and related utilities. It will setup
4183# proper paths to the binaries, but it will not setup any flags.
4184#
4185# The binaries used is determined by the toolchain type, which is the family of
4186# compilers and related tools that are used.
4187########################################################################
4188
4189
4190# All valid toolchains, regardless of platform (used by help.m4)
4191VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4192
4193# These toolchains are valid on different platforms
4194VALID_TOOLCHAINS_linux="gcc clang"
4195VALID_TOOLCHAINS_solaris="solstudio"
4196VALID_TOOLCHAINS_macosx="gcc clang"
4197VALID_TOOLCHAINS_aix="xlc"
4198VALID_TOOLCHAINS_windows="microsoft"
4199
4200# Toolchain descriptions
4201TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4202TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4203TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4204TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4205TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4206
4207# Setup a number of variables describing how native output files are
4208# named on this platform/toolchain.
4209
4210
4211# Determine which toolchain type to use, and make sure it is valid for this
4212# platform. Setup various information about the selected toolchain.
4213
4214
4215# Before we start detecting the toolchain executables, we might need some
4216# special setup, e.g. additional paths etc.
4217
4218
4219# Restore path, etc
4220
4221
4222# Check if a compiler is of the toolchain type we expect, and save the version
4223# information from it. If the compiler does not match the expected type,
4224# this function will abort using AC_MSG_ERROR. If it matches, the version will
4225# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4226# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4227#
4228# $1 = compiler to test (CC or CXX)
4229# $2 = human readable name of compiler (C or C++)
4230
4231
4232# Try to locate the given C or C++ compiler in the path, or otherwise.
4233#
4234# $1 = compiler to test (CC or CXX)
4235# $2 = human readable name of compiler (C or C++)
4236# $3 = list of compiler names to search for
4237
4238
4239# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4240# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4241# archiver (AR). Verify that the compilers are correct according to the
4242# toolchain type.
4243
4244
4245# Setup additional tools that is considered a part of the toolchain, but not the
4246# core part. Many of these are highly platform-specific and do not exist,
4247# and/or are not needed on all platforms.
4248
4249
4250# Setup the build tools (i.e, the compiler and linker used to build programs
4251# that should be run on the build platform, not the target platform, as a build
4252# helper). Since the non-cross-compile case uses the normal, target compilers
4253# for this, we can only do this after these have been setup.
4254
4255
4256# Setup legacy variables that are still needed as alternative ways to refer to
4257# parts of the toolchain.
4258
4259
4260# Do some additional checks on the detected tools.
4261
4262
4263# Setup the JTReg Regression Test Harness.
4264
4265
4266#
4267# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4268# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4269#
4270# This code is free software; you can redistribute it and/or modify it
4271# under the terms of the GNU General Public License version 2 only, as
4272# published by the Free Software Foundation.  Oracle designates this
4273# particular file as subject to the "Classpath" exception as provided
4274# by Oracle in the LICENSE file that accompanied this code.
4275#
4276# This code is distributed in the hope that it will be useful, but WITHOUT
4277# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4278# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4279# version 2 for more details (a copy is included in the LICENSE file that
4280# accompanied this code).
4281#
4282# You should have received a copy of the GNU General Public License version
4283# 2 along with this work; if not, write to the Free Software Foundation,
4284# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4285#
4286# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4287# or visit www.oracle.com if you need additional information or have any
4288# questions.
4289#
4290
4291################################################################################
4292# The order of these defines the priority by which we try to find them.
4293VALID_VS_VERSIONS="2013 2012 2010"
4294
4295VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4296VS_VERSION_INTERNAL_2010=100
4297VS_MSVCR_2010=msvcr100.dll
4298# We don't use msvcp on Visual Studio 2010
4299#VS_MSVCP_2010=msvcp100.dll
4300VS_ENVVAR_2010="VS100COMNTOOLS"
4301VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4302VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4303VS_VS_PLATFORM_NAME_2010="v100"
4304VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4305
4306VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4307VS_VERSION_INTERNAL_2012=110
4308VS_MSVCR_2012=msvcr110.dll
4309VS_MSVCP_2012=msvcp110.dll
4310VS_ENVVAR_2012="VS110COMNTOOLS"
4311VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4312VS_SDK_INSTALLDIR_2012=
4313VS_VS_PLATFORM_NAME_2012="v110"
4314VS_SDK_PLATFORM_NAME_2012=
4315
4316VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4317VS_VERSION_INTERNAL_2013=120
4318VS_MSVCR_2013=msvcr120.dll
4319VS_MSVCP_2013=msvcp120.dll
4320VS_ENVVAR_2013="VS120COMNTOOLS"
4321VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4322VS_SDK_INSTALLDIR_2013=
4323VS_VS_PLATFORM_NAME_2013="v120"
4324VS_SDK_PLATFORM_NAME_2013=
4325
4326################################################################################
4327
4328
4329
4330################################################################################
4331
4332
4333
4334################################################################################
4335# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4336# build environment and assigns it to VS_ENV_CMD
4337
4338
4339################################################################################
4340
4341
4342
4343################################################################################
4344# Check if the VS env variables were setup prior to running configure.
4345# If not, then find vcvarsall.bat and run it automatically, and integrate
4346# the set env variables into the spec file.
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361# This line needs to be here, verbatim, after all includes and the dummy hook
4362# definitions. It is replaced with custom functionality when building
4363# custom sources.
4364#CUSTOM_AUTOCONF_INCLUDE
4365
4366# Do not change or remove the following line, it is needed for consistency checks:
4367DATE_WHEN_GENERATED=1441958217
4368
4369###############################################################################
4370#
4371# Initialization / Boot-strapping
4372#
4373# The bootstrapping process needs to solve the "chicken or the egg" problem,
4374# thus it jumps back and forth, each time gaining something needed later on.
4375#
4376###############################################################################
4377
4378# If we are requested to print additional help, do that and then exit.
4379# This must be the very first call.
4380
4381  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4382    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4383    $PRINTF "Which are valid to use depends on the build platform.\n"
4384    for toolchain in $VALID_TOOLCHAINS_all; do
4385      # Use indirect variable referencing
4386      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4387      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4388      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4389    done
4390
4391    # And now exit directly
4392    exit 0
4393  fi
4394
4395
4396# Basic initialization that must happen first of all in the normal process.
4397
4398  # Save the original command line. This is passed to us by the wrapper configure script.
4399
4400  # Save the path variable before it gets changed
4401  ORIGINAL_PATH="$PATH"
4402
4403  DATE_WHEN_CONFIGURED=`LANG=C date`
4404
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4406$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4408$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4409
4410
4411  # Start with tools that do not need have cross compilation support
4412  # and can be expected to be found in the default PATH. These tools are
4413  # used by configure. Nor are these tools expected to be found in the
4414  # devkit from the builddeps server either, since they are
4415  # needed to download the devkit.
4416
4417  # First are all the simple required tools.
4418
4419
4420
4421  # Publish this variable in the help.
4422
4423
4424  if test "x$BASENAME" = x; then
4425    # The variable is not set by user, try to locate tool using the code snippet
4426    for ac_prog in basename
4427do
4428  # Extract the first word of "$ac_prog", so it can be a program name with args.
4429set dummy $ac_prog; ac_word=$2
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4431$as_echo_n "checking for $ac_word... " >&6; }
4432if ${ac_cv_path_BASENAME+:} false; then :
4433  $as_echo_n "(cached) " >&6
4434else
4435  case $BASENAME in
4436  [\\/]* | ?:[\\/]*)
4437  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4438  ;;
4439  *)
4440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441for as_dir in $PATH
4442do
4443  IFS=$as_save_IFS
4444  test -z "$as_dir" && as_dir=.
4445    for ac_exec_ext in '' $ac_executable_extensions; do
4446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4447    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4449    break 2
4450  fi
4451done
4452  done
4453IFS=$as_save_IFS
4454
4455  ;;
4456esac
4457fi
4458BASENAME=$ac_cv_path_BASENAME
4459if test -n "$BASENAME"; then
4460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4461$as_echo "$BASENAME" >&6; }
4462else
4463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4464$as_echo "no" >&6; }
4465fi
4466
4467
4468  test -n "$BASENAME" && break
4469done
4470
4471  else
4472    # The variable is set, but is it from the command line or the environment?
4473
4474    # Try to remove the string !BASENAME! from our list.
4475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4477      # If it failed, the variable was not from the command line. Ignore it,
4478      # but warn the user (except for BASH, which is always set by the calling BASH).
4479      if test "xBASENAME" != xBASH; then
4480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4481$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4482      fi
4483      # Try to locate tool using the code snippet
4484      for ac_prog in basename
4485do
4486  # Extract the first word of "$ac_prog", so it can be a program name with args.
4487set dummy $ac_prog; ac_word=$2
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
4490if ${ac_cv_path_BASENAME+:} false; then :
4491  $as_echo_n "(cached) " >&6
4492else
4493  case $BASENAME in
4494  [\\/]* | ?:[\\/]*)
4495  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4496  ;;
4497  *)
4498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in $PATH
4500do
4501  IFS=$as_save_IFS
4502  test -z "$as_dir" && as_dir=.
4503    for ac_exec_ext in '' $ac_executable_extensions; do
4504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4505    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507    break 2
4508  fi
4509done
4510  done
4511IFS=$as_save_IFS
4512
4513  ;;
4514esac
4515fi
4516BASENAME=$ac_cv_path_BASENAME
4517if test -n "$BASENAME"; then
4518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4519$as_echo "$BASENAME" >&6; }
4520else
4521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525
4526  test -n "$BASENAME" && break
4527done
4528
4529    else
4530      # If it succeeded, then it was overridden by the user. We will use it
4531      # for the tool.
4532
4533      # First remove it from the list of overridden variables, so we can test
4534      # for unknown variables in the end.
4535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4536
4537      # Check if the provided tool contains a complete path.
4538      tool_specified="$BASENAME"
4539      tool_basename="${tool_specified##*/}"
4540      if test "x$tool_basename" = "x$tool_specified"; then
4541        # A command without a complete path is provided, search $PATH.
4542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4543$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4544        # Extract the first word of "$tool_basename", so it can be a program name with args.
4545set dummy $tool_basename; ac_word=$2
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4547$as_echo_n "checking for $ac_word... " >&6; }
4548if ${ac_cv_path_BASENAME+:} false; then :
4549  $as_echo_n "(cached) " >&6
4550else
4551  case $BASENAME in
4552  [\\/]* | ?:[\\/]*)
4553  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4554  ;;
4555  *)
4556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4557for as_dir in $PATH
4558do
4559  IFS=$as_save_IFS
4560  test -z "$as_dir" && as_dir=.
4561    for ac_exec_ext in '' $ac_executable_extensions; do
4562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4563    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4565    break 2
4566  fi
4567done
4568  done
4569IFS=$as_save_IFS
4570
4571  ;;
4572esac
4573fi
4574BASENAME=$ac_cv_path_BASENAME
4575if test -n "$BASENAME"; then
4576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4577$as_echo "$BASENAME" >&6; }
4578else
4579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580$as_echo "no" >&6; }
4581fi
4582
4583
4584        if test "x$BASENAME" = x; then
4585          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4586        fi
4587      else
4588        # Otherwise we believe it is a complete path. Use it as it is.
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4590$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4592$as_echo_n "checking for BASENAME... " >&6; }
4593        if test ! -x "$tool_specified"; then
4594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4595$as_echo "not found" >&6; }
4596          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4597        fi
4598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4599$as_echo "$tool_specified" >&6; }
4600      fi
4601    fi
4602  fi
4603
4604
4605
4606  if test "x$BASENAME" = x; then
4607    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4608  fi
4609
4610
4611
4612
4613
4614  # Publish this variable in the help.
4615
4616
4617  if test "x$BASH" = x; then
4618    # The variable is not set by user, try to locate tool using the code snippet
4619    for ac_prog in bash
4620do
4621  # Extract the first word of "$ac_prog", so it can be a program name with args.
4622set dummy $ac_prog; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_BASH+:} false; then :
4626  $as_echo_n "(cached) " >&6
4627else
4628  case $BASH in
4629  [\\/]* | ?:[\\/]*)
4630  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4631  ;;
4632  *)
4633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in $PATH
4635do
4636  IFS=$as_save_IFS
4637  test -z "$as_dir" && as_dir=.
4638    for ac_exec_ext in '' $ac_executable_extensions; do
4639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4640    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642    break 2
4643  fi
4644done
4645  done
4646IFS=$as_save_IFS
4647
4648  ;;
4649esac
4650fi
4651BASH=$ac_cv_path_BASH
4652if test -n "$BASH"; then
4653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4654$as_echo "$BASH" >&6; }
4655else
4656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661  test -n "$BASH" && break
4662done
4663
4664  else
4665    # The variable is set, but is it from the command line or the environment?
4666
4667    # Try to remove the string !BASH! from our list.
4668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4670      # If it failed, the variable was not from the command line. Ignore it,
4671      # but warn the user (except for BASH, which is always set by the calling BASH).
4672      if test "xBASH" != xBASH; then
4673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4674$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4675      fi
4676      # Try to locate tool using the code snippet
4677      for ac_prog in bash
4678do
4679  # Extract the first word of "$ac_prog", so it can be a program name with args.
4680set dummy $ac_prog; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_BASH+:} false; then :
4684  $as_echo_n "(cached) " >&6
4685else
4686  case $BASH in
4687  [\\/]* | ?:[\\/]*)
4688  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4689  ;;
4690  *)
4691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694  IFS=$as_save_IFS
4695  test -z "$as_dir" && as_dir=.
4696    for ac_exec_ext in '' $ac_executable_extensions; do
4697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4698    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700    break 2
4701  fi
4702done
4703  done
4704IFS=$as_save_IFS
4705
4706  ;;
4707esac
4708fi
4709BASH=$ac_cv_path_BASH
4710if test -n "$BASH"; then
4711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4712$as_echo "$BASH" >&6; }
4713else
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719  test -n "$BASH" && break
4720done
4721
4722    else
4723      # If it succeeded, then it was overridden by the user. We will use it
4724      # for the tool.
4725
4726      # First remove it from the list of overridden variables, so we can test
4727      # for unknown variables in the end.
4728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4729
4730      # Check if the provided tool contains a complete path.
4731      tool_specified="$BASH"
4732      tool_basename="${tool_specified##*/}"
4733      if test "x$tool_basename" = "x$tool_specified"; then
4734        # A command without a complete path is provided, search $PATH.
4735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4736$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4737        # Extract the first word of "$tool_basename", so it can be a program name with args.
4738set dummy $tool_basename; ac_word=$2
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
4741if ${ac_cv_path_BASH+:} false; then :
4742  $as_echo_n "(cached) " >&6
4743else
4744  case $BASH in
4745  [\\/]* | ?:[\\/]*)
4746  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4747  ;;
4748  *)
4749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in $PATH
4751do
4752  IFS=$as_save_IFS
4753  test -z "$as_dir" && as_dir=.
4754    for ac_exec_ext in '' $ac_executable_extensions; do
4755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4756    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4758    break 2
4759  fi
4760done
4761  done
4762IFS=$as_save_IFS
4763
4764  ;;
4765esac
4766fi
4767BASH=$ac_cv_path_BASH
4768if test -n "$BASH"; then
4769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4770$as_echo "$BASH" >&6; }
4771else
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776
4777        if test "x$BASH" = x; then
4778          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4779        fi
4780      else
4781        # Otherwise we believe it is a complete path. Use it as it is.
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4783$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4785$as_echo_n "checking for BASH... " >&6; }
4786        if test ! -x "$tool_specified"; then
4787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4788$as_echo "not found" >&6; }
4789          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4790        fi
4791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4792$as_echo "$tool_specified" >&6; }
4793      fi
4794    fi
4795  fi
4796
4797
4798
4799  if test "x$BASH" = x; then
4800    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4801  fi
4802
4803
4804
4805
4806
4807  # Publish this variable in the help.
4808
4809
4810  if test "x$CAT" = x; then
4811    # The variable is not set by user, try to locate tool using the code snippet
4812    for ac_prog in cat
4813do
4814  # Extract the first word of "$ac_prog", so it can be a program name with args.
4815set dummy $ac_prog; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if ${ac_cv_path_CAT+:} false; then :
4819  $as_echo_n "(cached) " >&6
4820else
4821  case $CAT in
4822  [\\/]* | ?:[\\/]*)
4823  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4824  ;;
4825  *)
4826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in $PATH
4828do
4829  IFS=$as_save_IFS
4830  test -z "$as_dir" && as_dir=.
4831    for ac_exec_ext in '' $ac_executable_extensions; do
4832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4833    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835    break 2
4836  fi
4837done
4838  done
4839IFS=$as_save_IFS
4840
4841  ;;
4842esac
4843fi
4844CAT=$ac_cv_path_CAT
4845if test -n "$CAT"; then
4846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4847$as_echo "$CAT" >&6; }
4848else
4849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
4851fi
4852
4853
4854  test -n "$CAT" && break
4855done
4856
4857  else
4858    # The variable is set, but is it from the command line or the environment?
4859
4860    # Try to remove the string !CAT! from our list.
4861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4863      # If it failed, the variable was not from the command line. Ignore it,
4864      # but warn the user (except for BASH, which is always set by the calling BASH).
4865      if test "xCAT" != xBASH; then
4866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4867$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4868      fi
4869      # Try to locate tool using the code snippet
4870      for ac_prog in cat
4871do
4872  # Extract the first word of "$ac_prog", so it can be a program name with args.
4873set dummy $ac_prog; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if ${ac_cv_path_CAT+:} false; then :
4877  $as_echo_n "(cached) " >&6
4878else
4879  case $CAT in
4880  [\\/]* | ?:[\\/]*)
4881  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4882  ;;
4883  *)
4884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in $PATH
4886do
4887  IFS=$as_save_IFS
4888  test -z "$as_dir" && as_dir=.
4889    for ac_exec_ext in '' $ac_executable_extensions; do
4890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4891    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893    break 2
4894  fi
4895done
4896  done
4897IFS=$as_save_IFS
4898
4899  ;;
4900esac
4901fi
4902CAT=$ac_cv_path_CAT
4903if test -n "$CAT"; then
4904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4905$as_echo "$CAT" >&6; }
4906else
4907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
4909fi
4910
4911
4912  test -n "$CAT" && break
4913done
4914
4915    else
4916      # If it succeeded, then it was overridden by the user. We will use it
4917      # for the tool.
4918
4919      # First remove it from the list of overridden variables, so we can test
4920      # for unknown variables in the end.
4921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4922
4923      # Check if the provided tool contains a complete path.
4924      tool_specified="$CAT"
4925      tool_basename="${tool_specified##*/}"
4926      if test "x$tool_basename" = "x$tool_specified"; then
4927        # A command without a complete path is provided, search $PATH.
4928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4929$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4930        # Extract the first word of "$tool_basename", so it can be a program name with args.
4931set dummy $tool_basename; ac_word=$2
4932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4933$as_echo_n "checking for $ac_word... " >&6; }
4934if ${ac_cv_path_CAT+:} false; then :
4935  $as_echo_n "(cached) " >&6
4936else
4937  case $CAT in
4938  [\\/]* | ?:[\\/]*)
4939  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4940  ;;
4941  *)
4942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in $PATH
4944do
4945  IFS=$as_save_IFS
4946  test -z "$as_dir" && as_dir=.
4947    for ac_exec_ext in '' $ac_executable_extensions; do
4948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4949    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4951    break 2
4952  fi
4953done
4954  done
4955IFS=$as_save_IFS
4956
4957  ;;
4958esac
4959fi
4960CAT=$ac_cv_path_CAT
4961if test -n "$CAT"; then
4962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4963$as_echo "$CAT" >&6; }
4964else
4965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
4967fi
4968
4969
4970        if test "x$CAT" = x; then
4971          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4972        fi
4973      else
4974        # Otherwise we believe it is a complete path. Use it as it is.
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4976$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4978$as_echo_n "checking for CAT... " >&6; }
4979        if test ! -x "$tool_specified"; then
4980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4981$as_echo "not found" >&6; }
4982          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4983        fi
4984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4985$as_echo "$tool_specified" >&6; }
4986      fi
4987    fi
4988  fi
4989
4990
4991
4992  if test "x$CAT" = x; then
4993    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4994  fi
4995
4996
4997
4998
4999
5000  # Publish this variable in the help.
5001
5002
5003  if test "x$CHMOD" = x; then
5004    # The variable is not set by user, try to locate tool using the code snippet
5005    for ac_prog in chmod
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if ${ac_cv_path_CHMOD+:} false; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $CHMOD in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5026    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037CHMOD=$ac_cv_path_CHMOD
5038if test -n "$CHMOD"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5040$as_echo "$CHMOD" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$CHMOD" && break
5048done
5049
5050  else
5051    # The variable is set, but is it from the command line or the environment?
5052
5053    # Try to remove the string !CHMOD! from our list.
5054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5056      # If it failed, the variable was not from the command line. Ignore it,
5057      # but warn the user (except for BASH, which is always set by the calling BASH).
5058      if test "xCHMOD" != xBASH; then
5059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5060$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5061      fi
5062      # Try to locate tool using the code snippet
5063      for ac_prog in chmod
5064do
5065  # Extract the first word of "$ac_prog", so it can be a program name with args.
5066set dummy $ac_prog; ac_word=$2
5067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
5069if ${ac_cv_path_CHMOD+:} false; then :
5070  $as_echo_n "(cached) " >&6
5071else
5072  case $CHMOD in
5073  [\\/]* | ?:[\\/]*)
5074  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5075  ;;
5076  *)
5077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080  IFS=$as_save_IFS
5081  test -z "$as_dir" && as_dir=.
5082    for ac_exec_ext in '' $ac_executable_extensions; do
5083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5084    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086    break 2
5087  fi
5088done
5089  done
5090IFS=$as_save_IFS
5091
5092  ;;
5093esac
5094fi
5095CHMOD=$ac_cv_path_CHMOD
5096if test -n "$CHMOD"; then
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5098$as_echo "$CHMOD" >&6; }
5099else
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
5102fi
5103
5104
5105  test -n "$CHMOD" && break
5106done
5107
5108    else
5109      # If it succeeded, then it was overridden by the user. We will use it
5110      # for the tool.
5111
5112      # First remove it from the list of overridden variables, so we can test
5113      # for unknown variables in the end.
5114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5115
5116      # Check if the provided tool contains a complete path.
5117      tool_specified="$CHMOD"
5118      tool_basename="${tool_specified##*/}"
5119      if test "x$tool_basename" = "x$tool_specified"; then
5120        # A command without a complete path is provided, search $PATH.
5121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5122$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5123        # Extract the first word of "$tool_basename", so it can be a program name with args.
5124set dummy $tool_basename; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_path_CHMOD+:} false; then :
5128  $as_echo_n "(cached) " >&6
5129else
5130  case $CHMOD in
5131  [\\/]* | ?:[\\/]*)
5132  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5133  ;;
5134  *)
5135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138  IFS=$as_save_IFS
5139  test -z "$as_dir" && as_dir=.
5140    for ac_exec_ext in '' $ac_executable_extensions; do
5141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5142    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144    break 2
5145  fi
5146done
5147  done
5148IFS=$as_save_IFS
5149
5150  ;;
5151esac
5152fi
5153CHMOD=$ac_cv_path_CHMOD
5154if test -n "$CHMOD"; then
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5156$as_echo "$CHMOD" >&6; }
5157else
5158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159$as_echo "no" >&6; }
5160fi
5161
5162
5163        if test "x$CHMOD" = x; then
5164          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5165        fi
5166      else
5167        # Otherwise we believe it is a complete path. Use it as it is.
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5169$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5171$as_echo_n "checking for CHMOD... " >&6; }
5172        if test ! -x "$tool_specified"; then
5173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5174$as_echo "not found" >&6; }
5175          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5176        fi
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5178$as_echo "$tool_specified" >&6; }
5179      fi
5180    fi
5181  fi
5182
5183
5184
5185  if test "x$CHMOD" = x; then
5186    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5187  fi
5188
5189
5190
5191
5192
5193  # Publish this variable in the help.
5194
5195
5196  if test "x$CMP" = x; then
5197    # The variable is not set by user, try to locate tool using the code snippet
5198    for ac_prog in cmp
5199do
5200  # Extract the first word of "$ac_prog", so it can be a program name with args.
5201set dummy $ac_prog; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if ${ac_cv_path_CMP+:} false; then :
5205  $as_echo_n "(cached) " >&6
5206else
5207  case $CMP in
5208  [\\/]* | ?:[\\/]*)
5209  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5210  ;;
5211  *)
5212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215  IFS=$as_save_IFS
5216  test -z "$as_dir" && as_dir=.
5217    for ac_exec_ext in '' $ac_executable_extensions; do
5218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5219    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221    break 2
5222  fi
5223done
5224  done
5225IFS=$as_save_IFS
5226
5227  ;;
5228esac
5229fi
5230CMP=$ac_cv_path_CMP
5231if test -n "$CMP"; then
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5233$as_echo "$CMP" >&6; }
5234else
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237fi
5238
5239
5240  test -n "$CMP" && break
5241done
5242
5243  else
5244    # The variable is set, but is it from the command line or the environment?
5245
5246    # Try to remove the string !CMP! from our list.
5247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5249      # If it failed, the variable was not from the command line. Ignore it,
5250      # but warn the user (except for BASH, which is always set by the calling BASH).
5251      if test "xCMP" != xBASH; then
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5253$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5254      fi
5255      # Try to locate tool using the code snippet
5256      for ac_prog in cmp
5257do
5258  # Extract the first word of "$ac_prog", so it can be a program name with args.
5259set dummy $ac_prog; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
5262if ${ac_cv_path_CMP+:} false; then :
5263  $as_echo_n "(cached) " >&6
5264else
5265  case $CMP in
5266  [\\/]* | ?:[\\/]*)
5267  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5268  ;;
5269  *)
5270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273  IFS=$as_save_IFS
5274  test -z "$as_dir" && as_dir=.
5275    for ac_exec_ext in '' $ac_executable_extensions; do
5276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5277    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279    break 2
5280  fi
5281done
5282  done
5283IFS=$as_save_IFS
5284
5285  ;;
5286esac
5287fi
5288CMP=$ac_cv_path_CMP
5289if test -n "$CMP"; then
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5291$as_echo "$CMP" >&6; }
5292else
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
5295fi
5296
5297
5298  test -n "$CMP" && break
5299done
5300
5301    else
5302      # If it succeeded, then it was overridden by the user. We will use it
5303      # for the tool.
5304
5305      # First remove it from the list of overridden variables, so we can test
5306      # for unknown variables in the end.
5307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5308
5309      # Check if the provided tool contains a complete path.
5310      tool_specified="$CMP"
5311      tool_basename="${tool_specified##*/}"
5312      if test "x$tool_basename" = "x$tool_specified"; then
5313        # A command without a complete path is provided, search $PATH.
5314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5315$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5316        # Extract the first word of "$tool_basename", so it can be a program name with args.
5317set dummy $tool_basename; ac_word=$2
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
5320if ${ac_cv_path_CMP+:} false; then :
5321  $as_echo_n "(cached) " >&6
5322else
5323  case $CMP in
5324  [\\/]* | ?:[\\/]*)
5325  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5326  ;;
5327  *)
5328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331  IFS=$as_save_IFS
5332  test -z "$as_dir" && as_dir=.
5333    for ac_exec_ext in '' $ac_executable_extensions; do
5334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5335    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337    break 2
5338  fi
5339done
5340  done
5341IFS=$as_save_IFS
5342
5343  ;;
5344esac
5345fi
5346CMP=$ac_cv_path_CMP
5347if test -n "$CMP"; then
5348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5349$as_echo "$CMP" >&6; }
5350else
5351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354
5355
5356        if test "x$CMP" = x; then
5357          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5358        fi
5359      else
5360        # Otherwise we believe it is a complete path. Use it as it is.
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5362$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5364$as_echo_n "checking for CMP... " >&6; }
5365        if test ! -x "$tool_specified"; then
5366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5367$as_echo "not found" >&6; }
5368          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5369        fi
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5371$as_echo "$tool_specified" >&6; }
5372      fi
5373    fi
5374  fi
5375
5376
5377
5378  if test "x$CMP" = x; then
5379    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5380  fi
5381
5382
5383
5384
5385
5386  # Publish this variable in the help.
5387
5388
5389  if test "x$COMM" = x; then
5390    # The variable is not set by user, try to locate tool using the code snippet
5391    for ac_prog in comm
5392do
5393  # Extract the first word of "$ac_prog", so it can be a program name with args.
5394set dummy $ac_prog; ac_word=$2
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5396$as_echo_n "checking for $ac_word... " >&6; }
5397if ${ac_cv_path_COMM+:} false; then :
5398  $as_echo_n "(cached) " >&6
5399else
5400  case $COMM in
5401  [\\/]* | ?:[\\/]*)
5402  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5403  ;;
5404  *)
5405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406for as_dir in $PATH
5407do
5408  IFS=$as_save_IFS
5409  test -z "$as_dir" && as_dir=.
5410    for ac_exec_ext in '' $ac_executable_extensions; do
5411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5412    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414    break 2
5415  fi
5416done
5417  done
5418IFS=$as_save_IFS
5419
5420  ;;
5421esac
5422fi
5423COMM=$ac_cv_path_COMM
5424if test -n "$COMM"; then
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5426$as_echo "$COMM" >&6; }
5427else
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429$as_echo "no" >&6; }
5430fi
5431
5432
5433  test -n "$COMM" && break
5434done
5435
5436  else
5437    # The variable is set, but is it from the command line or the environment?
5438
5439    # Try to remove the string !COMM! from our list.
5440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5442      # If it failed, the variable was not from the command line. Ignore it,
5443      # but warn the user (except for BASH, which is always set by the calling BASH).
5444      if test "xCOMM" != xBASH; then
5445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5446$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5447      fi
5448      # Try to locate tool using the code snippet
5449      for ac_prog in comm
5450do
5451  # Extract the first word of "$ac_prog", so it can be a program name with args.
5452set dummy $ac_prog; ac_word=$2
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454$as_echo_n "checking for $ac_word... " >&6; }
5455if ${ac_cv_path_COMM+:} false; then :
5456  $as_echo_n "(cached) " >&6
5457else
5458  case $COMM in
5459  [\\/]* | ?:[\\/]*)
5460  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5461  ;;
5462  *)
5463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464for as_dir in $PATH
5465do
5466  IFS=$as_save_IFS
5467  test -z "$as_dir" && as_dir=.
5468    for ac_exec_ext in '' $ac_executable_extensions; do
5469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472    break 2
5473  fi
5474done
5475  done
5476IFS=$as_save_IFS
5477
5478  ;;
5479esac
5480fi
5481COMM=$ac_cv_path_COMM
5482if test -n "$COMM"; then
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5484$as_echo "$COMM" >&6; }
5485else
5486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487$as_echo "no" >&6; }
5488fi
5489
5490
5491  test -n "$COMM" && break
5492done
5493
5494    else
5495      # If it succeeded, then it was overridden by the user. We will use it
5496      # for the tool.
5497
5498      # First remove it from the list of overridden variables, so we can test
5499      # for unknown variables in the end.
5500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5501
5502      # Check if the provided tool contains a complete path.
5503      tool_specified="$COMM"
5504      tool_basename="${tool_specified##*/}"
5505      if test "x$tool_basename" = "x$tool_specified"; then
5506        # A command without a complete path is provided, search $PATH.
5507        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5508$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5509        # Extract the first word of "$tool_basename", so it can be a program name with args.
5510set dummy $tool_basename; ac_word=$2
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512$as_echo_n "checking for $ac_word... " >&6; }
5513if ${ac_cv_path_COMM+:} false; then :
5514  $as_echo_n "(cached) " >&6
5515else
5516  case $COMM in
5517  [\\/]* | ?:[\\/]*)
5518  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5519  ;;
5520  *)
5521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH
5523do
5524  IFS=$as_save_IFS
5525  test -z "$as_dir" && as_dir=.
5526    for ac_exec_ext in '' $ac_executable_extensions; do
5527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530    break 2
5531  fi
5532done
5533  done
5534IFS=$as_save_IFS
5535
5536  ;;
5537esac
5538fi
5539COMM=$ac_cv_path_COMM
5540if test -n "$COMM"; then
5541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5542$as_echo "$COMM" >&6; }
5543else
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548
5549        if test "x$COMM" = x; then
5550          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5551        fi
5552      else
5553        # Otherwise we believe it is a complete path. Use it as it is.
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5555$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5557$as_echo_n "checking for COMM... " >&6; }
5558        if test ! -x "$tool_specified"; then
5559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5560$as_echo "not found" >&6; }
5561          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5562        fi
5563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5564$as_echo "$tool_specified" >&6; }
5565      fi
5566    fi
5567  fi
5568
5569
5570
5571  if test "x$COMM" = x; then
5572    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5573  fi
5574
5575
5576
5577
5578
5579  # Publish this variable in the help.
5580
5581
5582  if test "x$CP" = x; then
5583    # The variable is not set by user, try to locate tool using the code snippet
5584    for ac_prog in cp
5585do
5586  # Extract the first word of "$ac_prog", so it can be a program name with args.
5587set dummy $ac_prog; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if ${ac_cv_path_CP+:} false; then :
5591  $as_echo_n "(cached) " >&6
5592else
5593  case $CP in
5594  [\\/]* | ?:[\\/]*)
5595  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5596  ;;
5597  *)
5598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5599for as_dir in $PATH
5600do
5601  IFS=$as_save_IFS
5602  test -z "$as_dir" && as_dir=.
5603    for ac_exec_ext in '' $ac_executable_extensions; do
5604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5605    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5607    break 2
5608  fi
5609done
5610  done
5611IFS=$as_save_IFS
5612
5613  ;;
5614esac
5615fi
5616CP=$ac_cv_path_CP
5617if test -n "$CP"; then
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5619$as_echo "$CP" >&6; }
5620else
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
5623fi
5624
5625
5626  test -n "$CP" && break
5627done
5628
5629  else
5630    # The variable is set, but is it from the command line or the environment?
5631
5632    # Try to remove the string !CP! from our list.
5633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5635      # If it failed, the variable was not from the command line. Ignore it,
5636      # but warn the user (except for BASH, which is always set by the calling BASH).
5637      if test "xCP" != xBASH; then
5638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5639$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5640      fi
5641      # Try to locate tool using the code snippet
5642      for ac_prog in cp
5643do
5644  # Extract the first word of "$ac_prog", so it can be a program name with args.
5645set dummy $ac_prog; ac_word=$2
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5647$as_echo_n "checking for $ac_word... " >&6; }
5648if ${ac_cv_path_CP+:} false; then :
5649  $as_echo_n "(cached) " >&6
5650else
5651  case $CP in
5652  [\\/]* | ?:[\\/]*)
5653  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5654  ;;
5655  *)
5656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5657for as_dir in $PATH
5658do
5659  IFS=$as_save_IFS
5660  test -z "$as_dir" && as_dir=.
5661    for ac_exec_ext in '' $ac_executable_extensions; do
5662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5663    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5665    break 2
5666  fi
5667done
5668  done
5669IFS=$as_save_IFS
5670
5671  ;;
5672esac
5673fi
5674CP=$ac_cv_path_CP
5675if test -n "$CP"; then
5676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5677$as_echo "$CP" >&6; }
5678else
5679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
5681fi
5682
5683
5684  test -n "$CP" && break
5685done
5686
5687    else
5688      # If it succeeded, then it was overridden by the user. We will use it
5689      # for the tool.
5690
5691      # First remove it from the list of overridden variables, so we can test
5692      # for unknown variables in the end.
5693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5694
5695      # Check if the provided tool contains a complete path.
5696      tool_specified="$CP"
5697      tool_basename="${tool_specified##*/}"
5698      if test "x$tool_basename" = "x$tool_specified"; then
5699        # A command without a complete path is provided, search $PATH.
5700        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5701$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5702        # Extract the first word of "$tool_basename", so it can be a program name with args.
5703set dummy $tool_basename; ac_word=$2
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5705$as_echo_n "checking for $ac_word... " >&6; }
5706if ${ac_cv_path_CP+:} false; then :
5707  $as_echo_n "(cached) " >&6
5708else
5709  case $CP in
5710  [\\/]* | ?:[\\/]*)
5711  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5712  ;;
5713  *)
5714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717  IFS=$as_save_IFS
5718  test -z "$as_dir" && as_dir=.
5719    for ac_exec_ext in '' $ac_executable_extensions; do
5720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5721    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5723    break 2
5724  fi
5725done
5726  done
5727IFS=$as_save_IFS
5728
5729  ;;
5730esac
5731fi
5732CP=$ac_cv_path_CP
5733if test -n "$CP"; then
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5735$as_echo "$CP" >&6; }
5736else
5737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
5739fi
5740
5741
5742        if test "x$CP" = x; then
5743          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5744        fi
5745      else
5746        # Otherwise we believe it is a complete path. Use it as it is.
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5748$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5750$as_echo_n "checking for CP... " >&6; }
5751        if test ! -x "$tool_specified"; then
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5753$as_echo "not found" >&6; }
5754          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5755        fi
5756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5757$as_echo "$tool_specified" >&6; }
5758      fi
5759    fi
5760  fi
5761
5762
5763
5764  if test "x$CP" = x; then
5765    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5766  fi
5767
5768
5769
5770
5771
5772  # Publish this variable in the help.
5773
5774
5775  if test "x$CUT" = x; then
5776    # The variable is not set by user, try to locate tool using the code snippet
5777    for ac_prog in cut
5778do
5779  # Extract the first word of "$ac_prog", so it can be a program name with args.
5780set dummy $ac_prog; ac_word=$2
5781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5782$as_echo_n "checking for $ac_word... " >&6; }
5783if ${ac_cv_path_CUT+:} false; then :
5784  $as_echo_n "(cached) " >&6
5785else
5786  case $CUT in
5787  [\\/]* | ?:[\\/]*)
5788  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5789  ;;
5790  *)
5791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5792for as_dir in $PATH
5793do
5794  IFS=$as_save_IFS
5795  test -z "$as_dir" && as_dir=.
5796    for ac_exec_ext in '' $ac_executable_extensions; do
5797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5798    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5800    break 2
5801  fi
5802done
5803  done
5804IFS=$as_save_IFS
5805
5806  ;;
5807esac
5808fi
5809CUT=$ac_cv_path_CUT
5810if test -n "$CUT"; then
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5812$as_echo "$CUT" >&6; }
5813else
5814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815$as_echo "no" >&6; }
5816fi
5817
5818
5819  test -n "$CUT" && break
5820done
5821
5822  else
5823    # The variable is set, but is it from the command line or the environment?
5824
5825    # Try to remove the string !CUT! from our list.
5826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5828      # If it failed, the variable was not from the command line. Ignore it,
5829      # but warn the user (except for BASH, which is always set by the calling BASH).
5830      if test "xCUT" != xBASH; then
5831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5832$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5833      fi
5834      # Try to locate tool using the code snippet
5835      for ac_prog in cut
5836do
5837  # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if ${ac_cv_path_CUT+:} false; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  case $CUT in
5845  [\\/]* | ?:[\\/]*)
5846  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5847  ;;
5848  *)
5849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852  IFS=$as_save_IFS
5853  test -z "$as_dir" && as_dir=.
5854    for ac_exec_ext in '' $ac_executable_extensions; do
5855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858    break 2
5859  fi
5860done
5861  done
5862IFS=$as_save_IFS
5863
5864  ;;
5865esac
5866fi
5867CUT=$ac_cv_path_CUT
5868if test -n "$CUT"; then
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5870$as_echo "$CUT" >&6; }
5871else
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874fi
5875
5876
5877  test -n "$CUT" && break
5878done
5879
5880    else
5881      # If it succeeded, then it was overridden by the user. We will use it
5882      # for the tool.
5883
5884      # First remove it from the list of overridden variables, so we can test
5885      # for unknown variables in the end.
5886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5887
5888      # Check if the provided tool contains a complete path.
5889      tool_specified="$CUT"
5890      tool_basename="${tool_specified##*/}"
5891      if test "x$tool_basename" = "x$tool_specified"; then
5892        # A command without a complete path is provided, search $PATH.
5893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5894$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5895        # Extract the first word of "$tool_basename", so it can be a program name with args.
5896set dummy $tool_basename; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_path_CUT+:} false; then :
5900  $as_echo_n "(cached) " >&6
5901else
5902  case $CUT in
5903  [\\/]* | ?:[\\/]*)
5904  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5905  ;;
5906  *)
5907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5908for as_dir in $PATH
5909do
5910  IFS=$as_save_IFS
5911  test -z "$as_dir" && as_dir=.
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5914    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5916    break 2
5917  fi
5918done
5919  done
5920IFS=$as_save_IFS
5921
5922  ;;
5923esac
5924fi
5925CUT=$ac_cv_path_CUT
5926if test -n "$CUT"; then
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5928$as_echo "$CUT" >&6; }
5929else
5930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935        if test "x$CUT" = x; then
5936          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5937        fi
5938      else
5939        # Otherwise we believe it is a complete path. Use it as it is.
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5941$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5943$as_echo_n "checking for CUT... " >&6; }
5944        if test ! -x "$tool_specified"; then
5945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5946$as_echo "not found" >&6; }
5947          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5948        fi
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5950$as_echo "$tool_specified" >&6; }
5951      fi
5952    fi
5953  fi
5954
5955
5956
5957  if test "x$CUT" = x; then
5958    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5959  fi
5960
5961
5962
5963
5964
5965  # Publish this variable in the help.
5966
5967
5968  if test "x$DATE" = x; then
5969    # The variable is not set by user, try to locate tool using the code snippet
5970    for ac_prog in date
5971do
5972  # Extract the first word of "$ac_prog", so it can be a program name with args.
5973set dummy $ac_prog; ac_word=$2
5974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5975$as_echo_n "checking for $ac_word... " >&6; }
5976if ${ac_cv_path_DATE+:} false; then :
5977  $as_echo_n "(cached) " >&6
5978else
5979  case $DATE in
5980  [\\/]* | ?:[\\/]*)
5981  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5982  ;;
5983  *)
5984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987  IFS=$as_save_IFS
5988  test -z "$as_dir" && as_dir=.
5989    for ac_exec_ext in '' $ac_executable_extensions; do
5990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5991    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993    break 2
5994  fi
5995done
5996  done
5997IFS=$as_save_IFS
5998
5999  ;;
6000esac
6001fi
6002DATE=$ac_cv_path_DATE
6003if test -n "$DATE"; then
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6005$as_echo "$DATE" >&6; }
6006else
6007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008$as_echo "no" >&6; }
6009fi
6010
6011
6012  test -n "$DATE" && break
6013done
6014
6015  else
6016    # The variable is set, but is it from the command line or the environment?
6017
6018    # Try to remove the string !DATE! from our list.
6019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6021      # If it failed, the variable was not from the command line. Ignore it,
6022      # but warn the user (except for BASH, which is always set by the calling BASH).
6023      if test "xDATE" != xBASH; then
6024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6025$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6026      fi
6027      # Try to locate tool using the code snippet
6028      for ac_prog in date
6029do
6030  # Extract the first word of "$ac_prog", so it can be a program name with args.
6031set dummy $ac_prog; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_path_DATE+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  case $DATE in
6038  [\\/]* | ?:[\\/]*)
6039  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6040  ;;
6041  *)
6042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045  IFS=$as_save_IFS
6046  test -z "$as_dir" && as_dir=.
6047    for ac_exec_ext in '' $ac_executable_extensions; do
6048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6049    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051    break 2
6052  fi
6053done
6054  done
6055IFS=$as_save_IFS
6056
6057  ;;
6058esac
6059fi
6060DATE=$ac_cv_path_DATE
6061if test -n "$DATE"; then
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6063$as_echo "$DATE" >&6; }
6064else
6065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066$as_echo "no" >&6; }
6067fi
6068
6069
6070  test -n "$DATE" && break
6071done
6072
6073    else
6074      # If it succeeded, then it was overridden by the user. We will use it
6075      # for the tool.
6076
6077      # First remove it from the list of overridden variables, so we can test
6078      # for unknown variables in the end.
6079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6080
6081      # Check if the provided tool contains a complete path.
6082      tool_specified="$DATE"
6083      tool_basename="${tool_specified##*/}"
6084      if test "x$tool_basename" = "x$tool_specified"; then
6085        # A command without a complete path is provided, search $PATH.
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6087$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6088        # Extract the first word of "$tool_basename", so it can be a program name with args.
6089set dummy $tool_basename; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_path_DATE+:} false; then :
6093  $as_echo_n "(cached) " >&6
6094else
6095  case $DATE in
6096  [\\/]* | ?:[\\/]*)
6097  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6098  ;;
6099  *)
6100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103  IFS=$as_save_IFS
6104  test -z "$as_dir" && as_dir=.
6105    for ac_exec_ext in '' $ac_executable_extensions; do
6106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6107    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109    break 2
6110  fi
6111done
6112  done
6113IFS=$as_save_IFS
6114
6115  ;;
6116esac
6117fi
6118DATE=$ac_cv_path_DATE
6119if test -n "$DATE"; then
6120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6121$as_echo "$DATE" >&6; }
6122else
6123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128        if test "x$DATE" = x; then
6129          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6130        fi
6131      else
6132        # Otherwise we believe it is a complete path. Use it as it is.
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6134$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6136$as_echo_n "checking for DATE... " >&6; }
6137        if test ! -x "$tool_specified"; then
6138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6139$as_echo "not found" >&6; }
6140          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6141        fi
6142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6143$as_echo "$tool_specified" >&6; }
6144      fi
6145    fi
6146  fi
6147
6148
6149
6150  if test "x$DATE" = x; then
6151    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6152  fi
6153
6154
6155
6156
6157
6158  # Publish this variable in the help.
6159
6160
6161  if test "x$DIFF" = x; then
6162    # The variable is not set by user, try to locate tool using the code snippet
6163    for ac_prog in gdiff diff
6164do
6165  # Extract the first word of "$ac_prog", so it can be a program name with args.
6166set dummy $ac_prog; ac_word=$2
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6168$as_echo_n "checking for $ac_word... " >&6; }
6169if ${ac_cv_path_DIFF+:} false; then :
6170  $as_echo_n "(cached) " >&6
6171else
6172  case $DIFF in
6173  [\\/]* | ?:[\\/]*)
6174  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6175  ;;
6176  *)
6177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178for as_dir in $PATH
6179do
6180  IFS=$as_save_IFS
6181  test -z "$as_dir" && as_dir=.
6182    for ac_exec_ext in '' $ac_executable_extensions; do
6183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6184    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6186    break 2
6187  fi
6188done
6189  done
6190IFS=$as_save_IFS
6191
6192  ;;
6193esac
6194fi
6195DIFF=$ac_cv_path_DIFF
6196if test -n "$DIFF"; then
6197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6198$as_echo "$DIFF" >&6; }
6199else
6200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6201$as_echo "no" >&6; }
6202fi
6203
6204
6205  test -n "$DIFF" && break
6206done
6207
6208  else
6209    # The variable is set, but is it from the command line or the environment?
6210
6211    # Try to remove the string !DIFF! from our list.
6212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6214      # If it failed, the variable was not from the command line. Ignore it,
6215      # but warn the user (except for BASH, which is always set by the calling BASH).
6216      if test "xDIFF" != xBASH; then
6217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6218$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6219      fi
6220      # Try to locate tool using the code snippet
6221      for ac_prog in gdiff diff
6222do
6223  # Extract the first word of "$ac_prog", so it can be a program name with args.
6224set dummy $ac_prog; ac_word=$2
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6226$as_echo_n "checking for $ac_word... " >&6; }
6227if ${ac_cv_path_DIFF+:} false; then :
6228  $as_echo_n "(cached) " >&6
6229else
6230  case $DIFF in
6231  [\\/]* | ?:[\\/]*)
6232  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6233  ;;
6234  *)
6235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236for as_dir in $PATH
6237do
6238  IFS=$as_save_IFS
6239  test -z "$as_dir" && as_dir=.
6240    for ac_exec_ext in '' $ac_executable_extensions; do
6241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6242    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244    break 2
6245  fi
6246done
6247  done
6248IFS=$as_save_IFS
6249
6250  ;;
6251esac
6252fi
6253DIFF=$ac_cv_path_DIFF
6254if test -n "$DIFF"; then
6255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6256$as_echo "$DIFF" >&6; }
6257else
6258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263  test -n "$DIFF" && break
6264done
6265
6266    else
6267      # If it succeeded, then it was overridden by the user. We will use it
6268      # for the tool.
6269
6270      # First remove it from the list of overridden variables, so we can test
6271      # for unknown variables in the end.
6272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6273
6274      # Check if the provided tool contains a complete path.
6275      tool_specified="$DIFF"
6276      tool_basename="${tool_specified##*/}"
6277      if test "x$tool_basename" = "x$tool_specified"; then
6278        # A command without a complete path is provided, search $PATH.
6279        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6280$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6281        # Extract the first word of "$tool_basename", so it can be a program name with args.
6282set dummy $tool_basename; ac_word=$2
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6284$as_echo_n "checking for $ac_word... " >&6; }
6285if ${ac_cv_path_DIFF+:} false; then :
6286  $as_echo_n "(cached) " >&6
6287else
6288  case $DIFF in
6289  [\\/]* | ?:[\\/]*)
6290  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6291  ;;
6292  *)
6293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296  IFS=$as_save_IFS
6297  test -z "$as_dir" && as_dir=.
6298    for ac_exec_ext in '' $ac_executable_extensions; do
6299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6300    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6302    break 2
6303  fi
6304done
6305  done
6306IFS=$as_save_IFS
6307
6308  ;;
6309esac
6310fi
6311DIFF=$ac_cv_path_DIFF
6312if test -n "$DIFF"; then
6313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6314$as_echo "$DIFF" >&6; }
6315else
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
6318fi
6319
6320
6321        if test "x$DIFF" = x; then
6322          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6323        fi
6324      else
6325        # Otherwise we believe it is a complete path. Use it as it is.
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6327$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6329$as_echo_n "checking for DIFF... " >&6; }
6330        if test ! -x "$tool_specified"; then
6331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6332$as_echo "not found" >&6; }
6333          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6334        fi
6335        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6336$as_echo "$tool_specified" >&6; }
6337      fi
6338    fi
6339  fi
6340
6341
6342
6343  if test "x$DIFF" = x; then
6344    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6345  fi
6346
6347
6348
6349
6350
6351  # Publish this variable in the help.
6352
6353
6354  if test "x$DIRNAME" = x; then
6355    # The variable is not set by user, try to locate tool using the code snippet
6356    for ac_prog in dirname
6357do
6358  # Extract the first word of "$ac_prog", so it can be a program name with args.
6359set dummy $ac_prog; ac_word=$2
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6361$as_echo_n "checking for $ac_word... " >&6; }
6362if ${ac_cv_path_DIRNAME+:} false; then :
6363  $as_echo_n "(cached) " >&6
6364else
6365  case $DIRNAME in
6366  [\\/]* | ?:[\\/]*)
6367  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6368  ;;
6369  *)
6370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6371for as_dir in $PATH
6372do
6373  IFS=$as_save_IFS
6374  test -z "$as_dir" && as_dir=.
6375    for ac_exec_ext in '' $ac_executable_extensions; do
6376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6377    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6379    break 2
6380  fi
6381done
6382  done
6383IFS=$as_save_IFS
6384
6385  ;;
6386esac
6387fi
6388DIRNAME=$ac_cv_path_DIRNAME
6389if test -n "$DIRNAME"; then
6390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6391$as_echo "$DIRNAME" >&6; }
6392else
6393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }
6395fi
6396
6397
6398  test -n "$DIRNAME" && break
6399done
6400
6401  else
6402    # The variable is set, but is it from the command line or the environment?
6403
6404    # Try to remove the string !DIRNAME! from our list.
6405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6407      # If it failed, the variable was not from the command line. Ignore it,
6408      # but warn the user (except for BASH, which is always set by the calling BASH).
6409      if test "xDIRNAME" != xBASH; then
6410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6411$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6412      fi
6413      # Try to locate tool using the code snippet
6414      for ac_prog in dirname
6415do
6416  # Extract the first word of "$ac_prog", so it can be a program name with args.
6417set dummy $ac_prog; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if ${ac_cv_path_DIRNAME+:} false; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $DIRNAME in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446DIRNAME=$ac_cv_path_DIRNAME
6447if test -n "$DIRNAME"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6449$as_echo "$DIRNAME" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456  test -n "$DIRNAME" && break
6457done
6458
6459    else
6460      # If it succeeded, then it was overridden by the user. We will use it
6461      # for the tool.
6462
6463      # First remove it from the list of overridden variables, so we can test
6464      # for unknown variables in the end.
6465      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6466
6467      # Check if the provided tool contains a complete path.
6468      tool_specified="$DIRNAME"
6469      tool_basename="${tool_specified##*/}"
6470      if test "x$tool_basename" = "x$tool_specified"; then
6471        # A command without a complete path is provided, search $PATH.
6472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6473$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6474        # Extract the first word of "$tool_basename", so it can be a program name with args.
6475set dummy $tool_basename; ac_word=$2
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6477$as_echo_n "checking for $ac_word... " >&6; }
6478if ${ac_cv_path_DIRNAME+:} false; then :
6479  $as_echo_n "(cached) " >&6
6480else
6481  case $DIRNAME in
6482  [\\/]* | ?:[\\/]*)
6483  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6484  ;;
6485  *)
6486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487for as_dir in $PATH
6488do
6489  IFS=$as_save_IFS
6490  test -z "$as_dir" && as_dir=.
6491    for ac_exec_ext in '' $ac_executable_extensions; do
6492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495    break 2
6496  fi
6497done
6498  done
6499IFS=$as_save_IFS
6500
6501  ;;
6502esac
6503fi
6504DIRNAME=$ac_cv_path_DIRNAME
6505if test -n "$DIRNAME"; then
6506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6507$as_echo "$DIRNAME" >&6; }
6508else
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510$as_echo "no" >&6; }
6511fi
6512
6513
6514        if test "x$DIRNAME" = x; then
6515          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6516        fi
6517      else
6518        # Otherwise we believe it is a complete path. Use it as it is.
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6520$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6522$as_echo_n "checking for DIRNAME... " >&6; }
6523        if test ! -x "$tool_specified"; then
6524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6525$as_echo "not found" >&6; }
6526          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6527        fi
6528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6529$as_echo "$tool_specified" >&6; }
6530      fi
6531    fi
6532  fi
6533
6534
6535
6536  if test "x$DIRNAME" = x; then
6537    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6538  fi
6539
6540
6541
6542
6543
6544  # Publish this variable in the help.
6545
6546
6547  if test "x$ECHO" = x; then
6548    # The variable is not set by user, try to locate tool using the code snippet
6549    for ac_prog in echo
6550do
6551  # Extract the first word of "$ac_prog", so it can be a program name with args.
6552set dummy $ac_prog; ac_word=$2
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6554$as_echo_n "checking for $ac_word... " >&6; }
6555if ${ac_cv_path_ECHO+:} false; then :
6556  $as_echo_n "(cached) " >&6
6557else
6558  case $ECHO in
6559  [\\/]* | ?:[\\/]*)
6560  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6561  ;;
6562  *)
6563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564for as_dir in $PATH
6565do
6566  IFS=$as_save_IFS
6567  test -z "$as_dir" && as_dir=.
6568    for ac_exec_ext in '' $ac_executable_extensions; do
6569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6570    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6572    break 2
6573  fi
6574done
6575  done
6576IFS=$as_save_IFS
6577
6578  ;;
6579esac
6580fi
6581ECHO=$ac_cv_path_ECHO
6582if test -n "$ECHO"; then
6583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6584$as_echo "$ECHO" >&6; }
6585else
6586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
6588fi
6589
6590
6591  test -n "$ECHO" && break
6592done
6593
6594  else
6595    # The variable is set, but is it from the command line or the environment?
6596
6597    # Try to remove the string !ECHO! from our list.
6598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6600      # If it failed, the variable was not from the command line. Ignore it,
6601      # but warn the user (except for BASH, which is always set by the calling BASH).
6602      if test "xECHO" != xBASH; then
6603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6604$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6605      fi
6606      # Try to locate tool using the code snippet
6607      for ac_prog in echo
6608do
6609  # Extract the first word of "$ac_prog", so it can be a program name with args.
6610set dummy $ac_prog; ac_word=$2
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6612$as_echo_n "checking for $ac_word... " >&6; }
6613if ${ac_cv_path_ECHO+:} false; then :
6614  $as_echo_n "(cached) " >&6
6615else
6616  case $ECHO in
6617  [\\/]* | ?:[\\/]*)
6618  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6619  ;;
6620  *)
6621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6622for as_dir in $PATH
6623do
6624  IFS=$as_save_IFS
6625  test -z "$as_dir" && as_dir=.
6626    for ac_exec_ext in '' $ac_executable_extensions; do
6627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6628    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6630    break 2
6631  fi
6632done
6633  done
6634IFS=$as_save_IFS
6635
6636  ;;
6637esac
6638fi
6639ECHO=$ac_cv_path_ECHO
6640if test -n "$ECHO"; then
6641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6642$as_echo "$ECHO" >&6; }
6643else
6644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645$as_echo "no" >&6; }
6646fi
6647
6648
6649  test -n "$ECHO" && break
6650done
6651
6652    else
6653      # If it succeeded, then it was overridden by the user. We will use it
6654      # for the tool.
6655
6656      # First remove it from the list of overridden variables, so we can test
6657      # for unknown variables in the end.
6658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6659
6660      # Check if the provided tool contains a complete path.
6661      tool_specified="$ECHO"
6662      tool_basename="${tool_specified##*/}"
6663      if test "x$tool_basename" = "x$tool_specified"; then
6664        # A command without a complete path is provided, search $PATH.
6665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6666$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6667        # Extract the first word of "$tool_basename", so it can be a program name with args.
6668set dummy $tool_basename; ac_word=$2
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6670$as_echo_n "checking for $ac_word... " >&6; }
6671if ${ac_cv_path_ECHO+:} false; then :
6672  $as_echo_n "(cached) " >&6
6673else
6674  case $ECHO in
6675  [\\/]* | ?:[\\/]*)
6676  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6677  ;;
6678  *)
6679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6680for as_dir in $PATH
6681do
6682  IFS=$as_save_IFS
6683  test -z "$as_dir" && as_dir=.
6684    for ac_exec_ext in '' $ac_executable_extensions; do
6685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6686    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6688    break 2
6689  fi
6690done
6691  done
6692IFS=$as_save_IFS
6693
6694  ;;
6695esac
6696fi
6697ECHO=$ac_cv_path_ECHO
6698if test -n "$ECHO"; then
6699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6700$as_echo "$ECHO" >&6; }
6701else
6702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6703$as_echo "no" >&6; }
6704fi
6705
6706
6707        if test "x$ECHO" = x; then
6708          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6709        fi
6710      else
6711        # Otherwise we believe it is a complete path. Use it as it is.
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6713$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6715$as_echo_n "checking for ECHO... " >&6; }
6716        if test ! -x "$tool_specified"; then
6717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6718$as_echo "not found" >&6; }
6719          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6720        fi
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6722$as_echo "$tool_specified" >&6; }
6723      fi
6724    fi
6725  fi
6726
6727
6728
6729  if test "x$ECHO" = x; then
6730    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6731  fi
6732
6733
6734
6735
6736
6737  # Publish this variable in the help.
6738
6739
6740  if test "x$EXPR" = x; then
6741    # The variable is not set by user, try to locate tool using the code snippet
6742    for ac_prog in expr
6743do
6744  # Extract the first word of "$ac_prog", so it can be a program name with args.
6745set dummy $ac_prog; ac_word=$2
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6747$as_echo_n "checking for $ac_word... " >&6; }
6748if ${ac_cv_path_EXPR+:} false; then :
6749  $as_echo_n "(cached) " >&6
6750else
6751  case $EXPR in
6752  [\\/]* | ?:[\\/]*)
6753  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6754  ;;
6755  *)
6756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6757for as_dir in $PATH
6758do
6759  IFS=$as_save_IFS
6760  test -z "$as_dir" && as_dir=.
6761    for ac_exec_ext in '' $ac_executable_extensions; do
6762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6763    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6765    break 2
6766  fi
6767done
6768  done
6769IFS=$as_save_IFS
6770
6771  ;;
6772esac
6773fi
6774EXPR=$ac_cv_path_EXPR
6775if test -n "$EXPR"; then
6776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6777$as_echo "$EXPR" >&6; }
6778else
6779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780$as_echo "no" >&6; }
6781fi
6782
6783
6784  test -n "$EXPR" && break
6785done
6786
6787  else
6788    # The variable is set, but is it from the command line or the environment?
6789
6790    # Try to remove the string !EXPR! from our list.
6791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6793      # If it failed, the variable was not from the command line. Ignore it,
6794      # but warn the user (except for BASH, which is always set by the calling BASH).
6795      if test "xEXPR" != xBASH; then
6796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6797$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6798      fi
6799      # Try to locate tool using the code snippet
6800      for ac_prog in expr
6801do
6802  # Extract the first word of "$ac_prog", so it can be a program name with args.
6803set dummy $ac_prog; ac_word=$2
6804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6805$as_echo_n "checking for $ac_word... " >&6; }
6806if ${ac_cv_path_EXPR+:} false; then :
6807  $as_echo_n "(cached) " >&6
6808else
6809  case $EXPR in
6810  [\\/]* | ?:[\\/]*)
6811  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6812  ;;
6813  *)
6814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6815for as_dir in $PATH
6816do
6817  IFS=$as_save_IFS
6818  test -z "$as_dir" && as_dir=.
6819    for ac_exec_ext in '' $ac_executable_extensions; do
6820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6821    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6823    break 2
6824  fi
6825done
6826  done
6827IFS=$as_save_IFS
6828
6829  ;;
6830esac
6831fi
6832EXPR=$ac_cv_path_EXPR
6833if test -n "$EXPR"; then
6834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6835$as_echo "$EXPR" >&6; }
6836else
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6838$as_echo "no" >&6; }
6839fi
6840
6841
6842  test -n "$EXPR" && break
6843done
6844
6845    else
6846      # If it succeeded, then it was overridden by the user. We will use it
6847      # for the tool.
6848
6849      # First remove it from the list of overridden variables, so we can test
6850      # for unknown variables in the end.
6851      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6852
6853      # Check if the provided tool contains a complete path.
6854      tool_specified="$EXPR"
6855      tool_basename="${tool_specified##*/}"
6856      if test "x$tool_basename" = "x$tool_specified"; then
6857        # A command without a complete path is provided, search $PATH.
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6859$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6860        # Extract the first word of "$tool_basename", so it can be a program name with args.
6861set dummy $tool_basename; ac_word=$2
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6863$as_echo_n "checking for $ac_word... " >&6; }
6864if ${ac_cv_path_EXPR+:} false; then :
6865  $as_echo_n "(cached) " >&6
6866else
6867  case $EXPR in
6868  [\\/]* | ?:[\\/]*)
6869  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6870  ;;
6871  *)
6872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6873for as_dir in $PATH
6874do
6875  IFS=$as_save_IFS
6876  test -z "$as_dir" && as_dir=.
6877    for ac_exec_ext in '' $ac_executable_extensions; do
6878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6879    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6881    break 2
6882  fi
6883done
6884  done
6885IFS=$as_save_IFS
6886
6887  ;;
6888esac
6889fi
6890EXPR=$ac_cv_path_EXPR
6891if test -n "$EXPR"; then
6892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6893$as_echo "$EXPR" >&6; }
6894else
6895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6896$as_echo "no" >&6; }
6897fi
6898
6899
6900        if test "x$EXPR" = x; then
6901          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6902        fi
6903      else
6904        # Otherwise we believe it is a complete path. Use it as it is.
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6906$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6908$as_echo_n "checking for EXPR... " >&6; }
6909        if test ! -x "$tool_specified"; then
6910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6911$as_echo "not found" >&6; }
6912          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6913        fi
6914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6915$as_echo "$tool_specified" >&6; }
6916      fi
6917    fi
6918  fi
6919
6920
6921
6922  if test "x$EXPR" = x; then
6923    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6924  fi
6925
6926
6927
6928
6929
6930  # Publish this variable in the help.
6931
6932
6933  if test "x$FILE" = x; then
6934    # The variable is not set by user, try to locate tool using the code snippet
6935    for ac_prog in file
6936do
6937  # Extract the first word of "$ac_prog", so it can be a program name with args.
6938set dummy $ac_prog; ac_word=$2
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6940$as_echo_n "checking for $ac_word... " >&6; }
6941if ${ac_cv_path_FILE+:} false; then :
6942  $as_echo_n "(cached) " >&6
6943else
6944  case $FILE in
6945  [\\/]* | ?:[\\/]*)
6946  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6947  ;;
6948  *)
6949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950for as_dir in $PATH
6951do
6952  IFS=$as_save_IFS
6953  test -z "$as_dir" && as_dir=.
6954    for ac_exec_ext in '' $ac_executable_extensions; do
6955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6956    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6958    break 2
6959  fi
6960done
6961  done
6962IFS=$as_save_IFS
6963
6964  ;;
6965esac
6966fi
6967FILE=$ac_cv_path_FILE
6968if test -n "$FILE"; then
6969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6970$as_echo "$FILE" >&6; }
6971else
6972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6973$as_echo "no" >&6; }
6974fi
6975
6976
6977  test -n "$FILE" && break
6978done
6979
6980  else
6981    # The variable is set, but is it from the command line or the environment?
6982
6983    # Try to remove the string !FILE! from our list.
6984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6986      # If it failed, the variable was not from the command line. Ignore it,
6987      # but warn the user (except for BASH, which is always set by the calling BASH).
6988      if test "xFILE" != xBASH; then
6989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6990$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6991      fi
6992      # Try to locate tool using the code snippet
6993      for ac_prog in file
6994do
6995  # Extract the first word of "$ac_prog", so it can be a program name with args.
6996set dummy $ac_prog; ac_word=$2
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998$as_echo_n "checking for $ac_word... " >&6; }
6999if ${ac_cv_path_FILE+:} false; then :
7000  $as_echo_n "(cached) " >&6
7001else
7002  case $FILE in
7003  [\\/]* | ?:[\\/]*)
7004  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7005  ;;
7006  *)
7007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008for as_dir in $PATH
7009do
7010  IFS=$as_save_IFS
7011  test -z "$as_dir" && as_dir=.
7012    for ac_exec_ext in '' $ac_executable_extensions; do
7013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016    break 2
7017  fi
7018done
7019  done
7020IFS=$as_save_IFS
7021
7022  ;;
7023esac
7024fi
7025FILE=$ac_cv_path_FILE
7026if test -n "$FILE"; then
7027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7028$as_echo "$FILE" >&6; }
7029else
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7031$as_echo "no" >&6; }
7032fi
7033
7034
7035  test -n "$FILE" && break
7036done
7037
7038    else
7039      # If it succeeded, then it was overridden by the user. We will use it
7040      # for the tool.
7041
7042      # First remove it from the list of overridden variables, so we can test
7043      # for unknown variables in the end.
7044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7045
7046      # Check if the provided tool contains a complete path.
7047      tool_specified="$FILE"
7048      tool_basename="${tool_specified##*/}"
7049      if test "x$tool_basename" = "x$tool_specified"; then
7050        # A command without a complete path is provided, search $PATH.
7051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7052$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7053        # Extract the first word of "$tool_basename", so it can be a program name with args.
7054set dummy $tool_basename; ac_word=$2
7055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7056$as_echo_n "checking for $ac_word... " >&6; }
7057if ${ac_cv_path_FILE+:} false; then :
7058  $as_echo_n "(cached) " >&6
7059else
7060  case $FILE in
7061  [\\/]* | ?:[\\/]*)
7062  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7063  ;;
7064  *)
7065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7066for as_dir in $PATH
7067do
7068  IFS=$as_save_IFS
7069  test -z "$as_dir" && as_dir=.
7070    for ac_exec_ext in '' $ac_executable_extensions; do
7071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7072    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7074    break 2
7075  fi
7076done
7077  done
7078IFS=$as_save_IFS
7079
7080  ;;
7081esac
7082fi
7083FILE=$ac_cv_path_FILE
7084if test -n "$FILE"; then
7085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7086$as_echo "$FILE" >&6; }
7087else
7088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089$as_echo "no" >&6; }
7090fi
7091
7092
7093        if test "x$FILE" = x; then
7094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7095        fi
7096      else
7097        # Otherwise we believe it is a complete path. Use it as it is.
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7099$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7101$as_echo_n "checking for FILE... " >&6; }
7102        if test ! -x "$tool_specified"; then
7103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7104$as_echo "not found" >&6; }
7105          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7106        fi
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7108$as_echo "$tool_specified" >&6; }
7109      fi
7110    fi
7111  fi
7112
7113
7114
7115  if test "x$FILE" = x; then
7116    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7117  fi
7118
7119
7120
7121
7122
7123  # Publish this variable in the help.
7124
7125
7126  if test "x$FIND" = x; then
7127    # The variable is not set by user, try to locate tool using the code snippet
7128    for ac_prog in find
7129do
7130  # Extract the first word of "$ac_prog", so it can be a program name with args.
7131set dummy $ac_prog; ac_word=$2
7132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7133$as_echo_n "checking for $ac_word... " >&6; }
7134if ${ac_cv_path_FIND+:} false; then :
7135  $as_echo_n "(cached) " >&6
7136else
7137  case $FIND in
7138  [\\/]* | ?:[\\/]*)
7139  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7140  ;;
7141  *)
7142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7143for as_dir in $PATH
7144do
7145  IFS=$as_save_IFS
7146  test -z "$as_dir" && as_dir=.
7147    for ac_exec_ext in '' $ac_executable_extensions; do
7148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7149    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7151    break 2
7152  fi
7153done
7154  done
7155IFS=$as_save_IFS
7156
7157  ;;
7158esac
7159fi
7160FIND=$ac_cv_path_FIND
7161if test -n "$FIND"; then
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7163$as_echo "$FIND" >&6; }
7164else
7165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7166$as_echo "no" >&6; }
7167fi
7168
7169
7170  test -n "$FIND" && break
7171done
7172
7173  else
7174    # The variable is set, but is it from the command line or the environment?
7175
7176    # Try to remove the string !FIND! from our list.
7177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7179      # If it failed, the variable was not from the command line. Ignore it,
7180      # but warn the user (except for BASH, which is always set by the calling BASH).
7181      if test "xFIND" != xBASH; then
7182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7183$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7184      fi
7185      # Try to locate tool using the code snippet
7186      for ac_prog in find
7187do
7188  # Extract the first word of "$ac_prog", so it can be a program name with args.
7189set dummy $ac_prog; ac_word=$2
7190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7191$as_echo_n "checking for $ac_word... " >&6; }
7192if ${ac_cv_path_FIND+:} false; then :
7193  $as_echo_n "(cached) " >&6
7194else
7195  case $FIND in
7196  [\\/]* | ?:[\\/]*)
7197  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7198  ;;
7199  *)
7200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7201for as_dir in $PATH
7202do
7203  IFS=$as_save_IFS
7204  test -z "$as_dir" && as_dir=.
7205    for ac_exec_ext in '' $ac_executable_extensions; do
7206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7207    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7209    break 2
7210  fi
7211done
7212  done
7213IFS=$as_save_IFS
7214
7215  ;;
7216esac
7217fi
7218FIND=$ac_cv_path_FIND
7219if test -n "$FIND"; then
7220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7221$as_echo "$FIND" >&6; }
7222else
7223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7224$as_echo "no" >&6; }
7225fi
7226
7227
7228  test -n "$FIND" && break
7229done
7230
7231    else
7232      # If it succeeded, then it was overridden by the user. We will use it
7233      # for the tool.
7234
7235      # First remove it from the list of overridden variables, so we can test
7236      # for unknown variables in the end.
7237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7238
7239      # Check if the provided tool contains a complete path.
7240      tool_specified="$FIND"
7241      tool_basename="${tool_specified##*/}"
7242      if test "x$tool_basename" = "x$tool_specified"; then
7243        # A command without a complete path is provided, search $PATH.
7244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7245$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7246        # Extract the first word of "$tool_basename", so it can be a program name with args.
7247set dummy $tool_basename; ac_word=$2
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7249$as_echo_n "checking for $ac_word... " >&6; }
7250if ${ac_cv_path_FIND+:} false; then :
7251  $as_echo_n "(cached) " >&6
7252else
7253  case $FIND in
7254  [\\/]* | ?:[\\/]*)
7255  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7256  ;;
7257  *)
7258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259for as_dir in $PATH
7260do
7261  IFS=$as_save_IFS
7262  test -z "$as_dir" && as_dir=.
7263    for ac_exec_ext in '' $ac_executable_extensions; do
7264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267    break 2
7268  fi
7269done
7270  done
7271IFS=$as_save_IFS
7272
7273  ;;
7274esac
7275fi
7276FIND=$ac_cv_path_FIND
7277if test -n "$FIND"; then
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7279$as_echo "$FIND" >&6; }
7280else
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7282$as_echo "no" >&6; }
7283fi
7284
7285
7286        if test "x$FIND" = x; then
7287          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7288        fi
7289      else
7290        # Otherwise we believe it is a complete path. Use it as it is.
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7292$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7294$as_echo_n "checking for FIND... " >&6; }
7295        if test ! -x "$tool_specified"; then
7296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7297$as_echo "not found" >&6; }
7298          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7299        fi
7300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7301$as_echo "$tool_specified" >&6; }
7302      fi
7303    fi
7304  fi
7305
7306
7307
7308  if test "x$FIND" = x; then
7309    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7310  fi
7311
7312
7313
7314
7315
7316  # Publish this variable in the help.
7317
7318
7319  if test "x$HEAD" = x; then
7320    # The variable is not set by user, try to locate tool using the code snippet
7321    for ac_prog in head
7322do
7323  # Extract the first word of "$ac_prog", so it can be a program name with args.
7324set dummy $ac_prog; ac_word=$2
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7326$as_echo_n "checking for $ac_word... " >&6; }
7327if ${ac_cv_path_HEAD+:} false; then :
7328  $as_echo_n "(cached) " >&6
7329else
7330  case $HEAD in
7331  [\\/]* | ?:[\\/]*)
7332  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7333  ;;
7334  *)
7335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7336for as_dir in $PATH
7337do
7338  IFS=$as_save_IFS
7339  test -z "$as_dir" && as_dir=.
7340    for ac_exec_ext in '' $ac_executable_extensions; do
7341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7342    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7344    break 2
7345  fi
7346done
7347  done
7348IFS=$as_save_IFS
7349
7350  ;;
7351esac
7352fi
7353HEAD=$ac_cv_path_HEAD
7354if test -n "$HEAD"; then
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7356$as_echo "$HEAD" >&6; }
7357else
7358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7359$as_echo "no" >&6; }
7360fi
7361
7362
7363  test -n "$HEAD" && break
7364done
7365
7366  else
7367    # The variable is set, but is it from the command line or the environment?
7368
7369    # Try to remove the string !HEAD! from our list.
7370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7372      # If it failed, the variable was not from the command line. Ignore it,
7373      # but warn the user (except for BASH, which is always set by the calling BASH).
7374      if test "xHEAD" != xBASH; then
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7376$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7377      fi
7378      # Try to locate tool using the code snippet
7379      for ac_prog in head
7380do
7381  # Extract the first word of "$ac_prog", so it can be a program name with args.
7382set dummy $ac_prog; ac_word=$2
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384$as_echo_n "checking for $ac_word... " >&6; }
7385if ${ac_cv_path_HEAD+:} false; then :
7386  $as_echo_n "(cached) " >&6
7387else
7388  case $HEAD in
7389  [\\/]* | ?:[\\/]*)
7390  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7391  ;;
7392  *)
7393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396  IFS=$as_save_IFS
7397  test -z "$as_dir" && as_dir=.
7398    for ac_exec_ext in '' $ac_executable_extensions; do
7399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7400    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402    break 2
7403  fi
7404done
7405  done
7406IFS=$as_save_IFS
7407
7408  ;;
7409esac
7410fi
7411HEAD=$ac_cv_path_HEAD
7412if test -n "$HEAD"; then
7413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7414$as_echo "$HEAD" >&6; }
7415else
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
7418fi
7419
7420
7421  test -n "$HEAD" && break
7422done
7423
7424    else
7425      # If it succeeded, then it was overridden by the user. We will use it
7426      # for the tool.
7427
7428      # First remove it from the list of overridden variables, so we can test
7429      # for unknown variables in the end.
7430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7431
7432      # Check if the provided tool contains a complete path.
7433      tool_specified="$HEAD"
7434      tool_basename="${tool_specified##*/}"
7435      if test "x$tool_basename" = "x$tool_specified"; then
7436        # A command without a complete path is provided, search $PATH.
7437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7438$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7439        # Extract the first word of "$tool_basename", so it can be a program name with args.
7440set dummy $tool_basename; ac_word=$2
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442$as_echo_n "checking for $ac_word... " >&6; }
7443if ${ac_cv_path_HEAD+:} false; then :
7444  $as_echo_n "(cached) " >&6
7445else
7446  case $HEAD in
7447  [\\/]* | ?:[\\/]*)
7448  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7449  ;;
7450  *)
7451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452for as_dir in $PATH
7453do
7454  IFS=$as_save_IFS
7455  test -z "$as_dir" && as_dir=.
7456    for ac_exec_ext in '' $ac_executable_extensions; do
7457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7458    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7460    break 2
7461  fi
7462done
7463  done
7464IFS=$as_save_IFS
7465
7466  ;;
7467esac
7468fi
7469HEAD=$ac_cv_path_HEAD
7470if test -n "$HEAD"; then
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7472$as_echo "$HEAD" >&6; }
7473else
7474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475$as_echo "no" >&6; }
7476fi
7477
7478
7479        if test "x$HEAD" = x; then
7480          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7481        fi
7482      else
7483        # Otherwise we believe it is a complete path. Use it as it is.
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7485$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7487$as_echo_n "checking for HEAD... " >&6; }
7488        if test ! -x "$tool_specified"; then
7489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7490$as_echo "not found" >&6; }
7491          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7492        fi
7493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7494$as_echo "$tool_specified" >&6; }
7495      fi
7496    fi
7497  fi
7498
7499
7500
7501  if test "x$HEAD" = x; then
7502    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7503  fi
7504
7505
7506
7507
7508
7509  # Publish this variable in the help.
7510
7511
7512  if test "x$LN" = x; then
7513    # The variable is not set by user, try to locate tool using the code snippet
7514    for ac_prog in ln
7515do
7516  # Extract the first word of "$ac_prog", so it can be a program name with args.
7517set dummy $ac_prog; ac_word=$2
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519$as_echo_n "checking for $ac_word... " >&6; }
7520if ${ac_cv_path_LN+:} false; then :
7521  $as_echo_n "(cached) " >&6
7522else
7523  case $LN in
7524  [\\/]* | ?:[\\/]*)
7525  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7526  ;;
7527  *)
7528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7529for as_dir in $PATH
7530do
7531  IFS=$as_save_IFS
7532  test -z "$as_dir" && as_dir=.
7533    for ac_exec_ext in '' $ac_executable_extensions; do
7534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7535    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7537    break 2
7538  fi
7539done
7540  done
7541IFS=$as_save_IFS
7542
7543  ;;
7544esac
7545fi
7546LN=$ac_cv_path_LN
7547if test -n "$LN"; then
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7549$as_echo "$LN" >&6; }
7550else
7551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552$as_echo "no" >&6; }
7553fi
7554
7555
7556  test -n "$LN" && break
7557done
7558
7559  else
7560    # The variable is set, but is it from the command line or the environment?
7561
7562    # Try to remove the string !LN! from our list.
7563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7565      # If it failed, the variable was not from the command line. Ignore it,
7566      # but warn the user (except for BASH, which is always set by the calling BASH).
7567      if test "xLN" != xBASH; then
7568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7569$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7570      fi
7571      # Try to locate tool using the code snippet
7572      for ac_prog in ln
7573do
7574  # Extract the first word of "$ac_prog", so it can be a program name with args.
7575set dummy $ac_prog; ac_word=$2
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577$as_echo_n "checking for $ac_word... " >&6; }
7578if ${ac_cv_path_LN+:} false; then :
7579  $as_echo_n "(cached) " >&6
7580else
7581  case $LN in
7582  [\\/]* | ?:[\\/]*)
7583  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7584  ;;
7585  *)
7586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587for as_dir in $PATH
7588do
7589  IFS=$as_save_IFS
7590  test -z "$as_dir" && as_dir=.
7591    for ac_exec_ext in '' $ac_executable_extensions; do
7592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595    break 2
7596  fi
7597done
7598  done
7599IFS=$as_save_IFS
7600
7601  ;;
7602esac
7603fi
7604LN=$ac_cv_path_LN
7605if test -n "$LN"; then
7606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7607$as_echo "$LN" >&6; }
7608else
7609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610$as_echo "no" >&6; }
7611fi
7612
7613
7614  test -n "$LN" && break
7615done
7616
7617    else
7618      # If it succeeded, then it was overridden by the user. We will use it
7619      # for the tool.
7620
7621      # First remove it from the list of overridden variables, so we can test
7622      # for unknown variables in the end.
7623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7624
7625      # Check if the provided tool contains a complete path.
7626      tool_specified="$LN"
7627      tool_basename="${tool_specified##*/}"
7628      if test "x$tool_basename" = "x$tool_specified"; then
7629        # A command without a complete path is provided, search $PATH.
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7631$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7632        # Extract the first word of "$tool_basename", so it can be a program name with args.
7633set dummy $tool_basename; ac_word=$2
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635$as_echo_n "checking for $ac_word... " >&6; }
7636if ${ac_cv_path_LN+:} false; then :
7637  $as_echo_n "(cached) " >&6
7638else
7639  case $LN in
7640  [\\/]* | ?:[\\/]*)
7641  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7642  ;;
7643  *)
7644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7645for as_dir in $PATH
7646do
7647  IFS=$as_save_IFS
7648  test -z "$as_dir" && as_dir=.
7649    for ac_exec_ext in '' $ac_executable_extensions; do
7650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7651    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7653    break 2
7654  fi
7655done
7656  done
7657IFS=$as_save_IFS
7658
7659  ;;
7660esac
7661fi
7662LN=$ac_cv_path_LN
7663if test -n "$LN"; then
7664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7665$as_echo "$LN" >&6; }
7666else
7667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7668$as_echo "no" >&6; }
7669fi
7670
7671
7672        if test "x$LN" = x; then
7673          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7674        fi
7675      else
7676        # Otherwise we believe it is a complete path. Use it as it is.
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7678$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7680$as_echo_n "checking for LN... " >&6; }
7681        if test ! -x "$tool_specified"; then
7682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7683$as_echo "not found" >&6; }
7684          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7685        fi
7686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7687$as_echo "$tool_specified" >&6; }
7688      fi
7689    fi
7690  fi
7691
7692
7693
7694  if test "x$LN" = x; then
7695    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7696  fi
7697
7698
7699
7700
7701
7702  # Publish this variable in the help.
7703
7704
7705  if test "x$LS" = x; then
7706    # The variable is not set by user, try to locate tool using the code snippet
7707    for ac_prog in ls
7708do
7709  # Extract the first word of "$ac_prog", so it can be a program name with args.
7710set dummy $ac_prog; ac_word=$2
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
7713if ${ac_cv_path_LS+:} false; then :
7714  $as_echo_n "(cached) " >&6
7715else
7716  case $LS in
7717  [\\/]* | ?:[\\/]*)
7718  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7719  ;;
7720  *)
7721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7722for as_dir in $PATH
7723do
7724  IFS=$as_save_IFS
7725  test -z "$as_dir" && as_dir=.
7726    for ac_exec_ext in '' $ac_executable_extensions; do
7727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7728    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7730    break 2
7731  fi
7732done
7733  done
7734IFS=$as_save_IFS
7735
7736  ;;
7737esac
7738fi
7739LS=$ac_cv_path_LS
7740if test -n "$LS"; then
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7742$as_echo "$LS" >&6; }
7743else
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745$as_echo "no" >&6; }
7746fi
7747
7748
7749  test -n "$LS" && break
7750done
7751
7752  else
7753    # The variable is set, but is it from the command line or the environment?
7754
7755    # Try to remove the string !LS! from our list.
7756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7758      # If it failed, the variable was not from the command line. Ignore it,
7759      # but warn the user (except for BASH, which is always set by the calling BASH).
7760      if test "xLS" != xBASH; then
7761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7762$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7763      fi
7764      # Try to locate tool using the code snippet
7765      for ac_prog in ls
7766do
7767  # Extract the first word of "$ac_prog", so it can be a program name with args.
7768set dummy $ac_prog; ac_word=$2
7769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7770$as_echo_n "checking for $ac_word... " >&6; }
7771if ${ac_cv_path_LS+:} false; then :
7772  $as_echo_n "(cached) " >&6
7773else
7774  case $LS in
7775  [\\/]* | ?:[\\/]*)
7776  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7777  ;;
7778  *)
7779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780for as_dir in $PATH
7781do
7782  IFS=$as_save_IFS
7783  test -z "$as_dir" && as_dir=.
7784    for ac_exec_ext in '' $ac_executable_extensions; do
7785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7786    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7788    break 2
7789  fi
7790done
7791  done
7792IFS=$as_save_IFS
7793
7794  ;;
7795esac
7796fi
7797LS=$ac_cv_path_LS
7798if test -n "$LS"; then
7799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7800$as_echo "$LS" >&6; }
7801else
7802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7803$as_echo "no" >&6; }
7804fi
7805
7806
7807  test -n "$LS" && break
7808done
7809
7810    else
7811      # If it succeeded, then it was overridden by the user. We will use it
7812      # for the tool.
7813
7814      # First remove it from the list of overridden variables, so we can test
7815      # for unknown variables in the end.
7816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7817
7818      # Check if the provided tool contains a complete path.
7819      tool_specified="$LS"
7820      tool_basename="${tool_specified##*/}"
7821      if test "x$tool_basename" = "x$tool_specified"; then
7822        # A command without a complete path is provided, search $PATH.
7823        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7824$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7825        # Extract the first word of "$tool_basename", so it can be a program name with args.
7826set dummy $tool_basename; ac_word=$2
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7828$as_echo_n "checking for $ac_word... " >&6; }
7829if ${ac_cv_path_LS+:} false; then :
7830  $as_echo_n "(cached) " >&6
7831else
7832  case $LS in
7833  [\\/]* | ?:[\\/]*)
7834  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7835  ;;
7836  *)
7837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840  IFS=$as_save_IFS
7841  test -z "$as_dir" && as_dir=.
7842    for ac_exec_ext in '' $ac_executable_extensions; do
7843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7844    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7846    break 2
7847  fi
7848done
7849  done
7850IFS=$as_save_IFS
7851
7852  ;;
7853esac
7854fi
7855LS=$ac_cv_path_LS
7856if test -n "$LS"; then
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7858$as_echo "$LS" >&6; }
7859else
7860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7861$as_echo "no" >&6; }
7862fi
7863
7864
7865        if test "x$LS" = x; then
7866          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7867        fi
7868      else
7869        # Otherwise we believe it is a complete path. Use it as it is.
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7871$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7873$as_echo_n "checking for LS... " >&6; }
7874        if test ! -x "$tool_specified"; then
7875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7876$as_echo "not found" >&6; }
7877          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7878        fi
7879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7880$as_echo "$tool_specified" >&6; }
7881      fi
7882    fi
7883  fi
7884
7885
7886
7887  if test "x$LS" = x; then
7888    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7889  fi
7890
7891
7892
7893
7894
7895  # Publish this variable in the help.
7896
7897
7898  if test "x$MKDIR" = x; then
7899    # The variable is not set by user, try to locate tool using the code snippet
7900    for ac_prog in mkdir
7901do
7902  # Extract the first word of "$ac_prog", so it can be a program name with args.
7903set dummy $ac_prog; ac_word=$2
7904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7905$as_echo_n "checking for $ac_word... " >&6; }
7906if ${ac_cv_path_MKDIR+:} false; then :
7907  $as_echo_n "(cached) " >&6
7908else
7909  case $MKDIR in
7910  [\\/]* | ?:[\\/]*)
7911  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7912  ;;
7913  *)
7914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7915for as_dir in $PATH
7916do
7917  IFS=$as_save_IFS
7918  test -z "$as_dir" && as_dir=.
7919    for ac_exec_ext in '' $ac_executable_extensions; do
7920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7921    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7923    break 2
7924  fi
7925done
7926  done
7927IFS=$as_save_IFS
7928
7929  ;;
7930esac
7931fi
7932MKDIR=$ac_cv_path_MKDIR
7933if test -n "$MKDIR"; then
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7935$as_echo "$MKDIR" >&6; }
7936else
7937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7938$as_echo "no" >&6; }
7939fi
7940
7941
7942  test -n "$MKDIR" && break
7943done
7944
7945  else
7946    # The variable is set, but is it from the command line or the environment?
7947
7948    # Try to remove the string !MKDIR! from our list.
7949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7951      # If it failed, the variable was not from the command line. Ignore it,
7952      # but warn the user (except for BASH, which is always set by the calling BASH).
7953      if test "xMKDIR" != xBASH; then
7954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7955$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7956      fi
7957      # Try to locate tool using the code snippet
7958      for ac_prog in mkdir
7959do
7960  # Extract the first word of "$ac_prog", so it can be a program name with args.
7961set dummy $ac_prog; ac_word=$2
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7963$as_echo_n "checking for $ac_word... " >&6; }
7964if ${ac_cv_path_MKDIR+:} false; then :
7965  $as_echo_n "(cached) " >&6
7966else
7967  case $MKDIR in
7968  [\\/]* | ?:[\\/]*)
7969  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7970  ;;
7971  *)
7972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7973for as_dir in $PATH
7974do
7975  IFS=$as_save_IFS
7976  test -z "$as_dir" && as_dir=.
7977    for ac_exec_ext in '' $ac_executable_extensions; do
7978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7979    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7981    break 2
7982  fi
7983done
7984  done
7985IFS=$as_save_IFS
7986
7987  ;;
7988esac
7989fi
7990MKDIR=$ac_cv_path_MKDIR
7991if test -n "$MKDIR"; then
7992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7993$as_echo "$MKDIR" >&6; }
7994else
7995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7996$as_echo "no" >&6; }
7997fi
7998
7999
8000  test -n "$MKDIR" && break
8001done
8002
8003    else
8004      # If it succeeded, then it was overridden by the user. We will use it
8005      # for the tool.
8006
8007      # First remove it from the list of overridden variables, so we can test
8008      # for unknown variables in the end.
8009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8010
8011      # Check if the provided tool contains a complete path.
8012      tool_specified="$MKDIR"
8013      tool_basename="${tool_specified##*/}"
8014      if test "x$tool_basename" = "x$tool_specified"; then
8015        # A command without a complete path is provided, search $PATH.
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8017$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8018        # Extract the first word of "$tool_basename", so it can be a program name with args.
8019set dummy $tool_basename; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_MKDIR+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $MKDIR in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048MKDIR=$ac_cv_path_MKDIR
8049if test -n "$MKDIR"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8051$as_echo "$MKDIR" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058        if test "x$MKDIR" = x; then
8059          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8060        fi
8061      else
8062        # Otherwise we believe it is a complete path. Use it as it is.
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8064$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8066$as_echo_n "checking for MKDIR... " >&6; }
8067        if test ! -x "$tool_specified"; then
8068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8069$as_echo "not found" >&6; }
8070          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8071        fi
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8073$as_echo "$tool_specified" >&6; }
8074      fi
8075    fi
8076  fi
8077
8078
8079
8080  if test "x$MKDIR" = x; then
8081    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8082  fi
8083
8084
8085
8086
8087
8088  # Publish this variable in the help.
8089
8090
8091  if test "x$MKTEMP" = x; then
8092    # The variable is not set by user, try to locate tool using the code snippet
8093    for ac_prog in mktemp
8094do
8095  # Extract the first word of "$ac_prog", so it can be a program name with args.
8096set dummy $ac_prog; ac_word=$2
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8098$as_echo_n "checking for $ac_word... " >&6; }
8099if ${ac_cv_path_MKTEMP+:} false; then :
8100  $as_echo_n "(cached) " >&6
8101else
8102  case $MKTEMP in
8103  [\\/]* | ?:[\\/]*)
8104  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8105  ;;
8106  *)
8107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8108for as_dir in $PATH
8109do
8110  IFS=$as_save_IFS
8111  test -z "$as_dir" && as_dir=.
8112    for ac_exec_ext in '' $ac_executable_extensions; do
8113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8114    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8116    break 2
8117  fi
8118done
8119  done
8120IFS=$as_save_IFS
8121
8122  ;;
8123esac
8124fi
8125MKTEMP=$ac_cv_path_MKTEMP
8126if test -n "$MKTEMP"; then
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8128$as_echo "$MKTEMP" >&6; }
8129else
8130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8131$as_echo "no" >&6; }
8132fi
8133
8134
8135  test -n "$MKTEMP" && break
8136done
8137
8138  else
8139    # The variable is set, but is it from the command line or the environment?
8140
8141    # Try to remove the string !MKTEMP! from our list.
8142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8144      # If it failed, the variable was not from the command line. Ignore it,
8145      # but warn the user (except for BASH, which is always set by the calling BASH).
8146      if test "xMKTEMP" != xBASH; then
8147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8148$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8149      fi
8150      # Try to locate tool using the code snippet
8151      for ac_prog in mktemp
8152do
8153  # Extract the first word of "$ac_prog", so it can be a program name with args.
8154set dummy $ac_prog; ac_word=$2
8155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8156$as_echo_n "checking for $ac_word... " >&6; }
8157if ${ac_cv_path_MKTEMP+:} false; then :
8158  $as_echo_n "(cached) " >&6
8159else
8160  case $MKTEMP in
8161  [\\/]* | ?:[\\/]*)
8162  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8163  ;;
8164  *)
8165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8166for as_dir in $PATH
8167do
8168  IFS=$as_save_IFS
8169  test -z "$as_dir" && as_dir=.
8170    for ac_exec_ext in '' $ac_executable_extensions; do
8171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8172    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8174    break 2
8175  fi
8176done
8177  done
8178IFS=$as_save_IFS
8179
8180  ;;
8181esac
8182fi
8183MKTEMP=$ac_cv_path_MKTEMP
8184if test -n "$MKTEMP"; then
8185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8186$as_echo "$MKTEMP" >&6; }
8187else
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189$as_echo "no" >&6; }
8190fi
8191
8192
8193  test -n "$MKTEMP" && break
8194done
8195
8196    else
8197      # If it succeeded, then it was overridden by the user. We will use it
8198      # for the tool.
8199
8200      # First remove it from the list of overridden variables, so we can test
8201      # for unknown variables in the end.
8202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8203
8204      # Check if the provided tool contains a complete path.
8205      tool_specified="$MKTEMP"
8206      tool_basename="${tool_specified##*/}"
8207      if test "x$tool_basename" = "x$tool_specified"; then
8208        # A command without a complete path is provided, search $PATH.
8209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8210$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8211        # Extract the first word of "$tool_basename", so it can be a program name with args.
8212set dummy $tool_basename; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_path_MKTEMP+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  case $MKTEMP in
8219  [\\/]* | ?:[\\/]*)
8220  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8221  ;;
8222  *)
8223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8230    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238  ;;
8239esac
8240fi
8241MKTEMP=$ac_cv_path_MKTEMP
8242if test -n "$MKTEMP"; then
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8244$as_echo "$MKTEMP" >&6; }
8245else
8246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
8248fi
8249
8250
8251        if test "x$MKTEMP" = x; then
8252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8253        fi
8254      else
8255        # Otherwise we believe it is a complete path. Use it as it is.
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8257$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8259$as_echo_n "checking for MKTEMP... " >&6; }
8260        if test ! -x "$tool_specified"; then
8261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8262$as_echo "not found" >&6; }
8263          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8264        fi
8265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8266$as_echo "$tool_specified" >&6; }
8267      fi
8268    fi
8269  fi
8270
8271
8272
8273  if test "x$MKTEMP" = x; then
8274    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8275  fi
8276
8277
8278
8279
8280
8281  # Publish this variable in the help.
8282
8283
8284  if test "x$MV" = x; then
8285    # The variable is not set by user, try to locate tool using the code snippet
8286    for ac_prog in mv
8287do
8288  # Extract the first word of "$ac_prog", so it can be a program name with args.
8289set dummy $ac_prog; ac_word=$2
8290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8291$as_echo_n "checking for $ac_word... " >&6; }
8292if ${ac_cv_path_MV+:} false; then :
8293  $as_echo_n "(cached) " >&6
8294else
8295  case $MV in
8296  [\\/]* | ?:[\\/]*)
8297  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8298  ;;
8299  *)
8300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8301for as_dir in $PATH
8302do
8303  IFS=$as_save_IFS
8304  test -z "$as_dir" && as_dir=.
8305    for ac_exec_ext in '' $ac_executable_extensions; do
8306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8307    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8309    break 2
8310  fi
8311done
8312  done
8313IFS=$as_save_IFS
8314
8315  ;;
8316esac
8317fi
8318MV=$ac_cv_path_MV
8319if test -n "$MV"; then
8320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8321$as_echo "$MV" >&6; }
8322else
8323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8324$as_echo "no" >&6; }
8325fi
8326
8327
8328  test -n "$MV" && break
8329done
8330
8331  else
8332    # The variable is set, but is it from the command line or the environment?
8333
8334    # Try to remove the string !MV! from our list.
8335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8337      # If it failed, the variable was not from the command line. Ignore it,
8338      # but warn the user (except for BASH, which is always set by the calling BASH).
8339      if test "xMV" != xBASH; then
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8341$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8342      fi
8343      # Try to locate tool using the code snippet
8344      for ac_prog in mv
8345do
8346  # Extract the first word of "$ac_prog", so it can be a program name with args.
8347set dummy $ac_prog; ac_word=$2
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8349$as_echo_n "checking for $ac_word... " >&6; }
8350if ${ac_cv_path_MV+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353  case $MV in
8354  [\\/]* | ?:[\\/]*)
8355  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8356  ;;
8357  *)
8358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359for as_dir in $PATH
8360do
8361  IFS=$as_save_IFS
8362  test -z "$as_dir" && as_dir=.
8363    for ac_exec_ext in '' $ac_executable_extensions; do
8364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8365    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367    break 2
8368  fi
8369done
8370  done
8371IFS=$as_save_IFS
8372
8373  ;;
8374esac
8375fi
8376MV=$ac_cv_path_MV
8377if test -n "$MV"; then
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8379$as_echo "$MV" >&6; }
8380else
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8382$as_echo "no" >&6; }
8383fi
8384
8385
8386  test -n "$MV" && break
8387done
8388
8389    else
8390      # If it succeeded, then it was overridden by the user. We will use it
8391      # for the tool.
8392
8393      # First remove it from the list of overridden variables, so we can test
8394      # for unknown variables in the end.
8395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8396
8397      # Check if the provided tool contains a complete path.
8398      tool_specified="$MV"
8399      tool_basename="${tool_specified##*/}"
8400      if test "x$tool_basename" = "x$tool_specified"; then
8401        # A command without a complete path is provided, search $PATH.
8402        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8403$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8404        # Extract the first word of "$tool_basename", so it can be a program name with args.
8405set dummy $tool_basename; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_MV+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $MV in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434MV=$ac_cv_path_MV
8435if test -n "$MV"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8437$as_echo "$MV" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444        if test "x$MV" = x; then
8445          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8446        fi
8447      else
8448        # Otherwise we believe it is a complete path. Use it as it is.
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8450$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8452$as_echo_n "checking for MV... " >&6; }
8453        if test ! -x "$tool_specified"; then
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8455$as_echo "not found" >&6; }
8456          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8457        fi
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8459$as_echo "$tool_specified" >&6; }
8460      fi
8461    fi
8462  fi
8463
8464
8465
8466  if test "x$MV" = x; then
8467    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8468  fi
8469
8470
8471
8472
8473
8474  # Publish this variable in the help.
8475
8476
8477  if test "x$NAWK" = x; then
8478    # The variable is not set by user, try to locate tool using the code snippet
8479    for ac_prog in nawk gawk awk
8480do
8481  # Extract the first word of "$ac_prog", so it can be a program name with args.
8482set dummy $ac_prog; ac_word=$2
8483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484$as_echo_n "checking for $ac_word... " >&6; }
8485if ${ac_cv_path_NAWK+:} false; then :
8486  $as_echo_n "(cached) " >&6
8487else
8488  case $NAWK in
8489  [\\/]* | ?:[\\/]*)
8490  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8491  ;;
8492  *)
8493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8494for as_dir in $PATH
8495do
8496  IFS=$as_save_IFS
8497  test -z "$as_dir" && as_dir=.
8498    for ac_exec_ext in '' $ac_executable_extensions; do
8499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8500    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8502    break 2
8503  fi
8504done
8505  done
8506IFS=$as_save_IFS
8507
8508  ;;
8509esac
8510fi
8511NAWK=$ac_cv_path_NAWK
8512if test -n "$NAWK"; then
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8514$as_echo "$NAWK" >&6; }
8515else
8516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517$as_echo "no" >&6; }
8518fi
8519
8520
8521  test -n "$NAWK" && break
8522done
8523
8524  else
8525    # The variable is set, but is it from the command line or the environment?
8526
8527    # Try to remove the string !NAWK! from our list.
8528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8530      # If it failed, the variable was not from the command line. Ignore it,
8531      # but warn the user (except for BASH, which is always set by the calling BASH).
8532      if test "xNAWK" != xBASH; then
8533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8534$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8535      fi
8536      # Try to locate tool using the code snippet
8537      for ac_prog in nawk gawk awk
8538do
8539  # Extract the first word of "$ac_prog", so it can be a program name with args.
8540set dummy $ac_prog; ac_word=$2
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8542$as_echo_n "checking for $ac_word... " >&6; }
8543if ${ac_cv_path_NAWK+:} false; then :
8544  $as_echo_n "(cached) " >&6
8545else
8546  case $NAWK in
8547  [\\/]* | ?:[\\/]*)
8548  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8549  ;;
8550  *)
8551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8552for as_dir in $PATH
8553do
8554  IFS=$as_save_IFS
8555  test -z "$as_dir" && as_dir=.
8556    for ac_exec_ext in '' $ac_executable_extensions; do
8557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8558    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8560    break 2
8561  fi
8562done
8563  done
8564IFS=$as_save_IFS
8565
8566  ;;
8567esac
8568fi
8569NAWK=$ac_cv_path_NAWK
8570if test -n "$NAWK"; then
8571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8572$as_echo "$NAWK" >&6; }
8573else
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8575$as_echo "no" >&6; }
8576fi
8577
8578
8579  test -n "$NAWK" && break
8580done
8581
8582    else
8583      # If it succeeded, then it was overridden by the user. We will use it
8584      # for the tool.
8585
8586      # First remove it from the list of overridden variables, so we can test
8587      # for unknown variables in the end.
8588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8589
8590      # Check if the provided tool contains a complete path.
8591      tool_specified="$NAWK"
8592      tool_basename="${tool_specified##*/}"
8593      if test "x$tool_basename" = "x$tool_specified"; then
8594        # A command without a complete path is provided, search $PATH.
8595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8596$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8597        # Extract the first word of "$tool_basename", so it can be a program name with args.
8598set dummy $tool_basename; ac_word=$2
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600$as_echo_n "checking for $ac_word... " >&6; }
8601if ${ac_cv_path_NAWK+:} false; then :
8602  $as_echo_n "(cached) " >&6
8603else
8604  case $NAWK in
8605  [\\/]* | ?:[\\/]*)
8606  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8607  ;;
8608  *)
8609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610for as_dir in $PATH
8611do
8612  IFS=$as_save_IFS
8613  test -z "$as_dir" && as_dir=.
8614    for ac_exec_ext in '' $ac_executable_extensions; do
8615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8616    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8618    break 2
8619  fi
8620done
8621  done
8622IFS=$as_save_IFS
8623
8624  ;;
8625esac
8626fi
8627NAWK=$ac_cv_path_NAWK
8628if test -n "$NAWK"; then
8629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8630$as_echo "$NAWK" >&6; }
8631else
8632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8633$as_echo "no" >&6; }
8634fi
8635
8636
8637        if test "x$NAWK" = x; then
8638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8639        fi
8640      else
8641        # Otherwise we believe it is a complete path. Use it as it is.
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8643$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8645$as_echo_n "checking for NAWK... " >&6; }
8646        if test ! -x "$tool_specified"; then
8647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8648$as_echo "not found" >&6; }
8649          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8650        fi
8651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8652$as_echo "$tool_specified" >&6; }
8653      fi
8654    fi
8655  fi
8656
8657
8658
8659  if test "x$NAWK" = x; then
8660    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8661  fi
8662
8663
8664
8665
8666
8667  # Publish this variable in the help.
8668
8669
8670  if test "x$PRINTF" = x; then
8671    # The variable is not set by user, try to locate tool using the code snippet
8672    for ac_prog in printf
8673do
8674  # Extract the first word of "$ac_prog", so it can be a program name with args.
8675set dummy $ac_prog; ac_word=$2
8676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8677$as_echo_n "checking for $ac_word... " >&6; }
8678if ${ac_cv_path_PRINTF+:} false; then :
8679  $as_echo_n "(cached) " >&6
8680else
8681  case $PRINTF in
8682  [\\/]* | ?:[\\/]*)
8683  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8684  ;;
8685  *)
8686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8687for as_dir in $PATH
8688do
8689  IFS=$as_save_IFS
8690  test -z "$as_dir" && as_dir=.
8691    for ac_exec_ext in '' $ac_executable_extensions; do
8692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8693    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8695    break 2
8696  fi
8697done
8698  done
8699IFS=$as_save_IFS
8700
8701  ;;
8702esac
8703fi
8704PRINTF=$ac_cv_path_PRINTF
8705if test -n "$PRINTF"; then
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8707$as_echo "$PRINTF" >&6; }
8708else
8709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8710$as_echo "no" >&6; }
8711fi
8712
8713
8714  test -n "$PRINTF" && break
8715done
8716
8717  else
8718    # The variable is set, but is it from the command line or the environment?
8719
8720    # Try to remove the string !PRINTF! from our list.
8721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8723      # If it failed, the variable was not from the command line. Ignore it,
8724      # but warn the user (except for BASH, which is always set by the calling BASH).
8725      if test "xPRINTF" != xBASH; then
8726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8727$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8728      fi
8729      # Try to locate tool using the code snippet
8730      for ac_prog in printf
8731do
8732  # Extract the first word of "$ac_prog", so it can be a program name with args.
8733set dummy $ac_prog; ac_word=$2
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8735$as_echo_n "checking for $ac_word... " >&6; }
8736if ${ac_cv_path_PRINTF+:} false; then :
8737  $as_echo_n "(cached) " >&6
8738else
8739  case $PRINTF in
8740  [\\/]* | ?:[\\/]*)
8741  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8742  ;;
8743  *)
8744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8745for as_dir in $PATH
8746do
8747  IFS=$as_save_IFS
8748  test -z "$as_dir" && as_dir=.
8749    for ac_exec_ext in '' $ac_executable_extensions; do
8750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8751    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8753    break 2
8754  fi
8755done
8756  done
8757IFS=$as_save_IFS
8758
8759  ;;
8760esac
8761fi
8762PRINTF=$ac_cv_path_PRINTF
8763if test -n "$PRINTF"; then
8764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8765$as_echo "$PRINTF" >&6; }
8766else
8767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8768$as_echo "no" >&6; }
8769fi
8770
8771
8772  test -n "$PRINTF" && break
8773done
8774
8775    else
8776      # If it succeeded, then it was overridden by the user. We will use it
8777      # for the tool.
8778
8779      # First remove it from the list of overridden variables, so we can test
8780      # for unknown variables in the end.
8781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8782
8783      # Check if the provided tool contains a complete path.
8784      tool_specified="$PRINTF"
8785      tool_basename="${tool_specified##*/}"
8786      if test "x$tool_basename" = "x$tool_specified"; then
8787        # A command without a complete path is provided, search $PATH.
8788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8789$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8790        # Extract the first word of "$tool_basename", so it can be a program name with args.
8791set dummy $tool_basename; ac_word=$2
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8793$as_echo_n "checking for $ac_word... " >&6; }
8794if ${ac_cv_path_PRINTF+:} false; then :
8795  $as_echo_n "(cached) " >&6
8796else
8797  case $PRINTF in
8798  [\\/]* | ?:[\\/]*)
8799  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8800  ;;
8801  *)
8802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803for as_dir in $PATH
8804do
8805  IFS=$as_save_IFS
8806  test -z "$as_dir" && as_dir=.
8807    for ac_exec_ext in '' $ac_executable_extensions; do
8808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8809    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8811    break 2
8812  fi
8813done
8814  done
8815IFS=$as_save_IFS
8816
8817  ;;
8818esac
8819fi
8820PRINTF=$ac_cv_path_PRINTF
8821if test -n "$PRINTF"; then
8822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8823$as_echo "$PRINTF" >&6; }
8824else
8825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
8827fi
8828
8829
8830        if test "x$PRINTF" = x; then
8831          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8832        fi
8833      else
8834        # Otherwise we believe it is a complete path. Use it as it is.
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8836$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8838$as_echo_n "checking for PRINTF... " >&6; }
8839        if test ! -x "$tool_specified"; then
8840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8841$as_echo "not found" >&6; }
8842          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8843        fi
8844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8845$as_echo "$tool_specified" >&6; }
8846      fi
8847    fi
8848  fi
8849
8850
8851
8852  if test "x$PRINTF" = x; then
8853    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8854  fi
8855
8856
8857
8858
8859
8860  # Publish this variable in the help.
8861
8862
8863  if test "x$RM" = x; then
8864    # The variable is not set by user, try to locate tool using the code snippet
8865    for ac_prog in rm
8866do
8867  # Extract the first word of "$ac_prog", so it can be a program name with args.
8868set dummy $ac_prog; ac_word=$2
8869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8870$as_echo_n "checking for $ac_word... " >&6; }
8871if ${ac_cv_path_RM+:} false; then :
8872  $as_echo_n "(cached) " >&6
8873else
8874  case $RM in
8875  [\\/]* | ?:[\\/]*)
8876  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8877  ;;
8878  *)
8879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8880for as_dir in $PATH
8881do
8882  IFS=$as_save_IFS
8883  test -z "$as_dir" && as_dir=.
8884    for ac_exec_ext in '' $ac_executable_extensions; do
8885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8886    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8888    break 2
8889  fi
8890done
8891  done
8892IFS=$as_save_IFS
8893
8894  ;;
8895esac
8896fi
8897RM=$ac_cv_path_RM
8898if test -n "$RM"; then
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8900$as_echo "$RM" >&6; }
8901else
8902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8903$as_echo "no" >&6; }
8904fi
8905
8906
8907  test -n "$RM" && break
8908done
8909
8910  else
8911    # The variable is set, but is it from the command line or the environment?
8912
8913    # Try to remove the string !RM! from our list.
8914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8916      # If it failed, the variable was not from the command line. Ignore it,
8917      # but warn the user (except for BASH, which is always set by the calling BASH).
8918      if test "xRM" != xBASH; then
8919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8920$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8921      fi
8922      # Try to locate tool using the code snippet
8923      for ac_prog in rm
8924do
8925  # Extract the first word of "$ac_prog", so it can be a program name with args.
8926set dummy $ac_prog; ac_word=$2
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928$as_echo_n "checking for $ac_word... " >&6; }
8929if ${ac_cv_path_RM+:} false; then :
8930  $as_echo_n "(cached) " >&6
8931else
8932  case $RM in
8933  [\\/]* | ?:[\\/]*)
8934  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8935  ;;
8936  *)
8937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8938for as_dir in $PATH
8939do
8940  IFS=$as_save_IFS
8941  test -z "$as_dir" && as_dir=.
8942    for ac_exec_ext in '' $ac_executable_extensions; do
8943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8944    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8946    break 2
8947  fi
8948done
8949  done
8950IFS=$as_save_IFS
8951
8952  ;;
8953esac
8954fi
8955RM=$ac_cv_path_RM
8956if test -n "$RM"; then
8957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8958$as_echo "$RM" >&6; }
8959else
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8961$as_echo "no" >&6; }
8962fi
8963
8964
8965  test -n "$RM" && break
8966done
8967
8968    else
8969      # If it succeeded, then it was overridden by the user. We will use it
8970      # for the tool.
8971
8972      # First remove it from the list of overridden variables, so we can test
8973      # for unknown variables in the end.
8974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8975
8976      # Check if the provided tool contains a complete path.
8977      tool_specified="$RM"
8978      tool_basename="${tool_specified##*/}"
8979      if test "x$tool_basename" = "x$tool_specified"; then
8980        # A command without a complete path is provided, search $PATH.
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8982$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8983        # Extract the first word of "$tool_basename", so it can be a program name with args.
8984set dummy $tool_basename; ac_word=$2
8985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8986$as_echo_n "checking for $ac_word... " >&6; }
8987if ${ac_cv_path_RM+:} false; then :
8988  $as_echo_n "(cached) " >&6
8989else
8990  case $RM in
8991  [\\/]* | ?:[\\/]*)
8992  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8993  ;;
8994  *)
8995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8996for as_dir in $PATH
8997do
8998  IFS=$as_save_IFS
8999  test -z "$as_dir" && as_dir=.
9000    for ac_exec_ext in '' $ac_executable_extensions; do
9001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9002    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9004    break 2
9005  fi
9006done
9007  done
9008IFS=$as_save_IFS
9009
9010  ;;
9011esac
9012fi
9013RM=$ac_cv_path_RM
9014if test -n "$RM"; then
9015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9016$as_echo "$RM" >&6; }
9017else
9018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9019$as_echo "no" >&6; }
9020fi
9021
9022
9023        if test "x$RM" = x; then
9024          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9025        fi
9026      else
9027        # Otherwise we believe it is a complete path. Use it as it is.
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9029$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9031$as_echo_n "checking for RM... " >&6; }
9032        if test ! -x "$tool_specified"; then
9033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9034$as_echo "not found" >&6; }
9035          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9036        fi
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9038$as_echo "$tool_specified" >&6; }
9039      fi
9040    fi
9041  fi
9042
9043
9044
9045  if test "x$RM" = x; then
9046    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9047  fi
9048
9049
9050
9051
9052
9053  # Publish this variable in the help.
9054
9055
9056  if test "x$SH" = x; then
9057    # The variable is not set by user, try to locate tool using the code snippet
9058    for ac_prog in sh
9059do
9060  # Extract the first word of "$ac_prog", so it can be a program name with args.
9061set dummy $ac_prog; ac_word=$2
9062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9063$as_echo_n "checking for $ac_word... " >&6; }
9064if ${ac_cv_path_SH+:} false; then :
9065  $as_echo_n "(cached) " >&6
9066else
9067  case $SH in
9068  [\\/]* | ?:[\\/]*)
9069  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9070  ;;
9071  *)
9072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9073for as_dir in $PATH
9074do
9075  IFS=$as_save_IFS
9076  test -z "$as_dir" && as_dir=.
9077    for ac_exec_ext in '' $ac_executable_extensions; do
9078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9079    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9081    break 2
9082  fi
9083done
9084  done
9085IFS=$as_save_IFS
9086
9087  ;;
9088esac
9089fi
9090SH=$ac_cv_path_SH
9091if test -n "$SH"; then
9092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9093$as_echo "$SH" >&6; }
9094else
9095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9096$as_echo "no" >&6; }
9097fi
9098
9099
9100  test -n "$SH" && break
9101done
9102
9103  else
9104    # The variable is set, but is it from the command line or the environment?
9105
9106    # Try to remove the string !SH! from our list.
9107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9109      # If it failed, the variable was not from the command line. Ignore it,
9110      # but warn the user (except for BASH, which is always set by the calling BASH).
9111      if test "xSH" != xBASH; then
9112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9113$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9114      fi
9115      # Try to locate tool using the code snippet
9116      for ac_prog in sh
9117do
9118  # Extract the first word of "$ac_prog", so it can be a program name with args.
9119set dummy $ac_prog; ac_word=$2
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9121$as_echo_n "checking for $ac_word... " >&6; }
9122if ${ac_cv_path_SH+:} false; then :
9123  $as_echo_n "(cached) " >&6
9124else
9125  case $SH in
9126  [\\/]* | ?:[\\/]*)
9127  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9128  ;;
9129  *)
9130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9131for as_dir in $PATH
9132do
9133  IFS=$as_save_IFS
9134  test -z "$as_dir" && as_dir=.
9135    for ac_exec_ext in '' $ac_executable_extensions; do
9136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9137    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9139    break 2
9140  fi
9141done
9142  done
9143IFS=$as_save_IFS
9144
9145  ;;
9146esac
9147fi
9148SH=$ac_cv_path_SH
9149if test -n "$SH"; then
9150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9151$as_echo "$SH" >&6; }
9152else
9153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9154$as_echo "no" >&6; }
9155fi
9156
9157
9158  test -n "$SH" && break
9159done
9160
9161    else
9162      # If it succeeded, then it was overridden by the user. We will use it
9163      # for the tool.
9164
9165      # First remove it from the list of overridden variables, so we can test
9166      # for unknown variables in the end.
9167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9168
9169      # Check if the provided tool contains a complete path.
9170      tool_specified="$SH"
9171      tool_basename="${tool_specified##*/}"
9172      if test "x$tool_basename" = "x$tool_specified"; then
9173        # A command without a complete path is provided, search $PATH.
9174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9175$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9176        # Extract the first word of "$tool_basename", so it can be a program name with args.
9177set dummy $tool_basename; ac_word=$2
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9179$as_echo_n "checking for $ac_word... " >&6; }
9180if ${ac_cv_path_SH+:} false; then :
9181  $as_echo_n "(cached) " >&6
9182else
9183  case $SH in
9184  [\\/]* | ?:[\\/]*)
9185  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9186  ;;
9187  *)
9188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9189for as_dir in $PATH
9190do
9191  IFS=$as_save_IFS
9192  test -z "$as_dir" && as_dir=.
9193    for ac_exec_ext in '' $ac_executable_extensions; do
9194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9195    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9197    break 2
9198  fi
9199done
9200  done
9201IFS=$as_save_IFS
9202
9203  ;;
9204esac
9205fi
9206SH=$ac_cv_path_SH
9207if test -n "$SH"; then
9208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9209$as_echo "$SH" >&6; }
9210else
9211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9212$as_echo "no" >&6; }
9213fi
9214
9215
9216        if test "x$SH" = x; then
9217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9218        fi
9219      else
9220        # Otherwise we believe it is a complete path. Use it as it is.
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9222$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9224$as_echo_n "checking for SH... " >&6; }
9225        if test ! -x "$tool_specified"; then
9226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9227$as_echo "not found" >&6; }
9228          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9229        fi
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9231$as_echo "$tool_specified" >&6; }
9232      fi
9233    fi
9234  fi
9235
9236
9237
9238  if test "x$SH" = x; then
9239    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9240  fi
9241
9242
9243
9244
9245
9246  # Publish this variable in the help.
9247
9248
9249  if test "x$SORT" = x; then
9250    # The variable is not set by user, try to locate tool using the code snippet
9251    for ac_prog in sort
9252do
9253  # Extract the first word of "$ac_prog", so it can be a program name with args.
9254set dummy $ac_prog; ac_word=$2
9255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9256$as_echo_n "checking for $ac_word... " >&6; }
9257if ${ac_cv_path_SORT+:} false; then :
9258  $as_echo_n "(cached) " >&6
9259else
9260  case $SORT in
9261  [\\/]* | ?:[\\/]*)
9262  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9263  ;;
9264  *)
9265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9266for as_dir in $PATH
9267do
9268  IFS=$as_save_IFS
9269  test -z "$as_dir" && as_dir=.
9270    for ac_exec_ext in '' $ac_executable_extensions; do
9271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9272    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9274    break 2
9275  fi
9276done
9277  done
9278IFS=$as_save_IFS
9279
9280  ;;
9281esac
9282fi
9283SORT=$ac_cv_path_SORT
9284if test -n "$SORT"; then
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9286$as_echo "$SORT" >&6; }
9287else
9288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9289$as_echo "no" >&6; }
9290fi
9291
9292
9293  test -n "$SORT" && break
9294done
9295
9296  else
9297    # The variable is set, but is it from the command line or the environment?
9298
9299    # Try to remove the string !SORT! from our list.
9300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9302      # If it failed, the variable was not from the command line. Ignore it,
9303      # but warn the user (except for BASH, which is always set by the calling BASH).
9304      if test "xSORT" != xBASH; then
9305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9306$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9307      fi
9308      # Try to locate tool using the code snippet
9309      for ac_prog in sort
9310do
9311  # Extract the first word of "$ac_prog", so it can be a program name with args.
9312set dummy $ac_prog; ac_word=$2
9313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9314$as_echo_n "checking for $ac_word... " >&6; }
9315if ${ac_cv_path_SORT+:} false; then :
9316  $as_echo_n "(cached) " >&6
9317else
9318  case $SORT in
9319  [\\/]* | ?:[\\/]*)
9320  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9321  ;;
9322  *)
9323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9324for as_dir in $PATH
9325do
9326  IFS=$as_save_IFS
9327  test -z "$as_dir" && as_dir=.
9328    for ac_exec_ext in '' $ac_executable_extensions; do
9329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9330    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9332    break 2
9333  fi
9334done
9335  done
9336IFS=$as_save_IFS
9337
9338  ;;
9339esac
9340fi
9341SORT=$ac_cv_path_SORT
9342if test -n "$SORT"; then
9343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9344$as_echo "$SORT" >&6; }
9345else
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347$as_echo "no" >&6; }
9348fi
9349
9350
9351  test -n "$SORT" && break
9352done
9353
9354    else
9355      # If it succeeded, then it was overridden by the user. We will use it
9356      # for the tool.
9357
9358      # First remove it from the list of overridden variables, so we can test
9359      # for unknown variables in the end.
9360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9361
9362      # Check if the provided tool contains a complete path.
9363      tool_specified="$SORT"
9364      tool_basename="${tool_specified##*/}"
9365      if test "x$tool_basename" = "x$tool_specified"; then
9366        # A command without a complete path is provided, search $PATH.
9367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9368$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9369        # Extract the first word of "$tool_basename", so it can be a program name with args.
9370set dummy $tool_basename; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_SORT+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $SORT in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399SORT=$ac_cv_path_SORT
9400if test -n "$SORT"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9402$as_echo "$SORT" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409        if test "x$SORT" = x; then
9410          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411        fi
9412      else
9413        # Otherwise we believe it is a complete path. Use it as it is.
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9415$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9417$as_echo_n "checking for SORT... " >&6; }
9418        if test ! -x "$tool_specified"; then
9419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420$as_echo "not found" >&6; }
9421          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9422        fi
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424$as_echo "$tool_specified" >&6; }
9425      fi
9426    fi
9427  fi
9428
9429
9430
9431  if test "x$SORT" = x; then
9432    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9433  fi
9434
9435
9436
9437
9438
9439  # Publish this variable in the help.
9440
9441
9442  if test "x$TAIL" = x; then
9443    # The variable is not set by user, try to locate tool using the code snippet
9444    for ac_prog in tail
9445do
9446  # Extract the first word of "$ac_prog", so it can be a program name with args.
9447set dummy $ac_prog; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_TAIL+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $TAIL in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476TAIL=$ac_cv_path_TAIL
9477if test -n "$TAIL"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9479$as_echo "$TAIL" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486  test -n "$TAIL" && break
9487done
9488
9489  else
9490    # The variable is set, but is it from the command line or the environment?
9491
9492    # Try to remove the string !TAIL! from our list.
9493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9495      # If it failed, the variable was not from the command line. Ignore it,
9496      # but warn the user (except for BASH, which is always set by the calling BASH).
9497      if test "xTAIL" != xBASH; then
9498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9499$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9500      fi
9501      # Try to locate tool using the code snippet
9502      for ac_prog in tail
9503do
9504  # Extract the first word of "$ac_prog", so it can be a program name with args.
9505set dummy $ac_prog; ac_word=$2
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507$as_echo_n "checking for $ac_word... " >&6; }
9508if ${ac_cv_path_TAIL+:} false; then :
9509  $as_echo_n "(cached) " >&6
9510else
9511  case $TAIL in
9512  [\\/]* | ?:[\\/]*)
9513  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9514  ;;
9515  *)
9516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9517for as_dir in $PATH
9518do
9519  IFS=$as_save_IFS
9520  test -z "$as_dir" && as_dir=.
9521    for ac_exec_ext in '' $ac_executable_extensions; do
9522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9523    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9525    break 2
9526  fi
9527done
9528  done
9529IFS=$as_save_IFS
9530
9531  ;;
9532esac
9533fi
9534TAIL=$ac_cv_path_TAIL
9535if test -n "$TAIL"; then
9536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9537$as_echo "$TAIL" >&6; }
9538else
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
9541fi
9542
9543
9544  test -n "$TAIL" && break
9545done
9546
9547    else
9548      # If it succeeded, then it was overridden by the user. We will use it
9549      # for the tool.
9550
9551      # First remove it from the list of overridden variables, so we can test
9552      # for unknown variables in the end.
9553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9554
9555      # Check if the provided tool contains a complete path.
9556      tool_specified="$TAIL"
9557      tool_basename="${tool_specified##*/}"
9558      if test "x$tool_basename" = "x$tool_specified"; then
9559        # A command without a complete path is provided, search $PATH.
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9561$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9562        # Extract the first word of "$tool_basename", so it can be a program name with args.
9563set dummy $tool_basename; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_TAIL+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $TAIL in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592TAIL=$ac_cv_path_TAIL
9593if test -n "$TAIL"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9595$as_echo "$TAIL" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602        if test "x$TAIL" = x; then
9603          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9604        fi
9605      else
9606        # Otherwise we believe it is a complete path. Use it as it is.
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9608$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9610$as_echo_n "checking for TAIL... " >&6; }
9611        if test ! -x "$tool_specified"; then
9612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9613$as_echo "not found" >&6; }
9614          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9615        fi
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9617$as_echo "$tool_specified" >&6; }
9618      fi
9619    fi
9620  fi
9621
9622
9623
9624  if test "x$TAIL" = x; then
9625    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9626  fi
9627
9628
9629
9630
9631
9632  # Publish this variable in the help.
9633
9634
9635  if test "x$TAR" = x; then
9636    # The variable is not set by user, try to locate tool using the code snippet
9637    for ac_prog in tar
9638do
9639  # Extract the first word of "$ac_prog", so it can be a program name with args.
9640set dummy $ac_prog; ac_word=$2
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9642$as_echo_n "checking for $ac_word... " >&6; }
9643if ${ac_cv_path_TAR+:} false; then :
9644  $as_echo_n "(cached) " >&6
9645else
9646  case $TAR in
9647  [\\/]* | ?:[\\/]*)
9648  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9649  ;;
9650  *)
9651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9652for as_dir in $PATH
9653do
9654  IFS=$as_save_IFS
9655  test -z "$as_dir" && as_dir=.
9656    for ac_exec_ext in '' $ac_executable_extensions; do
9657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9658    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9660    break 2
9661  fi
9662done
9663  done
9664IFS=$as_save_IFS
9665
9666  ;;
9667esac
9668fi
9669TAR=$ac_cv_path_TAR
9670if test -n "$TAR"; then
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9672$as_echo "$TAR" >&6; }
9673else
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675$as_echo "no" >&6; }
9676fi
9677
9678
9679  test -n "$TAR" && break
9680done
9681
9682  else
9683    # The variable is set, but is it from the command line or the environment?
9684
9685    # Try to remove the string !TAR! from our list.
9686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9688      # If it failed, the variable was not from the command line. Ignore it,
9689      # but warn the user (except for BASH, which is always set by the calling BASH).
9690      if test "xTAR" != xBASH; then
9691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9692$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9693      fi
9694      # Try to locate tool using the code snippet
9695      for ac_prog in tar
9696do
9697  # Extract the first word of "$ac_prog", so it can be a program name with args.
9698set dummy $ac_prog; ac_word=$2
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9700$as_echo_n "checking for $ac_word... " >&6; }
9701if ${ac_cv_path_TAR+:} false; then :
9702  $as_echo_n "(cached) " >&6
9703else
9704  case $TAR in
9705  [\\/]* | ?:[\\/]*)
9706  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9707  ;;
9708  *)
9709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9710for as_dir in $PATH
9711do
9712  IFS=$as_save_IFS
9713  test -z "$as_dir" && as_dir=.
9714    for ac_exec_ext in '' $ac_executable_extensions; do
9715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9716    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9718    break 2
9719  fi
9720done
9721  done
9722IFS=$as_save_IFS
9723
9724  ;;
9725esac
9726fi
9727TAR=$ac_cv_path_TAR
9728if test -n "$TAR"; then
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9730$as_echo "$TAR" >&6; }
9731else
9732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733$as_echo "no" >&6; }
9734fi
9735
9736
9737  test -n "$TAR" && break
9738done
9739
9740    else
9741      # If it succeeded, then it was overridden by the user. We will use it
9742      # for the tool.
9743
9744      # First remove it from the list of overridden variables, so we can test
9745      # for unknown variables in the end.
9746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9747
9748      # Check if the provided tool contains a complete path.
9749      tool_specified="$TAR"
9750      tool_basename="${tool_specified##*/}"
9751      if test "x$tool_basename" = "x$tool_specified"; then
9752        # A command without a complete path is provided, search $PATH.
9753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9754$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9755        # Extract the first word of "$tool_basename", so it can be a program name with args.
9756set dummy $tool_basename; ac_word=$2
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9758$as_echo_n "checking for $ac_word... " >&6; }
9759if ${ac_cv_path_TAR+:} false; then :
9760  $as_echo_n "(cached) " >&6
9761else
9762  case $TAR in
9763  [\\/]* | ?:[\\/]*)
9764  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9765  ;;
9766  *)
9767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9768for as_dir in $PATH
9769do
9770  IFS=$as_save_IFS
9771  test -z "$as_dir" && as_dir=.
9772    for ac_exec_ext in '' $ac_executable_extensions; do
9773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9774    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9776    break 2
9777  fi
9778done
9779  done
9780IFS=$as_save_IFS
9781
9782  ;;
9783esac
9784fi
9785TAR=$ac_cv_path_TAR
9786if test -n "$TAR"; then
9787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9788$as_echo "$TAR" >&6; }
9789else
9790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9791$as_echo "no" >&6; }
9792fi
9793
9794
9795        if test "x$TAR" = x; then
9796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9797        fi
9798      else
9799        # Otherwise we believe it is a complete path. Use it as it is.
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9801$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9803$as_echo_n "checking for TAR... " >&6; }
9804        if test ! -x "$tool_specified"; then
9805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9806$as_echo "not found" >&6; }
9807          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9808        fi
9809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9810$as_echo "$tool_specified" >&6; }
9811      fi
9812    fi
9813  fi
9814
9815
9816
9817  if test "x$TAR" = x; then
9818    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9819  fi
9820
9821
9822
9823
9824
9825  # Publish this variable in the help.
9826
9827
9828  if test "x$TEE" = x; then
9829    # The variable is not set by user, try to locate tool using the code snippet
9830    for ac_prog in tee
9831do
9832  # Extract the first word of "$ac_prog", so it can be a program name with args.
9833set dummy $ac_prog; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_TEE+:} false; then :
9837  $as_echo_n "(cached) " >&6
9838else
9839  case $TEE in
9840  [\\/]* | ?:[\\/]*)
9841  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9842  ;;
9843  *)
9844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847  IFS=$as_save_IFS
9848  test -z "$as_dir" && as_dir=.
9849    for ac_exec_ext in '' $ac_executable_extensions; do
9850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853    break 2
9854  fi
9855done
9856  done
9857IFS=$as_save_IFS
9858
9859  ;;
9860esac
9861fi
9862TEE=$ac_cv_path_TEE
9863if test -n "$TEE"; then
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9865$as_echo "$TEE" >&6; }
9866else
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871
9872  test -n "$TEE" && break
9873done
9874
9875  else
9876    # The variable is set, but is it from the command line or the environment?
9877
9878    # Try to remove the string !TEE! from our list.
9879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9881      # If it failed, the variable was not from the command line. Ignore it,
9882      # but warn the user (except for BASH, which is always set by the calling BASH).
9883      if test "xTEE" != xBASH; then
9884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9885$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9886      fi
9887      # Try to locate tool using the code snippet
9888      for ac_prog in tee
9889do
9890  # Extract the first word of "$ac_prog", so it can be a program name with args.
9891set dummy $ac_prog; ac_word=$2
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9893$as_echo_n "checking for $ac_word... " >&6; }
9894if ${ac_cv_path_TEE+:} false; then :
9895  $as_echo_n "(cached) " >&6
9896else
9897  case $TEE in
9898  [\\/]* | ?:[\\/]*)
9899  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9900  ;;
9901  *)
9902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9903for as_dir in $PATH
9904do
9905  IFS=$as_save_IFS
9906  test -z "$as_dir" && as_dir=.
9907    for ac_exec_ext in '' $ac_executable_extensions; do
9908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9909    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9911    break 2
9912  fi
9913done
9914  done
9915IFS=$as_save_IFS
9916
9917  ;;
9918esac
9919fi
9920TEE=$ac_cv_path_TEE
9921if test -n "$TEE"; then
9922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9923$as_echo "$TEE" >&6; }
9924else
9925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927fi
9928
9929
9930  test -n "$TEE" && break
9931done
9932
9933    else
9934      # If it succeeded, then it was overridden by the user. We will use it
9935      # for the tool.
9936
9937      # First remove it from the list of overridden variables, so we can test
9938      # for unknown variables in the end.
9939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9940
9941      # Check if the provided tool contains a complete path.
9942      tool_specified="$TEE"
9943      tool_basename="${tool_specified##*/}"
9944      if test "x$tool_basename" = "x$tool_specified"; then
9945        # A command without a complete path is provided, search $PATH.
9946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9947$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9948        # Extract the first word of "$tool_basename", so it can be a program name with args.
9949set dummy $tool_basename; ac_word=$2
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951$as_echo_n "checking for $ac_word... " >&6; }
9952if ${ac_cv_path_TEE+:} false; then :
9953  $as_echo_n "(cached) " >&6
9954else
9955  case $TEE in
9956  [\\/]* | ?:[\\/]*)
9957  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9958  ;;
9959  *)
9960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9967    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975  ;;
9976esac
9977fi
9978TEE=$ac_cv_path_TEE
9979if test -n "$TEE"; then
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9981$as_echo "$TEE" >&6; }
9982else
9983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985fi
9986
9987
9988        if test "x$TEE" = x; then
9989          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9990        fi
9991      else
9992        # Otherwise we believe it is a complete path. Use it as it is.
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9994$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9996$as_echo_n "checking for TEE... " >&6; }
9997        if test ! -x "$tool_specified"; then
9998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9999$as_echo "not found" >&6; }
10000          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10001        fi
10002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10003$as_echo "$tool_specified" >&6; }
10004      fi
10005    fi
10006  fi
10007
10008
10009
10010  if test "x$TEE" = x; then
10011    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10012  fi
10013
10014
10015
10016
10017
10018  # Publish this variable in the help.
10019
10020
10021  if test "x$TOUCH" = x; then
10022    # The variable is not set by user, try to locate tool using the code snippet
10023    for ac_prog in touch
10024do
10025  # Extract the first word of "$ac_prog", so it can be a program name with args.
10026set dummy $ac_prog; ac_word=$2
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10028$as_echo_n "checking for $ac_word... " >&6; }
10029if ${ac_cv_path_TOUCH+:} false; then :
10030  $as_echo_n "(cached) " >&6
10031else
10032  case $TOUCH in
10033  [\\/]* | ?:[\\/]*)
10034  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10035  ;;
10036  *)
10037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10038for as_dir in $PATH
10039do
10040  IFS=$as_save_IFS
10041  test -z "$as_dir" && as_dir=.
10042    for ac_exec_ext in '' $ac_executable_extensions; do
10043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10044    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10046    break 2
10047  fi
10048done
10049  done
10050IFS=$as_save_IFS
10051
10052  ;;
10053esac
10054fi
10055TOUCH=$ac_cv_path_TOUCH
10056if test -n "$TOUCH"; then
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10058$as_echo "$TOUCH" >&6; }
10059else
10060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
10062fi
10063
10064
10065  test -n "$TOUCH" && break
10066done
10067
10068  else
10069    # The variable is set, but is it from the command line or the environment?
10070
10071    # Try to remove the string !TOUCH! from our list.
10072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10074      # If it failed, the variable was not from the command line. Ignore it,
10075      # but warn the user (except for BASH, which is always set by the calling BASH).
10076      if test "xTOUCH" != xBASH; then
10077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10078$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10079      fi
10080      # Try to locate tool using the code snippet
10081      for ac_prog in touch
10082do
10083  # Extract the first word of "$ac_prog", so it can be a program name with args.
10084set dummy $ac_prog; ac_word=$2
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10086$as_echo_n "checking for $ac_word... " >&6; }
10087if ${ac_cv_path_TOUCH+:} false; then :
10088  $as_echo_n "(cached) " >&6
10089else
10090  case $TOUCH in
10091  [\\/]* | ?:[\\/]*)
10092  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10093  ;;
10094  *)
10095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096for as_dir in $PATH
10097do
10098  IFS=$as_save_IFS
10099  test -z "$as_dir" && as_dir=.
10100    for ac_exec_ext in '' $ac_executable_extensions; do
10101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10102    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10104    break 2
10105  fi
10106done
10107  done
10108IFS=$as_save_IFS
10109
10110  ;;
10111esac
10112fi
10113TOUCH=$ac_cv_path_TOUCH
10114if test -n "$TOUCH"; then
10115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10116$as_echo "$TOUCH" >&6; }
10117else
10118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119$as_echo "no" >&6; }
10120fi
10121
10122
10123  test -n "$TOUCH" && break
10124done
10125
10126    else
10127      # If it succeeded, then it was overridden by the user. We will use it
10128      # for the tool.
10129
10130      # First remove it from the list of overridden variables, so we can test
10131      # for unknown variables in the end.
10132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10133
10134      # Check if the provided tool contains a complete path.
10135      tool_specified="$TOUCH"
10136      tool_basename="${tool_specified##*/}"
10137      if test "x$tool_basename" = "x$tool_specified"; then
10138        # A command without a complete path is provided, search $PATH.
10139        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10140$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10141        # Extract the first word of "$tool_basename", so it can be a program name with args.
10142set dummy $tool_basename; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if ${ac_cv_path_TOUCH+:} false; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $TOUCH in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10160    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171TOUCH=$ac_cv_path_TOUCH
10172if test -n "$TOUCH"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10174$as_echo "$TOUCH" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181        if test "x$TOUCH" = x; then
10182          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10183        fi
10184      else
10185        # Otherwise we believe it is a complete path. Use it as it is.
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10187$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10189$as_echo_n "checking for TOUCH... " >&6; }
10190        if test ! -x "$tool_specified"; then
10191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10192$as_echo "not found" >&6; }
10193          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10194        fi
10195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10196$as_echo "$tool_specified" >&6; }
10197      fi
10198    fi
10199  fi
10200
10201
10202
10203  if test "x$TOUCH" = x; then
10204    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10205  fi
10206
10207
10208
10209
10210
10211  # Publish this variable in the help.
10212
10213
10214  if test "x$TR" = x; then
10215    # The variable is not set by user, try to locate tool using the code snippet
10216    for ac_prog in tr
10217do
10218  # Extract the first word of "$ac_prog", so it can be a program name with args.
10219set dummy $ac_prog; ac_word=$2
10220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10221$as_echo_n "checking for $ac_word... " >&6; }
10222if ${ac_cv_path_TR+:} false; then :
10223  $as_echo_n "(cached) " >&6
10224else
10225  case $TR in
10226  [\\/]* | ?:[\\/]*)
10227  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10228  ;;
10229  *)
10230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10231for as_dir in $PATH
10232do
10233  IFS=$as_save_IFS
10234  test -z "$as_dir" && as_dir=.
10235    for ac_exec_ext in '' $ac_executable_extensions; do
10236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10237    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10239    break 2
10240  fi
10241done
10242  done
10243IFS=$as_save_IFS
10244
10245  ;;
10246esac
10247fi
10248TR=$ac_cv_path_TR
10249if test -n "$TR"; then
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10251$as_echo "$TR" >&6; }
10252else
10253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
10255fi
10256
10257
10258  test -n "$TR" && break
10259done
10260
10261  else
10262    # The variable is set, but is it from the command line or the environment?
10263
10264    # Try to remove the string !TR! from our list.
10265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10267      # If it failed, the variable was not from the command line. Ignore it,
10268      # but warn the user (except for BASH, which is always set by the calling BASH).
10269      if test "xTR" != xBASH; then
10270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10271$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10272      fi
10273      # Try to locate tool using the code snippet
10274      for ac_prog in tr
10275do
10276  # Extract the first word of "$ac_prog", so it can be a program name with args.
10277set dummy $ac_prog; ac_word=$2
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279$as_echo_n "checking for $ac_word... " >&6; }
10280if ${ac_cv_path_TR+:} false; then :
10281  $as_echo_n "(cached) " >&6
10282else
10283  case $TR in
10284  [\\/]* | ?:[\\/]*)
10285  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10286  ;;
10287  *)
10288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289for as_dir in $PATH
10290do
10291  IFS=$as_save_IFS
10292  test -z "$as_dir" && as_dir=.
10293    for ac_exec_ext in '' $ac_executable_extensions; do
10294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10295    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297    break 2
10298  fi
10299done
10300  done
10301IFS=$as_save_IFS
10302
10303  ;;
10304esac
10305fi
10306TR=$ac_cv_path_TR
10307if test -n "$TR"; then
10308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10309$as_echo "$TR" >&6; }
10310else
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312$as_echo "no" >&6; }
10313fi
10314
10315
10316  test -n "$TR" && break
10317done
10318
10319    else
10320      # If it succeeded, then it was overridden by the user. We will use it
10321      # for the tool.
10322
10323      # First remove it from the list of overridden variables, so we can test
10324      # for unknown variables in the end.
10325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10326
10327      # Check if the provided tool contains a complete path.
10328      tool_specified="$TR"
10329      tool_basename="${tool_specified##*/}"
10330      if test "x$tool_basename" = "x$tool_specified"; then
10331        # A command without a complete path is provided, search $PATH.
10332        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10333$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10334        # Extract the first word of "$tool_basename", so it can be a program name with args.
10335set dummy $tool_basename; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if ${ac_cv_path_TR+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  case $TR in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $PATH
10348do
10349  IFS=$as_save_IFS
10350  test -z "$as_dir" && as_dir=.
10351    for ac_exec_ext in '' $ac_executable_extensions; do
10352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355    break 2
10356  fi
10357done
10358  done
10359IFS=$as_save_IFS
10360
10361  ;;
10362esac
10363fi
10364TR=$ac_cv_path_TR
10365if test -n "$TR"; then
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10367$as_echo "$TR" >&6; }
10368else
10369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
10371fi
10372
10373
10374        if test "x$TR" = x; then
10375          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10376        fi
10377      else
10378        # Otherwise we believe it is a complete path. Use it as it is.
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10380$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10382$as_echo_n "checking for TR... " >&6; }
10383        if test ! -x "$tool_specified"; then
10384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10385$as_echo "not found" >&6; }
10386          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10387        fi
10388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10389$as_echo "$tool_specified" >&6; }
10390      fi
10391    fi
10392  fi
10393
10394
10395
10396  if test "x$TR" = x; then
10397    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10398  fi
10399
10400
10401
10402
10403
10404  # Publish this variable in the help.
10405
10406
10407  if test "x$UNAME" = x; then
10408    # The variable is not set by user, try to locate tool using the code snippet
10409    for ac_prog in uname
10410do
10411  # Extract the first word of "$ac_prog", so it can be a program name with args.
10412set dummy $ac_prog; ac_word=$2
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414$as_echo_n "checking for $ac_word... " >&6; }
10415if ${ac_cv_path_UNAME+:} false; then :
10416  $as_echo_n "(cached) " >&6
10417else
10418  case $UNAME in
10419  [\\/]* | ?:[\\/]*)
10420  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10421  ;;
10422  *)
10423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10424for as_dir in $PATH
10425do
10426  IFS=$as_save_IFS
10427  test -z "$as_dir" && as_dir=.
10428    for ac_exec_ext in '' $ac_executable_extensions; do
10429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10430    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10432    break 2
10433  fi
10434done
10435  done
10436IFS=$as_save_IFS
10437
10438  ;;
10439esac
10440fi
10441UNAME=$ac_cv_path_UNAME
10442if test -n "$UNAME"; then
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10444$as_echo "$UNAME" >&6; }
10445else
10446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
10448fi
10449
10450
10451  test -n "$UNAME" && break
10452done
10453
10454  else
10455    # The variable is set, but is it from the command line or the environment?
10456
10457    # Try to remove the string !UNAME! from our list.
10458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10460      # If it failed, the variable was not from the command line. Ignore it,
10461      # but warn the user (except for BASH, which is always set by the calling BASH).
10462      if test "xUNAME" != xBASH; then
10463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10464$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10465      fi
10466      # Try to locate tool using the code snippet
10467      for ac_prog in uname
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_UNAME+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $UNAME in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499UNAME=$ac_cv_path_UNAME
10500if test -n "$UNAME"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10502$as_echo "$UNAME" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$UNAME" && break
10510done
10511
10512    else
10513      # If it succeeded, then it was overridden by the user. We will use it
10514      # for the tool.
10515
10516      # First remove it from the list of overridden variables, so we can test
10517      # for unknown variables in the end.
10518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10519
10520      # Check if the provided tool contains a complete path.
10521      tool_specified="$UNAME"
10522      tool_basename="${tool_specified##*/}"
10523      if test "x$tool_basename" = "x$tool_specified"; then
10524        # A command without a complete path is provided, search $PATH.
10525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10526$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10527        # Extract the first word of "$tool_basename", so it can be a program name with args.
10528set dummy $tool_basename; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_UNAME+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $UNAME in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557UNAME=$ac_cv_path_UNAME
10558if test -n "$UNAME"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10560$as_echo "$UNAME" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567        if test "x$UNAME" = x; then
10568          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10569        fi
10570      else
10571        # Otherwise we believe it is a complete path. Use it as it is.
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10573$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10575$as_echo_n "checking for UNAME... " >&6; }
10576        if test ! -x "$tool_specified"; then
10577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10578$as_echo "not found" >&6; }
10579          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10580        fi
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10582$as_echo "$tool_specified" >&6; }
10583      fi
10584    fi
10585  fi
10586
10587
10588
10589  if test "x$UNAME" = x; then
10590    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10591  fi
10592
10593
10594
10595
10596
10597  # Publish this variable in the help.
10598
10599
10600  if test "x$UNIQ" = x; then
10601    # The variable is not set by user, try to locate tool using the code snippet
10602    for ac_prog in uniq
10603do
10604  # Extract the first word of "$ac_prog", so it can be a program name with args.
10605set dummy $ac_prog; ac_word=$2
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10607$as_echo_n "checking for $ac_word... " >&6; }
10608if ${ac_cv_path_UNIQ+:} false; then :
10609  $as_echo_n "(cached) " >&6
10610else
10611  case $UNIQ in
10612  [\\/]* | ?:[\\/]*)
10613  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10614  ;;
10615  *)
10616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10617for as_dir in $PATH
10618do
10619  IFS=$as_save_IFS
10620  test -z "$as_dir" && as_dir=.
10621    for ac_exec_ext in '' $ac_executable_extensions; do
10622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10623    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10625    break 2
10626  fi
10627done
10628  done
10629IFS=$as_save_IFS
10630
10631  ;;
10632esac
10633fi
10634UNIQ=$ac_cv_path_UNIQ
10635if test -n "$UNIQ"; then
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10637$as_echo "$UNIQ" >&6; }
10638else
10639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10640$as_echo "no" >&6; }
10641fi
10642
10643
10644  test -n "$UNIQ" && break
10645done
10646
10647  else
10648    # The variable is set, but is it from the command line or the environment?
10649
10650    # Try to remove the string !UNIQ! from our list.
10651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10653      # If it failed, the variable was not from the command line. Ignore it,
10654      # but warn the user (except for BASH, which is always set by the calling BASH).
10655      if test "xUNIQ" != xBASH; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10657$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10658      fi
10659      # Try to locate tool using the code snippet
10660      for ac_prog in uniq
10661do
10662  # Extract the first word of "$ac_prog", so it can be a program name with args.
10663set dummy $ac_prog; ac_word=$2
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665$as_echo_n "checking for $ac_word... " >&6; }
10666if ${ac_cv_path_UNIQ+:} false; then :
10667  $as_echo_n "(cached) " >&6
10668else
10669  case $UNIQ in
10670  [\\/]* | ?:[\\/]*)
10671  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10672  ;;
10673  *)
10674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675for as_dir in $PATH
10676do
10677  IFS=$as_save_IFS
10678  test -z "$as_dir" && as_dir=.
10679    for ac_exec_ext in '' $ac_executable_extensions; do
10680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10681    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683    break 2
10684  fi
10685done
10686  done
10687IFS=$as_save_IFS
10688
10689  ;;
10690esac
10691fi
10692UNIQ=$ac_cv_path_UNIQ
10693if test -n "$UNIQ"; then
10694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10695$as_echo "$UNIQ" >&6; }
10696else
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
10699fi
10700
10701
10702  test -n "$UNIQ" && break
10703done
10704
10705    else
10706      # If it succeeded, then it was overridden by the user. We will use it
10707      # for the tool.
10708
10709      # First remove it from the list of overridden variables, so we can test
10710      # for unknown variables in the end.
10711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10712
10713      # Check if the provided tool contains a complete path.
10714      tool_specified="$UNIQ"
10715      tool_basename="${tool_specified##*/}"
10716      if test "x$tool_basename" = "x$tool_specified"; then
10717        # A command without a complete path is provided, search $PATH.
10718        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10719$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10720        # Extract the first word of "$tool_basename", so it can be a program name with args.
10721set dummy $tool_basename; ac_word=$2
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10723$as_echo_n "checking for $ac_word... " >&6; }
10724if ${ac_cv_path_UNIQ+:} false; then :
10725  $as_echo_n "(cached) " >&6
10726else
10727  case $UNIQ in
10728  [\\/]* | ?:[\\/]*)
10729  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10730  ;;
10731  *)
10732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10733for as_dir in $PATH
10734do
10735  IFS=$as_save_IFS
10736  test -z "$as_dir" && as_dir=.
10737    for ac_exec_ext in '' $ac_executable_extensions; do
10738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10739    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10741    break 2
10742  fi
10743done
10744  done
10745IFS=$as_save_IFS
10746
10747  ;;
10748esac
10749fi
10750UNIQ=$ac_cv_path_UNIQ
10751if test -n "$UNIQ"; then
10752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10753$as_echo "$UNIQ" >&6; }
10754else
10755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757fi
10758
10759
10760        if test "x$UNIQ" = x; then
10761          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10762        fi
10763      else
10764        # Otherwise we believe it is a complete path. Use it as it is.
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10766$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10768$as_echo_n "checking for UNIQ... " >&6; }
10769        if test ! -x "$tool_specified"; then
10770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10771$as_echo "not found" >&6; }
10772          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10773        fi
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10775$as_echo "$tool_specified" >&6; }
10776      fi
10777    fi
10778  fi
10779
10780
10781
10782  if test "x$UNIQ" = x; then
10783    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10784  fi
10785
10786
10787
10788
10789
10790  # Publish this variable in the help.
10791
10792
10793  if test "x$WC" = x; then
10794    # The variable is not set by user, try to locate tool using the code snippet
10795    for ac_prog in wc
10796do
10797  # Extract the first word of "$ac_prog", so it can be a program name with args.
10798set dummy $ac_prog; ac_word=$2
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800$as_echo_n "checking for $ac_word... " >&6; }
10801if ${ac_cv_path_WC+:} false; then :
10802  $as_echo_n "(cached) " >&6
10803else
10804  case $WC in
10805  [\\/]* | ?:[\\/]*)
10806  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10807  ;;
10808  *)
10809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810for as_dir in $PATH
10811do
10812  IFS=$as_save_IFS
10813  test -z "$as_dir" && as_dir=.
10814    for ac_exec_ext in '' $ac_executable_extensions; do
10815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818    break 2
10819  fi
10820done
10821  done
10822IFS=$as_save_IFS
10823
10824  ;;
10825esac
10826fi
10827WC=$ac_cv_path_WC
10828if test -n "$WC"; then
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10830$as_echo "$WC" >&6; }
10831else
10832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833$as_echo "no" >&6; }
10834fi
10835
10836
10837  test -n "$WC" && break
10838done
10839
10840  else
10841    # The variable is set, but is it from the command line or the environment?
10842
10843    # Try to remove the string !WC! from our list.
10844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10846      # If it failed, the variable was not from the command line. Ignore it,
10847      # but warn the user (except for BASH, which is always set by the calling BASH).
10848      if test "xWC" != xBASH; then
10849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10850$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10851      fi
10852      # Try to locate tool using the code snippet
10853      for ac_prog in wc
10854do
10855  # Extract the first word of "$ac_prog", so it can be a program name with args.
10856set dummy $ac_prog; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_WC+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $WC in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885WC=$ac_cv_path_WC
10886if test -n "$WC"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10888$as_echo "$WC" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895  test -n "$WC" && break
10896done
10897
10898    else
10899      # If it succeeded, then it was overridden by the user. We will use it
10900      # for the tool.
10901
10902      # First remove it from the list of overridden variables, so we can test
10903      # for unknown variables in the end.
10904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10905
10906      # Check if the provided tool contains a complete path.
10907      tool_specified="$WC"
10908      tool_basename="${tool_specified##*/}"
10909      if test "x$tool_basename" = "x$tool_specified"; then
10910        # A command without a complete path is provided, search $PATH.
10911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10912$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10913        # Extract the first word of "$tool_basename", so it can be a program name with args.
10914set dummy $tool_basename; ac_word=$2
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10916$as_echo_n "checking for $ac_word... " >&6; }
10917if ${ac_cv_path_WC+:} false; then :
10918  $as_echo_n "(cached) " >&6
10919else
10920  case $WC in
10921  [\\/]* | ?:[\\/]*)
10922  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10923  ;;
10924  *)
10925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10926for as_dir in $PATH
10927do
10928  IFS=$as_save_IFS
10929  test -z "$as_dir" && as_dir=.
10930    for ac_exec_ext in '' $ac_executable_extensions; do
10931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10932    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10934    break 2
10935  fi
10936done
10937  done
10938IFS=$as_save_IFS
10939
10940  ;;
10941esac
10942fi
10943WC=$ac_cv_path_WC
10944if test -n "$WC"; then
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10946$as_echo "$WC" >&6; }
10947else
10948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10949$as_echo "no" >&6; }
10950fi
10951
10952
10953        if test "x$WC" = x; then
10954          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10955        fi
10956      else
10957        # Otherwise we believe it is a complete path. Use it as it is.
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10959$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10961$as_echo_n "checking for WC... " >&6; }
10962        if test ! -x "$tool_specified"; then
10963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10964$as_echo "not found" >&6; }
10965          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10966        fi
10967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10968$as_echo "$tool_specified" >&6; }
10969      fi
10970    fi
10971  fi
10972
10973
10974
10975  if test "x$WC" = x; then
10976    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10977  fi
10978
10979
10980
10981
10982
10983  # Publish this variable in the help.
10984
10985
10986  if test "x$WHICH" = x; then
10987    # The variable is not set by user, try to locate tool using the code snippet
10988    for ac_prog in which
10989do
10990  # Extract the first word of "$ac_prog", so it can be a program name with args.
10991set dummy $ac_prog; ac_word=$2
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10993$as_echo_n "checking for $ac_word... " >&6; }
10994if ${ac_cv_path_WHICH+:} false; then :
10995  $as_echo_n "(cached) " >&6
10996else
10997  case $WHICH in
10998  [\\/]* | ?:[\\/]*)
10999  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11000  ;;
11001  *)
11002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005  IFS=$as_save_IFS
11006  test -z "$as_dir" && as_dir=.
11007    for ac_exec_ext in '' $ac_executable_extensions; do
11008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11009    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11011    break 2
11012  fi
11013done
11014  done
11015IFS=$as_save_IFS
11016
11017  ;;
11018esac
11019fi
11020WHICH=$ac_cv_path_WHICH
11021if test -n "$WHICH"; then
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11023$as_echo "$WHICH" >&6; }
11024else
11025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
11027fi
11028
11029
11030  test -n "$WHICH" && break
11031done
11032
11033  else
11034    # The variable is set, but is it from the command line or the environment?
11035
11036    # Try to remove the string !WHICH! from our list.
11037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11039      # If it failed, the variable was not from the command line. Ignore it,
11040      # but warn the user (except for BASH, which is always set by the calling BASH).
11041      if test "xWHICH" != xBASH; then
11042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11043$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11044      fi
11045      # Try to locate tool using the code snippet
11046      for ac_prog in which
11047do
11048  # Extract the first word of "$ac_prog", so it can be a program name with args.
11049set dummy $ac_prog; ac_word=$2
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11051$as_echo_n "checking for $ac_word... " >&6; }
11052if ${ac_cv_path_WHICH+:} false; then :
11053  $as_echo_n "(cached) " >&6
11054else
11055  case $WHICH in
11056  [\\/]* | ?:[\\/]*)
11057  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11058  ;;
11059  *)
11060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11061for as_dir in $PATH
11062do
11063  IFS=$as_save_IFS
11064  test -z "$as_dir" && as_dir=.
11065    for ac_exec_ext in '' $ac_executable_extensions; do
11066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11067    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11069    break 2
11070  fi
11071done
11072  done
11073IFS=$as_save_IFS
11074
11075  ;;
11076esac
11077fi
11078WHICH=$ac_cv_path_WHICH
11079if test -n "$WHICH"; then
11080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11081$as_echo "$WHICH" >&6; }
11082else
11083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
11085fi
11086
11087
11088  test -n "$WHICH" && break
11089done
11090
11091    else
11092      # If it succeeded, then it was overridden by the user. We will use it
11093      # for the tool.
11094
11095      # First remove it from the list of overridden variables, so we can test
11096      # for unknown variables in the end.
11097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11098
11099      # Check if the provided tool contains a complete path.
11100      tool_specified="$WHICH"
11101      tool_basename="${tool_specified##*/}"
11102      if test "x$tool_basename" = "x$tool_specified"; then
11103        # A command without a complete path is provided, search $PATH.
11104        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11105$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11106        # Extract the first word of "$tool_basename", so it can be a program name with args.
11107set dummy $tool_basename; ac_word=$2
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11109$as_echo_n "checking for $ac_word... " >&6; }
11110if ${ac_cv_path_WHICH+:} false; then :
11111  $as_echo_n "(cached) " >&6
11112else
11113  case $WHICH in
11114  [\\/]* | ?:[\\/]*)
11115  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11116  ;;
11117  *)
11118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11119for as_dir in $PATH
11120do
11121  IFS=$as_save_IFS
11122  test -z "$as_dir" && as_dir=.
11123    for ac_exec_ext in '' $ac_executable_extensions; do
11124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11125    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11127    break 2
11128  fi
11129done
11130  done
11131IFS=$as_save_IFS
11132
11133  ;;
11134esac
11135fi
11136WHICH=$ac_cv_path_WHICH
11137if test -n "$WHICH"; then
11138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11139$as_echo "$WHICH" >&6; }
11140else
11141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11142$as_echo "no" >&6; }
11143fi
11144
11145
11146        if test "x$WHICH" = x; then
11147          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11148        fi
11149      else
11150        # Otherwise we believe it is a complete path. Use it as it is.
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11152$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11154$as_echo_n "checking for WHICH... " >&6; }
11155        if test ! -x "$tool_specified"; then
11156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11157$as_echo "not found" >&6; }
11158          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11159        fi
11160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11161$as_echo "$tool_specified" >&6; }
11162      fi
11163    fi
11164  fi
11165
11166
11167
11168  if test "x$WHICH" = x; then
11169    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11170  fi
11171
11172
11173
11174
11175
11176  # Publish this variable in the help.
11177
11178
11179  if test "x$XARGS" = x; then
11180    # The variable is not set by user, try to locate tool using the code snippet
11181    for ac_prog in xargs
11182do
11183  # Extract the first word of "$ac_prog", so it can be a program name with args.
11184set dummy $ac_prog; ac_word=$2
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11186$as_echo_n "checking for $ac_word... " >&6; }
11187if ${ac_cv_path_XARGS+:} false; then :
11188  $as_echo_n "(cached) " >&6
11189else
11190  case $XARGS in
11191  [\\/]* | ?:[\\/]*)
11192  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11193  ;;
11194  *)
11195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11196for as_dir in $PATH
11197do
11198  IFS=$as_save_IFS
11199  test -z "$as_dir" && as_dir=.
11200    for ac_exec_ext in '' $ac_executable_extensions; do
11201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11202    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11204    break 2
11205  fi
11206done
11207  done
11208IFS=$as_save_IFS
11209
11210  ;;
11211esac
11212fi
11213XARGS=$ac_cv_path_XARGS
11214if test -n "$XARGS"; then
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11216$as_echo "$XARGS" >&6; }
11217else
11218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
11220fi
11221
11222
11223  test -n "$XARGS" && break
11224done
11225
11226  else
11227    # The variable is set, but is it from the command line or the environment?
11228
11229    # Try to remove the string !XARGS! from our list.
11230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11232      # If it failed, the variable was not from the command line. Ignore it,
11233      # but warn the user (except for BASH, which is always set by the calling BASH).
11234      if test "xXARGS" != xBASH; then
11235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11236$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11237      fi
11238      # Try to locate tool using the code snippet
11239      for ac_prog in xargs
11240do
11241  # Extract the first word of "$ac_prog", so it can be a program name with args.
11242set dummy $ac_prog; ac_word=$2
11243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11244$as_echo_n "checking for $ac_word... " >&6; }
11245if ${ac_cv_path_XARGS+:} false; then :
11246  $as_echo_n "(cached) " >&6
11247else
11248  case $XARGS in
11249  [\\/]* | ?:[\\/]*)
11250  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11251  ;;
11252  *)
11253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11254for as_dir in $PATH
11255do
11256  IFS=$as_save_IFS
11257  test -z "$as_dir" && as_dir=.
11258    for ac_exec_ext in '' $ac_executable_extensions; do
11259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11260    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11262    break 2
11263  fi
11264done
11265  done
11266IFS=$as_save_IFS
11267
11268  ;;
11269esac
11270fi
11271XARGS=$ac_cv_path_XARGS
11272if test -n "$XARGS"; then
11273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11274$as_echo "$XARGS" >&6; }
11275else
11276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
11278fi
11279
11280
11281  test -n "$XARGS" && break
11282done
11283
11284    else
11285      # If it succeeded, then it was overridden by the user. We will use it
11286      # for the tool.
11287
11288      # First remove it from the list of overridden variables, so we can test
11289      # for unknown variables in the end.
11290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11291
11292      # Check if the provided tool contains a complete path.
11293      tool_specified="$XARGS"
11294      tool_basename="${tool_specified##*/}"
11295      if test "x$tool_basename" = "x$tool_specified"; then
11296        # A command without a complete path is provided, search $PATH.
11297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11298$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11299        # Extract the first word of "$tool_basename", so it can be a program name with args.
11300set dummy $tool_basename; ac_word=$2
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11302$as_echo_n "checking for $ac_word... " >&6; }
11303if ${ac_cv_path_XARGS+:} false; then :
11304  $as_echo_n "(cached) " >&6
11305else
11306  case $XARGS in
11307  [\\/]* | ?:[\\/]*)
11308  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11309  ;;
11310  *)
11311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312for as_dir in $PATH
11313do
11314  IFS=$as_save_IFS
11315  test -z "$as_dir" && as_dir=.
11316    for ac_exec_ext in '' $ac_executable_extensions; do
11317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11318    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11320    break 2
11321  fi
11322done
11323  done
11324IFS=$as_save_IFS
11325
11326  ;;
11327esac
11328fi
11329XARGS=$ac_cv_path_XARGS
11330if test -n "$XARGS"; then
11331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11332$as_echo "$XARGS" >&6; }
11333else
11334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336fi
11337
11338
11339        if test "x$XARGS" = x; then
11340          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11341        fi
11342      else
11343        # Otherwise we believe it is a complete path. Use it as it is.
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11345$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11347$as_echo_n "checking for XARGS... " >&6; }
11348        if test ! -x "$tool_specified"; then
11349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11350$as_echo "not found" >&6; }
11351          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11352        fi
11353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11354$as_echo "$tool_specified" >&6; }
11355      fi
11356    fi
11357  fi
11358
11359
11360
11361  if test "x$XARGS" = x; then
11362    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11363  fi
11364
11365
11366
11367  # Then required tools that require some special treatment.
11368
11369
11370  # Publish this variable in the help.
11371
11372
11373  if test "x$AWK" = x; then
11374    # The variable is not set by user, try to locate tool using the code snippet
11375    for ac_prog in gawk mawk nawk awk
11376do
11377  # Extract the first word of "$ac_prog", so it can be a program name with args.
11378set dummy $ac_prog; ac_word=$2
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11380$as_echo_n "checking for $ac_word... " >&6; }
11381if ${ac_cv_prog_AWK+:} false; then :
11382  $as_echo_n "(cached) " >&6
11383else
11384  if test -n "$AWK"; then
11385  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11386else
11387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_prog_AWK="$ac_prog"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402fi
11403fi
11404AWK=$ac_cv_prog_AWK
11405if test -n "$AWK"; then
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11407$as_echo "$AWK" >&6; }
11408else
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
11411fi
11412
11413
11414  test -n "$AWK" && break
11415done
11416
11417  else
11418    # The variable is set, but is it from the command line or the environment?
11419
11420    # Try to remove the string !AWK! from our list.
11421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11423      # If it failed, the variable was not from the command line. Ignore it,
11424      # but warn the user (except for BASH, which is always set by the calling BASH).
11425      if test "xAWK" != xBASH; then
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11427$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11428      fi
11429      # Try to locate tool using the code snippet
11430      for ac_prog in gawk mawk nawk awk
11431do
11432  # Extract the first word of "$ac_prog", so it can be a program name with args.
11433set dummy $ac_prog; ac_word=$2
11434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11435$as_echo_n "checking for $ac_word... " >&6; }
11436if ${ac_cv_prog_AWK+:} false; then :
11437  $as_echo_n "(cached) " >&6
11438else
11439  if test -n "$AWK"; then
11440  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11441else
11442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11443for as_dir in $PATH
11444do
11445  IFS=$as_save_IFS
11446  test -z "$as_dir" && as_dir=.
11447    for ac_exec_ext in '' $ac_executable_extensions; do
11448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11449    ac_cv_prog_AWK="$ac_prog"
11450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11451    break 2
11452  fi
11453done
11454  done
11455IFS=$as_save_IFS
11456
11457fi
11458fi
11459AWK=$ac_cv_prog_AWK
11460if test -n "$AWK"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11462$as_echo "$AWK" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$AWK" && break
11470done
11471
11472    else
11473      # If it succeeded, then it was overridden by the user. We will use it
11474      # for the tool.
11475
11476      # First remove it from the list of overridden variables, so we can test
11477      # for unknown variables in the end.
11478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11479
11480      # Check if the provided tool contains a complete path.
11481      tool_specified="$AWK"
11482      tool_basename="${tool_specified##*/}"
11483      if test "x$tool_basename" = "x$tool_specified"; then
11484        # A command without a complete path is provided, search $PATH.
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11486$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11487        # Extract the first word of "$tool_basename", so it can be a program name with args.
11488set dummy $tool_basename; ac_word=$2
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11490$as_echo_n "checking for $ac_word... " >&6; }
11491if ${ac_cv_path_AWK+:} false; then :
11492  $as_echo_n "(cached) " >&6
11493else
11494  case $AWK in
11495  [\\/]* | ?:[\\/]*)
11496  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11497  ;;
11498  *)
11499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11500for as_dir in $PATH
11501do
11502  IFS=$as_save_IFS
11503  test -z "$as_dir" && as_dir=.
11504    for ac_exec_ext in '' $ac_executable_extensions; do
11505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11506    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11508    break 2
11509  fi
11510done
11511  done
11512IFS=$as_save_IFS
11513
11514  ;;
11515esac
11516fi
11517AWK=$ac_cv_path_AWK
11518if test -n "$AWK"; then
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11520$as_echo "$AWK" >&6; }
11521else
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
11524fi
11525
11526
11527        if test "x$AWK" = x; then
11528          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11529        fi
11530      else
11531        # Otherwise we believe it is a complete path. Use it as it is.
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11533$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11535$as_echo_n "checking for AWK... " >&6; }
11536        if test ! -x "$tool_specified"; then
11537          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11538$as_echo "not found" >&6; }
11539          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11540        fi
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11542$as_echo "$tool_specified" >&6; }
11543      fi
11544    fi
11545  fi
11546
11547
11548  if test "x$AWK" = x; then
11549    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11550  fi
11551
11552
11553
11554
11555  # Publish this variable in the help.
11556
11557
11558  if test "x$GREP" = x; then
11559    # The variable is not set by user, try to locate tool using the code snippet
11560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11561$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11562if ${ac_cv_path_GREP+:} false; then :
11563  $as_echo_n "(cached) " >&6
11564else
11565  if test -z "$GREP"; then
11566  ac_path_GREP_found=false
11567  # Loop through the user's path and test for each of PROGNAME-LIST
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_prog in grep ggrep; do
11574    for ac_exec_ext in '' $ac_executable_extensions; do
11575      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11576      as_fn_executable_p "$ac_path_GREP" || continue
11577# Check for GNU ac_path_GREP and select it if it is found.
11578  # Check for GNU $ac_path_GREP
11579case `"$ac_path_GREP" --version 2>&1` in
11580*GNU*)
11581  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11582*)
11583  ac_count=0
11584  $as_echo_n 0123456789 >"conftest.in"
11585  while :
11586  do
11587    cat "conftest.in" "conftest.in" >"conftest.tmp"
11588    mv "conftest.tmp" "conftest.in"
11589    cp "conftest.in" "conftest.nl"
11590    $as_echo 'GREP' >> "conftest.nl"
11591    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11592    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11593    as_fn_arith $ac_count + 1 && ac_count=$as_val
11594    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11595      # Best one so far, save it but keep looking for a better one
11596      ac_cv_path_GREP="$ac_path_GREP"
11597      ac_path_GREP_max=$ac_count
11598    fi
11599    # 10*(2^10) chars as input seems more than enough
11600    test $ac_count -gt 10 && break
11601  done
11602  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11603esac
11604
11605      $ac_path_GREP_found && break 3
11606    done
11607  done
11608  done
11609IFS=$as_save_IFS
11610  if test -z "$ac_cv_path_GREP"; then
11611    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11612  fi
11613else
11614  ac_cv_path_GREP=$GREP
11615fi
11616
11617fi
11618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11619$as_echo "$ac_cv_path_GREP" >&6; }
11620 GREP="$ac_cv_path_GREP"
11621
11622
11623  else
11624    # The variable is set, but is it from the command line or the environment?
11625
11626    # Try to remove the string !GREP! from our list.
11627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11629      # If it failed, the variable was not from the command line. Ignore it,
11630      # but warn the user (except for BASH, which is always set by the calling BASH).
11631      if test "xGREP" != xBASH; then
11632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11633$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11634      fi
11635      # Try to locate tool using the code snippet
11636      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11637$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11638if ${ac_cv_path_GREP+:} false; then :
11639  $as_echo_n "(cached) " >&6
11640else
11641  if test -z "$GREP"; then
11642  ac_path_GREP_found=false
11643  # Loop through the user's path and test for each of PROGNAME-LIST
11644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11646do
11647  IFS=$as_save_IFS
11648  test -z "$as_dir" && as_dir=.
11649    for ac_prog in grep ggrep; do
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11652      as_fn_executable_p "$ac_path_GREP" || continue
11653# Check for GNU ac_path_GREP and select it if it is found.
11654  # Check for GNU $ac_path_GREP
11655case `"$ac_path_GREP" --version 2>&1` in
11656*GNU*)
11657  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11658*)
11659  ac_count=0
11660  $as_echo_n 0123456789 >"conftest.in"
11661  while :
11662  do
11663    cat "conftest.in" "conftest.in" >"conftest.tmp"
11664    mv "conftest.tmp" "conftest.in"
11665    cp "conftest.in" "conftest.nl"
11666    $as_echo 'GREP' >> "conftest.nl"
11667    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11668    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11669    as_fn_arith $ac_count + 1 && ac_count=$as_val
11670    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11671      # Best one so far, save it but keep looking for a better one
11672      ac_cv_path_GREP="$ac_path_GREP"
11673      ac_path_GREP_max=$ac_count
11674    fi
11675    # 10*(2^10) chars as input seems more than enough
11676    test $ac_count -gt 10 && break
11677  done
11678  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11679esac
11680
11681      $ac_path_GREP_found && break 3
11682    done
11683  done
11684  done
11685IFS=$as_save_IFS
11686  if test -z "$ac_cv_path_GREP"; then
11687    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11688  fi
11689else
11690  ac_cv_path_GREP=$GREP
11691fi
11692
11693fi
11694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11695$as_echo "$ac_cv_path_GREP" >&6; }
11696 GREP="$ac_cv_path_GREP"
11697
11698
11699    else
11700      # If it succeeded, then it was overridden by the user. We will use it
11701      # for the tool.
11702
11703      # First remove it from the list of overridden variables, so we can test
11704      # for unknown variables in the end.
11705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11706
11707      # Check if the provided tool contains a complete path.
11708      tool_specified="$GREP"
11709      tool_basename="${tool_specified##*/}"
11710      if test "x$tool_basename" = "x$tool_specified"; then
11711        # A command without a complete path is provided, search $PATH.
11712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11713$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11714        # Extract the first word of "$tool_basename", so it can be a program name with args.
11715set dummy $tool_basename; ac_word=$2
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11717$as_echo_n "checking for $ac_word... " >&6; }
11718if ${ac_cv_path_GREP+:} false; then :
11719  $as_echo_n "(cached) " >&6
11720else
11721  case $GREP in
11722  [\\/]* | ?:[\\/]*)
11723  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11724  ;;
11725  *)
11726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11727for as_dir in $PATH
11728do
11729  IFS=$as_save_IFS
11730  test -z "$as_dir" && as_dir=.
11731    for ac_exec_ext in '' $ac_executable_extensions; do
11732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11733    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11735    break 2
11736  fi
11737done
11738  done
11739IFS=$as_save_IFS
11740
11741  ;;
11742esac
11743fi
11744GREP=$ac_cv_path_GREP
11745if test -n "$GREP"; then
11746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11747$as_echo "$GREP" >&6; }
11748else
11749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
11751fi
11752
11753
11754        if test "x$GREP" = x; then
11755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11756        fi
11757      else
11758        # Otherwise we believe it is a complete path. Use it as it is.
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11760$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11762$as_echo_n "checking for GREP... " >&6; }
11763        if test ! -x "$tool_specified"; then
11764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11765$as_echo "not found" >&6; }
11766          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11767        fi
11768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11769$as_echo "$tool_specified" >&6; }
11770      fi
11771    fi
11772  fi
11773
11774
11775  if test "x$GREP" = x; then
11776    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11777  fi
11778
11779
11780
11781
11782  # Publish this variable in the help.
11783
11784
11785  if test "x$EGREP" = x; then
11786    # The variable is not set by user, try to locate tool using the code snippet
11787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11788$as_echo_n "checking for egrep... " >&6; }
11789if ${ac_cv_path_EGREP+:} false; then :
11790  $as_echo_n "(cached) " >&6
11791else
11792  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11793   then ac_cv_path_EGREP="$GREP -E"
11794   else
11795     if test -z "$EGREP"; then
11796  ac_path_EGREP_found=false
11797  # Loop through the user's path and test for each of PROGNAME-LIST
11798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11799for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11800do
11801  IFS=$as_save_IFS
11802  test -z "$as_dir" && as_dir=.
11803    for ac_prog in egrep; do
11804    for ac_exec_ext in '' $ac_executable_extensions; do
11805      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11806      as_fn_executable_p "$ac_path_EGREP" || continue
11807# Check for GNU ac_path_EGREP and select it if it is found.
11808  # Check for GNU $ac_path_EGREP
11809case `"$ac_path_EGREP" --version 2>&1` in
11810*GNU*)
11811  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11812*)
11813  ac_count=0
11814  $as_echo_n 0123456789 >"conftest.in"
11815  while :
11816  do
11817    cat "conftest.in" "conftest.in" >"conftest.tmp"
11818    mv "conftest.tmp" "conftest.in"
11819    cp "conftest.in" "conftest.nl"
11820    $as_echo 'EGREP' >> "conftest.nl"
11821    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11822    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11823    as_fn_arith $ac_count + 1 && ac_count=$as_val
11824    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11825      # Best one so far, save it but keep looking for a better one
11826      ac_cv_path_EGREP="$ac_path_EGREP"
11827      ac_path_EGREP_max=$ac_count
11828    fi
11829    # 10*(2^10) chars as input seems more than enough
11830    test $ac_count -gt 10 && break
11831  done
11832  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11833esac
11834
11835      $ac_path_EGREP_found && break 3
11836    done
11837  done
11838  done
11839IFS=$as_save_IFS
11840  if test -z "$ac_cv_path_EGREP"; then
11841    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11842  fi
11843else
11844  ac_cv_path_EGREP=$EGREP
11845fi
11846
11847   fi
11848fi
11849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11850$as_echo "$ac_cv_path_EGREP" >&6; }
11851 EGREP="$ac_cv_path_EGREP"
11852
11853
11854  else
11855    # The variable is set, but is it from the command line or the environment?
11856
11857    # Try to remove the string !EGREP! from our list.
11858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11860      # If it failed, the variable was not from the command line. Ignore it,
11861      # but warn the user (except for BASH, which is always set by the calling BASH).
11862      if test "xEGREP" != xBASH; then
11863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11864$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11865      fi
11866      # Try to locate tool using the code snippet
11867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11868$as_echo_n "checking for egrep... " >&6; }
11869if ${ac_cv_path_EGREP+:} false; then :
11870  $as_echo_n "(cached) " >&6
11871else
11872  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11873   then ac_cv_path_EGREP="$GREP -E"
11874   else
11875     if test -z "$EGREP"; then
11876  ac_path_EGREP_found=false
11877  # Loop through the user's path and test for each of PROGNAME-LIST
11878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11880do
11881  IFS=$as_save_IFS
11882  test -z "$as_dir" && as_dir=.
11883    for ac_prog in egrep; do
11884    for ac_exec_ext in '' $ac_executable_extensions; do
11885      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11886      as_fn_executable_p "$ac_path_EGREP" || continue
11887# Check for GNU ac_path_EGREP and select it if it is found.
11888  # Check for GNU $ac_path_EGREP
11889case `"$ac_path_EGREP" --version 2>&1` in
11890*GNU*)
11891  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11892*)
11893  ac_count=0
11894  $as_echo_n 0123456789 >"conftest.in"
11895  while :
11896  do
11897    cat "conftest.in" "conftest.in" >"conftest.tmp"
11898    mv "conftest.tmp" "conftest.in"
11899    cp "conftest.in" "conftest.nl"
11900    $as_echo 'EGREP' >> "conftest.nl"
11901    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11903    as_fn_arith $ac_count + 1 && ac_count=$as_val
11904    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11905      # Best one so far, save it but keep looking for a better one
11906      ac_cv_path_EGREP="$ac_path_EGREP"
11907      ac_path_EGREP_max=$ac_count
11908    fi
11909    # 10*(2^10) chars as input seems more than enough
11910    test $ac_count -gt 10 && break
11911  done
11912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11913esac
11914
11915      $ac_path_EGREP_found && break 3
11916    done
11917  done
11918  done
11919IFS=$as_save_IFS
11920  if test -z "$ac_cv_path_EGREP"; then
11921    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11922  fi
11923else
11924  ac_cv_path_EGREP=$EGREP
11925fi
11926
11927   fi
11928fi
11929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11930$as_echo "$ac_cv_path_EGREP" >&6; }
11931 EGREP="$ac_cv_path_EGREP"
11932
11933
11934    else
11935      # If it succeeded, then it was overridden by the user. We will use it
11936      # for the tool.
11937
11938      # First remove it from the list of overridden variables, so we can test
11939      # for unknown variables in the end.
11940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11941
11942      # Check if the provided tool contains a complete path.
11943      tool_specified="$EGREP"
11944      tool_basename="${tool_specified##*/}"
11945      if test "x$tool_basename" = "x$tool_specified"; then
11946        # A command without a complete path is provided, search $PATH.
11947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11948$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11949        # Extract the first word of "$tool_basename", so it can be a program name with args.
11950set dummy $tool_basename; ac_word=$2
11951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11952$as_echo_n "checking for $ac_word... " >&6; }
11953if ${ac_cv_path_EGREP+:} false; then :
11954  $as_echo_n "(cached) " >&6
11955else
11956  case $EGREP in
11957  [\\/]* | ?:[\\/]*)
11958  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11959  ;;
11960  *)
11961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11962for as_dir in $PATH
11963do
11964  IFS=$as_save_IFS
11965  test -z "$as_dir" && as_dir=.
11966    for ac_exec_ext in '' $ac_executable_extensions; do
11967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11968    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11970    break 2
11971  fi
11972done
11973  done
11974IFS=$as_save_IFS
11975
11976  ;;
11977esac
11978fi
11979EGREP=$ac_cv_path_EGREP
11980if test -n "$EGREP"; then
11981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11982$as_echo "$EGREP" >&6; }
11983else
11984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11985$as_echo "no" >&6; }
11986fi
11987
11988
11989        if test "x$EGREP" = x; then
11990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11991        fi
11992      else
11993        # Otherwise we believe it is a complete path. Use it as it is.
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11995$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11997$as_echo_n "checking for EGREP... " >&6; }
11998        if test ! -x "$tool_specified"; then
11999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12000$as_echo "not found" >&6; }
12001          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12002        fi
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12004$as_echo "$tool_specified" >&6; }
12005      fi
12006    fi
12007  fi
12008
12009
12010  if test "x$EGREP" = x; then
12011    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12012  fi
12013
12014
12015
12016
12017  # Publish this variable in the help.
12018
12019
12020  if test "x$FGREP" = x; then
12021    # The variable is not set by user, try to locate tool using the code snippet
12022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12023$as_echo_n "checking for fgrep... " >&6; }
12024if ${ac_cv_path_FGREP+:} false; then :
12025  $as_echo_n "(cached) " >&6
12026else
12027  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12028   then ac_cv_path_FGREP="$GREP -F"
12029   else
12030     if test -z "$FGREP"; then
12031  ac_path_FGREP_found=false
12032  # Loop through the user's path and test for each of PROGNAME-LIST
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_prog in fgrep; do
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12041      as_fn_executable_p "$ac_path_FGREP" || continue
12042# Check for GNU ac_path_FGREP and select it if it is found.
12043  # Check for GNU $ac_path_FGREP
12044case `"$ac_path_FGREP" --version 2>&1` in
12045*GNU*)
12046  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12047*)
12048  ac_count=0
12049  $as_echo_n 0123456789 >"conftest.in"
12050  while :
12051  do
12052    cat "conftest.in" "conftest.in" >"conftest.tmp"
12053    mv "conftest.tmp" "conftest.in"
12054    cp "conftest.in" "conftest.nl"
12055    $as_echo 'FGREP' >> "conftest.nl"
12056    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12057    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12058    as_fn_arith $ac_count + 1 && ac_count=$as_val
12059    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12060      # Best one so far, save it but keep looking for a better one
12061      ac_cv_path_FGREP="$ac_path_FGREP"
12062      ac_path_FGREP_max=$ac_count
12063    fi
12064    # 10*(2^10) chars as input seems more than enough
12065    test $ac_count -gt 10 && break
12066  done
12067  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12068esac
12069
12070      $ac_path_FGREP_found && break 3
12071    done
12072  done
12073  done
12074IFS=$as_save_IFS
12075  if test -z "$ac_cv_path_FGREP"; then
12076    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12077  fi
12078else
12079  ac_cv_path_FGREP=$FGREP
12080fi
12081
12082   fi
12083fi
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12085$as_echo "$ac_cv_path_FGREP" >&6; }
12086 FGREP="$ac_cv_path_FGREP"
12087
12088
12089  else
12090    # The variable is set, but is it from the command line or the environment?
12091
12092    # Try to remove the string !FGREP! from our list.
12093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12095      # If it failed, the variable was not from the command line. Ignore it,
12096      # but warn the user (except for BASH, which is always set by the calling BASH).
12097      if test "xFGREP" != xBASH; then
12098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12099$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12100      fi
12101      # Try to locate tool using the code snippet
12102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12103$as_echo_n "checking for fgrep... " >&6; }
12104if ${ac_cv_path_FGREP+:} false; then :
12105  $as_echo_n "(cached) " >&6
12106else
12107  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12108   then ac_cv_path_FGREP="$GREP -F"
12109   else
12110     if test -z "$FGREP"; then
12111  ac_path_FGREP_found=false
12112  # Loop through the user's path and test for each of PROGNAME-LIST
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_prog in fgrep; do
12119    for ac_exec_ext in '' $ac_executable_extensions; do
12120      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12121      as_fn_executable_p "$ac_path_FGREP" || continue
12122# Check for GNU ac_path_FGREP and select it if it is found.
12123  # Check for GNU $ac_path_FGREP
12124case `"$ac_path_FGREP" --version 2>&1` in
12125*GNU*)
12126  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12127*)
12128  ac_count=0
12129  $as_echo_n 0123456789 >"conftest.in"
12130  while :
12131  do
12132    cat "conftest.in" "conftest.in" >"conftest.tmp"
12133    mv "conftest.tmp" "conftest.in"
12134    cp "conftest.in" "conftest.nl"
12135    $as_echo 'FGREP' >> "conftest.nl"
12136    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12137    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12138    as_fn_arith $ac_count + 1 && ac_count=$as_val
12139    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12140      # Best one so far, save it but keep looking for a better one
12141      ac_cv_path_FGREP="$ac_path_FGREP"
12142      ac_path_FGREP_max=$ac_count
12143    fi
12144    # 10*(2^10) chars as input seems more than enough
12145    test $ac_count -gt 10 && break
12146  done
12147  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12148esac
12149
12150      $ac_path_FGREP_found && break 3
12151    done
12152  done
12153  done
12154IFS=$as_save_IFS
12155  if test -z "$ac_cv_path_FGREP"; then
12156    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12157  fi
12158else
12159  ac_cv_path_FGREP=$FGREP
12160fi
12161
12162   fi
12163fi
12164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12165$as_echo "$ac_cv_path_FGREP" >&6; }
12166 FGREP="$ac_cv_path_FGREP"
12167
12168
12169    else
12170      # If it succeeded, then it was overridden by the user. We will use it
12171      # for the tool.
12172
12173      # First remove it from the list of overridden variables, so we can test
12174      # for unknown variables in the end.
12175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12176
12177      # Check if the provided tool contains a complete path.
12178      tool_specified="$FGREP"
12179      tool_basename="${tool_specified##*/}"
12180      if test "x$tool_basename" = "x$tool_specified"; then
12181        # A command without a complete path is provided, search $PATH.
12182        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12183$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12184        # Extract the first word of "$tool_basename", so it can be a program name with args.
12185set dummy $tool_basename; ac_word=$2
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12187$as_echo_n "checking for $ac_word... " >&6; }
12188if ${ac_cv_path_FGREP+:} false; then :
12189  $as_echo_n "(cached) " >&6
12190else
12191  case $FGREP in
12192  [\\/]* | ?:[\\/]*)
12193  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12194  ;;
12195  *)
12196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12197for as_dir in $PATH
12198do
12199  IFS=$as_save_IFS
12200  test -z "$as_dir" && as_dir=.
12201    for ac_exec_ext in '' $ac_executable_extensions; do
12202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12203    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12205    break 2
12206  fi
12207done
12208  done
12209IFS=$as_save_IFS
12210
12211  ;;
12212esac
12213fi
12214FGREP=$ac_cv_path_FGREP
12215if test -n "$FGREP"; then
12216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12217$as_echo "$FGREP" >&6; }
12218else
12219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12220$as_echo "no" >&6; }
12221fi
12222
12223
12224        if test "x$FGREP" = x; then
12225          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12226        fi
12227      else
12228        # Otherwise we believe it is a complete path. Use it as it is.
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12230$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12232$as_echo_n "checking for FGREP... " >&6; }
12233        if test ! -x "$tool_specified"; then
12234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12235$as_echo "not found" >&6; }
12236          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12237        fi
12238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12239$as_echo "$tool_specified" >&6; }
12240      fi
12241    fi
12242  fi
12243
12244
12245  if test "x$FGREP" = x; then
12246    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12247  fi
12248
12249
12250
12251
12252  # Publish this variable in the help.
12253
12254
12255  if test "x$SED" = x; then
12256    # The variable is not set by user, try to locate tool using the code snippet
12257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12258$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12259if ${ac_cv_path_SED+:} false; then :
12260  $as_echo_n "(cached) " >&6
12261else
12262            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12263     for ac_i in 1 2 3 4 5 6 7; do
12264       ac_script="$ac_script$as_nl$ac_script"
12265     done
12266     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12267     { ac_script=; unset ac_script;}
12268     if test -z "$SED"; then
12269  ac_path_SED_found=false
12270  # Loop through the user's path and test for each of PROGNAME-LIST
12271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12272for as_dir in $PATH
12273do
12274  IFS=$as_save_IFS
12275  test -z "$as_dir" && as_dir=.
12276    for ac_prog in sed gsed; do
12277    for ac_exec_ext in '' $ac_executable_extensions; do
12278      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12279      as_fn_executable_p "$ac_path_SED" || continue
12280# Check for GNU ac_path_SED and select it if it is found.
12281  # Check for GNU $ac_path_SED
12282case `"$ac_path_SED" --version 2>&1` in
12283*GNU*)
12284  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12285*)
12286  ac_count=0
12287  $as_echo_n 0123456789 >"conftest.in"
12288  while :
12289  do
12290    cat "conftest.in" "conftest.in" >"conftest.tmp"
12291    mv "conftest.tmp" "conftest.in"
12292    cp "conftest.in" "conftest.nl"
12293    $as_echo '' >> "conftest.nl"
12294    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12295    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12296    as_fn_arith $ac_count + 1 && ac_count=$as_val
12297    if test $ac_count -gt ${ac_path_SED_max-0}; then
12298      # Best one so far, save it but keep looking for a better one
12299      ac_cv_path_SED="$ac_path_SED"
12300      ac_path_SED_max=$ac_count
12301    fi
12302    # 10*(2^10) chars as input seems more than enough
12303    test $ac_count -gt 10 && break
12304  done
12305  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12306esac
12307
12308      $ac_path_SED_found && break 3
12309    done
12310  done
12311  done
12312IFS=$as_save_IFS
12313  if test -z "$ac_cv_path_SED"; then
12314    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12315  fi
12316else
12317  ac_cv_path_SED=$SED
12318fi
12319
12320fi
12321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12322$as_echo "$ac_cv_path_SED" >&6; }
12323 SED="$ac_cv_path_SED"
12324  rm -f conftest.sed
12325
12326  else
12327    # The variable is set, but is it from the command line or the environment?
12328
12329    # Try to remove the string !SED! from our list.
12330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12332      # If it failed, the variable was not from the command line. Ignore it,
12333      # but warn the user (except for BASH, which is always set by the calling BASH).
12334      if test "xSED" != xBASH; then
12335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12336$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12337      fi
12338      # Try to locate tool using the code snippet
12339      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12340$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12341if ${ac_cv_path_SED+:} false; then :
12342  $as_echo_n "(cached) " >&6
12343else
12344            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12345     for ac_i in 1 2 3 4 5 6 7; do
12346       ac_script="$ac_script$as_nl$ac_script"
12347     done
12348     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12349     { ac_script=; unset ac_script;}
12350     if test -z "$SED"; then
12351  ac_path_SED_found=false
12352  # Loop through the user's path and test for each of PROGNAME-LIST
12353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12354for as_dir in $PATH
12355do
12356  IFS=$as_save_IFS
12357  test -z "$as_dir" && as_dir=.
12358    for ac_prog in sed gsed; do
12359    for ac_exec_ext in '' $ac_executable_extensions; do
12360      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12361      as_fn_executable_p "$ac_path_SED" || continue
12362# Check for GNU ac_path_SED and select it if it is found.
12363  # Check for GNU $ac_path_SED
12364case `"$ac_path_SED" --version 2>&1` in
12365*GNU*)
12366  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12367*)
12368  ac_count=0
12369  $as_echo_n 0123456789 >"conftest.in"
12370  while :
12371  do
12372    cat "conftest.in" "conftest.in" >"conftest.tmp"
12373    mv "conftest.tmp" "conftest.in"
12374    cp "conftest.in" "conftest.nl"
12375    $as_echo '' >> "conftest.nl"
12376    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12377    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12378    as_fn_arith $ac_count + 1 && ac_count=$as_val
12379    if test $ac_count -gt ${ac_path_SED_max-0}; then
12380      # Best one so far, save it but keep looking for a better one
12381      ac_cv_path_SED="$ac_path_SED"
12382      ac_path_SED_max=$ac_count
12383    fi
12384    # 10*(2^10) chars as input seems more than enough
12385    test $ac_count -gt 10 && break
12386  done
12387  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12388esac
12389
12390      $ac_path_SED_found && break 3
12391    done
12392  done
12393  done
12394IFS=$as_save_IFS
12395  if test -z "$ac_cv_path_SED"; then
12396    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12397  fi
12398else
12399  ac_cv_path_SED=$SED
12400fi
12401
12402fi
12403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12404$as_echo "$ac_cv_path_SED" >&6; }
12405 SED="$ac_cv_path_SED"
12406  rm -f conftest.sed
12407
12408    else
12409      # If it succeeded, then it was overridden by the user. We will use it
12410      # for the tool.
12411
12412      # First remove it from the list of overridden variables, so we can test
12413      # for unknown variables in the end.
12414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12415
12416      # Check if the provided tool contains a complete path.
12417      tool_specified="$SED"
12418      tool_basename="${tool_specified##*/}"
12419      if test "x$tool_basename" = "x$tool_specified"; then
12420        # A command without a complete path is provided, search $PATH.
12421        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12422$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12423        # Extract the first word of "$tool_basename", so it can be a program name with args.
12424set dummy $tool_basename; ac_word=$2
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12426$as_echo_n "checking for $ac_word... " >&6; }
12427if ${ac_cv_path_SED+:} false; then :
12428  $as_echo_n "(cached) " >&6
12429else
12430  case $SED in
12431  [\\/]* | ?:[\\/]*)
12432  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12433  ;;
12434  *)
12435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12436for as_dir in $PATH
12437do
12438  IFS=$as_save_IFS
12439  test -z "$as_dir" && as_dir=.
12440    for ac_exec_ext in '' $ac_executable_extensions; do
12441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12442    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12444    break 2
12445  fi
12446done
12447  done
12448IFS=$as_save_IFS
12449
12450  ;;
12451esac
12452fi
12453SED=$ac_cv_path_SED
12454if test -n "$SED"; then
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12456$as_echo "$SED" >&6; }
12457else
12458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
12460fi
12461
12462
12463        if test "x$SED" = x; then
12464          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12465        fi
12466      else
12467        # Otherwise we believe it is a complete path. Use it as it is.
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12469$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12471$as_echo_n "checking for SED... " >&6; }
12472        if test ! -x "$tool_specified"; then
12473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12474$as_echo "not found" >&6; }
12475          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12476        fi
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12478$as_echo "$tool_specified" >&6; }
12479      fi
12480    fi
12481  fi
12482
12483
12484  if test "x$SED" = x; then
12485    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12486  fi
12487
12488
12489
12490  # Always force rm.
12491  RM="$RM -f"
12492
12493  # pwd behaves differently on various platforms and some don't support the -L flag.
12494  # Always use the bash builtin pwd to get uniform behavior.
12495  THEPWDCMD=pwd
12496
12497  # These are not required on all platforms
12498
12499
12500  # Publish this variable in the help.
12501
12502
12503  if test "x$CYGPATH" = x; then
12504    # The variable is not set by user, try to locate tool using the code snippet
12505    for ac_prog in cygpath
12506do
12507  # Extract the first word of "$ac_prog", so it can be a program name with args.
12508set dummy $ac_prog; ac_word=$2
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12510$as_echo_n "checking for $ac_word... " >&6; }
12511if ${ac_cv_path_CYGPATH+:} false; then :
12512  $as_echo_n "(cached) " >&6
12513else
12514  case $CYGPATH in
12515  [\\/]* | ?:[\\/]*)
12516  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12517  ;;
12518  *)
12519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12520for as_dir in $PATH
12521do
12522  IFS=$as_save_IFS
12523  test -z "$as_dir" && as_dir=.
12524    for ac_exec_ext in '' $ac_executable_extensions; do
12525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12526    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12528    break 2
12529  fi
12530done
12531  done
12532IFS=$as_save_IFS
12533
12534  ;;
12535esac
12536fi
12537CYGPATH=$ac_cv_path_CYGPATH
12538if test -n "$CYGPATH"; then
12539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12540$as_echo "$CYGPATH" >&6; }
12541else
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543$as_echo "no" >&6; }
12544fi
12545
12546
12547  test -n "$CYGPATH" && break
12548done
12549
12550  else
12551    # The variable is set, but is it from the command line or the environment?
12552
12553    # Try to remove the string !CYGPATH! from our list.
12554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12556      # If it failed, the variable was not from the command line. Ignore it,
12557      # but warn the user (except for BASH, which is always set by the calling BASH).
12558      if test "xCYGPATH" != xBASH; then
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12560$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12561      fi
12562      # Try to locate tool using the code snippet
12563      for ac_prog in cygpath
12564do
12565  # Extract the first word of "$ac_prog", so it can be a program name with args.
12566set dummy $ac_prog; ac_word=$2
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12568$as_echo_n "checking for $ac_word... " >&6; }
12569if ${ac_cv_path_CYGPATH+:} false; then :
12570  $as_echo_n "(cached) " >&6
12571else
12572  case $CYGPATH in
12573  [\\/]* | ?:[\\/]*)
12574  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12575  ;;
12576  *)
12577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12578for as_dir in $PATH
12579do
12580  IFS=$as_save_IFS
12581  test -z "$as_dir" && as_dir=.
12582    for ac_exec_ext in '' $ac_executable_extensions; do
12583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12584    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12586    break 2
12587  fi
12588done
12589  done
12590IFS=$as_save_IFS
12591
12592  ;;
12593esac
12594fi
12595CYGPATH=$ac_cv_path_CYGPATH
12596if test -n "$CYGPATH"; then
12597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12598$as_echo "$CYGPATH" >&6; }
12599else
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
12602fi
12603
12604
12605  test -n "$CYGPATH" && break
12606done
12607
12608    else
12609      # If it succeeded, then it was overridden by the user. We will use it
12610      # for the tool.
12611
12612      # First remove it from the list of overridden variables, so we can test
12613      # for unknown variables in the end.
12614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12615
12616      # Check if the provided tool contains a complete path.
12617      tool_specified="$CYGPATH"
12618      tool_basename="${tool_specified##*/}"
12619      if test "x$tool_basename" = "x$tool_specified"; then
12620        # A command without a complete path is provided, search $PATH.
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12622$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12623        # Extract the first word of "$tool_basename", so it can be a program name with args.
12624set dummy $tool_basename; ac_word=$2
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12626$as_echo_n "checking for $ac_word... " >&6; }
12627if ${ac_cv_path_CYGPATH+:} false; then :
12628  $as_echo_n "(cached) " >&6
12629else
12630  case $CYGPATH in
12631  [\\/]* | ?:[\\/]*)
12632  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12633  ;;
12634  *)
12635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12636for as_dir in $PATH
12637do
12638  IFS=$as_save_IFS
12639  test -z "$as_dir" && as_dir=.
12640    for ac_exec_ext in '' $ac_executable_extensions; do
12641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12642    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12644    break 2
12645  fi
12646done
12647  done
12648IFS=$as_save_IFS
12649
12650  ;;
12651esac
12652fi
12653CYGPATH=$ac_cv_path_CYGPATH
12654if test -n "$CYGPATH"; then
12655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12656$as_echo "$CYGPATH" >&6; }
12657else
12658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12659$as_echo "no" >&6; }
12660fi
12661
12662
12663        if test "x$CYGPATH" = x; then
12664          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12665        fi
12666      else
12667        # Otherwise we believe it is a complete path. Use it as it is.
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12669$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12671$as_echo_n "checking for CYGPATH... " >&6; }
12672        if test ! -x "$tool_specified"; then
12673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12674$as_echo "not found" >&6; }
12675          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12676        fi
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12678$as_echo "$tool_specified" >&6; }
12679      fi
12680    fi
12681  fi
12682
12683
12684
12685
12686  # Publish this variable in the help.
12687
12688
12689  if test "x$READLINK" = x; then
12690    # The variable is not set by user, try to locate tool using the code snippet
12691    for ac_prog in greadlink readlink
12692do
12693  # Extract the first word of "$ac_prog", so it can be a program name with args.
12694set dummy $ac_prog; ac_word=$2
12695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12696$as_echo_n "checking for $ac_word... " >&6; }
12697if ${ac_cv_path_READLINK+:} false; then :
12698  $as_echo_n "(cached) " >&6
12699else
12700  case $READLINK in
12701  [\\/]* | ?:[\\/]*)
12702  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12703  ;;
12704  *)
12705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12706for as_dir in $PATH
12707do
12708  IFS=$as_save_IFS
12709  test -z "$as_dir" && as_dir=.
12710    for ac_exec_ext in '' $ac_executable_extensions; do
12711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12712    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12714    break 2
12715  fi
12716done
12717  done
12718IFS=$as_save_IFS
12719
12720  ;;
12721esac
12722fi
12723READLINK=$ac_cv_path_READLINK
12724if test -n "$READLINK"; then
12725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12726$as_echo "$READLINK" >&6; }
12727else
12728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12729$as_echo "no" >&6; }
12730fi
12731
12732
12733  test -n "$READLINK" && break
12734done
12735
12736  else
12737    # The variable is set, but is it from the command line or the environment?
12738
12739    # Try to remove the string !READLINK! from our list.
12740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12742      # If it failed, the variable was not from the command line. Ignore it,
12743      # but warn the user (except for BASH, which is always set by the calling BASH).
12744      if test "xREADLINK" != xBASH; then
12745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12746$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12747      fi
12748      # Try to locate tool using the code snippet
12749      for ac_prog in greadlink readlink
12750do
12751  # Extract the first word of "$ac_prog", so it can be a program name with args.
12752set dummy $ac_prog; ac_word=$2
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12754$as_echo_n "checking for $ac_word... " >&6; }
12755if ${ac_cv_path_READLINK+:} false; then :
12756  $as_echo_n "(cached) " >&6
12757else
12758  case $READLINK in
12759  [\\/]* | ?:[\\/]*)
12760  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12761  ;;
12762  *)
12763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12764for as_dir in $PATH
12765do
12766  IFS=$as_save_IFS
12767  test -z "$as_dir" && as_dir=.
12768    for ac_exec_ext in '' $ac_executable_extensions; do
12769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12770    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12772    break 2
12773  fi
12774done
12775  done
12776IFS=$as_save_IFS
12777
12778  ;;
12779esac
12780fi
12781READLINK=$ac_cv_path_READLINK
12782if test -n "$READLINK"; then
12783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12784$as_echo "$READLINK" >&6; }
12785else
12786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12787$as_echo "no" >&6; }
12788fi
12789
12790
12791  test -n "$READLINK" && break
12792done
12793
12794    else
12795      # If it succeeded, then it was overridden by the user. We will use it
12796      # for the tool.
12797
12798      # First remove it from the list of overridden variables, so we can test
12799      # for unknown variables in the end.
12800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12801
12802      # Check if the provided tool contains a complete path.
12803      tool_specified="$READLINK"
12804      tool_basename="${tool_specified##*/}"
12805      if test "x$tool_basename" = "x$tool_specified"; then
12806        # A command without a complete path is provided, search $PATH.
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12808$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12809        # Extract the first word of "$tool_basename", so it can be a program name with args.
12810set dummy $tool_basename; ac_word=$2
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12812$as_echo_n "checking for $ac_word... " >&6; }
12813if ${ac_cv_path_READLINK+:} false; then :
12814  $as_echo_n "(cached) " >&6
12815else
12816  case $READLINK in
12817  [\\/]* | ?:[\\/]*)
12818  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12819  ;;
12820  *)
12821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836  ;;
12837esac
12838fi
12839READLINK=$ac_cv_path_READLINK
12840if test -n "$READLINK"; then
12841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12842$as_echo "$READLINK" >&6; }
12843else
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845$as_echo "no" >&6; }
12846fi
12847
12848
12849        if test "x$READLINK" = x; then
12850          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12851        fi
12852      else
12853        # Otherwise we believe it is a complete path. Use it as it is.
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12855$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12857$as_echo_n "checking for READLINK... " >&6; }
12858        if test ! -x "$tool_specified"; then
12859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12860$as_echo "not found" >&6; }
12861          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12862        fi
12863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12864$as_echo "$tool_specified" >&6; }
12865      fi
12866    fi
12867  fi
12868
12869
12870
12871
12872  # Publish this variable in the help.
12873
12874
12875  if test "x$DF" = x; then
12876    # The variable is not set by user, try to locate tool using the code snippet
12877    for ac_prog in df
12878do
12879  # Extract the first word of "$ac_prog", so it can be a program name with args.
12880set dummy $ac_prog; ac_word=$2
12881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12882$as_echo_n "checking for $ac_word... " >&6; }
12883if ${ac_cv_path_DF+:} false; then :
12884  $as_echo_n "(cached) " >&6
12885else
12886  case $DF in
12887  [\\/]* | ?:[\\/]*)
12888  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12889  ;;
12890  *)
12891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12892for as_dir in $PATH
12893do
12894  IFS=$as_save_IFS
12895  test -z "$as_dir" && as_dir=.
12896    for ac_exec_ext in '' $ac_executable_extensions; do
12897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12898    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12900    break 2
12901  fi
12902done
12903  done
12904IFS=$as_save_IFS
12905
12906  ;;
12907esac
12908fi
12909DF=$ac_cv_path_DF
12910if test -n "$DF"; then
12911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12912$as_echo "$DF" >&6; }
12913else
12914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12915$as_echo "no" >&6; }
12916fi
12917
12918
12919  test -n "$DF" && break
12920done
12921
12922  else
12923    # The variable is set, but is it from the command line or the environment?
12924
12925    # Try to remove the string !DF! from our list.
12926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12928      # If it failed, the variable was not from the command line. Ignore it,
12929      # but warn the user (except for BASH, which is always set by the calling BASH).
12930      if test "xDF" != xBASH; then
12931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12932$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12933      fi
12934      # Try to locate tool using the code snippet
12935      for ac_prog in df
12936do
12937  # Extract the first word of "$ac_prog", so it can be a program name with args.
12938set dummy $ac_prog; ac_word=$2
12939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12940$as_echo_n "checking for $ac_word... " >&6; }
12941if ${ac_cv_path_DF+:} false; then :
12942  $as_echo_n "(cached) " >&6
12943else
12944  case $DF in
12945  [\\/]* | ?:[\\/]*)
12946  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12947  ;;
12948  *)
12949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12950for as_dir in $PATH
12951do
12952  IFS=$as_save_IFS
12953  test -z "$as_dir" && as_dir=.
12954    for ac_exec_ext in '' $ac_executable_extensions; do
12955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12956    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12958    break 2
12959  fi
12960done
12961  done
12962IFS=$as_save_IFS
12963
12964  ;;
12965esac
12966fi
12967DF=$ac_cv_path_DF
12968if test -n "$DF"; then
12969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12970$as_echo "$DF" >&6; }
12971else
12972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12973$as_echo "no" >&6; }
12974fi
12975
12976
12977  test -n "$DF" && break
12978done
12979
12980    else
12981      # If it succeeded, then it was overridden by the user. We will use it
12982      # for the tool.
12983
12984      # First remove it from the list of overridden variables, so we can test
12985      # for unknown variables in the end.
12986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12987
12988      # Check if the provided tool contains a complete path.
12989      tool_specified="$DF"
12990      tool_basename="${tool_specified##*/}"
12991      if test "x$tool_basename" = "x$tool_specified"; then
12992        # A command without a complete path is provided, search $PATH.
12993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12994$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12995        # Extract the first word of "$tool_basename", so it can be a program name with args.
12996set dummy $tool_basename; ac_word=$2
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12998$as_echo_n "checking for $ac_word... " >&6; }
12999if ${ac_cv_path_DF+:} false; then :
13000  $as_echo_n "(cached) " >&6
13001else
13002  case $DF in
13003  [\\/]* | ?:[\\/]*)
13004  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13005  ;;
13006  *)
13007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13008for as_dir in $PATH
13009do
13010  IFS=$as_save_IFS
13011  test -z "$as_dir" && as_dir=.
13012    for ac_exec_ext in '' $ac_executable_extensions; do
13013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13014    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13016    break 2
13017  fi
13018done
13019  done
13020IFS=$as_save_IFS
13021
13022  ;;
13023esac
13024fi
13025DF=$ac_cv_path_DF
13026if test -n "$DF"; then
13027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13028$as_echo "$DF" >&6; }
13029else
13030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13031$as_echo "no" >&6; }
13032fi
13033
13034
13035        if test "x$DF" = x; then
13036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13037        fi
13038      else
13039        # Otherwise we believe it is a complete path. Use it as it is.
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13041$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13043$as_echo_n "checking for DF... " >&6; }
13044        if test ! -x "$tool_specified"; then
13045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13046$as_echo "not found" >&6; }
13047          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13048        fi
13049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13050$as_echo "$tool_specified" >&6; }
13051      fi
13052    fi
13053  fi
13054
13055
13056
13057
13058  # Publish this variable in the help.
13059
13060
13061  if test "x$CPIO" = x; then
13062    # The variable is not set by user, try to locate tool using the code snippet
13063    for ac_prog in cpio bsdcpio
13064do
13065  # Extract the first word of "$ac_prog", so it can be a program name with args.
13066set dummy $ac_prog; ac_word=$2
13067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13068$as_echo_n "checking for $ac_word... " >&6; }
13069if ${ac_cv_path_CPIO+:} false; then :
13070  $as_echo_n "(cached) " >&6
13071else
13072  case $CPIO in
13073  [\\/]* | ?:[\\/]*)
13074  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13075  ;;
13076  *)
13077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13078for as_dir in $PATH
13079do
13080  IFS=$as_save_IFS
13081  test -z "$as_dir" && as_dir=.
13082    for ac_exec_ext in '' $ac_executable_extensions; do
13083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13084    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13086    break 2
13087  fi
13088done
13089  done
13090IFS=$as_save_IFS
13091
13092  ;;
13093esac
13094fi
13095CPIO=$ac_cv_path_CPIO
13096if test -n "$CPIO"; then
13097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13098$as_echo "$CPIO" >&6; }
13099else
13100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101$as_echo "no" >&6; }
13102fi
13103
13104
13105  test -n "$CPIO" && break
13106done
13107
13108  else
13109    # The variable is set, but is it from the command line or the environment?
13110
13111    # Try to remove the string !CPIO! from our list.
13112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13114      # If it failed, the variable was not from the command line. Ignore it,
13115      # but warn the user (except for BASH, which is always set by the calling BASH).
13116      if test "xCPIO" != xBASH; then
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13118$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13119      fi
13120      # Try to locate tool using the code snippet
13121      for ac_prog in cpio bsdcpio
13122do
13123  # Extract the first word of "$ac_prog", so it can be a program name with args.
13124set dummy $ac_prog; ac_word=$2
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126$as_echo_n "checking for $ac_word... " >&6; }
13127if ${ac_cv_path_CPIO+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  case $CPIO in
13131  [\\/]* | ?:[\\/]*)
13132  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13133  ;;
13134  *)
13135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13136for as_dir in $PATH
13137do
13138  IFS=$as_save_IFS
13139  test -z "$as_dir" && as_dir=.
13140    for ac_exec_ext in '' $ac_executable_extensions; do
13141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13142    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13144    break 2
13145  fi
13146done
13147  done
13148IFS=$as_save_IFS
13149
13150  ;;
13151esac
13152fi
13153CPIO=$ac_cv_path_CPIO
13154if test -n "$CPIO"; then
13155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13156$as_echo "$CPIO" >&6; }
13157else
13158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13159$as_echo "no" >&6; }
13160fi
13161
13162
13163  test -n "$CPIO" && break
13164done
13165
13166    else
13167      # If it succeeded, then it was overridden by the user. We will use it
13168      # for the tool.
13169
13170      # First remove it from the list of overridden variables, so we can test
13171      # for unknown variables in the end.
13172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13173
13174      # Check if the provided tool contains a complete path.
13175      tool_specified="$CPIO"
13176      tool_basename="${tool_specified##*/}"
13177      if test "x$tool_basename" = "x$tool_specified"; then
13178        # A command without a complete path is provided, search $PATH.
13179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13180$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13181        # Extract the first word of "$tool_basename", so it can be a program name with args.
13182set dummy $tool_basename; ac_word=$2
13183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13184$as_echo_n "checking for $ac_word... " >&6; }
13185if ${ac_cv_path_CPIO+:} false; then :
13186  $as_echo_n "(cached) " >&6
13187else
13188  case $CPIO in
13189  [\\/]* | ?:[\\/]*)
13190  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13191  ;;
13192  *)
13193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13194for as_dir in $PATH
13195do
13196  IFS=$as_save_IFS
13197  test -z "$as_dir" && as_dir=.
13198    for ac_exec_ext in '' $ac_executable_extensions; do
13199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13200    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13202    break 2
13203  fi
13204done
13205  done
13206IFS=$as_save_IFS
13207
13208  ;;
13209esac
13210fi
13211CPIO=$ac_cv_path_CPIO
13212if test -n "$CPIO"; then
13213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13214$as_echo "$CPIO" >&6; }
13215else
13216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13217$as_echo "no" >&6; }
13218fi
13219
13220
13221        if test "x$CPIO" = x; then
13222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13223        fi
13224      else
13225        # Otherwise we believe it is a complete path. Use it as it is.
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13227$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13229$as_echo_n "checking for CPIO... " >&6; }
13230        if test ! -x "$tool_specified"; then
13231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13232$as_echo "not found" >&6; }
13233          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13234        fi
13235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13236$as_echo "$tool_specified" >&6; }
13237      fi
13238    fi
13239  fi
13240
13241
13242
13243
13244# Now we can determine OpenJDK build and target platforms. This is required to
13245# have early on.
13246# Make sure we can run config.sub.
13247$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13248  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13249
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13251$as_echo_n "checking build system type... " >&6; }
13252if ${ac_cv_build+:} false; then :
13253  $as_echo_n "(cached) " >&6
13254else
13255  ac_build_alias=$build_alias
13256test "x$ac_build_alias" = x &&
13257  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13258test "x$ac_build_alias" = x &&
13259  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13260ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13261  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13262
13263fi
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13265$as_echo "$ac_cv_build" >&6; }
13266case $ac_cv_build in
13267*-*-*) ;;
13268*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13269esac
13270build=$ac_cv_build
13271ac_save_IFS=$IFS; IFS='-'
13272set x $ac_cv_build
13273shift
13274build_cpu=$1
13275build_vendor=$2
13276shift; shift
13277# Remember, the first character of IFS is used to create $*,
13278# except with old shells:
13279build_os=$*
13280IFS=$ac_save_IFS
13281case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13282
13283
13284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13285$as_echo_n "checking host system type... " >&6; }
13286if ${ac_cv_host+:} false; then :
13287  $as_echo_n "(cached) " >&6
13288else
13289  if test "x$host_alias" = x; then
13290  ac_cv_host=$ac_cv_build
13291else
13292  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13293    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13294fi
13295
13296fi
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13298$as_echo "$ac_cv_host" >&6; }
13299case $ac_cv_host in
13300*-*-*) ;;
13301*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13302esac
13303host=$ac_cv_host
13304ac_save_IFS=$IFS; IFS='-'
13305set x $ac_cv_host
13306shift
13307host_cpu=$1
13308host_vendor=$2
13309shift; shift
13310# Remember, the first character of IFS is used to create $*,
13311# except with old shells:
13312host_os=$*
13313IFS=$ac_save_IFS
13314case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13315
13316
13317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13318$as_echo_n "checking target system type... " >&6; }
13319if ${ac_cv_target+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  if test "x$target_alias" = x; then
13323  ac_cv_target=$ac_cv_host
13324else
13325  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13326    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13327fi
13328
13329fi
13330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13331$as_echo "$ac_cv_target" >&6; }
13332case $ac_cv_target in
13333*-*-*) ;;
13334*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13335esac
13336target=$ac_cv_target
13337ac_save_IFS=$IFS; IFS='-'
13338set x $ac_cv_target
13339shift
13340target_cpu=$1
13341target_vendor=$2
13342shift; shift
13343# Remember, the first character of IFS is used to create $*,
13344# except with old shells:
13345target_os=$*
13346IFS=$ac_save_IFS
13347case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13348
13349
13350# The aliases save the names the user supplied, while $host etc.
13351# will get canonicalized.
13352test -n "$target_alias" &&
13353  test "$program_prefix$program_suffix$program_transform_name" = \
13354    NONENONEs,x,x, &&
13355  program_prefix=${target_alias}-
13356
13357  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13358  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13359  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13360  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13361  # to use the configure naming style.
13362
13363
13364
13365
13366
13367  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13368  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13369  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13370  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13371  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13372  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13373
13374
13375
13376  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13377
13378  case "$build_os" in
13379    *linux*)
13380      VAR_OS=linux
13381      VAR_OS_TYPE=unix
13382      ;;
13383    *solaris*)
13384      VAR_OS=solaris
13385      VAR_OS_TYPE=unix
13386      ;;
13387    *darwin*)
13388      VAR_OS=macosx
13389      VAR_OS_TYPE=unix
13390      ;;
13391    *bsd*)
13392      VAR_OS=bsd
13393      VAR_OS_TYPE=unix
13394      ;;
13395    *cygwin*)
13396      VAR_OS=windows
13397      VAR_OS_ENV=windows.cygwin
13398      ;;
13399    *mingw*)
13400      VAR_OS=windows
13401      VAR_OS_ENV=windows.msys
13402      ;;
13403    *aix*)
13404      VAR_OS=aix
13405      VAR_OS_TYPE=unix
13406      ;;
13407    *)
13408      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13409      ;;
13410  esac
13411
13412
13413  # First argument is the cpu name from the trip/quad
13414  case "$build_cpu" in
13415    x86_64)
13416      VAR_CPU=x86_64
13417      VAR_CPU_ARCH=x86
13418      VAR_CPU_BITS=64
13419      VAR_CPU_ENDIAN=little
13420      ;;
13421    i?86)
13422      VAR_CPU=x86
13423      VAR_CPU_ARCH=x86
13424      VAR_CPU_BITS=32
13425      VAR_CPU_ENDIAN=little
13426      ;;
13427    arm*)
13428      VAR_CPU=arm
13429      VAR_CPU_ARCH=arm
13430      VAR_CPU_BITS=32
13431      VAR_CPU_ENDIAN=little
13432      ;;
13433    aarch64)
13434      VAR_CPU=aarch64
13435      VAR_CPU_ARCH=aarch64
13436      VAR_CPU_BITS=64
13437      VAR_CPU_ENDIAN=little
13438      ;;
13439    powerpc)
13440      VAR_CPU=ppc
13441      VAR_CPU_ARCH=ppc
13442      VAR_CPU_BITS=32
13443      VAR_CPU_ENDIAN=big
13444      ;;
13445    powerpc64)
13446      VAR_CPU=ppc64
13447      VAR_CPU_ARCH=ppc
13448      VAR_CPU_BITS=64
13449      VAR_CPU_ENDIAN=big
13450      ;;
13451    powerpc64le)
13452      VAR_CPU=ppc64
13453      VAR_CPU_ARCH=ppc
13454      VAR_CPU_BITS=64
13455      VAR_CPU_ENDIAN=little
13456      ;;
13457    s390)
13458      VAR_CPU=s390
13459      VAR_CPU_ARCH=s390
13460      VAR_CPU_BITS=32
13461      VAR_CPU_ENDIAN=big
13462      ;;
13463    s390x)
13464      VAR_CPU=s390x
13465      VAR_CPU_ARCH=s390
13466      VAR_CPU_BITS=64
13467      VAR_CPU_ENDIAN=big
13468      ;;
13469    sparc)
13470      VAR_CPU=sparc
13471      VAR_CPU_ARCH=sparc
13472      VAR_CPU_BITS=32
13473      VAR_CPU_ENDIAN=big
13474      ;;
13475    sparcv9|sparc64)
13476      VAR_CPU=sparcv9
13477      VAR_CPU_ARCH=sparc
13478      VAR_CPU_BITS=64
13479      VAR_CPU_ENDIAN=big
13480      ;;
13481    *)
13482      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13483      ;;
13484  esac
13485
13486  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13487  OPENJDK_BUILD_OS="$VAR_OS"
13488  if test "x$VAR_OS_TYPE" != x; then
13489    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13490  else
13491    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13492  fi
13493  if test "x$VAR_OS_ENV" != x; then
13494    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13495  else
13496    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13497  fi
13498  OPENJDK_BUILD_CPU="$VAR_CPU"
13499  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13500  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13501  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13502
13503
13504
13505
13506
13507
13508
13509
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13511$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13513$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13514
13515  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13516
13517  case "$host_os" in
13518    *linux*)
13519      VAR_OS=linux
13520      VAR_OS_TYPE=unix
13521      ;;
13522    *solaris*)
13523      VAR_OS=solaris
13524      VAR_OS_TYPE=unix
13525      ;;
13526    *darwin*)
13527      VAR_OS=macosx
13528      VAR_OS_TYPE=unix
13529      ;;
13530    *bsd*)
13531      VAR_OS=bsd
13532      VAR_OS_TYPE=unix
13533      ;;
13534    *cygwin*)
13535      VAR_OS=windows
13536      VAR_OS_ENV=windows.cygwin
13537      ;;
13538    *mingw*)
13539      VAR_OS=windows
13540      VAR_OS_ENV=windows.msys
13541      ;;
13542    *aix*)
13543      VAR_OS=aix
13544      VAR_OS_TYPE=unix
13545      ;;
13546    *)
13547      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13548      ;;
13549  esac
13550
13551
13552  # First argument is the cpu name from the trip/quad
13553  case "$host_cpu" in
13554    x86_64)
13555      VAR_CPU=x86_64
13556      VAR_CPU_ARCH=x86
13557      VAR_CPU_BITS=64
13558      VAR_CPU_ENDIAN=little
13559      ;;
13560    i?86)
13561      VAR_CPU=x86
13562      VAR_CPU_ARCH=x86
13563      VAR_CPU_BITS=32
13564      VAR_CPU_ENDIAN=little
13565      ;;
13566    arm*)
13567      VAR_CPU=arm
13568      VAR_CPU_ARCH=arm
13569      VAR_CPU_BITS=32
13570      VAR_CPU_ENDIAN=little
13571      ;;
13572    aarch64)
13573      VAR_CPU=aarch64
13574      VAR_CPU_ARCH=aarch64
13575      VAR_CPU_BITS=64
13576      VAR_CPU_ENDIAN=little
13577      ;;
13578    powerpc)
13579      VAR_CPU=ppc
13580      VAR_CPU_ARCH=ppc
13581      VAR_CPU_BITS=32
13582      VAR_CPU_ENDIAN=big
13583      ;;
13584    powerpc64)
13585      VAR_CPU=ppc64
13586      VAR_CPU_ARCH=ppc
13587      VAR_CPU_BITS=64
13588      VAR_CPU_ENDIAN=big
13589      ;;
13590    powerpc64le)
13591      VAR_CPU=ppc64
13592      VAR_CPU_ARCH=ppc
13593      VAR_CPU_BITS=64
13594      VAR_CPU_ENDIAN=little
13595      ;;
13596    s390)
13597      VAR_CPU=s390
13598      VAR_CPU_ARCH=s390
13599      VAR_CPU_BITS=32
13600      VAR_CPU_ENDIAN=big
13601      ;;
13602    s390x)
13603      VAR_CPU=s390x
13604      VAR_CPU_ARCH=s390
13605      VAR_CPU_BITS=64
13606      VAR_CPU_ENDIAN=big
13607      ;;
13608    sparc)
13609      VAR_CPU=sparc
13610      VAR_CPU_ARCH=sparc
13611      VAR_CPU_BITS=32
13612      VAR_CPU_ENDIAN=big
13613      ;;
13614    sparcv9|sparc64)
13615      VAR_CPU=sparcv9
13616      VAR_CPU_ARCH=sparc
13617      VAR_CPU_BITS=64
13618      VAR_CPU_ENDIAN=big
13619      ;;
13620    *)
13621      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13622      ;;
13623  esac
13624
13625  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13626  OPENJDK_TARGET_OS="$VAR_OS"
13627  if test "x$VAR_OS_TYPE" != x; then
13628    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13629  else
13630    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13631  fi
13632  if test "x$VAR_OS_ENV" != x; then
13633    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13634  else
13635    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13636  fi
13637  OPENJDK_TARGET_CPU="$VAR_CPU"
13638  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13639  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13640  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13641
13642
13643
13644
13645
13646
13647
13648
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13650$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13652$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13653
13654
13655
13656# Check whether --with-target-bits was given.
13657if test "${with_target_bits+set}" = set; then :
13658  withval=$with_target_bits;
13659fi
13660
13661
13662  # We have three types of compiles:
13663  # native  == normal compilation, target system == build system
13664  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13665  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13666  #
13667  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13668    # We're doing a proper cross-compilation
13669    COMPILE_TYPE="cross"
13670  else
13671    COMPILE_TYPE="native"
13672  fi
13673
13674  if test "x$with_target_bits" != x; then
13675    if test "x$COMPILE_TYPE" = "xcross"; then
13676      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13677    fi
13678
13679    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13680      # A reduced build is requested
13681      COMPILE_TYPE="reduced"
13682      OPENJDK_TARGET_CPU_BITS=32
13683      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13684        OPENJDK_TARGET_CPU=x86
13685      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13686        OPENJDK_TARGET_CPU=sparc
13687      else
13688        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13689      fi
13690    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13691      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
13692    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13693      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13694$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13695    else
13696      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13697    fi
13698  fi
13699
13700
13701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13702$as_echo_n "checking compilation type... " >&6; }
13703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13704$as_echo "$COMPILE_TYPE" >&6; }
13705
13706
13707  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13708    REQUIRED_OS_NAME=SunOS
13709    REQUIRED_OS_VERSION=5.10
13710  fi
13711  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13712    REQUIRED_OS_NAME=Linux
13713    REQUIRED_OS_VERSION=2.6
13714  fi
13715  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13716    REQUIRED_OS_NAME=Windows
13717    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13718      REQUIRED_OS_VERSION=5.2
13719    else
13720      REQUIRED_OS_VERSION=5.1
13721    fi
13722  fi
13723  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13724    REQUIRED_OS_NAME=Darwin
13725    REQUIRED_OS_VERSION=11.2
13726  fi
13727
13728
13729
13730
13731
13732  # Also store the legacy naming of the cpu.
13733  # Ie i586 and amd64 instead of x86 and x86_64
13734  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13735  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13736    OPENJDK_TARGET_CPU_LEGACY="i586"
13737  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13738    # On all platforms except MacOSX replace x86_64 with amd64.
13739    OPENJDK_TARGET_CPU_LEGACY="amd64"
13740  fi
13741
13742
13743  # And the second legacy naming of the cpu.
13744  # Ie i386 and amd64 instead of x86 and x86_64.
13745  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13746  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13747    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13748  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13749    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13750  fi
13751
13752
13753  # This is the name of the cpu (but using i386 and amd64 instead of
13754  # x86 and x86_64, respectively), preceeded by a /, to be used when
13755  # locating libraries. On macosx, it's empty, though.
13756  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13757  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13758    OPENJDK_TARGET_CPU_LIBDIR=""
13759  fi
13760
13761
13762  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13763  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13764  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13765  OPENJDK_TARGET_CPU_ISADIR=""
13766  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13767    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13768      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13769    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13770      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13771    fi
13772  fi
13773
13774
13775  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13776  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13777  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13778    # On linux only, we replace x86 with i386.
13779    OPENJDK_TARGET_CPU_OSARCH="i386"
13780  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13781    # On all platforms except macosx, we replace x86_64 with amd64.
13782    OPENJDK_TARGET_CPU_OSARCH="amd64"
13783  fi
13784
13785
13786  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13787  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13788    OPENJDK_TARGET_CPU_JLI="i386"
13789  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13790    # On all platforms except macosx, we replace x86_64 with amd64.
13791    OPENJDK_TARGET_CPU_JLI="amd64"
13792  fi
13793  # Now setup the -D flags for building libjli.
13794  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13795  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13796    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13797      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13798    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13799      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13800    fi
13801  fi
13802
13803
13804  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13805      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13806  else
13807      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13808  fi
13809
13810
13811  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13812    A_LP64="LP64:="
13813    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13814    # unpack200.exe
13815    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13816      ADD_LP64="-D_LP64=1"
13817    fi
13818  fi
13819  LP64=$A_LP64
13820
13821
13822  if test "x$COMPILE_TYPE" = "xcross"; then
13823    # FIXME: ... or should this include reduced builds..?
13824    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13825  else
13826    DEFINE_CROSS_COMPILE_ARCH=""
13827  fi
13828
13829
13830  # ZERO_ARCHDEF is used to enable architecture-specific code
13831  case "${OPENJDK_TARGET_CPU}" in
13832    ppc)     ZERO_ARCHDEF=PPC32 ;;
13833    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13834    s390*)   ZERO_ARCHDEF=S390  ;;
13835    sparc*)  ZERO_ARCHDEF=SPARC ;;
13836    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13837    x86)     ZERO_ARCHDEF=IA32  ;;
13838    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13839  esac
13840
13841
13842
13843
13844# Continue setting up basic stuff. Most remaining code require fundamental tools.
13845
13846  # Save the current directory this script was started from
13847  CURDIR="$PWD"
13848
13849  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13850    PATH_SEP=";"
13851
13852  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13853  if test $SRC_ROOT_LENGTH -gt 100; then
13854    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13855  fi
13856
13857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13859$as_echo_n "checking cygwin release... " >&6; }
13860    CYGWIN_VERSION=`$UNAME -r`
13861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13862$as_echo "$CYGWIN_VERSION" >&6; }
13863    WINDOWS_ENV_VENDOR='cygwin'
13864    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13865
13866    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13867    if test "x$CYGWIN_VERSION_OLD" != x; then
13868      { $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
13869$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;}
13870      as_fn_error $? "Cannot continue" "$LINENO" 5
13871    fi
13872    if test "x$CYGPATH" = x; then
13873      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13874    fi
13875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13876$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13877    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13878    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13879    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13880    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13882$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13883    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13884    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13885    if test "x$test_cygdrive_prefix" = x; then
13886      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13887    fi
13888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13890$as_echo_n "checking msys release... " >&6; }
13891    MSYS_VERSION=`$UNAME -r`
13892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13893$as_echo "$MSYS_VERSION" >&6; }
13894
13895    WINDOWS_ENV_VENDOR='msys'
13896    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13897
13898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13899$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13900    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13901    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13902
13903  windows_path="$MSYS_ROOT_PATH"
13904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13905    unix_path=`$CYGPATH -u "$windows_path"`
13906    MSYS_ROOT_PATH="$unix_path"
13907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13909    MSYS_ROOT_PATH="$unix_path"
13910  fi
13911
13912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13913$as_echo "$MSYS_ROOT_PATH" >&6; }
13914    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13915  else
13916    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13917  fi
13918
13919  # Test if windows or unix (cygwin/msys) find is first in path.
13920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13921$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13922  FIND_BINARY_OUTPUT=`find --version 2>&1`
13923  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13925$as_echo "unix style" >&6; }
13926  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13928$as_echo "Windows" >&6; }
13929    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13930$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13931    { $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
13932$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13933    as_fn_error $? "Cannot continue" "$LINENO" 5
13934  else
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13936$as_echo "unknown" >&6; }
13937    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13938$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13939  fi
13940
13941  else
13942    PATH_SEP=":"
13943  fi
13944
13945
13946  # We get the top-level directory from the supporting wrappers.
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13948$as_echo_n "checking for top-level directory... " >&6; }
13949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13950$as_echo "$TOPDIR" >&6; }
13951
13952
13953  # Save the original version of TOPDIR for string comparisons
13954  ORIGINAL_TOPDIR="$TOPDIR"
13955
13956
13957  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13958
13959  # Only process if variable expands to non-empty
13960
13961  if test "x$CURDIR" != x; then
13962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13963
13964  # Input might be given as Windows format, start by converting to
13965  # unix format.
13966  path="$CURDIR"
13967  new_path=`$CYGPATH -u "$path"`
13968
13969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13972  # "foo.exe" is OK but "foo" is an error.
13973  #
13974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13975  # It is also a way to make sure we got the proper file name for the real test later on.
13976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13977  if test "x$test_shortpath" = x; then
13978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13979$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13980    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13981  fi
13982
13983  # Call helper function which possibly converts this using DOS-style short mode.
13984  # If so, the updated path is stored in $new_path.
13985
13986  input_path="$new_path"
13987  # Check if we need to convert this using DOS-style short mode. If the path
13988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13989  # take no chances and rewrite it.
13990  # Note: m4 eats our [], so we need to use [ and ] instead.
13991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13992  if test "x$has_forbidden_chars" != x; then
13993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13997      # Going to short mode and back again did indeed matter. Since short mode is
13998      # case insensitive, let's make it lowercase to improve readability.
13999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14000      # Now convert it back to Unix-style (cygpath)
14001      input_path=`$CYGPATH -u "$shortmode_path"`
14002      new_path="$input_path"
14003    fi
14004  fi
14005
14006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14007  if test "x$test_cygdrive_prefix" = x; then
14008    # As a simple fix, exclude /usr/bin since it's not a real path.
14009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14011      # a path prefixed by /cygdrive for fixpath to work.
14012      new_path="$CYGWIN_ROOT_PATH$input_path"
14013    fi
14014  fi
14015
14016
14017  if test "x$path" != "x$new_path"; then
14018    CURDIR="$new_path"
14019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14020$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14021  fi
14022
14023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14024
14025  path="$CURDIR"
14026  has_colon=`$ECHO $path | $GREP ^.:`
14027  new_path="$path"
14028  if test "x$has_colon" = x; then
14029    # Not in mixed or Windows style, start by that.
14030    new_path=`cmd //c echo $path`
14031  fi
14032
14033
14034  input_path="$new_path"
14035  # Check if we need to convert this using DOS-style short mode. If the path
14036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14037  # take no chances and rewrite it.
14038  # Note: m4 eats our [], so we need to use [ and ] instead.
14039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14040  if test "x$has_forbidden_chars" != x; then
14041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14043  fi
14044
14045
14046  windows_path="$new_path"
14047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14048    unix_path=`$CYGPATH -u "$windows_path"`
14049    new_path="$unix_path"
14050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14052    new_path="$unix_path"
14053  fi
14054
14055  if test "x$path" != "x$new_path"; then
14056    CURDIR="$new_path"
14057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14058$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14059  fi
14060
14061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14063
14064    else
14065      # We're on a unix platform. Hooray! :)
14066      path="$CURDIR"
14067      has_space=`$ECHO "$path" | $GREP " "`
14068      if test "x$has_space" != x; then
14069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14070$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14072      fi
14073
14074      # Use eval to expand a potential ~
14075      eval path="$path"
14076      if test ! -f "$path" && test ! -d "$path"; then
14077        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14078      fi
14079
14080      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14081    fi
14082  fi
14083
14084
14085  # Only process if variable expands to non-empty
14086
14087  if test "x$TOPDIR" != x; then
14088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14089
14090  # Input might be given as Windows format, start by converting to
14091  # unix format.
14092  path="$TOPDIR"
14093  new_path=`$CYGPATH -u "$path"`
14094
14095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14098  # "foo.exe" is OK but "foo" is an error.
14099  #
14100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14101  # It is also a way to make sure we got the proper file name for the real test later on.
14102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14103  if test "x$test_shortpath" = x; then
14104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14105$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14106    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14107  fi
14108
14109  # Call helper function which possibly converts this using DOS-style short mode.
14110  # If so, the updated path is stored in $new_path.
14111
14112  input_path="$new_path"
14113  # Check if we need to convert this using DOS-style short mode. If the path
14114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14115  # take no chances and rewrite it.
14116  # Note: m4 eats our [], so we need to use [ and ] instead.
14117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14118  if test "x$has_forbidden_chars" != x; then
14119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14123      # Going to short mode and back again did indeed matter. Since short mode is
14124      # case insensitive, let's make it lowercase to improve readability.
14125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14126      # Now convert it back to Unix-style (cygpath)
14127      input_path=`$CYGPATH -u "$shortmode_path"`
14128      new_path="$input_path"
14129    fi
14130  fi
14131
14132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14133  if test "x$test_cygdrive_prefix" = x; then
14134    # As a simple fix, exclude /usr/bin since it's not a real path.
14135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14137      # a path prefixed by /cygdrive for fixpath to work.
14138      new_path="$CYGWIN_ROOT_PATH$input_path"
14139    fi
14140  fi
14141
14142
14143  if test "x$path" != "x$new_path"; then
14144    TOPDIR="$new_path"
14145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14146$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14147  fi
14148
14149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14150
14151  path="$TOPDIR"
14152  has_colon=`$ECHO $path | $GREP ^.:`
14153  new_path="$path"
14154  if test "x$has_colon" = x; then
14155    # Not in mixed or Windows style, start by that.
14156    new_path=`cmd //c echo $path`
14157  fi
14158
14159
14160  input_path="$new_path"
14161  # Check if we need to convert this using DOS-style short mode. If the path
14162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14163  # take no chances and rewrite it.
14164  # Note: m4 eats our [], so we need to use [ and ] instead.
14165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14166  if test "x$has_forbidden_chars" != x; then
14167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14169  fi
14170
14171
14172  windows_path="$new_path"
14173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14174    unix_path=`$CYGPATH -u "$windows_path"`
14175    new_path="$unix_path"
14176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14178    new_path="$unix_path"
14179  fi
14180
14181  if test "x$path" != "x$new_path"; then
14182    TOPDIR="$new_path"
14183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14184$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14185  fi
14186
14187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14189
14190    else
14191      # We're on a unix platform. Hooray! :)
14192      path="$TOPDIR"
14193      has_space=`$ECHO "$path" | $GREP " "`
14194      if test "x$has_space" != x; then
14195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14196$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14198      fi
14199
14200      # Use eval to expand a potential ~
14201      eval path="$path"
14202      if test ! -f "$path" && test ! -d "$path"; then
14203        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14204      fi
14205
14206      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14207    fi
14208  fi
14209
14210  # SRC_ROOT is a traditional alias for TOPDIR.
14211  SRC_ROOT=$TOPDIR
14212
14213  # Calculate a canonical version of TOPDIR for string comparisons
14214  CANONICAL_TOPDIR=$TOPDIR
14215
14216  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14217    # Follow a chain of symbolic links. Use readlink
14218    # where it exists, else fall back to horribly
14219    # complicated shell code.
14220    if test "x$READLINK_TESTED" != yes; then
14221      # On MacOSX there is a readlink tool with a different
14222      # purpose than the GNU readlink tool. Check the found readlink.
14223      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14224      if test "x$ISGNU" = x; then
14225        # A readlink that we do not know how to use.
14226        # Are there other non-GNU readlinks out there?
14227        READLINK_TESTED=yes
14228        READLINK=
14229      fi
14230    fi
14231
14232    if test "x$READLINK" != x; then
14233      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14234    else
14235      # Save the current directory for restoring afterwards
14236      STARTDIR=$PWD
14237      COUNTER=0
14238      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14239      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14240      cd $sym_link_dir
14241      # Use -P flag to resolve symlinks in directories.
14242      cd `$THEPWDCMD -P`
14243      sym_link_dir=`$THEPWDCMD -P`
14244      # Resolve file symlinks
14245      while test $COUNTER -lt 20; do
14246        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14247        if test "x$ISLINK" == x; then
14248          # This is not a symbolic link! We are done!
14249          break
14250        fi
14251        # Again resolve directory symlinks since the target of the just found
14252        # link could be in a different directory
14253        cd `$DIRNAME $ISLINK`
14254        sym_link_dir=`$THEPWDCMD -P`
14255        sym_link_file=`$BASENAME $ISLINK`
14256        let COUNTER=COUNTER+1
14257      done
14258      cd $STARTDIR
14259      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14260    fi
14261  fi
14262
14263
14264
14265  # Locate the directory of this script.
14266  AUTOCONF_DIR=$TOPDIR/common/autoconf
14267
14268
14269# Check if it's a pure open build or if custom sources are to be used.
14270
14271  # Check whether --enable-openjdk-only was given.
14272if test "${enable_openjdk_only+set}" = set; then :
14273  enableval=$enable_openjdk_only;
14274else
14275  enable_openjdk_only="no"
14276fi
14277
14278
14279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14280$as_echo_n "checking for presence of closed sources... " >&6; }
14281  if test -d "$SRC_ROOT/jdk/src/closed"; then
14282    CLOSED_SOURCE_PRESENT=yes
14283  else
14284    CLOSED_SOURCE_PRESENT=no
14285  fi
14286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14287$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14288
14289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14290$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14291  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14293$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14294
14295  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14296    OPENJDK=true
14297    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14298      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14299$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14300    fi
14301  else
14302    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14303      OPENJDK=true
14304    else
14305      OPENJDK=false
14306    fi
14307  fi
14308
14309  if test "x$OPENJDK" = "xtrue"; then
14310    SET_OPENJDK="OPENJDK=true"
14311  fi
14312
14313
14314
14315  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14316  # the IncludeCustomExtension macro.
14317
14318
14319# Check whether --with-custom-make-dir was given.
14320if test "${with_custom_make_dir+set}" = set; then :
14321  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
14322$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14323fi
14324
14325
14326
14327
14328# These are needed to be able to create a configuration name (and thus the output directory)
14329
14330  ###############################################################################
14331  #
14332  # Check which variant of the JDK that we want to build.
14333  # Currently we have:
14334  #    normal:   standard edition
14335  # but the custom make system may add other variants
14336  #
14337  # Effectively the JDK variant gives a name to a specific set of
14338  # modules to compile into the JDK. In the future, these modules
14339  # might even be Jigsaw modules.
14340  #
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14342$as_echo_n "checking which variant of the JDK to build... " >&6; }
14343
14344# Check whether --with-jdk-variant was given.
14345if test "${with_jdk_variant+set}" = set; then :
14346  withval=$with_jdk_variant;
14347fi
14348
14349
14350  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14351    JDK_VARIANT="normal"
14352  else
14353    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14354  fi
14355
14356
14357
14358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14359$as_echo "$JDK_VARIANT" >&6; }
14360
14361
14362###############################################################################
14363#
14364# Check which interpreter of the JVM we want to build.
14365# Currently we have:
14366#    template: Template interpreter (the default)
14367#    cpp     : C++ interpreter
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14369$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14370
14371# Check whether --with-jvm-interpreter was given.
14372if test "${with_jvm_interpreter+set}" = set; then :
14373  withval=$with_jvm_interpreter;
14374fi
14375
14376
14377if test "x$with_jvm_interpreter" = x; then
14378     with_jvm_interpreter="template"
14379fi
14380
14381JVM_INTERPRETER="$with_jvm_interpreter"
14382
14383if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14384   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14385fi
14386
14387
14388
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14390$as_echo "$with_jvm_interpreter" >&6; }
14391
14392
14393
14394  ###############################################################################
14395  #
14396  # Check which variants of the JVM that we want to build.
14397  # Currently we have:
14398  #    server: normal interpreter and a tiered C1/C2 compiler
14399  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14400  #    minimal1: reduced form of client with optional VM services and features stripped out
14401  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14402  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14403  #    zero: no machine code interpreter, no compiler
14404  #    zeroshark: zero interpreter and shark/llvm compiler backend
14405#    core: interpreter only, no compiler (only works on some platforms)
14406  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14407$as_echo_n "checking which variants of the JVM to build... " >&6; }
14408
14409# Check whether --with-jvm-variants was given.
14410if test "${with_jvm_variants+set}" = set; then :
14411  withval=$with_jvm_variants;
14412fi
14413
14414
14415  if test "x$with_jvm_variants" = x; then
14416    with_jvm_variants="server"
14417  fi
14418
14419  JVM_VARIANTS=",$with_jvm_variants,"
14420  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,//'`
14421
14422  if test "x$TEST_VARIANTS" != "x,"; then
14423     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14424  fi
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14426$as_echo "$with_jvm_variants" >&6; }
14427
14428  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14429  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14430  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14431  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14432  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14433  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14434  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14435
14436  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14437    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14438      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14439    fi
14440  fi
14441  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14442    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14443      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14444    fi
14445  fi
14446  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14447    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14448      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14449    fi
14450  fi
14451
14452  # Replace the commas with AND for use in the build directory name.
14453  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14454  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/'`
14455  if test "x$COUNT_VARIANTS" != "x,1"; then
14456    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14457  else
14458    BUILDING_MULTIPLE_JVM_VARIANTS=no
14459  fi
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470  INCLUDE_SA=true
14471  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14472    INCLUDE_SA=false
14473  fi
14474  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14475    INCLUDE_SA=false
14476  fi
14477  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14478    INCLUDE_SA=false
14479  fi
14480  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14481    INCLUDE_SA=false
14482  fi
14483
14484
14485  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14486    MACOSX_UNIVERSAL="true"
14487  fi
14488
14489
14490
14491
14492  ###############################################################################
14493  #
14494  # Set the debug level
14495  #    release: no debug information, all optimizations, no asserts.
14496  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14497  #    fastdebug: debug information (-g), all optimizations, all asserts
14498  #    slowdebug: debug information (-g), no optimizations, all asserts
14499  #
14500  DEBUG_LEVEL="release"
14501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14502$as_echo_n "checking which debug level to use... " >&6; }
14503  # Check whether --enable-debug was given.
14504if test "${enable_debug+set}" = set; then :
14505  enableval=$enable_debug;
14506        ENABLE_DEBUG="${enableval}"
14507        DEBUG_LEVEL="fastdebug"
14508
14509else
14510  ENABLE_DEBUG="no"
14511fi
14512
14513
14514
14515# Check whether --with-debug-level was given.
14516if test "${with_debug_level+set}" = set; then :
14517  withval=$with_debug_level;
14518        DEBUG_LEVEL="${withval}"
14519        if test "x$ENABLE_DEBUG" = xyes; then
14520          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14521        fi
14522
14523fi
14524
14525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14526$as_echo "$DEBUG_LEVEL" >&6; }
14527
14528  if test "x$DEBUG_LEVEL" != xrelease && \
14529      test "x$DEBUG_LEVEL" != xoptimized && \
14530      test "x$DEBUG_LEVEL" != xfastdebug && \
14531      test "x$DEBUG_LEVEL" != xslowdebug; then
14532    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14533  fi
14534
14535
14536  ###############################################################################
14537  #
14538  # Setup legacy vars/targets and new vars to deal with different debug levels.
14539  #
14540
14541  case $DEBUG_LEVEL in
14542    release )
14543      VARIANT="OPT"
14544      FASTDEBUG="false"
14545      DEBUG_CLASSFILES="false"
14546      BUILD_VARIANT_RELEASE=""
14547      HOTSPOT_DEBUG_LEVEL="product"
14548      HOTSPOT_EXPORT="product"
14549      ;;
14550    fastdebug )
14551      VARIANT="DBG"
14552      FASTDEBUG="true"
14553      DEBUG_CLASSFILES="true"
14554      BUILD_VARIANT_RELEASE="-fastdebug"
14555      HOTSPOT_DEBUG_LEVEL="fastdebug"
14556      HOTSPOT_EXPORT="fastdebug"
14557      ;;
14558    slowdebug )
14559      VARIANT="DBG"
14560      FASTDEBUG="false"
14561      DEBUG_CLASSFILES="true"
14562      BUILD_VARIANT_RELEASE="-debug"
14563      HOTSPOT_DEBUG_LEVEL="debug"
14564      HOTSPOT_EXPORT="debug"
14565      ;;
14566    optimized )
14567      VARIANT="OPT"
14568      FASTDEBUG="false"
14569      DEBUG_CLASSFILES="false"
14570      BUILD_VARIANT_RELEASE="-optimized"
14571      HOTSPOT_DEBUG_LEVEL="optimized"
14572      HOTSPOT_EXPORT="optimized"
14573      ;;
14574  esac
14575
14576  # The debug level 'optimized' is a little special because it is currently only
14577  # applicable to the HotSpot build where it means to build a completely
14578  # optimized version of the VM without any debugging code (like for the
14579  # 'release' debug level which is called 'product' in the HotSpot build) but
14580  # with the exception that it can contain additional code which is otherwise
14581  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14582  # test new and/or experimental features which are not intended for customer
14583  # shipment. Because these new features need to be tested and benchmarked in
14584  # real world scenarios, we want to build the containing JDK at the 'release'
14585  # debug level.
14586  if test "x$DEBUG_LEVEL" = xoptimized; then
14587    DEBUG_LEVEL="release"
14588  fi
14589
14590  #####
14591  # Generate the legacy makefile targets for hotspot.
14592  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14593  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14594  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14595  # But until then ...
14596  HOTSPOT_TARGET=""
14597
14598  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14599    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14600  fi
14601
14602  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14603    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14604  fi
14605
14606  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14607    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14608  fi
14609
14610  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14611    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14612  fi
14613
14614  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14615    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14616  fi
14617
14618  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14619    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14620  fi
14621
14622  if test "x$JVM_VARIANT_CORE" = xtrue; then
14623    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14624  fi
14625
14626  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14627
14628  # On Macosx universal binaries are produced, but they only contain
14629  # 64 bit intel. This invalidates control of which jvms are built
14630  # from configure, but only server is valid anyway. Fix this
14631  # when hotspot makefiles are rewritten.
14632  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14633    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14634  fi
14635
14636  #####
14637
14638
14639
14640
14641
14642
14643
14644
14645# With basic setup done, call the custom early hook.
14646
14647
14648# Check if we have devkits, extra paths or sysroot set.
14649
14650
14651# Check whether --with-devkit was given.
14652if test "${with_devkit+set}" = set; then :
14653  withval=$with_devkit;
14654
14655  # Only process if variable expands to non-empty
14656
14657  if test "x$with_devkit" != x; then
14658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14659
14660  # Input might be given as Windows format, start by converting to
14661  # unix format.
14662  path="$with_devkit"
14663  new_path=`$CYGPATH -u "$path"`
14664
14665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14668  # "foo.exe" is OK but "foo" is an error.
14669  #
14670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14671  # It is also a way to make sure we got the proper file name for the real test later on.
14672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14673  if test "x$test_shortpath" = x; then
14674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14675$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14676    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14677  fi
14678
14679  # Call helper function which possibly converts this using DOS-style short mode.
14680  # If so, the updated path is stored in $new_path.
14681
14682  input_path="$new_path"
14683  # Check if we need to convert this using DOS-style short mode. If the path
14684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14685  # take no chances and rewrite it.
14686  # Note: m4 eats our [], so we need to use [ and ] instead.
14687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14688  if test "x$has_forbidden_chars" != x; then
14689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14693      # Going to short mode and back again did indeed matter. Since short mode is
14694      # case insensitive, let's make it lowercase to improve readability.
14695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14696      # Now convert it back to Unix-style (cygpath)
14697      input_path=`$CYGPATH -u "$shortmode_path"`
14698      new_path="$input_path"
14699    fi
14700  fi
14701
14702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14703  if test "x$test_cygdrive_prefix" = x; then
14704    # As a simple fix, exclude /usr/bin since it's not a real path.
14705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14707      # a path prefixed by /cygdrive for fixpath to work.
14708      new_path="$CYGWIN_ROOT_PATH$input_path"
14709    fi
14710  fi
14711
14712
14713  if test "x$path" != "x$new_path"; then
14714    with_devkit="$new_path"
14715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14716$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14717  fi
14718
14719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14720
14721  path="$with_devkit"
14722  has_colon=`$ECHO $path | $GREP ^.:`
14723  new_path="$path"
14724  if test "x$has_colon" = x; then
14725    # Not in mixed or Windows style, start by that.
14726    new_path=`cmd //c echo $path`
14727  fi
14728
14729
14730  input_path="$new_path"
14731  # Check if we need to convert this using DOS-style short mode. If the path
14732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14733  # take no chances and rewrite it.
14734  # Note: m4 eats our [], so we need to use [ and ] instead.
14735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14736  if test "x$has_forbidden_chars" != x; then
14737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14739  fi
14740
14741
14742  windows_path="$new_path"
14743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14744    unix_path=`$CYGPATH -u "$windows_path"`
14745    new_path="$unix_path"
14746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14748    new_path="$unix_path"
14749  fi
14750
14751  if test "x$path" != "x$new_path"; then
14752    with_devkit="$new_path"
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14754$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14755  fi
14756
14757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14759
14760    else
14761      # We're on a unix platform. Hooray! :)
14762      path="$with_devkit"
14763      has_space=`$ECHO "$path" | $GREP " "`
14764      if test "x$has_space" != x; then
14765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14766$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14768      fi
14769
14770      # Use eval to expand a potential ~
14771      eval path="$path"
14772      if test ! -f "$path" && test ! -d "$path"; then
14773        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14774      fi
14775
14776      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14777    fi
14778  fi
14779
14780        DEVKIT_ROOT="$with_devkit"
14781        # Check for a meta data info file in the root of the devkit
14782        if test -f "$DEVKIT_ROOT/devkit.info"; then
14783          . $DEVKIT_ROOT/devkit.info
14784          # This potentially sets the following:
14785          # A descriptive name of the devkit
14786
14787  if test "x$DEVKIT_NAME" = x; then
14788    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14789  fi
14790
14791          # Corresponds to --with-extra-path
14792
14793  if test "x$DEVKIT_EXTRA_PATH" = x; then
14794    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14795  fi
14796
14797          # Corresponds to --with-toolchain-path
14798
14799  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14800    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14801  fi
14802
14803          # Corresponds to --with-sysroot
14804
14805  if test "x$DEVKIT_SYSROOT" = x; then
14806    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14807  fi
14808
14809
14810          # Identifies the Visual Studio version in the devkit
14811
14812  if test "x$DEVKIT_VS_VERSION" = x; then
14813    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14814  fi
14815
14816          # The Visual Studio include environment variable
14817
14818  if test "x$DEVKIT_VS_INCLUDE" = x; then
14819    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14820  fi
14821
14822          # The Visual Studio lib environment variable
14823
14824  if test "x$DEVKIT_VS_LIB" = x; then
14825    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14826  fi
14827
14828          # Corresponds to --with-msvcr-dll
14829
14830  if test "x$DEVKIT_MSVCR_DLL" = x; then
14831    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14832  fi
14833
14834          # Corresponds to --with-msvcp-dll
14835
14836  if test "x$DEVKIT_MSVCP_DLL" = x; then
14837    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14838  fi
14839
14840        fi
14841
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14843$as_echo_n "checking for devkit... " >&6; }
14844        if test "x$DEVKIT_NAME" != x; then
14845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14846$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14847        else
14848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14849$as_echo "$DEVKIT_ROOT" >&6; }
14850        fi
14851
14852
14853  if test "x$DEVKIT_EXTRA_PATH" != x; then
14854    if test "x$EXTRA_PATH" = x; then
14855      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14856    else
14857      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14858    fi
14859  fi
14860
14861
14862        # Fallback default of just /bin if DEVKIT_PATH is not defined
14863        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14864          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14865        fi
14866
14867  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14868    if test "x$TOOLCHAIN_PATH" = x; then
14869      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14870    else
14871      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14872    fi
14873  fi
14874
14875
14876        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14877        # places for backwards compatiblity.
14878        if test "x$DEVKIT_SYSROOT" != x; then
14879          SYSROOT="$DEVKIT_SYSROOT"
14880        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14881          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14882        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14883          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14884        fi
14885
14886
14887fi
14888
14889
14890  # You can force the sysroot if the sysroot encoded into the compiler tools
14891  # is not correct.
14892
14893# Check whether --with-sys-root was given.
14894if test "${with_sys_root+set}" = set; then :
14895  withval=$with_sys_root; SYSROOT=$with_sys_root
14896
14897fi
14898
14899
14900
14901# Check whether --with-sysroot was given.
14902if test "${with_sysroot+set}" = set; then :
14903  withval=$with_sysroot; SYSROOT=$with_sysroot
14904
14905fi
14906
14907
14908
14909# Check whether --with-tools-dir was given.
14910if test "${with_tools_dir+set}" = set; then :
14911  withval=$with_tools_dir;
14912  if test "x$with_tools_dir" != x; then
14913    if test "x$TOOLCHAIN_PATH" = x; then
14914      TOOLCHAIN_PATH="$with_tools_dir"
14915    else
14916      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14917    fi
14918  fi
14919
14920
14921fi
14922
14923
14924
14925# Check whether --with-toolchain-path was given.
14926if test "${with_toolchain_path+set}" = set; then :
14927  withval=$with_toolchain_path;
14928  if test "x$with_toolchain_path" != x; then
14929    if test "x$TOOLCHAIN_PATH" = x; then
14930      TOOLCHAIN_PATH="$with_toolchain_path"
14931    else
14932      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14933    fi
14934  fi
14935
14936
14937fi
14938
14939
14940
14941# Check whether --with-extra-path was given.
14942if test "${with_extra_path+set}" = set; then :
14943  withval=$with_extra_path;
14944  if test "x$with_extra_path" != x; then
14945    if test "x$EXTRA_PATH" = x; then
14946      EXTRA_PATH="$with_extra_path"
14947    else
14948      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14949    fi
14950  fi
14951
14952
14953fi
14954
14955
14956  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14957    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
14958    # If not, detect if Xcode is installed by running xcodebuild -version
14959    # if no Xcode installed, xcodebuild exits with 1
14960    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14961    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14962      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14963      # fall back on the stub binary in /usr/bin/xcodebuild
14964      # Extract the first word of "xcodebuild", so it can be a program name with args.
14965set dummy xcodebuild; ac_word=$2
14966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14967$as_echo_n "checking for $ac_word... " >&6; }
14968if ${ac_cv_path_XCODEBUILD+:} false; then :
14969  $as_echo_n "(cached) " >&6
14970else
14971  case $XCODEBUILD in
14972  [\\/]* | ?:[\\/]*)
14973  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14974  ;;
14975  *)
14976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14977for as_dir in $TOOLCHAIN_PATH
14978do
14979  IFS=$as_save_IFS
14980  test -z "$as_dir" && as_dir=.
14981    for ac_exec_ext in '' $ac_executable_extensions; do
14982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14983    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14985    break 2
14986  fi
14987done
14988  done
14989IFS=$as_save_IFS
14990
14991  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
14992  ;;
14993esac
14994fi
14995XCODEBUILD=$ac_cv_path_XCODEBUILD
14996if test -n "$XCODEBUILD"; then
14997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
14998$as_echo "$XCODEBUILD" >&6; }
14999else
15000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
15002fi
15003
15004
15005    else
15006      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15007      # when only the command line tools are installed there are no SDKs, so headers
15008      # are copied into the system frameworks
15009      XCODEBUILD=
15010
15011    fi
15012
15013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15014$as_echo_n "checking for sdk name... " >&6; }
15015
15016# Check whether --with-sdk-name was given.
15017if test "${with_sdk_name+set}" = set; then :
15018  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15019
15020fi
15021
15022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15023$as_echo "$SDKNAME" >&6; }
15024
15025    # if toolchain path is specified then don't rely on system headers, they may not compile
15026    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15027    test -z "$TOOLCHAIN_PATH" && \
15028      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15029
15030    if test -z "$SYSROOT"; then
15031      if test -n "$XCODEBUILD"; then
15032        # if we don't have system headers, use default SDK name (last resort)
15033        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15034          SDKNAME=${SDKNAME:-macosx}
15035        fi
15036
15037        if test -n "$SDKNAME"; then
15038          # Call xcodebuild to determine SYSROOT
15039          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15040        fi
15041      else
15042        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15043          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
15044        fi
15045      fi
15046    else
15047      # warn user if --with-sdk-name was also set
15048      if test -n "$with_sdk_name"; then
15049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15050$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15051      fi
15052    fi
15053
15054    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15055      # If no system framework headers, then SYSROOT must be set, or we won't build
15056      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
15057    fi
15058
15059    # Perform a basic sanity test
15060    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15061      if test -z "$SYSROOT"; then
15062        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
15063      else
15064        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15065      fi
15066    fi
15067
15068    # set SDKROOT too, Xcode tools will pick it up
15069    SDKROOT=$SYSROOT
15070
15071  fi
15072
15073  # Prepend the extra path to the global path
15074
15075  if test "x$EXTRA_PATH" != x; then
15076    if test "x$PATH" = x; then
15077      PATH="$EXTRA_PATH"
15078    else
15079      PATH="$EXTRA_PATH:$PATH"
15080    fi
15081  fi
15082
15083
15084  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15085    # Add extra search paths on solaris for utilities like ar and as etc...
15086    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15087  fi
15088
15089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15090$as_echo_n "checking for sysroot... " >&6; }
15091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15092$as_echo "$SYSROOT" >&6; }
15093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15094$as_echo_n "checking for toolchain path... " >&6; }
15095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15096$as_echo "$TOOLCHAIN_PATH" >&6; }
15097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15098$as_echo_n "checking for extra path... " >&6; }
15099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15100$as_echo "$EXTRA_PATH" >&6; }
15101
15102
15103# To properly create a configuration name, we need to have the OpenJDK target
15104# and options (variants and debug level) parsed.
15105
15106
15107
15108# Check whether --with-conf-name was given.
15109if test "${with_conf_name+set}" = set; then :
15110  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15111fi
15112
15113
15114  # Test from where we are running configure, in or outside of src root.
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15116$as_echo_n "checking where to store configuration... " >&6; }
15117  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15118      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15119      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15120    # We are running configure from the src root.
15121    # Create a default ./build/target-variant-debuglevel output root.
15122    if test "x${CONF_NAME}" = x; then
15123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15124$as_echo "in default location" >&6; }
15125      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15126    else
15127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15128$as_echo "in build directory with custom name" >&6; }
15129    fi
15130    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15131    $MKDIR -p "$OUTPUT_ROOT"
15132    if test ! -d "$OUTPUT_ROOT"; then
15133      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15134    fi
15135  else
15136    # We are running configure from outside of the src dir.
15137    # Then use the current directory as output dir!
15138    # If configuration is situated in normal build directory, just use the build
15139    # directory name as configuration name, otherwise use the complete path.
15140    if test "x${CONF_NAME}" = x; then
15141      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15142    fi
15143    OUTPUT_ROOT="$CURDIR"
15144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15145$as_echo "in current directory" >&6; }
15146
15147    # WARNING: This might be a bad thing to do. You need to be sure you want to
15148    # have a configuration in this directory. Do some sanity checks!
15149
15150    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15151      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15152      # other files
15153      files_present=`$LS $OUTPUT_ROOT`
15154      # Configure has already touched config.log and confdefs.h in the current dir when this check
15155      # is performed.
15156      filtered_files=`$ECHO "$files_present" \
15157          | $SED -e 's/config.log//g' \
15158              -e 's/configure.log//g' \
15159              -e 's/confdefs.h//g' \
15160              -e 's/ //g' \
15161          | $TR -d '\n'`
15162      if test "x$filtered_files" != x; then
15163        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15164$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15165        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15166$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15167        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15168$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15169        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15170$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15171        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15172$as_echo "$as_me: seriously mess up just about everything." >&6;}
15173        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15174$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15175        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15176$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15177        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15178      fi
15179    fi
15180  fi
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15182$as_echo_n "checking what configuration name to use... " >&6; }
15183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15184$as_echo "$CONF_NAME" >&6; }
15185
15186
15187  # Only process if variable expands to non-empty
15188
15189  if test "x$OUTPUT_ROOT" != x; then
15190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15191
15192  # Input might be given as Windows format, start by converting to
15193  # unix format.
15194  path="$OUTPUT_ROOT"
15195  new_path=`$CYGPATH -u "$path"`
15196
15197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15200  # "foo.exe" is OK but "foo" is an error.
15201  #
15202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15203  # It is also a way to make sure we got the proper file name for the real test later on.
15204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15205  if test "x$test_shortpath" = x; then
15206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15207$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15208    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15209  fi
15210
15211  # Call helper function which possibly converts this using DOS-style short mode.
15212  # If so, the updated path is stored in $new_path.
15213
15214  input_path="$new_path"
15215  # Check if we need to convert this using DOS-style short mode. If the path
15216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15217  # take no chances and rewrite it.
15218  # Note: m4 eats our [], so we need to use [ and ] instead.
15219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15220  if test "x$has_forbidden_chars" != x; then
15221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15225      # Going to short mode and back again did indeed matter. Since short mode is
15226      # case insensitive, let's make it lowercase to improve readability.
15227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15228      # Now convert it back to Unix-style (cygpath)
15229      input_path=`$CYGPATH -u "$shortmode_path"`
15230      new_path="$input_path"
15231    fi
15232  fi
15233
15234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15235  if test "x$test_cygdrive_prefix" = x; then
15236    # As a simple fix, exclude /usr/bin since it's not a real path.
15237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15239      # a path prefixed by /cygdrive for fixpath to work.
15240      new_path="$CYGWIN_ROOT_PATH$input_path"
15241    fi
15242  fi
15243
15244
15245  if test "x$path" != "x$new_path"; then
15246    OUTPUT_ROOT="$new_path"
15247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15248$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15249  fi
15250
15251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15252
15253  path="$OUTPUT_ROOT"
15254  has_colon=`$ECHO $path | $GREP ^.:`
15255  new_path="$path"
15256  if test "x$has_colon" = x; then
15257    # Not in mixed or Windows style, start by that.
15258    new_path=`cmd //c echo $path`
15259  fi
15260
15261
15262  input_path="$new_path"
15263  # Check if we need to convert this using DOS-style short mode. If the path
15264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15265  # take no chances and rewrite it.
15266  # Note: m4 eats our [], so we need to use [ and ] instead.
15267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15268  if test "x$has_forbidden_chars" != x; then
15269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15271  fi
15272
15273
15274  windows_path="$new_path"
15275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15276    unix_path=`$CYGPATH -u "$windows_path"`
15277    new_path="$unix_path"
15278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15280    new_path="$unix_path"
15281  fi
15282
15283  if test "x$path" != "x$new_path"; then
15284    OUTPUT_ROOT="$new_path"
15285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15286$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15287  fi
15288
15289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15291
15292    else
15293      # We're on a unix platform. Hooray! :)
15294      path="$OUTPUT_ROOT"
15295      has_space=`$ECHO "$path" | $GREP " "`
15296      if test "x$has_space" != x; then
15297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15298$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15300      fi
15301
15302      # Use eval to expand a potential ~
15303      eval path="$path"
15304      if test ! -f "$path" && test ! -d "$path"; then
15305        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15306      fi
15307
15308      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15309    fi
15310  fi
15311
15312
15313  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15314  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15315
15316  SPEC=$OUTPUT_ROOT/spec.gmk
15317
15318  CONF_NAME=$CONF_NAME
15319
15320  OUTPUT_ROOT=$OUTPUT_ROOT
15321
15322
15323
15324  # The spec.gmk file contains all variables for the make system.
15325  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15326
15327  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15328  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15329
15330  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15331  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15332
15333  # The compare.sh is used to compare the build output to other builds.
15334  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15335
15336  # The generated Makefile knows where the spec.gmk is and where the source is.
15337  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15338  # which will look for generated configurations
15339  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15340
15341
15342
15343# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15344
15345  for ac_prog in apt-get yum port pkgutil pkgadd
15346do
15347  # Extract the first word of "$ac_prog", so it can be a program name with args.
15348set dummy $ac_prog; ac_word=$2
15349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15350$as_echo_n "checking for $ac_word... " >&6; }
15351if ${ac_cv_prog_PKGHANDLER+:} false; then :
15352  $as_echo_n "(cached) " >&6
15353else
15354  if test -n "$PKGHANDLER"; then
15355  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15356else
15357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15358for as_dir in $PATH
15359do
15360  IFS=$as_save_IFS
15361  test -z "$as_dir" && as_dir=.
15362    for ac_exec_ext in '' $ac_executable_extensions; do
15363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15364    ac_cv_prog_PKGHANDLER="$ac_prog"
15365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15366    break 2
15367  fi
15368done
15369  done
15370IFS=$as_save_IFS
15371
15372fi
15373fi
15374PKGHANDLER=$ac_cv_prog_PKGHANDLER
15375if test -n "$PKGHANDLER"; then
15376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15377$as_echo "$PKGHANDLER" >&6; }
15378else
15379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15380$as_echo "no" >&6; }
15381fi
15382
15383
15384  test -n "$PKGHANDLER" && break
15385done
15386
15387
15388
15389# Setup tools that requires more complex handling, or that is not needed by the configure script.
15390
15391
15392  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15393  if test "x$MAKE" != x; then
15394    # User has supplied a make, test it.
15395    if test ! -f "$MAKE"; then
15396      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15397    fi
15398
15399  MAKE_CANDIDATE=""$MAKE""
15400  DESCRIPTION="user supplied MAKE=$MAKE"
15401
15402  # On Cygwin, we require a newer version of make than on other platforms
15403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15404    MAKE_VERSION_EXPR="-e 4\."
15405    MAKE_REQUIRED_VERSION="4.0"
15406   else
15407    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15408    MAKE_REQUIRED_VERSION="3.81"
15409  fi
15410
15411  if test "x$MAKE_CANDIDATE" != x; then
15412    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15413$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15414    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15415    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15416    if test "x$IS_GNU_MAKE" = x; then
15417      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15418$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15419    else
15420      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15421      if test "x$IS_MODERN_MAKE" = x; then
15422        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15423$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15424      else
15425        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15426          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15427            MAKE_EXPECTED_ENV='cygwin'
15428          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15429            MAKE_EXPECTED_ENV='msys'
15430          else
15431            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15432          fi
15433          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15434          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15435        else
15436          # Not relevant for non-Windows
15437          IS_MAKE_CORRECT_ENV=true
15438        fi
15439        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15440          { $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
15441$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;}
15442        else
15443          FOUND_MAKE=$MAKE_CANDIDATE
15444
15445  # Only process if variable expands to non-empty
15446
15447  if test "x$FOUND_MAKE" != x; then
15448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15449
15450  # First separate the path from the arguments. This will split at the first
15451  # space.
15452  complete="$FOUND_MAKE"
15453  path="${complete%% *}"
15454  tmp="$complete EOL"
15455  arguments="${tmp#* }"
15456
15457  # Input might be given as Windows format, start by converting to
15458  # unix format.
15459  new_path=`$CYGPATH -u "$path"`
15460
15461  # Now try to locate executable using which
15462  new_path=`$WHICH "$new_path" 2> /dev/null`
15463  # bat and cmd files are not always considered executable in cygwin causing which
15464  # to not find them
15465  if test "x$new_path" = x \
15466      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15467      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15468    new_path=`$CYGPATH -u "$path"`
15469  fi
15470  if test "x$new_path" = x; then
15471    # Oops. Which didn't find the executable.
15472    # The splitting of arguments from the executable at a space might have been incorrect,
15473    # since paths with space are more likely in Windows. Give it another try with the whole
15474    # argument.
15475    path="$complete"
15476    arguments="EOL"
15477    new_path=`$CYGPATH -u "$path"`
15478    new_path=`$WHICH "$new_path" 2> /dev/null`
15479    # bat and cmd files are not always considered executable in cygwin causing which
15480    # to not find them
15481    if test "x$new_path" = x \
15482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15484      new_path=`$CYGPATH -u "$path"`
15485    fi
15486    if test "x$new_path" = x; then
15487      # It's still not found. Now this is an unrecoverable error.
15488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15490      has_space=`$ECHO "$complete" | $GREP " "`
15491      if test "x$has_space" != x; then
15492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15494      fi
15495      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15496    fi
15497  fi
15498
15499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15502  # "foo.exe" is OK but "foo" is an error.
15503  #
15504  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15505  # It is also a way to make sure we got the proper file name for the real test later on.
15506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15507  if test "x$test_shortpath" = x; then
15508    # Short path failed, file does not exist as specified.
15509    # Try adding .exe or .cmd
15510    if test -f "${new_path}.exe"; then
15511      input_to_shortpath="${new_path}.exe"
15512    elif test -f "${new_path}.cmd"; then
15513      input_to_shortpath="${new_path}.cmd"
15514    else
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15519      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15520    fi
15521  else
15522    input_to_shortpath="$new_path"
15523  fi
15524
15525  # Call helper function which possibly converts this using DOS-style short mode.
15526  # If so, the updated path is stored in $new_path.
15527  new_path="$input_to_shortpath"
15528
15529  input_path="$input_to_shortpath"
15530  # Check if we need to convert this using DOS-style short mode. If the path
15531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15532  # take no chances and rewrite it.
15533  # Note: m4 eats our [], so we need to use [ and ] instead.
15534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15535  if test "x$has_forbidden_chars" != x; then
15536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15540      # Going to short mode and back again did indeed matter. Since short mode is
15541      # case insensitive, let's make it lowercase to improve readability.
15542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15543      # Now convert it back to Unix-style (cygpath)
15544      input_path=`$CYGPATH -u "$shortmode_path"`
15545      new_path="$input_path"
15546    fi
15547  fi
15548
15549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15550  if test "x$test_cygdrive_prefix" = x; then
15551    # As a simple fix, exclude /usr/bin since it's not a real path.
15552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15554      # a path prefixed by /cygdrive for fixpath to work.
15555      new_path="$CYGWIN_ROOT_PATH$input_path"
15556    fi
15557  fi
15558
15559  # remove trailing .exe if any
15560  new_path="${new_path/%.exe/}"
15561
15562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15563
15564  # First separate the path from the arguments. This will split at the first
15565  # space.
15566  complete="$FOUND_MAKE"
15567  path="${complete%% *}"
15568  tmp="$complete EOL"
15569  arguments="${tmp#* }"
15570
15571  # Input might be given as Windows format, start by converting to
15572  # unix format.
15573  new_path="$path"
15574
15575  windows_path="$new_path"
15576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15577    unix_path=`$CYGPATH -u "$windows_path"`
15578    new_path="$unix_path"
15579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15581    new_path="$unix_path"
15582  fi
15583
15584
15585  # Now try to locate executable using which
15586  new_path=`$WHICH "$new_path" 2> /dev/null`
15587
15588  if test "x$new_path" = x; then
15589    # Oops. Which didn't find the executable.
15590    # The splitting of arguments from the executable at a space might have been incorrect,
15591    # since paths with space are more likely in Windows. Give it another try with the whole
15592    # argument.
15593    path="$complete"
15594    arguments="EOL"
15595    new_path="$path"
15596
15597  windows_path="$new_path"
15598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15599    unix_path=`$CYGPATH -u "$windows_path"`
15600    new_path="$unix_path"
15601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15603    new_path="$unix_path"
15604  fi
15605
15606
15607    new_path=`$WHICH "$new_path" 2> /dev/null`
15608    # bat and cmd files are not always considered executable in MSYS causing which
15609    # to not find them
15610    if test "x$new_path" = x \
15611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15613      new_path="$path"
15614
15615  windows_path="$new_path"
15616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15617    unix_path=`$CYGPATH -u "$windows_path"`
15618    new_path="$unix_path"
15619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15621    new_path="$unix_path"
15622  fi
15623
15624    fi
15625
15626    if test "x$new_path" = x; then
15627      # It's still not found. Now this is an unrecoverable error.
15628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15630      has_space=`$ECHO "$complete" | $GREP " "`
15631      if test "x$has_space" != x; then
15632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15634      fi
15635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15636    fi
15637  fi
15638
15639  # Now new_path has a complete unix path to the binary
15640  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15641    # Keep paths in /bin as-is, but remove trailing .exe if any
15642    new_path="${new_path/%.exe/}"
15643    # Do not save /bin paths to all_fixpath_prefixes!
15644  else
15645    # Not in mixed or Windows style, start by that.
15646    new_path=`cmd //c echo $new_path`
15647
15648  input_path="$new_path"
15649  # Check if we need to convert this using DOS-style short mode. If the path
15650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15651  # take no chances and rewrite it.
15652  # Note: m4 eats our [], so we need to use [ and ] instead.
15653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15654  if test "x$has_forbidden_chars" != x; then
15655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15657  fi
15658
15659    # Output is in $new_path
15660
15661  windows_path="$new_path"
15662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15663    unix_path=`$CYGPATH -u "$windows_path"`
15664    new_path="$unix_path"
15665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15667    new_path="$unix_path"
15668  fi
15669
15670    # remove trailing .exe if any
15671    new_path="${new_path/%.exe/}"
15672
15673    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15674    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15675  fi
15676
15677    else
15678      # We're on a unix platform. Hooray! :)
15679      # First separate the path from the arguments. This will split at the first
15680      # space.
15681      complete="$FOUND_MAKE"
15682      path="${complete%% *}"
15683      tmp="$complete EOL"
15684      arguments="${tmp#* }"
15685
15686      # Cannot rely on the command "which" here since it doesn't always work.
15687      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15688      if test -z "$is_absolute_path"; then
15689        # Path to executable is not absolute. Find it.
15690        IFS_save="$IFS"
15691        IFS=:
15692        for p in $PATH; do
15693          if test -f "$p/$path" && test -x "$p/$path"; then
15694            new_path="$p/$path"
15695            break
15696          fi
15697        done
15698        IFS="$IFS_save"
15699      else
15700        # This is an absolute path, we can use it without further modifications.
15701        new_path="$path"
15702      fi
15703
15704      if test "x$new_path" = x; then
15705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15706$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15707        has_space=`$ECHO "$complete" | $GREP " "`
15708        if test "x$has_space" != x; then
15709          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15710$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15711        fi
15712        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15713      fi
15714    fi
15715
15716    # Now join together the path and the arguments once again
15717    if test "x$arguments" != xEOL; then
15718      new_complete="$new_path ${arguments% *}"
15719    else
15720      new_complete="$new_path"
15721    fi
15722
15723    if test "x$complete" != "x$new_complete"; then
15724      FOUND_MAKE="$new_complete"
15725      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15726$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15727    fi
15728  fi
15729
15730        fi
15731      fi
15732    fi
15733  fi
15734
15735    if test "x$FOUND_MAKE" = x; then
15736      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15737    fi
15738  else
15739    # Try our hardest to locate a correct version of GNU make
15740    for ac_prog in gmake
15741do
15742  # Extract the first word of "$ac_prog", so it can be a program name with args.
15743set dummy $ac_prog; ac_word=$2
15744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15745$as_echo_n "checking for $ac_word... " >&6; }
15746if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15747  $as_echo_n "(cached) " >&6
15748else
15749  case $CHECK_GMAKE in
15750  [\\/]* | ?:[\\/]*)
15751  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15752  ;;
15753  *)
15754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15755for as_dir in $PATH
15756do
15757  IFS=$as_save_IFS
15758  test -z "$as_dir" && as_dir=.
15759    for ac_exec_ext in '' $ac_executable_extensions; do
15760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15761    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15763    break 2
15764  fi
15765done
15766  done
15767IFS=$as_save_IFS
15768
15769  ;;
15770esac
15771fi
15772CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15773if test -n "$CHECK_GMAKE"; then
15774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15775$as_echo "$CHECK_GMAKE" >&6; }
15776else
15777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15778$as_echo "no" >&6; }
15779fi
15780
15781
15782  test -n "$CHECK_GMAKE" && break
15783done
15784
15785
15786  MAKE_CANDIDATE=""$CHECK_GMAKE""
15787  DESCRIPTION="gmake in PATH"
15788
15789  # On Cygwin, we require a newer version of make than on other platforms
15790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15791    MAKE_VERSION_EXPR="-e 4\."
15792    MAKE_REQUIRED_VERSION="4.0"
15793   else
15794    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15795    MAKE_REQUIRED_VERSION="3.81"
15796  fi
15797
15798  if test "x$MAKE_CANDIDATE" != x; then
15799    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15800$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15801    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15802    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15803    if test "x$IS_GNU_MAKE" = x; then
15804      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15805$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15806    else
15807      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15808      if test "x$IS_MODERN_MAKE" = x; then
15809        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15810$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15811      else
15812        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15813          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15814            MAKE_EXPECTED_ENV='cygwin'
15815          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15816            MAKE_EXPECTED_ENV='msys'
15817          else
15818            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15819          fi
15820          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15821          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15822        else
15823          # Not relevant for non-Windows
15824          IS_MAKE_CORRECT_ENV=true
15825        fi
15826        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15827          { $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
15828$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;}
15829        else
15830          FOUND_MAKE=$MAKE_CANDIDATE
15831
15832  # Only process if variable expands to non-empty
15833
15834  if test "x$FOUND_MAKE" != x; then
15835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836
15837  # First separate the path from the arguments. This will split at the first
15838  # space.
15839  complete="$FOUND_MAKE"
15840  path="${complete%% *}"
15841  tmp="$complete EOL"
15842  arguments="${tmp#* }"
15843
15844  # Input might be given as Windows format, start by converting to
15845  # unix format.
15846  new_path=`$CYGPATH -u "$path"`
15847
15848  # Now try to locate executable using which
15849  new_path=`$WHICH "$new_path" 2> /dev/null`
15850  # bat and cmd files are not always considered executable in cygwin causing which
15851  # to not find them
15852  if test "x$new_path" = x \
15853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15855    new_path=`$CYGPATH -u "$path"`
15856  fi
15857  if test "x$new_path" = x; then
15858    # Oops. Which didn't find the executable.
15859    # The splitting of arguments from the executable at a space might have been incorrect,
15860    # since paths with space are more likely in Windows. Give it another try with the whole
15861    # argument.
15862    path="$complete"
15863    arguments="EOL"
15864    new_path=`$CYGPATH -u "$path"`
15865    new_path=`$WHICH "$new_path" 2> /dev/null`
15866    # bat and cmd files are not always considered executable in cygwin causing which
15867    # to not find them
15868    if test "x$new_path" = x \
15869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15871      new_path=`$CYGPATH -u "$path"`
15872    fi
15873    if test "x$new_path" = x; then
15874      # It's still not found. Now this is an unrecoverable error.
15875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15876$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15877      has_space=`$ECHO "$complete" | $GREP " "`
15878      if test "x$has_space" != x; then
15879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15881      fi
15882      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15883    fi
15884  fi
15885
15886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15889  # "foo.exe" is OK but "foo" is an error.
15890  #
15891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15892  # It is also a way to make sure we got the proper file name for the real test later on.
15893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15894  if test "x$test_shortpath" = x; then
15895    # Short path failed, file does not exist as specified.
15896    # Try adding .exe or .cmd
15897    if test -f "${new_path}.exe"; then
15898      input_to_shortpath="${new_path}.exe"
15899    elif test -f "${new_path}.cmd"; then
15900      input_to_shortpath="${new_path}.cmd"
15901    else
15902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15903$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15906      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15907    fi
15908  else
15909    input_to_shortpath="$new_path"
15910  fi
15911
15912  # Call helper function which possibly converts this using DOS-style short mode.
15913  # If so, the updated path is stored in $new_path.
15914  new_path="$input_to_shortpath"
15915
15916  input_path="$input_to_shortpath"
15917  # Check if we need to convert this using DOS-style short mode. If the path
15918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15919  # take no chances and rewrite it.
15920  # Note: m4 eats our [], so we need to use [ and ] instead.
15921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15922  if test "x$has_forbidden_chars" != x; then
15923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15927      # Going to short mode and back again did indeed matter. Since short mode is
15928      # case insensitive, let's make it lowercase to improve readability.
15929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15930      # Now convert it back to Unix-style (cygpath)
15931      input_path=`$CYGPATH -u "$shortmode_path"`
15932      new_path="$input_path"
15933    fi
15934  fi
15935
15936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15937  if test "x$test_cygdrive_prefix" = x; then
15938    # As a simple fix, exclude /usr/bin since it's not a real path.
15939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15941      # a path prefixed by /cygdrive for fixpath to work.
15942      new_path="$CYGWIN_ROOT_PATH$input_path"
15943    fi
15944  fi
15945
15946  # remove trailing .exe if any
15947  new_path="${new_path/%.exe/}"
15948
15949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15950
15951  # First separate the path from the arguments. This will split at the first
15952  # space.
15953  complete="$FOUND_MAKE"
15954  path="${complete%% *}"
15955  tmp="$complete EOL"
15956  arguments="${tmp#* }"
15957
15958  # Input might be given as Windows format, start by converting to
15959  # unix format.
15960  new_path="$path"
15961
15962  windows_path="$new_path"
15963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15964    unix_path=`$CYGPATH -u "$windows_path"`
15965    new_path="$unix_path"
15966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15968    new_path="$unix_path"
15969  fi
15970
15971
15972  # Now try to locate executable using which
15973  new_path=`$WHICH "$new_path" 2> /dev/null`
15974
15975  if test "x$new_path" = x; then
15976    # Oops. Which didn't find the executable.
15977    # The splitting of arguments from the executable at a space might have been incorrect,
15978    # since paths with space are more likely in Windows. Give it another try with the whole
15979    # argument.
15980    path="$complete"
15981    arguments="EOL"
15982    new_path="$path"
15983
15984  windows_path="$new_path"
15985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15986    unix_path=`$CYGPATH -u "$windows_path"`
15987    new_path="$unix_path"
15988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15990    new_path="$unix_path"
15991  fi
15992
15993
15994    new_path=`$WHICH "$new_path" 2> /dev/null`
15995    # bat and cmd files are not always considered executable in MSYS causing which
15996    # to not find them
15997    if test "x$new_path" = x \
15998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16000      new_path="$path"
16001
16002  windows_path="$new_path"
16003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16004    unix_path=`$CYGPATH -u "$windows_path"`
16005    new_path="$unix_path"
16006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16008    new_path="$unix_path"
16009  fi
16010
16011    fi
16012
16013    if test "x$new_path" = x; then
16014      # It's still not found. Now this is an unrecoverable error.
16015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16016$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16017      has_space=`$ECHO "$complete" | $GREP " "`
16018      if test "x$has_space" != x; then
16019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16021      fi
16022      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16023    fi
16024  fi
16025
16026  # Now new_path has a complete unix path to the binary
16027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16028    # Keep paths in /bin as-is, but remove trailing .exe if any
16029    new_path="${new_path/%.exe/}"
16030    # Do not save /bin paths to all_fixpath_prefixes!
16031  else
16032    # Not in mixed or Windows style, start by that.
16033    new_path=`cmd //c echo $new_path`
16034
16035  input_path="$new_path"
16036  # Check if we need to convert this using DOS-style short mode. If the path
16037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16038  # take no chances and rewrite it.
16039  # Note: m4 eats our [], so we need to use [ and ] instead.
16040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16041  if test "x$has_forbidden_chars" != x; then
16042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16044  fi
16045
16046    # Output is in $new_path
16047
16048  windows_path="$new_path"
16049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16050    unix_path=`$CYGPATH -u "$windows_path"`
16051    new_path="$unix_path"
16052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16054    new_path="$unix_path"
16055  fi
16056
16057    # remove trailing .exe if any
16058    new_path="${new_path/%.exe/}"
16059
16060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16062  fi
16063
16064    else
16065      # We're on a unix platform. Hooray! :)
16066      # First separate the path from the arguments. This will split at the first
16067      # space.
16068      complete="$FOUND_MAKE"
16069      path="${complete%% *}"
16070      tmp="$complete EOL"
16071      arguments="${tmp#* }"
16072
16073      # Cannot rely on the command "which" here since it doesn't always work.
16074      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16075      if test -z "$is_absolute_path"; then
16076        # Path to executable is not absolute. Find it.
16077        IFS_save="$IFS"
16078        IFS=:
16079        for p in $PATH; do
16080          if test -f "$p/$path" && test -x "$p/$path"; then
16081            new_path="$p/$path"
16082            break
16083          fi
16084        done
16085        IFS="$IFS_save"
16086      else
16087        # This is an absolute path, we can use it without further modifications.
16088        new_path="$path"
16089      fi
16090
16091      if test "x$new_path" = x; then
16092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16093$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16094        has_space=`$ECHO "$complete" | $GREP " "`
16095        if test "x$has_space" != x; then
16096          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16098        fi
16099        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16100      fi
16101    fi
16102
16103    # Now join together the path and the arguments once again
16104    if test "x$arguments" != xEOL; then
16105      new_complete="$new_path ${arguments% *}"
16106    else
16107      new_complete="$new_path"
16108    fi
16109
16110    if test "x$complete" != "x$new_complete"; then
16111      FOUND_MAKE="$new_complete"
16112      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16113$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16114    fi
16115  fi
16116
16117        fi
16118      fi
16119    fi
16120  fi
16121
16122
16123    if test "x$FOUND_MAKE" = x; then
16124      for ac_prog in make
16125do
16126  # Extract the first word of "$ac_prog", so it can be a program name with args.
16127set dummy $ac_prog; ac_word=$2
16128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16129$as_echo_n "checking for $ac_word... " >&6; }
16130if ${ac_cv_path_CHECK_MAKE+:} false; then :
16131  $as_echo_n "(cached) " >&6
16132else
16133  case $CHECK_MAKE in
16134  [\\/]* | ?:[\\/]*)
16135  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16136  ;;
16137  *)
16138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16139for as_dir in $PATH
16140do
16141  IFS=$as_save_IFS
16142  test -z "$as_dir" && as_dir=.
16143    for ac_exec_ext in '' $ac_executable_extensions; do
16144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16145    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16147    break 2
16148  fi
16149done
16150  done
16151IFS=$as_save_IFS
16152
16153  ;;
16154esac
16155fi
16156CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16157if test -n "$CHECK_MAKE"; then
16158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16159$as_echo "$CHECK_MAKE" >&6; }
16160else
16161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16162$as_echo "no" >&6; }
16163fi
16164
16165
16166  test -n "$CHECK_MAKE" && break
16167done
16168
16169
16170  MAKE_CANDIDATE=""$CHECK_MAKE""
16171  DESCRIPTION="make in PATH"
16172
16173  # On Cygwin, we require a newer version of make than on other platforms
16174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16175    MAKE_VERSION_EXPR="-e 4\."
16176    MAKE_REQUIRED_VERSION="4.0"
16177   else
16178    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16179    MAKE_REQUIRED_VERSION="3.81"
16180  fi
16181
16182  if test "x$MAKE_CANDIDATE" != x; then
16183    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16184$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16185    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16186    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16187    if test "x$IS_GNU_MAKE" = x; then
16188      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16189$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16190    else
16191      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16192      if test "x$IS_MODERN_MAKE" = x; then
16193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16194$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16195      else
16196        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16197          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16198            MAKE_EXPECTED_ENV='cygwin'
16199          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16200            MAKE_EXPECTED_ENV='msys'
16201          else
16202            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16203          fi
16204          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16205          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16206        else
16207          # Not relevant for non-Windows
16208          IS_MAKE_CORRECT_ENV=true
16209        fi
16210        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16211          { $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
16212$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;}
16213        else
16214          FOUND_MAKE=$MAKE_CANDIDATE
16215
16216  # Only process if variable expands to non-empty
16217
16218  if test "x$FOUND_MAKE" != x; then
16219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16220
16221  # First separate the path from the arguments. This will split at the first
16222  # space.
16223  complete="$FOUND_MAKE"
16224  path="${complete%% *}"
16225  tmp="$complete EOL"
16226  arguments="${tmp#* }"
16227
16228  # Input might be given as Windows format, start by converting to
16229  # unix format.
16230  new_path=`$CYGPATH -u "$path"`
16231
16232  # Now try to locate executable using which
16233  new_path=`$WHICH "$new_path" 2> /dev/null`
16234  # bat and cmd files are not always considered executable in cygwin causing which
16235  # to not find them
16236  if test "x$new_path" = x \
16237      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16238      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16239    new_path=`$CYGPATH -u "$path"`
16240  fi
16241  if test "x$new_path" = x; then
16242    # Oops. Which didn't find the executable.
16243    # The splitting of arguments from the executable at a space might have been incorrect,
16244    # since paths with space are more likely in Windows. Give it another try with the whole
16245    # argument.
16246    path="$complete"
16247    arguments="EOL"
16248    new_path=`$CYGPATH -u "$path"`
16249    new_path=`$WHICH "$new_path" 2> /dev/null`
16250    # bat and cmd files are not always considered executable in cygwin causing which
16251    # to not find them
16252    if test "x$new_path" = x \
16253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16255      new_path=`$CYGPATH -u "$path"`
16256    fi
16257    if test "x$new_path" = x; then
16258      # It's still not found. Now this is an unrecoverable error.
16259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16260$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16261      has_space=`$ECHO "$complete" | $GREP " "`
16262      if test "x$has_space" != x; then
16263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16265      fi
16266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16267    fi
16268  fi
16269
16270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16273  # "foo.exe" is OK but "foo" is an error.
16274  #
16275  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16276  # It is also a way to make sure we got the proper file name for the real test later on.
16277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16278  if test "x$test_shortpath" = x; then
16279    # Short path failed, file does not exist as specified.
16280    # Try adding .exe or .cmd
16281    if test -f "${new_path}.exe"; then
16282      input_to_shortpath="${new_path}.exe"
16283    elif test -f "${new_path}.cmd"; then
16284      input_to_shortpath="${new_path}.cmd"
16285    else
16286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16290      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16291    fi
16292  else
16293    input_to_shortpath="$new_path"
16294  fi
16295
16296  # Call helper function which possibly converts this using DOS-style short mode.
16297  # If so, the updated path is stored in $new_path.
16298  new_path="$input_to_shortpath"
16299
16300  input_path="$input_to_shortpath"
16301  # Check if we need to convert this using DOS-style short mode. If the path
16302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16303  # take no chances and rewrite it.
16304  # Note: m4 eats our [], so we need to use [ and ] instead.
16305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16306  if test "x$has_forbidden_chars" != x; then
16307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16311      # Going to short mode and back again did indeed matter. Since short mode is
16312      # case insensitive, let's make it lowercase to improve readability.
16313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16314      # Now convert it back to Unix-style (cygpath)
16315      input_path=`$CYGPATH -u "$shortmode_path"`
16316      new_path="$input_path"
16317    fi
16318  fi
16319
16320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16321  if test "x$test_cygdrive_prefix" = x; then
16322    # As a simple fix, exclude /usr/bin since it's not a real path.
16323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16325      # a path prefixed by /cygdrive for fixpath to work.
16326      new_path="$CYGWIN_ROOT_PATH$input_path"
16327    fi
16328  fi
16329
16330  # remove trailing .exe if any
16331  new_path="${new_path/%.exe/}"
16332
16333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16334
16335  # First separate the path from the arguments. This will split at the first
16336  # space.
16337  complete="$FOUND_MAKE"
16338  path="${complete%% *}"
16339  tmp="$complete EOL"
16340  arguments="${tmp#* }"
16341
16342  # Input might be given as Windows format, start by converting to
16343  # unix format.
16344  new_path="$path"
16345
16346  windows_path="$new_path"
16347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16348    unix_path=`$CYGPATH -u "$windows_path"`
16349    new_path="$unix_path"
16350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16352    new_path="$unix_path"
16353  fi
16354
16355
16356  # Now try to locate executable using which
16357  new_path=`$WHICH "$new_path" 2> /dev/null`
16358
16359  if test "x$new_path" = x; then
16360    # Oops. Which didn't find the executable.
16361    # The splitting of arguments from the executable at a space might have been incorrect,
16362    # since paths with space are more likely in Windows. Give it another try with the whole
16363    # argument.
16364    path="$complete"
16365    arguments="EOL"
16366    new_path="$path"
16367
16368  windows_path="$new_path"
16369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16370    unix_path=`$CYGPATH -u "$windows_path"`
16371    new_path="$unix_path"
16372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16374    new_path="$unix_path"
16375  fi
16376
16377
16378    new_path=`$WHICH "$new_path" 2> /dev/null`
16379    # bat and cmd files are not always considered executable in MSYS causing which
16380    # to not find them
16381    if test "x$new_path" = x \
16382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16384      new_path="$path"
16385
16386  windows_path="$new_path"
16387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16388    unix_path=`$CYGPATH -u "$windows_path"`
16389    new_path="$unix_path"
16390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16392    new_path="$unix_path"
16393  fi
16394
16395    fi
16396
16397    if test "x$new_path" = x; then
16398      # It's still not found. Now this is an unrecoverable error.
16399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16400$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16401      has_space=`$ECHO "$complete" | $GREP " "`
16402      if test "x$has_space" != x; then
16403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16405      fi
16406      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16407    fi
16408  fi
16409
16410  # Now new_path has a complete unix path to the binary
16411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16412    # Keep paths in /bin as-is, but remove trailing .exe if any
16413    new_path="${new_path/%.exe/}"
16414    # Do not save /bin paths to all_fixpath_prefixes!
16415  else
16416    # Not in mixed or Windows style, start by that.
16417    new_path=`cmd //c echo $new_path`
16418
16419  input_path="$new_path"
16420  # Check if we need to convert this using DOS-style short mode. If the path
16421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16422  # take no chances and rewrite it.
16423  # Note: m4 eats our [], so we need to use [ and ] instead.
16424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16425  if test "x$has_forbidden_chars" != x; then
16426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16428  fi
16429
16430    # Output is in $new_path
16431
16432  windows_path="$new_path"
16433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434    unix_path=`$CYGPATH -u "$windows_path"`
16435    new_path="$unix_path"
16436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16438    new_path="$unix_path"
16439  fi
16440
16441    # remove trailing .exe if any
16442    new_path="${new_path/%.exe/}"
16443
16444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16446  fi
16447
16448    else
16449      # We're on a unix platform. Hooray! :)
16450      # First separate the path from the arguments. This will split at the first
16451      # space.
16452      complete="$FOUND_MAKE"
16453      path="${complete%% *}"
16454      tmp="$complete EOL"
16455      arguments="${tmp#* }"
16456
16457      # Cannot rely on the command "which" here since it doesn't always work.
16458      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16459      if test -z "$is_absolute_path"; then
16460        # Path to executable is not absolute. Find it.
16461        IFS_save="$IFS"
16462        IFS=:
16463        for p in $PATH; do
16464          if test -f "$p/$path" && test -x "$p/$path"; then
16465            new_path="$p/$path"
16466            break
16467          fi
16468        done
16469        IFS="$IFS_save"
16470      else
16471        # This is an absolute path, we can use it without further modifications.
16472        new_path="$path"
16473      fi
16474
16475      if test "x$new_path" = x; then
16476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16478        has_space=`$ECHO "$complete" | $GREP " "`
16479        if test "x$has_space" != x; then
16480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16482        fi
16483        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16484      fi
16485    fi
16486
16487    # Now join together the path and the arguments once again
16488    if test "x$arguments" != xEOL; then
16489      new_complete="$new_path ${arguments% *}"
16490    else
16491      new_complete="$new_path"
16492    fi
16493
16494    if test "x$complete" != "x$new_complete"; then
16495      FOUND_MAKE="$new_complete"
16496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16497$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16498    fi
16499  fi
16500
16501        fi
16502      fi
16503    fi
16504  fi
16505
16506    fi
16507
16508    if test "x$FOUND_MAKE" = x; then
16509      if test "x$TOOLCHAIN_PATH" != x; then
16510        # We have a toolchain path, check that as well before giving up.
16511        OLD_PATH=$PATH
16512        PATH=$TOOLCHAIN_PATH:$PATH
16513        for ac_prog in gmake
16514do
16515  # Extract the first word of "$ac_prog", so it can be a program name with args.
16516set dummy $ac_prog; ac_word=$2
16517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16518$as_echo_n "checking for $ac_word... " >&6; }
16519if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16520  $as_echo_n "(cached) " >&6
16521else
16522  case $CHECK_TOOLSDIR_GMAKE in
16523  [\\/]* | ?:[\\/]*)
16524  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16525  ;;
16526  *)
16527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16528for as_dir in $PATH
16529do
16530  IFS=$as_save_IFS
16531  test -z "$as_dir" && as_dir=.
16532    for ac_exec_ext in '' $ac_executable_extensions; do
16533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16534    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16536    break 2
16537  fi
16538done
16539  done
16540IFS=$as_save_IFS
16541
16542  ;;
16543esac
16544fi
16545CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16546if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16548$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16549else
16550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16551$as_echo "no" >&6; }
16552fi
16553
16554
16555  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16556done
16557
16558
16559  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16560  DESCRIPTION="gmake in tools-dir"
16561
16562  # On Cygwin, we require a newer version of make than on other platforms
16563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16564    MAKE_VERSION_EXPR="-e 4\."
16565    MAKE_REQUIRED_VERSION="4.0"
16566   else
16567    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16568    MAKE_REQUIRED_VERSION="3.81"
16569  fi
16570
16571  if test "x$MAKE_CANDIDATE" != x; then
16572    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16573$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16574    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16575    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16576    if test "x$IS_GNU_MAKE" = x; then
16577      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16578$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16579    else
16580      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16581      if test "x$IS_MODERN_MAKE" = x; then
16582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16583$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16584      else
16585        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16586          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16587            MAKE_EXPECTED_ENV='cygwin'
16588          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16589            MAKE_EXPECTED_ENV='msys'
16590          else
16591            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16592          fi
16593          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16594          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16595        else
16596          # Not relevant for non-Windows
16597          IS_MAKE_CORRECT_ENV=true
16598        fi
16599        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16600          { $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
16601$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;}
16602        else
16603          FOUND_MAKE=$MAKE_CANDIDATE
16604
16605  # Only process if variable expands to non-empty
16606
16607  if test "x$FOUND_MAKE" != x; then
16608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16609
16610  # First separate the path from the arguments. This will split at the first
16611  # space.
16612  complete="$FOUND_MAKE"
16613  path="${complete%% *}"
16614  tmp="$complete EOL"
16615  arguments="${tmp#* }"
16616
16617  # Input might be given as Windows format, start by converting to
16618  # unix format.
16619  new_path=`$CYGPATH -u "$path"`
16620
16621  # Now try to locate executable using which
16622  new_path=`$WHICH "$new_path" 2> /dev/null`
16623  # bat and cmd files are not always considered executable in cygwin causing which
16624  # to not find them
16625  if test "x$new_path" = x \
16626      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16627      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16628    new_path=`$CYGPATH -u "$path"`
16629  fi
16630  if test "x$new_path" = x; then
16631    # Oops. Which didn't find the executable.
16632    # The splitting of arguments from the executable at a space might have been incorrect,
16633    # since paths with space are more likely in Windows. Give it another try with the whole
16634    # argument.
16635    path="$complete"
16636    arguments="EOL"
16637    new_path=`$CYGPATH -u "$path"`
16638    new_path=`$WHICH "$new_path" 2> /dev/null`
16639    # bat and cmd files are not always considered executable in cygwin causing which
16640    # to not find them
16641    if test "x$new_path" = x \
16642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16644      new_path=`$CYGPATH -u "$path"`
16645    fi
16646    if test "x$new_path" = x; then
16647      # It's still not found. Now this is an unrecoverable error.
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16650      has_space=`$ECHO "$complete" | $GREP " "`
16651      if test "x$has_space" != x; then
16652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16654      fi
16655      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16656    fi
16657  fi
16658
16659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16662  # "foo.exe" is OK but "foo" is an error.
16663  #
16664  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16665  # It is also a way to make sure we got the proper file name for the real test later on.
16666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16667  if test "x$test_shortpath" = x; then
16668    # Short path failed, file does not exist as specified.
16669    # Try adding .exe or .cmd
16670    if test -f "${new_path}.exe"; then
16671      input_to_shortpath="${new_path}.exe"
16672    elif test -f "${new_path}.cmd"; then
16673      input_to_shortpath="${new_path}.cmd"
16674    else
16675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16680    fi
16681  else
16682    input_to_shortpath="$new_path"
16683  fi
16684
16685  # Call helper function which possibly converts this using DOS-style short mode.
16686  # If so, the updated path is stored in $new_path.
16687  new_path="$input_to_shortpath"
16688
16689  input_path="$input_to_shortpath"
16690  # Check if we need to convert this using DOS-style short mode. If the path
16691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16692  # take no chances and rewrite it.
16693  # Note: m4 eats our [], so we need to use [ and ] instead.
16694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16695  if test "x$has_forbidden_chars" != x; then
16696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16700      # Going to short mode and back again did indeed matter. Since short mode is
16701      # case insensitive, let's make it lowercase to improve readability.
16702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16703      # Now convert it back to Unix-style (cygpath)
16704      input_path=`$CYGPATH -u "$shortmode_path"`
16705      new_path="$input_path"
16706    fi
16707  fi
16708
16709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16710  if test "x$test_cygdrive_prefix" = x; then
16711    # As a simple fix, exclude /usr/bin since it's not a real path.
16712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16714      # a path prefixed by /cygdrive for fixpath to work.
16715      new_path="$CYGWIN_ROOT_PATH$input_path"
16716    fi
16717  fi
16718
16719  # remove trailing .exe if any
16720  new_path="${new_path/%.exe/}"
16721
16722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723
16724  # First separate the path from the arguments. This will split at the first
16725  # space.
16726  complete="$FOUND_MAKE"
16727  path="${complete%% *}"
16728  tmp="$complete EOL"
16729  arguments="${tmp#* }"
16730
16731  # Input might be given as Windows format, start by converting to
16732  # unix format.
16733  new_path="$path"
16734
16735  windows_path="$new_path"
16736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16737    unix_path=`$CYGPATH -u "$windows_path"`
16738    new_path="$unix_path"
16739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16741    new_path="$unix_path"
16742  fi
16743
16744
16745  # Now try to locate executable using which
16746  new_path=`$WHICH "$new_path" 2> /dev/null`
16747
16748  if test "x$new_path" = x; then
16749    # Oops. Which didn't find the executable.
16750    # The splitting of arguments from the executable at a space might have been incorrect,
16751    # since paths with space are more likely in Windows. Give it another try with the whole
16752    # argument.
16753    path="$complete"
16754    arguments="EOL"
16755    new_path="$path"
16756
16757  windows_path="$new_path"
16758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16759    unix_path=`$CYGPATH -u "$windows_path"`
16760    new_path="$unix_path"
16761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16763    new_path="$unix_path"
16764  fi
16765
16766
16767    new_path=`$WHICH "$new_path" 2> /dev/null`
16768    # bat and cmd files are not always considered executable in MSYS causing which
16769    # to not find them
16770    if test "x$new_path" = x \
16771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16773      new_path="$path"
16774
16775  windows_path="$new_path"
16776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16777    unix_path=`$CYGPATH -u "$windows_path"`
16778    new_path="$unix_path"
16779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16781    new_path="$unix_path"
16782  fi
16783
16784    fi
16785
16786    if test "x$new_path" = x; then
16787      # It's still not found. Now this is an unrecoverable error.
16788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16789$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16790      has_space=`$ECHO "$complete" | $GREP " "`
16791      if test "x$has_space" != x; then
16792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16794      fi
16795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16796    fi
16797  fi
16798
16799  # Now new_path has a complete unix path to the binary
16800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16801    # Keep paths in /bin as-is, but remove trailing .exe if any
16802    new_path="${new_path/%.exe/}"
16803    # Do not save /bin paths to all_fixpath_prefixes!
16804  else
16805    # Not in mixed or Windows style, start by that.
16806    new_path=`cmd //c echo $new_path`
16807
16808  input_path="$new_path"
16809  # Check if we need to convert this using DOS-style short mode. If the path
16810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16811  # take no chances and rewrite it.
16812  # Note: m4 eats our [], so we need to use [ and ] instead.
16813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16814  if test "x$has_forbidden_chars" != x; then
16815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16817  fi
16818
16819    # Output is in $new_path
16820
16821  windows_path="$new_path"
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    unix_path=`$CYGPATH -u "$windows_path"`
16824    new_path="$unix_path"
16825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827    new_path="$unix_path"
16828  fi
16829
16830    # remove trailing .exe if any
16831    new_path="${new_path/%.exe/}"
16832
16833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16835  fi
16836
16837    else
16838      # We're on a unix platform. Hooray! :)
16839      # First separate the path from the arguments. This will split at the first
16840      # space.
16841      complete="$FOUND_MAKE"
16842      path="${complete%% *}"
16843      tmp="$complete EOL"
16844      arguments="${tmp#* }"
16845
16846      # Cannot rely on the command "which" here since it doesn't always work.
16847      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16848      if test -z "$is_absolute_path"; then
16849        # Path to executable is not absolute. Find it.
16850        IFS_save="$IFS"
16851        IFS=:
16852        for p in $PATH; do
16853          if test -f "$p/$path" && test -x "$p/$path"; then
16854            new_path="$p/$path"
16855            break
16856          fi
16857        done
16858        IFS="$IFS_save"
16859      else
16860        # This is an absolute path, we can use it without further modifications.
16861        new_path="$path"
16862      fi
16863
16864      if test "x$new_path" = x; then
16865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16867        has_space=`$ECHO "$complete" | $GREP " "`
16868        if test "x$has_space" != x; then
16869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16871        fi
16872        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16873      fi
16874    fi
16875
16876    # Now join together the path and the arguments once again
16877    if test "x$arguments" != xEOL; then
16878      new_complete="$new_path ${arguments% *}"
16879    else
16880      new_complete="$new_path"
16881    fi
16882
16883    if test "x$complete" != "x$new_complete"; then
16884      FOUND_MAKE="$new_complete"
16885      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16886$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16887    fi
16888  fi
16889
16890        fi
16891      fi
16892    fi
16893  fi
16894
16895        if test "x$FOUND_MAKE" = x; then
16896          for ac_prog in make
16897do
16898  # Extract the first word of "$ac_prog", so it can be a program name with args.
16899set dummy $ac_prog; ac_word=$2
16900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16901$as_echo_n "checking for $ac_word... " >&6; }
16902if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16903  $as_echo_n "(cached) " >&6
16904else
16905  case $CHECK_TOOLSDIR_MAKE in
16906  [\\/]* | ?:[\\/]*)
16907  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16908  ;;
16909  *)
16910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16911for as_dir in $PATH
16912do
16913  IFS=$as_save_IFS
16914  test -z "$as_dir" && as_dir=.
16915    for ac_exec_ext in '' $ac_executable_extensions; do
16916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16917    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16919    break 2
16920  fi
16921done
16922  done
16923IFS=$as_save_IFS
16924
16925  ;;
16926esac
16927fi
16928CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16929if test -n "$CHECK_TOOLSDIR_MAKE"; then
16930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16931$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16932else
16933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16934$as_echo "no" >&6; }
16935fi
16936
16937
16938  test -n "$CHECK_TOOLSDIR_MAKE" && break
16939done
16940
16941
16942  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16943  DESCRIPTION="make in tools-dir"
16944
16945  # On Cygwin, we require a newer version of make than on other platforms
16946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16947    MAKE_VERSION_EXPR="-e 4\."
16948    MAKE_REQUIRED_VERSION="4.0"
16949   else
16950    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16951    MAKE_REQUIRED_VERSION="3.81"
16952  fi
16953
16954  if test "x$MAKE_CANDIDATE" != x; then
16955    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16956$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16957    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16958    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16959    if test "x$IS_GNU_MAKE" = x; then
16960      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16961$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16962    else
16963      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16964      if test "x$IS_MODERN_MAKE" = x; then
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16966$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16967      else
16968        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16969          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16970            MAKE_EXPECTED_ENV='cygwin'
16971          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972            MAKE_EXPECTED_ENV='msys'
16973          else
16974            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16975          fi
16976          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16977          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16978        else
16979          # Not relevant for non-Windows
16980          IS_MAKE_CORRECT_ENV=true
16981        fi
16982        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16983          { $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
16984$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;}
16985        else
16986          FOUND_MAKE=$MAKE_CANDIDATE
16987
16988  # Only process if variable expands to non-empty
16989
16990  if test "x$FOUND_MAKE" != x; then
16991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16992
16993  # First separate the path from the arguments. This will split at the first
16994  # space.
16995  complete="$FOUND_MAKE"
16996  path="${complete%% *}"
16997  tmp="$complete EOL"
16998  arguments="${tmp#* }"
16999
17000  # Input might be given as Windows format, start by converting to
17001  # unix format.
17002  new_path=`$CYGPATH -u "$path"`
17003
17004  # Now try to locate executable using which
17005  new_path=`$WHICH "$new_path" 2> /dev/null`
17006  # bat and cmd files are not always considered executable in cygwin causing which
17007  # to not find them
17008  if test "x$new_path" = x \
17009      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17010      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17011    new_path=`$CYGPATH -u "$path"`
17012  fi
17013  if test "x$new_path" = x; then
17014    # Oops. Which didn't find the executable.
17015    # The splitting of arguments from the executable at a space might have been incorrect,
17016    # since paths with space are more likely in Windows. Give it another try with the whole
17017    # argument.
17018    path="$complete"
17019    arguments="EOL"
17020    new_path=`$CYGPATH -u "$path"`
17021    new_path=`$WHICH "$new_path" 2> /dev/null`
17022    # bat and cmd files are not always considered executable in cygwin causing which
17023    # to not find them
17024    if test "x$new_path" = x \
17025        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17026        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17027      new_path=`$CYGPATH -u "$path"`
17028    fi
17029    if test "x$new_path" = x; then
17030      # It's still not found. Now this is an unrecoverable error.
17031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17033      has_space=`$ECHO "$complete" | $GREP " "`
17034      if test "x$has_space" != x; then
17035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17037      fi
17038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17039    fi
17040  fi
17041
17042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17045  # "foo.exe" is OK but "foo" is an error.
17046  #
17047  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17048  # It is also a way to make sure we got the proper file name for the real test later on.
17049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17050  if test "x$test_shortpath" = x; then
17051    # Short path failed, file does not exist as specified.
17052    # Try adding .exe or .cmd
17053    if test -f "${new_path}.exe"; then
17054      input_to_shortpath="${new_path}.exe"
17055    elif test -f "${new_path}.cmd"; then
17056      input_to_shortpath="${new_path}.cmd"
17057    else
17058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17060      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17061$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17062      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17063    fi
17064  else
17065    input_to_shortpath="$new_path"
17066  fi
17067
17068  # Call helper function which possibly converts this using DOS-style short mode.
17069  # If so, the updated path is stored in $new_path.
17070  new_path="$input_to_shortpath"
17071
17072  input_path="$input_to_shortpath"
17073  # Check if we need to convert this using DOS-style short mode. If the path
17074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17075  # take no chances and rewrite it.
17076  # Note: m4 eats our [], so we need to use [ and ] instead.
17077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17078  if test "x$has_forbidden_chars" != x; then
17079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17083      # Going to short mode and back again did indeed matter. Since short mode is
17084      # case insensitive, let's make it lowercase to improve readability.
17085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17086      # Now convert it back to Unix-style (cygpath)
17087      input_path=`$CYGPATH -u "$shortmode_path"`
17088      new_path="$input_path"
17089    fi
17090  fi
17091
17092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17093  if test "x$test_cygdrive_prefix" = x; then
17094    # As a simple fix, exclude /usr/bin since it's not a real path.
17095    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17097      # a path prefixed by /cygdrive for fixpath to work.
17098      new_path="$CYGWIN_ROOT_PATH$input_path"
17099    fi
17100  fi
17101
17102  # remove trailing .exe if any
17103  new_path="${new_path/%.exe/}"
17104
17105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17106
17107  # First separate the path from the arguments. This will split at the first
17108  # space.
17109  complete="$FOUND_MAKE"
17110  path="${complete%% *}"
17111  tmp="$complete EOL"
17112  arguments="${tmp#* }"
17113
17114  # Input might be given as Windows format, start by converting to
17115  # unix format.
17116  new_path="$path"
17117
17118  windows_path="$new_path"
17119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17120    unix_path=`$CYGPATH -u "$windows_path"`
17121    new_path="$unix_path"
17122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17124    new_path="$unix_path"
17125  fi
17126
17127
17128  # Now try to locate executable using which
17129  new_path=`$WHICH "$new_path" 2> /dev/null`
17130
17131  if test "x$new_path" = x; then
17132    # Oops. Which didn't find the executable.
17133    # The splitting of arguments from the executable at a space might have been incorrect,
17134    # since paths with space are more likely in Windows. Give it another try with the whole
17135    # argument.
17136    path="$complete"
17137    arguments="EOL"
17138    new_path="$path"
17139
17140  windows_path="$new_path"
17141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17142    unix_path=`$CYGPATH -u "$windows_path"`
17143    new_path="$unix_path"
17144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17146    new_path="$unix_path"
17147  fi
17148
17149
17150    new_path=`$WHICH "$new_path" 2> /dev/null`
17151    # bat and cmd files are not always considered executable in MSYS causing which
17152    # to not find them
17153    if test "x$new_path" = x \
17154        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17155        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17156      new_path="$path"
17157
17158  windows_path="$new_path"
17159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17160    unix_path=`$CYGPATH -u "$windows_path"`
17161    new_path="$unix_path"
17162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17164    new_path="$unix_path"
17165  fi
17166
17167    fi
17168
17169    if test "x$new_path" = x; then
17170      # It's still not found. Now this is an unrecoverable error.
17171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17172$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17173      has_space=`$ECHO "$complete" | $GREP " "`
17174      if test "x$has_space" != x; then
17175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17177      fi
17178      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17179    fi
17180  fi
17181
17182  # Now new_path has a complete unix path to the binary
17183  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17184    # Keep paths in /bin as-is, but remove trailing .exe if any
17185    new_path="${new_path/%.exe/}"
17186    # Do not save /bin paths to all_fixpath_prefixes!
17187  else
17188    # Not in mixed or Windows style, start by that.
17189    new_path=`cmd //c echo $new_path`
17190
17191  input_path="$new_path"
17192  # Check if we need to convert this using DOS-style short mode. If the path
17193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17194  # take no chances and rewrite it.
17195  # Note: m4 eats our [], so we need to use [ and ] instead.
17196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17197  if test "x$has_forbidden_chars" != x; then
17198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17200  fi
17201
17202    # Output is in $new_path
17203
17204  windows_path="$new_path"
17205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17206    unix_path=`$CYGPATH -u "$windows_path"`
17207    new_path="$unix_path"
17208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17210    new_path="$unix_path"
17211  fi
17212
17213    # remove trailing .exe if any
17214    new_path="${new_path/%.exe/}"
17215
17216    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17217    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17218  fi
17219
17220    else
17221      # We're on a unix platform. Hooray! :)
17222      # First separate the path from the arguments. This will split at the first
17223      # space.
17224      complete="$FOUND_MAKE"
17225      path="${complete%% *}"
17226      tmp="$complete EOL"
17227      arguments="${tmp#* }"
17228
17229      # Cannot rely on the command "which" here since it doesn't always work.
17230      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17231      if test -z "$is_absolute_path"; then
17232        # Path to executable is not absolute. Find it.
17233        IFS_save="$IFS"
17234        IFS=:
17235        for p in $PATH; do
17236          if test -f "$p/$path" && test -x "$p/$path"; then
17237            new_path="$p/$path"
17238            break
17239          fi
17240        done
17241        IFS="$IFS_save"
17242      else
17243        # This is an absolute path, we can use it without further modifications.
17244        new_path="$path"
17245      fi
17246
17247      if test "x$new_path" = x; then
17248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17250        has_space=`$ECHO "$complete" | $GREP " "`
17251        if test "x$has_space" != x; then
17252          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17253$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17254        fi
17255        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17256      fi
17257    fi
17258
17259    # Now join together the path and the arguments once again
17260    if test "x$arguments" != xEOL; then
17261      new_complete="$new_path ${arguments% *}"
17262    else
17263      new_complete="$new_path"
17264    fi
17265
17266    if test "x$complete" != "x$new_complete"; then
17267      FOUND_MAKE="$new_complete"
17268      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17269$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17270    fi
17271  fi
17272
17273        fi
17274      fi
17275    fi
17276  fi
17277
17278        fi
17279        PATH=$OLD_PATH
17280      fi
17281    fi
17282
17283    if test "x$FOUND_MAKE" = x; then
17284      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17285    fi
17286  fi
17287
17288  MAKE=$FOUND_MAKE
17289
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17291$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17292
17293
17294  # Check if make supports the output sync option and if so, setup using it.
17295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17296$as_echo_n "checking if make --output-sync is supported... " >&6; }
17297  if $MAKE --version -O > /dev/null 2>&1; then
17298    OUTPUT_SYNC_SUPPORTED=true
17299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17300$as_echo "yes" >&6; }
17301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17302$as_echo_n "checking for output-sync value... " >&6; }
17303
17304# Check whether --with-output-sync was given.
17305if test "${with_output_sync+set}" = set; then :
17306  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17307fi
17308
17309    if test "x$OUTPUT_SYNC" = "x"; then
17310      OUTPUT_SYNC=none
17311    fi
17312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17313$as_echo "$OUTPUT_SYNC" >&6; }
17314    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17315      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17316    fi
17317  else
17318    OUTPUT_SYNC_SUPPORTED=false
17319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17320$as_echo "no" >&6; }
17321  fi
17322
17323
17324
17325
17326
17327
17328  # Test if find supports -delete
17329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17330$as_echo_n "checking if find supports -delete... " >&6; }
17331  FIND_DELETE="-delete"
17332
17333  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17334
17335  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17336
17337  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17338  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17339    # No, it does not.
17340    rm $DELETEDIR/TestIfFindSupportsDelete
17341    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17342      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17343      FIND_DELETE="-print | xargs rm"
17344    else
17345      FIND_DELETE="-exec rm \{\} \+"
17346    fi
17347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348$as_echo "no" >&6; }
17349  else
17350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17351$as_echo "yes" >&6; }
17352  fi
17353  rmdir $DELETEDIR
17354
17355
17356
17357  # These tools might not be installed by default,
17358  # need hint on how to install them.
17359
17360
17361
17362  # Publish this variable in the help.
17363
17364
17365  if test "x$UNZIP" = x; then
17366    # The variable is not set by user, try to locate tool using the code snippet
17367    for ac_prog in unzip
17368do
17369  # Extract the first word of "$ac_prog", so it can be a program name with args.
17370set dummy $ac_prog; ac_word=$2
17371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17372$as_echo_n "checking for $ac_word... " >&6; }
17373if ${ac_cv_path_UNZIP+:} false; then :
17374  $as_echo_n "(cached) " >&6
17375else
17376  case $UNZIP in
17377  [\\/]* | ?:[\\/]*)
17378  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17379  ;;
17380  *)
17381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17382for as_dir in $PATH
17383do
17384  IFS=$as_save_IFS
17385  test -z "$as_dir" && as_dir=.
17386    for ac_exec_ext in '' $ac_executable_extensions; do
17387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17388    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17390    break 2
17391  fi
17392done
17393  done
17394IFS=$as_save_IFS
17395
17396  ;;
17397esac
17398fi
17399UNZIP=$ac_cv_path_UNZIP
17400if test -n "$UNZIP"; then
17401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17402$as_echo "$UNZIP" >&6; }
17403else
17404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17405$as_echo "no" >&6; }
17406fi
17407
17408
17409  test -n "$UNZIP" && break
17410done
17411
17412  else
17413    # The variable is set, but is it from the command line or the environment?
17414
17415    # Try to remove the string !UNZIP! from our list.
17416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17418      # If it failed, the variable was not from the command line. Ignore it,
17419      # but warn the user (except for BASH, which is always set by the calling BASH).
17420      if test "xUNZIP" != xBASH; then
17421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17422$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17423      fi
17424      # Try to locate tool using the code snippet
17425      for ac_prog in unzip
17426do
17427  # Extract the first word of "$ac_prog", so it can be a program name with args.
17428set dummy $ac_prog; ac_word=$2
17429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17430$as_echo_n "checking for $ac_word... " >&6; }
17431if ${ac_cv_path_UNZIP+:} false; then :
17432  $as_echo_n "(cached) " >&6
17433else
17434  case $UNZIP in
17435  [\\/]* | ?:[\\/]*)
17436  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17437  ;;
17438  *)
17439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17440for as_dir in $PATH
17441do
17442  IFS=$as_save_IFS
17443  test -z "$as_dir" && as_dir=.
17444    for ac_exec_ext in '' $ac_executable_extensions; do
17445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17446    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17448    break 2
17449  fi
17450done
17451  done
17452IFS=$as_save_IFS
17453
17454  ;;
17455esac
17456fi
17457UNZIP=$ac_cv_path_UNZIP
17458if test -n "$UNZIP"; then
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17460$as_echo "$UNZIP" >&6; }
17461else
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17463$as_echo "no" >&6; }
17464fi
17465
17466
17467  test -n "$UNZIP" && break
17468done
17469
17470    else
17471      # If it succeeded, then it was overridden by the user. We will use it
17472      # for the tool.
17473
17474      # First remove it from the list of overridden variables, so we can test
17475      # for unknown variables in the end.
17476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17477
17478      # Check if the provided tool contains a complete path.
17479      tool_specified="$UNZIP"
17480      tool_basename="${tool_specified##*/}"
17481      if test "x$tool_basename" = "x$tool_specified"; then
17482        # A command without a complete path is provided, search $PATH.
17483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17484$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17485        # Extract the first word of "$tool_basename", so it can be a program name with args.
17486set dummy $tool_basename; ac_word=$2
17487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17488$as_echo_n "checking for $ac_word... " >&6; }
17489if ${ac_cv_path_UNZIP+:} false; then :
17490  $as_echo_n "(cached) " >&6
17491else
17492  case $UNZIP in
17493  [\\/]* | ?:[\\/]*)
17494  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17495  ;;
17496  *)
17497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17498for as_dir in $PATH
17499do
17500  IFS=$as_save_IFS
17501  test -z "$as_dir" && as_dir=.
17502    for ac_exec_ext in '' $ac_executable_extensions; do
17503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17504    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17506    break 2
17507  fi
17508done
17509  done
17510IFS=$as_save_IFS
17511
17512  ;;
17513esac
17514fi
17515UNZIP=$ac_cv_path_UNZIP
17516if test -n "$UNZIP"; then
17517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17518$as_echo "$UNZIP" >&6; }
17519else
17520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521$as_echo "no" >&6; }
17522fi
17523
17524
17525        if test "x$UNZIP" = x; then
17526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17527        fi
17528      else
17529        # Otherwise we believe it is a complete path. Use it as it is.
17530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17531$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17533$as_echo_n "checking for UNZIP... " >&6; }
17534        if test ! -x "$tool_specified"; then
17535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17536$as_echo "not found" >&6; }
17537          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17538        fi
17539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17540$as_echo "$tool_specified" >&6; }
17541      fi
17542    fi
17543  fi
17544
17545
17546
17547  if test "x$UNZIP" = x; then
17548    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17549  fi
17550
17551
17552
17553
17554
17555  # Publish this variable in the help.
17556
17557
17558  if test "x$ZIP" = x; then
17559    # The variable is not set by user, try to locate tool using the code snippet
17560    for ac_prog in zip
17561do
17562  # Extract the first word of "$ac_prog", so it can be a program name with args.
17563set dummy $ac_prog; ac_word=$2
17564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17565$as_echo_n "checking for $ac_word... " >&6; }
17566if ${ac_cv_path_ZIP+:} false; then :
17567  $as_echo_n "(cached) " >&6
17568else
17569  case $ZIP in
17570  [\\/]* | ?:[\\/]*)
17571  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17572  ;;
17573  *)
17574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17575for as_dir in $PATH
17576do
17577  IFS=$as_save_IFS
17578  test -z "$as_dir" && as_dir=.
17579    for ac_exec_ext in '' $ac_executable_extensions; do
17580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17581    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17583    break 2
17584  fi
17585done
17586  done
17587IFS=$as_save_IFS
17588
17589  ;;
17590esac
17591fi
17592ZIP=$ac_cv_path_ZIP
17593if test -n "$ZIP"; then
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17595$as_echo "$ZIP" >&6; }
17596else
17597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17598$as_echo "no" >&6; }
17599fi
17600
17601
17602  test -n "$ZIP" && break
17603done
17604
17605  else
17606    # The variable is set, but is it from the command line or the environment?
17607
17608    # Try to remove the string !ZIP! from our list.
17609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17611      # If it failed, the variable was not from the command line. Ignore it,
17612      # but warn the user (except for BASH, which is always set by the calling BASH).
17613      if test "xZIP" != xBASH; then
17614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17615$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17616      fi
17617      # Try to locate tool using the code snippet
17618      for ac_prog in zip
17619do
17620  # Extract the first word of "$ac_prog", so it can be a program name with args.
17621set dummy $ac_prog; ac_word=$2
17622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17623$as_echo_n "checking for $ac_word... " >&6; }
17624if ${ac_cv_path_ZIP+:} false; then :
17625  $as_echo_n "(cached) " >&6
17626else
17627  case $ZIP in
17628  [\\/]* | ?:[\\/]*)
17629  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17630  ;;
17631  *)
17632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17633for as_dir in $PATH
17634do
17635  IFS=$as_save_IFS
17636  test -z "$as_dir" && as_dir=.
17637    for ac_exec_ext in '' $ac_executable_extensions; do
17638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17639    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17641    break 2
17642  fi
17643done
17644  done
17645IFS=$as_save_IFS
17646
17647  ;;
17648esac
17649fi
17650ZIP=$ac_cv_path_ZIP
17651if test -n "$ZIP"; then
17652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17653$as_echo "$ZIP" >&6; }
17654else
17655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17656$as_echo "no" >&6; }
17657fi
17658
17659
17660  test -n "$ZIP" && break
17661done
17662
17663    else
17664      # If it succeeded, then it was overridden by the user. We will use it
17665      # for the tool.
17666
17667      # First remove it from the list of overridden variables, so we can test
17668      # for unknown variables in the end.
17669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17670
17671      # Check if the provided tool contains a complete path.
17672      tool_specified="$ZIP"
17673      tool_basename="${tool_specified##*/}"
17674      if test "x$tool_basename" = "x$tool_specified"; then
17675        # A command without a complete path is provided, search $PATH.
17676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17677$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17678        # Extract the first word of "$tool_basename", so it can be a program name with args.
17679set dummy $tool_basename; ac_word=$2
17680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17681$as_echo_n "checking for $ac_word... " >&6; }
17682if ${ac_cv_path_ZIP+:} false; then :
17683  $as_echo_n "(cached) " >&6
17684else
17685  case $ZIP in
17686  [\\/]* | ?:[\\/]*)
17687  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17688  ;;
17689  *)
17690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17691for as_dir in $PATH
17692do
17693  IFS=$as_save_IFS
17694  test -z "$as_dir" && as_dir=.
17695    for ac_exec_ext in '' $ac_executable_extensions; do
17696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17697    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17699    break 2
17700  fi
17701done
17702  done
17703IFS=$as_save_IFS
17704
17705  ;;
17706esac
17707fi
17708ZIP=$ac_cv_path_ZIP
17709if test -n "$ZIP"; then
17710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17711$as_echo "$ZIP" >&6; }
17712else
17713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17714$as_echo "no" >&6; }
17715fi
17716
17717
17718        if test "x$ZIP" = x; then
17719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17720        fi
17721      else
17722        # Otherwise we believe it is a complete path. Use it as it is.
17723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17724$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17726$as_echo_n "checking for ZIP... " >&6; }
17727        if test ! -x "$tool_specified"; then
17728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17729$as_echo "not found" >&6; }
17730          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17731        fi
17732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17733$as_echo "$tool_specified" >&6; }
17734      fi
17735    fi
17736  fi
17737
17738
17739
17740  if test "x$ZIP" = x; then
17741    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17742  fi
17743
17744
17745
17746  # Non-required basic tools
17747
17748
17749
17750  # Publish this variable in the help.
17751
17752
17753  if test "x$LDD" = x; then
17754    # The variable is not set by user, try to locate tool using the code snippet
17755    for ac_prog in ldd
17756do
17757  # Extract the first word of "$ac_prog", so it can be a program name with args.
17758set dummy $ac_prog; ac_word=$2
17759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17760$as_echo_n "checking for $ac_word... " >&6; }
17761if ${ac_cv_path_LDD+:} false; then :
17762  $as_echo_n "(cached) " >&6
17763else
17764  case $LDD in
17765  [\\/]* | ?:[\\/]*)
17766  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17767  ;;
17768  *)
17769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17770for as_dir in $PATH
17771do
17772  IFS=$as_save_IFS
17773  test -z "$as_dir" && as_dir=.
17774    for ac_exec_ext in '' $ac_executable_extensions; do
17775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17776    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17778    break 2
17779  fi
17780done
17781  done
17782IFS=$as_save_IFS
17783
17784  ;;
17785esac
17786fi
17787LDD=$ac_cv_path_LDD
17788if test -n "$LDD"; then
17789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17790$as_echo "$LDD" >&6; }
17791else
17792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17793$as_echo "no" >&6; }
17794fi
17795
17796
17797  test -n "$LDD" && break
17798done
17799
17800  else
17801    # The variable is set, but is it from the command line or the environment?
17802
17803    # Try to remove the string !LDD! from our list.
17804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17806      # If it failed, the variable was not from the command line. Ignore it,
17807      # but warn the user (except for BASH, which is always set by the calling BASH).
17808      if test "xLDD" != xBASH; then
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17810$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17811      fi
17812      # Try to locate tool using the code snippet
17813      for ac_prog in ldd
17814do
17815  # Extract the first word of "$ac_prog", so it can be a program name with args.
17816set dummy $ac_prog; ac_word=$2
17817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17818$as_echo_n "checking for $ac_word... " >&6; }
17819if ${ac_cv_path_LDD+:} false; then :
17820  $as_echo_n "(cached) " >&6
17821else
17822  case $LDD in
17823  [\\/]* | ?:[\\/]*)
17824  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17825  ;;
17826  *)
17827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17828for as_dir in $PATH
17829do
17830  IFS=$as_save_IFS
17831  test -z "$as_dir" && as_dir=.
17832    for ac_exec_ext in '' $ac_executable_extensions; do
17833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17834    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17836    break 2
17837  fi
17838done
17839  done
17840IFS=$as_save_IFS
17841
17842  ;;
17843esac
17844fi
17845LDD=$ac_cv_path_LDD
17846if test -n "$LDD"; then
17847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17848$as_echo "$LDD" >&6; }
17849else
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17851$as_echo "no" >&6; }
17852fi
17853
17854
17855  test -n "$LDD" && break
17856done
17857
17858    else
17859      # If it succeeded, then it was overridden by the user. We will use it
17860      # for the tool.
17861
17862      # First remove it from the list of overridden variables, so we can test
17863      # for unknown variables in the end.
17864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17865
17866      # Check if the provided tool contains a complete path.
17867      tool_specified="$LDD"
17868      tool_basename="${tool_specified##*/}"
17869      if test "x$tool_basename" = "x$tool_specified"; then
17870        # A command without a complete path is provided, search $PATH.
17871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17872$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17873        # Extract the first word of "$tool_basename", so it can be a program name with args.
17874set dummy $tool_basename; ac_word=$2
17875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17876$as_echo_n "checking for $ac_word... " >&6; }
17877if ${ac_cv_path_LDD+:} false; then :
17878  $as_echo_n "(cached) " >&6
17879else
17880  case $LDD in
17881  [\\/]* | ?:[\\/]*)
17882  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17883  ;;
17884  *)
17885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17886for as_dir in $PATH
17887do
17888  IFS=$as_save_IFS
17889  test -z "$as_dir" && as_dir=.
17890    for ac_exec_ext in '' $ac_executable_extensions; do
17891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17892    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17894    break 2
17895  fi
17896done
17897  done
17898IFS=$as_save_IFS
17899
17900  ;;
17901esac
17902fi
17903LDD=$ac_cv_path_LDD
17904if test -n "$LDD"; then
17905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17906$as_echo "$LDD" >&6; }
17907else
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17909$as_echo "no" >&6; }
17910fi
17911
17912
17913        if test "x$LDD" = x; then
17914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17915        fi
17916      else
17917        # Otherwise we believe it is a complete path. Use it as it is.
17918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17919$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17921$as_echo_n "checking for LDD... " >&6; }
17922        if test ! -x "$tool_specified"; then
17923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17924$as_echo "not found" >&6; }
17925          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17926        fi
17927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17928$as_echo "$tool_specified" >&6; }
17929      fi
17930    fi
17931  fi
17932
17933
17934  if test "x$LDD" = "x"; then
17935    # List shared lib dependencies is used for
17936    # debug output and checking for forbidden dependencies.
17937    # We can build without it.
17938    LDD="true"
17939  fi
17940
17941
17942  # Publish this variable in the help.
17943
17944
17945  if test "x$OTOOL" = x; then
17946    # The variable is not set by user, try to locate tool using the code snippet
17947    for ac_prog in otool
17948do
17949  # Extract the first word of "$ac_prog", so it can be a program name with args.
17950set dummy $ac_prog; ac_word=$2
17951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17952$as_echo_n "checking for $ac_word... " >&6; }
17953if ${ac_cv_path_OTOOL+:} false; then :
17954  $as_echo_n "(cached) " >&6
17955else
17956  case $OTOOL in
17957  [\\/]* | ?:[\\/]*)
17958  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17959  ;;
17960  *)
17961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17962for as_dir in $PATH
17963do
17964  IFS=$as_save_IFS
17965  test -z "$as_dir" && as_dir=.
17966    for ac_exec_ext in '' $ac_executable_extensions; do
17967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17968    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17970    break 2
17971  fi
17972done
17973  done
17974IFS=$as_save_IFS
17975
17976  ;;
17977esac
17978fi
17979OTOOL=$ac_cv_path_OTOOL
17980if test -n "$OTOOL"; then
17981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17982$as_echo "$OTOOL" >&6; }
17983else
17984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17985$as_echo "no" >&6; }
17986fi
17987
17988
17989  test -n "$OTOOL" && break
17990done
17991
17992  else
17993    # The variable is set, but is it from the command line or the environment?
17994
17995    # Try to remove the string !OTOOL! from our list.
17996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17998      # If it failed, the variable was not from the command line. Ignore it,
17999      # but warn the user (except for BASH, which is always set by the calling BASH).
18000      if test "xOTOOL" != xBASH; then
18001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18002$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18003      fi
18004      # Try to locate tool using the code snippet
18005      for ac_prog in otool
18006do
18007  # Extract the first word of "$ac_prog", so it can be a program name with args.
18008set dummy $ac_prog; ac_word=$2
18009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18010$as_echo_n "checking for $ac_word... " >&6; }
18011if ${ac_cv_path_OTOOL+:} false; then :
18012  $as_echo_n "(cached) " >&6
18013else
18014  case $OTOOL in
18015  [\\/]* | ?:[\\/]*)
18016  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18017  ;;
18018  *)
18019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18020for as_dir in $PATH
18021do
18022  IFS=$as_save_IFS
18023  test -z "$as_dir" && as_dir=.
18024    for ac_exec_ext in '' $ac_executable_extensions; do
18025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18026    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18028    break 2
18029  fi
18030done
18031  done
18032IFS=$as_save_IFS
18033
18034  ;;
18035esac
18036fi
18037OTOOL=$ac_cv_path_OTOOL
18038if test -n "$OTOOL"; then
18039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18040$as_echo "$OTOOL" >&6; }
18041else
18042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18043$as_echo "no" >&6; }
18044fi
18045
18046
18047  test -n "$OTOOL" && break
18048done
18049
18050    else
18051      # If it succeeded, then it was overridden by the user. We will use it
18052      # for the tool.
18053
18054      # First remove it from the list of overridden variables, so we can test
18055      # for unknown variables in the end.
18056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18057
18058      # Check if the provided tool contains a complete path.
18059      tool_specified="$OTOOL"
18060      tool_basename="${tool_specified##*/}"
18061      if test "x$tool_basename" = "x$tool_specified"; then
18062        # A command without a complete path is provided, search $PATH.
18063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18064$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18065        # Extract the first word of "$tool_basename", so it can be a program name with args.
18066set dummy $tool_basename; ac_word=$2
18067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18068$as_echo_n "checking for $ac_word... " >&6; }
18069if ${ac_cv_path_OTOOL+:} false; then :
18070  $as_echo_n "(cached) " >&6
18071else
18072  case $OTOOL in
18073  [\\/]* | ?:[\\/]*)
18074  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18075  ;;
18076  *)
18077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18078for as_dir in $PATH
18079do
18080  IFS=$as_save_IFS
18081  test -z "$as_dir" && as_dir=.
18082    for ac_exec_ext in '' $ac_executable_extensions; do
18083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18084    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18086    break 2
18087  fi
18088done
18089  done
18090IFS=$as_save_IFS
18091
18092  ;;
18093esac
18094fi
18095OTOOL=$ac_cv_path_OTOOL
18096if test -n "$OTOOL"; then
18097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18098$as_echo "$OTOOL" >&6; }
18099else
18100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18101$as_echo "no" >&6; }
18102fi
18103
18104
18105        if test "x$OTOOL" = x; then
18106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18107        fi
18108      else
18109        # Otherwise we believe it is a complete path. Use it as it is.
18110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18111$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18113$as_echo_n "checking for OTOOL... " >&6; }
18114        if test ! -x "$tool_specified"; then
18115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18116$as_echo "not found" >&6; }
18117          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18118        fi
18119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18120$as_echo "$tool_specified" >&6; }
18121      fi
18122    fi
18123  fi
18124
18125
18126  if test "x$OTOOL" = "x"; then
18127    OTOOL="true"
18128  fi
18129
18130
18131  # Publish this variable in the help.
18132
18133
18134  if test "x$READELF" = x; then
18135    # The variable is not set by user, try to locate tool using the code snippet
18136    for ac_prog in greadelf readelf
18137do
18138  # Extract the first word of "$ac_prog", so it can be a program name with args.
18139set dummy $ac_prog; ac_word=$2
18140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18141$as_echo_n "checking for $ac_word... " >&6; }
18142if ${ac_cv_path_READELF+:} false; then :
18143  $as_echo_n "(cached) " >&6
18144else
18145  case $READELF in
18146  [\\/]* | ?:[\\/]*)
18147  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18148  ;;
18149  *)
18150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18151for as_dir in $PATH
18152do
18153  IFS=$as_save_IFS
18154  test -z "$as_dir" && as_dir=.
18155    for ac_exec_ext in '' $ac_executable_extensions; do
18156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18157    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18159    break 2
18160  fi
18161done
18162  done
18163IFS=$as_save_IFS
18164
18165  ;;
18166esac
18167fi
18168READELF=$ac_cv_path_READELF
18169if test -n "$READELF"; then
18170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18171$as_echo "$READELF" >&6; }
18172else
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18174$as_echo "no" >&6; }
18175fi
18176
18177
18178  test -n "$READELF" && break
18179done
18180
18181  else
18182    # The variable is set, but is it from the command line or the environment?
18183
18184    # Try to remove the string !READELF! from our list.
18185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18187      # If it failed, the variable was not from the command line. Ignore it,
18188      # but warn the user (except for BASH, which is always set by the calling BASH).
18189      if test "xREADELF" != xBASH; then
18190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18191$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18192      fi
18193      # Try to locate tool using the code snippet
18194      for ac_prog in greadelf readelf
18195do
18196  # Extract the first word of "$ac_prog", so it can be a program name with args.
18197set dummy $ac_prog; ac_word=$2
18198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18199$as_echo_n "checking for $ac_word... " >&6; }
18200if ${ac_cv_path_READELF+:} false; then :
18201  $as_echo_n "(cached) " >&6
18202else
18203  case $READELF in
18204  [\\/]* | ?:[\\/]*)
18205  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18206  ;;
18207  *)
18208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18209for as_dir in $PATH
18210do
18211  IFS=$as_save_IFS
18212  test -z "$as_dir" && as_dir=.
18213    for ac_exec_ext in '' $ac_executable_extensions; do
18214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18215    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18217    break 2
18218  fi
18219done
18220  done
18221IFS=$as_save_IFS
18222
18223  ;;
18224esac
18225fi
18226READELF=$ac_cv_path_READELF
18227if test -n "$READELF"; then
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18229$as_echo "$READELF" >&6; }
18230else
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18232$as_echo "no" >&6; }
18233fi
18234
18235
18236  test -n "$READELF" && break
18237done
18238
18239    else
18240      # If it succeeded, then it was overridden by the user. We will use it
18241      # for the tool.
18242
18243      # First remove it from the list of overridden variables, so we can test
18244      # for unknown variables in the end.
18245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18246
18247      # Check if the provided tool contains a complete path.
18248      tool_specified="$READELF"
18249      tool_basename="${tool_specified##*/}"
18250      if test "x$tool_basename" = "x$tool_specified"; then
18251        # A command without a complete path is provided, search $PATH.
18252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18253$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18254        # Extract the first word of "$tool_basename", so it can be a program name with args.
18255set dummy $tool_basename; ac_word=$2
18256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18257$as_echo_n "checking for $ac_word... " >&6; }
18258if ${ac_cv_path_READELF+:} false; then :
18259  $as_echo_n "(cached) " >&6
18260else
18261  case $READELF in
18262  [\\/]* | ?:[\\/]*)
18263  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18264  ;;
18265  *)
18266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18267for as_dir in $PATH
18268do
18269  IFS=$as_save_IFS
18270  test -z "$as_dir" && as_dir=.
18271    for ac_exec_ext in '' $ac_executable_extensions; do
18272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18273    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18275    break 2
18276  fi
18277done
18278  done
18279IFS=$as_save_IFS
18280
18281  ;;
18282esac
18283fi
18284READELF=$ac_cv_path_READELF
18285if test -n "$READELF"; then
18286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18287$as_echo "$READELF" >&6; }
18288else
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18290$as_echo "no" >&6; }
18291fi
18292
18293
18294        if test "x$READELF" = x; then
18295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18296        fi
18297      else
18298        # Otherwise we believe it is a complete path. Use it as it is.
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18300$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18302$as_echo_n "checking for READELF... " >&6; }
18303        if test ! -x "$tool_specified"; then
18304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18305$as_echo "not found" >&6; }
18306          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18307        fi
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18309$as_echo "$tool_specified" >&6; }
18310      fi
18311    fi
18312  fi
18313
18314
18315
18316
18317  # Publish this variable in the help.
18318
18319
18320  if test "x$HG" = x; then
18321    # The variable is not set by user, try to locate tool using the code snippet
18322    for ac_prog in hg
18323do
18324  # Extract the first word of "$ac_prog", so it can be a program name with args.
18325set dummy $ac_prog; ac_word=$2
18326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327$as_echo_n "checking for $ac_word... " >&6; }
18328if ${ac_cv_path_HG+:} false; then :
18329  $as_echo_n "(cached) " >&6
18330else
18331  case $HG in
18332  [\\/]* | ?:[\\/]*)
18333  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18334  ;;
18335  *)
18336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337for as_dir in $PATH
18338do
18339  IFS=$as_save_IFS
18340  test -z "$as_dir" && as_dir=.
18341    for ac_exec_ext in '' $ac_executable_extensions; do
18342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345    break 2
18346  fi
18347done
18348  done
18349IFS=$as_save_IFS
18350
18351  ;;
18352esac
18353fi
18354HG=$ac_cv_path_HG
18355if test -n "$HG"; then
18356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18357$as_echo "$HG" >&6; }
18358else
18359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360$as_echo "no" >&6; }
18361fi
18362
18363
18364  test -n "$HG" && break
18365done
18366
18367  else
18368    # The variable is set, but is it from the command line or the environment?
18369
18370    # Try to remove the string !HG! from our list.
18371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18373      # If it failed, the variable was not from the command line. Ignore it,
18374      # but warn the user (except for BASH, which is always set by the calling BASH).
18375      if test "xHG" != xBASH; then
18376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18377$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18378      fi
18379      # Try to locate tool using the code snippet
18380      for ac_prog in hg
18381do
18382  # Extract the first word of "$ac_prog", so it can be a program name with args.
18383set dummy $ac_prog; ac_word=$2
18384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18385$as_echo_n "checking for $ac_word... " >&6; }
18386if ${ac_cv_path_HG+:} false; then :
18387  $as_echo_n "(cached) " >&6
18388else
18389  case $HG in
18390  [\\/]* | ?:[\\/]*)
18391  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18392  ;;
18393  *)
18394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18395for as_dir in $PATH
18396do
18397  IFS=$as_save_IFS
18398  test -z "$as_dir" && as_dir=.
18399    for ac_exec_ext in '' $ac_executable_extensions; do
18400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18401    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18403    break 2
18404  fi
18405done
18406  done
18407IFS=$as_save_IFS
18408
18409  ;;
18410esac
18411fi
18412HG=$ac_cv_path_HG
18413if test -n "$HG"; then
18414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18415$as_echo "$HG" >&6; }
18416else
18417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18418$as_echo "no" >&6; }
18419fi
18420
18421
18422  test -n "$HG" && break
18423done
18424
18425    else
18426      # If it succeeded, then it was overridden by the user. We will use it
18427      # for the tool.
18428
18429      # First remove it from the list of overridden variables, so we can test
18430      # for unknown variables in the end.
18431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18432
18433      # Check if the provided tool contains a complete path.
18434      tool_specified="$HG"
18435      tool_basename="${tool_specified##*/}"
18436      if test "x$tool_basename" = "x$tool_specified"; then
18437        # A command without a complete path is provided, search $PATH.
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18439$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18440        # Extract the first word of "$tool_basename", so it can be a program name with args.
18441set dummy $tool_basename; ac_word=$2
18442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18443$as_echo_n "checking for $ac_word... " >&6; }
18444if ${ac_cv_path_HG+:} false; then :
18445  $as_echo_n "(cached) " >&6
18446else
18447  case $HG in
18448  [\\/]* | ?:[\\/]*)
18449  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18450  ;;
18451  *)
18452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18453for as_dir in $PATH
18454do
18455  IFS=$as_save_IFS
18456  test -z "$as_dir" && as_dir=.
18457    for ac_exec_ext in '' $ac_executable_extensions; do
18458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18459    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18461    break 2
18462  fi
18463done
18464  done
18465IFS=$as_save_IFS
18466
18467  ;;
18468esac
18469fi
18470HG=$ac_cv_path_HG
18471if test -n "$HG"; then
18472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18473$as_echo "$HG" >&6; }
18474else
18475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18476$as_echo "no" >&6; }
18477fi
18478
18479
18480        if test "x$HG" = x; then
18481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18482        fi
18483      else
18484        # Otherwise we believe it is a complete path. Use it as it is.
18485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18486$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18488$as_echo_n "checking for HG... " >&6; }
18489        if test ! -x "$tool_specified"; then
18490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18491$as_echo "not found" >&6; }
18492          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18493        fi
18494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18495$as_echo "$tool_specified" >&6; }
18496      fi
18497    fi
18498  fi
18499
18500
18501
18502
18503  # Publish this variable in the help.
18504
18505
18506  if test "x$STAT" = x; then
18507    # The variable is not set by user, try to locate tool using the code snippet
18508    for ac_prog in stat
18509do
18510  # Extract the first word of "$ac_prog", so it can be a program name with args.
18511set dummy $ac_prog; ac_word=$2
18512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18513$as_echo_n "checking for $ac_word... " >&6; }
18514if ${ac_cv_path_STAT+:} false; then :
18515  $as_echo_n "(cached) " >&6
18516else
18517  case $STAT in
18518  [\\/]* | ?:[\\/]*)
18519  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18520  ;;
18521  *)
18522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18523for as_dir in $PATH
18524do
18525  IFS=$as_save_IFS
18526  test -z "$as_dir" && as_dir=.
18527    for ac_exec_ext in '' $ac_executable_extensions; do
18528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18529    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18531    break 2
18532  fi
18533done
18534  done
18535IFS=$as_save_IFS
18536
18537  ;;
18538esac
18539fi
18540STAT=$ac_cv_path_STAT
18541if test -n "$STAT"; then
18542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18543$as_echo "$STAT" >&6; }
18544else
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18546$as_echo "no" >&6; }
18547fi
18548
18549
18550  test -n "$STAT" && break
18551done
18552
18553  else
18554    # The variable is set, but is it from the command line or the environment?
18555
18556    # Try to remove the string !STAT! from our list.
18557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18559      # If it failed, the variable was not from the command line. Ignore it,
18560      # but warn the user (except for BASH, which is always set by the calling BASH).
18561      if test "xSTAT" != xBASH; then
18562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18563$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18564      fi
18565      # Try to locate tool using the code snippet
18566      for ac_prog in stat
18567do
18568  # Extract the first word of "$ac_prog", so it can be a program name with args.
18569set dummy $ac_prog; ac_word=$2
18570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18571$as_echo_n "checking for $ac_word... " >&6; }
18572if ${ac_cv_path_STAT+:} false; then :
18573  $as_echo_n "(cached) " >&6
18574else
18575  case $STAT in
18576  [\\/]* | ?:[\\/]*)
18577  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18578  ;;
18579  *)
18580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18581for as_dir in $PATH
18582do
18583  IFS=$as_save_IFS
18584  test -z "$as_dir" && as_dir=.
18585    for ac_exec_ext in '' $ac_executable_extensions; do
18586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18587    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18589    break 2
18590  fi
18591done
18592  done
18593IFS=$as_save_IFS
18594
18595  ;;
18596esac
18597fi
18598STAT=$ac_cv_path_STAT
18599if test -n "$STAT"; then
18600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18601$as_echo "$STAT" >&6; }
18602else
18603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18604$as_echo "no" >&6; }
18605fi
18606
18607
18608  test -n "$STAT" && break
18609done
18610
18611    else
18612      # If it succeeded, then it was overridden by the user. We will use it
18613      # for the tool.
18614
18615      # First remove it from the list of overridden variables, so we can test
18616      # for unknown variables in the end.
18617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18618
18619      # Check if the provided tool contains a complete path.
18620      tool_specified="$STAT"
18621      tool_basename="${tool_specified##*/}"
18622      if test "x$tool_basename" = "x$tool_specified"; then
18623        # A command without a complete path is provided, search $PATH.
18624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18625$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18626        # Extract the first word of "$tool_basename", so it can be a program name with args.
18627set dummy $tool_basename; ac_word=$2
18628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629$as_echo_n "checking for $ac_word... " >&6; }
18630if ${ac_cv_path_STAT+:} false; then :
18631  $as_echo_n "(cached) " >&6
18632else
18633  case $STAT in
18634  [\\/]* | ?:[\\/]*)
18635  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18636  ;;
18637  *)
18638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639for as_dir in $PATH
18640do
18641  IFS=$as_save_IFS
18642  test -z "$as_dir" && as_dir=.
18643    for ac_exec_ext in '' $ac_executable_extensions; do
18644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647    break 2
18648  fi
18649done
18650  done
18651IFS=$as_save_IFS
18652
18653  ;;
18654esac
18655fi
18656STAT=$ac_cv_path_STAT
18657if test -n "$STAT"; then
18658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18659$as_echo "$STAT" >&6; }
18660else
18661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662$as_echo "no" >&6; }
18663fi
18664
18665
18666        if test "x$STAT" = x; then
18667          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18668        fi
18669      else
18670        # Otherwise we believe it is a complete path. Use it as it is.
18671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18672$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18674$as_echo_n "checking for STAT... " >&6; }
18675        if test ! -x "$tool_specified"; then
18676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18677$as_echo "not found" >&6; }
18678          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18679        fi
18680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18681$as_echo "$tool_specified" >&6; }
18682      fi
18683    fi
18684  fi
18685
18686
18687
18688
18689  # Publish this variable in the help.
18690
18691
18692  if test "x$TIME" = x; then
18693    # The variable is not set by user, try to locate tool using the code snippet
18694    for ac_prog in time
18695do
18696  # Extract the first word of "$ac_prog", so it can be a program name with args.
18697set dummy $ac_prog; ac_word=$2
18698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18699$as_echo_n "checking for $ac_word... " >&6; }
18700if ${ac_cv_path_TIME+:} false; then :
18701  $as_echo_n "(cached) " >&6
18702else
18703  case $TIME in
18704  [\\/]* | ?:[\\/]*)
18705  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18706  ;;
18707  *)
18708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18709for as_dir in $PATH
18710do
18711  IFS=$as_save_IFS
18712  test -z "$as_dir" && as_dir=.
18713    for ac_exec_ext in '' $ac_executable_extensions; do
18714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18715    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18717    break 2
18718  fi
18719done
18720  done
18721IFS=$as_save_IFS
18722
18723  ;;
18724esac
18725fi
18726TIME=$ac_cv_path_TIME
18727if test -n "$TIME"; then
18728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18729$as_echo "$TIME" >&6; }
18730else
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732$as_echo "no" >&6; }
18733fi
18734
18735
18736  test -n "$TIME" && break
18737done
18738
18739  else
18740    # The variable is set, but is it from the command line or the environment?
18741
18742    # Try to remove the string !TIME! from our list.
18743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18745      # If it failed, the variable was not from the command line. Ignore it,
18746      # but warn the user (except for BASH, which is always set by the calling BASH).
18747      if test "xTIME" != xBASH; then
18748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18749$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18750      fi
18751      # Try to locate tool using the code snippet
18752      for ac_prog in time
18753do
18754  # Extract the first word of "$ac_prog", so it can be a program name with args.
18755set dummy $ac_prog; ac_word=$2
18756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18757$as_echo_n "checking for $ac_word... " >&6; }
18758if ${ac_cv_path_TIME+:} false; then :
18759  $as_echo_n "(cached) " >&6
18760else
18761  case $TIME in
18762  [\\/]* | ?:[\\/]*)
18763  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18764  ;;
18765  *)
18766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18767for as_dir in $PATH
18768do
18769  IFS=$as_save_IFS
18770  test -z "$as_dir" && as_dir=.
18771    for ac_exec_ext in '' $ac_executable_extensions; do
18772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18773    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18775    break 2
18776  fi
18777done
18778  done
18779IFS=$as_save_IFS
18780
18781  ;;
18782esac
18783fi
18784TIME=$ac_cv_path_TIME
18785if test -n "$TIME"; then
18786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18787$as_echo "$TIME" >&6; }
18788else
18789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18790$as_echo "no" >&6; }
18791fi
18792
18793
18794  test -n "$TIME" && break
18795done
18796
18797    else
18798      # If it succeeded, then it was overridden by the user. We will use it
18799      # for the tool.
18800
18801      # First remove it from the list of overridden variables, so we can test
18802      # for unknown variables in the end.
18803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18804
18805      # Check if the provided tool contains a complete path.
18806      tool_specified="$TIME"
18807      tool_basename="${tool_specified##*/}"
18808      if test "x$tool_basename" = "x$tool_specified"; then
18809        # A command without a complete path is provided, search $PATH.
18810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18811$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18812        # Extract the first word of "$tool_basename", so it can be a program name with args.
18813set dummy $tool_basename; ac_word=$2
18814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18815$as_echo_n "checking for $ac_word... " >&6; }
18816if ${ac_cv_path_TIME+:} false; then :
18817  $as_echo_n "(cached) " >&6
18818else
18819  case $TIME in
18820  [\\/]* | ?:[\\/]*)
18821  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18822  ;;
18823  *)
18824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18825for as_dir in $PATH
18826do
18827  IFS=$as_save_IFS
18828  test -z "$as_dir" && as_dir=.
18829    for ac_exec_ext in '' $ac_executable_extensions; do
18830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18831    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18833    break 2
18834  fi
18835done
18836  done
18837IFS=$as_save_IFS
18838
18839  ;;
18840esac
18841fi
18842TIME=$ac_cv_path_TIME
18843if test -n "$TIME"; then
18844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18845$as_echo "$TIME" >&6; }
18846else
18847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18848$as_echo "no" >&6; }
18849fi
18850
18851
18852        if test "x$TIME" = x; then
18853          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18854        fi
18855      else
18856        # Otherwise we believe it is a complete path. Use it as it is.
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18858$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18860$as_echo_n "checking for TIME... " >&6; }
18861        if test ! -x "$tool_specified"; then
18862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18863$as_echo "not found" >&6; }
18864          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18865        fi
18866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18867$as_echo "$tool_specified" >&6; }
18868      fi
18869    fi
18870  fi
18871
18872
18873  # Check if it's GNU time
18874  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18875  if test "x$IS_GNU_TIME" != x; then
18876    IS_GNU_TIME=yes
18877  else
18878    IS_GNU_TIME=no
18879  fi
18880
18881
18882  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18883
18884
18885
18886  # Publish this variable in the help.
18887
18888
18889  if test "x$DSYMUTIL" = x; then
18890    # The variable is not set by user, try to locate tool using the code snippet
18891    for ac_prog in dsymutil
18892do
18893  # Extract the first word of "$ac_prog", so it can be a program name with args.
18894set dummy $ac_prog; ac_word=$2
18895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18896$as_echo_n "checking for $ac_word... " >&6; }
18897if ${ac_cv_path_DSYMUTIL+:} false; then :
18898  $as_echo_n "(cached) " >&6
18899else
18900  case $DSYMUTIL in
18901  [\\/]* | ?:[\\/]*)
18902  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18903  ;;
18904  *)
18905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18906for as_dir in $PATH
18907do
18908  IFS=$as_save_IFS
18909  test -z "$as_dir" && as_dir=.
18910    for ac_exec_ext in '' $ac_executable_extensions; do
18911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18912    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18914    break 2
18915  fi
18916done
18917  done
18918IFS=$as_save_IFS
18919
18920  ;;
18921esac
18922fi
18923DSYMUTIL=$ac_cv_path_DSYMUTIL
18924if test -n "$DSYMUTIL"; then
18925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18926$as_echo "$DSYMUTIL" >&6; }
18927else
18928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18929$as_echo "no" >&6; }
18930fi
18931
18932
18933  test -n "$DSYMUTIL" && break
18934done
18935
18936  else
18937    # The variable is set, but is it from the command line or the environment?
18938
18939    # Try to remove the string !DSYMUTIL! from our list.
18940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18942      # If it failed, the variable was not from the command line. Ignore it,
18943      # but warn the user (except for BASH, which is always set by the calling BASH).
18944      if test "xDSYMUTIL" != xBASH; then
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18946$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18947      fi
18948      # Try to locate tool using the code snippet
18949      for ac_prog in dsymutil
18950do
18951  # Extract the first word of "$ac_prog", so it can be a program name with args.
18952set dummy $ac_prog; ac_word=$2
18953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18954$as_echo_n "checking for $ac_word... " >&6; }
18955if ${ac_cv_path_DSYMUTIL+:} false; then :
18956  $as_echo_n "(cached) " >&6
18957else
18958  case $DSYMUTIL in
18959  [\\/]* | ?:[\\/]*)
18960  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18961  ;;
18962  *)
18963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18964for as_dir in $PATH
18965do
18966  IFS=$as_save_IFS
18967  test -z "$as_dir" && as_dir=.
18968    for ac_exec_ext in '' $ac_executable_extensions; do
18969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18970    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18972    break 2
18973  fi
18974done
18975  done
18976IFS=$as_save_IFS
18977
18978  ;;
18979esac
18980fi
18981DSYMUTIL=$ac_cv_path_DSYMUTIL
18982if test -n "$DSYMUTIL"; then
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18984$as_echo "$DSYMUTIL" >&6; }
18985else
18986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18987$as_echo "no" >&6; }
18988fi
18989
18990
18991  test -n "$DSYMUTIL" && break
18992done
18993
18994    else
18995      # If it succeeded, then it was overridden by the user. We will use it
18996      # for the tool.
18997
18998      # First remove it from the list of overridden variables, so we can test
18999      # for unknown variables in the end.
19000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19001
19002      # Check if the provided tool contains a complete path.
19003      tool_specified="$DSYMUTIL"
19004      tool_basename="${tool_specified##*/}"
19005      if test "x$tool_basename" = "x$tool_specified"; then
19006        # A command without a complete path is provided, search $PATH.
19007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19008$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19009        # Extract the first word of "$tool_basename", so it can be a program name with args.
19010set dummy $tool_basename; ac_word=$2
19011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19012$as_echo_n "checking for $ac_word... " >&6; }
19013if ${ac_cv_path_DSYMUTIL+:} false; then :
19014  $as_echo_n "(cached) " >&6
19015else
19016  case $DSYMUTIL in
19017  [\\/]* | ?:[\\/]*)
19018  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19019  ;;
19020  *)
19021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19022for as_dir in $PATH
19023do
19024  IFS=$as_save_IFS
19025  test -z "$as_dir" && as_dir=.
19026    for ac_exec_ext in '' $ac_executable_extensions; do
19027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19028    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19030    break 2
19031  fi
19032done
19033  done
19034IFS=$as_save_IFS
19035
19036  ;;
19037esac
19038fi
19039DSYMUTIL=$ac_cv_path_DSYMUTIL
19040if test -n "$DSYMUTIL"; then
19041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19042$as_echo "$DSYMUTIL" >&6; }
19043else
19044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19045$as_echo "no" >&6; }
19046fi
19047
19048
19049        if test "x$DSYMUTIL" = x; then
19050          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19051        fi
19052      else
19053        # Otherwise we believe it is a complete path. Use it as it is.
19054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19055$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19057$as_echo_n "checking for DSYMUTIL... " >&6; }
19058        if test ! -x "$tool_specified"; then
19059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19060$as_echo "not found" >&6; }
19061          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19062        fi
19063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19064$as_echo "$tool_specified" >&6; }
19065      fi
19066    fi
19067  fi
19068
19069
19070
19071  if test "x$DSYMUTIL" = x; then
19072    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19073  fi
19074
19075
19076
19077
19078
19079  # Publish this variable in the help.
19080
19081
19082  if test "x$XATTR" = x; then
19083    # The variable is not set by user, try to locate tool using the code snippet
19084    for ac_prog in xattr
19085do
19086  # Extract the first word of "$ac_prog", so it can be a program name with args.
19087set dummy $ac_prog; ac_word=$2
19088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19089$as_echo_n "checking for $ac_word... " >&6; }
19090if ${ac_cv_path_XATTR+:} false; then :
19091  $as_echo_n "(cached) " >&6
19092else
19093  case $XATTR in
19094  [\\/]* | ?:[\\/]*)
19095  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19096  ;;
19097  *)
19098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19099for as_dir in $PATH
19100do
19101  IFS=$as_save_IFS
19102  test -z "$as_dir" && as_dir=.
19103    for ac_exec_ext in '' $ac_executable_extensions; do
19104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19105    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19107    break 2
19108  fi
19109done
19110  done
19111IFS=$as_save_IFS
19112
19113  ;;
19114esac
19115fi
19116XATTR=$ac_cv_path_XATTR
19117if test -n "$XATTR"; then
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19119$as_echo "$XATTR" >&6; }
19120else
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19122$as_echo "no" >&6; }
19123fi
19124
19125
19126  test -n "$XATTR" && break
19127done
19128
19129  else
19130    # The variable is set, but is it from the command line or the environment?
19131
19132    # Try to remove the string !XATTR! from our list.
19133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19135      # If it failed, the variable was not from the command line. Ignore it,
19136      # but warn the user (except for BASH, which is always set by the calling BASH).
19137      if test "xXATTR" != xBASH; then
19138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19139$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19140      fi
19141      # Try to locate tool using the code snippet
19142      for ac_prog in xattr
19143do
19144  # Extract the first word of "$ac_prog", so it can be a program name with args.
19145set dummy $ac_prog; ac_word=$2
19146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19147$as_echo_n "checking for $ac_word... " >&6; }
19148if ${ac_cv_path_XATTR+:} false; then :
19149  $as_echo_n "(cached) " >&6
19150else
19151  case $XATTR in
19152  [\\/]* | ?:[\\/]*)
19153  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19154  ;;
19155  *)
19156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19157for as_dir in $PATH
19158do
19159  IFS=$as_save_IFS
19160  test -z "$as_dir" && as_dir=.
19161    for ac_exec_ext in '' $ac_executable_extensions; do
19162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19163    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19165    break 2
19166  fi
19167done
19168  done
19169IFS=$as_save_IFS
19170
19171  ;;
19172esac
19173fi
19174XATTR=$ac_cv_path_XATTR
19175if test -n "$XATTR"; then
19176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19177$as_echo "$XATTR" >&6; }
19178else
19179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19180$as_echo "no" >&6; }
19181fi
19182
19183
19184  test -n "$XATTR" && break
19185done
19186
19187    else
19188      # If it succeeded, then it was overridden by the user. We will use it
19189      # for the tool.
19190
19191      # First remove it from the list of overridden variables, so we can test
19192      # for unknown variables in the end.
19193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19194
19195      # Check if the provided tool contains a complete path.
19196      tool_specified="$XATTR"
19197      tool_basename="${tool_specified##*/}"
19198      if test "x$tool_basename" = "x$tool_specified"; then
19199        # A command without a complete path is provided, search $PATH.
19200        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19201$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19202        # Extract the first word of "$tool_basename", so it can be a program name with args.
19203set dummy $tool_basename; ac_word=$2
19204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19205$as_echo_n "checking for $ac_word... " >&6; }
19206if ${ac_cv_path_XATTR+:} false; then :
19207  $as_echo_n "(cached) " >&6
19208else
19209  case $XATTR in
19210  [\\/]* | ?:[\\/]*)
19211  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19212  ;;
19213  *)
19214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19215for as_dir in $PATH
19216do
19217  IFS=$as_save_IFS
19218  test -z "$as_dir" && as_dir=.
19219    for ac_exec_ext in '' $ac_executable_extensions; do
19220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19221    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19223    break 2
19224  fi
19225done
19226  done
19227IFS=$as_save_IFS
19228
19229  ;;
19230esac
19231fi
19232XATTR=$ac_cv_path_XATTR
19233if test -n "$XATTR"; then
19234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19235$as_echo "$XATTR" >&6; }
19236else
19237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19238$as_echo "no" >&6; }
19239fi
19240
19241
19242        if test "x$XATTR" = x; then
19243          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19244        fi
19245      else
19246        # Otherwise we believe it is a complete path. Use it as it is.
19247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19248$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19250$as_echo_n "checking for XATTR... " >&6; }
19251        if test ! -x "$tool_specified"; then
19252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19253$as_echo "not found" >&6; }
19254          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19255        fi
19256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19257$as_echo "$tool_specified" >&6; }
19258      fi
19259    fi
19260  fi
19261
19262
19263
19264  if test "x$XATTR" = x; then
19265    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19266  fi
19267
19268
19269
19270
19271  # Publish this variable in the help.
19272
19273
19274  if test "x$CODESIGN" = x; then
19275    # The variable is not set by user, try to locate tool using the code snippet
19276    for ac_prog in codesign
19277do
19278  # Extract the first word of "$ac_prog", so it can be a program name with args.
19279set dummy $ac_prog; ac_word=$2
19280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19281$as_echo_n "checking for $ac_word... " >&6; }
19282if ${ac_cv_path_CODESIGN+:} false; then :
19283  $as_echo_n "(cached) " >&6
19284else
19285  case $CODESIGN in
19286  [\\/]* | ?:[\\/]*)
19287  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19288  ;;
19289  *)
19290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19291for as_dir in $PATH
19292do
19293  IFS=$as_save_IFS
19294  test -z "$as_dir" && as_dir=.
19295    for ac_exec_ext in '' $ac_executable_extensions; do
19296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19297    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19299    break 2
19300  fi
19301done
19302  done
19303IFS=$as_save_IFS
19304
19305  ;;
19306esac
19307fi
19308CODESIGN=$ac_cv_path_CODESIGN
19309if test -n "$CODESIGN"; then
19310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19311$as_echo "$CODESIGN" >&6; }
19312else
19313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19314$as_echo "no" >&6; }
19315fi
19316
19317
19318  test -n "$CODESIGN" && break
19319done
19320
19321  else
19322    # The variable is set, but is it from the command line or the environment?
19323
19324    # Try to remove the string !CODESIGN! from our list.
19325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19327      # If it failed, the variable was not from the command line. Ignore it,
19328      # but warn the user (except for BASH, which is always set by the calling BASH).
19329      if test "xCODESIGN" != xBASH; then
19330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19331$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19332      fi
19333      # Try to locate tool using the code snippet
19334      for ac_prog in codesign
19335do
19336  # Extract the first word of "$ac_prog", so it can be a program name with args.
19337set dummy $ac_prog; ac_word=$2
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339$as_echo_n "checking for $ac_word... " >&6; }
19340if ${ac_cv_path_CODESIGN+:} false; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343  case $CODESIGN in
19344  [\\/]* | ?:[\\/]*)
19345  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19346  ;;
19347  *)
19348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19349for as_dir in $PATH
19350do
19351  IFS=$as_save_IFS
19352  test -z "$as_dir" && as_dir=.
19353    for ac_exec_ext in '' $ac_executable_extensions; do
19354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19355    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19357    break 2
19358  fi
19359done
19360  done
19361IFS=$as_save_IFS
19362
19363  ;;
19364esac
19365fi
19366CODESIGN=$ac_cv_path_CODESIGN
19367if test -n "$CODESIGN"; then
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19369$as_echo "$CODESIGN" >&6; }
19370else
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19372$as_echo "no" >&6; }
19373fi
19374
19375
19376  test -n "$CODESIGN" && break
19377done
19378
19379    else
19380      # If it succeeded, then it was overridden by the user. We will use it
19381      # for the tool.
19382
19383      # First remove it from the list of overridden variables, so we can test
19384      # for unknown variables in the end.
19385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19386
19387      # Check if the provided tool contains a complete path.
19388      tool_specified="$CODESIGN"
19389      tool_basename="${tool_specified##*/}"
19390      if test "x$tool_basename" = "x$tool_specified"; then
19391        # A command without a complete path is provided, search $PATH.
19392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19393$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19394        # Extract the first word of "$tool_basename", so it can be a program name with args.
19395set dummy $tool_basename; ac_word=$2
19396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19397$as_echo_n "checking for $ac_word... " >&6; }
19398if ${ac_cv_path_CODESIGN+:} false; then :
19399  $as_echo_n "(cached) " >&6
19400else
19401  case $CODESIGN in
19402  [\\/]* | ?:[\\/]*)
19403  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19404  ;;
19405  *)
19406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19407for as_dir in $PATH
19408do
19409  IFS=$as_save_IFS
19410  test -z "$as_dir" && as_dir=.
19411    for ac_exec_ext in '' $ac_executable_extensions; do
19412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19413    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19415    break 2
19416  fi
19417done
19418  done
19419IFS=$as_save_IFS
19420
19421  ;;
19422esac
19423fi
19424CODESIGN=$ac_cv_path_CODESIGN
19425if test -n "$CODESIGN"; then
19426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19427$as_echo "$CODESIGN" >&6; }
19428else
19429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19430$as_echo "no" >&6; }
19431fi
19432
19433
19434        if test "x$CODESIGN" = x; then
19435          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19436        fi
19437      else
19438        # Otherwise we believe it is a complete path. Use it as it is.
19439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19440$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19442$as_echo_n "checking for CODESIGN... " >&6; }
19443        if test ! -x "$tool_specified"; then
19444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19445$as_echo "not found" >&6; }
19446          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19447        fi
19448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19449$as_echo "$tool_specified" >&6; }
19450      fi
19451    fi
19452  fi
19453
19454
19455    if test "x$CODESIGN" != "x"; then
19456      # Verify that the openjdk_codesign certificate is present
19457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19458$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19459      rm -f codesign-testfile
19460      touch codesign-testfile
19461      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19462      rm -f codesign-testfile
19463      if test "x$CODESIGN" = x; then
19464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19465$as_echo "no" >&6; }
19466      else
19467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19468$as_echo "yes" >&6; }
19469      fi
19470    fi
19471
19472
19473
19474  # Publish this variable in the help.
19475
19476
19477  if test "x$SETFILE" = x; then
19478    # The variable is not set by user, try to locate tool using the code snippet
19479    for ac_prog in SetFile
19480do
19481  # Extract the first word of "$ac_prog", so it can be a program name with args.
19482set dummy $ac_prog; ac_word=$2
19483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19484$as_echo_n "checking for $ac_word... " >&6; }
19485if ${ac_cv_path_SETFILE+:} false; then :
19486  $as_echo_n "(cached) " >&6
19487else
19488  case $SETFILE in
19489  [\\/]* | ?:[\\/]*)
19490  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19491  ;;
19492  *)
19493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19494for as_dir in $PATH
19495do
19496  IFS=$as_save_IFS
19497  test -z "$as_dir" && as_dir=.
19498    for ac_exec_ext in '' $ac_executable_extensions; do
19499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19500    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19502    break 2
19503  fi
19504done
19505  done
19506IFS=$as_save_IFS
19507
19508  ;;
19509esac
19510fi
19511SETFILE=$ac_cv_path_SETFILE
19512if test -n "$SETFILE"; then
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19514$as_echo "$SETFILE" >&6; }
19515else
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19517$as_echo "no" >&6; }
19518fi
19519
19520
19521  test -n "$SETFILE" && break
19522done
19523
19524  else
19525    # The variable is set, but is it from the command line or the environment?
19526
19527    # Try to remove the string !SETFILE! from our list.
19528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19530      # If it failed, the variable was not from the command line. Ignore it,
19531      # but warn the user (except for BASH, which is always set by the calling BASH).
19532      if test "xSETFILE" != xBASH; then
19533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19534$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19535      fi
19536      # Try to locate tool using the code snippet
19537      for ac_prog in SetFile
19538do
19539  # Extract the first word of "$ac_prog", so it can be a program name with args.
19540set dummy $ac_prog; ac_word=$2
19541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19542$as_echo_n "checking for $ac_word... " >&6; }
19543if ${ac_cv_path_SETFILE+:} false; then :
19544  $as_echo_n "(cached) " >&6
19545else
19546  case $SETFILE in
19547  [\\/]* | ?:[\\/]*)
19548  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19549  ;;
19550  *)
19551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19552for as_dir in $PATH
19553do
19554  IFS=$as_save_IFS
19555  test -z "$as_dir" && as_dir=.
19556    for ac_exec_ext in '' $ac_executable_extensions; do
19557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19558    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19560    break 2
19561  fi
19562done
19563  done
19564IFS=$as_save_IFS
19565
19566  ;;
19567esac
19568fi
19569SETFILE=$ac_cv_path_SETFILE
19570if test -n "$SETFILE"; then
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19572$as_echo "$SETFILE" >&6; }
19573else
19574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19575$as_echo "no" >&6; }
19576fi
19577
19578
19579  test -n "$SETFILE" && break
19580done
19581
19582    else
19583      # If it succeeded, then it was overridden by the user. We will use it
19584      # for the tool.
19585
19586      # First remove it from the list of overridden variables, so we can test
19587      # for unknown variables in the end.
19588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19589
19590      # Check if the provided tool contains a complete path.
19591      tool_specified="$SETFILE"
19592      tool_basename="${tool_specified##*/}"
19593      if test "x$tool_basename" = "x$tool_specified"; then
19594        # A command without a complete path is provided, search $PATH.
19595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19596$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19597        # Extract the first word of "$tool_basename", so it can be a program name with args.
19598set dummy $tool_basename; ac_word=$2
19599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19600$as_echo_n "checking for $ac_word... " >&6; }
19601if ${ac_cv_path_SETFILE+:} false; then :
19602  $as_echo_n "(cached) " >&6
19603else
19604  case $SETFILE in
19605  [\\/]* | ?:[\\/]*)
19606  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19607  ;;
19608  *)
19609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19610for as_dir in $PATH
19611do
19612  IFS=$as_save_IFS
19613  test -z "$as_dir" && as_dir=.
19614    for ac_exec_ext in '' $ac_executable_extensions; do
19615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19616    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19618    break 2
19619  fi
19620done
19621  done
19622IFS=$as_save_IFS
19623
19624  ;;
19625esac
19626fi
19627SETFILE=$ac_cv_path_SETFILE
19628if test -n "$SETFILE"; then
19629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19630$as_echo "$SETFILE" >&6; }
19631else
19632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19633$as_echo "no" >&6; }
19634fi
19635
19636
19637        if test "x$SETFILE" = x; then
19638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19639        fi
19640      else
19641        # Otherwise we believe it is a complete path. Use it as it is.
19642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19643$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19645$as_echo_n "checking for SETFILE... " >&6; }
19646        if test ! -x "$tool_specified"; then
19647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19648$as_echo "not found" >&6; }
19649          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19650        fi
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19652$as_echo "$tool_specified" >&6; }
19653      fi
19654    fi
19655  fi
19656
19657
19658
19659  if test "x$SETFILE" = x; then
19660    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19661  fi
19662
19663
19664  fi
19665
19666
19667  # Test if bash supports pipefail.
19668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19669$as_echo_n "checking if bash supports pipefail... " >&6; }
19670  if ${BASH} -c 'set -o pipefail'; then
19671    BASH_ARGS="$BASH_ARGS -o pipefail"
19672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19673$as_echo "yes" >&6; }
19674  else
19675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19676$as_echo "no" >&6; }
19677  fi
19678
19679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19680$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19681  if ${BASH} -e -c 'true'; then
19682    BASH_ARGS="$BASH_ARGS -e"
19683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19684$as_echo "yes" >&6; }
19685  else
19686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19687$as_echo "no" >&6; }
19688  fi
19689
19690
19691
19692
19693# Check if pkg-config is available.
19694
19695
19696if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19697	if test -n "$ac_tool_prefix"; then
19698  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19699set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19701$as_echo_n "checking for $ac_word... " >&6; }
19702if ${ac_cv_path_PKG_CONFIG+:} false; then :
19703  $as_echo_n "(cached) " >&6
19704else
19705  case $PKG_CONFIG in
19706  [\\/]* | ?:[\\/]*)
19707  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19708  ;;
19709  *)
19710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19711for as_dir in $PATH
19712do
19713  IFS=$as_save_IFS
19714  test -z "$as_dir" && as_dir=.
19715    for ac_exec_ext in '' $ac_executable_extensions; do
19716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19717    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19719    break 2
19720  fi
19721done
19722  done
19723IFS=$as_save_IFS
19724
19725  ;;
19726esac
19727fi
19728PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19729if test -n "$PKG_CONFIG"; then
19730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19731$as_echo "$PKG_CONFIG" >&6; }
19732else
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19734$as_echo "no" >&6; }
19735fi
19736
19737
19738fi
19739if test -z "$ac_cv_path_PKG_CONFIG"; then
19740  ac_pt_PKG_CONFIG=$PKG_CONFIG
19741  # Extract the first word of "pkg-config", so it can be a program name with args.
19742set dummy pkg-config; ac_word=$2
19743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19744$as_echo_n "checking for $ac_word... " >&6; }
19745if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19746  $as_echo_n "(cached) " >&6
19747else
19748  case $ac_pt_PKG_CONFIG in
19749  [\\/]* | ?:[\\/]*)
19750  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19751  ;;
19752  *)
19753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19754for as_dir in $PATH
19755do
19756  IFS=$as_save_IFS
19757  test -z "$as_dir" && as_dir=.
19758    for ac_exec_ext in '' $ac_executable_extensions; do
19759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19760    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19762    break 2
19763  fi
19764done
19765  done
19766IFS=$as_save_IFS
19767
19768  ;;
19769esac
19770fi
19771ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19772if test -n "$ac_pt_PKG_CONFIG"; then
19773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19774$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19775else
19776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19777$as_echo "no" >&6; }
19778fi
19779
19780  if test "x$ac_pt_PKG_CONFIG" = x; then
19781    PKG_CONFIG=""
19782  else
19783    case $cross_compiling:$ac_tool_warned in
19784yes:)
19785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19787ac_tool_warned=yes ;;
19788esac
19789    PKG_CONFIG=$ac_pt_PKG_CONFIG
19790  fi
19791else
19792  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19793fi
19794
19795fi
19796if test -n "$PKG_CONFIG"; then
19797	_pkg_min_version=0.9.0
19798	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19799$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19800	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19801		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19802$as_echo "yes" >&6; }
19803	else
19804		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19805$as_echo "no" >&6; }
19806		PKG_CONFIG=""
19807	fi
19808
19809fi
19810
19811# After basic tools have been setup, we can check build os specific details.
19812
19813  ###############################################################################
19814
19815  # Note that this is the build platform OS version!
19816
19817  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19818  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19819  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19820  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19821
19822
19823
19824
19825
19826# Setup builddeps, for automatic downloading of tools we need.
19827# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19828# boot-jdk setup, but we need to have basic tools setup first.
19829
19830
19831# Check whether --with-builddeps-conf was given.
19832if test "${with_builddeps_conf+set}" = set; then :
19833  withval=$with_builddeps_conf;
19834fi
19835
19836
19837
19838# Check whether --with-builddeps-server was given.
19839if test "${with_builddeps_server+set}" = set; then :
19840  withval=$with_builddeps_server;
19841fi
19842
19843
19844
19845# Check whether --with-builddeps-dir was given.
19846if test "${with_builddeps_dir+set}" = set; then :
19847  withval=$with_builddeps_dir;
19848else
19849  with_builddeps_dir=/localhome/builddeps
19850fi
19851
19852
19853
19854# Check whether --with-builddeps-group was given.
19855if test "${with_builddeps_group+set}" = set; then :
19856  withval=$with_builddeps_group;
19857fi
19858
19859
19860
19861
19862  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19863    if test "x$with_builddeps_conf" != x; then
19864      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19865$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19866      builddepsfile=$with_builddeps_conf
19867      if test -s $builddepsfile; then
19868        . $builddepsfile
19869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19870$as_echo "loaded!" >&6; }
19871      else
19872        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19873      fi
19874    else
19875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19876$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19877      builddepsfile=`mktemp`
19878      touch $builddepsfile
19879      # Put all found confs into a single file.
19880      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19881      # Source the file to acquire the variables
19882      if test -s $builddepsfile; then
19883        . $builddepsfile
19884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19885$as_echo "found at least one!" >&6; }
19886      else
19887        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19888      fi
19889    fi
19890    # Create build and target names that use _ instead of "-" and ".".
19891    # This is necessary to use them in variable names.
19892    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19893    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19894    # Extract rewrite information for build and target
19895    eval rewritten_build=\${REWRITE_${build_var}}
19896    if test "x$rewritten_build" = x; then
19897      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19898      echo Build stays the same $rewritten_build
19899    else
19900      echo Rewriting build for builddeps into $rewritten_build
19901    fi
19902    eval rewritten_target=\${REWRITE_${target_var}}
19903    if test "x$rewritten_target" = x; then
19904      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19905      echo Target stays the same $rewritten_target
19906    else
19907      echo Rewriting target for builddeps into $rewritten_target
19908    fi
19909    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19910    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19911  fi
19912  for ac_prog in 7z unzip
19913do
19914  # Extract the first word of "$ac_prog", so it can be a program name with args.
19915set dummy $ac_prog; ac_word=$2
19916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19917$as_echo_n "checking for $ac_word... " >&6; }
19918if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19919  $as_echo_n "(cached) " >&6
19920else
19921  if test -n "$BDEPS_UNZIP"; then
19922  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19923else
19924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19925for as_dir in $PATH
19926do
19927  IFS=$as_save_IFS
19928  test -z "$as_dir" && as_dir=.
19929    for ac_exec_ext in '' $ac_executable_extensions; do
19930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19931    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19933    break 2
19934  fi
19935done
19936  done
19937IFS=$as_save_IFS
19938
19939fi
19940fi
19941BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19942if test -n "$BDEPS_UNZIP"; then
19943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19944$as_echo "$BDEPS_UNZIP" >&6; }
19945else
19946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19947$as_echo "no" >&6; }
19948fi
19949
19950
19951  test -n "$BDEPS_UNZIP" && break
19952done
19953
19954  if test "x$BDEPS_UNZIP" = x7z; then
19955    BDEPS_UNZIP="7z x"
19956  fi
19957
19958  for ac_prog in wget lftp ftp
19959do
19960  # Extract the first word of "$ac_prog", so it can be a program name with args.
19961set dummy $ac_prog; ac_word=$2
19962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19963$as_echo_n "checking for $ac_word... " >&6; }
19964if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19965  $as_echo_n "(cached) " >&6
19966else
19967  if test -n "$BDEPS_FTP"; then
19968  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19969else
19970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19971for as_dir in $PATH
19972do
19973  IFS=$as_save_IFS
19974  test -z "$as_dir" && as_dir=.
19975    for ac_exec_ext in '' $ac_executable_extensions; do
19976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19977    ac_cv_prog_BDEPS_FTP="$ac_prog"
19978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19979    break 2
19980  fi
19981done
19982  done
19983IFS=$as_save_IFS
19984
19985fi
19986fi
19987BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19988if test -n "$BDEPS_FTP"; then
19989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19990$as_echo "$BDEPS_FTP" >&6; }
19991else
19992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19993$as_echo "no" >&6; }
19994fi
19995
19996
19997  test -n "$BDEPS_FTP" && break
19998done
19999
20000
20001
20002###############################################################################
20003#
20004# Determine OpenJDK variants, options and version numbers.
20005#
20006###############################################################################
20007
20008# We need build & target for this.
20009
20010
20011  ###############################################################################
20012  #
20013  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20014  # We always build headless support.
20015  #
20016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20017$as_echo_n "checking headful support... " >&6; }
20018  # Check whether --enable-headful was given.
20019if test "${enable_headful+set}" = set; then :
20020  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20021else
20022  SUPPORT_HEADFUL=yes
20023fi
20024
20025
20026  SUPPORT_HEADLESS=yes
20027  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20028
20029  if test "x$SUPPORT_HEADFUL" = xyes; then
20030    # We are building both headful and headless.
20031    headful_msg="include support for both headful and headless"
20032  fi
20033
20034  if test "x$SUPPORT_HEADFUL" = xno; then
20035    # Thus we are building headless only.
20036    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20037    headful_msg="headless only"
20038  fi
20039
20040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20041$as_echo "$headful_msg" >&6; }
20042
20043
20044
20045
20046
20047  # Control wether Hotspot runs Queens test after build.
20048  # Check whether --enable-hotspot-test-in-build was given.
20049if test "${enable_hotspot_test_in_build+set}" = set; then :
20050  enableval=$enable_hotspot_test_in_build;
20051else
20052  enable_hotspot_test_in_build=no
20053fi
20054
20055  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20056    TEST_IN_BUILD=true
20057  else
20058    TEST_IN_BUILD=false
20059  fi
20060
20061
20062  ###############################################################################
20063  #
20064  # Choose cacerts source file
20065  #
20066
20067# Check whether --with-cacerts-file was given.
20068if test "${with_cacerts_file+set}" = set; then :
20069  withval=$with_cacerts_file;
20070fi
20071
20072  if test "x$with_cacerts_file" != x; then
20073    CACERTS_FILE=$with_cacerts_file
20074  fi
20075
20076
20077  ###############################################################################
20078  #
20079  # Enable or disable unlimited crypto
20080  #
20081  # Check whether --enable-unlimited-crypto was given.
20082if test "${enable_unlimited_crypto+set}" = set; then :
20083  enableval=$enable_unlimited_crypto;
20084else
20085  enable_unlimited_crypto=no
20086fi
20087
20088  if test "x$enable_unlimited_crypto" = "xyes"; then
20089    UNLIMITED_CRYPTO=true
20090  else
20091    UNLIMITED_CRYPTO=false
20092  fi
20093
20094
20095  ###############################################################################
20096  #
20097  # Enable or disable the elliptic curve crypto implementation
20098  #
20099
20100
20101  ###############################################################################
20102  #
20103  # --enable-rmiconnector-iiop
20104  #
20105  # Check whether --enable-rmiconnector-iiop was given.
20106if test "${enable_rmiconnector_iiop+set}" = set; then :
20107  enableval=$enable_rmiconnector_iiop;
20108fi
20109
20110  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20111    RMICONNECTOR_IIOP=true
20112  else
20113    RMICONNECTOR_IIOP=false
20114  fi
20115
20116
20117  ###############################################################################
20118  #
20119  # Compress jars
20120  #
20121  COMPRESS_JARS=false
20122
20123
20124
20125
20126  # Source the version numbers
20127  . $AUTOCONF_DIR/version-numbers
20128
20129  # Get the settings from parameters
20130
20131# Check whether --with-milestone was given.
20132if test "${with_milestone+set}" = set; then :
20133  withval=$with_milestone;
20134fi
20135
20136  if test "x$with_milestone" = xyes; then
20137    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20138  elif test "x$with_milestone" != x; then
20139    MILESTONE="$with_milestone"
20140  fi
20141  if test "x$MILESTONE" = x; then
20142    MILESTONE=internal
20143  fi
20144
20145
20146# Check whether --with-update-version was given.
20147if test "${with_update_version+set}" = set; then :
20148  withval=$with_update_version;
20149fi
20150
20151  if test "x$with_update_version" = xyes; then
20152    as_fn_error $? "Update version must have a value" "$LINENO" 5
20153  elif test "x$with_update_version" != x; then
20154    JDK_UPDATE_VERSION="$with_update_version"
20155    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20156    # to a bug in expr (which reduces it to just X). To work around this, we
20157    # always add a 0 to one digit update versions.
20158    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20159      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20160    fi
20161  fi
20162
20163
20164# Check whether --with-user-release-suffix was given.
20165if test "${with_user_release_suffix+set}" = set; then :
20166  withval=$with_user_release_suffix;
20167fi
20168
20169  if test "x$with_user_release_suffix" = xyes; then
20170    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20171  elif test "x$with_user_release_suffix" != x; then
20172    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20173  fi
20174
20175
20176# Check whether --with-build-number was given.
20177if test "${with_build_number+set}" = set; then :
20178  withval=$with_build_number;
20179fi
20180
20181  if test "x$with_build_number" = xyes; then
20182    as_fn_error $? "Build number must have a value" "$LINENO" 5
20183  elif test "x$with_build_number" != x; then
20184    JDK_BUILD_NUMBER="$with_build_number"
20185  fi
20186  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20187  if test "x$JDK_BUILD_NUMBER" = x; then
20188    JDK_BUILD_NUMBER=b00
20189    if test "x$USER_RELEASE_SUFFIX" = x; then
20190      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20191      # Avoid [:alnum:] since it depends on the locale.
20192      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20193      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20194    fi
20195  fi
20196
20197  # Now set the JDK version, milestone, build number etc.
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214# Check whether --with-copyright-year was given.
20215if test "${with_copyright_year+set}" = set; then :
20216  withval=$with_copyright_year;
20217fi
20218
20219  if test "x$with_copyright_year" = xyes; then
20220    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20221  elif test "x$with_copyright_year" != x; then
20222    COPYRIGHT_YEAR="$with_copyright_year"
20223  else
20224    COPYRIGHT_YEAR=`date +'%Y'`
20225  fi
20226
20227
20228  if test "x$JDK_UPDATE_VERSION" != x; then
20229    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20230  else
20231    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20232  fi
20233
20234
20235  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20236
20237
20238
20239###############################################################################
20240#
20241# Setup BootJDK, used to bootstrap the build.
20242#
20243###############################################################################
20244
20245
20246  BOOT_JDK_FOUND=no
20247
20248# Check whether --with-boot-jdk was given.
20249if test "${with_boot_jdk+set}" = set; then :
20250  withval=$with_boot_jdk;
20251fi
20252
20253
20254  # We look for the Boot JDK through various means, going from more certain to
20255  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20256  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20257  # must check if this is indeed valid; otherwise we'll continue looking.
20258
20259  # Test: Is bootjdk explicitely set by command line arguments?
20260
20261  if test "x$BOOT_JDK_FOUND" = xno; then
20262    # Now execute the test
20263
20264  if test "x$with_boot_jdk" != x; then
20265    BOOT_JDK=$with_boot_jdk
20266    BOOT_JDK_FOUND=maybe
20267    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20268$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20269  fi
20270
20271
20272    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20273    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20274      # Do we have a bin/java?
20275      if test ! -x "$BOOT_JDK/bin/java"; then
20276        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20278        BOOT_JDK_FOUND=no
20279      else
20280        # Do we have a bin/javac?
20281        if test ! -x "$BOOT_JDK/bin/javac"; then
20282          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20284          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20285$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20286          BOOT_JDK_FOUND=no
20287        else
20288          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20289          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20290
20291          # Extra M4 quote needed to protect [] in grep expression.
20292          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20293          if test "x$FOUND_CORRECT_VERSION" = x; then
20294            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20296            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20297$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20298            BOOT_JDK_FOUND=no
20299          else
20300            # We're done! :-)
20301            BOOT_JDK_FOUND=yes
20302
20303  # Only process if variable expands to non-empty
20304
20305  if test "x$BOOT_JDK" != x; then
20306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20307
20308  # Input might be given as Windows format, start by converting to
20309  # unix format.
20310  path="$BOOT_JDK"
20311  new_path=`$CYGPATH -u "$path"`
20312
20313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20316  # "foo.exe" is OK but "foo" is an error.
20317  #
20318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20319  # It is also a way to make sure we got the proper file name for the real test later on.
20320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20321  if test "x$test_shortpath" = x; then
20322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20324    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20325  fi
20326
20327  # Call helper function which possibly converts this using DOS-style short mode.
20328  # If so, the updated path is stored in $new_path.
20329
20330  input_path="$new_path"
20331  # Check if we need to convert this using DOS-style short mode. If the path
20332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20333  # take no chances and rewrite it.
20334  # Note: m4 eats our [], so we need to use [ and ] instead.
20335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20336  if test "x$has_forbidden_chars" != x; then
20337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20341      # Going to short mode and back again did indeed matter. Since short mode is
20342      # case insensitive, let's make it lowercase to improve readability.
20343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20344      # Now convert it back to Unix-style (cygpath)
20345      input_path=`$CYGPATH -u "$shortmode_path"`
20346      new_path="$input_path"
20347    fi
20348  fi
20349
20350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20351  if test "x$test_cygdrive_prefix" = x; then
20352    # As a simple fix, exclude /usr/bin since it's not a real path.
20353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20355      # a path prefixed by /cygdrive for fixpath to work.
20356      new_path="$CYGWIN_ROOT_PATH$input_path"
20357    fi
20358  fi
20359
20360
20361  if test "x$path" != "x$new_path"; then
20362    BOOT_JDK="$new_path"
20363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20365  fi
20366
20367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20368
20369  path="$BOOT_JDK"
20370  has_colon=`$ECHO $path | $GREP ^.:`
20371  new_path="$path"
20372  if test "x$has_colon" = x; then
20373    # Not in mixed or Windows style, start by that.
20374    new_path=`cmd //c echo $path`
20375  fi
20376
20377
20378  input_path="$new_path"
20379  # Check if we need to convert this using DOS-style short mode. If the path
20380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20381  # take no chances and rewrite it.
20382  # Note: m4 eats our [], so we need to use [ and ] instead.
20383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20384  if test "x$has_forbidden_chars" != x; then
20385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20387  fi
20388
20389
20390  windows_path="$new_path"
20391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20392    unix_path=`$CYGPATH -u "$windows_path"`
20393    new_path="$unix_path"
20394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20396    new_path="$unix_path"
20397  fi
20398
20399  if test "x$path" != "x$new_path"; then
20400    BOOT_JDK="$new_path"
20401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20403  fi
20404
20405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20407
20408    else
20409      # We're on a unix platform. Hooray! :)
20410      path="$BOOT_JDK"
20411      has_space=`$ECHO "$path" | $GREP " "`
20412      if test "x$has_space" != x; then
20413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20415        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20416      fi
20417
20418      # Use eval to expand a potential ~
20419      eval path="$path"
20420      if test ! -f "$path" && test ! -d "$path"; then
20421        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20422      fi
20423
20424      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20425    fi
20426  fi
20427
20428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20429$as_echo_n "checking for Boot JDK... " >&6; }
20430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20431$as_echo "$BOOT_JDK" >&6; }
20432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20433$as_echo_n "checking Boot JDK version... " >&6; }
20434            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20436$as_echo "$BOOT_JDK_VERSION" >&6; }
20437          fi # end check jdk version
20438        fi # end check javac
20439      fi # end check java
20440    fi # end check boot jdk found
20441  fi
20442
20443  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20444    # Having specified an argument which is incorrect will produce an instant failure;
20445    # we should not go on looking
20446    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20447  fi
20448
20449  # Test: Is bootjdk available from builddeps?
20450
20451  if test "x$BOOT_JDK_FOUND" = xno; then
20452    # Now execute the test
20453
20454
20455
20456  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20457    # Source the builddeps file again, to make sure it uses the latest variables!
20458    . $builddepsfile
20459    # Look for a target and build machine specific resource!
20460    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20461    if test "x$resource" = x; then
20462      # Ok, lets instead look for a target specific resource
20463      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20464    fi
20465    if test "x$resource" = x; then
20466      # Ok, lets instead look for a build specific resource
20467      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20468    fi
20469    if test "x$resource" = x; then
20470      # Ok, lets instead look for a generic resource
20471      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20472      resource=${builddep_bootjdk}
20473    fi
20474    if test "x$resource" != x; then
20475      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20476$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20477      # If the resource in the builddeps.conf file is an existing directory,
20478      # for example /java/linux/cups
20479      if test -d ${resource}; then
20480        depdir=${resource}
20481      else
20482
20483  # bootjdk is for example mymodule
20484  # $resource is for example libs/general/libmymod_1_2_3.zip
20485  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20486  # $with_builddeps_dir is for example /localhome/builddeps
20487  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20488  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20489  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20490  filename=`basename $resource`
20491  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20492  filebase=${filename%%.*}
20493  extension=${filename#*.}
20494  installdir=$with_builddeps_dir/$filebase
20495  if test ! -f $installdir/$filename.unpacked; then
20496    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20497$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20498    if test ! -d $installdir; then
20499      mkdir -p $installdir
20500    fi
20501    if test ! -d $installdir; then
20502      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20503    fi
20504    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20505    touch $tmpfile
20506    if test ! -f $tmpfile; then
20507      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20508    fi
20509
20510  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20511  # $tmpfile is the local file name for the downloaded file.
20512  VALID_TOOL=no
20513  if test "x$BDEPS_FTP" = xwget; then
20514    VALID_TOOL=yes
20515    wget -O $tmpfile $with_builddeps_server/$resource
20516  fi
20517  if test "x$BDEPS_FTP" = xlftp; then
20518    VALID_TOOL=yes
20519    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20520  fi
20521  if test "x$BDEPS_FTP" = xftp; then
20522    VALID_TOOL=yes
20523    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20524    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20525    FTPUSERPWD=${FTPSERVER%%@*}
20526    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20527      FTPUSER=${userpwd%%:*}
20528      FTPPWD=${userpwd#*@}
20529      FTPSERVER=${FTPSERVER#*@}
20530    else
20531      FTPUSER=ftp
20532      FTPPWD=ftp
20533    fi
20534    # the "pass" command does not work on some
20535    # ftp clients (read ftp.exe) but if it works,
20536    # passive mode is better!
20537    ( \
20538        echo "user $FTPUSER $FTPPWD"        ; \
20539        echo "pass"                         ; \
20540        echo "bin"                          ; \
20541        echo "get $FTPPATH $tmpfile"              ; \
20542    ) | ftp -in $FTPSERVER
20543  fi
20544  if test "x$VALID_TOOL" != xyes; then
20545    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20546  fi
20547
20548    mv $tmpfile $installdir/$filename
20549    if test ! -s $installdir/$filename; then
20550      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20551    fi
20552    case "$extension" in
20553      zip)  echo "Unzipping $installdir/$filename..."
20554        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20555        ;;
20556      tar.gz) echo "Untaring $installdir/$filename..."
20557        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20558        ;;
20559      tgz) echo "Untaring $installdir/$filename..."
20560        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20561        ;;
20562      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20563        ;;
20564    esac
20565  fi
20566  if test -f $installdir/$filename.unpacked; then
20567    depdir=$installdir
20568  fi
20569
20570      fi
20571      # Source the builddeps file again, because in the previous command, the depdir
20572      # was updated to point at the current build dependency install directory.
20573      . $builddepsfile
20574      # Now extract variables from the builddeps.conf files.
20575      theroot=${builddep_bootjdk_ROOT}
20576      thecflags=${builddep_bootjdk_CFLAGS}
20577      thelibs=${builddep_bootjdk_LIBS}
20578      if test "x$depdir" = x; then
20579        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20580      fi
20581      BOOT_JDK=$depdir
20582      if test "x$theroot" != x; then
20583        BOOT_JDK="$theroot"
20584      fi
20585      if test "x$thecflags" != x; then
20586        BOOT_JDK_CFLAGS="$thecflags"
20587      fi
20588      if test "x$thelibs" != x; then
20589        BOOT_JDK_LIBS="$thelibs"
20590      fi
20591      BOOT_JDK_FOUND=maybe
20592      else BOOT_JDK_FOUND=no
20593
20594    fi
20595    else BOOT_JDK_FOUND=no
20596
20597  fi
20598
20599
20600
20601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20603      # Do we have a bin/java?
20604      if test ! -x "$BOOT_JDK/bin/java"; then
20605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20607        BOOT_JDK_FOUND=no
20608      else
20609        # Do we have a bin/javac?
20610        if test ! -x "$BOOT_JDK/bin/javac"; then
20611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20615          BOOT_JDK_FOUND=no
20616        else
20617          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20618          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20619
20620          # Extra M4 quote needed to protect [] in grep expression.
20621          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20622          if test "x$FOUND_CORRECT_VERSION" = x; then
20623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20625            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20626$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20627            BOOT_JDK_FOUND=no
20628          else
20629            # We're done! :-)
20630            BOOT_JDK_FOUND=yes
20631
20632  # Only process if variable expands to non-empty
20633
20634  if test "x$BOOT_JDK" != x; then
20635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20636
20637  # Input might be given as Windows format, start by converting to
20638  # unix format.
20639  path="$BOOT_JDK"
20640  new_path=`$CYGPATH -u "$path"`
20641
20642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20645  # "foo.exe" is OK but "foo" is an error.
20646  #
20647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20648  # It is also a way to make sure we got the proper file name for the real test later on.
20649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20650  if test "x$test_shortpath" = x; then
20651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20654  fi
20655
20656  # Call helper function which possibly converts this using DOS-style short mode.
20657  # If so, the updated path is stored in $new_path.
20658
20659  input_path="$new_path"
20660  # Check if we need to convert this using DOS-style short mode. If the path
20661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20662  # take no chances and rewrite it.
20663  # Note: m4 eats our [], so we need to use [ and ] instead.
20664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20665  if test "x$has_forbidden_chars" != x; then
20666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20670      # Going to short mode and back again did indeed matter. Since short mode is
20671      # case insensitive, let's make it lowercase to improve readability.
20672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20673      # Now convert it back to Unix-style (cygpath)
20674      input_path=`$CYGPATH -u "$shortmode_path"`
20675      new_path="$input_path"
20676    fi
20677  fi
20678
20679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20680  if test "x$test_cygdrive_prefix" = x; then
20681    # As a simple fix, exclude /usr/bin since it's not a real path.
20682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20684      # a path prefixed by /cygdrive for fixpath to work.
20685      new_path="$CYGWIN_ROOT_PATH$input_path"
20686    fi
20687  fi
20688
20689
20690  if test "x$path" != "x$new_path"; then
20691    BOOT_JDK="$new_path"
20692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20694  fi
20695
20696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20697
20698  path="$BOOT_JDK"
20699  has_colon=`$ECHO $path | $GREP ^.:`
20700  new_path="$path"
20701  if test "x$has_colon" = x; then
20702    # Not in mixed or Windows style, start by that.
20703    new_path=`cmd //c echo $path`
20704  fi
20705
20706
20707  input_path="$new_path"
20708  # Check if we need to convert this using DOS-style short mode. If the path
20709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20710  # take no chances and rewrite it.
20711  # Note: m4 eats our [], so we need to use [ and ] instead.
20712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20713  if test "x$has_forbidden_chars" != x; then
20714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20716  fi
20717
20718
20719  windows_path="$new_path"
20720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20721    unix_path=`$CYGPATH -u "$windows_path"`
20722    new_path="$unix_path"
20723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20725    new_path="$unix_path"
20726  fi
20727
20728  if test "x$path" != "x$new_path"; then
20729    BOOT_JDK="$new_path"
20730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20732  fi
20733
20734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20736
20737    else
20738      # We're on a unix platform. Hooray! :)
20739      path="$BOOT_JDK"
20740      has_space=`$ECHO "$path" | $GREP " "`
20741      if test "x$has_space" != x; then
20742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20745      fi
20746
20747      # Use eval to expand a potential ~
20748      eval path="$path"
20749      if test ! -f "$path" && test ! -d "$path"; then
20750        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20751      fi
20752
20753      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20754    fi
20755  fi
20756
20757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20758$as_echo_n "checking for Boot JDK... " >&6; }
20759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20760$as_echo "$BOOT_JDK" >&6; }
20761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20762$as_echo_n "checking Boot JDK version... " >&6; }
20763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20765$as_echo "$BOOT_JDK_VERSION" >&6; }
20766          fi # end check jdk version
20767        fi # end check javac
20768      fi # end check java
20769    fi # end check boot jdk found
20770  fi
20771
20772
20773  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20774
20775  if test "x$BOOT_JDK_FOUND" = xno; then
20776    # Now execute the test
20777
20778  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20779    # First check at user selected default
20780
20781  if test "x$BOOT_JDK_FOUND" = xno; then
20782    # Now execute the test
20783
20784  if test -x /usr/libexec/java_home; then
20785    BOOT_JDK=`/usr/libexec/java_home `
20786    BOOT_JDK_FOUND=maybe
20787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20788$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20789  fi
20790
20791
20792    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20793    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20794      # Do we have a bin/java?
20795      if test ! -x "$BOOT_JDK/bin/java"; then
20796        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20798        BOOT_JDK_FOUND=no
20799      else
20800        # Do we have a bin/javac?
20801        if test ! -x "$BOOT_JDK/bin/javac"; then
20802          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20804          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20805$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20806          BOOT_JDK_FOUND=no
20807        else
20808          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20809          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20810
20811          # Extra M4 quote needed to protect [] in grep expression.
20812          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20813          if test "x$FOUND_CORRECT_VERSION" = x; then
20814            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20816            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20817$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20818            BOOT_JDK_FOUND=no
20819          else
20820            # We're done! :-)
20821            BOOT_JDK_FOUND=yes
20822
20823  # Only process if variable expands to non-empty
20824
20825  if test "x$BOOT_JDK" != x; then
20826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20827
20828  # Input might be given as Windows format, start by converting to
20829  # unix format.
20830  path="$BOOT_JDK"
20831  new_path=`$CYGPATH -u "$path"`
20832
20833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20836  # "foo.exe" is OK but "foo" is an error.
20837  #
20838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20839  # It is also a way to make sure we got the proper file name for the real test later on.
20840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20841  if test "x$test_shortpath" = x; then
20842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20845  fi
20846
20847  # Call helper function which possibly converts this using DOS-style short mode.
20848  # If so, the updated path is stored in $new_path.
20849
20850  input_path="$new_path"
20851  # Check if we need to convert this using DOS-style short mode. If the path
20852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20853  # take no chances and rewrite it.
20854  # Note: m4 eats our [], so we need to use [ and ] instead.
20855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20856  if test "x$has_forbidden_chars" != x; then
20857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20861      # Going to short mode and back again did indeed matter. Since short mode is
20862      # case insensitive, let's make it lowercase to improve readability.
20863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20864      # Now convert it back to Unix-style (cygpath)
20865      input_path=`$CYGPATH -u "$shortmode_path"`
20866      new_path="$input_path"
20867    fi
20868  fi
20869
20870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20871  if test "x$test_cygdrive_prefix" = x; then
20872    # As a simple fix, exclude /usr/bin since it's not a real path.
20873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20875      # a path prefixed by /cygdrive for fixpath to work.
20876      new_path="$CYGWIN_ROOT_PATH$input_path"
20877    fi
20878  fi
20879
20880
20881  if test "x$path" != "x$new_path"; then
20882    BOOT_JDK="$new_path"
20883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20885  fi
20886
20887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20888
20889  path="$BOOT_JDK"
20890  has_colon=`$ECHO $path | $GREP ^.:`
20891  new_path="$path"
20892  if test "x$has_colon" = x; then
20893    # Not in mixed or Windows style, start by that.
20894    new_path=`cmd //c echo $path`
20895  fi
20896
20897
20898  input_path="$new_path"
20899  # Check if we need to convert this using DOS-style short mode. If the path
20900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20901  # take no chances and rewrite it.
20902  # Note: m4 eats our [], so we need to use [ and ] instead.
20903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20904  if test "x$has_forbidden_chars" != x; then
20905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20907  fi
20908
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919  if test "x$path" != "x$new_path"; then
20920    BOOT_JDK="$new_path"
20921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20923  fi
20924
20925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20927
20928    else
20929      # We're on a unix platform. Hooray! :)
20930      path="$BOOT_JDK"
20931      has_space=`$ECHO "$path" | $GREP " "`
20932      if test "x$has_space" != x; then
20933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20936      fi
20937
20938      # Use eval to expand a potential ~
20939      eval path="$path"
20940      if test ! -f "$path" && test ! -d "$path"; then
20941        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20942      fi
20943
20944      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20945    fi
20946  fi
20947
20948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20949$as_echo_n "checking for Boot JDK... " >&6; }
20950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20951$as_echo "$BOOT_JDK" >&6; }
20952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20953$as_echo_n "checking Boot JDK version... " >&6; }
20954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20956$as_echo "$BOOT_JDK_VERSION" >&6; }
20957          fi # end check jdk version
20958        fi # end check javac
20959      fi # end check java
20960    fi # end check boot jdk found
20961  fi
20962
20963    # If that did not work out (e.g. too old), try explicit versions instead
20964
20965  if test "x$BOOT_JDK_FOUND" = xno; then
20966    # Now execute the test
20967
20968  if test -x /usr/libexec/java_home; then
20969    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20970    BOOT_JDK_FOUND=maybe
20971    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20972$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20973  fi
20974
20975
20976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20978      # Do we have a bin/java?
20979      if test ! -x "$BOOT_JDK/bin/java"; then
20980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20982        BOOT_JDK_FOUND=no
20983      else
20984        # Do we have a bin/javac?
20985        if test ! -x "$BOOT_JDK/bin/javac"; then
20986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20990          BOOT_JDK_FOUND=no
20991        else
20992          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20993          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20994
20995          # Extra M4 quote needed to protect [] in grep expression.
20996          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20997          if test "x$FOUND_CORRECT_VERSION" = x; then
20998            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21000            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21001$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21002            BOOT_JDK_FOUND=no
21003          else
21004            # We're done! :-)
21005            BOOT_JDK_FOUND=yes
21006
21007  # Only process if variable expands to non-empty
21008
21009  if test "x$BOOT_JDK" != x; then
21010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21011
21012  # Input might be given as Windows format, start by converting to
21013  # unix format.
21014  path="$BOOT_JDK"
21015  new_path=`$CYGPATH -u "$path"`
21016
21017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21020  # "foo.exe" is OK but "foo" is an error.
21021  #
21022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21023  # It is also a way to make sure we got the proper file name for the real test later on.
21024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21025  if test "x$test_shortpath" = x; then
21026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21029  fi
21030
21031  # Call helper function which possibly converts this using DOS-style short mode.
21032  # If so, the updated path is stored in $new_path.
21033
21034  input_path="$new_path"
21035  # Check if we need to convert this using DOS-style short mode. If the path
21036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21037  # take no chances and rewrite it.
21038  # Note: m4 eats our [], so we need to use [ and ] instead.
21039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21040  if test "x$has_forbidden_chars" != x; then
21041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21045      # Going to short mode and back again did indeed matter. Since short mode is
21046      # case insensitive, let's make it lowercase to improve readability.
21047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21048      # Now convert it back to Unix-style (cygpath)
21049      input_path=`$CYGPATH -u "$shortmode_path"`
21050      new_path="$input_path"
21051    fi
21052  fi
21053
21054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21055  if test "x$test_cygdrive_prefix" = x; then
21056    # As a simple fix, exclude /usr/bin since it's not a real path.
21057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21059      # a path prefixed by /cygdrive for fixpath to work.
21060      new_path="$CYGWIN_ROOT_PATH$input_path"
21061    fi
21062  fi
21063
21064
21065  if test "x$path" != "x$new_path"; then
21066    BOOT_JDK="$new_path"
21067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21069  fi
21070
21071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21072
21073  path="$BOOT_JDK"
21074  has_colon=`$ECHO $path | $GREP ^.:`
21075  new_path="$path"
21076  if test "x$has_colon" = x; then
21077    # Not in mixed or Windows style, start by that.
21078    new_path=`cmd //c echo $path`
21079  fi
21080
21081
21082  input_path="$new_path"
21083  # Check if we need to convert this using DOS-style short mode. If the path
21084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21085  # take no chances and rewrite it.
21086  # Note: m4 eats our [], so we need to use [ and ] instead.
21087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21088  if test "x$has_forbidden_chars" != x; then
21089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21091  fi
21092
21093
21094  windows_path="$new_path"
21095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21096    unix_path=`$CYGPATH -u "$windows_path"`
21097    new_path="$unix_path"
21098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21100    new_path="$unix_path"
21101  fi
21102
21103  if test "x$path" != "x$new_path"; then
21104    BOOT_JDK="$new_path"
21105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21107  fi
21108
21109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21111
21112    else
21113      # We're on a unix platform. Hooray! :)
21114      path="$BOOT_JDK"
21115      has_space=`$ECHO "$path" | $GREP " "`
21116      if test "x$has_space" != x; then
21117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21120      fi
21121
21122      # Use eval to expand a potential ~
21123      eval path="$path"
21124      if test ! -f "$path" && test ! -d "$path"; then
21125        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21126      fi
21127
21128      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21129    fi
21130  fi
21131
21132            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21133$as_echo_n "checking for Boot JDK... " >&6; }
21134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21135$as_echo "$BOOT_JDK" >&6; }
21136            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21137$as_echo_n "checking Boot JDK version... " >&6; }
21138            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21140$as_echo "$BOOT_JDK_VERSION" >&6; }
21141          fi # end check jdk version
21142        fi # end check javac
21143      fi # end check java
21144    fi # end check boot jdk found
21145  fi
21146
21147
21148  if test "x$BOOT_JDK_FOUND" = xno; then
21149    # Now execute the test
21150
21151  if test -x /usr/libexec/java_home; then
21152    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21153    BOOT_JDK_FOUND=maybe
21154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21155$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21156  fi
21157
21158
21159    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21160    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21161      # Do we have a bin/java?
21162      if test ! -x "$BOOT_JDK/bin/java"; then
21163        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21165        BOOT_JDK_FOUND=no
21166      else
21167        # Do we have a bin/javac?
21168        if test ! -x "$BOOT_JDK/bin/javac"; then
21169          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21171          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21172$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21173          BOOT_JDK_FOUND=no
21174        else
21175          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21176          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21177
21178          # Extra M4 quote needed to protect [] in grep expression.
21179          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21180          if test "x$FOUND_CORRECT_VERSION" = x; then
21181            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21183            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21184$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21185            BOOT_JDK_FOUND=no
21186          else
21187            # We're done! :-)
21188            BOOT_JDK_FOUND=yes
21189
21190  # Only process if variable expands to non-empty
21191
21192  if test "x$BOOT_JDK" != x; then
21193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21194
21195  # Input might be given as Windows format, start by converting to
21196  # unix format.
21197  path="$BOOT_JDK"
21198  new_path=`$CYGPATH -u "$path"`
21199
21200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21203  # "foo.exe" is OK but "foo" is an error.
21204  #
21205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21206  # It is also a way to make sure we got the proper file name for the real test later on.
21207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21208  if test "x$test_shortpath" = x; then
21209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21211    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21212  fi
21213
21214  # Call helper function which possibly converts this using DOS-style short mode.
21215  # If so, the updated path is stored in $new_path.
21216
21217  input_path="$new_path"
21218  # Check if we need to convert this using DOS-style short mode. If the path
21219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21220  # take no chances and rewrite it.
21221  # Note: m4 eats our [], so we need to use [ and ] instead.
21222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21223  if test "x$has_forbidden_chars" != x; then
21224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21228      # Going to short mode and back again did indeed matter. Since short mode is
21229      # case insensitive, let's make it lowercase to improve readability.
21230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21231      # Now convert it back to Unix-style (cygpath)
21232      input_path=`$CYGPATH -u "$shortmode_path"`
21233      new_path="$input_path"
21234    fi
21235  fi
21236
21237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21238  if test "x$test_cygdrive_prefix" = x; then
21239    # As a simple fix, exclude /usr/bin since it's not a real path.
21240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21242      # a path prefixed by /cygdrive for fixpath to work.
21243      new_path="$CYGWIN_ROOT_PATH$input_path"
21244    fi
21245  fi
21246
21247
21248  if test "x$path" != "x$new_path"; then
21249    BOOT_JDK="$new_path"
21250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21252  fi
21253
21254    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21255
21256  path="$BOOT_JDK"
21257  has_colon=`$ECHO $path | $GREP ^.:`
21258  new_path="$path"
21259  if test "x$has_colon" = x; then
21260    # Not in mixed or Windows style, start by that.
21261    new_path=`cmd //c echo $path`
21262  fi
21263
21264
21265  input_path="$new_path"
21266  # Check if we need to convert this using DOS-style short mode. If the path
21267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21268  # take no chances and rewrite it.
21269  # Note: m4 eats our [], so we need to use [ and ] instead.
21270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21271  if test "x$has_forbidden_chars" != x; then
21272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21274  fi
21275
21276
21277  windows_path="$new_path"
21278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21279    unix_path=`$CYGPATH -u "$windows_path"`
21280    new_path="$unix_path"
21281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21283    new_path="$unix_path"
21284  fi
21285
21286  if test "x$path" != "x$new_path"; then
21287    BOOT_JDK="$new_path"
21288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21290  fi
21291
21292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21294
21295    else
21296      # We're on a unix platform. Hooray! :)
21297      path="$BOOT_JDK"
21298      has_space=`$ECHO "$path" | $GREP " "`
21299      if test "x$has_space" != x; then
21300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21302        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21303      fi
21304
21305      # Use eval to expand a potential ~
21306      eval path="$path"
21307      if test ! -f "$path" && test ! -d "$path"; then
21308        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21309      fi
21310
21311      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21312    fi
21313  fi
21314
21315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21316$as_echo_n "checking for Boot JDK... " >&6; }
21317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21318$as_echo "$BOOT_JDK" >&6; }
21319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21320$as_echo_n "checking Boot JDK version... " >&6; }
21321            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21323$as_echo "$BOOT_JDK_VERSION" >&6; }
21324          fi # end check jdk version
21325        fi # end check javac
21326      fi # end check java
21327    fi # end check boot jdk found
21328  fi
21329
21330
21331  if test "x$BOOT_JDK_FOUND" = xno; then
21332    # Now execute the test
21333
21334  if test -x /usr/libexec/java_home; then
21335    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21336    BOOT_JDK_FOUND=maybe
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21338$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21339  fi
21340
21341
21342    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21343    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21344      # Do we have a bin/java?
21345      if test ! -x "$BOOT_JDK/bin/java"; then
21346        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21348        BOOT_JDK_FOUND=no
21349      else
21350        # Do we have a bin/javac?
21351        if test ! -x "$BOOT_JDK/bin/javac"; then
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21355$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21356          BOOT_JDK_FOUND=no
21357        else
21358          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21359          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21360
21361          # Extra M4 quote needed to protect [] in grep expression.
21362          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21363          if test "x$FOUND_CORRECT_VERSION" = x; then
21364            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21366            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21367$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21368            BOOT_JDK_FOUND=no
21369          else
21370            # We're done! :-)
21371            BOOT_JDK_FOUND=yes
21372
21373  # Only process if variable expands to non-empty
21374
21375  if test "x$BOOT_JDK" != x; then
21376    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21377
21378  # Input might be given as Windows format, start by converting to
21379  # unix format.
21380  path="$BOOT_JDK"
21381  new_path=`$CYGPATH -u "$path"`
21382
21383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21386  # "foo.exe" is OK but "foo" is an error.
21387  #
21388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21389  # It is also a way to make sure we got the proper file name for the real test later on.
21390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21391  if test "x$test_shortpath" = x; then
21392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21394    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21395  fi
21396
21397  # Call helper function which possibly converts this using DOS-style short mode.
21398  # If so, the updated path is stored in $new_path.
21399
21400  input_path="$new_path"
21401  # Check if we need to convert this using DOS-style short mode. If the path
21402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21403  # take no chances and rewrite it.
21404  # Note: m4 eats our [], so we need to use [ and ] instead.
21405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21406  if test "x$has_forbidden_chars" != x; then
21407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21411      # Going to short mode and back again did indeed matter. Since short mode is
21412      # case insensitive, let's make it lowercase to improve readability.
21413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21414      # Now convert it back to Unix-style (cygpath)
21415      input_path=`$CYGPATH -u "$shortmode_path"`
21416      new_path="$input_path"
21417    fi
21418  fi
21419
21420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21421  if test "x$test_cygdrive_prefix" = x; then
21422    # As a simple fix, exclude /usr/bin since it's not a real path.
21423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21425      # a path prefixed by /cygdrive for fixpath to work.
21426      new_path="$CYGWIN_ROOT_PATH$input_path"
21427    fi
21428  fi
21429
21430
21431  if test "x$path" != "x$new_path"; then
21432    BOOT_JDK="$new_path"
21433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21435  fi
21436
21437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21438
21439  path="$BOOT_JDK"
21440  has_colon=`$ECHO $path | $GREP ^.:`
21441  new_path="$path"
21442  if test "x$has_colon" = x; then
21443    # Not in mixed or Windows style, start by that.
21444    new_path=`cmd //c echo $path`
21445  fi
21446
21447
21448  input_path="$new_path"
21449  # Check if we need to convert this using DOS-style short mode. If the path
21450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21451  # take no chances and rewrite it.
21452  # Note: m4 eats our [], so we need to use [ and ] instead.
21453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21454  if test "x$has_forbidden_chars" != x; then
21455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21457  fi
21458
21459
21460  windows_path="$new_path"
21461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21462    unix_path=`$CYGPATH -u "$windows_path"`
21463    new_path="$unix_path"
21464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21466    new_path="$unix_path"
21467  fi
21468
21469  if test "x$path" != "x$new_path"; then
21470    BOOT_JDK="$new_path"
21471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21473  fi
21474
21475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21477
21478    else
21479      # We're on a unix platform. Hooray! :)
21480      path="$BOOT_JDK"
21481      has_space=`$ECHO "$path" | $GREP " "`
21482      if test "x$has_space" != x; then
21483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21485        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21486      fi
21487
21488      # Use eval to expand a potential ~
21489      eval path="$path"
21490      if test ! -f "$path" && test ! -d "$path"; then
21491        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21492      fi
21493
21494      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21495    fi
21496  fi
21497
21498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21499$as_echo_n "checking for Boot JDK... " >&6; }
21500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21501$as_echo "$BOOT_JDK" >&6; }
21502            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21503$as_echo_n "checking Boot JDK version... " >&6; }
21504            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21506$as_echo "$BOOT_JDK_VERSION" >&6; }
21507          fi # end check jdk version
21508        fi # end check javac
21509      fi # end check java
21510    fi # end check boot jdk found
21511  fi
21512
21513  fi
21514
21515
21516    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21517    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21518      # Do we have a bin/java?
21519      if test ! -x "$BOOT_JDK/bin/java"; then
21520        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21522        BOOT_JDK_FOUND=no
21523      else
21524        # Do we have a bin/javac?
21525        if test ! -x "$BOOT_JDK/bin/javac"; then
21526          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21528          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21529$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21530          BOOT_JDK_FOUND=no
21531        else
21532          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21533          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21534
21535          # Extra M4 quote needed to protect [] in grep expression.
21536          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21537          if test "x$FOUND_CORRECT_VERSION" = x; then
21538            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21540            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21542            BOOT_JDK_FOUND=no
21543          else
21544            # We're done! :-)
21545            BOOT_JDK_FOUND=yes
21546
21547  # Only process if variable expands to non-empty
21548
21549  if test "x$BOOT_JDK" != x; then
21550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21551
21552  # Input might be given as Windows format, start by converting to
21553  # unix format.
21554  path="$BOOT_JDK"
21555  new_path=`$CYGPATH -u "$path"`
21556
21557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21560  # "foo.exe" is OK but "foo" is an error.
21561  #
21562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21563  # It is also a way to make sure we got the proper file name for the real test later on.
21564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21565  if test "x$test_shortpath" = x; then
21566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21569  fi
21570
21571  # Call helper function which possibly converts this using DOS-style short mode.
21572  # If so, the updated path is stored in $new_path.
21573
21574  input_path="$new_path"
21575  # Check if we need to convert this using DOS-style short mode. If the path
21576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21577  # take no chances and rewrite it.
21578  # Note: m4 eats our [], so we need to use [ and ] instead.
21579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21580  if test "x$has_forbidden_chars" != x; then
21581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21585      # Going to short mode and back again did indeed matter. Since short mode is
21586      # case insensitive, let's make it lowercase to improve readability.
21587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21588      # Now convert it back to Unix-style (cygpath)
21589      input_path=`$CYGPATH -u "$shortmode_path"`
21590      new_path="$input_path"
21591    fi
21592  fi
21593
21594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21595  if test "x$test_cygdrive_prefix" = x; then
21596    # As a simple fix, exclude /usr/bin since it's not a real path.
21597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21599      # a path prefixed by /cygdrive for fixpath to work.
21600      new_path="$CYGWIN_ROOT_PATH$input_path"
21601    fi
21602  fi
21603
21604
21605  if test "x$path" != "x$new_path"; then
21606    BOOT_JDK="$new_path"
21607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21609  fi
21610
21611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21612
21613  path="$BOOT_JDK"
21614  has_colon=`$ECHO $path | $GREP ^.:`
21615  new_path="$path"
21616  if test "x$has_colon" = x; then
21617    # Not in mixed or Windows style, start by that.
21618    new_path=`cmd //c echo $path`
21619  fi
21620
21621
21622  input_path="$new_path"
21623  # Check if we need to convert this using DOS-style short mode. If the path
21624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21625  # take no chances and rewrite it.
21626  # Note: m4 eats our [], so we need to use [ and ] instead.
21627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21628  if test "x$has_forbidden_chars" != x; then
21629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21631  fi
21632
21633
21634  windows_path="$new_path"
21635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21636    unix_path=`$CYGPATH -u "$windows_path"`
21637    new_path="$unix_path"
21638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21640    new_path="$unix_path"
21641  fi
21642
21643  if test "x$path" != "x$new_path"; then
21644    BOOT_JDK="$new_path"
21645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21647  fi
21648
21649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21651
21652    else
21653      # We're on a unix platform. Hooray! :)
21654      path="$BOOT_JDK"
21655      has_space=`$ECHO "$path" | $GREP " "`
21656      if test "x$has_space" != x; then
21657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21659        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21660      fi
21661
21662      # Use eval to expand a potential ~
21663      eval path="$path"
21664      if test ! -f "$path" && test ! -d "$path"; then
21665        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21666      fi
21667
21668      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21669    fi
21670  fi
21671
21672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21673$as_echo_n "checking for Boot JDK... " >&6; }
21674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21675$as_echo "$BOOT_JDK" >&6; }
21676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21677$as_echo_n "checking Boot JDK version... " >&6; }
21678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21680$as_echo "$BOOT_JDK_VERSION" >&6; }
21681          fi # end check jdk version
21682        fi # end check javac
21683      fi # end check java
21684    fi # end check boot jdk found
21685  fi
21686
21687
21688  # Test: Is $JAVA_HOME set?
21689
21690  if test "x$BOOT_JDK_FOUND" = xno; then
21691    # Now execute the test
21692
21693  if test "x$JAVA_HOME" != x; then
21694    JAVA_HOME_PROCESSED="$JAVA_HOME"
21695
21696  # Only process if variable expands to non-empty
21697
21698  if test "x$JAVA_HOME_PROCESSED" != x; then
21699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21700
21701  # Input might be given as Windows format, start by converting to
21702  # unix format.
21703  path="$JAVA_HOME_PROCESSED"
21704  new_path=`$CYGPATH -u "$path"`
21705
21706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21709  # "foo.exe" is OK but "foo" is an error.
21710  #
21711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21712  # It is also a way to make sure we got the proper file name for the real test later on.
21713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21714  if test "x$test_shortpath" = x; then
21715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21716$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21717    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21718  fi
21719
21720  # Call helper function which possibly converts this using DOS-style short mode.
21721  # If so, the updated path is stored in $new_path.
21722
21723  input_path="$new_path"
21724  # Check if we need to convert this using DOS-style short mode. If the path
21725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21726  # take no chances and rewrite it.
21727  # Note: m4 eats our [], so we need to use [ and ] instead.
21728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21729  if test "x$has_forbidden_chars" != x; then
21730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21734      # Going to short mode and back again did indeed matter. Since short mode is
21735      # case insensitive, let's make it lowercase to improve readability.
21736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21737      # Now convert it back to Unix-style (cygpath)
21738      input_path=`$CYGPATH -u "$shortmode_path"`
21739      new_path="$input_path"
21740    fi
21741  fi
21742
21743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21744  if test "x$test_cygdrive_prefix" = x; then
21745    # As a simple fix, exclude /usr/bin since it's not a real path.
21746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21748      # a path prefixed by /cygdrive for fixpath to work.
21749      new_path="$CYGWIN_ROOT_PATH$input_path"
21750    fi
21751  fi
21752
21753
21754  if test "x$path" != "x$new_path"; then
21755    JAVA_HOME_PROCESSED="$new_path"
21756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21757$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21758  fi
21759
21760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21761
21762  path="$JAVA_HOME_PROCESSED"
21763  has_colon=`$ECHO $path | $GREP ^.:`
21764  new_path="$path"
21765  if test "x$has_colon" = x; then
21766    # Not in mixed or Windows style, start by that.
21767    new_path=`cmd //c echo $path`
21768  fi
21769
21770
21771  input_path="$new_path"
21772  # Check if we need to convert this using DOS-style short mode. If the path
21773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21774  # take no chances and rewrite it.
21775  # Note: m4 eats our [], so we need to use [ and ] instead.
21776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21777  if test "x$has_forbidden_chars" != x; then
21778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21780  fi
21781
21782
21783  windows_path="$new_path"
21784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21785    unix_path=`$CYGPATH -u "$windows_path"`
21786    new_path="$unix_path"
21787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21789    new_path="$unix_path"
21790  fi
21791
21792  if test "x$path" != "x$new_path"; then
21793    JAVA_HOME_PROCESSED="$new_path"
21794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21795$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21796  fi
21797
21798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21800
21801    else
21802      # We're on a unix platform. Hooray! :)
21803      path="$JAVA_HOME_PROCESSED"
21804      has_space=`$ECHO "$path" | $GREP " "`
21805      if test "x$has_space" != x; then
21806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21807$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21809      fi
21810
21811      # Use eval to expand a potential ~
21812      eval path="$path"
21813      if test ! -f "$path" && test ! -d "$path"; then
21814        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21815      fi
21816
21817      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21818    fi
21819  fi
21820
21821    if test ! -d "$JAVA_HOME_PROCESSED"; then
21822      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21823$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21824    else
21825      # Aha, the user has set a JAVA_HOME
21826      # let us use that as the Boot JDK.
21827      BOOT_JDK="$JAVA_HOME_PROCESSED"
21828      BOOT_JDK_FOUND=maybe
21829      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21830$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21831    fi
21832  fi
21833
21834
21835    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21836    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21837      # Do we have a bin/java?
21838      if test ! -x "$BOOT_JDK/bin/java"; then
21839        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21841        BOOT_JDK_FOUND=no
21842      else
21843        # Do we have a bin/javac?
21844        if test ! -x "$BOOT_JDK/bin/javac"; then
21845          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21848$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21849          BOOT_JDK_FOUND=no
21850        else
21851          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21852          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21853
21854          # Extra M4 quote needed to protect [] in grep expression.
21855          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21856          if test "x$FOUND_CORRECT_VERSION" = x; then
21857            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21859            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21860$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21861            BOOT_JDK_FOUND=no
21862          else
21863            # We're done! :-)
21864            BOOT_JDK_FOUND=yes
21865
21866  # Only process if variable expands to non-empty
21867
21868  if test "x$BOOT_JDK" != x; then
21869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21870
21871  # Input might be given as Windows format, start by converting to
21872  # unix format.
21873  path="$BOOT_JDK"
21874  new_path=`$CYGPATH -u "$path"`
21875
21876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21879  # "foo.exe" is OK but "foo" is an error.
21880  #
21881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21882  # It is also a way to make sure we got the proper file name for the real test later on.
21883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21884  if test "x$test_shortpath" = x; then
21885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21887    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21888  fi
21889
21890  # Call helper function which possibly converts this using DOS-style short mode.
21891  # If so, the updated path is stored in $new_path.
21892
21893  input_path="$new_path"
21894  # Check if we need to convert this using DOS-style short mode. If the path
21895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21896  # take no chances and rewrite it.
21897  # Note: m4 eats our [], so we need to use [ and ] instead.
21898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21899  if test "x$has_forbidden_chars" != x; then
21900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21904      # Going to short mode and back again did indeed matter. Since short mode is
21905      # case insensitive, let's make it lowercase to improve readability.
21906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21907      # Now convert it back to Unix-style (cygpath)
21908      input_path=`$CYGPATH -u "$shortmode_path"`
21909      new_path="$input_path"
21910    fi
21911  fi
21912
21913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21914  if test "x$test_cygdrive_prefix" = x; then
21915    # As a simple fix, exclude /usr/bin since it's not a real path.
21916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21918      # a path prefixed by /cygdrive for fixpath to work.
21919      new_path="$CYGWIN_ROOT_PATH$input_path"
21920    fi
21921  fi
21922
21923
21924  if test "x$path" != "x$new_path"; then
21925    BOOT_JDK="$new_path"
21926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21928  fi
21929
21930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21931
21932  path="$BOOT_JDK"
21933  has_colon=`$ECHO $path | $GREP ^.:`
21934  new_path="$path"
21935  if test "x$has_colon" = x; then
21936    # Not in mixed or Windows style, start by that.
21937    new_path=`cmd //c echo $path`
21938  fi
21939
21940
21941  input_path="$new_path"
21942  # Check if we need to convert this using DOS-style short mode. If the path
21943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21944  # take no chances and rewrite it.
21945  # Note: m4 eats our [], so we need to use [ and ] instead.
21946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21947  if test "x$has_forbidden_chars" != x; then
21948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21950  fi
21951
21952
21953  windows_path="$new_path"
21954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21955    unix_path=`$CYGPATH -u "$windows_path"`
21956    new_path="$unix_path"
21957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21959    new_path="$unix_path"
21960  fi
21961
21962  if test "x$path" != "x$new_path"; then
21963    BOOT_JDK="$new_path"
21964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21966  fi
21967
21968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21970
21971    else
21972      # We're on a unix platform. Hooray! :)
21973      path="$BOOT_JDK"
21974      has_space=`$ECHO "$path" | $GREP " "`
21975      if test "x$has_space" != x; then
21976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21979      fi
21980
21981      # Use eval to expand a potential ~
21982      eval path="$path"
21983      if test ! -f "$path" && test ! -d "$path"; then
21984        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21985      fi
21986
21987      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21988    fi
21989  fi
21990
21991            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21992$as_echo_n "checking for Boot JDK... " >&6; }
21993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21994$as_echo "$BOOT_JDK" >&6; }
21995            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21996$as_echo_n "checking Boot JDK version... " >&6; }
21997            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21999$as_echo "$BOOT_JDK_VERSION" >&6; }
22000          fi # end check jdk version
22001        fi # end check javac
22002      fi # end check java
22003    fi # end check boot jdk found
22004  fi
22005
22006
22007  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22008
22009  if test "x$BOOT_JDK_FOUND" = xno; then
22010    # Now execute the test
22011
22012  # Extract the first word of "javac", so it can be a program name with args.
22013set dummy javac; ac_word=$2
22014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22015$as_echo_n "checking for $ac_word... " >&6; }
22016if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22017  $as_echo_n "(cached) " >&6
22018else
22019  case $JAVAC_CHECK in
22020  [\\/]* | ?:[\\/]*)
22021  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22022  ;;
22023  *)
22024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22025for as_dir in $PATH
22026do
22027  IFS=$as_save_IFS
22028  test -z "$as_dir" && as_dir=.
22029    for ac_exec_ext in '' $ac_executable_extensions; do
22030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22031    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22033    break 2
22034  fi
22035done
22036  done
22037IFS=$as_save_IFS
22038
22039  ;;
22040esac
22041fi
22042JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22043if test -n "$JAVAC_CHECK"; then
22044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22045$as_echo "$JAVAC_CHECK" >&6; }
22046else
22047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22048$as_echo "no" >&6; }
22049fi
22050
22051
22052  # Extract the first word of "java", so it can be a program name with args.
22053set dummy java; ac_word=$2
22054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22055$as_echo_n "checking for $ac_word... " >&6; }
22056if ${ac_cv_path_JAVA_CHECK+:} false; then :
22057  $as_echo_n "(cached) " >&6
22058else
22059  case $JAVA_CHECK in
22060  [\\/]* | ?:[\\/]*)
22061  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22062  ;;
22063  *)
22064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22065for as_dir in $PATH
22066do
22067  IFS=$as_save_IFS
22068  test -z "$as_dir" && as_dir=.
22069    for ac_exec_ext in '' $ac_executable_extensions; do
22070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22071    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22073    break 2
22074  fi
22075done
22076  done
22077IFS=$as_save_IFS
22078
22079  ;;
22080esac
22081fi
22082JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22083if test -n "$JAVA_CHECK"; then
22084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22085$as_echo "$JAVA_CHECK" >&6; }
22086else
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22088$as_echo "no" >&6; }
22089fi
22090
22091
22092  BINARY="$JAVAC_CHECK"
22093  if test "x$JAVAC_CHECK" = x; then
22094    BINARY="$JAVA_CHECK"
22095  fi
22096  if test "x$BINARY" != x; then
22097    # So there is a java(c) binary, it might be part of a JDK.
22098    # Lets find the JDK/JRE directory by following symbolic links.
22099    # Linux/GNU systems often have links from /usr/bin/java to
22100    # /etc/alternatives/java to the real JDK binary.
22101
22102  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22103    # Follow a chain of symbolic links. Use readlink
22104    # where it exists, else fall back to horribly
22105    # complicated shell code.
22106    if test "x$READLINK_TESTED" != yes; then
22107      # On MacOSX there is a readlink tool with a different
22108      # purpose than the GNU readlink tool. Check the found readlink.
22109      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22110      if test "x$ISGNU" = x; then
22111        # A readlink that we do not know how to use.
22112        # Are there other non-GNU readlinks out there?
22113        READLINK_TESTED=yes
22114        READLINK=
22115      fi
22116    fi
22117
22118    if test "x$READLINK" != x; then
22119      BINARY=`$READLINK -f $BINARY`
22120    else
22121      # Save the current directory for restoring afterwards
22122      STARTDIR=$PWD
22123      COUNTER=0
22124      sym_link_dir=`$DIRNAME $BINARY`
22125      sym_link_file=`$BASENAME $BINARY`
22126      cd $sym_link_dir
22127      # Use -P flag to resolve symlinks in directories.
22128      cd `$THEPWDCMD -P`
22129      sym_link_dir=`$THEPWDCMD -P`
22130      # Resolve file symlinks
22131      while test $COUNTER -lt 20; do
22132        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22133        if test "x$ISLINK" == x; then
22134          # This is not a symbolic link! We are done!
22135          break
22136        fi
22137        # Again resolve directory symlinks since the target of the just found
22138        # link could be in a different directory
22139        cd `$DIRNAME $ISLINK`
22140        sym_link_dir=`$THEPWDCMD -P`
22141        sym_link_file=`$BASENAME $ISLINK`
22142        let COUNTER=COUNTER+1
22143      done
22144      cd $STARTDIR
22145      BINARY=$sym_link_dir/$sym_link_file
22146    fi
22147  fi
22148
22149    BOOT_JDK=`dirname "$BINARY"`
22150    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22151    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22152      # Looks like we found ourselves an JDK
22153      BOOT_JDK_FOUND=maybe
22154      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22155$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22156    fi
22157  fi
22158
22159
22160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22162      # Do we have a bin/java?
22163      if test ! -x "$BOOT_JDK/bin/java"; then
22164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22166        BOOT_JDK_FOUND=no
22167      else
22168        # Do we have a bin/javac?
22169        if test ! -x "$BOOT_JDK/bin/javac"; then
22170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22174          BOOT_JDK_FOUND=no
22175        else
22176          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22177          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22178
22179          # Extra M4 quote needed to protect [] in grep expression.
22180          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22181          if test "x$FOUND_CORRECT_VERSION" = x; then
22182            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22184            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22185$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22186            BOOT_JDK_FOUND=no
22187          else
22188            # We're done! :-)
22189            BOOT_JDK_FOUND=yes
22190
22191  # Only process if variable expands to non-empty
22192
22193  if test "x$BOOT_JDK" != x; then
22194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22195
22196  # Input might be given as Windows format, start by converting to
22197  # unix format.
22198  path="$BOOT_JDK"
22199  new_path=`$CYGPATH -u "$path"`
22200
22201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22204  # "foo.exe" is OK but "foo" is an error.
22205  #
22206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22207  # It is also a way to make sure we got the proper file name for the real test later on.
22208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22209  if test "x$test_shortpath" = x; then
22210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22212    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22213  fi
22214
22215  # Call helper function which possibly converts this using DOS-style short mode.
22216  # If so, the updated path is stored in $new_path.
22217
22218  input_path="$new_path"
22219  # Check if we need to convert this using DOS-style short mode. If the path
22220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22221  # take no chances and rewrite it.
22222  # Note: m4 eats our [], so we need to use [ and ] instead.
22223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22224  if test "x$has_forbidden_chars" != x; then
22225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22229      # Going to short mode and back again did indeed matter. Since short mode is
22230      # case insensitive, let's make it lowercase to improve readability.
22231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22232      # Now convert it back to Unix-style (cygpath)
22233      input_path=`$CYGPATH -u "$shortmode_path"`
22234      new_path="$input_path"
22235    fi
22236  fi
22237
22238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22239  if test "x$test_cygdrive_prefix" = x; then
22240    # As a simple fix, exclude /usr/bin since it's not a real path.
22241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22243      # a path prefixed by /cygdrive for fixpath to work.
22244      new_path="$CYGWIN_ROOT_PATH$input_path"
22245    fi
22246  fi
22247
22248
22249  if test "x$path" != "x$new_path"; then
22250    BOOT_JDK="$new_path"
22251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22253  fi
22254
22255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22256
22257  path="$BOOT_JDK"
22258  has_colon=`$ECHO $path | $GREP ^.:`
22259  new_path="$path"
22260  if test "x$has_colon" = x; then
22261    # Not in mixed or Windows style, start by that.
22262    new_path=`cmd //c echo $path`
22263  fi
22264
22265
22266  input_path="$new_path"
22267  # Check if we need to convert this using DOS-style short mode. If the path
22268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22269  # take no chances and rewrite it.
22270  # Note: m4 eats our [], so we need to use [ and ] instead.
22271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22272  if test "x$has_forbidden_chars" != x; then
22273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22275  fi
22276
22277
22278  windows_path="$new_path"
22279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22280    unix_path=`$CYGPATH -u "$windows_path"`
22281    new_path="$unix_path"
22282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22284    new_path="$unix_path"
22285  fi
22286
22287  if test "x$path" != "x$new_path"; then
22288    BOOT_JDK="$new_path"
22289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22291  fi
22292
22293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22295
22296    else
22297      # We're on a unix platform. Hooray! :)
22298      path="$BOOT_JDK"
22299      has_space=`$ECHO "$path" | $GREP " "`
22300      if test "x$has_space" != x; then
22301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22304      fi
22305
22306      # Use eval to expand a potential ~
22307      eval path="$path"
22308      if test ! -f "$path" && test ! -d "$path"; then
22309        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22310      fi
22311
22312      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22313    fi
22314  fi
22315
22316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22317$as_echo_n "checking for Boot JDK... " >&6; }
22318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22319$as_echo "$BOOT_JDK" >&6; }
22320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22321$as_echo_n "checking Boot JDK version... " >&6; }
22322            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22324$as_echo "$BOOT_JDK_VERSION" >&6; }
22325          fi # end check jdk version
22326        fi # end check javac
22327      fi # end check java
22328    fi # end check boot jdk found
22329  fi
22330
22331
22332  # Test: Is there a JDK installed in default, well-known locations?
22333
22334  if test "x$BOOT_JDK_FOUND" = xno; then
22335    # Now execute the test
22336
22337  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22338
22339  if test "x$BOOT_JDK_FOUND" = xno; then
22340    # Now execute the test
22341
22342  if test "x$ProgramW6432" != x; then
22343    VIRTUAL_DIR="$ProgramW6432/Java"
22344
22345  windows_path="$VIRTUAL_DIR"
22346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22347    unix_path=`$CYGPATH -u "$windows_path"`
22348    VIRTUAL_DIR="$unix_path"
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22351    VIRTUAL_DIR="$unix_path"
22352  fi
22353
22354
22355  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22356  BOOT_JDK_SUFFIX=""
22357  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22358  if test "x$ALL_JDKS_FOUND" != x; then
22359    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22360
22361  if test "x$BOOT_JDK_FOUND" = xno; then
22362    # Now execute the test
22363
22364        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22365        if test -d "$BOOT_JDK"; then
22366          BOOT_JDK_FOUND=maybe
22367          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22368$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22369        fi
22370
22371
22372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22374      # Do we have a bin/java?
22375      if test ! -x "$BOOT_JDK/bin/java"; then
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22378        BOOT_JDK_FOUND=no
22379      else
22380        # Do we have a bin/javac?
22381        if test ! -x "$BOOT_JDK/bin/javac"; then
22382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22386          BOOT_JDK_FOUND=no
22387        else
22388          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22389          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22390
22391          # Extra M4 quote needed to protect [] in grep expression.
22392          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22393          if test "x$FOUND_CORRECT_VERSION" = x; then
22394            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22396            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22397$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22398            BOOT_JDK_FOUND=no
22399          else
22400            # We're done! :-)
22401            BOOT_JDK_FOUND=yes
22402
22403  # Only process if variable expands to non-empty
22404
22405  if test "x$BOOT_JDK" != x; then
22406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22407
22408  # Input might be given as Windows format, start by converting to
22409  # unix format.
22410  path="$BOOT_JDK"
22411  new_path=`$CYGPATH -u "$path"`
22412
22413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22416  # "foo.exe" is OK but "foo" is an error.
22417  #
22418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22419  # It is also a way to make sure we got the proper file name for the real test later on.
22420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22421  if test "x$test_shortpath" = x; then
22422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22424    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22425  fi
22426
22427  # Call helper function which possibly converts this using DOS-style short mode.
22428  # If so, the updated path is stored in $new_path.
22429
22430  input_path="$new_path"
22431  # Check if we need to convert this using DOS-style short mode. If the path
22432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22433  # take no chances and rewrite it.
22434  # Note: m4 eats our [], so we need to use [ and ] instead.
22435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22436  if test "x$has_forbidden_chars" != x; then
22437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22441      # Going to short mode and back again did indeed matter. Since short mode is
22442      # case insensitive, let's make it lowercase to improve readability.
22443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22444      # Now convert it back to Unix-style (cygpath)
22445      input_path=`$CYGPATH -u "$shortmode_path"`
22446      new_path="$input_path"
22447    fi
22448  fi
22449
22450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22451  if test "x$test_cygdrive_prefix" = x; then
22452    # As a simple fix, exclude /usr/bin since it's not a real path.
22453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22455      # a path prefixed by /cygdrive for fixpath to work.
22456      new_path="$CYGWIN_ROOT_PATH$input_path"
22457    fi
22458  fi
22459
22460
22461  if test "x$path" != "x$new_path"; then
22462    BOOT_JDK="$new_path"
22463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22465  fi
22466
22467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22468
22469  path="$BOOT_JDK"
22470  has_colon=`$ECHO $path | $GREP ^.:`
22471  new_path="$path"
22472  if test "x$has_colon" = x; then
22473    # Not in mixed or Windows style, start by that.
22474    new_path=`cmd //c echo $path`
22475  fi
22476
22477
22478  input_path="$new_path"
22479  # Check if we need to convert this using DOS-style short mode. If the path
22480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22481  # take no chances and rewrite it.
22482  # Note: m4 eats our [], so we need to use [ and ] instead.
22483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22484  if test "x$has_forbidden_chars" != x; then
22485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22487  fi
22488
22489
22490  windows_path="$new_path"
22491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22492    unix_path=`$CYGPATH -u "$windows_path"`
22493    new_path="$unix_path"
22494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22496    new_path="$unix_path"
22497  fi
22498
22499  if test "x$path" != "x$new_path"; then
22500    BOOT_JDK="$new_path"
22501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22503  fi
22504
22505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22507
22508    else
22509      # We're on a unix platform. Hooray! :)
22510      path="$BOOT_JDK"
22511      has_space=`$ECHO "$path" | $GREP " "`
22512      if test "x$has_space" != x; then
22513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22516      fi
22517
22518      # Use eval to expand a potential ~
22519      eval path="$path"
22520      if test ! -f "$path" && test ! -d "$path"; then
22521        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22522      fi
22523
22524      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22525    fi
22526  fi
22527
22528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22529$as_echo_n "checking for Boot JDK... " >&6; }
22530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22531$as_echo "$BOOT_JDK" >&6; }
22532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22533$as_echo_n "checking Boot JDK version... " >&6; }
22534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22536$as_echo "$BOOT_JDK_VERSION" >&6; }
22537          fi # end check jdk version
22538        fi # end check javac
22539      fi # end check java
22540    fi # end check boot jdk found
22541  fi
22542
22543    done
22544  fi
22545
22546  fi
22547
22548
22549    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22550    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22551      # Do we have a bin/java?
22552      if test ! -x "$BOOT_JDK/bin/java"; then
22553        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22555        BOOT_JDK_FOUND=no
22556      else
22557        # Do we have a bin/javac?
22558        if test ! -x "$BOOT_JDK/bin/javac"; then
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22562$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22563          BOOT_JDK_FOUND=no
22564        else
22565          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22566          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22567
22568          # Extra M4 quote needed to protect [] in grep expression.
22569          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22570          if test "x$FOUND_CORRECT_VERSION" = x; then
22571            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22573            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22574$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22575            BOOT_JDK_FOUND=no
22576          else
22577            # We're done! :-)
22578            BOOT_JDK_FOUND=yes
22579
22580  # Only process if variable expands to non-empty
22581
22582  if test "x$BOOT_JDK" != x; then
22583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22584
22585  # Input might be given as Windows format, start by converting to
22586  # unix format.
22587  path="$BOOT_JDK"
22588  new_path=`$CYGPATH -u "$path"`
22589
22590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22593  # "foo.exe" is OK but "foo" is an error.
22594  #
22595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22596  # It is also a way to make sure we got the proper file name for the real test later on.
22597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22598  if test "x$test_shortpath" = x; then
22599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22601    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22602  fi
22603
22604  # Call helper function which possibly converts this using DOS-style short mode.
22605  # If so, the updated path is stored in $new_path.
22606
22607  input_path="$new_path"
22608  # Check if we need to convert this using DOS-style short mode. If the path
22609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22610  # take no chances and rewrite it.
22611  # Note: m4 eats our [], so we need to use [ and ] instead.
22612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22613  if test "x$has_forbidden_chars" != x; then
22614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22618      # Going to short mode and back again did indeed matter. Since short mode is
22619      # case insensitive, let's make it lowercase to improve readability.
22620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22621      # Now convert it back to Unix-style (cygpath)
22622      input_path=`$CYGPATH -u "$shortmode_path"`
22623      new_path="$input_path"
22624    fi
22625  fi
22626
22627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22628  if test "x$test_cygdrive_prefix" = x; then
22629    # As a simple fix, exclude /usr/bin since it's not a real path.
22630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22632      # a path prefixed by /cygdrive for fixpath to work.
22633      new_path="$CYGWIN_ROOT_PATH$input_path"
22634    fi
22635  fi
22636
22637
22638  if test "x$path" != "x$new_path"; then
22639    BOOT_JDK="$new_path"
22640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22642  fi
22643
22644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22645
22646  path="$BOOT_JDK"
22647  has_colon=`$ECHO $path | $GREP ^.:`
22648  new_path="$path"
22649  if test "x$has_colon" = x; then
22650    # Not in mixed or Windows style, start by that.
22651    new_path=`cmd //c echo $path`
22652  fi
22653
22654
22655  input_path="$new_path"
22656  # Check if we need to convert this using DOS-style short mode. If the path
22657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22658  # take no chances and rewrite it.
22659  # Note: m4 eats our [], so we need to use [ and ] instead.
22660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22661  if test "x$has_forbidden_chars" != x; then
22662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22664  fi
22665
22666
22667  windows_path="$new_path"
22668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22669    unix_path=`$CYGPATH -u "$windows_path"`
22670    new_path="$unix_path"
22671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22673    new_path="$unix_path"
22674  fi
22675
22676  if test "x$path" != "x$new_path"; then
22677    BOOT_JDK="$new_path"
22678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22679$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22680  fi
22681
22682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22684
22685    else
22686      # We're on a unix platform. Hooray! :)
22687      path="$BOOT_JDK"
22688      has_space=`$ECHO "$path" | $GREP " "`
22689      if test "x$has_space" != x; then
22690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22693      fi
22694
22695      # Use eval to expand a potential ~
22696      eval path="$path"
22697      if test ! -f "$path" && test ! -d "$path"; then
22698        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22699      fi
22700
22701      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22702    fi
22703  fi
22704
22705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22706$as_echo_n "checking for Boot JDK... " >&6; }
22707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22708$as_echo "$BOOT_JDK" >&6; }
22709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22710$as_echo_n "checking Boot JDK version... " >&6; }
22711            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22713$as_echo "$BOOT_JDK_VERSION" >&6; }
22714          fi # end check jdk version
22715        fi # end check javac
22716      fi # end check java
22717    fi # end check boot jdk found
22718  fi
22719
22720
22721  if test "x$BOOT_JDK_FOUND" = xno; then
22722    # Now execute the test
22723
22724  if test "x$PROGRAMW6432" != x; then
22725    VIRTUAL_DIR="$PROGRAMW6432/Java"
22726
22727  windows_path="$VIRTUAL_DIR"
22728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22729    unix_path=`$CYGPATH -u "$windows_path"`
22730    VIRTUAL_DIR="$unix_path"
22731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22733    VIRTUAL_DIR="$unix_path"
22734  fi
22735
22736
22737  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22738  BOOT_JDK_SUFFIX=""
22739  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22740  if test "x$ALL_JDKS_FOUND" != x; then
22741    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22742
22743  if test "x$BOOT_JDK_FOUND" = xno; then
22744    # Now execute the test
22745
22746        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22747        if test -d "$BOOT_JDK"; then
22748          BOOT_JDK_FOUND=maybe
22749          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22750$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22751        fi
22752
22753
22754    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22755    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22756      # Do we have a bin/java?
22757      if test ! -x "$BOOT_JDK/bin/java"; then
22758        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22760        BOOT_JDK_FOUND=no
22761      else
22762        # Do we have a bin/javac?
22763        if test ! -x "$BOOT_JDK/bin/javac"; then
22764          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22767$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22768          BOOT_JDK_FOUND=no
22769        else
22770          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22771          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22772
22773          # Extra M4 quote needed to protect [] in grep expression.
22774          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22775          if test "x$FOUND_CORRECT_VERSION" = x; then
22776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22778            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22779$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22780            BOOT_JDK_FOUND=no
22781          else
22782            # We're done! :-)
22783            BOOT_JDK_FOUND=yes
22784
22785  # Only process if variable expands to non-empty
22786
22787  if test "x$BOOT_JDK" != x; then
22788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22789
22790  # Input might be given as Windows format, start by converting to
22791  # unix format.
22792  path="$BOOT_JDK"
22793  new_path=`$CYGPATH -u "$path"`
22794
22795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22798  # "foo.exe" is OK but "foo" is an error.
22799  #
22800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22801  # It is also a way to make sure we got the proper file name for the real test later on.
22802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22803  if test "x$test_shortpath" = x; then
22804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22807  fi
22808
22809  # Call helper function which possibly converts this using DOS-style short mode.
22810  # If so, the updated path is stored in $new_path.
22811
22812  input_path="$new_path"
22813  # Check if we need to convert this using DOS-style short mode. If the path
22814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22815  # take no chances and rewrite it.
22816  # Note: m4 eats our [], so we need to use [ and ] instead.
22817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22818  if test "x$has_forbidden_chars" != x; then
22819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22823      # Going to short mode and back again did indeed matter. Since short mode is
22824      # case insensitive, let's make it lowercase to improve readability.
22825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22826      # Now convert it back to Unix-style (cygpath)
22827      input_path=`$CYGPATH -u "$shortmode_path"`
22828      new_path="$input_path"
22829    fi
22830  fi
22831
22832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22833  if test "x$test_cygdrive_prefix" = x; then
22834    # As a simple fix, exclude /usr/bin since it's not a real path.
22835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22837      # a path prefixed by /cygdrive for fixpath to work.
22838      new_path="$CYGWIN_ROOT_PATH$input_path"
22839    fi
22840  fi
22841
22842
22843  if test "x$path" != "x$new_path"; then
22844    BOOT_JDK="$new_path"
22845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22847  fi
22848
22849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22850
22851  path="$BOOT_JDK"
22852  has_colon=`$ECHO $path | $GREP ^.:`
22853  new_path="$path"
22854  if test "x$has_colon" = x; then
22855    # Not in mixed or Windows style, start by that.
22856    new_path=`cmd //c echo $path`
22857  fi
22858
22859
22860  input_path="$new_path"
22861  # Check if we need to convert this using DOS-style short mode. If the path
22862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22863  # take no chances and rewrite it.
22864  # Note: m4 eats our [], so we need to use [ and ] instead.
22865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22866  if test "x$has_forbidden_chars" != x; then
22867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22869  fi
22870
22871
22872  windows_path="$new_path"
22873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22874    unix_path=`$CYGPATH -u "$windows_path"`
22875    new_path="$unix_path"
22876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22878    new_path="$unix_path"
22879  fi
22880
22881  if test "x$path" != "x$new_path"; then
22882    BOOT_JDK="$new_path"
22883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22885  fi
22886
22887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22889
22890    else
22891      # We're on a unix platform. Hooray! :)
22892      path="$BOOT_JDK"
22893      has_space=`$ECHO "$path" | $GREP " "`
22894      if test "x$has_space" != x; then
22895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22898      fi
22899
22900      # Use eval to expand a potential ~
22901      eval path="$path"
22902      if test ! -f "$path" && test ! -d "$path"; then
22903        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22904      fi
22905
22906      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22907    fi
22908  fi
22909
22910            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22911$as_echo_n "checking for Boot JDK... " >&6; }
22912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22913$as_echo "$BOOT_JDK" >&6; }
22914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22915$as_echo_n "checking Boot JDK version... " >&6; }
22916            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22918$as_echo "$BOOT_JDK_VERSION" >&6; }
22919          fi # end check jdk version
22920        fi # end check javac
22921      fi # end check java
22922    fi # end check boot jdk found
22923  fi
22924
22925    done
22926  fi
22927
22928  fi
22929
22930
22931    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22932    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22933      # Do we have a bin/java?
22934      if test ! -x "$BOOT_JDK/bin/java"; then
22935        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22937        BOOT_JDK_FOUND=no
22938      else
22939        # Do we have a bin/javac?
22940        if test ! -x "$BOOT_JDK/bin/javac"; then
22941          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22943          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22944$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22945          BOOT_JDK_FOUND=no
22946        else
22947          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22948          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22949
22950          # Extra M4 quote needed to protect [] in grep expression.
22951          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22952          if test "x$FOUND_CORRECT_VERSION" = x; then
22953            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22955            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22956$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22957            BOOT_JDK_FOUND=no
22958          else
22959            # We're done! :-)
22960            BOOT_JDK_FOUND=yes
22961
22962  # Only process if variable expands to non-empty
22963
22964  if test "x$BOOT_JDK" != x; then
22965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22966
22967  # Input might be given as Windows format, start by converting to
22968  # unix format.
22969  path="$BOOT_JDK"
22970  new_path=`$CYGPATH -u "$path"`
22971
22972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22975  # "foo.exe" is OK but "foo" is an error.
22976  #
22977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22978  # It is also a way to make sure we got the proper file name for the real test later on.
22979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22980  if test "x$test_shortpath" = x; then
22981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22983    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22984  fi
22985
22986  # Call helper function which possibly converts this using DOS-style short mode.
22987  # If so, the updated path is stored in $new_path.
22988
22989  input_path="$new_path"
22990  # Check if we need to convert this using DOS-style short mode. If the path
22991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22992  # take no chances and rewrite it.
22993  # Note: m4 eats our [], so we need to use [ and ] instead.
22994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22995  if test "x$has_forbidden_chars" != x; then
22996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23000      # Going to short mode and back again did indeed matter. Since short mode is
23001      # case insensitive, let's make it lowercase to improve readability.
23002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23003      # Now convert it back to Unix-style (cygpath)
23004      input_path=`$CYGPATH -u "$shortmode_path"`
23005      new_path="$input_path"
23006    fi
23007  fi
23008
23009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23010  if test "x$test_cygdrive_prefix" = x; then
23011    # As a simple fix, exclude /usr/bin since it's not a real path.
23012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23014      # a path prefixed by /cygdrive for fixpath to work.
23015      new_path="$CYGWIN_ROOT_PATH$input_path"
23016    fi
23017  fi
23018
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23027
23028  path="$BOOT_JDK"
23029  has_colon=`$ECHO $path | $GREP ^.:`
23030  new_path="$path"
23031  if test "x$has_colon" = x; then
23032    # Not in mixed or Windows style, start by that.
23033    new_path=`cmd //c echo $path`
23034  fi
23035
23036
23037  input_path="$new_path"
23038  # Check if we need to convert this using DOS-style short mode. If the path
23039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23040  # take no chances and rewrite it.
23041  # Note: m4 eats our [], so we need to use [ and ] instead.
23042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23043  if test "x$has_forbidden_chars" != x; then
23044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23046  fi
23047
23048
23049  windows_path="$new_path"
23050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23051    unix_path=`$CYGPATH -u "$windows_path"`
23052    new_path="$unix_path"
23053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23055    new_path="$unix_path"
23056  fi
23057
23058  if test "x$path" != "x$new_path"; then
23059    BOOT_JDK="$new_path"
23060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23062  fi
23063
23064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23066
23067    else
23068      # We're on a unix platform. Hooray! :)
23069      path="$BOOT_JDK"
23070      has_space=`$ECHO "$path" | $GREP " "`
23071      if test "x$has_space" != x; then
23072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23074        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23075      fi
23076
23077      # Use eval to expand a potential ~
23078      eval path="$path"
23079      if test ! -f "$path" && test ! -d "$path"; then
23080        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23081      fi
23082
23083      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23084    fi
23085  fi
23086
23087            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23088$as_echo_n "checking for Boot JDK... " >&6; }
23089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23090$as_echo "$BOOT_JDK" >&6; }
23091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23092$as_echo_n "checking Boot JDK version... " >&6; }
23093            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23095$as_echo "$BOOT_JDK_VERSION" >&6; }
23096          fi # end check jdk version
23097        fi # end check javac
23098      fi # end check java
23099    fi # end check boot jdk found
23100  fi
23101
23102
23103  if test "x$BOOT_JDK_FOUND" = xno; then
23104    # Now execute the test
23105
23106  if test "x$PROGRAMFILES" != x; then
23107    VIRTUAL_DIR="$PROGRAMFILES/Java"
23108
23109  windows_path="$VIRTUAL_DIR"
23110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23111    unix_path=`$CYGPATH -u "$windows_path"`
23112    VIRTUAL_DIR="$unix_path"
23113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23115    VIRTUAL_DIR="$unix_path"
23116  fi
23117
23118
23119  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23120  BOOT_JDK_SUFFIX=""
23121  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23122  if test "x$ALL_JDKS_FOUND" != x; then
23123    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23124
23125  if test "x$BOOT_JDK_FOUND" = xno; then
23126    # Now execute the test
23127
23128        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23129        if test -d "$BOOT_JDK"; then
23130          BOOT_JDK_FOUND=maybe
23131          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23132$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23133        fi
23134
23135
23136    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23137    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23138      # Do we have a bin/java?
23139      if test ! -x "$BOOT_JDK/bin/java"; then
23140        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23142        BOOT_JDK_FOUND=no
23143      else
23144        # Do we have a bin/javac?
23145        if test ! -x "$BOOT_JDK/bin/javac"; then
23146          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23148          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23149$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23150          BOOT_JDK_FOUND=no
23151        else
23152          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23153          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23154
23155          # Extra M4 quote needed to protect [] in grep expression.
23156          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23157          if test "x$FOUND_CORRECT_VERSION" = x; then
23158            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23160            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23161$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23162            BOOT_JDK_FOUND=no
23163          else
23164            # We're done! :-)
23165            BOOT_JDK_FOUND=yes
23166
23167  # Only process if variable expands to non-empty
23168
23169  if test "x$BOOT_JDK" != x; then
23170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23171
23172  # Input might be given as Windows format, start by converting to
23173  # unix format.
23174  path="$BOOT_JDK"
23175  new_path=`$CYGPATH -u "$path"`
23176
23177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23180  # "foo.exe" is OK but "foo" is an error.
23181  #
23182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23183  # It is also a way to make sure we got the proper file name for the real test later on.
23184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23185  if test "x$test_shortpath" = x; then
23186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23189  fi
23190
23191  # Call helper function which possibly converts this using DOS-style short mode.
23192  # If so, the updated path is stored in $new_path.
23193
23194  input_path="$new_path"
23195  # Check if we need to convert this using DOS-style short mode. If the path
23196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23197  # take no chances and rewrite it.
23198  # Note: m4 eats our [], so we need to use [ and ] instead.
23199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23200  if test "x$has_forbidden_chars" != x; then
23201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23205      # Going to short mode and back again did indeed matter. Since short mode is
23206      # case insensitive, let's make it lowercase to improve readability.
23207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23208      # Now convert it back to Unix-style (cygpath)
23209      input_path=`$CYGPATH -u "$shortmode_path"`
23210      new_path="$input_path"
23211    fi
23212  fi
23213
23214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23215  if test "x$test_cygdrive_prefix" = x; then
23216    # As a simple fix, exclude /usr/bin since it's not a real path.
23217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23219      # a path prefixed by /cygdrive for fixpath to work.
23220      new_path="$CYGWIN_ROOT_PATH$input_path"
23221    fi
23222  fi
23223
23224
23225  if test "x$path" != "x$new_path"; then
23226    BOOT_JDK="$new_path"
23227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23229  fi
23230
23231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23232
23233  path="$BOOT_JDK"
23234  has_colon=`$ECHO $path | $GREP ^.:`
23235  new_path="$path"
23236  if test "x$has_colon" = x; then
23237    # Not in mixed or Windows style, start by that.
23238    new_path=`cmd //c echo $path`
23239  fi
23240
23241
23242  input_path="$new_path"
23243  # Check if we need to convert this using DOS-style short mode. If the path
23244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23245  # take no chances and rewrite it.
23246  # Note: m4 eats our [], so we need to use [ and ] instead.
23247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23248  if test "x$has_forbidden_chars" != x; then
23249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23251  fi
23252
23253
23254  windows_path="$new_path"
23255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23256    unix_path=`$CYGPATH -u "$windows_path"`
23257    new_path="$unix_path"
23258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23260    new_path="$unix_path"
23261  fi
23262
23263  if test "x$path" != "x$new_path"; then
23264    BOOT_JDK="$new_path"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267  fi
23268
23269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23271
23272    else
23273      # We're on a unix platform. Hooray! :)
23274      path="$BOOT_JDK"
23275      has_space=`$ECHO "$path" | $GREP " "`
23276      if test "x$has_space" != x; then
23277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23280      fi
23281
23282      # Use eval to expand a potential ~
23283      eval path="$path"
23284      if test ! -f "$path" && test ! -d "$path"; then
23285        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23286      fi
23287
23288      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23289    fi
23290  fi
23291
23292            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23293$as_echo_n "checking for Boot JDK... " >&6; }
23294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23295$as_echo "$BOOT_JDK" >&6; }
23296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23297$as_echo_n "checking Boot JDK version... " >&6; }
23298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23300$as_echo "$BOOT_JDK_VERSION" >&6; }
23301          fi # end check jdk version
23302        fi # end check javac
23303      fi # end check java
23304    fi # end check boot jdk found
23305  fi
23306
23307    done
23308  fi
23309
23310  fi
23311
23312
23313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23315      # Do we have a bin/java?
23316      if test ! -x "$BOOT_JDK/bin/java"; then
23317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23319        BOOT_JDK_FOUND=no
23320      else
23321        # Do we have a bin/javac?
23322        if test ! -x "$BOOT_JDK/bin/javac"; then
23323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23327          BOOT_JDK_FOUND=no
23328        else
23329          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23330          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23331
23332          # Extra M4 quote needed to protect [] in grep expression.
23333          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23334          if test "x$FOUND_CORRECT_VERSION" = x; then
23335            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23337            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23338$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23339            BOOT_JDK_FOUND=no
23340          else
23341            # We're done! :-)
23342            BOOT_JDK_FOUND=yes
23343
23344  # Only process if variable expands to non-empty
23345
23346  if test "x$BOOT_JDK" != x; then
23347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23348
23349  # Input might be given as Windows format, start by converting to
23350  # unix format.
23351  path="$BOOT_JDK"
23352  new_path=`$CYGPATH -u "$path"`
23353
23354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23357  # "foo.exe" is OK but "foo" is an error.
23358  #
23359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23360  # It is also a way to make sure we got the proper file name for the real test later on.
23361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23362  if test "x$test_shortpath" = x; then
23363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23366  fi
23367
23368  # Call helper function which possibly converts this using DOS-style short mode.
23369  # If so, the updated path is stored in $new_path.
23370
23371  input_path="$new_path"
23372  # Check if we need to convert this using DOS-style short mode. If the path
23373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23374  # take no chances and rewrite it.
23375  # Note: m4 eats our [], so we need to use [ and ] instead.
23376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23377  if test "x$has_forbidden_chars" != x; then
23378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23382      # Going to short mode and back again did indeed matter. Since short mode is
23383      # case insensitive, let's make it lowercase to improve readability.
23384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23385      # Now convert it back to Unix-style (cygpath)
23386      input_path=`$CYGPATH -u "$shortmode_path"`
23387      new_path="$input_path"
23388    fi
23389  fi
23390
23391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23392  if test "x$test_cygdrive_prefix" = x; then
23393    # As a simple fix, exclude /usr/bin since it's not a real path.
23394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23396      # a path prefixed by /cygdrive for fixpath to work.
23397      new_path="$CYGWIN_ROOT_PATH$input_path"
23398    fi
23399  fi
23400
23401
23402  if test "x$path" != "x$new_path"; then
23403    BOOT_JDK="$new_path"
23404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23406  fi
23407
23408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23409
23410  path="$BOOT_JDK"
23411  has_colon=`$ECHO $path | $GREP ^.:`
23412  new_path="$path"
23413  if test "x$has_colon" = x; then
23414    # Not in mixed or Windows style, start by that.
23415    new_path=`cmd //c echo $path`
23416  fi
23417
23418
23419  input_path="$new_path"
23420  # Check if we need to convert this using DOS-style short mode. If the path
23421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23422  # take no chances and rewrite it.
23423  # Note: m4 eats our [], so we need to use [ and ] instead.
23424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23425  if test "x$has_forbidden_chars" != x; then
23426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23428  fi
23429
23430
23431  windows_path="$new_path"
23432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23433    unix_path=`$CYGPATH -u "$windows_path"`
23434    new_path="$unix_path"
23435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23437    new_path="$unix_path"
23438  fi
23439
23440  if test "x$path" != "x$new_path"; then
23441    BOOT_JDK="$new_path"
23442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23444  fi
23445
23446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23448
23449    else
23450      # We're on a unix platform. Hooray! :)
23451      path="$BOOT_JDK"
23452      has_space=`$ECHO "$path" | $GREP " "`
23453      if test "x$has_space" != x; then
23454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23457      fi
23458
23459      # Use eval to expand a potential ~
23460      eval path="$path"
23461      if test ! -f "$path" && test ! -d "$path"; then
23462        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23463      fi
23464
23465      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23466    fi
23467  fi
23468
23469            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23470$as_echo_n "checking for Boot JDK... " >&6; }
23471            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23472$as_echo "$BOOT_JDK" >&6; }
23473            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23474$as_echo_n "checking Boot JDK version... " >&6; }
23475            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23477$as_echo "$BOOT_JDK_VERSION" >&6; }
23478          fi # end check jdk version
23479        fi # end check javac
23480      fi # end check java
23481    fi # end check boot jdk found
23482  fi
23483
23484
23485  if test "x$BOOT_JDK_FOUND" = xno; then
23486    # Now execute the test
23487
23488  if test "x$ProgramFiles" != x; then
23489    VIRTUAL_DIR="$ProgramFiles/Java"
23490
23491  windows_path="$VIRTUAL_DIR"
23492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23493    unix_path=`$CYGPATH -u "$windows_path"`
23494    VIRTUAL_DIR="$unix_path"
23495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23497    VIRTUAL_DIR="$unix_path"
23498  fi
23499
23500
23501  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23502  BOOT_JDK_SUFFIX=""
23503  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23504  if test "x$ALL_JDKS_FOUND" != x; then
23505    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23506
23507  if test "x$BOOT_JDK_FOUND" = xno; then
23508    # Now execute the test
23509
23510        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23511        if test -d "$BOOT_JDK"; then
23512          BOOT_JDK_FOUND=maybe
23513          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23514$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23515        fi
23516
23517
23518    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23519    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23520      # Do we have a bin/java?
23521      if test ! -x "$BOOT_JDK/bin/java"; then
23522        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23524        BOOT_JDK_FOUND=no
23525      else
23526        # Do we have a bin/javac?
23527        if test ! -x "$BOOT_JDK/bin/javac"; then
23528          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23530          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23531$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23532          BOOT_JDK_FOUND=no
23533        else
23534          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23535          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23536
23537          # Extra M4 quote needed to protect [] in grep expression.
23538          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23539          if test "x$FOUND_CORRECT_VERSION" = x; then
23540            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23543$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23544            BOOT_JDK_FOUND=no
23545          else
23546            # We're done! :-)
23547            BOOT_JDK_FOUND=yes
23548
23549  # Only process if variable expands to non-empty
23550
23551  if test "x$BOOT_JDK" != x; then
23552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23553
23554  # Input might be given as Windows format, start by converting to
23555  # unix format.
23556  path="$BOOT_JDK"
23557  new_path=`$CYGPATH -u "$path"`
23558
23559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23562  # "foo.exe" is OK but "foo" is an error.
23563  #
23564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23565  # It is also a way to make sure we got the proper file name for the real test later on.
23566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23567  if test "x$test_shortpath" = x; then
23568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23570    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23571  fi
23572
23573  # Call helper function which possibly converts this using DOS-style short mode.
23574  # If so, the updated path is stored in $new_path.
23575
23576  input_path="$new_path"
23577  # Check if we need to convert this using DOS-style short mode. If the path
23578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23579  # take no chances and rewrite it.
23580  # Note: m4 eats our [], so we need to use [ and ] instead.
23581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23582  if test "x$has_forbidden_chars" != x; then
23583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23587      # Going to short mode and back again did indeed matter. Since short mode is
23588      # case insensitive, let's make it lowercase to improve readability.
23589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23590      # Now convert it back to Unix-style (cygpath)
23591      input_path=`$CYGPATH -u "$shortmode_path"`
23592      new_path="$input_path"
23593    fi
23594  fi
23595
23596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23597  if test "x$test_cygdrive_prefix" = x; then
23598    # As a simple fix, exclude /usr/bin since it's not a real path.
23599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23601      # a path prefixed by /cygdrive for fixpath to work.
23602      new_path="$CYGWIN_ROOT_PATH$input_path"
23603    fi
23604  fi
23605
23606
23607  if test "x$path" != "x$new_path"; then
23608    BOOT_JDK="$new_path"
23609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23611  fi
23612
23613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23614
23615  path="$BOOT_JDK"
23616  has_colon=`$ECHO $path | $GREP ^.:`
23617  new_path="$path"
23618  if test "x$has_colon" = x; then
23619    # Not in mixed or Windows style, start by that.
23620    new_path=`cmd //c echo $path`
23621  fi
23622
23623
23624  input_path="$new_path"
23625  # Check if we need to convert this using DOS-style short mode. If the path
23626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23627  # take no chances and rewrite it.
23628  # Note: m4 eats our [], so we need to use [ and ] instead.
23629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23630  if test "x$has_forbidden_chars" != x; then
23631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23633  fi
23634
23635
23636  windows_path="$new_path"
23637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23638    unix_path=`$CYGPATH -u "$windows_path"`
23639    new_path="$unix_path"
23640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23642    new_path="$unix_path"
23643  fi
23644
23645  if test "x$path" != "x$new_path"; then
23646    BOOT_JDK="$new_path"
23647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23649  fi
23650
23651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23653
23654    else
23655      # We're on a unix platform. Hooray! :)
23656      path="$BOOT_JDK"
23657      has_space=`$ECHO "$path" | $GREP " "`
23658      if test "x$has_space" != x; then
23659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23662      fi
23663
23664      # Use eval to expand a potential ~
23665      eval path="$path"
23666      if test ! -f "$path" && test ! -d "$path"; then
23667        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23668      fi
23669
23670      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23671    fi
23672  fi
23673
23674            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23675$as_echo_n "checking for Boot JDK... " >&6; }
23676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23677$as_echo "$BOOT_JDK" >&6; }
23678            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23679$as_echo_n "checking Boot JDK version... " >&6; }
23680            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23682$as_echo "$BOOT_JDK_VERSION" >&6; }
23683          fi # end check jdk version
23684        fi # end check javac
23685      fi # end check java
23686    fi # end check boot jdk found
23687  fi
23688
23689    done
23690  fi
23691
23692  fi
23693
23694
23695    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23696    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23697      # Do we have a bin/java?
23698      if test ! -x "$BOOT_JDK/bin/java"; then
23699        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23701        BOOT_JDK_FOUND=no
23702      else
23703        # Do we have a bin/javac?
23704        if test ! -x "$BOOT_JDK/bin/javac"; then
23705          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23707          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23708$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23709          BOOT_JDK_FOUND=no
23710        else
23711          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23712          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23713
23714          # Extra M4 quote needed to protect [] in grep expression.
23715          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23716          if test "x$FOUND_CORRECT_VERSION" = x; then
23717            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23719            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23720$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23721            BOOT_JDK_FOUND=no
23722          else
23723            # We're done! :-)
23724            BOOT_JDK_FOUND=yes
23725
23726  # Only process if variable expands to non-empty
23727
23728  if test "x$BOOT_JDK" != x; then
23729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23730
23731  # Input might be given as Windows format, start by converting to
23732  # unix format.
23733  path="$BOOT_JDK"
23734  new_path=`$CYGPATH -u "$path"`
23735
23736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23739  # "foo.exe" is OK but "foo" is an error.
23740  #
23741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23742  # It is also a way to make sure we got the proper file name for the real test later on.
23743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23744  if test "x$test_shortpath" = x; then
23745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23747    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23748  fi
23749
23750  # Call helper function which possibly converts this using DOS-style short mode.
23751  # If so, the updated path is stored in $new_path.
23752
23753  input_path="$new_path"
23754  # Check if we need to convert this using DOS-style short mode. If the path
23755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23756  # take no chances and rewrite it.
23757  # Note: m4 eats our [], so we need to use [ and ] instead.
23758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23759  if test "x$has_forbidden_chars" != x; then
23760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23764      # Going to short mode and back again did indeed matter. Since short mode is
23765      # case insensitive, let's make it lowercase to improve readability.
23766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23767      # Now convert it back to Unix-style (cygpath)
23768      input_path=`$CYGPATH -u "$shortmode_path"`
23769      new_path="$input_path"
23770    fi
23771  fi
23772
23773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23774  if test "x$test_cygdrive_prefix" = x; then
23775    # As a simple fix, exclude /usr/bin since it's not a real path.
23776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23778      # a path prefixed by /cygdrive for fixpath to work.
23779      new_path="$CYGWIN_ROOT_PATH$input_path"
23780    fi
23781  fi
23782
23783
23784  if test "x$path" != "x$new_path"; then
23785    BOOT_JDK="$new_path"
23786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23788  fi
23789
23790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23791
23792  path="$BOOT_JDK"
23793  has_colon=`$ECHO $path | $GREP ^.:`
23794  new_path="$path"
23795  if test "x$has_colon" = x; then
23796    # Not in mixed or Windows style, start by that.
23797    new_path=`cmd //c echo $path`
23798  fi
23799
23800
23801  input_path="$new_path"
23802  # Check if we need to convert this using DOS-style short mode. If the path
23803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23804  # take no chances and rewrite it.
23805  # Note: m4 eats our [], so we need to use [ and ] instead.
23806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23807  if test "x$has_forbidden_chars" != x; then
23808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23810  fi
23811
23812
23813  windows_path="$new_path"
23814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23815    unix_path=`$CYGPATH -u "$windows_path"`
23816    new_path="$unix_path"
23817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23819    new_path="$unix_path"
23820  fi
23821
23822  if test "x$path" != "x$new_path"; then
23823    BOOT_JDK="$new_path"
23824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23826  fi
23827
23828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23830
23831    else
23832      # We're on a unix platform. Hooray! :)
23833      path="$BOOT_JDK"
23834      has_space=`$ECHO "$path" | $GREP " "`
23835      if test "x$has_space" != x; then
23836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23839      fi
23840
23841      # Use eval to expand a potential ~
23842      eval path="$path"
23843      if test ! -f "$path" && test ! -d "$path"; then
23844        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23845      fi
23846
23847      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23848    fi
23849  fi
23850
23851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23852$as_echo_n "checking for Boot JDK... " >&6; }
23853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23854$as_echo "$BOOT_JDK" >&6; }
23855            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23856$as_echo_n "checking Boot JDK version... " >&6; }
23857            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23859$as_echo "$BOOT_JDK_VERSION" >&6; }
23860          fi # end check jdk version
23861        fi # end check javac
23862      fi # end check java
23863    fi # end check boot jdk found
23864  fi
23865
23866
23867  if test "x$BOOT_JDK_FOUND" = xno; then
23868    # Now execute the test
23869
23870  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23871  BOOT_JDK_SUFFIX=""
23872  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23873  if test "x$ALL_JDKS_FOUND" != x; then
23874    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23875
23876  if test "x$BOOT_JDK_FOUND" = xno; then
23877    # Now execute the test
23878
23879        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23880        if test -d "$BOOT_JDK"; then
23881          BOOT_JDK_FOUND=maybe
23882          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23883$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23884        fi
23885
23886
23887    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23888    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23889      # Do we have a bin/java?
23890      if test ! -x "$BOOT_JDK/bin/java"; then
23891        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23893        BOOT_JDK_FOUND=no
23894      else
23895        # Do we have a bin/javac?
23896        if test ! -x "$BOOT_JDK/bin/javac"; then
23897          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23899          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23900$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23901          BOOT_JDK_FOUND=no
23902        else
23903          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23904          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23905
23906          # Extra M4 quote needed to protect [] in grep expression.
23907          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23908          if test "x$FOUND_CORRECT_VERSION" = x; then
23909            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23911            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23912$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23913            BOOT_JDK_FOUND=no
23914          else
23915            # We're done! :-)
23916            BOOT_JDK_FOUND=yes
23917
23918  # Only process if variable expands to non-empty
23919
23920  if test "x$BOOT_JDK" != x; then
23921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23922
23923  # Input might be given as Windows format, start by converting to
23924  # unix format.
23925  path="$BOOT_JDK"
23926  new_path=`$CYGPATH -u "$path"`
23927
23928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23931  # "foo.exe" is OK but "foo" is an error.
23932  #
23933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23934  # It is also a way to make sure we got the proper file name for the real test later on.
23935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23936  if test "x$test_shortpath" = x; then
23937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23939    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23940  fi
23941
23942  # Call helper function which possibly converts this using DOS-style short mode.
23943  # If so, the updated path is stored in $new_path.
23944
23945  input_path="$new_path"
23946  # Check if we need to convert this using DOS-style short mode. If the path
23947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23948  # take no chances and rewrite it.
23949  # Note: m4 eats our [], so we need to use [ and ] instead.
23950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23951  if test "x$has_forbidden_chars" != x; then
23952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23956      # Going to short mode and back again did indeed matter. Since short mode is
23957      # case insensitive, let's make it lowercase to improve readability.
23958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23959      # Now convert it back to Unix-style (cygpath)
23960      input_path=`$CYGPATH -u "$shortmode_path"`
23961      new_path="$input_path"
23962    fi
23963  fi
23964
23965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23966  if test "x$test_cygdrive_prefix" = x; then
23967    # As a simple fix, exclude /usr/bin since it's not a real path.
23968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23970      # a path prefixed by /cygdrive for fixpath to work.
23971      new_path="$CYGWIN_ROOT_PATH$input_path"
23972    fi
23973  fi
23974
23975
23976  if test "x$path" != "x$new_path"; then
23977    BOOT_JDK="$new_path"
23978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23980  fi
23981
23982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23983
23984  path="$BOOT_JDK"
23985  has_colon=`$ECHO $path | $GREP ^.:`
23986  new_path="$path"
23987  if test "x$has_colon" = x; then
23988    # Not in mixed or Windows style, start by that.
23989    new_path=`cmd //c echo $path`
23990  fi
23991
23992
23993  input_path="$new_path"
23994  # Check if we need to convert this using DOS-style short mode. If the path
23995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23996  # take no chances and rewrite it.
23997  # Note: m4 eats our [], so we need to use [ and ] instead.
23998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23999  if test "x$has_forbidden_chars" != x; then
24000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24002  fi
24003
24004
24005  windows_path="$new_path"
24006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24007    unix_path=`$CYGPATH -u "$windows_path"`
24008    new_path="$unix_path"
24009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24011    new_path="$unix_path"
24012  fi
24013
24014  if test "x$path" != "x$new_path"; then
24015    BOOT_JDK="$new_path"
24016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24018  fi
24019
24020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24022
24023    else
24024      # We're on a unix platform. Hooray! :)
24025      path="$BOOT_JDK"
24026      has_space=`$ECHO "$path" | $GREP " "`
24027      if test "x$has_space" != x; then
24028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24031      fi
24032
24033      # Use eval to expand a potential ~
24034      eval path="$path"
24035      if test ! -f "$path" && test ! -d "$path"; then
24036        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24037      fi
24038
24039      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24040    fi
24041  fi
24042
24043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24044$as_echo_n "checking for Boot JDK... " >&6; }
24045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24046$as_echo "$BOOT_JDK" >&6; }
24047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24048$as_echo_n "checking Boot JDK version... " >&6; }
24049            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24051$as_echo "$BOOT_JDK_VERSION" >&6; }
24052          fi # end check jdk version
24053        fi # end check javac
24054      fi # end check java
24055    fi # end check boot jdk found
24056  fi
24057
24058    done
24059  fi
24060
24061
24062    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24063    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24064      # Do we have a bin/java?
24065      if test ! -x "$BOOT_JDK/bin/java"; then
24066        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24068        BOOT_JDK_FOUND=no
24069      else
24070        # Do we have a bin/javac?
24071        if test ! -x "$BOOT_JDK/bin/javac"; then
24072          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24074          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24075$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24076          BOOT_JDK_FOUND=no
24077        else
24078          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24079          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24080
24081          # Extra M4 quote needed to protect [] in grep expression.
24082          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24083          if test "x$FOUND_CORRECT_VERSION" = x; then
24084            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24086            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24087$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24088            BOOT_JDK_FOUND=no
24089          else
24090            # We're done! :-)
24091            BOOT_JDK_FOUND=yes
24092
24093  # Only process if variable expands to non-empty
24094
24095  if test "x$BOOT_JDK" != x; then
24096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24097
24098  # Input might be given as Windows format, start by converting to
24099  # unix format.
24100  path="$BOOT_JDK"
24101  new_path=`$CYGPATH -u "$path"`
24102
24103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24106  # "foo.exe" is OK but "foo" is an error.
24107  #
24108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24109  # It is also a way to make sure we got the proper file name for the real test later on.
24110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24111  if test "x$test_shortpath" = x; then
24112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24114    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24115  fi
24116
24117  # Call helper function which possibly converts this using DOS-style short mode.
24118  # If so, the updated path is stored in $new_path.
24119
24120  input_path="$new_path"
24121  # Check if we need to convert this using DOS-style short mode. If the path
24122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24123  # take no chances and rewrite it.
24124  # Note: m4 eats our [], so we need to use [ and ] instead.
24125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24126  if test "x$has_forbidden_chars" != x; then
24127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24131      # Going to short mode and back again did indeed matter. Since short mode is
24132      # case insensitive, let's make it lowercase to improve readability.
24133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24134      # Now convert it back to Unix-style (cygpath)
24135      input_path=`$CYGPATH -u "$shortmode_path"`
24136      new_path="$input_path"
24137    fi
24138  fi
24139
24140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24141  if test "x$test_cygdrive_prefix" = x; then
24142    # As a simple fix, exclude /usr/bin since it's not a real path.
24143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24145      # a path prefixed by /cygdrive for fixpath to work.
24146      new_path="$CYGWIN_ROOT_PATH$input_path"
24147    fi
24148  fi
24149
24150
24151  if test "x$path" != "x$new_path"; then
24152    BOOT_JDK="$new_path"
24153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24155  fi
24156
24157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24158
24159  path="$BOOT_JDK"
24160  has_colon=`$ECHO $path | $GREP ^.:`
24161  new_path="$path"
24162  if test "x$has_colon" = x; then
24163    # Not in mixed or Windows style, start by that.
24164    new_path=`cmd //c echo $path`
24165  fi
24166
24167
24168  input_path="$new_path"
24169  # Check if we need to convert this using DOS-style short mode. If the path
24170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24171  # take no chances and rewrite it.
24172  # Note: m4 eats our [], so we need to use [ and ] instead.
24173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24174  if test "x$has_forbidden_chars" != x; then
24175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24177  fi
24178
24179
24180  windows_path="$new_path"
24181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182    unix_path=`$CYGPATH -u "$windows_path"`
24183    new_path="$unix_path"
24184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24186    new_path="$unix_path"
24187  fi
24188
24189  if test "x$path" != "x$new_path"; then
24190    BOOT_JDK="$new_path"
24191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24193  fi
24194
24195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24197
24198    else
24199      # We're on a unix platform. Hooray! :)
24200      path="$BOOT_JDK"
24201      has_space=`$ECHO "$path" | $GREP " "`
24202      if test "x$has_space" != x; then
24203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24206      fi
24207
24208      # Use eval to expand a potential ~
24209      eval path="$path"
24210      if test ! -f "$path" && test ! -d "$path"; then
24211        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24212      fi
24213
24214      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24215    fi
24216  fi
24217
24218            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24219$as_echo_n "checking for Boot JDK... " >&6; }
24220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24221$as_echo "$BOOT_JDK" >&6; }
24222            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24223$as_echo_n "checking Boot JDK version... " >&6; }
24224            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24226$as_echo "$BOOT_JDK_VERSION" >&6; }
24227          fi # end check jdk version
24228        fi # end check javac
24229      fi # end check java
24230    fi # end check boot jdk found
24231  fi
24232
24233  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24234
24235  if test "x$BOOT_JDK_FOUND" = xno; then
24236    # Now execute the test
24237
24238  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24239  BOOT_JDK_SUFFIX="/Contents/Home"
24240  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24241  if test "x$ALL_JDKS_FOUND" != x; then
24242    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24243
24244  if test "x$BOOT_JDK_FOUND" = xno; then
24245    # Now execute the test
24246
24247        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24248        if test -d "$BOOT_JDK"; then
24249          BOOT_JDK_FOUND=maybe
24250          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24251$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24252        fi
24253
24254
24255    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24256    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24257      # Do we have a bin/java?
24258      if test ! -x "$BOOT_JDK/bin/java"; then
24259        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24261        BOOT_JDK_FOUND=no
24262      else
24263        # Do we have a bin/javac?
24264        if test ! -x "$BOOT_JDK/bin/javac"; then
24265          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24267          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24268$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24269          BOOT_JDK_FOUND=no
24270        else
24271          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24272          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24273
24274          # Extra M4 quote needed to protect [] in grep expression.
24275          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24276          if test "x$FOUND_CORRECT_VERSION" = x; then
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24279            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24280$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24281            BOOT_JDK_FOUND=no
24282          else
24283            # We're done! :-)
24284            BOOT_JDK_FOUND=yes
24285
24286  # Only process if variable expands to non-empty
24287
24288  if test "x$BOOT_JDK" != x; then
24289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24290
24291  # Input might be given as Windows format, start by converting to
24292  # unix format.
24293  path="$BOOT_JDK"
24294  new_path=`$CYGPATH -u "$path"`
24295
24296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24299  # "foo.exe" is OK but "foo" is an error.
24300  #
24301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24302  # It is also a way to make sure we got the proper file name for the real test later on.
24303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24304  if test "x$test_shortpath" = x; then
24305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24307    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24308  fi
24309
24310  # Call helper function which possibly converts this using DOS-style short mode.
24311  # If so, the updated path is stored in $new_path.
24312
24313  input_path="$new_path"
24314  # Check if we need to convert this using DOS-style short mode. If the path
24315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24316  # take no chances and rewrite it.
24317  # Note: m4 eats our [], so we need to use [ and ] instead.
24318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24319  if test "x$has_forbidden_chars" != x; then
24320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24324      # Going to short mode and back again did indeed matter. Since short mode is
24325      # case insensitive, let's make it lowercase to improve readability.
24326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24327      # Now convert it back to Unix-style (cygpath)
24328      input_path=`$CYGPATH -u "$shortmode_path"`
24329      new_path="$input_path"
24330    fi
24331  fi
24332
24333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24334  if test "x$test_cygdrive_prefix" = x; then
24335    # As a simple fix, exclude /usr/bin since it's not a real path.
24336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24338      # a path prefixed by /cygdrive for fixpath to work.
24339      new_path="$CYGWIN_ROOT_PATH$input_path"
24340    fi
24341  fi
24342
24343
24344  if test "x$path" != "x$new_path"; then
24345    BOOT_JDK="$new_path"
24346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24348  fi
24349
24350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24351
24352  path="$BOOT_JDK"
24353  has_colon=`$ECHO $path | $GREP ^.:`
24354  new_path="$path"
24355  if test "x$has_colon" = x; then
24356    # Not in mixed or Windows style, start by that.
24357    new_path=`cmd //c echo $path`
24358  fi
24359
24360
24361  input_path="$new_path"
24362  # Check if we need to convert this using DOS-style short mode. If the path
24363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24364  # take no chances and rewrite it.
24365  # Note: m4 eats our [], so we need to use [ and ] instead.
24366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24367  if test "x$has_forbidden_chars" != x; then
24368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24370  fi
24371
24372
24373  windows_path="$new_path"
24374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24375    unix_path=`$CYGPATH -u "$windows_path"`
24376    new_path="$unix_path"
24377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24379    new_path="$unix_path"
24380  fi
24381
24382  if test "x$path" != "x$new_path"; then
24383    BOOT_JDK="$new_path"
24384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24386  fi
24387
24388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24390
24391    else
24392      # We're on a unix platform. Hooray! :)
24393      path="$BOOT_JDK"
24394      has_space=`$ECHO "$path" | $GREP " "`
24395      if test "x$has_space" != x; then
24396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24397$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24399      fi
24400
24401      # Use eval to expand a potential ~
24402      eval path="$path"
24403      if test ! -f "$path" && test ! -d "$path"; then
24404        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24405      fi
24406
24407      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24408    fi
24409  fi
24410
24411            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24412$as_echo_n "checking for Boot JDK... " >&6; }
24413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24414$as_echo "$BOOT_JDK" >&6; }
24415            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24416$as_echo_n "checking Boot JDK version... " >&6; }
24417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24419$as_echo "$BOOT_JDK_VERSION" >&6; }
24420          fi # end check jdk version
24421        fi # end check javac
24422      fi # end check java
24423    fi # end check boot jdk found
24424  fi
24425
24426    done
24427  fi
24428
24429
24430    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24431    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24432      # Do we have a bin/java?
24433      if test ! -x "$BOOT_JDK/bin/java"; then
24434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24436        BOOT_JDK_FOUND=no
24437      else
24438        # Do we have a bin/javac?
24439        if test ! -x "$BOOT_JDK/bin/javac"; then
24440          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24442          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24443$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24444          BOOT_JDK_FOUND=no
24445        else
24446          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24447          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24448
24449          # Extra M4 quote needed to protect [] in grep expression.
24450          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24451          if test "x$FOUND_CORRECT_VERSION" = x; then
24452            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24454            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24455$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24456            BOOT_JDK_FOUND=no
24457          else
24458            # We're done! :-)
24459            BOOT_JDK_FOUND=yes
24460
24461  # Only process if variable expands to non-empty
24462
24463  if test "x$BOOT_JDK" != x; then
24464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24465
24466  # Input might be given as Windows format, start by converting to
24467  # unix format.
24468  path="$BOOT_JDK"
24469  new_path=`$CYGPATH -u "$path"`
24470
24471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24474  # "foo.exe" is OK but "foo" is an error.
24475  #
24476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24477  # It is also a way to make sure we got the proper file name for the real test later on.
24478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24479  if test "x$test_shortpath" = x; then
24480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24482    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24483  fi
24484
24485  # Call helper function which possibly converts this using DOS-style short mode.
24486  # If so, the updated path is stored in $new_path.
24487
24488  input_path="$new_path"
24489  # Check if we need to convert this using DOS-style short mode. If the path
24490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24491  # take no chances and rewrite it.
24492  # Note: m4 eats our [], so we need to use [ and ] instead.
24493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24494  if test "x$has_forbidden_chars" != x; then
24495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24499      # Going to short mode and back again did indeed matter. Since short mode is
24500      # case insensitive, let's make it lowercase to improve readability.
24501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24502      # Now convert it back to Unix-style (cygpath)
24503      input_path=`$CYGPATH -u "$shortmode_path"`
24504      new_path="$input_path"
24505    fi
24506  fi
24507
24508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24509  if test "x$test_cygdrive_prefix" = x; then
24510    # As a simple fix, exclude /usr/bin since it's not a real path.
24511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24513      # a path prefixed by /cygdrive for fixpath to work.
24514      new_path="$CYGWIN_ROOT_PATH$input_path"
24515    fi
24516  fi
24517
24518
24519  if test "x$path" != "x$new_path"; then
24520    BOOT_JDK="$new_path"
24521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24523  fi
24524
24525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24526
24527  path="$BOOT_JDK"
24528  has_colon=`$ECHO $path | $GREP ^.:`
24529  new_path="$path"
24530  if test "x$has_colon" = x; then
24531    # Not in mixed or Windows style, start by that.
24532    new_path=`cmd //c echo $path`
24533  fi
24534
24535
24536  input_path="$new_path"
24537  # Check if we need to convert this using DOS-style short mode. If the path
24538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24539  # take no chances and rewrite it.
24540  # Note: m4 eats our [], so we need to use [ and ] instead.
24541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24542  if test "x$has_forbidden_chars" != x; then
24543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24545  fi
24546
24547
24548  windows_path="$new_path"
24549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24550    unix_path=`$CYGPATH -u "$windows_path"`
24551    new_path="$unix_path"
24552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24554    new_path="$unix_path"
24555  fi
24556
24557  if test "x$path" != "x$new_path"; then
24558    BOOT_JDK="$new_path"
24559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24561  fi
24562
24563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24565
24566    else
24567      # We're on a unix platform. Hooray! :)
24568      path="$BOOT_JDK"
24569      has_space=`$ECHO "$path" | $GREP " "`
24570      if test "x$has_space" != x; then
24571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24574      fi
24575
24576      # Use eval to expand a potential ~
24577      eval path="$path"
24578      if test ! -f "$path" && test ! -d "$path"; then
24579        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24580      fi
24581
24582      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24583    fi
24584  fi
24585
24586            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24587$as_echo_n "checking for Boot JDK... " >&6; }
24588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24589$as_echo "$BOOT_JDK" >&6; }
24590            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24591$as_echo_n "checking Boot JDK version... " >&6; }
24592            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24594$as_echo "$BOOT_JDK_VERSION" >&6; }
24595          fi # end check jdk version
24596        fi # end check javac
24597      fi # end check java
24598    fi # end check boot jdk found
24599  fi
24600
24601
24602  if test "x$BOOT_JDK_FOUND" = xno; then
24603    # Now execute the test
24604
24605  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24606  BOOT_JDK_SUFFIX="/Contents/Home"
24607  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24608  if test "x$ALL_JDKS_FOUND" != x; then
24609    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24610
24611  if test "x$BOOT_JDK_FOUND" = xno; then
24612    # Now execute the test
24613
24614        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24615        if test -d "$BOOT_JDK"; then
24616          BOOT_JDK_FOUND=maybe
24617          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24618$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24619        fi
24620
24621
24622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24624      # Do we have a bin/java?
24625      if test ! -x "$BOOT_JDK/bin/java"; then
24626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24628        BOOT_JDK_FOUND=no
24629      else
24630        # Do we have a bin/javac?
24631        if test ! -x "$BOOT_JDK/bin/javac"; then
24632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24636          BOOT_JDK_FOUND=no
24637        else
24638          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24639          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24640
24641          # Extra M4 quote needed to protect [] in grep expression.
24642          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24643          if test "x$FOUND_CORRECT_VERSION" = x; then
24644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24646            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24648            BOOT_JDK_FOUND=no
24649          else
24650            # We're done! :-)
24651            BOOT_JDK_FOUND=yes
24652
24653  # Only process if variable expands to non-empty
24654
24655  if test "x$BOOT_JDK" != x; then
24656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24657
24658  # Input might be given as Windows format, start by converting to
24659  # unix format.
24660  path="$BOOT_JDK"
24661  new_path=`$CYGPATH -u "$path"`
24662
24663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24666  # "foo.exe" is OK but "foo" is an error.
24667  #
24668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24669  # It is also a way to make sure we got the proper file name for the real test later on.
24670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24671  if test "x$test_shortpath" = x; then
24672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24675  fi
24676
24677  # Call helper function which possibly converts this using DOS-style short mode.
24678  # If so, the updated path is stored in $new_path.
24679
24680  input_path="$new_path"
24681  # Check if we need to convert this using DOS-style short mode. If the path
24682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24683  # take no chances and rewrite it.
24684  # Note: m4 eats our [], so we need to use [ and ] instead.
24685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24686  if test "x$has_forbidden_chars" != x; then
24687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24691      # Going to short mode and back again did indeed matter. Since short mode is
24692      # case insensitive, let's make it lowercase to improve readability.
24693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24694      # Now convert it back to Unix-style (cygpath)
24695      input_path=`$CYGPATH -u "$shortmode_path"`
24696      new_path="$input_path"
24697    fi
24698  fi
24699
24700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24701  if test "x$test_cygdrive_prefix" = x; then
24702    # As a simple fix, exclude /usr/bin since it's not a real path.
24703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24705      # a path prefixed by /cygdrive for fixpath to work.
24706      new_path="$CYGWIN_ROOT_PATH$input_path"
24707    fi
24708  fi
24709
24710
24711  if test "x$path" != "x$new_path"; then
24712    BOOT_JDK="$new_path"
24713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24715  fi
24716
24717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718
24719  path="$BOOT_JDK"
24720  has_colon=`$ECHO $path | $GREP ^.:`
24721  new_path="$path"
24722  if test "x$has_colon" = x; then
24723    # Not in mixed or Windows style, start by that.
24724    new_path=`cmd //c echo $path`
24725  fi
24726
24727
24728  input_path="$new_path"
24729  # Check if we need to convert this using DOS-style short mode. If the path
24730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24731  # take no chances and rewrite it.
24732  # Note: m4 eats our [], so we need to use [ and ] instead.
24733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24734  if test "x$has_forbidden_chars" != x; then
24735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24737  fi
24738
24739
24740  windows_path="$new_path"
24741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24742    unix_path=`$CYGPATH -u "$windows_path"`
24743    new_path="$unix_path"
24744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24746    new_path="$unix_path"
24747  fi
24748
24749  if test "x$path" != "x$new_path"; then
24750    BOOT_JDK="$new_path"
24751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24753  fi
24754
24755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24757
24758    else
24759      # We're on a unix platform. Hooray! :)
24760      path="$BOOT_JDK"
24761      has_space=`$ECHO "$path" | $GREP " "`
24762      if test "x$has_space" != x; then
24763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24766      fi
24767
24768      # Use eval to expand a potential ~
24769      eval path="$path"
24770      if test ! -f "$path" && test ! -d "$path"; then
24771        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24772      fi
24773
24774      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24775    fi
24776  fi
24777
24778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24779$as_echo_n "checking for Boot JDK... " >&6; }
24780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24781$as_echo "$BOOT_JDK" >&6; }
24782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24783$as_echo_n "checking Boot JDK version... " >&6; }
24784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24786$as_echo "$BOOT_JDK_VERSION" >&6; }
24787          fi # end check jdk version
24788        fi # end check javac
24789      fi # end check java
24790    fi # end check boot jdk found
24791  fi
24792
24793    done
24794  fi
24795
24796
24797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24799      # Do we have a bin/java?
24800      if test ! -x "$BOOT_JDK/bin/java"; then
24801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24803        BOOT_JDK_FOUND=no
24804      else
24805        # Do we have a bin/javac?
24806        if test ! -x "$BOOT_JDK/bin/javac"; then
24807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24811          BOOT_JDK_FOUND=no
24812        else
24813          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24814          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24815
24816          # Extra M4 quote needed to protect [] in grep expression.
24817          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24818          if test "x$FOUND_CORRECT_VERSION" = x; then
24819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24821            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24822$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24823            BOOT_JDK_FOUND=no
24824          else
24825            # We're done! :-)
24826            BOOT_JDK_FOUND=yes
24827
24828  # Only process if variable expands to non-empty
24829
24830  if test "x$BOOT_JDK" != x; then
24831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24832
24833  # Input might be given as Windows format, start by converting to
24834  # unix format.
24835  path="$BOOT_JDK"
24836  new_path=`$CYGPATH -u "$path"`
24837
24838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24841  # "foo.exe" is OK but "foo" is an error.
24842  #
24843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24844  # It is also a way to make sure we got the proper file name for the real test later on.
24845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24846  if test "x$test_shortpath" = x; then
24847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24850  fi
24851
24852  # Call helper function which possibly converts this using DOS-style short mode.
24853  # If so, the updated path is stored in $new_path.
24854
24855  input_path="$new_path"
24856  # Check if we need to convert this using DOS-style short mode. If the path
24857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24858  # take no chances and rewrite it.
24859  # Note: m4 eats our [], so we need to use [ and ] instead.
24860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24861  if test "x$has_forbidden_chars" != x; then
24862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24866      # Going to short mode and back again did indeed matter. Since short mode is
24867      # case insensitive, let's make it lowercase to improve readability.
24868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24869      # Now convert it back to Unix-style (cygpath)
24870      input_path=`$CYGPATH -u "$shortmode_path"`
24871      new_path="$input_path"
24872    fi
24873  fi
24874
24875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24876  if test "x$test_cygdrive_prefix" = x; then
24877    # As a simple fix, exclude /usr/bin since it's not a real path.
24878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24880      # a path prefixed by /cygdrive for fixpath to work.
24881      new_path="$CYGWIN_ROOT_PATH$input_path"
24882    fi
24883  fi
24884
24885
24886  if test "x$path" != "x$new_path"; then
24887    BOOT_JDK="$new_path"
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24890  fi
24891
24892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24893
24894  path="$BOOT_JDK"
24895  has_colon=`$ECHO $path | $GREP ^.:`
24896  new_path="$path"
24897  if test "x$has_colon" = x; then
24898    # Not in mixed or Windows style, start by that.
24899    new_path=`cmd //c echo $path`
24900  fi
24901
24902
24903  input_path="$new_path"
24904  # Check if we need to convert this using DOS-style short mode. If the path
24905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24906  # take no chances and rewrite it.
24907  # Note: m4 eats our [], so we need to use [ and ] instead.
24908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24909  if test "x$has_forbidden_chars" != x; then
24910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24912  fi
24913
24914
24915  windows_path="$new_path"
24916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24917    unix_path=`$CYGPATH -u "$windows_path"`
24918    new_path="$unix_path"
24919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24921    new_path="$unix_path"
24922  fi
24923
24924  if test "x$path" != "x$new_path"; then
24925    BOOT_JDK="$new_path"
24926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24928  fi
24929
24930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24932
24933    else
24934      # We're on a unix platform. Hooray! :)
24935      path="$BOOT_JDK"
24936      has_space=`$ECHO "$path" | $GREP " "`
24937      if test "x$has_space" != x; then
24938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24941      fi
24942
24943      # Use eval to expand a potential ~
24944      eval path="$path"
24945      if test ! -f "$path" && test ! -d "$path"; then
24946        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24947      fi
24948
24949      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24950    fi
24951  fi
24952
24953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24954$as_echo_n "checking for Boot JDK... " >&6; }
24955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24956$as_echo "$BOOT_JDK" >&6; }
24957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24958$as_echo_n "checking Boot JDK version... " >&6; }
24959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24961$as_echo "$BOOT_JDK_VERSION" >&6; }
24962          fi # end check jdk version
24963        fi # end check javac
24964      fi # end check java
24965    fi # end check boot jdk found
24966  fi
24967
24968  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24969
24970  if test "x$BOOT_JDK_FOUND" = xno; then
24971    # Now execute the test
24972
24973  BOOT_JDK_PREFIX="/usr/lib/jvm"
24974  BOOT_JDK_SUFFIX=""
24975  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24976  if test "x$ALL_JDKS_FOUND" != x; then
24977    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24978
24979  if test "x$BOOT_JDK_FOUND" = xno; then
24980    # Now execute the test
24981
24982        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24983        if test -d "$BOOT_JDK"; then
24984          BOOT_JDK_FOUND=maybe
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24986$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24987        fi
24988
24989
24990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24992      # Do we have a bin/java?
24993      if test ! -x "$BOOT_JDK/bin/java"; then
24994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24996        BOOT_JDK_FOUND=no
24997      else
24998        # Do we have a bin/javac?
24999        if test ! -x "$BOOT_JDK/bin/javac"; then
25000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25004          BOOT_JDK_FOUND=no
25005        else
25006          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25007          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25008
25009          # Extra M4 quote needed to protect [] in grep expression.
25010          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25011          if test "x$FOUND_CORRECT_VERSION" = x; then
25012            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25014            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25015$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25016            BOOT_JDK_FOUND=no
25017          else
25018            # We're done! :-)
25019            BOOT_JDK_FOUND=yes
25020
25021  # Only process if variable expands to non-empty
25022
25023  if test "x$BOOT_JDK" != x; then
25024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25025
25026  # Input might be given as Windows format, start by converting to
25027  # unix format.
25028  path="$BOOT_JDK"
25029  new_path=`$CYGPATH -u "$path"`
25030
25031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25034  # "foo.exe" is OK but "foo" is an error.
25035  #
25036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25037  # It is also a way to make sure we got the proper file name for the real test later on.
25038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25039  if test "x$test_shortpath" = x; then
25040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25042    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25043  fi
25044
25045  # Call helper function which possibly converts this using DOS-style short mode.
25046  # If so, the updated path is stored in $new_path.
25047
25048  input_path="$new_path"
25049  # Check if we need to convert this using DOS-style short mode. If the path
25050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25051  # take no chances and rewrite it.
25052  # Note: m4 eats our [], so we need to use [ and ] instead.
25053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25054  if test "x$has_forbidden_chars" != x; then
25055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25059      # Going to short mode and back again did indeed matter. Since short mode is
25060      # case insensitive, let's make it lowercase to improve readability.
25061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25062      # Now convert it back to Unix-style (cygpath)
25063      input_path=`$CYGPATH -u "$shortmode_path"`
25064      new_path="$input_path"
25065    fi
25066  fi
25067
25068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25069  if test "x$test_cygdrive_prefix" = x; then
25070    # As a simple fix, exclude /usr/bin since it's not a real path.
25071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25073      # a path prefixed by /cygdrive for fixpath to work.
25074      new_path="$CYGWIN_ROOT_PATH$input_path"
25075    fi
25076  fi
25077
25078
25079  if test "x$path" != "x$new_path"; then
25080    BOOT_JDK="$new_path"
25081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25083  fi
25084
25085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25086
25087  path="$BOOT_JDK"
25088  has_colon=`$ECHO $path | $GREP ^.:`
25089  new_path="$path"
25090  if test "x$has_colon" = x; then
25091    # Not in mixed or Windows style, start by that.
25092    new_path=`cmd //c echo $path`
25093  fi
25094
25095
25096  input_path="$new_path"
25097  # Check if we need to convert this using DOS-style short mode. If the path
25098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25099  # take no chances and rewrite it.
25100  # Note: m4 eats our [], so we need to use [ and ] instead.
25101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25102  if test "x$has_forbidden_chars" != x; then
25103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25105  fi
25106
25107
25108  windows_path="$new_path"
25109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110    unix_path=`$CYGPATH -u "$windows_path"`
25111    new_path="$unix_path"
25112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25114    new_path="$unix_path"
25115  fi
25116
25117  if test "x$path" != "x$new_path"; then
25118    BOOT_JDK="$new_path"
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25121  fi
25122
25123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25125
25126    else
25127      # We're on a unix platform. Hooray! :)
25128      path="$BOOT_JDK"
25129      has_space=`$ECHO "$path" | $GREP " "`
25130      if test "x$has_space" != x; then
25131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25134      fi
25135
25136      # Use eval to expand a potential ~
25137      eval path="$path"
25138      if test ! -f "$path" && test ! -d "$path"; then
25139        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25140      fi
25141
25142      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25143    fi
25144  fi
25145
25146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25147$as_echo_n "checking for Boot JDK... " >&6; }
25148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25149$as_echo "$BOOT_JDK" >&6; }
25150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25151$as_echo_n "checking Boot JDK version... " >&6; }
25152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25154$as_echo "$BOOT_JDK_VERSION" >&6; }
25155          fi # end check jdk version
25156        fi # end check javac
25157      fi # end check java
25158    fi # end check boot jdk found
25159  fi
25160
25161    done
25162  fi
25163
25164
25165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25167      # Do we have a bin/java?
25168      if test ! -x "$BOOT_JDK/bin/java"; then
25169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25171        BOOT_JDK_FOUND=no
25172      else
25173        # Do we have a bin/javac?
25174        if test ! -x "$BOOT_JDK/bin/javac"; then
25175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25179          BOOT_JDK_FOUND=no
25180        else
25181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25183
25184          # Extra M4 quote needed to protect [] in grep expression.
25185          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25186          if test "x$FOUND_CORRECT_VERSION" = x; then
25187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25191            BOOT_JDK_FOUND=no
25192          else
25193            # We're done! :-)
25194            BOOT_JDK_FOUND=yes
25195
25196  # Only process if variable expands to non-empty
25197
25198  if test "x$BOOT_JDK" != x; then
25199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25200
25201  # Input might be given as Windows format, start by converting to
25202  # unix format.
25203  path="$BOOT_JDK"
25204  new_path=`$CYGPATH -u "$path"`
25205
25206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25209  # "foo.exe" is OK but "foo" is an error.
25210  #
25211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25212  # It is also a way to make sure we got the proper file name for the real test later on.
25213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25214  if test "x$test_shortpath" = x; then
25215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25218  fi
25219
25220  # Call helper function which possibly converts this using DOS-style short mode.
25221  # If so, the updated path is stored in $new_path.
25222
25223  input_path="$new_path"
25224  # Check if we need to convert this using DOS-style short mode. If the path
25225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25226  # take no chances and rewrite it.
25227  # Note: m4 eats our [], so we need to use [ and ] instead.
25228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25229  if test "x$has_forbidden_chars" != x; then
25230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25234      # Going to short mode and back again did indeed matter. Since short mode is
25235      # case insensitive, let's make it lowercase to improve readability.
25236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25237      # Now convert it back to Unix-style (cygpath)
25238      input_path=`$CYGPATH -u "$shortmode_path"`
25239      new_path="$input_path"
25240    fi
25241  fi
25242
25243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25244  if test "x$test_cygdrive_prefix" = x; then
25245    # As a simple fix, exclude /usr/bin since it's not a real path.
25246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25248      # a path prefixed by /cygdrive for fixpath to work.
25249      new_path="$CYGWIN_ROOT_PATH$input_path"
25250    fi
25251  fi
25252
25253
25254  if test "x$path" != "x$new_path"; then
25255    BOOT_JDK="$new_path"
25256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25258  fi
25259
25260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25261
25262  path="$BOOT_JDK"
25263  has_colon=`$ECHO $path | $GREP ^.:`
25264  new_path="$path"
25265  if test "x$has_colon" = x; then
25266    # Not in mixed or Windows style, start by that.
25267    new_path=`cmd //c echo $path`
25268  fi
25269
25270
25271  input_path="$new_path"
25272  # Check if we need to convert this using DOS-style short mode. If the path
25273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25274  # take no chances and rewrite it.
25275  # Note: m4 eats our [], so we need to use [ and ] instead.
25276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25277  if test "x$has_forbidden_chars" != x; then
25278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25280  fi
25281
25282
25283  windows_path="$new_path"
25284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285    unix_path=`$CYGPATH -u "$windows_path"`
25286    new_path="$unix_path"
25287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25289    new_path="$unix_path"
25290  fi
25291
25292  if test "x$path" != "x$new_path"; then
25293    BOOT_JDK="$new_path"
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25296  fi
25297
25298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25300
25301    else
25302      # We're on a unix platform. Hooray! :)
25303      path="$BOOT_JDK"
25304      has_space=`$ECHO "$path" | $GREP " "`
25305      if test "x$has_space" != x; then
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25309      fi
25310
25311      # Use eval to expand a potential ~
25312      eval path="$path"
25313      if test ! -f "$path" && test ! -d "$path"; then
25314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25315      fi
25316
25317      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25318    fi
25319  fi
25320
25321            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25322$as_echo_n "checking for Boot JDK... " >&6; }
25323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25324$as_echo "$BOOT_JDK" >&6; }
25325            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25326$as_echo_n "checking Boot JDK version... " >&6; }
25327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25329$as_echo "$BOOT_JDK_VERSION" >&6; }
25330          fi # end check jdk version
25331        fi # end check javac
25332      fi # end check java
25333    fi # end check boot jdk found
25334  fi
25335
25336  fi
25337
25338
25339    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25340    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25341      # Do we have a bin/java?
25342      if test ! -x "$BOOT_JDK/bin/java"; then
25343        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25345        BOOT_JDK_FOUND=no
25346      else
25347        # Do we have a bin/javac?
25348        if test ! -x "$BOOT_JDK/bin/javac"; then
25349          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25351          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25352$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25353          BOOT_JDK_FOUND=no
25354        else
25355          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25356          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25357
25358          # Extra M4 quote needed to protect [] in grep expression.
25359          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25360          if test "x$FOUND_CORRECT_VERSION" = x; then
25361            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25363            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25364$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25365            BOOT_JDK_FOUND=no
25366          else
25367            # We're done! :-)
25368            BOOT_JDK_FOUND=yes
25369
25370  # Only process if variable expands to non-empty
25371
25372  if test "x$BOOT_JDK" != x; then
25373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25374
25375  # Input might be given as Windows format, start by converting to
25376  # unix format.
25377  path="$BOOT_JDK"
25378  new_path=`$CYGPATH -u "$path"`
25379
25380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25383  # "foo.exe" is OK but "foo" is an error.
25384  #
25385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25386  # It is also a way to make sure we got the proper file name for the real test later on.
25387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25388  if test "x$test_shortpath" = x; then
25389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25391    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25392  fi
25393
25394  # Call helper function which possibly converts this using DOS-style short mode.
25395  # If so, the updated path is stored in $new_path.
25396
25397  input_path="$new_path"
25398  # Check if we need to convert this using DOS-style short mode. If the path
25399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25400  # take no chances and rewrite it.
25401  # Note: m4 eats our [], so we need to use [ and ] instead.
25402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25403  if test "x$has_forbidden_chars" != x; then
25404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25408      # Going to short mode and back again did indeed matter. Since short mode is
25409      # case insensitive, let's make it lowercase to improve readability.
25410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25411      # Now convert it back to Unix-style (cygpath)
25412      input_path=`$CYGPATH -u "$shortmode_path"`
25413      new_path="$input_path"
25414    fi
25415  fi
25416
25417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25418  if test "x$test_cygdrive_prefix" = x; then
25419    # As a simple fix, exclude /usr/bin since it's not a real path.
25420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25422      # a path prefixed by /cygdrive for fixpath to work.
25423      new_path="$CYGWIN_ROOT_PATH$input_path"
25424    fi
25425  fi
25426
25427
25428  if test "x$path" != "x$new_path"; then
25429    BOOT_JDK="$new_path"
25430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25431$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25432  fi
25433
25434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25435
25436  path="$BOOT_JDK"
25437  has_colon=`$ECHO $path | $GREP ^.:`
25438  new_path="$path"
25439  if test "x$has_colon" = x; then
25440    # Not in mixed or Windows style, start by that.
25441    new_path=`cmd //c echo $path`
25442  fi
25443
25444
25445  input_path="$new_path"
25446  # Check if we need to convert this using DOS-style short mode. If the path
25447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25448  # take no chances and rewrite it.
25449  # Note: m4 eats our [], so we need to use [ and ] instead.
25450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25451  if test "x$has_forbidden_chars" != x; then
25452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25454  fi
25455
25456
25457  windows_path="$new_path"
25458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459    unix_path=`$CYGPATH -u "$windows_path"`
25460    new_path="$unix_path"
25461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25463    new_path="$unix_path"
25464  fi
25465
25466  if test "x$path" != "x$new_path"; then
25467    BOOT_JDK="$new_path"
25468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25469$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25470  fi
25471
25472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25474
25475    else
25476      # We're on a unix platform. Hooray! :)
25477      path="$BOOT_JDK"
25478      has_space=`$ECHO "$path" | $GREP " "`
25479      if test "x$has_space" != x; then
25480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25482        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25483      fi
25484
25485      # Use eval to expand a potential ~
25486      eval path="$path"
25487      if test ! -f "$path" && test ! -d "$path"; then
25488        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25489      fi
25490
25491      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25492    fi
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 javac
25506      fi # end check java
25507    fi # end check boot jdk found
25508  fi
25509
25510
25511  # If we haven't found anything yet, we've truly lost. Give up.
25512  if test "x$BOOT_JDK_FOUND" = xno; then
25513
25514  # Print a helpful message on how to acquire the necessary build dependency.
25515  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25516  MISSING_DEPENDENCY=openjdk
25517
25518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25519    cygwin_help $MISSING_DEPENDENCY
25520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25521    msys_help $MISSING_DEPENDENCY
25522  else
25523    PKGHANDLER_COMMAND=
25524
25525    case $PKGHANDLER in
25526      apt-get)
25527        apt_help     $MISSING_DEPENDENCY ;;
25528      yum)
25529        yum_help     $MISSING_DEPENDENCY ;;
25530      port)
25531        port_help    $MISSING_DEPENDENCY ;;
25532      pkgutil)
25533        pkgutil_help $MISSING_DEPENDENCY ;;
25534      pkgadd)
25535        pkgadd_help  $MISSING_DEPENDENCY ;;
25536    esac
25537
25538    if test "x$PKGHANDLER_COMMAND" != x; then
25539      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25540    fi
25541  fi
25542
25543    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25544$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25545    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25546$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25547    as_fn_error $? "Cannot continue" "$LINENO" 5
25548  fi
25549
25550
25551
25552  # Setup tools from the Boot JDK.
25553
25554  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25555
25556  # Publish this variable in the help.
25557
25558
25559  if test "x$JAVA" = x; then
25560    # The variable is not set by user, try to locate tool using the code snippet
25561
25562      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25563$as_echo_n "checking for java in Boot JDK... " >&6; }
25564      JAVA=$BOOT_JDK/bin/java
25565      if test ! -x $JAVA; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25567$as_echo "not found" >&6; }
25568        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25569$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25570        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25571      fi
25572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25573$as_echo "ok" >&6; }
25574
25575
25576  else
25577    # The variable is set, but is it from the command line or the environment?
25578
25579    # Try to remove the string !JAVA! from our list.
25580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25582      # If it failed, the variable was not from the command line. Ignore it,
25583      # but warn the user (except for BASH, which is always set by the calling BASH).
25584      if test "xJAVA" != xBASH; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25586$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25587      fi
25588      # Try to locate tool using the code snippet
25589
25590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25591$as_echo_n "checking for java in Boot JDK... " >&6; }
25592      JAVA=$BOOT_JDK/bin/java
25593      if test ! -x $JAVA; then
25594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25595$as_echo "not found" >&6; }
25596        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25597$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25598        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25599      fi
25600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25601$as_echo "ok" >&6; }
25602
25603
25604    else
25605      # If it succeeded, then it was overridden by the user. We will use it
25606      # for the tool.
25607
25608      # First remove it from the list of overridden variables, so we can test
25609      # for unknown variables in the end.
25610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25611
25612      # Check if the provided tool contains a complete path.
25613      tool_specified="$JAVA"
25614      tool_basename="${tool_specified##*/}"
25615      if test "x$tool_basename" = "x$tool_specified"; then
25616        # A command without a complete path is provided, search $PATH.
25617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25618$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25619        # Extract the first word of "$tool_basename", so it can be a program name with args.
25620set dummy $tool_basename; ac_word=$2
25621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25622$as_echo_n "checking for $ac_word... " >&6; }
25623if ${ac_cv_path_JAVA+:} false; then :
25624  $as_echo_n "(cached) " >&6
25625else
25626  case $JAVA in
25627  [\\/]* | ?:[\\/]*)
25628  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25629  ;;
25630  *)
25631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25632for as_dir in $PATH
25633do
25634  IFS=$as_save_IFS
25635  test -z "$as_dir" && as_dir=.
25636    for ac_exec_ext in '' $ac_executable_extensions; do
25637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25638    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25640    break 2
25641  fi
25642done
25643  done
25644IFS=$as_save_IFS
25645
25646  ;;
25647esac
25648fi
25649JAVA=$ac_cv_path_JAVA
25650if test -n "$JAVA"; then
25651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25652$as_echo "$JAVA" >&6; }
25653else
25654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25655$as_echo "no" >&6; }
25656fi
25657
25658
25659        if test "x$JAVA" = x; then
25660          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25661        fi
25662      else
25663        # Otherwise we believe it is a complete path. Use it as it is.
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25665$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25667$as_echo_n "checking for JAVA... " >&6; }
25668        if test ! -x "$tool_specified"; then
25669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25670$as_echo "not found" >&6; }
25671          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25672        fi
25673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25674$as_echo "$tool_specified" >&6; }
25675      fi
25676    fi
25677  fi
25678
25679
25680
25681  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25682
25683  # Publish this variable in the help.
25684
25685
25686  if test "x$JAVAC" = x; then
25687    # The variable is not set by user, try to locate tool using the code snippet
25688
25689      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25690$as_echo_n "checking for javac in Boot JDK... " >&6; }
25691      JAVAC=$BOOT_JDK/bin/javac
25692      if test ! -x $JAVAC; then
25693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25694$as_echo "not found" >&6; }
25695        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25696$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25697        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25698      fi
25699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25700$as_echo "ok" >&6; }
25701
25702
25703  else
25704    # The variable is set, but is it from the command line or the environment?
25705
25706    # Try to remove the string !JAVAC! from our list.
25707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25709      # If it failed, the variable was not from the command line. Ignore it,
25710      # but warn the user (except for BASH, which is always set by the calling BASH).
25711      if test "xJAVAC" != xBASH; then
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25713$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25714      fi
25715      # Try to locate tool using the code snippet
25716
25717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25718$as_echo_n "checking for javac in Boot JDK... " >&6; }
25719      JAVAC=$BOOT_JDK/bin/javac
25720      if test ! -x $JAVAC; then
25721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25722$as_echo "not found" >&6; }
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25724$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25725        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25726      fi
25727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25728$as_echo "ok" >&6; }
25729
25730
25731    else
25732      # If it succeeded, then it was overridden by the user. We will use it
25733      # for the tool.
25734
25735      # First remove it from the list of overridden variables, so we can test
25736      # for unknown variables in the end.
25737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25738
25739      # Check if the provided tool contains a complete path.
25740      tool_specified="$JAVAC"
25741      tool_basename="${tool_specified##*/}"
25742      if test "x$tool_basename" = "x$tool_specified"; then
25743        # A command without a complete path is provided, search $PATH.
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25745$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25746        # Extract the first word of "$tool_basename", so it can be a program name with args.
25747set dummy $tool_basename; ac_word=$2
25748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25749$as_echo_n "checking for $ac_word... " >&6; }
25750if ${ac_cv_path_JAVAC+:} false; then :
25751  $as_echo_n "(cached) " >&6
25752else
25753  case $JAVAC in
25754  [\\/]* | ?:[\\/]*)
25755  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25756  ;;
25757  *)
25758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25759for as_dir in $PATH
25760do
25761  IFS=$as_save_IFS
25762  test -z "$as_dir" && as_dir=.
25763    for ac_exec_ext in '' $ac_executable_extensions; do
25764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25765    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25767    break 2
25768  fi
25769done
25770  done
25771IFS=$as_save_IFS
25772
25773  ;;
25774esac
25775fi
25776JAVAC=$ac_cv_path_JAVAC
25777if test -n "$JAVAC"; then
25778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25779$as_echo "$JAVAC" >&6; }
25780else
25781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25782$as_echo "no" >&6; }
25783fi
25784
25785
25786        if test "x$JAVAC" = x; then
25787          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25788        fi
25789      else
25790        # Otherwise we believe it is a complete path. Use it as it is.
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25792$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25794$as_echo_n "checking for JAVAC... " >&6; }
25795        if test ! -x "$tool_specified"; then
25796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25797$as_echo "not found" >&6; }
25798          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25799        fi
25800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25801$as_echo "$tool_specified" >&6; }
25802      fi
25803    fi
25804  fi
25805
25806
25807
25808  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25809
25810  # Publish this variable in the help.
25811
25812
25813  if test "x$JAVAH" = x; then
25814    # The variable is not set by user, try to locate tool using the code snippet
25815
25816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25817$as_echo_n "checking for javah in Boot JDK... " >&6; }
25818      JAVAH=$BOOT_JDK/bin/javah
25819      if test ! -x $JAVAH; then
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25821$as_echo "not found" >&6; }
25822        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25823$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25824        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25825      fi
25826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25827$as_echo "ok" >&6; }
25828
25829
25830  else
25831    # The variable is set, but is it from the command line or the environment?
25832
25833    # Try to remove the string !JAVAH! from our list.
25834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25836      # If it failed, the variable was not from the command line. Ignore it,
25837      # but warn the user (except for BASH, which is always set by the calling BASH).
25838      if test "xJAVAH" != xBASH; then
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25840$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25841      fi
25842      # Try to locate tool using the code snippet
25843
25844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25845$as_echo_n "checking for javah in Boot JDK... " >&6; }
25846      JAVAH=$BOOT_JDK/bin/javah
25847      if test ! -x $JAVAH; then
25848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25849$as_echo "not found" >&6; }
25850        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25851$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25852        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25853      fi
25854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25855$as_echo "ok" >&6; }
25856
25857
25858    else
25859      # If it succeeded, then it was overridden by the user. We will use it
25860      # for the tool.
25861
25862      # First remove it from the list of overridden variables, so we can test
25863      # for unknown variables in the end.
25864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25865
25866      # Check if the provided tool contains a complete path.
25867      tool_specified="$JAVAH"
25868      tool_basename="${tool_specified##*/}"
25869      if test "x$tool_basename" = "x$tool_specified"; then
25870        # A command without a complete path is provided, search $PATH.
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25872$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25873        # Extract the first word of "$tool_basename", so it can be a program name with args.
25874set dummy $tool_basename; ac_word=$2
25875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25876$as_echo_n "checking for $ac_word... " >&6; }
25877if ${ac_cv_path_JAVAH+:} false; then :
25878  $as_echo_n "(cached) " >&6
25879else
25880  case $JAVAH in
25881  [\\/]* | ?:[\\/]*)
25882  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25883  ;;
25884  *)
25885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25886for as_dir in $PATH
25887do
25888  IFS=$as_save_IFS
25889  test -z "$as_dir" && as_dir=.
25890    for ac_exec_ext in '' $ac_executable_extensions; do
25891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25892    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25894    break 2
25895  fi
25896done
25897  done
25898IFS=$as_save_IFS
25899
25900  ;;
25901esac
25902fi
25903JAVAH=$ac_cv_path_JAVAH
25904if test -n "$JAVAH"; then
25905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25906$as_echo "$JAVAH" >&6; }
25907else
25908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25909$as_echo "no" >&6; }
25910fi
25911
25912
25913        if test "x$JAVAH" = x; then
25914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25915        fi
25916      else
25917        # Otherwise we believe it is a complete path. Use it as it is.
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25919$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25921$as_echo_n "checking for JAVAH... " >&6; }
25922        if test ! -x "$tool_specified"; then
25923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25924$as_echo "not found" >&6; }
25925          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25926        fi
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25928$as_echo "$tool_specified" >&6; }
25929      fi
25930    fi
25931  fi
25932
25933
25934
25935  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25936
25937  # Publish this variable in the help.
25938
25939
25940  if test "x$JAR" = x; then
25941    # The variable is not set by user, try to locate tool using the code snippet
25942
25943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25944$as_echo_n "checking for jar in Boot JDK... " >&6; }
25945      JAR=$BOOT_JDK/bin/jar
25946      if test ! -x $JAR; then
25947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25948$as_echo "not found" >&6; }
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25950$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25951        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25952      fi
25953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25954$as_echo "ok" >&6; }
25955
25956
25957  else
25958    # The variable is set, but is it from the command line or the environment?
25959
25960    # Try to remove the string !JAR! from our list.
25961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25963      # If it failed, the variable was not from the command line. Ignore it,
25964      # but warn the user (except for BASH, which is always set by the calling BASH).
25965      if test "xJAR" != xBASH; then
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25967$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25968      fi
25969      # Try to locate tool using the code snippet
25970
25971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25972$as_echo_n "checking for jar in Boot JDK... " >&6; }
25973      JAR=$BOOT_JDK/bin/jar
25974      if test ! -x $JAR; then
25975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25976$as_echo "not found" >&6; }
25977        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25978$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25979        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25980      fi
25981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25982$as_echo "ok" >&6; }
25983
25984
25985    else
25986      # If it succeeded, then it was overridden by the user. We will use it
25987      # for the tool.
25988
25989      # First remove it from the list of overridden variables, so we can test
25990      # for unknown variables in the end.
25991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25992
25993      # Check if the provided tool contains a complete path.
25994      tool_specified="$JAR"
25995      tool_basename="${tool_specified##*/}"
25996      if test "x$tool_basename" = "x$tool_specified"; then
25997        # A command without a complete path is provided, search $PATH.
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25999$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26000        # Extract the first word of "$tool_basename", so it can be a program name with args.
26001set dummy $tool_basename; ac_word=$2
26002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26003$as_echo_n "checking for $ac_word... " >&6; }
26004if ${ac_cv_path_JAR+:} false; then :
26005  $as_echo_n "(cached) " >&6
26006else
26007  case $JAR in
26008  [\\/]* | ?:[\\/]*)
26009  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26010  ;;
26011  *)
26012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26013for as_dir in $PATH
26014do
26015  IFS=$as_save_IFS
26016  test -z "$as_dir" && as_dir=.
26017    for ac_exec_ext in '' $ac_executable_extensions; do
26018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26019    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26021    break 2
26022  fi
26023done
26024  done
26025IFS=$as_save_IFS
26026
26027  ;;
26028esac
26029fi
26030JAR=$ac_cv_path_JAR
26031if test -n "$JAR"; then
26032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26033$as_echo "$JAR" >&6; }
26034else
26035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26036$as_echo "no" >&6; }
26037fi
26038
26039
26040        if test "x$JAR" = x; then
26041          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26042        fi
26043      else
26044        # Otherwise we believe it is a complete path. Use it as it is.
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26046$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26048$as_echo_n "checking for JAR... " >&6; }
26049        if test ! -x "$tool_specified"; then
26050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26051$as_echo "not found" >&6; }
26052          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26053        fi
26054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26055$as_echo "$tool_specified" >&6; }
26056      fi
26057    fi
26058  fi
26059
26060
26061
26062  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26063
26064  # Publish this variable in the help.
26065
26066
26067  if test "x$JARSIGNER" = x; then
26068    # The variable is not set by user, try to locate tool using the code snippet
26069
26070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26071$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26072      JARSIGNER=$BOOT_JDK/bin/jarsigner
26073      if test ! -x $JARSIGNER; then
26074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26075$as_echo "not found" >&6; }
26076        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26077$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26078        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26079      fi
26080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26081$as_echo "ok" >&6; }
26082
26083
26084  else
26085    # The variable is set, but is it from the command line or the environment?
26086
26087    # Try to remove the string !JARSIGNER! from our list.
26088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26090      # If it failed, the variable was not from the command line. Ignore it,
26091      # but warn the user (except for BASH, which is always set by the calling BASH).
26092      if test "xJARSIGNER" != xBASH; then
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26094$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26095      fi
26096      # Try to locate tool using the code snippet
26097
26098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26099$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26100      JARSIGNER=$BOOT_JDK/bin/jarsigner
26101      if test ! -x $JARSIGNER; then
26102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26103$as_echo "not found" >&6; }
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26105$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26106        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26107      fi
26108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26109$as_echo "ok" >&6; }
26110
26111
26112    else
26113      # If it succeeded, then it was overridden by the user. We will use it
26114      # for the tool.
26115
26116      # First remove it from the list of overridden variables, so we can test
26117      # for unknown variables in the end.
26118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26119
26120      # Check if the provided tool contains a complete path.
26121      tool_specified="$JARSIGNER"
26122      tool_basename="${tool_specified##*/}"
26123      if test "x$tool_basename" = "x$tool_specified"; then
26124        # A command without a complete path is provided, search $PATH.
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26126$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26127        # Extract the first word of "$tool_basename", so it can be a program name with args.
26128set dummy $tool_basename; ac_word=$2
26129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26130$as_echo_n "checking for $ac_word... " >&6; }
26131if ${ac_cv_path_JARSIGNER+:} false; then :
26132  $as_echo_n "(cached) " >&6
26133else
26134  case $JARSIGNER in
26135  [\\/]* | ?:[\\/]*)
26136  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26137  ;;
26138  *)
26139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26140for as_dir in $PATH
26141do
26142  IFS=$as_save_IFS
26143  test -z "$as_dir" && as_dir=.
26144    for ac_exec_ext in '' $ac_executable_extensions; do
26145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26146    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26148    break 2
26149  fi
26150done
26151  done
26152IFS=$as_save_IFS
26153
26154  ;;
26155esac
26156fi
26157JARSIGNER=$ac_cv_path_JARSIGNER
26158if test -n "$JARSIGNER"; then
26159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26160$as_echo "$JARSIGNER" >&6; }
26161else
26162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26163$as_echo "no" >&6; }
26164fi
26165
26166
26167        if test "x$JARSIGNER" = x; then
26168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26169        fi
26170      else
26171        # Otherwise we believe it is a complete path. Use it as it is.
26172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26173$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26175$as_echo_n "checking for JARSIGNER... " >&6; }
26176        if test ! -x "$tool_specified"; then
26177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26178$as_echo "not found" >&6; }
26179          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26180        fi
26181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26182$as_echo "$tool_specified" >&6; }
26183      fi
26184    fi
26185  fi
26186
26187
26188
26189  # Finally, set some other options...
26190
26191  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26192  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26193
26194
26195
26196
26197###############################################################################
26198#
26199# Configure the sources to use. We can add or override individual directories.
26200#
26201###############################################################################
26202
26203
26204  # Where are the sources. Any of these can be overridden
26205  # using --with-override-corba and the likes.
26206  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26207  CORBA_TOPDIR="$SRC_ROOT/corba"
26208  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26209  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26210  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26211  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26212  JDK_TOPDIR="$SRC_ROOT/jdk"
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223  ###############################################################################
26224  #
26225  # Pickup additional source for a component from outside of the source root
26226  # or override source for a component.
26227  #
26228
26229# Check whether --with-add-source-root was given.
26230if test "${with_add_source_root+set}" = set; then :
26231  withval=$with_add_source_root;
26232fi
26233
26234
26235
26236# Check whether --with-override-source-root was given.
26237if test "${with_override_source_root+set}" = set; then :
26238  withval=$with_override_source_root;
26239fi
26240
26241
26242
26243# Check whether --with-adds-and-overrides was given.
26244if test "${with_adds_and_overrides+set}" = set; then :
26245  withval=$with_adds_and_overrides;
26246fi
26247
26248
26249  if test "x$with_adds_and_overrides" != x; then
26250    with_add_source_root="$with_adds_and_overrides/adds"
26251    with_override_source_root="$with_adds_and_overrides/overrides"
26252  fi
26253
26254  if test "x$with_add_source_root" != x; then
26255    if ! test -d $with_add_source_root; then
26256      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26257    fi
26258    CURDIR="$PWD"
26259    cd "$with_add_source_root"
26260    ADD_SRC_ROOT="`pwd`"
26261    cd "$CURDIR"
26262    # Verify that the addon source root does not have any root makefiles.
26263    # If it does, then it is usually an error, prevent this.
26264    if test -f $with_add_source_root/langtools/make/Makefile; then
26265      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
26266    fi
26267    if test -f $with_add_source_root/corba/make/Makefile; then
26268      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
26269    fi
26270    if test -f $with_add_source_root/jaxp/make/Makefile; then
26271      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
26272    fi
26273    if test -f $with_add_source_root/jaxws/make/Makefile; then
26274      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
26275    fi
26276    if test -f $with_add_source_root/hotspot/make/Makefile; then
26277      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
26278    fi
26279    if test -f $with_add_source_root/nashorn/make/Makefile; then
26280      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
26281    fi
26282    if test -f $with_add_source_root/jdk/make/Makefile; then
26283      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
26284    fi
26285  fi
26286
26287
26288  if test "x$with_override_source_root" != x; then
26289    if ! test -d $with_override_source_root; then
26290      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26291    fi
26292    CURDIR="$PWD"
26293    cd "$with_override_source_root"
26294    OVERRIDE_SRC_ROOT="`pwd`"
26295    cd "$CURDIR"
26296    if test -f $with_override_source_root/langtools/make/Makefile; then
26297      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
26298    fi
26299    if test -f $with_override_source_root/corba/make/Makefile; then
26300      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
26301    fi
26302    if test -f $with_override_source_root/jaxp/make/Makefile; then
26303      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
26304    fi
26305    if test -f $with_override_source_root/jaxws/make/Makefile; then
26306      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
26307    fi
26308    if test -f $with_override_source_root/hotspot/make/Makefile; then
26309      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
26310    fi
26311    if test -f $with_override_source_root/nashorn/make/Makefile; then
26312      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
26313    fi
26314    if test -f $with_override_source_root/jdk/make/Makefile; then
26315      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
26316    fi
26317  fi
26318
26319
26320  ###############################################################################
26321  #
26322  # Override a repo completely, this is used for example when you have 3 small
26323  # development sandboxes of the langtools sources and want to avoid having 3 full
26324  # OpenJDK sources checked out on disk.
26325  #
26326  # Assuming that the 3 langtools sandboxes are located here:
26327  # /home/fredrik/sandbox1/langtools
26328  # /home/fredrik/sandbox2/langtools
26329  # /home/fredrik/sandbox3/langtools
26330  #
26331  # From the source root you create build subdirs manually:
26332  #     mkdir -p build1 build2 build3
26333  # in each build directory run:
26334  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26335  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26336  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26337  #
26338
26339
26340# Check whether --with-override-langtools was given.
26341if test "${with_override_langtools+set}" = set; then :
26342  withval=$with_override_langtools;
26343fi
26344
26345
26346
26347# Check whether --with-override-corba was given.
26348if test "${with_override_corba+set}" = set; then :
26349  withval=$with_override_corba;
26350fi
26351
26352
26353
26354# Check whether --with-override-jaxp was given.
26355if test "${with_override_jaxp+set}" = set; then :
26356  withval=$with_override_jaxp;
26357fi
26358
26359
26360
26361# Check whether --with-override-jaxws was given.
26362if test "${with_override_jaxws+set}" = set; then :
26363  withval=$with_override_jaxws;
26364fi
26365
26366
26367
26368# Check whether --with-override-hotspot was given.
26369if test "${with_override_hotspot+set}" = set; then :
26370  withval=$with_override_hotspot;
26371fi
26372
26373
26374
26375# Check whether --with-override-nashorn was given.
26376if test "${with_override_nashorn+set}" = set; then :
26377  withval=$with_override_nashorn;
26378fi
26379
26380
26381
26382# Check whether --with-override-jdk was given.
26383if test "${with_override_jdk+set}" = set; then :
26384  withval=$with_override_jdk;
26385fi
26386
26387
26388  if test "x$with_override_langtools" != x; then
26389    CURDIR="$PWD"
26390    cd "$with_override_langtools"
26391    LANGTOOLS_TOPDIR="`pwd`"
26392    cd "$CURDIR"
26393    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26394      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26395    fi
26396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26397$as_echo_n "checking if langtools should be overridden... " >&6; }
26398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26399$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26400  fi
26401  if test "x$with_override_corba" != x; then
26402    CURDIR="$PWD"
26403    cd "$with_override_corba"
26404    CORBA_TOPDIR="`pwd`"
26405    cd "$CURDIR"
26406    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26407      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26408    fi
26409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26410$as_echo_n "checking if corba should be overridden... " >&6; }
26411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26412$as_echo "yes with $CORBA_TOPDIR" >&6; }
26413  fi
26414  if test "x$with_override_jaxp" != x; then
26415    CURDIR="$PWD"
26416    cd "$with_override_jaxp"
26417    JAXP_TOPDIR="`pwd`"
26418    cd "$CURDIR"
26419    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26420      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26421    fi
26422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26423$as_echo_n "checking if jaxp should be overridden... " >&6; }
26424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26425$as_echo "yes with $JAXP_TOPDIR" >&6; }
26426  fi
26427  if test "x$with_override_jaxws" != x; then
26428    CURDIR="$PWD"
26429    cd "$with_override_jaxws"
26430    JAXWS_TOPDIR="`pwd`"
26431    cd "$CURDIR"
26432    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26433      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26434    fi
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26436$as_echo_n "checking if jaxws should be overridden... " >&6; }
26437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26438$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26439  fi
26440  if test "x$with_override_hotspot" != x; then
26441    CURDIR="$PWD"
26442    cd "$with_override_hotspot"
26443    HOTSPOT_TOPDIR="`pwd`"
26444    cd "$CURDIR"
26445    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26446      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26447    fi
26448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26449$as_echo_n "checking if hotspot should be overridden... " >&6; }
26450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26451$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26452  fi
26453  if test "x$with_override_nashorn" != x; then
26454    CURDIR="$PWD"
26455    cd "$with_override_nashorn"
26456    NASHORN_TOPDIR="`pwd`"
26457    cd "$CURDIR"
26458    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26459      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26460    fi
26461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26462$as_echo_n "checking if nashorn should be overridden... " >&6; }
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26464$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26465  fi
26466  if test "x$with_override_jdk" != x; then
26467    CURDIR="$PWD"
26468    cd "$with_override_jdk"
26469    JDK_TOPDIR="`pwd`"
26470    cd "$CURDIR"
26471    if ! test -f $JDK_TOPDIR/make/Makefile; then
26472      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26473    fi
26474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26475$as_echo_n "checking if JDK should be overridden... " >&6; }
26476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26477$as_echo "yes with $JDK_TOPDIR" >&6; }
26478  fi
26479
26480
26481  BUILD_OUTPUT="$OUTPUT_ROOT"
26482
26483
26484  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26485  BUILD_HOTSPOT=true
26486
26487
26488
26489# Check whether --with-import-hotspot was given.
26490if test "${with_import_hotspot+set}" = set; then :
26491  withval=$with_import_hotspot;
26492fi
26493
26494  if test "x$with_import_hotspot" != x; then
26495    CURDIR="$PWD"
26496    cd "$with_import_hotspot"
26497    HOTSPOT_DIST="`pwd`"
26498    cd "$CURDIR"
26499    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26500      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26501    fi
26502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26503$as_echo_n "checking if hotspot should be imported... " >&6; }
26504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26505$as_echo "yes from $HOTSPOT_DIST" >&6; }
26506    BUILD_HOTSPOT=false
26507  fi
26508
26509  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26510
26511
26512###############################################################################
26513#
26514# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26515# native code.
26516#
26517###############################################################################
26518
26519# First determine the toolchain type (compiler family)
26520
26521
26522# Check whether --with-toolchain-type was given.
26523if test "${with_toolchain_type+set}" = set; then :
26524  withval=$with_toolchain_type;
26525fi
26526
26527
26528  # Use indirect variable referencing
26529  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26530  VALID_TOOLCHAINS=${!toolchain_var_name}
26531
26532  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26533    if test -n "$XCODEBUILD"; then
26534      # On Mac OS X, default toolchain to clang after Xcode 5
26535      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26536      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26537      if test $? -ne 0; then
26538        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26539      fi
26540      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26541          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26542          $CUT -f 1 -d .`
26543      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26544$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26545      if test $XCODE_MAJOR_VERSION -ge 5; then
26546          DEFAULT_TOOLCHAIN="clang"
26547      else
26548          DEFAULT_TOOLCHAIN="gcc"
26549      fi
26550    else
26551      # If Xcode is not installed, but the command line tools are
26552      # then we can't run xcodebuild. On these systems we should
26553      # default to clang
26554      DEFAULT_TOOLCHAIN="clang"
26555    fi
26556  else
26557    # First toolchain type in the list is the default
26558    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26559  fi
26560
26561  if test "x$with_toolchain_type" = xlist; then
26562    # List all toolchains
26563    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26564$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26565    for toolchain in $VALID_TOOLCHAINS; do
26566      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26567      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26568      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26569    done
26570
26571    exit 0
26572  elif test "x$with_toolchain_type" != x; then
26573    # User override; check that it is valid
26574    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26575      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26576$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26577      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26578$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26579      as_fn_error $? "Cannot continue." "$LINENO" 5
26580    fi
26581    TOOLCHAIN_TYPE=$with_toolchain_type
26582  else
26583    # No flag given, use default
26584    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26585  fi
26586
26587
26588  TOOLCHAIN_CC_BINARY_clang="clang"
26589  TOOLCHAIN_CC_BINARY_gcc="gcc"
26590  TOOLCHAIN_CC_BINARY_microsoft="cl"
26591  TOOLCHAIN_CC_BINARY_solstudio="cc"
26592  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26593
26594  TOOLCHAIN_CXX_BINARY_clang="clang++"
26595  TOOLCHAIN_CXX_BINARY_gcc="g++"
26596  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26597  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26598  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26599
26600  # Use indirect variable referencing
26601  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26602  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26603  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26604  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26605  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26606  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26607
26608
26609  # Define filename patterns
26610  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26611    LIBRARY_PREFIX=
26612    SHARED_LIBRARY_SUFFIX='.dll'
26613    STATIC_LIBRARY_SUFFIX='.lib'
26614    SHARED_LIBRARY='$1.dll'
26615    STATIC_LIBRARY='$1.lib'
26616    OBJ_SUFFIX='.obj'
26617    EXE_SUFFIX='.exe'
26618  else
26619    LIBRARY_PREFIX=lib
26620    SHARED_LIBRARY_SUFFIX='.so'
26621    STATIC_LIBRARY_SUFFIX='.a'
26622    SHARED_LIBRARY='lib$1.so'
26623    STATIC_LIBRARY='lib$1.a'
26624    OBJ_SUFFIX='.o'
26625    EXE_SUFFIX=''
26626    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26627      SHARED_LIBRARY='lib$1.dylib'
26628      SHARED_LIBRARY_SUFFIX='.dylib'
26629    fi
26630  fi
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26642    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26643$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26644  else
26645    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26646$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26647  fi
26648
26649
26650# Then detect the actual binaries needed
26651
26652  # FIXME: Is this needed?
26653  ac_ext=cpp
26654ac_cpp='$CXXCPP $CPPFLAGS'
26655ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26656ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26657ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26658
26659
26660  # Store the CFLAGS etc passed to the configure script.
26661  ORG_CFLAGS="$CFLAGS"
26662  ORG_CXXFLAGS="$CXXFLAGS"
26663
26664  # autoconf magic only relies on PATH, so update it if tools dir is specified
26665  OLD_PATH="$PATH"
26666
26667  # On Windows, we need to detect the visual studio installation first.
26668  # This will change the PATH, but we need to keep that new PATH even
26669  # after toolchain detection is done, since the compiler (on x86) uses
26670  # it for DLL resolution in runtime.
26671  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26672      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26673
26674  # Store path to cygwin link.exe to help excluding it when searching for
26675  # VS linker. This must be done before changing the PATH when looking for VS.
26676  # Extract the first word of "link", so it can be a program name with args.
26677set dummy link; ac_word=$2
26678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26679$as_echo_n "checking for $ac_word... " >&6; }
26680if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26681  $as_echo_n "(cached) " >&6
26682else
26683  case $CYGWIN_LINK in
26684  [\\/]* | ?:[\\/]*)
26685  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26686  ;;
26687  *)
26688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26689for as_dir in $PATH
26690do
26691  IFS=$as_save_IFS
26692  test -z "$as_dir" && as_dir=.
26693    for ac_exec_ext in '' $ac_executable_extensions; do
26694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26695    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26697    break 2
26698  fi
26699done
26700  done
26701IFS=$as_save_IFS
26702
26703  ;;
26704esac
26705fi
26706CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26707if test -n "$CYGWIN_LINK"; then
26708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26709$as_echo "$CYGWIN_LINK" >&6; }
26710else
26711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26712$as_echo "no" >&6; }
26713fi
26714
26715
26716  if test "x$CYGWIN_LINK" != x; then
26717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26718$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26719    "$CYGWIN_LINK" --version > /dev/null
26720    if test $? -eq 0 ; then
26721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26722$as_echo "yes" >&6; }
26723    else
26724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26725$as_echo "no" >&6; }
26726      # This might be the VS linker. Don't exclude it later on.
26727      CYGWIN_LINK=""
26728    fi
26729  fi
26730
26731  # First-hand choice is to locate and run the vsvars bat file.
26732
26733
26734# Check whether --with-toolchain-version was given.
26735if test "${with_toolchain_version+set}" = set; then :
26736  withval=$with_toolchain_version;
26737fi
26738
26739
26740  if test "x$with_toolchain_version" = xlist; then
26741    # List all toolchains
26742    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26743$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26744    for version in $VALID_VS_VERSIONS; do
26745      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26746      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26747    done
26748
26749    exit 0
26750  elif test "x$DEVKIT_VS_VERSION" != x; then
26751    VS_VERSION=$DEVKIT_VS_VERSION
26752    TOOLCHAIN_VERSION=$VS_VERSION
26753    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26754    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26755    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26756    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26757    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26758    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26759
26760    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26761    # can still be exported as INCLUDE for compiler invocations without
26762    # SYSROOT_CFLAGS
26763    OLDIFS="$IFS"
26764    IFS=";"
26765    for i in $DEVKIT_VS_INCLUDE; do
26766      ipath=$i
26767
26768  unix_path="$ipath"
26769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26770    windows_path=`$CYGPATH -m "$unix_path"`
26771    ipath="$windows_path"
26772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26773    windows_path=`cmd //c echo $unix_path`
26774    ipath="$windows_path"
26775  fi
26776
26777      VS_INCLUDE="$VS_INCLUDE;$ipath"
26778    done
26779    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26780    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26781    for i in $DEVKIT_VS_LIB; do
26782      libpath=$i
26783
26784  unix_path="$libpath"
26785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26786    windows_path=`$CYGPATH -m "$unix_path"`
26787    libpath="$windows_path"
26788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26789    windows_path=`cmd //c echo $unix_path`
26790    libpath="$windows_path"
26791  fi
26792
26793      VS_LIB="$VS_LIB;$libpath"
26794    done
26795    IFS="$OLDIFS"
26796
26797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26798$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26799
26800  elif test "x$with_toolchain_version" != x; then
26801    # User override; check that it is valid
26802    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26803      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26804$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26805      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26806$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26807      as_fn_error $? "Cannot continue." "$LINENO" 5
26808    fi
26809    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26810  else
26811    # No flag given, use default
26812    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26813  fi
26814
26815  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26816
26817  VS_VERSION="$VS_VERSION"
26818  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26819  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26820  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26821  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26822
26823  # When using --with-tools-dir, assume it points to the correct and default
26824  # version of Visual Studio or that --with-toolchain-version was also set.
26825  if test "x$with_tools_dir" != x; then
26826
26827  if test "x$VS_ENV_CMD" = x; then
26828    VS_VERSION="${VS_VERSION}"
26829    VS_BASE="$with_tools_dir/../.."
26830    METHOD="--with-tools-dir"
26831
26832    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26833      VCVARSFILE="vc/bin/vcvars32.bat"
26834    else
26835      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26836    fi
26837
26838
26839  windows_path="$VS_BASE"
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841    unix_path=`$CYGPATH -u "$windows_path"`
26842    VS_BASE="$unix_path"
26843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26845    VS_BASE="$unix_path"
26846  fi
26847
26848    if test -d "$VS_BASE"; then
26849      if test -f "$VS_BASE/$VCVARSFILE"; then
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26851$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26852        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26853        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26854        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26855        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26856      else
26857        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26858$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26860$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26861      fi
26862    fi
26863  fi
26864
26865
26866  if test "x$VS_ENV_CMD" = x; then
26867    VS_VERSION="${VS_VERSION}"
26868    VS_BASE="$with_tools_dir/../../.."
26869    METHOD="--with-tools-dir"
26870
26871    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26872      VCVARSFILE="vc/bin/vcvars32.bat"
26873    else
26874      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26875    fi
26876
26877
26878  windows_path="$VS_BASE"
26879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26880    unix_path=`$CYGPATH -u "$windows_path"`
26881    VS_BASE="$unix_path"
26882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26884    VS_BASE="$unix_path"
26885  fi
26886
26887    if test -d "$VS_BASE"; then
26888      if test -f "$VS_BASE/$VCVARSFILE"; then
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26890$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26891        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26892        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26893        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26894        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26895      else
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26897$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26898        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26899$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26900      fi
26901    fi
26902  fi
26903
26904    if test "x$VS_ENV_CMD" = x; then
26905      # Having specified an argument which is incorrect will produce an instant failure;
26906      # we should not go on looking
26907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26908$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26909      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26910$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26911      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26912$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26913      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26914    fi
26915  fi
26916
26917  VS_ENV_CMD=""
26918  VS_ENV_ARGS=""
26919
26920  if test "x$VS_COMNTOOLS" != x; then
26921
26922  if test "x$VS_ENV_CMD" = x; then
26923    VS_VERSION="${VS_VERSION}"
26924    VS_BASE="$VS_COMNTOOLS/../.."
26925    METHOD="$VS_COMNTOOLS_VAR variable"
26926
26927    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26928      VCVARSFILE="vc/bin/vcvars32.bat"
26929    else
26930      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26931    fi
26932
26933
26934  windows_path="$VS_BASE"
26935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26936    unix_path=`$CYGPATH -u "$windows_path"`
26937    VS_BASE="$unix_path"
26938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26940    VS_BASE="$unix_path"
26941  fi
26942
26943    if test -d "$VS_BASE"; then
26944      if test -f "$VS_BASE/$VCVARSFILE"; then
26945        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26946$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26947        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26948        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26949        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26950        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26951      else
26952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26953$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26954        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26955$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26956      fi
26957    fi
26958  fi
26959
26960  fi
26961  if test "x$PROGRAMFILES" != x; then
26962
26963  if test "x$VS_ENV_CMD" = x; then
26964    VS_VERSION="${VS_VERSION}"
26965    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26966    METHOD="well-known name"
26967
26968    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26969      VCVARSFILE="vc/bin/vcvars32.bat"
26970    else
26971      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26972    fi
26973
26974
26975  windows_path="$VS_BASE"
26976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977    unix_path=`$CYGPATH -u "$windows_path"`
26978    VS_BASE="$unix_path"
26979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26981    VS_BASE="$unix_path"
26982  fi
26983
26984    if test -d "$VS_BASE"; then
26985      if test -f "$VS_BASE/$VCVARSFILE"; then
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26987$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26988        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26989        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26990        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26991        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26992      else
26993        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26994$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26995        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26996$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26997      fi
26998    fi
26999  fi
27000
27001  fi
27002  # Work around the insanely named ProgramFiles(x86) env variable
27003  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27004  if test "x$PROGRAMFILES_X86" != x; then
27005
27006  if test "x$VS_ENV_CMD" = x; then
27007    VS_VERSION="${VS_VERSION}"
27008    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27009    METHOD="well-known name"
27010
27011    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27012      VCVARSFILE="vc/bin/vcvars32.bat"
27013    else
27014      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27015    fi
27016
27017
27018  windows_path="$VS_BASE"
27019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27020    unix_path=`$CYGPATH -u "$windows_path"`
27021    VS_BASE="$unix_path"
27022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27024    VS_BASE="$unix_path"
27025  fi
27026
27027    if test -d "$VS_BASE"; then
27028      if test -f "$VS_BASE/$VCVARSFILE"; then
27029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27030$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27031        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27032        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27033        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27034        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27035      else
27036        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27037$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27038        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27039$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27040      fi
27041    fi
27042  fi
27043
27044  fi
27045
27046  if test "x$VS_ENV_CMD" = x; then
27047    VS_VERSION="${VS_VERSION}"
27048    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27049    METHOD="well-known name"
27050
27051    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27052      VCVARSFILE="vc/bin/vcvars32.bat"
27053    else
27054      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27055    fi
27056
27057
27058  windows_path="$VS_BASE"
27059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27060    unix_path=`$CYGPATH -u "$windows_path"`
27061    VS_BASE="$unix_path"
27062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27064    VS_BASE="$unix_path"
27065  fi
27066
27067    if test -d "$VS_BASE"; then
27068      if test -f "$VS_BASE/$VCVARSFILE"; then
27069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27070$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27071        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27072        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27073        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27074        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27075      else
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27077$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27078        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27079$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27080      fi
27081    fi
27082  fi
27083
27084
27085  if test "x$VS_ENV_CMD" = x; then
27086    VS_VERSION="${VS_VERSION}"
27087    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27088    METHOD="well-known name"
27089
27090    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27091      VCVARSFILE="vc/bin/vcvars32.bat"
27092    else
27093      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27094    fi
27095
27096
27097  windows_path="$VS_BASE"
27098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27099    unix_path=`$CYGPATH -u "$windows_path"`
27100    VS_BASE="$unix_path"
27101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27103    VS_BASE="$unix_path"
27104  fi
27105
27106    if test -d "$VS_BASE"; then
27107      if test -f "$VS_BASE/$VCVARSFILE"; then
27108        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27109$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27110        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27111        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27112        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27113        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27114      else
27115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27116$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27118$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27119      fi
27120    fi
27121  fi
27122
27123
27124  if test "x$SDK_INSTALL_DIR" != x; then
27125    if test "x$ProgramW6432" != x; then
27126
27127  if test "x$VS_ENV_CMD" = x; then
27128    VS_VERSION="${VS_VERSION}"
27129    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27130    METHOD="well-known name"
27131
27132  windows_path="$WIN_SDK_BASE"
27133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27134    unix_path=`$CYGPATH -u "$windows_path"`
27135    WIN_SDK_BASE="$unix_path"
27136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27138    WIN_SDK_BASE="$unix_path"
27139  fi
27140
27141    if test -d "$WIN_SDK_BASE"; then
27142      # There have been cases of partial or broken SDK installations. A missing
27143      # lib dir is not going to work.
27144      if test ! -d "$WIN_SDK_BASE/lib"; then
27145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27147        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27148$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27149      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27150        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27151$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27152        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27153        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27154          VS_ENV_ARGS="/x86"
27155        else
27156          VS_ENV_ARGS="/x64"
27157        fi
27158        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27159        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27160        # TODO: improve detection for other versions of SDK
27161        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27162      else
27163        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27164$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27165        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27166$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27167      fi
27168    fi
27169  fi
27170
27171    fi
27172    if test "x$PROGRAMW6432" != x; then
27173
27174  if test "x$VS_ENV_CMD" = x; then
27175    VS_VERSION="${VS_VERSION}"
27176    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27177    METHOD="well-known name"
27178
27179  windows_path="$WIN_SDK_BASE"
27180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27181    unix_path=`$CYGPATH -u "$windows_path"`
27182    WIN_SDK_BASE="$unix_path"
27183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27185    WIN_SDK_BASE="$unix_path"
27186  fi
27187
27188    if test -d "$WIN_SDK_BASE"; then
27189      # There have been cases of partial or broken SDK installations. A missing
27190      # lib dir is not going to work.
27191      if test ! -d "$WIN_SDK_BASE/lib"; then
27192        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27193$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27194        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27195$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27196      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27198$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27199        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27200        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27201          VS_ENV_ARGS="/x86"
27202        else
27203          VS_ENV_ARGS="/x64"
27204        fi
27205        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27206        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27207        # TODO: improve detection for other versions of SDK
27208        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27209      else
27210        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27211$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27212        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27213$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27214      fi
27215    fi
27216  fi
27217
27218    fi
27219    if test "x$PROGRAMFILES" != x; then
27220
27221  if test "x$VS_ENV_CMD" = x; then
27222    VS_VERSION="${VS_VERSION}"
27223    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27224    METHOD="well-known name"
27225
27226  windows_path="$WIN_SDK_BASE"
27227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27228    unix_path=`$CYGPATH -u "$windows_path"`
27229    WIN_SDK_BASE="$unix_path"
27230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27232    WIN_SDK_BASE="$unix_path"
27233  fi
27234
27235    if test -d "$WIN_SDK_BASE"; then
27236      # There have been cases of partial or broken SDK installations. A missing
27237      # lib dir is not going to work.
27238      if test ! -d "$WIN_SDK_BASE/lib"; then
27239        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27240$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27241        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27242$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27243      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27245$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27246        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27247        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27248          VS_ENV_ARGS="/x86"
27249        else
27250          VS_ENV_ARGS="/x64"
27251        fi
27252        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27253        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27254        # TODO: improve detection for other versions of SDK
27255        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27256      else
27257        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27258$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27259        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27260$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27261      fi
27262    fi
27263  fi
27264
27265    fi
27266
27267  if test "x$VS_ENV_CMD" = x; then
27268    VS_VERSION="${VS_VERSION}"
27269    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27270    METHOD="well-known name"
27271
27272  windows_path="$WIN_SDK_BASE"
27273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27274    unix_path=`$CYGPATH -u "$windows_path"`
27275    WIN_SDK_BASE="$unix_path"
27276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27278    WIN_SDK_BASE="$unix_path"
27279  fi
27280
27281    if test -d "$WIN_SDK_BASE"; then
27282      # There have been cases of partial or broken SDK installations. A missing
27283      # lib dir is not going to work.
27284      if test ! -d "$WIN_SDK_BASE/lib"; then
27285        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27286$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27287        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27288$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27289      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27291$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27292        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27293        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27294          VS_ENV_ARGS="/x86"
27295        else
27296          VS_ENV_ARGS="/x64"
27297        fi
27298        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27299        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27300        # TODO: improve detection for other versions of SDK
27301        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27302      else
27303        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27304$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27305        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27306$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27307      fi
27308    fi
27309  fi
27310
27311
27312  if test "x$VS_ENV_CMD" = x; then
27313    VS_VERSION="${VS_VERSION}"
27314    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27315    METHOD="well-known name"
27316
27317  windows_path="$WIN_SDK_BASE"
27318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27319    unix_path=`$CYGPATH -u "$windows_path"`
27320    WIN_SDK_BASE="$unix_path"
27321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27323    WIN_SDK_BASE="$unix_path"
27324  fi
27325
27326    if test -d "$WIN_SDK_BASE"; then
27327      # There have been cases of partial or broken SDK installations. A missing
27328      # lib dir is not going to work.
27329      if test ! -d "$WIN_SDK_BASE/lib"; then
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27331$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27333$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27334      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27336$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27337        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27338        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27339          VS_ENV_ARGS="/x86"
27340        else
27341          VS_ENV_ARGS="/x64"
27342        fi
27343        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27344        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27345        # TODO: improve detection for other versions of SDK
27346        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27347      else
27348        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27349$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27350        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27351$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27352      fi
27353    fi
27354  fi
27355
27356  fi
27357
27358    if test "x$VS_ENV_CMD" != x; then
27359      TOOLCHAIN_VERSION=$VS_VERSION
27360      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27361      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27362      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27363      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27364      # The rest of the variables are already evaled while probing
27365      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27366$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27367      break
27368    fi
27369  done
27370
27371
27372  # If we have a devkit, skip all of the below.
27373  if test "x$DEVKIT_VS_VERSION" = x; then
27374    if test "x$VS_ENV_CMD" != x; then
27375      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27376
27377  # Only process if variable expands to non-empty
27378
27379  if test "x$VS_ENV_CMD" != x; then
27380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27381
27382  # First separate the path from the arguments. This will split at the first
27383  # space.
27384  complete="$VS_ENV_CMD"
27385  path="${complete%% *}"
27386  tmp="$complete EOL"
27387  arguments="${tmp#* }"
27388
27389  # Input might be given as Windows format, start by converting to
27390  # unix format.
27391  new_path=`$CYGPATH -u "$path"`
27392
27393  # Now try to locate executable using which
27394  new_path=`$WHICH "$new_path" 2> /dev/null`
27395  # bat and cmd files are not always considered executable in cygwin causing which
27396  # to not find them
27397  if test "x$new_path" = x \
27398      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27399      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27400    new_path=`$CYGPATH -u "$path"`
27401  fi
27402  if test "x$new_path" = x; then
27403    # Oops. Which didn't find the executable.
27404    # The splitting of arguments from the executable at a space might have been incorrect,
27405    # since paths with space are more likely in Windows. Give it another try with the whole
27406    # argument.
27407    path="$complete"
27408    arguments="EOL"
27409    new_path=`$CYGPATH -u "$path"`
27410    new_path=`$WHICH "$new_path" 2> /dev/null`
27411    # bat and cmd files are not always considered executable in cygwin causing which
27412    # to not find them
27413    if test "x$new_path" = x \
27414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27416      new_path=`$CYGPATH -u "$path"`
27417    fi
27418    if test "x$new_path" = x; then
27419      # It's still not found. Now this is an unrecoverable error.
27420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27421$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27422      has_space=`$ECHO "$complete" | $GREP " "`
27423      if test "x$has_space" != x; then
27424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27426      fi
27427      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27428    fi
27429  fi
27430
27431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27434  # "foo.exe" is OK but "foo" is an error.
27435  #
27436  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27437  # It is also a way to make sure we got the proper file name for the real test later on.
27438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27439  if test "x$test_shortpath" = x; then
27440    # Short path failed, file does not exist as specified.
27441    # Try adding .exe or .cmd
27442    if test -f "${new_path}.exe"; then
27443      input_to_shortpath="${new_path}.exe"
27444    elif test -f "${new_path}.cmd"; then
27445      input_to_shortpath="${new_path}.cmd"
27446    else
27447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27448$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27451      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27452    fi
27453  else
27454    input_to_shortpath="$new_path"
27455  fi
27456
27457  # Call helper function which possibly converts this using DOS-style short mode.
27458  # If so, the updated path is stored in $new_path.
27459  new_path="$input_to_shortpath"
27460
27461  input_path="$input_to_shortpath"
27462  # Check if we need to convert this using DOS-style short mode. If the path
27463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27464  # take no chances and rewrite it.
27465  # Note: m4 eats our [], so we need to use [ and ] instead.
27466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27467  if test "x$has_forbidden_chars" != x; then
27468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27472      # Going to short mode and back again did indeed matter. Since short mode is
27473      # case insensitive, let's make it lowercase to improve readability.
27474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27475      # Now convert it back to Unix-style (cygpath)
27476      input_path=`$CYGPATH -u "$shortmode_path"`
27477      new_path="$input_path"
27478    fi
27479  fi
27480
27481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27482  if test "x$test_cygdrive_prefix" = x; then
27483    # As a simple fix, exclude /usr/bin since it's not a real path.
27484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27486      # a path prefixed by /cygdrive for fixpath to work.
27487      new_path="$CYGWIN_ROOT_PATH$input_path"
27488    fi
27489  fi
27490
27491  # remove trailing .exe if any
27492  new_path="${new_path/%.exe/}"
27493
27494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27495
27496  # First separate the path from the arguments. This will split at the first
27497  # space.
27498  complete="$VS_ENV_CMD"
27499  path="${complete%% *}"
27500  tmp="$complete EOL"
27501  arguments="${tmp#* }"
27502
27503  # Input might be given as Windows format, start by converting to
27504  # unix format.
27505  new_path="$path"
27506
27507  windows_path="$new_path"
27508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27509    unix_path=`$CYGPATH -u "$windows_path"`
27510    new_path="$unix_path"
27511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27513    new_path="$unix_path"
27514  fi
27515
27516
27517  # Now try to locate executable using which
27518  new_path=`$WHICH "$new_path" 2> /dev/null`
27519
27520  if test "x$new_path" = x; then
27521    # Oops. Which didn't find the executable.
27522    # The splitting of arguments from the executable at a space might have been incorrect,
27523    # since paths with space are more likely in Windows. Give it another try with the whole
27524    # argument.
27525    path="$complete"
27526    arguments="EOL"
27527    new_path="$path"
27528
27529  windows_path="$new_path"
27530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27531    unix_path=`$CYGPATH -u "$windows_path"`
27532    new_path="$unix_path"
27533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27535    new_path="$unix_path"
27536  fi
27537
27538
27539    new_path=`$WHICH "$new_path" 2> /dev/null`
27540    # bat and cmd files are not always considered executable in MSYS causing which
27541    # to not find them
27542    if test "x$new_path" = x \
27543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27545      new_path="$path"
27546
27547  windows_path="$new_path"
27548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27549    unix_path=`$CYGPATH -u "$windows_path"`
27550    new_path="$unix_path"
27551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27553    new_path="$unix_path"
27554  fi
27555
27556    fi
27557
27558    if test "x$new_path" = x; then
27559      # It's still not found. Now this is an unrecoverable error.
27560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27561$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27562      has_space=`$ECHO "$complete" | $GREP " "`
27563      if test "x$has_space" != x; then
27564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27566      fi
27567      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27568    fi
27569  fi
27570
27571  # Now new_path has a complete unix path to the binary
27572  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27573    # Keep paths in /bin as-is, but remove trailing .exe if any
27574    new_path="${new_path/%.exe/}"
27575    # Do not save /bin paths to all_fixpath_prefixes!
27576  else
27577    # Not in mixed or Windows style, start by that.
27578    new_path=`cmd //c echo $new_path`
27579
27580  input_path="$new_path"
27581  # Check if we need to convert this using DOS-style short mode. If the path
27582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27583  # take no chances and rewrite it.
27584  # Note: m4 eats our [], so we need to use [ and ] instead.
27585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27586  if test "x$has_forbidden_chars" != x; then
27587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27589  fi
27590
27591    # Output is in $new_path
27592
27593  windows_path="$new_path"
27594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27595    unix_path=`$CYGPATH -u "$windows_path"`
27596    new_path="$unix_path"
27597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27599    new_path="$unix_path"
27600  fi
27601
27602    # remove trailing .exe if any
27603    new_path="${new_path/%.exe/}"
27604
27605    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27606    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27607  fi
27608
27609    else
27610      # We're on a unix platform. Hooray! :)
27611      # First separate the path from the arguments. This will split at the first
27612      # space.
27613      complete="$VS_ENV_CMD"
27614      path="${complete%% *}"
27615      tmp="$complete EOL"
27616      arguments="${tmp#* }"
27617
27618      # Cannot rely on the command "which" here since it doesn't always work.
27619      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27620      if test -z "$is_absolute_path"; then
27621        # Path to executable is not absolute. Find it.
27622        IFS_save="$IFS"
27623        IFS=:
27624        for p in $PATH; do
27625          if test -f "$p/$path" && test -x "$p/$path"; then
27626            new_path="$p/$path"
27627            break
27628          fi
27629        done
27630        IFS="$IFS_save"
27631      else
27632        # This is an absolute path, we can use it without further modifications.
27633        new_path="$path"
27634      fi
27635
27636      if test "x$new_path" = x; then
27637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27638$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27639        has_space=`$ECHO "$complete" | $GREP " "`
27640        if test "x$has_space" != x; then
27641          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27642$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27643        fi
27644        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27645      fi
27646    fi
27647
27648    # Now join together the path and the arguments once again
27649    if test "x$arguments" != xEOL; then
27650      new_complete="$new_path ${arguments% *}"
27651    else
27652      new_complete="$new_path"
27653    fi
27654
27655    if test "x$complete" != "x$new_complete"; then
27656      VS_ENV_CMD="$new_complete"
27657      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27658$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27659    fi
27660  fi
27661
27662
27663      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27664      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27665$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27666
27667      # We need to create a couple of temporary files.
27668      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27669      $MKDIR -p $VS_ENV_TMP_DIR
27670
27671      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27672      # Instead create a shell script which will set the relevant variables when run.
27673      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27674
27675  unix_path="$WINPATH_VS_ENV_CMD"
27676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27677    windows_path=`$CYGPATH -m "$unix_path"`
27678    WINPATH_VS_ENV_CMD="$windows_path"
27679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680    windows_path=`cmd //c echo $unix_path`
27681    WINPATH_VS_ENV_CMD="$windows_path"
27682  fi
27683
27684      WINPATH_BASH="$BASH"
27685
27686  unix_path="$WINPATH_BASH"
27687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27688    windows_path=`$CYGPATH -m "$unix_path"`
27689    WINPATH_BASH="$windows_path"
27690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27691    windows_path=`cmd //c echo $unix_path`
27692    WINPATH_BASH="$windows_path"
27693  fi
27694
27695
27696      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27697      # script (executable by bash) that will setup the important variables.
27698      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27699      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27700      # This will end up something like:
27701      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27702      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27703      # These will end up something like:
27704      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27705      # The trailing space for everyone except PATH is no typo, but is needed due
27706      # to trailing \ in the Windows paths. These will be stripped later.
27707      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27708          >> $EXTRACT_VC_ENV_BAT_FILE
27709      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27710          >> $EXTRACT_VC_ENV_BAT_FILE
27711      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27712          >> $EXTRACT_VC_ENV_BAT_FILE
27713      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27714          >> $EXTRACT_VC_ENV_BAT_FILE
27715      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27716          >> $EXTRACT_VC_ENV_BAT_FILE
27717      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27718          >> $EXTRACT_VC_ENV_BAT_FILE
27719
27720      # Now execute the newly created bat file.
27721      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27722      # Change directory so we don't need to mess with Windows paths in redirects.
27723      cd $VS_ENV_TMP_DIR
27724      cmd /c extract-vs-env.bat | $CAT
27725      cd $CURDIR
27726
27727      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27728        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27729$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27730        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27731$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27733$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27734        as_fn_error $? "Cannot continue" "$LINENO" 5
27735      fi
27736
27737      # Now set all paths and other env variables. This will allow the rest of
27738      # the configure script to find and run the compiler in the proper way.
27739      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27740$as_echo "$as_me: Setting extracted environment variables" >&6;}
27741      . $VS_ENV_TMP_DIR/set-vs-env.sh
27742      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27743      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27744    else
27745      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27746      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27747$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27748    fi
27749  fi
27750
27751  # At this point, we should have correct variables in the environment, or we can't continue.
27752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27753$as_echo_n "checking for Visual Studio variables... " >&6; }
27754
27755  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27756      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27757    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27759$as_echo "present but broken" >&6; }
27760      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27761    else
27762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27763$as_echo "ok" >&6; }
27764      # Remove any trailing "\" ";" and " " from the variables.
27765      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27766      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27767      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27768      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27769      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27770      # Remove any paths containing # (typically F#) as that messes up make. This
27771      # is needed if visual studio was installed with F# support.
27772      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27773
27774
27775
27776
27777
27778      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27779      OLDIFS="$IFS"
27780      IFS=";"
27781      for i in $VS_INCLUDE; do
27782        ipath=$i
27783        # Only process non-empty elements
27784        if test "x$ipath" != x; then
27785          IFS="$OLDIFS"
27786          # Check that directory exists before calling fixup_path
27787          testpath=$ipath
27788
27789  windows_path="$testpath"
27790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27791    unix_path=`$CYGPATH -u "$windows_path"`
27792    testpath="$unix_path"
27793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27795    testpath="$unix_path"
27796  fi
27797
27798          if test -d "$testpath"; then
27799
27800  # Only process if variable expands to non-empty
27801
27802  if test "x$ipath" != x; then
27803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27804
27805  # Input might be given as Windows format, start by converting to
27806  # unix format.
27807  path="$ipath"
27808  new_path=`$CYGPATH -u "$path"`
27809
27810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27813  # "foo.exe" is OK but "foo" is an error.
27814  #
27815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27816  # It is also a way to make sure we got the proper file name for the real test later on.
27817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27818  if test "x$test_shortpath" = x; then
27819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27820$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27821    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27822  fi
27823
27824  # Call helper function which possibly converts this using DOS-style short mode.
27825  # If so, the updated path is stored in $new_path.
27826
27827  input_path="$new_path"
27828  # Check if we need to convert this using DOS-style short mode. If the path
27829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27830  # take no chances and rewrite it.
27831  # Note: m4 eats our [], so we need to use [ and ] instead.
27832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27833  if test "x$has_forbidden_chars" != x; then
27834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27838      # Going to short mode and back again did indeed matter. Since short mode is
27839      # case insensitive, let's make it lowercase to improve readability.
27840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27841      # Now convert it back to Unix-style (cygpath)
27842      input_path=`$CYGPATH -u "$shortmode_path"`
27843      new_path="$input_path"
27844    fi
27845  fi
27846
27847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27848  if test "x$test_cygdrive_prefix" = x; then
27849    # As a simple fix, exclude /usr/bin since it's not a real path.
27850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27852      # a path prefixed by /cygdrive for fixpath to work.
27853      new_path="$CYGWIN_ROOT_PATH$input_path"
27854    fi
27855  fi
27856
27857
27858  if test "x$path" != "x$new_path"; then
27859    ipath="$new_path"
27860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27861$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27862  fi
27863
27864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27865
27866  path="$ipath"
27867  has_colon=`$ECHO $path | $GREP ^.:`
27868  new_path="$path"
27869  if test "x$has_colon" = x; then
27870    # Not in mixed or Windows style, start by that.
27871    new_path=`cmd //c echo $path`
27872  fi
27873
27874
27875  input_path="$new_path"
27876  # Check if we need to convert this using DOS-style short mode. If the path
27877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27878  # take no chances and rewrite it.
27879  # Note: m4 eats our [], so we need to use [ and ] instead.
27880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27881  if test "x$has_forbidden_chars" != x; then
27882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27884  fi
27885
27886
27887  windows_path="$new_path"
27888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27889    unix_path=`$CYGPATH -u "$windows_path"`
27890    new_path="$unix_path"
27891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27893    new_path="$unix_path"
27894  fi
27895
27896  if test "x$path" != "x$new_path"; then
27897    ipath="$new_path"
27898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27899$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27900  fi
27901
27902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27904
27905    else
27906      # We're on a unix platform. Hooray! :)
27907      path="$ipath"
27908      has_space=`$ECHO "$path" | $GREP " "`
27909      if test "x$has_space" != x; then
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27911$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27913      fi
27914
27915      # Use eval to expand a potential ~
27916      eval path="$path"
27917      if test ! -f "$path" && test ! -d "$path"; then
27918        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27919      fi
27920
27921      ipath="`cd "$path"; $THEPWDCMD -L`"
27922    fi
27923  fi
27924
27925            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27926          fi
27927          IFS=";"
27928        fi
27929      done
27930      # Convert VS_LIB into SYSROOT_LDFLAGS
27931      for i in $VS_LIB; do
27932        libpath=$i
27933        # Only process non-empty elements
27934        if test "x$libpath" != x; then
27935          IFS="$OLDIFS"
27936          # Check that directory exists before calling fixup_path
27937          testpath=$libpath
27938
27939  windows_path="$testpath"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    testpath="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    testpath="$unix_path"
27946  fi
27947
27948          if test -d "$testpath"; then
27949
27950  # Only process if variable expands to non-empty
27951
27952  if test "x$libpath" != x; then
27953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27954
27955  # Input might be given as Windows format, start by converting to
27956  # unix format.
27957  path="$libpath"
27958  new_path=`$CYGPATH -u "$path"`
27959
27960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27963  # "foo.exe" is OK but "foo" is an error.
27964  #
27965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27966  # It is also a way to make sure we got the proper file name for the real test later on.
27967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27968  if test "x$test_shortpath" = x; then
27969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27970$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27971    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27972  fi
27973
27974  # Call helper function which possibly converts this using DOS-style short mode.
27975  # If so, the updated path is stored in $new_path.
27976
27977  input_path="$new_path"
27978  # Check if we need to convert this using DOS-style short mode. If the path
27979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27980  # take no chances and rewrite it.
27981  # Note: m4 eats our [], so we need to use [ and ] instead.
27982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27983  if test "x$has_forbidden_chars" != x; then
27984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27988      # Going to short mode and back again did indeed matter. Since short mode is
27989      # case insensitive, let's make it lowercase to improve readability.
27990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27991      # Now convert it back to Unix-style (cygpath)
27992      input_path=`$CYGPATH -u "$shortmode_path"`
27993      new_path="$input_path"
27994    fi
27995  fi
27996
27997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27998  if test "x$test_cygdrive_prefix" = x; then
27999    # As a simple fix, exclude /usr/bin since it's not a real path.
28000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28002      # a path prefixed by /cygdrive for fixpath to work.
28003      new_path="$CYGWIN_ROOT_PATH$input_path"
28004    fi
28005  fi
28006
28007
28008  if test "x$path" != "x$new_path"; then
28009    libpath="$new_path"
28010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28011$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28012  fi
28013
28014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28015
28016  path="$libpath"
28017  has_colon=`$ECHO $path | $GREP ^.:`
28018  new_path="$path"
28019  if test "x$has_colon" = x; then
28020    # Not in mixed or Windows style, start by that.
28021    new_path=`cmd //c echo $path`
28022  fi
28023
28024
28025  input_path="$new_path"
28026  # Check if we need to convert this using DOS-style short mode. If the path
28027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28028  # take no chances and rewrite it.
28029  # Note: m4 eats our [], so we need to use [ and ] instead.
28030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28031  if test "x$has_forbidden_chars" != x; then
28032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28034  fi
28035
28036
28037  windows_path="$new_path"
28038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28039    unix_path=`$CYGPATH -u "$windows_path"`
28040    new_path="$unix_path"
28041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28043    new_path="$unix_path"
28044  fi
28045
28046  if test "x$path" != "x$new_path"; then
28047    libpath="$new_path"
28048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28049$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28050  fi
28051
28052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28054
28055    else
28056      # We're on a unix platform. Hooray! :)
28057      path="$libpath"
28058      has_space=`$ECHO "$path" | $GREP " "`
28059      if test "x$has_space" != x; then
28060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28061$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28062        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28063      fi
28064
28065      # Use eval to expand a potential ~
28066      eval path="$path"
28067      if test ! -f "$path" && test ! -d "$path"; then
28068        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28069      fi
28070
28071      libpath="`cd "$path"; $THEPWDCMD -L`"
28072    fi
28073  fi
28074
28075            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28076          fi
28077          IFS=";"
28078        fi
28079      done
28080      IFS="$OLDIFS"
28081    fi
28082  else
28083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28084$as_echo "not found" >&6; }
28085
28086    if test "x$VS_ENV_CMD" = x; then
28087      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28088$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28089      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28090$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28091    else
28092      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28093$as_echo "$as_me: Running the extraction script failed." >&6;}
28094    fi
28095    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28096$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28097    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28098$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28099    as_fn_error $? "Cannot continue" "$LINENO" 5
28100  fi
28101
28102    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28103    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28104    PATH="$VS_PATH"
28105    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28106    export INCLUDE="$VS_INCLUDE"
28107    export LIB="$VS_LIB"
28108  fi
28109
28110  # For solaris we really need solaris tools, and not the GNU equivalent.
28111  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28112  # so add that to path before starting to probe.
28113  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28114  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28115    PATH="/usr/ccs/bin:$PATH"
28116  fi
28117
28118  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28119  # override all other locations.
28120  if test "x$TOOLCHAIN_PATH" != x; then
28121    PATH=$TOOLCHAIN_PATH:$PATH
28122  fi
28123
28124
28125  #
28126  # Setup the compilers (CC and CXX)
28127  #
28128
28129  COMPILER_NAME=C
28130  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28131
28132  if test "x$CC" != x; then
28133    # User has supplied compiler name already, always let that override.
28134    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28135$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28136    if test "x`basename $CC`" = "x$CC"; then
28137      # A command without a complete path is provided, search $PATH.
28138
28139      for ac_prog in $CC
28140do
28141  # Extract the first word of "$ac_prog", so it can be a program name with args.
28142set dummy $ac_prog; ac_word=$2
28143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28144$as_echo_n "checking for $ac_word... " >&6; }
28145if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28146  $as_echo_n "(cached) " >&6
28147else
28148  case $POTENTIAL_CC in
28149  [\\/]* | ?:[\\/]*)
28150  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28151  ;;
28152  *)
28153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28154for as_dir in $PATH
28155do
28156  IFS=$as_save_IFS
28157  test -z "$as_dir" && as_dir=.
28158    for ac_exec_ext in '' $ac_executable_extensions; do
28159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28160    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28162    break 2
28163  fi
28164done
28165  done
28166IFS=$as_save_IFS
28167
28168  ;;
28169esac
28170fi
28171POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28172if test -n "$POTENTIAL_CC"; then
28173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28174$as_echo "$POTENTIAL_CC" >&6; }
28175else
28176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28177$as_echo "no" >&6; }
28178fi
28179
28180
28181  test -n "$POTENTIAL_CC" && break
28182done
28183
28184      if test "x$POTENTIAL_CC" != x; then
28185        CC=$POTENTIAL_CC
28186      else
28187        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28188      fi
28189    else
28190      # Otherwise it might already be a complete path
28191      if test ! -x "$CC"; then
28192        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28193      fi
28194    fi
28195  else
28196    # No user supplied value. Locate compiler ourselves.
28197
28198    # If we are cross compiling, assume cross compilation tools follows the
28199    # cross compilation standard where they are prefixed with the autoconf
28200    # standard name for the target. For example the binary
28201    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28202    # If we are not cross compiling, then the default compiler name will be
28203    # used.
28204
28205    CC=
28206    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28207    # before checking the rest of the PATH.
28208    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28209    # step, this should not be necessary.
28210    if test -n "$TOOLCHAIN_PATH"; then
28211      PATH_save="$PATH"
28212      PATH="$TOOLCHAIN_PATH"
28213      for ac_prog in $SEARCH_LIST
28214do
28215  # Extract the first word of "$ac_prog", so it can be a program name with args.
28216set dummy $ac_prog; ac_word=$2
28217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28218$as_echo_n "checking for $ac_word... " >&6; }
28219if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28220  $as_echo_n "(cached) " >&6
28221else
28222  case $TOOLCHAIN_PATH_CC in
28223  [\\/]* | ?:[\\/]*)
28224  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28225  ;;
28226  *)
28227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28228for as_dir in $PATH
28229do
28230  IFS=$as_save_IFS
28231  test -z "$as_dir" && as_dir=.
28232    for ac_exec_ext in '' $ac_executable_extensions; do
28233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28234    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28236    break 2
28237  fi
28238done
28239  done
28240IFS=$as_save_IFS
28241
28242  ;;
28243esac
28244fi
28245TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28246if test -n "$TOOLCHAIN_PATH_CC"; then
28247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28248$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28249else
28250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28251$as_echo "no" >&6; }
28252fi
28253
28254
28255  test -n "$TOOLCHAIN_PATH_CC" && break
28256done
28257
28258      CC=$TOOLCHAIN_PATH_CC
28259      PATH="$PATH_save"
28260    fi
28261
28262    # AC_PATH_PROGS can't be run multiple times with the same variable,
28263    # so create a new name for this run.
28264    if test "x$CC" = x; then
28265      for ac_prog in $SEARCH_LIST
28266do
28267  # Extract the first word of "$ac_prog", so it can be a program name with args.
28268set dummy $ac_prog; ac_word=$2
28269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28270$as_echo_n "checking for $ac_word... " >&6; }
28271if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28272  $as_echo_n "(cached) " >&6
28273else
28274  case $POTENTIAL_CC in
28275  [\\/]* | ?:[\\/]*)
28276  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28277  ;;
28278  *)
28279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28280for as_dir in $PATH
28281do
28282  IFS=$as_save_IFS
28283  test -z "$as_dir" && as_dir=.
28284    for ac_exec_ext in '' $ac_executable_extensions; do
28285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28286    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28288    break 2
28289  fi
28290done
28291  done
28292IFS=$as_save_IFS
28293
28294  ;;
28295esac
28296fi
28297POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28298if test -n "$POTENTIAL_CC"; then
28299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28300$as_echo "$POTENTIAL_CC" >&6; }
28301else
28302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28303$as_echo "no" >&6; }
28304fi
28305
28306
28307  test -n "$POTENTIAL_CC" && break
28308done
28309
28310      CC=$POTENTIAL_CC
28311    fi
28312
28313    if test "x$CC" = x; then
28314
28315  # Print a helpful message on how to acquire the necessary build dependency.
28316  # devkit is the help tag: freetype, cups, pulse, alsa etc
28317  MISSING_DEPENDENCY=devkit
28318
28319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28320    cygwin_help $MISSING_DEPENDENCY
28321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28322    msys_help $MISSING_DEPENDENCY
28323  else
28324    PKGHANDLER_COMMAND=
28325
28326    case $PKGHANDLER in
28327      apt-get)
28328        apt_help     $MISSING_DEPENDENCY ;;
28329      yum)
28330        yum_help     $MISSING_DEPENDENCY ;;
28331      port)
28332        port_help    $MISSING_DEPENDENCY ;;
28333      pkgutil)
28334        pkgutil_help $MISSING_DEPENDENCY ;;
28335      pkgadd)
28336        pkgadd_help  $MISSING_DEPENDENCY ;;
28337    esac
28338
28339    if test "x$PKGHANDLER_COMMAND" != x; then
28340      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28341    fi
28342  fi
28343
28344      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28345    fi
28346  fi
28347
28348  # Now we have a compiler binary in CC. Make sure it's okay.
28349
28350  # Only process if variable expands to non-empty
28351
28352  if test "x$CC" != x; then
28353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28354
28355  # First separate the path from the arguments. This will split at the first
28356  # space.
28357  complete="$CC"
28358  path="${complete%% *}"
28359  tmp="$complete EOL"
28360  arguments="${tmp#* }"
28361
28362  # Input might be given as Windows format, start by converting to
28363  # unix format.
28364  new_path=`$CYGPATH -u "$path"`
28365
28366  # Now try to locate executable using which
28367  new_path=`$WHICH "$new_path" 2> /dev/null`
28368  # bat and cmd files are not always considered executable in cygwin causing which
28369  # to not find them
28370  if test "x$new_path" = x \
28371      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28372      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28373    new_path=`$CYGPATH -u "$path"`
28374  fi
28375  if test "x$new_path" = x; then
28376    # Oops. Which didn't find the executable.
28377    # The splitting of arguments from the executable at a space might have been incorrect,
28378    # since paths with space are more likely in Windows. Give it another try with the whole
28379    # argument.
28380    path="$complete"
28381    arguments="EOL"
28382    new_path=`$CYGPATH -u "$path"`
28383    new_path=`$WHICH "$new_path" 2> /dev/null`
28384    # bat and cmd files are not always considered executable in cygwin causing which
28385    # to not find them
28386    if test "x$new_path" = x \
28387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28389      new_path=`$CYGPATH -u "$path"`
28390    fi
28391    if test "x$new_path" = x; then
28392      # It's still not found. Now this is an unrecoverable error.
28393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28394$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28395      has_space=`$ECHO "$complete" | $GREP " "`
28396      if test "x$has_space" != x; then
28397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28399      fi
28400      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28401    fi
28402  fi
28403
28404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28407  # "foo.exe" is OK but "foo" is an error.
28408  #
28409  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28410  # It is also a way to make sure we got the proper file name for the real test later on.
28411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28412  if test "x$test_shortpath" = x; then
28413    # Short path failed, file does not exist as specified.
28414    # Try adding .exe or .cmd
28415    if test -f "${new_path}.exe"; then
28416      input_to_shortpath="${new_path}.exe"
28417    elif test -f "${new_path}.cmd"; then
28418      input_to_shortpath="${new_path}.cmd"
28419    else
28420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28421$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28422      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28423$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28424      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28425    fi
28426  else
28427    input_to_shortpath="$new_path"
28428  fi
28429
28430  # Call helper function which possibly converts this using DOS-style short mode.
28431  # If so, the updated path is stored in $new_path.
28432  new_path="$input_to_shortpath"
28433
28434  input_path="$input_to_shortpath"
28435  # Check if we need to convert this using DOS-style short mode. If the path
28436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28437  # take no chances and rewrite it.
28438  # Note: m4 eats our [], so we need to use [ and ] instead.
28439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28440  if test "x$has_forbidden_chars" != x; then
28441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28445      # Going to short mode and back again did indeed matter. Since short mode is
28446      # case insensitive, let's make it lowercase to improve readability.
28447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28448      # Now convert it back to Unix-style (cygpath)
28449      input_path=`$CYGPATH -u "$shortmode_path"`
28450      new_path="$input_path"
28451    fi
28452  fi
28453
28454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28455  if test "x$test_cygdrive_prefix" = x; then
28456    # As a simple fix, exclude /usr/bin since it's not a real path.
28457    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28459      # a path prefixed by /cygdrive for fixpath to work.
28460      new_path="$CYGWIN_ROOT_PATH$input_path"
28461    fi
28462  fi
28463
28464  # remove trailing .exe if any
28465  new_path="${new_path/%.exe/}"
28466
28467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28468
28469  # First separate the path from the arguments. This will split at the first
28470  # space.
28471  complete="$CC"
28472  path="${complete%% *}"
28473  tmp="$complete EOL"
28474  arguments="${tmp#* }"
28475
28476  # Input might be given as Windows format, start by converting to
28477  # unix format.
28478  new_path="$path"
28479
28480  windows_path="$new_path"
28481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28482    unix_path=`$CYGPATH -u "$windows_path"`
28483    new_path="$unix_path"
28484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28486    new_path="$unix_path"
28487  fi
28488
28489
28490  # Now try to locate executable using which
28491  new_path=`$WHICH "$new_path" 2> /dev/null`
28492
28493  if test "x$new_path" = x; then
28494    # Oops. Which didn't find the executable.
28495    # The splitting of arguments from the executable at a space might have been incorrect,
28496    # since paths with space are more likely in Windows. Give it another try with the whole
28497    # argument.
28498    path="$complete"
28499    arguments="EOL"
28500    new_path="$path"
28501
28502  windows_path="$new_path"
28503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28504    unix_path=`$CYGPATH -u "$windows_path"`
28505    new_path="$unix_path"
28506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28508    new_path="$unix_path"
28509  fi
28510
28511
28512    new_path=`$WHICH "$new_path" 2> /dev/null`
28513    # bat and cmd files are not always considered executable in MSYS causing which
28514    # to not find them
28515    if test "x$new_path" = x \
28516        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28517        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28518      new_path="$path"
28519
28520  windows_path="$new_path"
28521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28522    unix_path=`$CYGPATH -u "$windows_path"`
28523    new_path="$unix_path"
28524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28526    new_path="$unix_path"
28527  fi
28528
28529    fi
28530
28531    if test "x$new_path" = x; then
28532      # It's still not found. Now this is an unrecoverable error.
28533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28534$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28535      has_space=`$ECHO "$complete" | $GREP " "`
28536      if test "x$has_space" != x; then
28537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28539      fi
28540      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28541    fi
28542  fi
28543
28544  # Now new_path has a complete unix path to the binary
28545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28546    # Keep paths in /bin as-is, but remove trailing .exe if any
28547    new_path="${new_path/%.exe/}"
28548    # Do not save /bin paths to all_fixpath_prefixes!
28549  else
28550    # Not in mixed or Windows style, start by that.
28551    new_path=`cmd //c echo $new_path`
28552
28553  input_path="$new_path"
28554  # Check if we need to convert this using DOS-style short mode. If the path
28555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28556  # take no chances and rewrite it.
28557  # Note: m4 eats our [], so we need to use [ and ] instead.
28558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28559  if test "x$has_forbidden_chars" != x; then
28560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28562  fi
28563
28564    # Output is in $new_path
28565
28566  windows_path="$new_path"
28567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28568    unix_path=`$CYGPATH -u "$windows_path"`
28569    new_path="$unix_path"
28570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28572    new_path="$unix_path"
28573  fi
28574
28575    # remove trailing .exe if any
28576    new_path="${new_path/%.exe/}"
28577
28578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28580  fi
28581
28582    else
28583      # We're on a unix platform. Hooray! :)
28584      # First separate the path from the arguments. This will split at the first
28585      # space.
28586      complete="$CC"
28587      path="${complete%% *}"
28588      tmp="$complete EOL"
28589      arguments="${tmp#* }"
28590
28591      # Cannot rely on the command "which" here since it doesn't always work.
28592      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28593      if test -z "$is_absolute_path"; then
28594        # Path to executable is not absolute. Find it.
28595        IFS_save="$IFS"
28596        IFS=:
28597        for p in $PATH; do
28598          if test -f "$p/$path" && test -x "$p/$path"; then
28599            new_path="$p/$path"
28600            break
28601          fi
28602        done
28603        IFS="$IFS_save"
28604      else
28605        # This is an absolute path, we can use it without further modifications.
28606        new_path="$path"
28607      fi
28608
28609      if test "x$new_path" = x; then
28610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28611$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28612        has_space=`$ECHO "$complete" | $GREP " "`
28613        if test "x$has_space" != x; then
28614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28616        fi
28617        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28618      fi
28619    fi
28620
28621    # Now join together the path and the arguments once again
28622    if test "x$arguments" != xEOL; then
28623      new_complete="$new_path ${arguments% *}"
28624    else
28625      new_complete="$new_path"
28626    fi
28627
28628    if test "x$complete" != "x$new_complete"; then
28629      CC="$new_complete"
28630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28631$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28632    fi
28633  fi
28634
28635  TEST_COMPILER="$CC"
28636  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28637  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28638  if test "x$OPENJDK_BUILD_OS" != xaix; then
28639    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28641$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28642
28643  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28644    # Follow a chain of symbolic links. Use readlink
28645    # where it exists, else fall back to horribly
28646    # complicated shell code.
28647    if test "x$READLINK_TESTED" != yes; then
28648      # On MacOSX there is a readlink tool with a different
28649      # purpose than the GNU readlink tool. Check the found readlink.
28650      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28651      if test "x$ISGNU" = x; then
28652        # A readlink that we do not know how to use.
28653        # Are there other non-GNU readlinks out there?
28654        READLINK_TESTED=yes
28655        READLINK=
28656      fi
28657    fi
28658
28659    if test "x$READLINK" != x; then
28660      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28661    else
28662      # Save the current directory for restoring afterwards
28663      STARTDIR=$PWD
28664      COUNTER=0
28665      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28666      sym_link_file=`$BASENAME $TEST_COMPILER`
28667      cd $sym_link_dir
28668      # Use -P flag to resolve symlinks in directories.
28669      cd `$THEPWDCMD -P`
28670      sym_link_dir=`$THEPWDCMD -P`
28671      # Resolve file symlinks
28672      while test $COUNTER -lt 20; do
28673        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28674        if test "x$ISLINK" == x; then
28675          # This is not a symbolic link! We are done!
28676          break
28677        fi
28678        # Again resolve directory symlinks since the target of the just found
28679        # link could be in a different directory
28680        cd `$DIRNAME $ISLINK`
28681        sym_link_dir=`$THEPWDCMD -P`
28682        sym_link_file=`$BASENAME $ISLINK`
28683        let COUNTER=COUNTER+1
28684      done
28685      cd $STARTDIR
28686      TEST_COMPILER=$sym_link_dir/$sym_link_file
28687    fi
28688  fi
28689
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28691$as_echo "$TEST_COMPILER" >&6; }
28692  fi
28693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28694$as_echo_n "checking if CC is disguised ccache... " >&6; }
28695
28696  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28697  if test "x$COMPILER_BASENAME" = "xccache"; then
28698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28699$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28700    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28701    # We want to control ccache invocation ourselves, so ignore this cc and try
28702    # searching again.
28703
28704    # Remove the path to the fake ccache cc from the PATH
28705    RETRY_COMPILER_SAVED_PATH="$PATH"
28706    COMPILER_DIRNAME=`$DIRNAME $CC`
28707    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28708
28709    # Try again looking for our compiler
28710    if test -n "$ac_tool_prefix"; then
28711  for ac_prog in $TOOLCHAIN_CC_BINARY
28712  do
28713    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28714set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28716$as_echo_n "checking for $ac_word... " >&6; }
28717if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28718  $as_echo_n "(cached) " >&6
28719else
28720  if test -n "$PROPER_COMPILER_CC"; then
28721  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28722else
28723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28724for as_dir in $PATH
28725do
28726  IFS=$as_save_IFS
28727  test -z "$as_dir" && as_dir=.
28728    for ac_exec_ext in '' $ac_executable_extensions; do
28729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28730    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28732    break 2
28733  fi
28734done
28735  done
28736IFS=$as_save_IFS
28737
28738fi
28739fi
28740PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28741if test -n "$PROPER_COMPILER_CC"; then
28742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28743$as_echo "$PROPER_COMPILER_CC" >&6; }
28744else
28745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28746$as_echo "no" >&6; }
28747fi
28748
28749
28750    test -n "$PROPER_COMPILER_CC" && break
28751  done
28752fi
28753if test -z "$PROPER_COMPILER_CC"; then
28754  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28755  for ac_prog in $TOOLCHAIN_CC_BINARY
28756do
28757  # Extract the first word of "$ac_prog", so it can be a program name with args.
28758set dummy $ac_prog; ac_word=$2
28759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28760$as_echo_n "checking for $ac_word... " >&6; }
28761if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28762  $as_echo_n "(cached) " >&6
28763else
28764  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28765  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28766else
28767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28768for as_dir in $PATH
28769do
28770  IFS=$as_save_IFS
28771  test -z "$as_dir" && as_dir=.
28772    for ac_exec_ext in '' $ac_executable_extensions; do
28773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28774    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28776    break 2
28777  fi
28778done
28779  done
28780IFS=$as_save_IFS
28781
28782fi
28783fi
28784ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28785if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28787$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28788else
28789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28790$as_echo "no" >&6; }
28791fi
28792
28793
28794  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28795done
28796
28797  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28798    PROPER_COMPILER_CC=""
28799  else
28800    case $cross_compiling:$ac_tool_warned in
28801yes:)
28802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28804ac_tool_warned=yes ;;
28805esac
28806    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28807  fi
28808fi
28809
28810
28811  # Only process if variable expands to non-empty
28812
28813  if test "x$PROPER_COMPILER_CC" != x; then
28814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28815
28816  # First separate the path from the arguments. This will split at the first
28817  # space.
28818  complete="$PROPER_COMPILER_CC"
28819  path="${complete%% *}"
28820  tmp="$complete EOL"
28821  arguments="${tmp#* }"
28822
28823  # Input might be given as Windows format, start by converting to
28824  # unix format.
28825  new_path=`$CYGPATH -u "$path"`
28826
28827  # Now try to locate executable using which
28828  new_path=`$WHICH "$new_path" 2> /dev/null`
28829  # bat and cmd files are not always considered executable in cygwin causing which
28830  # to not find them
28831  if test "x$new_path" = x \
28832      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28833      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28834    new_path=`$CYGPATH -u "$path"`
28835  fi
28836  if test "x$new_path" = x; then
28837    # Oops. Which didn't find the executable.
28838    # The splitting of arguments from the executable at a space might have been incorrect,
28839    # since paths with space are more likely in Windows. Give it another try with the whole
28840    # argument.
28841    path="$complete"
28842    arguments="EOL"
28843    new_path=`$CYGPATH -u "$path"`
28844    new_path=`$WHICH "$new_path" 2> /dev/null`
28845    # bat and cmd files are not always considered executable in cygwin causing which
28846    # to not find them
28847    if test "x$new_path" = x \
28848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28850      new_path=`$CYGPATH -u "$path"`
28851    fi
28852    if test "x$new_path" = x; then
28853      # It's still not found. Now this is an unrecoverable error.
28854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28855$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28856      has_space=`$ECHO "$complete" | $GREP " "`
28857      if test "x$has_space" != x; then
28858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28860      fi
28861      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28862    fi
28863  fi
28864
28865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28868  # "foo.exe" is OK but "foo" is an error.
28869  #
28870  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28871  # It is also a way to make sure we got the proper file name for the real test later on.
28872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28873  if test "x$test_shortpath" = x; then
28874    # Short path failed, file does not exist as specified.
28875    # Try adding .exe or .cmd
28876    if test -f "${new_path}.exe"; then
28877      input_to_shortpath="${new_path}.exe"
28878    elif test -f "${new_path}.cmd"; then
28879      input_to_shortpath="${new_path}.cmd"
28880    else
28881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28882$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28883      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28884$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28885      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28886    fi
28887  else
28888    input_to_shortpath="$new_path"
28889  fi
28890
28891  # Call helper function which possibly converts this using DOS-style short mode.
28892  # If so, the updated path is stored in $new_path.
28893  new_path="$input_to_shortpath"
28894
28895  input_path="$input_to_shortpath"
28896  # Check if we need to convert this using DOS-style short mode. If the path
28897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28898  # take no chances and rewrite it.
28899  # Note: m4 eats our [], so we need to use [ and ] instead.
28900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28901  if test "x$has_forbidden_chars" != x; then
28902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28906      # Going to short mode and back again did indeed matter. Since short mode is
28907      # case insensitive, let's make it lowercase to improve readability.
28908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28909      # Now convert it back to Unix-style (cygpath)
28910      input_path=`$CYGPATH -u "$shortmode_path"`
28911      new_path="$input_path"
28912    fi
28913  fi
28914
28915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28916  if test "x$test_cygdrive_prefix" = x; then
28917    # As a simple fix, exclude /usr/bin since it's not a real path.
28918    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28920      # a path prefixed by /cygdrive for fixpath to work.
28921      new_path="$CYGWIN_ROOT_PATH$input_path"
28922    fi
28923  fi
28924
28925  # remove trailing .exe if any
28926  new_path="${new_path/%.exe/}"
28927
28928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28929
28930  # First separate the path from the arguments. This will split at the first
28931  # space.
28932  complete="$PROPER_COMPILER_CC"
28933  path="${complete%% *}"
28934  tmp="$complete EOL"
28935  arguments="${tmp#* }"
28936
28937  # Input might be given as Windows format, start by converting to
28938  # unix format.
28939  new_path="$path"
28940
28941  windows_path="$new_path"
28942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28943    unix_path=`$CYGPATH -u "$windows_path"`
28944    new_path="$unix_path"
28945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28947    new_path="$unix_path"
28948  fi
28949
28950
28951  # Now try to locate executable using which
28952  new_path=`$WHICH "$new_path" 2> /dev/null`
28953
28954  if test "x$new_path" = x; then
28955    # Oops. Which didn't find the executable.
28956    # The splitting of arguments from the executable at a space might have been incorrect,
28957    # since paths with space are more likely in Windows. Give it another try with the whole
28958    # argument.
28959    path="$complete"
28960    arguments="EOL"
28961    new_path="$path"
28962
28963  windows_path="$new_path"
28964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28965    unix_path=`$CYGPATH -u "$windows_path"`
28966    new_path="$unix_path"
28967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28969    new_path="$unix_path"
28970  fi
28971
28972
28973    new_path=`$WHICH "$new_path" 2> /dev/null`
28974    # bat and cmd files are not always considered executable in MSYS causing which
28975    # to not find them
28976    if test "x$new_path" = x \
28977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28979      new_path="$path"
28980
28981  windows_path="$new_path"
28982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28983    unix_path=`$CYGPATH -u "$windows_path"`
28984    new_path="$unix_path"
28985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28987    new_path="$unix_path"
28988  fi
28989
28990    fi
28991
28992    if test "x$new_path" = x; then
28993      # It's still not found. Now this is an unrecoverable error.
28994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28995$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28996      has_space=`$ECHO "$complete" | $GREP " "`
28997      if test "x$has_space" != x; then
28998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29000      fi
29001      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29002    fi
29003  fi
29004
29005  # Now new_path has a complete unix path to the binary
29006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29007    # Keep paths in /bin as-is, but remove trailing .exe if any
29008    new_path="${new_path/%.exe/}"
29009    # Do not save /bin paths to all_fixpath_prefixes!
29010  else
29011    # Not in mixed or Windows style, start by that.
29012    new_path=`cmd //c echo $new_path`
29013
29014  input_path="$new_path"
29015  # Check if we need to convert this using DOS-style short mode. If the path
29016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29017  # take no chances and rewrite it.
29018  # Note: m4 eats our [], so we need to use [ and ] instead.
29019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29020  if test "x$has_forbidden_chars" != x; then
29021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29023  fi
29024
29025    # Output is in $new_path
29026
29027  windows_path="$new_path"
29028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29029    unix_path=`$CYGPATH -u "$windows_path"`
29030    new_path="$unix_path"
29031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29033    new_path="$unix_path"
29034  fi
29035
29036    # remove trailing .exe if any
29037    new_path="${new_path/%.exe/}"
29038
29039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29041  fi
29042
29043    else
29044      # We're on a unix platform. Hooray! :)
29045      # First separate the path from the arguments. This will split at the first
29046      # space.
29047      complete="$PROPER_COMPILER_CC"
29048      path="${complete%% *}"
29049      tmp="$complete EOL"
29050      arguments="${tmp#* }"
29051
29052      # Cannot rely on the command "which" here since it doesn't always work.
29053      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29054      if test -z "$is_absolute_path"; then
29055        # Path to executable is not absolute. Find it.
29056        IFS_save="$IFS"
29057        IFS=:
29058        for p in $PATH; do
29059          if test -f "$p/$path" && test -x "$p/$path"; then
29060            new_path="$p/$path"
29061            break
29062          fi
29063        done
29064        IFS="$IFS_save"
29065      else
29066        # This is an absolute path, we can use it without further modifications.
29067        new_path="$path"
29068      fi
29069
29070      if test "x$new_path" = x; then
29071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29072$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29073        has_space=`$ECHO "$complete" | $GREP " "`
29074        if test "x$has_space" != x; then
29075          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29077        fi
29078        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29079      fi
29080    fi
29081
29082    # Now join together the path and the arguments once again
29083    if test "x$arguments" != xEOL; then
29084      new_complete="$new_path ${arguments% *}"
29085    else
29086      new_complete="$new_path"
29087    fi
29088
29089    if test "x$complete" != "x$new_complete"; then
29090      PROPER_COMPILER_CC="$new_complete"
29091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29092$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29093    fi
29094  fi
29095
29096    PATH="$RETRY_COMPILER_SAVED_PATH"
29097
29098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29099$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29100
29101  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29102    # Follow a chain of symbolic links. Use readlink
29103    # where it exists, else fall back to horribly
29104    # complicated shell code.
29105    if test "x$READLINK_TESTED" != yes; then
29106      # On MacOSX there is a readlink tool with a different
29107      # purpose than the GNU readlink tool. Check the found readlink.
29108      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29109      if test "x$ISGNU" = x; then
29110        # A readlink that we do not know how to use.
29111        # Are there other non-GNU readlinks out there?
29112        READLINK_TESTED=yes
29113        READLINK=
29114      fi
29115    fi
29116
29117    if test "x$READLINK" != x; then
29118      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29119    else
29120      # Save the current directory for restoring afterwards
29121      STARTDIR=$PWD
29122      COUNTER=0
29123      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29124      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29125      cd $sym_link_dir
29126      # Use -P flag to resolve symlinks in directories.
29127      cd `$THEPWDCMD -P`
29128      sym_link_dir=`$THEPWDCMD -P`
29129      # Resolve file symlinks
29130      while test $COUNTER -lt 20; do
29131        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29132        if test "x$ISLINK" == x; then
29133          # This is not a symbolic link! We are done!
29134          break
29135        fi
29136        # Again resolve directory symlinks since the target of the just found
29137        # link could be in a different directory
29138        cd `$DIRNAME $ISLINK`
29139        sym_link_dir=`$THEPWDCMD -P`
29140        sym_link_file=`$BASENAME $ISLINK`
29141        let COUNTER=COUNTER+1
29142      done
29143      cd $STARTDIR
29144      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29145    fi
29146  fi
29147
29148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29149$as_echo "$PROPER_COMPILER_CC" >&6; }
29150    CC="$PROPER_COMPILER_CC"
29151  else
29152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29153$as_echo "no, keeping CC" >&6; }
29154  fi
29155
29156
29157  COMPILER=$CC
29158  COMPILER_NAME=$COMPILER_NAME
29159
29160  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29161    # cc -V output typically looks like
29162    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29163    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29164    # Check that this is likely to be the Solaris Studio cc.
29165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29166    if test $? -ne 0; then
29167      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29168      { $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
29169$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29170      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29171$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29172      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29173$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29174      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29175    fi
29176    # Remove usage instructions (if present), and
29177    # collapse compiler output into a single line
29178    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29179        $SED -e 's/ *[Uu]sage:.*//'`
29180    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29181        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29182  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29183    # xlc -qversion output typically looks like
29184    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29185    #     Version: 11.01.0000.0015
29186    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29187    # Check that this is likely to be the IBM XL C compiler.
29188    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29189    if test $? -ne 0; then
29190      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29191      { $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
29192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29194$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29195      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29196$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29197      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29198    fi
29199    # Collapse compiler output into a single line
29200    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29201    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29202        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29203  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29204    # There is no specific version flag, but all output starts with a version string.
29205    # First line typically looks something like:
29206    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29207    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29208    # Check that this is likely to be Microsoft CL.EXE.
29209    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29210    if test $? -ne 0; then
29211      { $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
29212$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29213      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29214$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29215      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29216    fi
29217    # Collapse compiler output into a single line
29218    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29219    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29220        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29221  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29222    # gcc --version output typically looks like
29223    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29224    #     Copyright (C) 2013 Free Software Foundation, Inc.
29225    #     This is free software; see the source for copying conditions.  There is NO
29226    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29227    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29228    # Check that this is likely to be GCC.
29229    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29230    if test $? -ne 0; then
29231      { $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
29232$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29233      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29234$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29235      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29236    fi
29237    # Remove Copyright and legalese from version string, and
29238    # collapse into a single line
29239    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29240        $SED -e 's/ *Copyright .*//'`
29241    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29242        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29243  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29244    # clang --version output typically looks like
29245    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29246    #    clang version 3.3 (tags/RELEASE_33/final)
29247    # or
29248    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29249    #    Target: x86_64-pc-linux-gnu
29250    #    Thread model: posix
29251    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29252    # Check that this is likely to be clang
29253    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29254    if test $? -ne 0; then
29255      { $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
29256$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29257      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29258$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29259      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29260    fi
29261    # Collapse compiler output into a single line
29262    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29263    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29264        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29265  else
29266      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29267  fi
29268  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29269  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29270  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29271  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29272
29273  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29274$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29275
29276
29277  # Now that we have resolved CC ourself, let autoconf have its go at it
29278  ac_ext=c
29279ac_cpp='$CPP $CPPFLAGS'
29280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29282ac_compiler_gnu=$ac_cv_c_compiler_gnu
29283if test -n "$ac_tool_prefix"; then
29284  for ac_prog in $CC
29285  do
29286    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29287set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29289$as_echo_n "checking for $ac_word... " >&6; }
29290if ${ac_cv_prog_CC+:} false; then :
29291  $as_echo_n "(cached) " >&6
29292else
29293  if test -n "$CC"; then
29294  ac_cv_prog_CC="$CC" # Let the user override the test.
29295else
29296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29297for as_dir in $PATH
29298do
29299  IFS=$as_save_IFS
29300  test -z "$as_dir" && as_dir=.
29301    for ac_exec_ext in '' $ac_executable_extensions; do
29302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29303    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29305    break 2
29306  fi
29307done
29308  done
29309IFS=$as_save_IFS
29310
29311fi
29312fi
29313CC=$ac_cv_prog_CC
29314if test -n "$CC"; then
29315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29316$as_echo "$CC" >&6; }
29317else
29318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29319$as_echo "no" >&6; }
29320fi
29321
29322
29323    test -n "$CC" && break
29324  done
29325fi
29326if test -z "$CC"; then
29327  ac_ct_CC=$CC
29328  for ac_prog in $CC
29329do
29330  # Extract the first word of "$ac_prog", so it can be a program name with args.
29331set dummy $ac_prog; ac_word=$2
29332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29333$as_echo_n "checking for $ac_word... " >&6; }
29334if ${ac_cv_prog_ac_ct_CC+:} false; then :
29335  $as_echo_n "(cached) " >&6
29336else
29337  if test -n "$ac_ct_CC"; then
29338  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29339else
29340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29341for as_dir in $PATH
29342do
29343  IFS=$as_save_IFS
29344  test -z "$as_dir" && as_dir=.
29345    for ac_exec_ext in '' $ac_executable_extensions; do
29346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29347    ac_cv_prog_ac_ct_CC="$ac_prog"
29348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29349    break 2
29350  fi
29351done
29352  done
29353IFS=$as_save_IFS
29354
29355fi
29356fi
29357ac_ct_CC=$ac_cv_prog_ac_ct_CC
29358if test -n "$ac_ct_CC"; then
29359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29360$as_echo "$ac_ct_CC" >&6; }
29361else
29362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29363$as_echo "no" >&6; }
29364fi
29365
29366
29367  test -n "$ac_ct_CC" && break
29368done
29369
29370  if test "x$ac_ct_CC" = x; then
29371    CC=""
29372  else
29373    case $cross_compiling:$ac_tool_warned in
29374yes:)
29375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29377ac_tool_warned=yes ;;
29378esac
29379    CC=$ac_ct_CC
29380  fi
29381fi
29382
29383
29384test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29386as_fn_error $? "no acceptable C compiler found in \$PATH
29387See \`config.log' for more details" "$LINENO" 5; }
29388
29389# Provide some information about the compiler.
29390$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29391set X $ac_compile
29392ac_compiler=$2
29393for ac_option in --version -v -V -qversion; do
29394  { { ac_try="$ac_compiler $ac_option >&5"
29395case "(($ac_try" in
29396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29397  *) ac_try_echo=$ac_try;;
29398esac
29399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29400$as_echo "$ac_try_echo"; } >&5
29401  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29402  ac_status=$?
29403  if test -s conftest.err; then
29404    sed '10a\
29405... rest of stderr output deleted ...
29406         10q' conftest.err >conftest.er1
29407    cat conftest.er1 >&5
29408  fi
29409  rm -f conftest.er1 conftest.err
29410  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29411  test $ac_status = 0; }
29412done
29413
29414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29415/* end confdefs.h.  */
29416
29417int
29418main ()
29419{
29420
29421  ;
29422  return 0;
29423}
29424_ACEOF
29425ac_clean_files_save=$ac_clean_files
29426ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29427# Try to create an executable without -o first, disregard a.out.
29428# It will help us diagnose broken compilers, and finding out an intuition
29429# of exeext.
29430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29431$as_echo_n "checking whether the C compiler works... " >&6; }
29432ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29433
29434# The possible output files:
29435ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29436
29437ac_rmfiles=
29438for ac_file in $ac_files
29439do
29440  case $ac_file in
29441    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29442    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29443  esac
29444done
29445rm -f $ac_rmfiles
29446
29447if { { ac_try="$ac_link_default"
29448case "(($ac_try" in
29449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29450  *) ac_try_echo=$ac_try;;
29451esac
29452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29453$as_echo "$ac_try_echo"; } >&5
29454  (eval "$ac_link_default") 2>&5
29455  ac_status=$?
29456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29457  test $ac_status = 0; }; then :
29458  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29459# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29460# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29461# so that the user can short-circuit this test for compilers unknown to
29462# Autoconf.
29463for ac_file in $ac_files ''
29464do
29465  test -f "$ac_file" || continue
29466  case $ac_file in
29467    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29468	;;
29469    [ab].out )
29470	# We found the default executable, but exeext='' is most
29471	# certainly right.
29472	break;;
29473    *.* )
29474	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29475	then :; else
29476	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29477	fi
29478	# We set ac_cv_exeext here because the later test for it is not
29479	# safe: cross compilers may not add the suffix if given an `-o'
29480	# argument, so we may need to know it at that point already.
29481	# Even if this section looks crufty: it has the advantage of
29482	# actually working.
29483	break;;
29484    * )
29485	break;;
29486  esac
29487done
29488test "$ac_cv_exeext" = no && ac_cv_exeext=
29489
29490else
29491  ac_file=''
29492fi
29493if test -z "$ac_file"; then :
29494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29495$as_echo "no" >&6; }
29496$as_echo "$as_me: failed program was:" >&5
29497sed 's/^/| /' conftest.$ac_ext >&5
29498
29499{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29501as_fn_error 77 "C compiler cannot create executables
29502See \`config.log' for more details" "$LINENO" 5; }
29503else
29504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29505$as_echo "yes" >&6; }
29506fi
29507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29508$as_echo_n "checking for C compiler default output file name... " >&6; }
29509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29510$as_echo "$ac_file" >&6; }
29511ac_exeext=$ac_cv_exeext
29512
29513rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29514ac_clean_files=$ac_clean_files_save
29515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29516$as_echo_n "checking for suffix of executables... " >&6; }
29517if { { ac_try="$ac_link"
29518case "(($ac_try" in
29519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29520  *) ac_try_echo=$ac_try;;
29521esac
29522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29523$as_echo "$ac_try_echo"; } >&5
29524  (eval "$ac_link") 2>&5
29525  ac_status=$?
29526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29527  test $ac_status = 0; }; then :
29528  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29529# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29530# work properly (i.e., refer to `conftest.exe'), while it won't with
29531# `rm'.
29532for ac_file in conftest.exe conftest conftest.*; do
29533  test -f "$ac_file" || continue
29534  case $ac_file in
29535    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29536    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29537	  break;;
29538    * ) break;;
29539  esac
29540done
29541else
29542  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29544as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29545See \`config.log' for more details" "$LINENO" 5; }
29546fi
29547rm -f conftest conftest$ac_cv_exeext
29548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29549$as_echo "$ac_cv_exeext" >&6; }
29550
29551rm -f conftest.$ac_ext
29552EXEEXT=$ac_cv_exeext
29553ac_exeext=$EXEEXT
29554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29555/* end confdefs.h.  */
29556#include <stdio.h>
29557int
29558main ()
29559{
29560FILE *f = fopen ("conftest.out", "w");
29561 return ferror (f) || fclose (f) != 0;
29562
29563  ;
29564  return 0;
29565}
29566_ACEOF
29567ac_clean_files="$ac_clean_files conftest.out"
29568# Check that the compiler produces executables we can run.  If not, either
29569# the compiler is broken, or we cross compile.
29570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29571$as_echo_n "checking whether we are cross compiling... " >&6; }
29572if test "$cross_compiling" != yes; then
29573  { { ac_try="$ac_link"
29574case "(($ac_try" in
29575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29576  *) ac_try_echo=$ac_try;;
29577esac
29578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29579$as_echo "$ac_try_echo"; } >&5
29580  (eval "$ac_link") 2>&5
29581  ac_status=$?
29582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29583  test $ac_status = 0; }
29584  if { ac_try='./conftest$ac_cv_exeext'
29585  { { case "(($ac_try" in
29586  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29587  *) ac_try_echo=$ac_try;;
29588esac
29589eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29590$as_echo "$ac_try_echo"; } >&5
29591  (eval "$ac_try") 2>&5
29592  ac_status=$?
29593  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29594  test $ac_status = 0; }; }; then
29595    cross_compiling=no
29596  else
29597    if test "$cross_compiling" = maybe; then
29598	cross_compiling=yes
29599    else
29600	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29602as_fn_error $? "cannot run C compiled programs.
29603If you meant to cross compile, use \`--host'.
29604See \`config.log' for more details" "$LINENO" 5; }
29605    fi
29606  fi
29607fi
29608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29609$as_echo "$cross_compiling" >&6; }
29610
29611rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29612ac_clean_files=$ac_clean_files_save
29613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29614$as_echo_n "checking for suffix of object files... " >&6; }
29615if ${ac_cv_objext+:} false; then :
29616  $as_echo_n "(cached) " >&6
29617else
29618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29619/* end confdefs.h.  */
29620
29621int
29622main ()
29623{
29624
29625  ;
29626  return 0;
29627}
29628_ACEOF
29629rm -f conftest.o conftest.obj
29630if { { ac_try="$ac_compile"
29631case "(($ac_try" in
29632  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29633  *) ac_try_echo=$ac_try;;
29634esac
29635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29636$as_echo "$ac_try_echo"; } >&5
29637  (eval "$ac_compile") 2>&5
29638  ac_status=$?
29639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29640  test $ac_status = 0; }; then :
29641  for ac_file in conftest.o conftest.obj conftest.*; do
29642  test -f "$ac_file" || continue;
29643  case $ac_file in
29644    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29645    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29646       break;;
29647  esac
29648done
29649else
29650  $as_echo "$as_me: failed program was:" >&5
29651sed 's/^/| /' conftest.$ac_ext >&5
29652
29653{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29655as_fn_error $? "cannot compute suffix of object files: cannot compile
29656See \`config.log' for more details" "$LINENO" 5; }
29657fi
29658rm -f conftest.$ac_cv_objext conftest.$ac_ext
29659fi
29660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29661$as_echo "$ac_cv_objext" >&6; }
29662OBJEXT=$ac_cv_objext
29663ac_objext=$OBJEXT
29664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29665$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29666if ${ac_cv_c_compiler_gnu+:} false; then :
29667  $as_echo_n "(cached) " >&6
29668else
29669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29670/* end confdefs.h.  */
29671
29672int
29673main ()
29674{
29675#ifndef __GNUC__
29676       choke me
29677#endif
29678
29679  ;
29680  return 0;
29681}
29682_ACEOF
29683if ac_fn_c_try_compile "$LINENO"; then :
29684  ac_compiler_gnu=yes
29685else
29686  ac_compiler_gnu=no
29687fi
29688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29689ac_cv_c_compiler_gnu=$ac_compiler_gnu
29690
29691fi
29692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29693$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29694if test $ac_compiler_gnu = yes; then
29695  GCC=yes
29696else
29697  GCC=
29698fi
29699ac_test_CFLAGS=${CFLAGS+set}
29700ac_save_CFLAGS=$CFLAGS
29701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29702$as_echo_n "checking whether $CC accepts -g... " >&6; }
29703if ${ac_cv_prog_cc_g+:} false; then :
29704  $as_echo_n "(cached) " >&6
29705else
29706  ac_save_c_werror_flag=$ac_c_werror_flag
29707   ac_c_werror_flag=yes
29708   ac_cv_prog_cc_g=no
29709   CFLAGS="-g"
29710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29711/* end confdefs.h.  */
29712
29713int
29714main ()
29715{
29716
29717  ;
29718  return 0;
29719}
29720_ACEOF
29721if ac_fn_c_try_compile "$LINENO"; then :
29722  ac_cv_prog_cc_g=yes
29723else
29724  CFLAGS=""
29725      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29726/* end confdefs.h.  */
29727
29728int
29729main ()
29730{
29731
29732  ;
29733  return 0;
29734}
29735_ACEOF
29736if ac_fn_c_try_compile "$LINENO"; then :
29737
29738else
29739  ac_c_werror_flag=$ac_save_c_werror_flag
29740	 CFLAGS="-g"
29741	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29742/* end confdefs.h.  */
29743
29744int
29745main ()
29746{
29747
29748  ;
29749  return 0;
29750}
29751_ACEOF
29752if ac_fn_c_try_compile "$LINENO"; then :
29753  ac_cv_prog_cc_g=yes
29754fi
29755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29756fi
29757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29758fi
29759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29760   ac_c_werror_flag=$ac_save_c_werror_flag
29761fi
29762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29763$as_echo "$ac_cv_prog_cc_g" >&6; }
29764if test "$ac_test_CFLAGS" = set; then
29765  CFLAGS=$ac_save_CFLAGS
29766elif test $ac_cv_prog_cc_g = yes; then
29767  if test "$GCC" = yes; then
29768    CFLAGS="-g -O2"
29769  else
29770    CFLAGS="-g"
29771  fi
29772else
29773  if test "$GCC" = yes; then
29774    CFLAGS="-O2"
29775  else
29776    CFLAGS=
29777  fi
29778fi
29779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29780$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29781if ${ac_cv_prog_cc_c89+:} false; then :
29782  $as_echo_n "(cached) " >&6
29783else
29784  ac_cv_prog_cc_c89=no
29785ac_save_CC=$CC
29786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29787/* end confdefs.h.  */
29788#include <stdarg.h>
29789#include <stdio.h>
29790struct stat;
29791/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29792struct buf { int x; };
29793FILE * (*rcsopen) (struct buf *, struct stat *, int);
29794static char *e (p, i)
29795     char **p;
29796     int i;
29797{
29798  return p[i];
29799}
29800static char *f (char * (*g) (char **, int), char **p, ...)
29801{
29802  char *s;
29803  va_list v;
29804  va_start (v,p);
29805  s = g (p, va_arg (v,int));
29806  va_end (v);
29807  return s;
29808}
29809
29810/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29811   function prototypes and stuff, but not '\xHH' hex character constants.
29812   These don't provoke an error unfortunately, instead are silently treated
29813   as 'x'.  The following induces an error, until -std is added to get
29814   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29815   array size at least.  It's necessary to write '\x00'==0 to get something
29816   that's true only with -std.  */
29817int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29818
29819/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29820   inside strings and character constants.  */
29821#define FOO(x) 'x'
29822int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29823
29824int test (int i, double x);
29825struct s1 {int (*f) (int a);};
29826struct s2 {int (*f) (double a);};
29827int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29828int argc;
29829char **argv;
29830int
29831main ()
29832{
29833return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29834  ;
29835  return 0;
29836}
29837_ACEOF
29838for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29839	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29840do
29841  CC="$ac_save_CC $ac_arg"
29842  if ac_fn_c_try_compile "$LINENO"; then :
29843  ac_cv_prog_cc_c89=$ac_arg
29844fi
29845rm -f core conftest.err conftest.$ac_objext
29846  test "x$ac_cv_prog_cc_c89" != "xno" && break
29847done
29848rm -f conftest.$ac_ext
29849CC=$ac_save_CC
29850
29851fi
29852# AC_CACHE_VAL
29853case "x$ac_cv_prog_cc_c89" in
29854  x)
29855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29856$as_echo "none needed" >&6; } ;;
29857  xno)
29858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29859$as_echo "unsupported" >&6; } ;;
29860  *)
29861    CC="$CC $ac_cv_prog_cc_c89"
29862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29863$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29864esac
29865if test "x$ac_cv_prog_cc_c89" != xno; then :
29866
29867fi
29868
29869ac_ext=cpp
29870ac_cpp='$CXXCPP $CPPFLAGS'
29871ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29872ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29873ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29874
29875
29876
29877  COMPILER_NAME=C++
29878  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29879
29880  if test "x$CXX" != x; then
29881    # User has supplied compiler name already, always let that override.
29882    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29883$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29884    if test "x`basename $CXX`" = "x$CXX"; then
29885      # A command without a complete path is provided, search $PATH.
29886
29887      for ac_prog in $CXX
29888do
29889  # Extract the first word of "$ac_prog", so it can be a program name with args.
29890set dummy $ac_prog; ac_word=$2
29891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29892$as_echo_n "checking for $ac_word... " >&6; }
29893if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29894  $as_echo_n "(cached) " >&6
29895else
29896  case $POTENTIAL_CXX in
29897  [\\/]* | ?:[\\/]*)
29898  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29899  ;;
29900  *)
29901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29902for as_dir in $PATH
29903do
29904  IFS=$as_save_IFS
29905  test -z "$as_dir" && as_dir=.
29906    for ac_exec_ext in '' $ac_executable_extensions; do
29907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29908    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29910    break 2
29911  fi
29912done
29913  done
29914IFS=$as_save_IFS
29915
29916  ;;
29917esac
29918fi
29919POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29920if test -n "$POTENTIAL_CXX"; then
29921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29922$as_echo "$POTENTIAL_CXX" >&6; }
29923else
29924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29925$as_echo "no" >&6; }
29926fi
29927
29928
29929  test -n "$POTENTIAL_CXX" && break
29930done
29931
29932      if test "x$POTENTIAL_CXX" != x; then
29933        CXX=$POTENTIAL_CXX
29934      else
29935        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29936      fi
29937    else
29938      # Otherwise it might already be a complete path
29939      if test ! -x "$CXX"; then
29940        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29941      fi
29942    fi
29943  else
29944    # No user supplied value. Locate compiler ourselves.
29945
29946    # If we are cross compiling, assume cross compilation tools follows the
29947    # cross compilation standard where they are prefixed with the autoconf
29948    # standard name for the target. For example the binary
29949    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29950    # If we are not cross compiling, then the default compiler name will be
29951    # used.
29952
29953    CXX=
29954    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29955    # before checking the rest of the PATH.
29956    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29957    # step, this should not be necessary.
29958    if test -n "$TOOLCHAIN_PATH"; then
29959      PATH_save="$PATH"
29960      PATH="$TOOLCHAIN_PATH"
29961      for ac_prog in $SEARCH_LIST
29962do
29963  # Extract the first word of "$ac_prog", so it can be a program name with args.
29964set dummy $ac_prog; ac_word=$2
29965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29966$as_echo_n "checking for $ac_word... " >&6; }
29967if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29968  $as_echo_n "(cached) " >&6
29969else
29970  case $TOOLCHAIN_PATH_CXX in
29971  [\\/]* | ?:[\\/]*)
29972  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29973  ;;
29974  *)
29975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29976for as_dir in $PATH
29977do
29978  IFS=$as_save_IFS
29979  test -z "$as_dir" && as_dir=.
29980    for ac_exec_ext in '' $ac_executable_extensions; do
29981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29982    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29984    break 2
29985  fi
29986done
29987  done
29988IFS=$as_save_IFS
29989
29990  ;;
29991esac
29992fi
29993TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29994if test -n "$TOOLCHAIN_PATH_CXX"; then
29995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29996$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29997else
29998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29999$as_echo "no" >&6; }
30000fi
30001
30002
30003  test -n "$TOOLCHAIN_PATH_CXX" && break
30004done
30005
30006      CXX=$TOOLCHAIN_PATH_CXX
30007      PATH="$PATH_save"
30008    fi
30009
30010    # AC_PATH_PROGS can't be run multiple times with the same variable,
30011    # so create a new name for this run.
30012    if test "x$CXX" = x; then
30013      for ac_prog in $SEARCH_LIST
30014do
30015  # Extract the first word of "$ac_prog", so it can be a program name with args.
30016set dummy $ac_prog; ac_word=$2
30017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30018$as_echo_n "checking for $ac_word... " >&6; }
30019if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30020  $as_echo_n "(cached) " >&6
30021else
30022  case $POTENTIAL_CXX in
30023  [\\/]* | ?:[\\/]*)
30024  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30025  ;;
30026  *)
30027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30028for as_dir in $PATH
30029do
30030  IFS=$as_save_IFS
30031  test -z "$as_dir" && as_dir=.
30032    for ac_exec_ext in '' $ac_executable_extensions; do
30033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30034    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30036    break 2
30037  fi
30038done
30039  done
30040IFS=$as_save_IFS
30041
30042  ;;
30043esac
30044fi
30045POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30046if test -n "$POTENTIAL_CXX"; then
30047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30048$as_echo "$POTENTIAL_CXX" >&6; }
30049else
30050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30051$as_echo "no" >&6; }
30052fi
30053
30054
30055  test -n "$POTENTIAL_CXX" && break
30056done
30057
30058      CXX=$POTENTIAL_CXX
30059    fi
30060
30061    if test "x$CXX" = x; then
30062
30063  # Print a helpful message on how to acquire the necessary build dependency.
30064  # devkit is the help tag: freetype, cups, pulse, alsa etc
30065  MISSING_DEPENDENCY=devkit
30066
30067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30068    cygwin_help $MISSING_DEPENDENCY
30069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30070    msys_help $MISSING_DEPENDENCY
30071  else
30072    PKGHANDLER_COMMAND=
30073
30074    case $PKGHANDLER in
30075      apt-get)
30076        apt_help     $MISSING_DEPENDENCY ;;
30077      yum)
30078        yum_help     $MISSING_DEPENDENCY ;;
30079      port)
30080        port_help    $MISSING_DEPENDENCY ;;
30081      pkgutil)
30082        pkgutil_help $MISSING_DEPENDENCY ;;
30083      pkgadd)
30084        pkgadd_help  $MISSING_DEPENDENCY ;;
30085    esac
30086
30087    if test "x$PKGHANDLER_COMMAND" != x; then
30088      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30089    fi
30090  fi
30091
30092      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30093    fi
30094  fi
30095
30096  # Now we have a compiler binary in CXX. Make sure it's okay.
30097
30098  # Only process if variable expands to non-empty
30099
30100  if test "x$CXX" != x; then
30101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30102
30103  # First separate the path from the arguments. This will split at the first
30104  # space.
30105  complete="$CXX"
30106  path="${complete%% *}"
30107  tmp="$complete EOL"
30108  arguments="${tmp#* }"
30109
30110  # Input might be given as Windows format, start by converting to
30111  # unix format.
30112  new_path=`$CYGPATH -u "$path"`
30113
30114  # Now try to locate executable using which
30115  new_path=`$WHICH "$new_path" 2> /dev/null`
30116  # bat and cmd files are not always considered executable in cygwin causing which
30117  # to not find them
30118  if test "x$new_path" = x \
30119      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30120      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30121    new_path=`$CYGPATH -u "$path"`
30122  fi
30123  if test "x$new_path" = x; then
30124    # Oops. Which didn't find the executable.
30125    # The splitting of arguments from the executable at a space might have been incorrect,
30126    # since paths with space are more likely in Windows. Give it another try with the whole
30127    # argument.
30128    path="$complete"
30129    arguments="EOL"
30130    new_path=`$CYGPATH -u "$path"`
30131    new_path=`$WHICH "$new_path" 2> /dev/null`
30132    # bat and cmd files are not always considered executable in cygwin causing which
30133    # to not find them
30134    if test "x$new_path" = x \
30135        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30136        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30137      new_path=`$CYGPATH -u "$path"`
30138    fi
30139    if test "x$new_path" = x; then
30140      # It's still not found. Now this is an unrecoverable error.
30141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30142$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30143      has_space=`$ECHO "$complete" | $GREP " "`
30144      if test "x$has_space" != x; then
30145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30147      fi
30148      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30149    fi
30150  fi
30151
30152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30155  # "foo.exe" is OK but "foo" is an error.
30156  #
30157  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30158  # It is also a way to make sure we got the proper file name for the real test later on.
30159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30160  if test "x$test_shortpath" = x; then
30161    # Short path failed, file does not exist as specified.
30162    # Try adding .exe or .cmd
30163    if test -f "${new_path}.exe"; then
30164      input_to_shortpath="${new_path}.exe"
30165    elif test -f "${new_path}.cmd"; then
30166      input_to_shortpath="${new_path}.cmd"
30167    else
30168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30169$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30170      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30171$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30172      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30173    fi
30174  else
30175    input_to_shortpath="$new_path"
30176  fi
30177
30178  # Call helper function which possibly converts this using DOS-style short mode.
30179  # If so, the updated path is stored in $new_path.
30180  new_path="$input_to_shortpath"
30181
30182  input_path="$input_to_shortpath"
30183  # Check if we need to convert this using DOS-style short mode. If the path
30184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30185  # take no chances and rewrite it.
30186  # Note: m4 eats our [], so we need to use [ and ] instead.
30187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30188  if test "x$has_forbidden_chars" != x; then
30189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30193      # Going to short mode and back again did indeed matter. Since short mode is
30194      # case insensitive, let's make it lowercase to improve readability.
30195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30196      # Now convert it back to Unix-style (cygpath)
30197      input_path=`$CYGPATH -u "$shortmode_path"`
30198      new_path="$input_path"
30199    fi
30200  fi
30201
30202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30203  if test "x$test_cygdrive_prefix" = x; then
30204    # As a simple fix, exclude /usr/bin since it's not a real path.
30205    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30207      # a path prefixed by /cygdrive for fixpath to work.
30208      new_path="$CYGWIN_ROOT_PATH$input_path"
30209    fi
30210  fi
30211
30212  # remove trailing .exe if any
30213  new_path="${new_path/%.exe/}"
30214
30215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30216
30217  # First separate the path from the arguments. This will split at the first
30218  # space.
30219  complete="$CXX"
30220  path="${complete%% *}"
30221  tmp="$complete EOL"
30222  arguments="${tmp#* }"
30223
30224  # Input might be given as Windows format, start by converting to
30225  # unix format.
30226  new_path="$path"
30227
30228  windows_path="$new_path"
30229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30230    unix_path=`$CYGPATH -u "$windows_path"`
30231    new_path="$unix_path"
30232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30234    new_path="$unix_path"
30235  fi
30236
30237
30238  # Now try to locate executable using which
30239  new_path=`$WHICH "$new_path" 2> /dev/null`
30240
30241  if test "x$new_path" = x; then
30242    # Oops. Which didn't find the executable.
30243    # The splitting of arguments from the executable at a space might have been incorrect,
30244    # since paths with space are more likely in Windows. Give it another try with the whole
30245    # argument.
30246    path="$complete"
30247    arguments="EOL"
30248    new_path="$path"
30249
30250  windows_path="$new_path"
30251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30252    unix_path=`$CYGPATH -u "$windows_path"`
30253    new_path="$unix_path"
30254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30256    new_path="$unix_path"
30257  fi
30258
30259
30260    new_path=`$WHICH "$new_path" 2> /dev/null`
30261    # bat and cmd files are not always considered executable in MSYS causing which
30262    # to not find them
30263    if test "x$new_path" = x \
30264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30266      new_path="$path"
30267
30268  windows_path="$new_path"
30269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30270    unix_path=`$CYGPATH -u "$windows_path"`
30271    new_path="$unix_path"
30272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30274    new_path="$unix_path"
30275  fi
30276
30277    fi
30278
30279    if test "x$new_path" = x; then
30280      # It's still not found. Now this is an unrecoverable error.
30281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30282$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30283      has_space=`$ECHO "$complete" | $GREP " "`
30284      if test "x$has_space" != x; then
30285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30287      fi
30288      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30289    fi
30290  fi
30291
30292  # Now new_path has a complete unix path to the binary
30293  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30294    # Keep paths in /bin as-is, but remove trailing .exe if any
30295    new_path="${new_path/%.exe/}"
30296    # Do not save /bin paths to all_fixpath_prefixes!
30297  else
30298    # Not in mixed or Windows style, start by that.
30299    new_path=`cmd //c echo $new_path`
30300
30301  input_path="$new_path"
30302  # Check if we need to convert this using DOS-style short mode. If the path
30303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30304  # take no chances and rewrite it.
30305  # Note: m4 eats our [], so we need to use [ and ] instead.
30306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30307  if test "x$has_forbidden_chars" != x; then
30308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30310  fi
30311
30312    # Output is in $new_path
30313
30314  windows_path="$new_path"
30315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30316    unix_path=`$CYGPATH -u "$windows_path"`
30317    new_path="$unix_path"
30318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30320    new_path="$unix_path"
30321  fi
30322
30323    # remove trailing .exe if any
30324    new_path="${new_path/%.exe/}"
30325
30326    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30327    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30328  fi
30329
30330    else
30331      # We're on a unix platform. Hooray! :)
30332      # First separate the path from the arguments. This will split at the first
30333      # space.
30334      complete="$CXX"
30335      path="${complete%% *}"
30336      tmp="$complete EOL"
30337      arguments="${tmp#* }"
30338
30339      # Cannot rely on the command "which" here since it doesn't always work.
30340      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30341      if test -z "$is_absolute_path"; then
30342        # Path to executable is not absolute. Find it.
30343        IFS_save="$IFS"
30344        IFS=:
30345        for p in $PATH; do
30346          if test -f "$p/$path" && test -x "$p/$path"; then
30347            new_path="$p/$path"
30348            break
30349          fi
30350        done
30351        IFS="$IFS_save"
30352      else
30353        # This is an absolute path, we can use it without further modifications.
30354        new_path="$path"
30355      fi
30356
30357      if test "x$new_path" = x; then
30358        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30359$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30360        has_space=`$ECHO "$complete" | $GREP " "`
30361        if test "x$has_space" != x; then
30362          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30363$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30364        fi
30365        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30366      fi
30367    fi
30368
30369    # Now join together the path and the arguments once again
30370    if test "x$arguments" != xEOL; then
30371      new_complete="$new_path ${arguments% *}"
30372    else
30373      new_complete="$new_path"
30374    fi
30375
30376    if test "x$complete" != "x$new_complete"; then
30377      CXX="$new_complete"
30378      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30379$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30380    fi
30381  fi
30382
30383  TEST_COMPILER="$CXX"
30384  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30385  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30386  if test "x$OPENJDK_BUILD_OS" != xaix; then
30387    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30389$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30390
30391  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30392    # Follow a chain of symbolic links. Use readlink
30393    # where it exists, else fall back to horribly
30394    # complicated shell code.
30395    if test "x$READLINK_TESTED" != yes; then
30396      # On MacOSX there is a readlink tool with a different
30397      # purpose than the GNU readlink tool. Check the found readlink.
30398      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30399      if test "x$ISGNU" = x; then
30400        # A readlink that we do not know how to use.
30401        # Are there other non-GNU readlinks out there?
30402        READLINK_TESTED=yes
30403        READLINK=
30404      fi
30405    fi
30406
30407    if test "x$READLINK" != x; then
30408      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30409    else
30410      # Save the current directory for restoring afterwards
30411      STARTDIR=$PWD
30412      COUNTER=0
30413      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30414      sym_link_file=`$BASENAME $TEST_COMPILER`
30415      cd $sym_link_dir
30416      # Use -P flag to resolve symlinks in directories.
30417      cd `$THEPWDCMD -P`
30418      sym_link_dir=`$THEPWDCMD -P`
30419      # Resolve file symlinks
30420      while test $COUNTER -lt 20; do
30421        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30422        if test "x$ISLINK" == x; then
30423          # This is not a symbolic link! We are done!
30424          break
30425        fi
30426        # Again resolve directory symlinks since the target of the just found
30427        # link could be in a different directory
30428        cd `$DIRNAME $ISLINK`
30429        sym_link_dir=`$THEPWDCMD -P`
30430        sym_link_file=`$BASENAME $ISLINK`
30431        let COUNTER=COUNTER+1
30432      done
30433      cd $STARTDIR
30434      TEST_COMPILER=$sym_link_dir/$sym_link_file
30435    fi
30436  fi
30437
30438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30439$as_echo "$TEST_COMPILER" >&6; }
30440  fi
30441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30442$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30443
30444  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30445  if test "x$COMPILER_BASENAME" = "xccache"; then
30446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30447$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30448    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30449    # We want to control ccache invocation ourselves, so ignore this cc and try
30450    # searching again.
30451
30452    # Remove the path to the fake ccache cc from the PATH
30453    RETRY_COMPILER_SAVED_PATH="$PATH"
30454    COMPILER_DIRNAME=`$DIRNAME $CXX`
30455    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30456
30457    # Try again looking for our compiler
30458    if test -n "$ac_tool_prefix"; then
30459  for ac_prog in $TOOLCHAIN_CXX_BINARY
30460  do
30461    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30464$as_echo_n "checking for $ac_word... " >&6; }
30465if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30466  $as_echo_n "(cached) " >&6
30467else
30468  if test -n "$PROPER_COMPILER_CXX"; then
30469  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30470else
30471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30472for as_dir in $PATH
30473do
30474  IFS=$as_save_IFS
30475  test -z "$as_dir" && as_dir=.
30476    for ac_exec_ext in '' $ac_executable_extensions; do
30477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30478    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30480    break 2
30481  fi
30482done
30483  done
30484IFS=$as_save_IFS
30485
30486fi
30487fi
30488PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30489if test -n "$PROPER_COMPILER_CXX"; then
30490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30491$as_echo "$PROPER_COMPILER_CXX" >&6; }
30492else
30493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30494$as_echo "no" >&6; }
30495fi
30496
30497
30498    test -n "$PROPER_COMPILER_CXX" && break
30499  done
30500fi
30501if test -z "$PROPER_COMPILER_CXX"; then
30502  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30503  for ac_prog in $TOOLCHAIN_CXX_BINARY
30504do
30505  # Extract the first word of "$ac_prog", so it can be a program name with args.
30506set dummy $ac_prog; ac_word=$2
30507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30508$as_echo_n "checking for $ac_word... " >&6; }
30509if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30510  $as_echo_n "(cached) " >&6
30511else
30512  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30513  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30514else
30515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30516for as_dir in $PATH
30517do
30518  IFS=$as_save_IFS
30519  test -z "$as_dir" && as_dir=.
30520    for ac_exec_ext in '' $ac_executable_extensions; do
30521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30522    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30524    break 2
30525  fi
30526done
30527  done
30528IFS=$as_save_IFS
30529
30530fi
30531fi
30532ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30533if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30535$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30536else
30537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30538$as_echo "no" >&6; }
30539fi
30540
30541
30542  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30543done
30544
30545  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30546    PROPER_COMPILER_CXX=""
30547  else
30548    case $cross_compiling:$ac_tool_warned in
30549yes:)
30550{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30551$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30552ac_tool_warned=yes ;;
30553esac
30554    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30555  fi
30556fi
30557
30558
30559  # Only process if variable expands to non-empty
30560
30561  if test "x$PROPER_COMPILER_CXX" != x; then
30562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30563
30564  # First separate the path from the arguments. This will split at the first
30565  # space.
30566  complete="$PROPER_COMPILER_CXX"
30567  path="${complete%% *}"
30568  tmp="$complete EOL"
30569  arguments="${tmp#* }"
30570
30571  # Input might be given as Windows format, start by converting to
30572  # unix format.
30573  new_path=`$CYGPATH -u "$path"`
30574
30575  # Now try to locate executable using which
30576  new_path=`$WHICH "$new_path" 2> /dev/null`
30577  # bat and cmd files are not always considered executable in cygwin causing which
30578  # to not find them
30579  if test "x$new_path" = x \
30580      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30581      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30582    new_path=`$CYGPATH -u "$path"`
30583  fi
30584  if test "x$new_path" = x; then
30585    # Oops. Which didn't find the executable.
30586    # The splitting of arguments from the executable at a space might have been incorrect,
30587    # since paths with space are more likely in Windows. Give it another try with the whole
30588    # argument.
30589    path="$complete"
30590    arguments="EOL"
30591    new_path=`$CYGPATH -u "$path"`
30592    new_path=`$WHICH "$new_path" 2> /dev/null`
30593    # bat and cmd files are not always considered executable in cygwin causing which
30594    # to not find them
30595    if test "x$new_path" = x \
30596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30598      new_path=`$CYGPATH -u "$path"`
30599    fi
30600    if test "x$new_path" = x; then
30601      # It's still not found. Now this is an unrecoverable error.
30602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30603$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30604      has_space=`$ECHO "$complete" | $GREP " "`
30605      if test "x$has_space" != x; then
30606        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30607$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30608      fi
30609      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30610    fi
30611  fi
30612
30613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30616  # "foo.exe" is OK but "foo" is an error.
30617  #
30618  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30619  # It is also a way to make sure we got the proper file name for the real test later on.
30620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30621  if test "x$test_shortpath" = x; then
30622    # Short path failed, file does not exist as specified.
30623    # Try adding .exe or .cmd
30624    if test -f "${new_path}.exe"; then
30625      input_to_shortpath="${new_path}.exe"
30626    elif test -f "${new_path}.cmd"; then
30627      input_to_shortpath="${new_path}.cmd"
30628    else
30629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30630$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30631      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30632$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30633      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30634    fi
30635  else
30636    input_to_shortpath="$new_path"
30637  fi
30638
30639  # Call helper function which possibly converts this using DOS-style short mode.
30640  # If so, the updated path is stored in $new_path.
30641  new_path="$input_to_shortpath"
30642
30643  input_path="$input_to_shortpath"
30644  # Check if we need to convert this using DOS-style short mode. If the path
30645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30646  # take no chances and rewrite it.
30647  # Note: m4 eats our [], so we need to use [ and ] instead.
30648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30649  if test "x$has_forbidden_chars" != x; then
30650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30654      # Going to short mode and back again did indeed matter. Since short mode is
30655      # case insensitive, let's make it lowercase to improve readability.
30656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30657      # Now convert it back to Unix-style (cygpath)
30658      input_path=`$CYGPATH -u "$shortmode_path"`
30659      new_path="$input_path"
30660    fi
30661  fi
30662
30663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30664  if test "x$test_cygdrive_prefix" = x; then
30665    # As a simple fix, exclude /usr/bin since it's not a real path.
30666    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30668      # a path prefixed by /cygdrive for fixpath to work.
30669      new_path="$CYGWIN_ROOT_PATH$input_path"
30670    fi
30671  fi
30672
30673  # remove trailing .exe if any
30674  new_path="${new_path/%.exe/}"
30675
30676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30677
30678  # First separate the path from the arguments. This will split at the first
30679  # space.
30680  complete="$PROPER_COMPILER_CXX"
30681  path="${complete%% *}"
30682  tmp="$complete EOL"
30683  arguments="${tmp#* }"
30684
30685  # Input might be given as Windows format, start by converting to
30686  # unix format.
30687  new_path="$path"
30688
30689  windows_path="$new_path"
30690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30691    unix_path=`$CYGPATH -u "$windows_path"`
30692    new_path="$unix_path"
30693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30695    new_path="$unix_path"
30696  fi
30697
30698
30699  # Now try to locate executable using which
30700  new_path=`$WHICH "$new_path" 2> /dev/null`
30701
30702  if test "x$new_path" = x; then
30703    # Oops. Which didn't find the executable.
30704    # The splitting of arguments from the executable at a space might have been incorrect,
30705    # since paths with space are more likely in Windows. Give it another try with the whole
30706    # argument.
30707    path="$complete"
30708    arguments="EOL"
30709    new_path="$path"
30710
30711  windows_path="$new_path"
30712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30713    unix_path=`$CYGPATH -u "$windows_path"`
30714    new_path="$unix_path"
30715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30717    new_path="$unix_path"
30718  fi
30719
30720
30721    new_path=`$WHICH "$new_path" 2> /dev/null`
30722    # bat and cmd files are not always considered executable in MSYS causing which
30723    # to not find them
30724    if test "x$new_path" = x \
30725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30727      new_path="$path"
30728
30729  windows_path="$new_path"
30730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30731    unix_path=`$CYGPATH -u "$windows_path"`
30732    new_path="$unix_path"
30733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30735    new_path="$unix_path"
30736  fi
30737
30738    fi
30739
30740    if test "x$new_path" = x; then
30741      # It's still not found. Now this is an unrecoverable error.
30742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30743$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30744      has_space=`$ECHO "$complete" | $GREP " "`
30745      if test "x$has_space" != x; then
30746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30748      fi
30749      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30750    fi
30751  fi
30752
30753  # Now new_path has a complete unix path to the binary
30754  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30755    # Keep paths in /bin as-is, but remove trailing .exe if any
30756    new_path="${new_path/%.exe/}"
30757    # Do not save /bin paths to all_fixpath_prefixes!
30758  else
30759    # Not in mixed or Windows style, start by that.
30760    new_path=`cmd //c echo $new_path`
30761
30762  input_path="$new_path"
30763  # Check if we need to convert this using DOS-style short mode. If the path
30764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30765  # take no chances and rewrite it.
30766  # Note: m4 eats our [], so we need to use [ and ] instead.
30767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30768  if test "x$has_forbidden_chars" != x; then
30769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30771  fi
30772
30773    # Output is in $new_path
30774
30775  windows_path="$new_path"
30776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30777    unix_path=`$CYGPATH -u "$windows_path"`
30778    new_path="$unix_path"
30779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30781    new_path="$unix_path"
30782  fi
30783
30784    # remove trailing .exe if any
30785    new_path="${new_path/%.exe/}"
30786
30787    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30788    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30789  fi
30790
30791    else
30792      # We're on a unix platform. Hooray! :)
30793      # First separate the path from the arguments. This will split at the first
30794      # space.
30795      complete="$PROPER_COMPILER_CXX"
30796      path="${complete%% *}"
30797      tmp="$complete EOL"
30798      arguments="${tmp#* }"
30799
30800      # Cannot rely on the command "which" here since it doesn't always work.
30801      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30802      if test -z "$is_absolute_path"; then
30803        # Path to executable is not absolute. Find it.
30804        IFS_save="$IFS"
30805        IFS=:
30806        for p in $PATH; do
30807          if test -f "$p/$path" && test -x "$p/$path"; then
30808            new_path="$p/$path"
30809            break
30810          fi
30811        done
30812        IFS="$IFS_save"
30813      else
30814        # This is an absolute path, we can use it without further modifications.
30815        new_path="$path"
30816      fi
30817
30818      if test "x$new_path" = x; then
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30820$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30821        has_space=`$ECHO "$complete" | $GREP " "`
30822        if test "x$has_space" != x; then
30823          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30824$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30825        fi
30826        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30827      fi
30828    fi
30829
30830    # Now join together the path and the arguments once again
30831    if test "x$arguments" != xEOL; then
30832      new_complete="$new_path ${arguments% *}"
30833    else
30834      new_complete="$new_path"
30835    fi
30836
30837    if test "x$complete" != "x$new_complete"; then
30838      PROPER_COMPILER_CXX="$new_complete"
30839      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30840$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30841    fi
30842  fi
30843
30844    PATH="$RETRY_COMPILER_SAVED_PATH"
30845
30846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30847$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30848
30849  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30850    # Follow a chain of symbolic links. Use readlink
30851    # where it exists, else fall back to horribly
30852    # complicated shell code.
30853    if test "x$READLINK_TESTED" != yes; then
30854      # On MacOSX there is a readlink tool with a different
30855      # purpose than the GNU readlink tool. Check the found readlink.
30856      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30857      if test "x$ISGNU" = x; then
30858        # A readlink that we do not know how to use.
30859        # Are there other non-GNU readlinks out there?
30860        READLINK_TESTED=yes
30861        READLINK=
30862      fi
30863    fi
30864
30865    if test "x$READLINK" != x; then
30866      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30867    else
30868      # Save the current directory for restoring afterwards
30869      STARTDIR=$PWD
30870      COUNTER=0
30871      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30872      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30873      cd $sym_link_dir
30874      # Use -P flag to resolve symlinks in directories.
30875      cd `$THEPWDCMD -P`
30876      sym_link_dir=`$THEPWDCMD -P`
30877      # Resolve file symlinks
30878      while test $COUNTER -lt 20; do
30879        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30880        if test "x$ISLINK" == x; then
30881          # This is not a symbolic link! We are done!
30882          break
30883        fi
30884        # Again resolve directory symlinks since the target of the just found
30885        # link could be in a different directory
30886        cd `$DIRNAME $ISLINK`
30887        sym_link_dir=`$THEPWDCMD -P`
30888        sym_link_file=`$BASENAME $ISLINK`
30889        let COUNTER=COUNTER+1
30890      done
30891      cd $STARTDIR
30892      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30893    fi
30894  fi
30895
30896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30897$as_echo "$PROPER_COMPILER_CXX" >&6; }
30898    CXX="$PROPER_COMPILER_CXX"
30899  else
30900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30901$as_echo "no, keeping CXX" >&6; }
30902  fi
30903
30904
30905  COMPILER=$CXX
30906  COMPILER_NAME=$COMPILER_NAME
30907
30908  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30909    # cc -V output typically looks like
30910    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30911    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30912    # Check that this is likely to be the Solaris Studio cc.
30913    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30914    if test $? -ne 0; then
30915      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30916      { $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
30917$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30918      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30919$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30921$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30922      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30923    fi
30924    # Remove usage instructions (if present), and
30925    # collapse compiler output into a single line
30926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30927        $SED -e 's/ *[Uu]sage:.*//'`
30928    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30929        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30930  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30931    # xlc -qversion output typically looks like
30932    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30933    #     Version: 11.01.0000.0015
30934    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30935    # Check that this is likely to be the IBM XL C compiler.
30936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30937    if test $? -ne 0; then
30938      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30939      { $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
30940$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30941      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30942$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30943      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30944$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30945      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30946    fi
30947    # Collapse compiler output into a single line
30948    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30949    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30950        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30951  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30952    # There is no specific version flag, but all output starts with a version string.
30953    # First line typically looks something like:
30954    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30955    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30956    # Check that this is likely to be Microsoft CL.EXE.
30957    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30958    if test $? -ne 0; then
30959      { $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
30960$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30962$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30963      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30964    fi
30965    # Collapse compiler output into a single line
30966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30968        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30969  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30970    # gcc --version output typically looks like
30971    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30972    #     Copyright (C) 2013 Free Software Foundation, Inc.
30973    #     This is free software; see the source for copying conditions.  There is NO
30974    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30975    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30976    # Check that this is likely to be GCC.
30977    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30978    if test $? -ne 0; then
30979      { $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
30980$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30981      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30982$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30983      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30984    fi
30985    # Remove Copyright and legalese from version string, and
30986    # collapse into a single line
30987    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30988        $SED -e 's/ *Copyright .*//'`
30989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30990        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30991  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30992    # clang --version output typically looks like
30993    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30994    #    clang version 3.3 (tags/RELEASE_33/final)
30995    # or
30996    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30997    #    Target: x86_64-pc-linux-gnu
30998    #    Thread model: posix
30999    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31000    # Check that this is likely to be clang
31001    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31002    if test $? -ne 0; then
31003      { $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
31004$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31005      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31006$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31007      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31008    fi
31009    # Collapse compiler output into a single line
31010    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31011    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31012        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31013  else
31014      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31015  fi
31016  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31017  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31018  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31019  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31020
31021  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31022$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31023
31024
31025  # Now that we have resolved CXX ourself, let autoconf have its go at it
31026  ac_ext=cpp
31027ac_cpp='$CXXCPP $CPPFLAGS'
31028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31031if test -z "$CXX"; then
31032  if test -n "$CCC"; then
31033    CXX=$CCC
31034  else
31035    if test -n "$ac_tool_prefix"; then
31036  for ac_prog in $CXX
31037  do
31038    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31041$as_echo_n "checking for $ac_word... " >&6; }
31042if ${ac_cv_prog_CXX+:} false; then :
31043  $as_echo_n "(cached) " >&6
31044else
31045  if test -n "$CXX"; then
31046  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31047else
31048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31049for as_dir in $PATH
31050do
31051  IFS=$as_save_IFS
31052  test -z "$as_dir" && as_dir=.
31053    for ac_exec_ext in '' $ac_executable_extensions; do
31054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31055    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31057    break 2
31058  fi
31059done
31060  done
31061IFS=$as_save_IFS
31062
31063fi
31064fi
31065CXX=$ac_cv_prog_CXX
31066if test -n "$CXX"; then
31067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31068$as_echo "$CXX" >&6; }
31069else
31070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31071$as_echo "no" >&6; }
31072fi
31073
31074
31075    test -n "$CXX" && break
31076  done
31077fi
31078if test -z "$CXX"; then
31079  ac_ct_CXX=$CXX
31080  for ac_prog in $CXX
31081do
31082  # Extract the first word of "$ac_prog", so it can be a program name with args.
31083set dummy $ac_prog; ac_word=$2
31084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31085$as_echo_n "checking for $ac_word... " >&6; }
31086if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31087  $as_echo_n "(cached) " >&6
31088else
31089  if test -n "$ac_ct_CXX"; then
31090  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31091else
31092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31093for as_dir in $PATH
31094do
31095  IFS=$as_save_IFS
31096  test -z "$as_dir" && as_dir=.
31097    for ac_exec_ext in '' $ac_executable_extensions; do
31098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31099    ac_cv_prog_ac_ct_CXX="$ac_prog"
31100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31101    break 2
31102  fi
31103done
31104  done
31105IFS=$as_save_IFS
31106
31107fi
31108fi
31109ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31110if test -n "$ac_ct_CXX"; then
31111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31112$as_echo "$ac_ct_CXX" >&6; }
31113else
31114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31115$as_echo "no" >&6; }
31116fi
31117
31118
31119  test -n "$ac_ct_CXX" && break
31120done
31121
31122  if test "x$ac_ct_CXX" = x; then
31123    CXX="g++"
31124  else
31125    case $cross_compiling:$ac_tool_warned in
31126yes:)
31127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31129ac_tool_warned=yes ;;
31130esac
31131    CXX=$ac_ct_CXX
31132  fi
31133fi
31134
31135  fi
31136fi
31137# Provide some information about the compiler.
31138$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31139set X $ac_compile
31140ac_compiler=$2
31141for ac_option in --version -v -V -qversion; do
31142  { { ac_try="$ac_compiler $ac_option >&5"
31143case "(($ac_try" in
31144  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31145  *) ac_try_echo=$ac_try;;
31146esac
31147eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31148$as_echo "$ac_try_echo"; } >&5
31149  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31150  ac_status=$?
31151  if test -s conftest.err; then
31152    sed '10a\
31153... rest of stderr output deleted ...
31154         10q' conftest.err >conftest.er1
31155    cat conftest.er1 >&5
31156  fi
31157  rm -f conftest.er1 conftest.err
31158  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31159  test $ac_status = 0; }
31160done
31161
31162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31163$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31164if ${ac_cv_cxx_compiler_gnu+:} false; then :
31165  $as_echo_n "(cached) " >&6
31166else
31167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31168/* end confdefs.h.  */
31169
31170int
31171main ()
31172{
31173#ifndef __GNUC__
31174       choke me
31175#endif
31176
31177  ;
31178  return 0;
31179}
31180_ACEOF
31181if ac_fn_cxx_try_compile "$LINENO"; then :
31182  ac_compiler_gnu=yes
31183else
31184  ac_compiler_gnu=no
31185fi
31186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31187ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31188
31189fi
31190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31191$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31192if test $ac_compiler_gnu = yes; then
31193  GXX=yes
31194else
31195  GXX=
31196fi
31197ac_test_CXXFLAGS=${CXXFLAGS+set}
31198ac_save_CXXFLAGS=$CXXFLAGS
31199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31200$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31201if ${ac_cv_prog_cxx_g+:} false; then :
31202  $as_echo_n "(cached) " >&6
31203else
31204  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31205   ac_cxx_werror_flag=yes
31206   ac_cv_prog_cxx_g=no
31207   CXXFLAGS="-g"
31208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31209/* end confdefs.h.  */
31210
31211int
31212main ()
31213{
31214
31215  ;
31216  return 0;
31217}
31218_ACEOF
31219if ac_fn_cxx_try_compile "$LINENO"; then :
31220  ac_cv_prog_cxx_g=yes
31221else
31222  CXXFLAGS=""
31223      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31224/* end confdefs.h.  */
31225
31226int
31227main ()
31228{
31229
31230  ;
31231  return 0;
31232}
31233_ACEOF
31234if ac_fn_cxx_try_compile "$LINENO"; then :
31235
31236else
31237  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31238	 CXXFLAGS="-g"
31239	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31240/* end confdefs.h.  */
31241
31242int
31243main ()
31244{
31245
31246  ;
31247  return 0;
31248}
31249_ACEOF
31250if ac_fn_cxx_try_compile "$LINENO"; then :
31251  ac_cv_prog_cxx_g=yes
31252fi
31253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31254fi
31255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31256fi
31257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31258   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31259fi
31260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31261$as_echo "$ac_cv_prog_cxx_g" >&6; }
31262if test "$ac_test_CXXFLAGS" = set; then
31263  CXXFLAGS=$ac_save_CXXFLAGS
31264elif test $ac_cv_prog_cxx_g = yes; then
31265  if test "$GXX" = yes; then
31266    CXXFLAGS="-g -O2"
31267  else
31268    CXXFLAGS="-g"
31269  fi
31270else
31271  if test "$GXX" = yes; then
31272    CXXFLAGS="-O2"
31273  else
31274    CXXFLAGS=
31275  fi
31276fi
31277ac_ext=cpp
31278ac_cpp='$CXXCPP $CPPFLAGS'
31279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31282
31283
31284  #
31285  # Setup the preprocessor (CPP and CXXCPP)
31286  #
31287  ac_ext=c
31288ac_cpp='$CPP $CPPFLAGS'
31289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31291ac_compiler_gnu=$ac_cv_c_compiler_gnu
31292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31293$as_echo_n "checking how to run the C preprocessor... " >&6; }
31294# On Suns, sometimes $CPP names a directory.
31295if test -n "$CPP" && test -d "$CPP"; then
31296  CPP=
31297fi
31298if test -z "$CPP"; then
31299  if ${ac_cv_prog_CPP+:} false; then :
31300  $as_echo_n "(cached) " >&6
31301else
31302      # Double quotes because CPP needs to be expanded
31303    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31304    do
31305      ac_preproc_ok=false
31306for ac_c_preproc_warn_flag in '' yes
31307do
31308  # Use a header file that comes with gcc, so configuring glibc
31309  # with a fresh cross-compiler works.
31310  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31311  # <limits.h> exists even on freestanding compilers.
31312  # On the NeXT, cc -E runs the code through the compiler's parser,
31313  # not just through cpp. "Syntax error" is here to catch this case.
31314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31315/* end confdefs.h.  */
31316#ifdef __STDC__
31317# include <limits.h>
31318#else
31319# include <assert.h>
31320#endif
31321		     Syntax error
31322_ACEOF
31323if ac_fn_c_try_cpp "$LINENO"; then :
31324
31325else
31326  # Broken: fails on valid input.
31327continue
31328fi
31329rm -f conftest.err conftest.i conftest.$ac_ext
31330
31331  # OK, works on sane cases.  Now check whether nonexistent headers
31332  # can be detected and how.
31333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31334/* end confdefs.h.  */
31335#include <ac_nonexistent.h>
31336_ACEOF
31337if ac_fn_c_try_cpp "$LINENO"; then :
31338  # Broken: success on invalid input.
31339continue
31340else
31341  # Passes both tests.
31342ac_preproc_ok=:
31343break
31344fi
31345rm -f conftest.err conftest.i conftest.$ac_ext
31346
31347done
31348# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31349rm -f conftest.i conftest.err conftest.$ac_ext
31350if $ac_preproc_ok; then :
31351  break
31352fi
31353
31354    done
31355    ac_cv_prog_CPP=$CPP
31356
31357fi
31358  CPP=$ac_cv_prog_CPP
31359else
31360  ac_cv_prog_CPP=$CPP
31361fi
31362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31363$as_echo "$CPP" >&6; }
31364ac_preproc_ok=false
31365for ac_c_preproc_warn_flag in '' yes
31366do
31367  # Use a header file that comes with gcc, so configuring glibc
31368  # with a fresh cross-compiler works.
31369  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31370  # <limits.h> exists even on freestanding compilers.
31371  # On the NeXT, cc -E runs the code through the compiler's parser,
31372  # not just through cpp. "Syntax error" is here to catch this case.
31373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31374/* end confdefs.h.  */
31375#ifdef __STDC__
31376# include <limits.h>
31377#else
31378# include <assert.h>
31379#endif
31380		     Syntax error
31381_ACEOF
31382if ac_fn_c_try_cpp "$LINENO"; then :
31383
31384else
31385  # Broken: fails on valid input.
31386continue
31387fi
31388rm -f conftest.err conftest.i conftest.$ac_ext
31389
31390  # OK, works on sane cases.  Now check whether nonexistent headers
31391  # can be detected and how.
31392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31393/* end confdefs.h.  */
31394#include <ac_nonexistent.h>
31395_ACEOF
31396if ac_fn_c_try_cpp "$LINENO"; then :
31397  # Broken: success on invalid input.
31398continue
31399else
31400  # Passes both tests.
31401ac_preproc_ok=:
31402break
31403fi
31404rm -f conftest.err conftest.i conftest.$ac_ext
31405
31406done
31407# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31408rm -f conftest.i conftest.err conftest.$ac_ext
31409if $ac_preproc_ok; then :
31410
31411else
31412  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31414as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31415See \`config.log' for more details" "$LINENO" 5; }
31416fi
31417
31418ac_ext=cpp
31419ac_cpp='$CXXCPP $CPPFLAGS'
31420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31423
31424
31425  # Only process if variable expands to non-empty
31426
31427  if test "x$CPP" != x; then
31428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31429
31430  # First separate the path from the arguments. This will split at the first
31431  # space.
31432  complete="$CPP"
31433  path="${complete%% *}"
31434  tmp="$complete EOL"
31435  arguments="${tmp#* }"
31436
31437  # Input might be given as Windows format, start by converting to
31438  # unix format.
31439  new_path=`$CYGPATH -u "$path"`
31440
31441  # Now try to locate executable using which
31442  new_path=`$WHICH "$new_path" 2> /dev/null`
31443  # bat and cmd files are not always considered executable in cygwin causing which
31444  # to not find them
31445  if test "x$new_path" = x \
31446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31448    new_path=`$CYGPATH -u "$path"`
31449  fi
31450  if test "x$new_path" = x; then
31451    # Oops. Which didn't find the executable.
31452    # The splitting of arguments from the executable at a space might have been incorrect,
31453    # since paths with space are more likely in Windows. Give it another try with the whole
31454    # argument.
31455    path="$complete"
31456    arguments="EOL"
31457    new_path=`$CYGPATH -u "$path"`
31458    new_path=`$WHICH "$new_path" 2> /dev/null`
31459    # bat and cmd files are not always considered executable in cygwin causing which
31460    # to not find them
31461    if test "x$new_path" = x \
31462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31464      new_path=`$CYGPATH -u "$path"`
31465    fi
31466    if test "x$new_path" = x; then
31467      # It's still not found. Now this is an unrecoverable error.
31468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31469$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31470      has_space=`$ECHO "$complete" | $GREP " "`
31471      if test "x$has_space" != x; then
31472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31474      fi
31475      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31476    fi
31477  fi
31478
31479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31482  # "foo.exe" is OK but "foo" is an error.
31483  #
31484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31485  # It is also a way to make sure we got the proper file name for the real test later on.
31486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31487  if test "x$test_shortpath" = x; then
31488    # Short path failed, file does not exist as specified.
31489    # Try adding .exe or .cmd
31490    if test -f "${new_path}.exe"; then
31491      input_to_shortpath="${new_path}.exe"
31492    elif test -f "${new_path}.cmd"; then
31493      input_to_shortpath="${new_path}.cmd"
31494    else
31495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31496$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31499      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31500    fi
31501  else
31502    input_to_shortpath="$new_path"
31503  fi
31504
31505  # Call helper function which possibly converts this using DOS-style short mode.
31506  # If so, the updated path is stored in $new_path.
31507  new_path="$input_to_shortpath"
31508
31509  input_path="$input_to_shortpath"
31510  # Check if we need to convert this using DOS-style short mode. If the path
31511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31512  # take no chances and rewrite it.
31513  # Note: m4 eats our [], so we need to use [ and ] instead.
31514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31515  if test "x$has_forbidden_chars" != x; then
31516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31520      # Going to short mode and back again did indeed matter. Since short mode is
31521      # case insensitive, let's make it lowercase to improve readability.
31522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31523      # Now convert it back to Unix-style (cygpath)
31524      input_path=`$CYGPATH -u "$shortmode_path"`
31525      new_path="$input_path"
31526    fi
31527  fi
31528
31529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31530  if test "x$test_cygdrive_prefix" = x; then
31531    # As a simple fix, exclude /usr/bin since it's not a real path.
31532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31534      # a path prefixed by /cygdrive for fixpath to work.
31535      new_path="$CYGWIN_ROOT_PATH$input_path"
31536    fi
31537  fi
31538
31539  # remove trailing .exe if any
31540  new_path="${new_path/%.exe/}"
31541
31542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31543
31544  # First separate the path from the arguments. This will split at the first
31545  # space.
31546  complete="$CPP"
31547  path="${complete%% *}"
31548  tmp="$complete EOL"
31549  arguments="${tmp#* }"
31550
31551  # Input might be given as Windows format, start by converting to
31552  # unix format.
31553  new_path="$path"
31554
31555  windows_path="$new_path"
31556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31557    unix_path=`$CYGPATH -u "$windows_path"`
31558    new_path="$unix_path"
31559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31561    new_path="$unix_path"
31562  fi
31563
31564
31565  # Now try to locate executable using which
31566  new_path=`$WHICH "$new_path" 2> /dev/null`
31567
31568  if test "x$new_path" = x; then
31569    # Oops. Which didn't find the executable.
31570    # The splitting of arguments from the executable at a space might have been incorrect,
31571    # since paths with space are more likely in Windows. Give it another try with the whole
31572    # argument.
31573    path="$complete"
31574    arguments="EOL"
31575    new_path="$path"
31576
31577  windows_path="$new_path"
31578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31579    unix_path=`$CYGPATH -u "$windows_path"`
31580    new_path="$unix_path"
31581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31583    new_path="$unix_path"
31584  fi
31585
31586
31587    new_path=`$WHICH "$new_path" 2> /dev/null`
31588    # bat and cmd files are not always considered executable in MSYS causing which
31589    # to not find them
31590    if test "x$new_path" = x \
31591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31593      new_path="$path"
31594
31595  windows_path="$new_path"
31596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31597    unix_path=`$CYGPATH -u "$windows_path"`
31598    new_path="$unix_path"
31599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31601    new_path="$unix_path"
31602  fi
31603
31604    fi
31605
31606    if test "x$new_path" = x; then
31607      # It's still not found. Now this is an unrecoverable error.
31608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31609$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31610      has_space=`$ECHO "$complete" | $GREP " "`
31611      if test "x$has_space" != x; then
31612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31614      fi
31615      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31616    fi
31617  fi
31618
31619  # Now new_path has a complete unix path to the binary
31620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31621    # Keep paths in /bin as-is, but remove trailing .exe if any
31622    new_path="${new_path/%.exe/}"
31623    # Do not save /bin paths to all_fixpath_prefixes!
31624  else
31625    # Not in mixed or Windows style, start by that.
31626    new_path=`cmd //c echo $new_path`
31627
31628  input_path="$new_path"
31629  # Check if we need to convert this using DOS-style short mode. If the path
31630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31631  # take no chances and rewrite it.
31632  # Note: m4 eats our [], so we need to use [ and ] instead.
31633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31634  if test "x$has_forbidden_chars" != x; then
31635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31637  fi
31638
31639    # Output is in $new_path
31640
31641  windows_path="$new_path"
31642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31643    unix_path=`$CYGPATH -u "$windows_path"`
31644    new_path="$unix_path"
31645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31647    new_path="$unix_path"
31648  fi
31649
31650    # remove trailing .exe if any
31651    new_path="${new_path/%.exe/}"
31652
31653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31655  fi
31656
31657    else
31658      # We're on a unix platform. Hooray! :)
31659      # First separate the path from the arguments. This will split at the first
31660      # space.
31661      complete="$CPP"
31662      path="${complete%% *}"
31663      tmp="$complete EOL"
31664      arguments="${tmp#* }"
31665
31666      # Cannot rely on the command "which" here since it doesn't always work.
31667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31668      if test -z "$is_absolute_path"; then
31669        # Path to executable is not absolute. Find it.
31670        IFS_save="$IFS"
31671        IFS=:
31672        for p in $PATH; do
31673          if test -f "$p/$path" && test -x "$p/$path"; then
31674            new_path="$p/$path"
31675            break
31676          fi
31677        done
31678        IFS="$IFS_save"
31679      else
31680        # This is an absolute path, we can use it without further modifications.
31681        new_path="$path"
31682      fi
31683
31684      if test "x$new_path" = x; then
31685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31686$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31687        has_space=`$ECHO "$complete" | $GREP " "`
31688        if test "x$has_space" != x; then
31689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31691        fi
31692        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31693      fi
31694    fi
31695
31696    # Now join together the path and the arguments once again
31697    if test "x$arguments" != xEOL; then
31698      new_complete="$new_path ${arguments% *}"
31699    else
31700      new_complete="$new_path"
31701    fi
31702
31703    if test "x$complete" != "x$new_complete"; then
31704      CPP="$new_complete"
31705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31706$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31707    fi
31708  fi
31709
31710  ac_ext=cpp
31711ac_cpp='$CXXCPP $CPPFLAGS'
31712ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31713ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31714ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31716$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31717if test -z "$CXXCPP"; then
31718  if ${ac_cv_prog_CXXCPP+:} false; then :
31719  $as_echo_n "(cached) " >&6
31720else
31721      # Double quotes because CXXCPP needs to be expanded
31722    for CXXCPP in "$CXX -E" "/lib/cpp"
31723    do
31724      ac_preproc_ok=false
31725for ac_cxx_preproc_warn_flag in '' yes
31726do
31727  # Use a header file that comes with gcc, so configuring glibc
31728  # with a fresh cross-compiler works.
31729  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31730  # <limits.h> exists even on freestanding compilers.
31731  # On the NeXT, cc -E runs the code through the compiler's parser,
31732  # not just through cpp. "Syntax error" is here to catch this case.
31733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31734/* end confdefs.h.  */
31735#ifdef __STDC__
31736# include <limits.h>
31737#else
31738# include <assert.h>
31739#endif
31740		     Syntax error
31741_ACEOF
31742if ac_fn_cxx_try_cpp "$LINENO"; then :
31743
31744else
31745  # Broken: fails on valid input.
31746continue
31747fi
31748rm -f conftest.err conftest.i conftest.$ac_ext
31749
31750  # OK, works on sane cases.  Now check whether nonexistent headers
31751  # can be detected and how.
31752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31753/* end confdefs.h.  */
31754#include <ac_nonexistent.h>
31755_ACEOF
31756if ac_fn_cxx_try_cpp "$LINENO"; then :
31757  # Broken: success on invalid input.
31758continue
31759else
31760  # Passes both tests.
31761ac_preproc_ok=:
31762break
31763fi
31764rm -f conftest.err conftest.i conftest.$ac_ext
31765
31766done
31767# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31768rm -f conftest.i conftest.err conftest.$ac_ext
31769if $ac_preproc_ok; then :
31770  break
31771fi
31772
31773    done
31774    ac_cv_prog_CXXCPP=$CXXCPP
31775
31776fi
31777  CXXCPP=$ac_cv_prog_CXXCPP
31778else
31779  ac_cv_prog_CXXCPP=$CXXCPP
31780fi
31781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31782$as_echo "$CXXCPP" >&6; }
31783ac_preproc_ok=false
31784for ac_cxx_preproc_warn_flag in '' yes
31785do
31786  # Use a header file that comes with gcc, so configuring glibc
31787  # with a fresh cross-compiler works.
31788  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31789  # <limits.h> exists even on freestanding compilers.
31790  # On the NeXT, cc -E runs the code through the compiler's parser,
31791  # not just through cpp. "Syntax error" is here to catch this case.
31792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31793/* end confdefs.h.  */
31794#ifdef __STDC__
31795# include <limits.h>
31796#else
31797# include <assert.h>
31798#endif
31799		     Syntax error
31800_ACEOF
31801if ac_fn_cxx_try_cpp "$LINENO"; then :
31802
31803else
31804  # Broken: fails on valid input.
31805continue
31806fi
31807rm -f conftest.err conftest.i conftest.$ac_ext
31808
31809  # OK, works on sane cases.  Now check whether nonexistent headers
31810  # can be detected and how.
31811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31812/* end confdefs.h.  */
31813#include <ac_nonexistent.h>
31814_ACEOF
31815if ac_fn_cxx_try_cpp "$LINENO"; then :
31816  # Broken: success on invalid input.
31817continue
31818else
31819  # Passes both tests.
31820ac_preproc_ok=:
31821break
31822fi
31823rm -f conftest.err conftest.i conftest.$ac_ext
31824
31825done
31826# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31827rm -f conftest.i conftest.err conftest.$ac_ext
31828if $ac_preproc_ok; then :
31829
31830else
31831  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31833as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31834See \`config.log' for more details" "$LINENO" 5; }
31835fi
31836
31837ac_ext=cpp
31838ac_cpp='$CXXCPP $CPPFLAGS'
31839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31842
31843
31844  # Only process if variable expands to non-empty
31845
31846  if test "x$CXXCPP" != x; then
31847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31848
31849  # First separate the path from the arguments. This will split at the first
31850  # space.
31851  complete="$CXXCPP"
31852  path="${complete%% *}"
31853  tmp="$complete EOL"
31854  arguments="${tmp#* }"
31855
31856  # Input might be given as Windows format, start by converting to
31857  # unix format.
31858  new_path=`$CYGPATH -u "$path"`
31859
31860  # Now try to locate executable using which
31861  new_path=`$WHICH "$new_path" 2> /dev/null`
31862  # bat and cmd files are not always considered executable in cygwin causing which
31863  # to not find them
31864  if test "x$new_path" = x \
31865      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31866      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31867    new_path=`$CYGPATH -u "$path"`
31868  fi
31869  if test "x$new_path" = x; then
31870    # Oops. Which didn't find the executable.
31871    # The splitting of arguments from the executable at a space might have been incorrect,
31872    # since paths with space are more likely in Windows. Give it another try with the whole
31873    # argument.
31874    path="$complete"
31875    arguments="EOL"
31876    new_path=`$CYGPATH -u "$path"`
31877    new_path=`$WHICH "$new_path" 2> /dev/null`
31878    # bat and cmd files are not always considered executable in cygwin causing which
31879    # to not find them
31880    if test "x$new_path" = x \
31881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31883      new_path=`$CYGPATH -u "$path"`
31884    fi
31885    if test "x$new_path" = x; then
31886      # It's still not found. Now this is an unrecoverable error.
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31888$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31889      has_space=`$ECHO "$complete" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31893      fi
31894      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31895    fi
31896  fi
31897
31898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31901  # "foo.exe" is OK but "foo" is an error.
31902  #
31903  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31904  # It is also a way to make sure we got the proper file name for the real test later on.
31905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31906  if test "x$test_shortpath" = x; then
31907    # Short path failed, file does not exist as specified.
31908    # Try adding .exe or .cmd
31909    if test -f "${new_path}.exe"; then
31910      input_to_shortpath="${new_path}.exe"
31911    elif test -f "${new_path}.cmd"; then
31912      input_to_shortpath="${new_path}.cmd"
31913    else
31914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31915$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31918      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31919    fi
31920  else
31921    input_to_shortpath="$new_path"
31922  fi
31923
31924  # Call helper function which possibly converts this using DOS-style short mode.
31925  # If so, the updated path is stored in $new_path.
31926  new_path="$input_to_shortpath"
31927
31928  input_path="$input_to_shortpath"
31929  # Check if we need to convert this using DOS-style short mode. If the path
31930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31931  # take no chances and rewrite it.
31932  # Note: m4 eats our [], so we need to use [ and ] instead.
31933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31934  if test "x$has_forbidden_chars" != x; then
31935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31939      # Going to short mode and back again did indeed matter. Since short mode is
31940      # case insensitive, let's make it lowercase to improve readability.
31941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31942      # Now convert it back to Unix-style (cygpath)
31943      input_path=`$CYGPATH -u "$shortmode_path"`
31944      new_path="$input_path"
31945    fi
31946  fi
31947
31948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31949  if test "x$test_cygdrive_prefix" = x; then
31950    # As a simple fix, exclude /usr/bin since it's not a real path.
31951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31953      # a path prefixed by /cygdrive for fixpath to work.
31954      new_path="$CYGWIN_ROOT_PATH$input_path"
31955    fi
31956  fi
31957
31958  # remove trailing .exe if any
31959  new_path="${new_path/%.exe/}"
31960
31961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31962
31963  # First separate the path from the arguments. This will split at the first
31964  # space.
31965  complete="$CXXCPP"
31966  path="${complete%% *}"
31967  tmp="$complete EOL"
31968  arguments="${tmp#* }"
31969
31970  # Input might be given as Windows format, start by converting to
31971  # unix format.
31972  new_path="$path"
31973
31974  windows_path="$new_path"
31975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31976    unix_path=`$CYGPATH -u "$windows_path"`
31977    new_path="$unix_path"
31978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31980    new_path="$unix_path"
31981  fi
31982
31983
31984  # Now try to locate executable using which
31985  new_path=`$WHICH "$new_path" 2> /dev/null`
31986
31987  if test "x$new_path" = x; then
31988    # Oops. Which didn't find the executable.
31989    # The splitting of arguments from the executable at a space might have been incorrect,
31990    # since paths with space are more likely in Windows. Give it another try with the whole
31991    # argument.
31992    path="$complete"
31993    arguments="EOL"
31994    new_path="$path"
31995
31996  windows_path="$new_path"
31997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31998    unix_path=`$CYGPATH -u "$windows_path"`
31999    new_path="$unix_path"
32000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32002    new_path="$unix_path"
32003  fi
32004
32005
32006    new_path=`$WHICH "$new_path" 2> /dev/null`
32007    # bat and cmd files are not always considered executable in MSYS causing which
32008    # to not find them
32009    if test "x$new_path" = x \
32010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32012      new_path="$path"
32013
32014  windows_path="$new_path"
32015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32016    unix_path=`$CYGPATH -u "$windows_path"`
32017    new_path="$unix_path"
32018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32020    new_path="$unix_path"
32021  fi
32022
32023    fi
32024
32025    if test "x$new_path" = x; then
32026      # It's still not found. Now this is an unrecoverable error.
32027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32028$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32029      has_space=`$ECHO "$complete" | $GREP " "`
32030      if test "x$has_space" != x; then
32031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32033      fi
32034      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32035    fi
32036  fi
32037
32038  # Now new_path has a complete unix path to the binary
32039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32040    # Keep paths in /bin as-is, but remove trailing .exe if any
32041    new_path="${new_path/%.exe/}"
32042    # Do not save /bin paths to all_fixpath_prefixes!
32043  else
32044    # Not in mixed or Windows style, start by that.
32045    new_path=`cmd //c echo $new_path`
32046
32047  input_path="$new_path"
32048  # Check if we need to convert this using DOS-style short mode. If the path
32049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32050  # take no chances and rewrite it.
32051  # Note: m4 eats our [], so we need to use [ and ] instead.
32052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32053  if test "x$has_forbidden_chars" != x; then
32054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32056  fi
32057
32058    # Output is in $new_path
32059
32060  windows_path="$new_path"
32061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32062    unix_path=`$CYGPATH -u "$windows_path"`
32063    new_path="$unix_path"
32064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32066    new_path="$unix_path"
32067  fi
32068
32069    # remove trailing .exe if any
32070    new_path="${new_path/%.exe/}"
32071
32072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32074  fi
32075
32076    else
32077      # We're on a unix platform. Hooray! :)
32078      # First separate the path from the arguments. This will split at the first
32079      # space.
32080      complete="$CXXCPP"
32081      path="${complete%% *}"
32082      tmp="$complete EOL"
32083      arguments="${tmp#* }"
32084
32085      # Cannot rely on the command "which" here since it doesn't always work.
32086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32087      if test -z "$is_absolute_path"; then
32088        # Path to executable is not absolute. Find it.
32089        IFS_save="$IFS"
32090        IFS=:
32091        for p in $PATH; do
32092          if test -f "$p/$path" && test -x "$p/$path"; then
32093            new_path="$p/$path"
32094            break
32095          fi
32096        done
32097        IFS="$IFS_save"
32098      else
32099        # This is an absolute path, we can use it without further modifications.
32100        new_path="$path"
32101      fi
32102
32103      if test "x$new_path" = x; then
32104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32105$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32106        has_space=`$ECHO "$complete" | $GREP " "`
32107        if test "x$has_space" != x; then
32108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32110        fi
32111        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32112      fi
32113    fi
32114
32115    # Now join together the path and the arguments once again
32116    if test "x$arguments" != xEOL; then
32117      new_complete="$new_path ${arguments% *}"
32118    else
32119      new_complete="$new_path"
32120    fi
32121
32122    if test "x$complete" != "x$new_complete"; then
32123      CXXCPP="$new_complete"
32124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32125$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32126    fi
32127  fi
32128
32129
32130  #
32131  # Setup the linker (LD)
32132  #
32133  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32134    # In the Microsoft toolchain we have a separate LD command "link".
32135    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32136    # a cygwin program for something completely different.
32137    # Extract the first word of "link", so it can be a program name with args.
32138set dummy link; ac_word=$2
32139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32140$as_echo_n "checking for $ac_word... " >&6; }
32141if ${ac_cv_prog_LD+:} false; then :
32142  $as_echo_n "(cached) " >&6
32143else
32144  if test -n "$LD"; then
32145  ac_cv_prog_LD="$LD" # Let the user override the test.
32146else
32147  ac_prog_rejected=no
32148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32149for as_dir in $PATH
32150do
32151  IFS=$as_save_IFS
32152  test -z "$as_dir" && as_dir=.
32153    for ac_exec_ext in '' $ac_executable_extensions; do
32154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32155    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32156       ac_prog_rejected=yes
32157       continue
32158     fi
32159    ac_cv_prog_LD="link"
32160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32161    break 2
32162  fi
32163done
32164  done
32165IFS=$as_save_IFS
32166
32167if test $ac_prog_rejected = yes; then
32168  # We found a bogon in the path, so make sure we never use it.
32169  set dummy $ac_cv_prog_LD
32170  shift
32171  if test $# != 0; then
32172    # We chose a different compiler from the bogus one.
32173    # However, it has the same basename, so the bogon will be chosen
32174    # first if we set LD to just the basename; use the full file name.
32175    shift
32176    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32177  fi
32178fi
32179fi
32180fi
32181LD=$ac_cv_prog_LD
32182if test -n "$LD"; then
32183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32184$as_echo "$LD" >&6; }
32185else
32186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32187$as_echo "no" >&6; }
32188fi
32189
32190
32191
32192  # Only process if variable expands to non-empty
32193
32194  if test "x$LD" != x; then
32195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32196
32197  # First separate the path from the arguments. This will split at the first
32198  # space.
32199  complete="$LD"
32200  path="${complete%% *}"
32201  tmp="$complete EOL"
32202  arguments="${tmp#* }"
32203
32204  # Input might be given as Windows format, start by converting to
32205  # unix format.
32206  new_path=`$CYGPATH -u "$path"`
32207
32208  # Now try to locate executable using which
32209  new_path=`$WHICH "$new_path" 2> /dev/null`
32210  # bat and cmd files are not always considered executable in cygwin causing which
32211  # to not find them
32212  if test "x$new_path" = x \
32213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32215    new_path=`$CYGPATH -u "$path"`
32216  fi
32217  if test "x$new_path" = x; then
32218    # Oops. Which didn't find the executable.
32219    # The splitting of arguments from the executable at a space might have been incorrect,
32220    # since paths with space are more likely in Windows. Give it another try with the whole
32221    # argument.
32222    path="$complete"
32223    arguments="EOL"
32224    new_path=`$CYGPATH -u "$path"`
32225    new_path=`$WHICH "$new_path" 2> /dev/null`
32226    # bat and cmd files are not always considered executable in cygwin causing which
32227    # to not find them
32228    if test "x$new_path" = x \
32229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32231      new_path=`$CYGPATH -u "$path"`
32232    fi
32233    if test "x$new_path" = x; then
32234      # It's still not found. Now this is an unrecoverable error.
32235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32236$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32237      has_space=`$ECHO "$complete" | $GREP " "`
32238      if test "x$has_space" != x; then
32239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32241      fi
32242      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32243    fi
32244  fi
32245
32246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32249  # "foo.exe" is OK but "foo" is an error.
32250  #
32251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32252  # It is also a way to make sure we got the proper file name for the real test later on.
32253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32254  if test "x$test_shortpath" = x; then
32255    # Short path failed, file does not exist as specified.
32256    # Try adding .exe or .cmd
32257    if test -f "${new_path}.exe"; then
32258      input_to_shortpath="${new_path}.exe"
32259    elif test -f "${new_path}.cmd"; then
32260      input_to_shortpath="${new_path}.cmd"
32261    else
32262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32263$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32266      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32267    fi
32268  else
32269    input_to_shortpath="$new_path"
32270  fi
32271
32272  # Call helper function which possibly converts this using DOS-style short mode.
32273  # If so, the updated path is stored in $new_path.
32274  new_path="$input_to_shortpath"
32275
32276  input_path="$input_to_shortpath"
32277  # Check if we need to convert this using DOS-style short mode. If the path
32278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32279  # take no chances and rewrite it.
32280  # Note: m4 eats our [], so we need to use [ and ] instead.
32281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32282  if test "x$has_forbidden_chars" != x; then
32283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32287      # Going to short mode and back again did indeed matter. Since short mode is
32288      # case insensitive, let's make it lowercase to improve readability.
32289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32290      # Now convert it back to Unix-style (cygpath)
32291      input_path=`$CYGPATH -u "$shortmode_path"`
32292      new_path="$input_path"
32293    fi
32294  fi
32295
32296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32297  if test "x$test_cygdrive_prefix" = x; then
32298    # As a simple fix, exclude /usr/bin since it's not a real path.
32299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32301      # a path prefixed by /cygdrive for fixpath to work.
32302      new_path="$CYGWIN_ROOT_PATH$input_path"
32303    fi
32304  fi
32305
32306  # remove trailing .exe if any
32307  new_path="${new_path/%.exe/}"
32308
32309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32310
32311  # First separate the path from the arguments. This will split at the first
32312  # space.
32313  complete="$LD"
32314  path="${complete%% *}"
32315  tmp="$complete EOL"
32316  arguments="${tmp#* }"
32317
32318  # Input might be given as Windows format, start by converting to
32319  # unix format.
32320  new_path="$path"
32321
32322  windows_path="$new_path"
32323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324    unix_path=`$CYGPATH -u "$windows_path"`
32325    new_path="$unix_path"
32326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32328    new_path="$unix_path"
32329  fi
32330
32331
32332  # Now try to locate executable using which
32333  new_path=`$WHICH "$new_path" 2> /dev/null`
32334
32335  if test "x$new_path" = x; then
32336    # Oops. Which didn't find the executable.
32337    # The splitting of arguments from the executable at a space might have been incorrect,
32338    # since paths with space are more likely in Windows. Give it another try with the whole
32339    # argument.
32340    path="$complete"
32341    arguments="EOL"
32342    new_path="$path"
32343
32344  windows_path="$new_path"
32345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32346    unix_path=`$CYGPATH -u "$windows_path"`
32347    new_path="$unix_path"
32348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32350    new_path="$unix_path"
32351  fi
32352
32353
32354    new_path=`$WHICH "$new_path" 2> /dev/null`
32355    # bat and cmd files are not always considered executable in MSYS causing which
32356    # to not find them
32357    if test "x$new_path" = x \
32358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32360      new_path="$path"
32361
32362  windows_path="$new_path"
32363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32364    unix_path=`$CYGPATH -u "$windows_path"`
32365    new_path="$unix_path"
32366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32368    new_path="$unix_path"
32369  fi
32370
32371    fi
32372
32373    if test "x$new_path" = x; then
32374      # It's still not found. Now this is an unrecoverable error.
32375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32376$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32377      has_space=`$ECHO "$complete" | $GREP " "`
32378      if test "x$has_space" != x; then
32379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32381      fi
32382      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32383    fi
32384  fi
32385
32386  # Now new_path has a complete unix path to the binary
32387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32388    # Keep paths in /bin as-is, but remove trailing .exe if any
32389    new_path="${new_path/%.exe/}"
32390    # Do not save /bin paths to all_fixpath_prefixes!
32391  else
32392    # Not in mixed or Windows style, start by that.
32393    new_path=`cmd //c echo $new_path`
32394
32395  input_path="$new_path"
32396  # Check if we need to convert this using DOS-style short mode. If the path
32397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32398  # take no chances and rewrite it.
32399  # Note: m4 eats our [], so we need to use [ and ] instead.
32400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32401  if test "x$has_forbidden_chars" != x; then
32402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32404  fi
32405
32406    # Output is in $new_path
32407
32408  windows_path="$new_path"
32409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32410    unix_path=`$CYGPATH -u "$windows_path"`
32411    new_path="$unix_path"
32412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32414    new_path="$unix_path"
32415  fi
32416
32417    # remove trailing .exe if any
32418    new_path="${new_path/%.exe/}"
32419
32420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32422  fi
32423
32424    else
32425      # We're on a unix platform. Hooray! :)
32426      # First separate the path from the arguments. This will split at the first
32427      # space.
32428      complete="$LD"
32429      path="${complete%% *}"
32430      tmp="$complete EOL"
32431      arguments="${tmp#* }"
32432
32433      # Cannot rely on the command "which" here since it doesn't always work.
32434      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32435      if test -z "$is_absolute_path"; then
32436        # Path to executable is not absolute. Find it.
32437        IFS_save="$IFS"
32438        IFS=:
32439        for p in $PATH; do
32440          if test -f "$p/$path" && test -x "$p/$path"; then
32441            new_path="$p/$path"
32442            break
32443          fi
32444        done
32445        IFS="$IFS_save"
32446      else
32447        # This is an absolute path, we can use it without further modifications.
32448        new_path="$path"
32449      fi
32450
32451      if test "x$new_path" = x; then
32452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32453$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32454        has_space=`$ECHO "$complete" | $GREP " "`
32455        if test "x$has_space" != x; then
32456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32458        fi
32459        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32460      fi
32461    fi
32462
32463    # Now join together the path and the arguments once again
32464    if test "x$arguments" != xEOL; then
32465      new_complete="$new_path ${arguments% *}"
32466    else
32467      new_complete="$new_path"
32468    fi
32469
32470    if test "x$complete" != "x$new_complete"; then
32471      LD="$new_complete"
32472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32473$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32474    fi
32475  fi
32476
32477    # Verify that we indeed succeeded with this trick.
32478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32479$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32480    "$LD" --version > /dev/null
32481    if test $? -eq 0 ; then
32482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32483$as_echo "no" >&6; }
32484      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32485    else
32486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32487$as_echo "yes" >&6; }
32488    fi
32489    LDCXX="$LD"
32490  else
32491    # All other toolchains use the compiler to link.
32492    LD="$CC"
32493    LDCXX="$CXX"
32494  fi
32495
32496  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32497
32498
32499  #
32500  # Setup the assembler (AS)
32501  #
32502  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32503    # FIXME: should this really be solaris, or solstudio?
32504
32505
32506  # Publish this variable in the help.
32507
32508
32509  if test "x$AS" = x; then
32510    # The variable is not set by user, try to locate tool using the code snippet
32511    for ac_prog in as
32512do
32513  # Extract the first word of "$ac_prog", so it can be a program name with args.
32514set dummy $ac_prog; ac_word=$2
32515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32516$as_echo_n "checking for $ac_word... " >&6; }
32517if ${ac_cv_path_AS+:} false; then :
32518  $as_echo_n "(cached) " >&6
32519else
32520  case $AS in
32521  [\\/]* | ?:[\\/]*)
32522  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32523  ;;
32524  *)
32525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32526for as_dir in $PATH
32527do
32528  IFS=$as_save_IFS
32529  test -z "$as_dir" && as_dir=.
32530    for ac_exec_ext in '' $ac_executable_extensions; do
32531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32532    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32534    break 2
32535  fi
32536done
32537  done
32538IFS=$as_save_IFS
32539
32540  ;;
32541esac
32542fi
32543AS=$ac_cv_path_AS
32544if test -n "$AS"; then
32545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32546$as_echo "$AS" >&6; }
32547else
32548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32549$as_echo "no" >&6; }
32550fi
32551
32552
32553  test -n "$AS" && break
32554done
32555
32556  else
32557    # The variable is set, but is it from the command line or the environment?
32558
32559    # Try to remove the string !AS! from our list.
32560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32562      # If it failed, the variable was not from the command line. Ignore it,
32563      # but warn the user (except for BASH, which is always set by the calling BASH).
32564      if test "xAS" != xBASH; then
32565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32566$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32567      fi
32568      # Try to locate tool using the code snippet
32569      for ac_prog in as
32570do
32571  # Extract the first word of "$ac_prog", so it can be a program name with args.
32572set dummy $ac_prog; ac_word=$2
32573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32574$as_echo_n "checking for $ac_word... " >&6; }
32575if ${ac_cv_path_AS+:} false; then :
32576  $as_echo_n "(cached) " >&6
32577else
32578  case $AS in
32579  [\\/]* | ?:[\\/]*)
32580  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32581  ;;
32582  *)
32583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32584for as_dir in $PATH
32585do
32586  IFS=$as_save_IFS
32587  test -z "$as_dir" && as_dir=.
32588    for ac_exec_ext in '' $ac_executable_extensions; do
32589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32590    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32592    break 2
32593  fi
32594done
32595  done
32596IFS=$as_save_IFS
32597
32598  ;;
32599esac
32600fi
32601AS=$ac_cv_path_AS
32602if test -n "$AS"; then
32603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32604$as_echo "$AS" >&6; }
32605else
32606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32607$as_echo "no" >&6; }
32608fi
32609
32610
32611  test -n "$AS" && break
32612done
32613
32614    else
32615      # If it succeeded, then it was overridden by the user. We will use it
32616      # for the tool.
32617
32618      # First remove it from the list of overridden variables, so we can test
32619      # for unknown variables in the end.
32620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32621
32622      # Check if the provided tool contains a complete path.
32623      tool_specified="$AS"
32624      tool_basename="${tool_specified##*/}"
32625      if test "x$tool_basename" = "x$tool_specified"; then
32626        # A command without a complete path is provided, search $PATH.
32627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32628$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32629        # Extract the first word of "$tool_basename", so it can be a program name with args.
32630set dummy $tool_basename; ac_word=$2
32631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32632$as_echo_n "checking for $ac_word... " >&6; }
32633if ${ac_cv_path_AS+:} false; then :
32634  $as_echo_n "(cached) " >&6
32635else
32636  case $AS in
32637  [\\/]* | ?:[\\/]*)
32638  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32639  ;;
32640  *)
32641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32642for as_dir in $PATH
32643do
32644  IFS=$as_save_IFS
32645  test -z "$as_dir" && as_dir=.
32646    for ac_exec_ext in '' $ac_executable_extensions; do
32647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32648    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32650    break 2
32651  fi
32652done
32653  done
32654IFS=$as_save_IFS
32655
32656  ;;
32657esac
32658fi
32659AS=$ac_cv_path_AS
32660if test -n "$AS"; then
32661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32662$as_echo "$AS" >&6; }
32663else
32664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32665$as_echo "no" >&6; }
32666fi
32667
32668
32669        if test "x$AS" = x; then
32670          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32671        fi
32672      else
32673        # Otherwise we believe it is a complete path. Use it as it is.
32674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32675$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32677$as_echo_n "checking for AS... " >&6; }
32678        if test ! -x "$tool_specified"; then
32679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32680$as_echo "not found" >&6; }
32681          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32682        fi
32683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32684$as_echo "$tool_specified" >&6; }
32685      fi
32686    fi
32687  fi
32688
32689
32690
32691  # Only process if variable expands to non-empty
32692
32693  if test "x$AS" != x; then
32694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32695
32696  # First separate the path from the arguments. This will split at the first
32697  # space.
32698  complete="$AS"
32699  path="${complete%% *}"
32700  tmp="$complete EOL"
32701  arguments="${tmp#* }"
32702
32703  # Input might be given as Windows format, start by converting to
32704  # unix format.
32705  new_path=`$CYGPATH -u "$path"`
32706
32707  # Now try to locate executable using which
32708  new_path=`$WHICH "$new_path" 2> /dev/null`
32709  # bat and cmd files are not always considered executable in cygwin causing which
32710  # to not find them
32711  if test "x$new_path" = x \
32712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32714    new_path=`$CYGPATH -u "$path"`
32715  fi
32716  if test "x$new_path" = x; then
32717    # Oops. Which didn't find the executable.
32718    # The splitting of arguments from the executable at a space might have been incorrect,
32719    # since paths with space are more likely in Windows. Give it another try with the whole
32720    # argument.
32721    path="$complete"
32722    arguments="EOL"
32723    new_path=`$CYGPATH -u "$path"`
32724    new_path=`$WHICH "$new_path" 2> /dev/null`
32725    # bat and cmd files are not always considered executable in cygwin causing which
32726    # to not find them
32727    if test "x$new_path" = x \
32728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32730      new_path=`$CYGPATH -u "$path"`
32731    fi
32732    if test "x$new_path" = x; then
32733      # It's still not found. Now this is an unrecoverable error.
32734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32735$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32736      has_space=`$ECHO "$complete" | $GREP " "`
32737      if test "x$has_space" != x; then
32738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32740      fi
32741      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32742    fi
32743  fi
32744
32745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32748  # "foo.exe" is OK but "foo" is an error.
32749  #
32750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32751  # It is also a way to make sure we got the proper file name for the real test later on.
32752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32753  if test "x$test_shortpath" = x; then
32754    # Short path failed, file does not exist as specified.
32755    # Try adding .exe or .cmd
32756    if test -f "${new_path}.exe"; then
32757      input_to_shortpath="${new_path}.exe"
32758    elif test -f "${new_path}.cmd"; then
32759      input_to_shortpath="${new_path}.cmd"
32760    else
32761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32762$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32765      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32766    fi
32767  else
32768    input_to_shortpath="$new_path"
32769  fi
32770
32771  # Call helper function which possibly converts this using DOS-style short mode.
32772  # If so, the updated path is stored in $new_path.
32773  new_path="$input_to_shortpath"
32774
32775  input_path="$input_to_shortpath"
32776  # Check if we need to convert this using DOS-style short mode. If the path
32777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32778  # take no chances and rewrite it.
32779  # Note: m4 eats our [], so we need to use [ and ] instead.
32780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32781  if test "x$has_forbidden_chars" != x; then
32782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32786      # Going to short mode and back again did indeed matter. Since short mode is
32787      # case insensitive, let's make it lowercase to improve readability.
32788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32789      # Now convert it back to Unix-style (cygpath)
32790      input_path=`$CYGPATH -u "$shortmode_path"`
32791      new_path="$input_path"
32792    fi
32793  fi
32794
32795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32796  if test "x$test_cygdrive_prefix" = x; then
32797    # As a simple fix, exclude /usr/bin since it's not a real path.
32798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32800      # a path prefixed by /cygdrive for fixpath to work.
32801      new_path="$CYGWIN_ROOT_PATH$input_path"
32802    fi
32803  fi
32804
32805  # remove trailing .exe if any
32806  new_path="${new_path/%.exe/}"
32807
32808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809
32810  # First separate the path from the arguments. This will split at the first
32811  # space.
32812  complete="$AS"
32813  path="${complete%% *}"
32814  tmp="$complete EOL"
32815  arguments="${tmp#* }"
32816
32817  # Input might be given as Windows format, start by converting to
32818  # unix format.
32819  new_path="$path"
32820
32821  windows_path="$new_path"
32822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32823    unix_path=`$CYGPATH -u "$windows_path"`
32824    new_path="$unix_path"
32825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32827    new_path="$unix_path"
32828  fi
32829
32830
32831  # Now try to locate executable using which
32832  new_path=`$WHICH "$new_path" 2> /dev/null`
32833
32834  if test "x$new_path" = x; then
32835    # Oops. Which didn't find the executable.
32836    # The splitting of arguments from the executable at a space might have been incorrect,
32837    # since paths with space are more likely in Windows. Give it another try with the whole
32838    # argument.
32839    path="$complete"
32840    arguments="EOL"
32841    new_path="$path"
32842
32843  windows_path="$new_path"
32844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32845    unix_path=`$CYGPATH -u "$windows_path"`
32846    new_path="$unix_path"
32847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32849    new_path="$unix_path"
32850  fi
32851
32852
32853    new_path=`$WHICH "$new_path" 2> /dev/null`
32854    # bat and cmd files are not always considered executable in MSYS causing which
32855    # to not find them
32856    if test "x$new_path" = x \
32857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32859      new_path="$path"
32860
32861  windows_path="$new_path"
32862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863    unix_path=`$CYGPATH -u "$windows_path"`
32864    new_path="$unix_path"
32865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32867    new_path="$unix_path"
32868  fi
32869
32870    fi
32871
32872    if test "x$new_path" = x; then
32873      # It's still not found. Now this is an unrecoverable error.
32874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32875$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32876      has_space=`$ECHO "$complete" | $GREP " "`
32877      if test "x$has_space" != x; then
32878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32880      fi
32881      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32882    fi
32883  fi
32884
32885  # Now new_path has a complete unix path to the binary
32886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32887    # Keep paths in /bin as-is, but remove trailing .exe if any
32888    new_path="${new_path/%.exe/}"
32889    # Do not save /bin paths to all_fixpath_prefixes!
32890  else
32891    # Not in mixed or Windows style, start by that.
32892    new_path=`cmd //c echo $new_path`
32893
32894  input_path="$new_path"
32895  # Check if we need to convert this using DOS-style short mode. If the path
32896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32897  # take no chances and rewrite it.
32898  # Note: m4 eats our [], so we need to use [ and ] instead.
32899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32900  if test "x$has_forbidden_chars" != x; then
32901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32903  fi
32904
32905    # Output is in $new_path
32906
32907  windows_path="$new_path"
32908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32909    unix_path=`$CYGPATH -u "$windows_path"`
32910    new_path="$unix_path"
32911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32913    new_path="$unix_path"
32914  fi
32915
32916    # remove trailing .exe if any
32917    new_path="${new_path/%.exe/}"
32918
32919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32921  fi
32922
32923    else
32924      # We're on a unix platform. Hooray! :)
32925      # First separate the path from the arguments. This will split at the first
32926      # space.
32927      complete="$AS"
32928      path="${complete%% *}"
32929      tmp="$complete EOL"
32930      arguments="${tmp#* }"
32931
32932      # Cannot rely on the command "which" here since it doesn't always work.
32933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32934      if test -z "$is_absolute_path"; then
32935        # Path to executable is not absolute. Find it.
32936        IFS_save="$IFS"
32937        IFS=:
32938        for p in $PATH; do
32939          if test -f "$p/$path" && test -x "$p/$path"; then
32940            new_path="$p/$path"
32941            break
32942          fi
32943        done
32944        IFS="$IFS_save"
32945      else
32946        # This is an absolute path, we can use it without further modifications.
32947        new_path="$path"
32948      fi
32949
32950      if test "x$new_path" = x; then
32951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32952$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32953        has_space=`$ECHO "$complete" | $GREP " "`
32954        if test "x$has_space" != x; then
32955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32957        fi
32958        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32959      fi
32960    fi
32961
32962    # Now join together the path and the arguments once again
32963    if test "x$arguments" != xEOL; then
32964      new_complete="$new_path ${arguments% *}"
32965    else
32966      new_complete="$new_path"
32967    fi
32968
32969    if test "x$complete" != "x$new_complete"; then
32970      AS="$new_complete"
32971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32972$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32973    fi
32974  fi
32975
32976  else
32977    # FIXME: is this correct for microsoft?
32978    AS="$CC -c"
32979  fi
32980
32981
32982  #
32983  # Setup the archiver (AR)
32984  #
32985  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32986    # The corresponding ar tool is lib.exe (used to create static libraries)
32987    # Extract the first word of "lib", so it can be a program name with args.
32988set dummy lib; ac_word=$2
32989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32990$as_echo_n "checking for $ac_word... " >&6; }
32991if ${ac_cv_prog_AR+:} false; then :
32992  $as_echo_n "(cached) " >&6
32993else
32994  if test -n "$AR"; then
32995  ac_cv_prog_AR="$AR" # Let the user override the test.
32996else
32997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32998for as_dir in $PATH
32999do
33000  IFS=$as_save_IFS
33001  test -z "$as_dir" && as_dir=.
33002    for ac_exec_ext in '' $ac_executable_extensions; do
33003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33004    ac_cv_prog_AR="lib"
33005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33006    break 2
33007  fi
33008done
33009  done
33010IFS=$as_save_IFS
33011
33012fi
33013fi
33014AR=$ac_cv_prog_AR
33015if test -n "$AR"; then
33016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33017$as_echo "$AR" >&6; }
33018else
33019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33020$as_echo "no" >&6; }
33021fi
33022
33023
33024  else
33025
33026
33027  # Publish this variable in the help.
33028
33029
33030  if test "x$AR" = x; then
33031    # The variable is not set by user, try to locate tool using the code snippet
33032    if test -n "$ac_tool_prefix"; then
33033  for ac_prog in ar
33034  do
33035    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33036set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33038$as_echo_n "checking for $ac_word... " >&6; }
33039if ${ac_cv_prog_AR+:} false; then :
33040  $as_echo_n "(cached) " >&6
33041else
33042  if test -n "$AR"; then
33043  ac_cv_prog_AR="$AR" # Let the user override the test.
33044else
33045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33046for as_dir in $PATH
33047do
33048  IFS=$as_save_IFS
33049  test -z "$as_dir" && as_dir=.
33050    for ac_exec_ext in '' $ac_executable_extensions; do
33051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33052    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33054    break 2
33055  fi
33056done
33057  done
33058IFS=$as_save_IFS
33059
33060fi
33061fi
33062AR=$ac_cv_prog_AR
33063if test -n "$AR"; then
33064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33065$as_echo "$AR" >&6; }
33066else
33067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33068$as_echo "no" >&6; }
33069fi
33070
33071
33072    test -n "$AR" && break
33073  done
33074fi
33075if test -z "$AR"; then
33076  ac_ct_AR=$AR
33077  for ac_prog in ar
33078do
33079  # Extract the first word of "$ac_prog", so it can be a program name with args.
33080set dummy $ac_prog; ac_word=$2
33081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33082$as_echo_n "checking for $ac_word... " >&6; }
33083if ${ac_cv_prog_ac_ct_AR+:} false; then :
33084  $as_echo_n "(cached) " >&6
33085else
33086  if test -n "$ac_ct_AR"; then
33087  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33088else
33089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33090for as_dir in $PATH
33091do
33092  IFS=$as_save_IFS
33093  test -z "$as_dir" && as_dir=.
33094    for ac_exec_ext in '' $ac_executable_extensions; do
33095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33096    ac_cv_prog_ac_ct_AR="$ac_prog"
33097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33098    break 2
33099  fi
33100done
33101  done
33102IFS=$as_save_IFS
33103
33104fi
33105fi
33106ac_ct_AR=$ac_cv_prog_ac_ct_AR
33107if test -n "$ac_ct_AR"; then
33108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33109$as_echo "$ac_ct_AR" >&6; }
33110else
33111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33112$as_echo "no" >&6; }
33113fi
33114
33115
33116  test -n "$ac_ct_AR" && break
33117done
33118
33119  if test "x$ac_ct_AR" = x; then
33120    AR=""
33121  else
33122    case $cross_compiling:$ac_tool_warned in
33123yes:)
33124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33126ac_tool_warned=yes ;;
33127esac
33128    AR=$ac_ct_AR
33129  fi
33130fi
33131
33132  else
33133    # The variable is set, but is it from the command line or the environment?
33134
33135    # Try to remove the string !AR! from our list.
33136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33138      # If it failed, the variable was not from the command line. Ignore it,
33139      # but warn the user (except for BASH, which is always set by the calling BASH).
33140      if test "xAR" != xBASH; then
33141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33142$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33143      fi
33144      # Try to locate tool using the code snippet
33145      if test -n "$ac_tool_prefix"; then
33146  for ac_prog in ar
33147  do
33148    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33149set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33151$as_echo_n "checking for $ac_word... " >&6; }
33152if ${ac_cv_prog_AR+:} false; then :
33153  $as_echo_n "(cached) " >&6
33154else
33155  if test -n "$AR"; then
33156  ac_cv_prog_AR="$AR" # Let the user override the test.
33157else
33158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33159for as_dir in $PATH
33160do
33161  IFS=$as_save_IFS
33162  test -z "$as_dir" && as_dir=.
33163    for ac_exec_ext in '' $ac_executable_extensions; do
33164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33165    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33167    break 2
33168  fi
33169done
33170  done
33171IFS=$as_save_IFS
33172
33173fi
33174fi
33175AR=$ac_cv_prog_AR
33176if test -n "$AR"; then
33177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33178$as_echo "$AR" >&6; }
33179else
33180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33181$as_echo "no" >&6; }
33182fi
33183
33184
33185    test -n "$AR" && break
33186  done
33187fi
33188if test -z "$AR"; then
33189  ac_ct_AR=$AR
33190  for ac_prog in ar
33191do
33192  # Extract the first word of "$ac_prog", so it can be a program name with args.
33193set dummy $ac_prog; ac_word=$2
33194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33195$as_echo_n "checking for $ac_word... " >&6; }
33196if ${ac_cv_prog_ac_ct_AR+:} false; then :
33197  $as_echo_n "(cached) " >&6
33198else
33199  if test -n "$ac_ct_AR"; then
33200  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33201else
33202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33203for as_dir in $PATH
33204do
33205  IFS=$as_save_IFS
33206  test -z "$as_dir" && as_dir=.
33207    for ac_exec_ext in '' $ac_executable_extensions; do
33208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33209    ac_cv_prog_ac_ct_AR="$ac_prog"
33210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33211    break 2
33212  fi
33213done
33214  done
33215IFS=$as_save_IFS
33216
33217fi
33218fi
33219ac_ct_AR=$ac_cv_prog_ac_ct_AR
33220if test -n "$ac_ct_AR"; then
33221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33222$as_echo "$ac_ct_AR" >&6; }
33223else
33224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33225$as_echo "no" >&6; }
33226fi
33227
33228
33229  test -n "$ac_ct_AR" && break
33230done
33231
33232  if test "x$ac_ct_AR" = x; then
33233    AR=""
33234  else
33235    case $cross_compiling:$ac_tool_warned in
33236yes:)
33237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33239ac_tool_warned=yes ;;
33240esac
33241    AR=$ac_ct_AR
33242  fi
33243fi
33244
33245    else
33246      # If it succeeded, then it was overridden by the user. We will use it
33247      # for the tool.
33248
33249      # First remove it from the list of overridden variables, so we can test
33250      # for unknown variables in the end.
33251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33252
33253      # Check if the provided tool contains a complete path.
33254      tool_specified="$AR"
33255      tool_basename="${tool_specified##*/}"
33256      if test "x$tool_basename" = "x$tool_specified"; then
33257        # A command without a complete path is provided, search $PATH.
33258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33259$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33260        # Extract the first word of "$tool_basename", so it can be a program name with args.
33261set dummy $tool_basename; ac_word=$2
33262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33263$as_echo_n "checking for $ac_word... " >&6; }
33264if ${ac_cv_path_AR+:} false; then :
33265  $as_echo_n "(cached) " >&6
33266else
33267  case $AR in
33268  [\\/]* | ?:[\\/]*)
33269  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33270  ;;
33271  *)
33272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33273for as_dir in $PATH
33274do
33275  IFS=$as_save_IFS
33276  test -z "$as_dir" && as_dir=.
33277    for ac_exec_ext in '' $ac_executable_extensions; do
33278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33279    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33281    break 2
33282  fi
33283done
33284  done
33285IFS=$as_save_IFS
33286
33287  ;;
33288esac
33289fi
33290AR=$ac_cv_path_AR
33291if test -n "$AR"; then
33292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33293$as_echo "$AR" >&6; }
33294else
33295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33296$as_echo "no" >&6; }
33297fi
33298
33299
33300        if test "x$AR" = x; then
33301          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33302        fi
33303      else
33304        # Otherwise we believe it is a complete path. Use it as it is.
33305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33306$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33308$as_echo_n "checking for AR... " >&6; }
33309        if test ! -x "$tool_specified"; then
33310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33311$as_echo "not found" >&6; }
33312          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33313        fi
33314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33315$as_echo "$tool_specified" >&6; }
33316      fi
33317    fi
33318  fi
33319
33320
33321  fi
33322
33323  # Only process if variable expands to non-empty
33324
33325  if test "x$AR" != x; then
33326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33327
33328  # First separate the path from the arguments. This will split at the first
33329  # space.
33330  complete="$AR"
33331  path="${complete%% *}"
33332  tmp="$complete EOL"
33333  arguments="${tmp#* }"
33334
33335  # Input might be given as Windows format, start by converting to
33336  # unix format.
33337  new_path=`$CYGPATH -u "$path"`
33338
33339  # Now try to locate executable using which
33340  new_path=`$WHICH "$new_path" 2> /dev/null`
33341  # bat and cmd files are not always considered executable in cygwin causing which
33342  # to not find them
33343  if test "x$new_path" = x \
33344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33346    new_path=`$CYGPATH -u "$path"`
33347  fi
33348  if test "x$new_path" = x; then
33349    # Oops. Which didn't find the executable.
33350    # The splitting of arguments from the executable at a space might have been incorrect,
33351    # since paths with space are more likely in Windows. Give it another try with the whole
33352    # argument.
33353    path="$complete"
33354    arguments="EOL"
33355    new_path=`$CYGPATH -u "$path"`
33356    new_path=`$WHICH "$new_path" 2> /dev/null`
33357    # bat and cmd files are not always considered executable in cygwin causing which
33358    # to not find them
33359    if test "x$new_path" = x \
33360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33362      new_path=`$CYGPATH -u "$path"`
33363    fi
33364    if test "x$new_path" = x; then
33365      # It's still not found. Now this is an unrecoverable error.
33366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33367$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33368      has_space=`$ECHO "$complete" | $GREP " "`
33369      if test "x$has_space" != x; then
33370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33372      fi
33373      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33374    fi
33375  fi
33376
33377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33380  # "foo.exe" is OK but "foo" is an error.
33381  #
33382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33383  # It is also a way to make sure we got the proper file name for the real test later on.
33384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33385  if test "x$test_shortpath" = x; then
33386    # Short path failed, file does not exist as specified.
33387    # Try adding .exe or .cmd
33388    if test -f "${new_path}.exe"; then
33389      input_to_shortpath="${new_path}.exe"
33390    elif test -f "${new_path}.cmd"; then
33391      input_to_shortpath="${new_path}.cmd"
33392    else
33393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33394$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33397      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33398    fi
33399  else
33400    input_to_shortpath="$new_path"
33401  fi
33402
33403  # Call helper function which possibly converts this using DOS-style short mode.
33404  # If so, the updated path is stored in $new_path.
33405  new_path="$input_to_shortpath"
33406
33407  input_path="$input_to_shortpath"
33408  # Check if we need to convert this using DOS-style short mode. If the path
33409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33410  # take no chances and rewrite it.
33411  # Note: m4 eats our [], so we need to use [ and ] instead.
33412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33413  if test "x$has_forbidden_chars" != x; then
33414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33418      # Going to short mode and back again did indeed matter. Since short mode is
33419      # case insensitive, let's make it lowercase to improve readability.
33420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33421      # Now convert it back to Unix-style (cygpath)
33422      input_path=`$CYGPATH -u "$shortmode_path"`
33423      new_path="$input_path"
33424    fi
33425  fi
33426
33427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33428  if test "x$test_cygdrive_prefix" = x; then
33429    # As a simple fix, exclude /usr/bin since it's not a real path.
33430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33432      # a path prefixed by /cygdrive for fixpath to work.
33433      new_path="$CYGWIN_ROOT_PATH$input_path"
33434    fi
33435  fi
33436
33437  # remove trailing .exe if any
33438  new_path="${new_path/%.exe/}"
33439
33440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33441
33442  # First separate the path from the arguments. This will split at the first
33443  # space.
33444  complete="$AR"
33445  path="${complete%% *}"
33446  tmp="$complete EOL"
33447  arguments="${tmp#* }"
33448
33449  # Input might be given as Windows format, start by converting to
33450  # unix format.
33451  new_path="$path"
33452
33453  windows_path="$new_path"
33454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33455    unix_path=`$CYGPATH -u "$windows_path"`
33456    new_path="$unix_path"
33457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33459    new_path="$unix_path"
33460  fi
33461
33462
33463  # Now try to locate executable using which
33464  new_path=`$WHICH "$new_path" 2> /dev/null`
33465
33466  if test "x$new_path" = x; then
33467    # Oops. Which didn't find the executable.
33468    # The splitting of arguments from the executable at a space might have been incorrect,
33469    # since paths with space are more likely in Windows. Give it another try with the whole
33470    # argument.
33471    path="$complete"
33472    arguments="EOL"
33473    new_path="$path"
33474
33475  windows_path="$new_path"
33476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33477    unix_path=`$CYGPATH -u "$windows_path"`
33478    new_path="$unix_path"
33479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33481    new_path="$unix_path"
33482  fi
33483
33484
33485    new_path=`$WHICH "$new_path" 2> /dev/null`
33486    # bat and cmd files are not always considered executable in MSYS causing which
33487    # to not find them
33488    if test "x$new_path" = x \
33489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33491      new_path="$path"
33492
33493  windows_path="$new_path"
33494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33495    unix_path=`$CYGPATH -u "$windows_path"`
33496    new_path="$unix_path"
33497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33499    new_path="$unix_path"
33500  fi
33501
33502    fi
33503
33504    if test "x$new_path" = x; then
33505      # It's still not found. Now this is an unrecoverable error.
33506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33507$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33508      has_space=`$ECHO "$complete" | $GREP " "`
33509      if test "x$has_space" != x; then
33510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33512      fi
33513      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33514    fi
33515  fi
33516
33517  # Now new_path has a complete unix path to the binary
33518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33519    # Keep paths in /bin as-is, but remove trailing .exe if any
33520    new_path="${new_path/%.exe/}"
33521    # Do not save /bin paths to all_fixpath_prefixes!
33522  else
33523    # Not in mixed or Windows style, start by that.
33524    new_path=`cmd //c echo $new_path`
33525
33526  input_path="$new_path"
33527  # Check if we need to convert this using DOS-style short mode. If the path
33528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33529  # take no chances and rewrite it.
33530  # Note: m4 eats our [], so we need to use [ and ] instead.
33531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33532  if test "x$has_forbidden_chars" != x; then
33533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33535  fi
33536
33537    # Output is in $new_path
33538
33539  windows_path="$new_path"
33540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33541    unix_path=`$CYGPATH -u "$windows_path"`
33542    new_path="$unix_path"
33543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33545    new_path="$unix_path"
33546  fi
33547
33548    # remove trailing .exe if any
33549    new_path="${new_path/%.exe/}"
33550
33551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33553  fi
33554
33555    else
33556      # We're on a unix platform. Hooray! :)
33557      # First separate the path from the arguments. This will split at the first
33558      # space.
33559      complete="$AR"
33560      path="${complete%% *}"
33561      tmp="$complete EOL"
33562      arguments="${tmp#* }"
33563
33564      # Cannot rely on the command "which" here since it doesn't always work.
33565      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33566      if test -z "$is_absolute_path"; then
33567        # Path to executable is not absolute. Find it.
33568        IFS_save="$IFS"
33569        IFS=:
33570        for p in $PATH; do
33571          if test -f "$p/$path" && test -x "$p/$path"; then
33572            new_path="$p/$path"
33573            break
33574          fi
33575        done
33576        IFS="$IFS_save"
33577      else
33578        # This is an absolute path, we can use it without further modifications.
33579        new_path="$path"
33580      fi
33581
33582      if test "x$new_path" = x; then
33583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33584$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33585        has_space=`$ECHO "$complete" | $GREP " "`
33586        if test "x$has_space" != x; then
33587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33589        fi
33590        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33591      fi
33592    fi
33593
33594    # Now join together the path and the arguments once again
33595    if test "x$arguments" != xEOL; then
33596      new_complete="$new_path ${arguments% *}"
33597    else
33598      new_complete="$new_path"
33599    fi
33600
33601    if test "x$complete" != "x$new_complete"; then
33602      AR="$new_complete"
33603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33604$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33605    fi
33606  fi
33607
33608
33609
33610  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33611
33612
33613  # Publish this variable in the help.
33614
33615
33616  if test "x$LIPO" = x; then
33617    # The variable is not set by user, try to locate tool using the code snippet
33618    for ac_prog in lipo
33619do
33620  # Extract the first word of "$ac_prog", so it can be a program name with args.
33621set dummy $ac_prog; ac_word=$2
33622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33623$as_echo_n "checking for $ac_word... " >&6; }
33624if ${ac_cv_path_LIPO+:} false; then :
33625  $as_echo_n "(cached) " >&6
33626else
33627  case $LIPO in
33628  [\\/]* | ?:[\\/]*)
33629  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33630  ;;
33631  *)
33632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33633for as_dir in $PATH
33634do
33635  IFS=$as_save_IFS
33636  test -z "$as_dir" && as_dir=.
33637    for ac_exec_ext in '' $ac_executable_extensions; do
33638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33639    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33641    break 2
33642  fi
33643done
33644  done
33645IFS=$as_save_IFS
33646
33647  ;;
33648esac
33649fi
33650LIPO=$ac_cv_path_LIPO
33651if test -n "$LIPO"; then
33652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33653$as_echo "$LIPO" >&6; }
33654else
33655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33656$as_echo "no" >&6; }
33657fi
33658
33659
33660  test -n "$LIPO" && break
33661done
33662
33663  else
33664    # The variable is set, but is it from the command line or the environment?
33665
33666    # Try to remove the string !LIPO! from our list.
33667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33669      # If it failed, the variable was not from the command line. Ignore it,
33670      # but warn the user (except for BASH, which is always set by the calling BASH).
33671      if test "xLIPO" != xBASH; then
33672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33673$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33674      fi
33675      # Try to locate tool using the code snippet
33676      for ac_prog in lipo
33677do
33678  # Extract the first word of "$ac_prog", so it can be a program name with args.
33679set dummy $ac_prog; ac_word=$2
33680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33681$as_echo_n "checking for $ac_word... " >&6; }
33682if ${ac_cv_path_LIPO+:} false; then :
33683  $as_echo_n "(cached) " >&6
33684else
33685  case $LIPO in
33686  [\\/]* | ?:[\\/]*)
33687  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33688  ;;
33689  *)
33690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33691for as_dir in $PATH
33692do
33693  IFS=$as_save_IFS
33694  test -z "$as_dir" && as_dir=.
33695    for ac_exec_ext in '' $ac_executable_extensions; do
33696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33697    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33699    break 2
33700  fi
33701done
33702  done
33703IFS=$as_save_IFS
33704
33705  ;;
33706esac
33707fi
33708LIPO=$ac_cv_path_LIPO
33709if test -n "$LIPO"; then
33710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33711$as_echo "$LIPO" >&6; }
33712else
33713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33714$as_echo "no" >&6; }
33715fi
33716
33717
33718  test -n "$LIPO" && break
33719done
33720
33721    else
33722      # If it succeeded, then it was overridden by the user. We will use it
33723      # for the tool.
33724
33725      # First remove it from the list of overridden variables, so we can test
33726      # for unknown variables in the end.
33727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33728
33729      # Check if the provided tool contains a complete path.
33730      tool_specified="$LIPO"
33731      tool_basename="${tool_specified##*/}"
33732      if test "x$tool_basename" = "x$tool_specified"; then
33733        # A command without a complete path is provided, search $PATH.
33734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33735$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33736        # Extract the first word of "$tool_basename", so it can be a program name with args.
33737set dummy $tool_basename; ac_word=$2
33738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33739$as_echo_n "checking for $ac_word... " >&6; }
33740if ${ac_cv_path_LIPO+:} false; then :
33741  $as_echo_n "(cached) " >&6
33742else
33743  case $LIPO in
33744  [\\/]* | ?:[\\/]*)
33745  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33746  ;;
33747  *)
33748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33749for as_dir in $PATH
33750do
33751  IFS=$as_save_IFS
33752  test -z "$as_dir" && as_dir=.
33753    for ac_exec_ext in '' $ac_executable_extensions; do
33754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33755    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33757    break 2
33758  fi
33759done
33760  done
33761IFS=$as_save_IFS
33762
33763  ;;
33764esac
33765fi
33766LIPO=$ac_cv_path_LIPO
33767if test -n "$LIPO"; then
33768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33769$as_echo "$LIPO" >&6; }
33770else
33771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33772$as_echo "no" >&6; }
33773fi
33774
33775
33776        if test "x$LIPO" = x; then
33777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33778        fi
33779      else
33780        # Otherwise we believe it is a complete path. Use it as it is.
33781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33782$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33784$as_echo_n "checking for LIPO... " >&6; }
33785        if test ! -x "$tool_specified"; then
33786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33787$as_echo "not found" >&6; }
33788          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33789        fi
33790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33791$as_echo "$tool_specified" >&6; }
33792      fi
33793    fi
33794  fi
33795
33796
33797
33798  # Only process if variable expands to non-empty
33799
33800  if test "x$LIPO" != x; then
33801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33802
33803  # First separate the path from the arguments. This will split at the first
33804  # space.
33805  complete="$LIPO"
33806  path="${complete%% *}"
33807  tmp="$complete EOL"
33808  arguments="${tmp#* }"
33809
33810  # Input might be given as Windows format, start by converting to
33811  # unix format.
33812  new_path=`$CYGPATH -u "$path"`
33813
33814  # Now try to locate executable using which
33815  new_path=`$WHICH "$new_path" 2> /dev/null`
33816  # bat and cmd files are not always considered executable in cygwin causing which
33817  # to not find them
33818  if test "x$new_path" = x \
33819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33821    new_path=`$CYGPATH -u "$path"`
33822  fi
33823  if test "x$new_path" = x; then
33824    # Oops. Which didn't find the executable.
33825    # The splitting of arguments from the executable at a space might have been incorrect,
33826    # since paths with space are more likely in Windows. Give it another try with the whole
33827    # argument.
33828    path="$complete"
33829    arguments="EOL"
33830    new_path=`$CYGPATH -u "$path"`
33831    new_path=`$WHICH "$new_path" 2> /dev/null`
33832    # bat and cmd files are not always considered executable in cygwin causing which
33833    # to not find them
33834    if test "x$new_path" = x \
33835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33837      new_path=`$CYGPATH -u "$path"`
33838    fi
33839    if test "x$new_path" = x; then
33840      # It's still not found. Now this is an unrecoverable error.
33841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33842$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33843      has_space=`$ECHO "$complete" | $GREP " "`
33844      if test "x$has_space" != x; then
33845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33847      fi
33848      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33849    fi
33850  fi
33851
33852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33855  # "foo.exe" is OK but "foo" is an error.
33856  #
33857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33858  # It is also a way to make sure we got the proper file name for the real test later on.
33859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33860  if test "x$test_shortpath" = x; then
33861    # Short path failed, file does not exist as specified.
33862    # Try adding .exe or .cmd
33863    if test -f "${new_path}.exe"; then
33864      input_to_shortpath="${new_path}.exe"
33865    elif test -f "${new_path}.cmd"; then
33866      input_to_shortpath="${new_path}.cmd"
33867    else
33868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33869$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33872      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33873    fi
33874  else
33875    input_to_shortpath="$new_path"
33876  fi
33877
33878  # Call helper function which possibly converts this using DOS-style short mode.
33879  # If so, the updated path is stored in $new_path.
33880  new_path="$input_to_shortpath"
33881
33882  input_path="$input_to_shortpath"
33883  # Check if we need to convert this using DOS-style short mode. If the path
33884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33885  # take no chances and rewrite it.
33886  # Note: m4 eats our [], so we need to use [ and ] instead.
33887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33888  if test "x$has_forbidden_chars" != x; then
33889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33893      # Going to short mode and back again did indeed matter. Since short mode is
33894      # case insensitive, let's make it lowercase to improve readability.
33895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33896      # Now convert it back to Unix-style (cygpath)
33897      input_path=`$CYGPATH -u "$shortmode_path"`
33898      new_path="$input_path"
33899    fi
33900  fi
33901
33902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33903  if test "x$test_cygdrive_prefix" = x; then
33904    # As a simple fix, exclude /usr/bin since it's not a real path.
33905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33907      # a path prefixed by /cygdrive for fixpath to work.
33908      new_path="$CYGWIN_ROOT_PATH$input_path"
33909    fi
33910  fi
33911
33912  # remove trailing .exe if any
33913  new_path="${new_path/%.exe/}"
33914
33915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33916
33917  # First separate the path from the arguments. This will split at the first
33918  # space.
33919  complete="$LIPO"
33920  path="${complete%% *}"
33921  tmp="$complete EOL"
33922  arguments="${tmp#* }"
33923
33924  # Input might be given as Windows format, start by converting to
33925  # unix format.
33926  new_path="$path"
33927
33928  windows_path="$new_path"
33929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33930    unix_path=`$CYGPATH -u "$windows_path"`
33931    new_path="$unix_path"
33932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33934    new_path="$unix_path"
33935  fi
33936
33937
33938  # Now try to locate executable using which
33939  new_path=`$WHICH "$new_path" 2> /dev/null`
33940
33941  if test "x$new_path" = x; then
33942    # Oops. Which didn't find the executable.
33943    # The splitting of arguments from the executable at a space might have been incorrect,
33944    # since paths with space are more likely in Windows. Give it another try with the whole
33945    # argument.
33946    path="$complete"
33947    arguments="EOL"
33948    new_path="$path"
33949
33950  windows_path="$new_path"
33951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33952    unix_path=`$CYGPATH -u "$windows_path"`
33953    new_path="$unix_path"
33954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33956    new_path="$unix_path"
33957  fi
33958
33959
33960    new_path=`$WHICH "$new_path" 2> /dev/null`
33961    # bat and cmd files are not always considered executable in MSYS causing which
33962    # to not find them
33963    if test "x$new_path" = x \
33964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33966      new_path="$path"
33967
33968  windows_path="$new_path"
33969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33970    unix_path=`$CYGPATH -u "$windows_path"`
33971    new_path="$unix_path"
33972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33974    new_path="$unix_path"
33975  fi
33976
33977    fi
33978
33979    if test "x$new_path" = x; then
33980      # It's still not found. Now this is an unrecoverable error.
33981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33982$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33983      has_space=`$ECHO "$complete" | $GREP " "`
33984      if test "x$has_space" != x; then
33985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33987      fi
33988      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33989    fi
33990  fi
33991
33992  # Now new_path has a complete unix path to the binary
33993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33994    # Keep paths in /bin as-is, but remove trailing .exe if any
33995    new_path="${new_path/%.exe/}"
33996    # Do not save /bin paths to all_fixpath_prefixes!
33997  else
33998    # Not in mixed or Windows style, start by that.
33999    new_path=`cmd //c echo $new_path`
34000
34001  input_path="$new_path"
34002  # Check if we need to convert this using DOS-style short mode. If the path
34003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34004  # take no chances and rewrite it.
34005  # Note: m4 eats our [], so we need to use [ and ] instead.
34006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34007  if test "x$has_forbidden_chars" != x; then
34008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34010  fi
34011
34012    # Output is in $new_path
34013
34014  windows_path="$new_path"
34015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34016    unix_path=`$CYGPATH -u "$windows_path"`
34017    new_path="$unix_path"
34018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34020    new_path="$unix_path"
34021  fi
34022
34023    # remove trailing .exe if any
34024    new_path="${new_path/%.exe/}"
34025
34026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34028  fi
34029
34030    else
34031      # We're on a unix platform. Hooray! :)
34032      # First separate the path from the arguments. This will split at the first
34033      # space.
34034      complete="$LIPO"
34035      path="${complete%% *}"
34036      tmp="$complete EOL"
34037      arguments="${tmp#* }"
34038
34039      # Cannot rely on the command "which" here since it doesn't always work.
34040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34041      if test -z "$is_absolute_path"; then
34042        # Path to executable is not absolute. Find it.
34043        IFS_save="$IFS"
34044        IFS=:
34045        for p in $PATH; do
34046          if test -f "$p/$path" && test -x "$p/$path"; then
34047            new_path="$p/$path"
34048            break
34049          fi
34050        done
34051        IFS="$IFS_save"
34052      else
34053        # This is an absolute path, we can use it without further modifications.
34054        new_path="$path"
34055      fi
34056
34057      if test "x$new_path" = x; then
34058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34059$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34060        has_space=`$ECHO "$complete" | $GREP " "`
34061        if test "x$has_space" != x; then
34062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34064        fi
34065        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34066      fi
34067    fi
34068
34069    # Now join together the path and the arguments once again
34070    if test "x$arguments" != xEOL; then
34071      new_complete="$new_path ${arguments% *}"
34072    else
34073      new_complete="$new_path"
34074    fi
34075
34076    if test "x$complete" != "x$new_complete"; then
34077      LIPO="$new_complete"
34078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34079$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34080    fi
34081  fi
34082
34083  fi
34084
34085  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34086    # Extract the first word of "mt", so it can be a program name with args.
34087set dummy mt; ac_word=$2
34088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34089$as_echo_n "checking for $ac_word... " >&6; }
34090if ${ac_cv_prog_MT+:} false; then :
34091  $as_echo_n "(cached) " >&6
34092else
34093  if test -n "$MT"; then
34094  ac_cv_prog_MT="$MT" # Let the user override the test.
34095else
34096  ac_prog_rejected=no
34097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34098for as_dir in $PATH
34099do
34100  IFS=$as_save_IFS
34101  test -z "$as_dir" && as_dir=.
34102    for ac_exec_ext in '' $ac_executable_extensions; do
34103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34104    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34105       ac_prog_rejected=yes
34106       continue
34107     fi
34108    ac_cv_prog_MT="mt"
34109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34110    break 2
34111  fi
34112done
34113  done
34114IFS=$as_save_IFS
34115
34116if test $ac_prog_rejected = yes; then
34117  # We found a bogon in the path, so make sure we never use it.
34118  set dummy $ac_cv_prog_MT
34119  shift
34120  if test $# != 0; then
34121    # We chose a different compiler from the bogus one.
34122    # However, it has the same basename, so the bogon will be chosen
34123    # first if we set MT to just the basename; use the full file name.
34124    shift
34125    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34126  fi
34127fi
34128fi
34129fi
34130MT=$ac_cv_prog_MT
34131if test -n "$MT"; then
34132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34133$as_echo "$MT" >&6; }
34134else
34135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34136$as_echo "no" >&6; }
34137fi
34138
34139
34140
34141  # Only process if variable expands to non-empty
34142
34143  if test "x$MT" != x; then
34144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34145
34146  # First separate the path from the arguments. This will split at the first
34147  # space.
34148  complete="$MT"
34149  path="${complete%% *}"
34150  tmp="$complete EOL"
34151  arguments="${tmp#* }"
34152
34153  # Input might be given as Windows format, start by converting to
34154  # unix format.
34155  new_path=`$CYGPATH -u "$path"`
34156
34157  # Now try to locate executable using which
34158  new_path=`$WHICH "$new_path" 2> /dev/null`
34159  # bat and cmd files are not always considered executable in cygwin causing which
34160  # to not find them
34161  if test "x$new_path" = x \
34162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34164    new_path=`$CYGPATH -u "$path"`
34165  fi
34166  if test "x$new_path" = x; then
34167    # Oops. Which didn't find the executable.
34168    # The splitting of arguments from the executable at a space might have been incorrect,
34169    # since paths with space are more likely in Windows. Give it another try with the whole
34170    # argument.
34171    path="$complete"
34172    arguments="EOL"
34173    new_path=`$CYGPATH -u "$path"`
34174    new_path=`$WHICH "$new_path" 2> /dev/null`
34175    # bat and cmd files are not always considered executable in cygwin causing which
34176    # to not find them
34177    if test "x$new_path" = x \
34178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34180      new_path=`$CYGPATH -u "$path"`
34181    fi
34182    if test "x$new_path" = x; then
34183      # It's still not found. Now this is an unrecoverable error.
34184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34185$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34186      has_space=`$ECHO "$complete" | $GREP " "`
34187      if test "x$has_space" != x; then
34188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34190      fi
34191      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34192    fi
34193  fi
34194
34195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34198  # "foo.exe" is OK but "foo" is an error.
34199  #
34200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34201  # It is also a way to make sure we got the proper file name for the real test later on.
34202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34203  if test "x$test_shortpath" = x; then
34204    # Short path failed, file does not exist as specified.
34205    # Try adding .exe or .cmd
34206    if test -f "${new_path}.exe"; then
34207      input_to_shortpath="${new_path}.exe"
34208    elif test -f "${new_path}.cmd"; then
34209      input_to_shortpath="${new_path}.cmd"
34210    else
34211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34212$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34215      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34216    fi
34217  else
34218    input_to_shortpath="$new_path"
34219  fi
34220
34221  # Call helper function which possibly converts this using DOS-style short mode.
34222  # If so, the updated path is stored in $new_path.
34223  new_path="$input_to_shortpath"
34224
34225  input_path="$input_to_shortpath"
34226  # Check if we need to convert this using DOS-style short mode. If the path
34227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34228  # take no chances and rewrite it.
34229  # Note: m4 eats our [], so we need to use [ and ] instead.
34230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34231  if test "x$has_forbidden_chars" != x; then
34232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34236      # Going to short mode and back again did indeed matter. Since short mode is
34237      # case insensitive, let's make it lowercase to improve readability.
34238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34239      # Now convert it back to Unix-style (cygpath)
34240      input_path=`$CYGPATH -u "$shortmode_path"`
34241      new_path="$input_path"
34242    fi
34243  fi
34244
34245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34246  if test "x$test_cygdrive_prefix" = x; then
34247    # As a simple fix, exclude /usr/bin since it's not a real path.
34248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34250      # a path prefixed by /cygdrive for fixpath to work.
34251      new_path="$CYGWIN_ROOT_PATH$input_path"
34252    fi
34253  fi
34254
34255  # remove trailing .exe if any
34256  new_path="${new_path/%.exe/}"
34257
34258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34259
34260  # First separate the path from the arguments. This will split at the first
34261  # space.
34262  complete="$MT"
34263  path="${complete%% *}"
34264  tmp="$complete EOL"
34265  arguments="${tmp#* }"
34266
34267  # Input might be given as Windows format, start by converting to
34268  # unix format.
34269  new_path="$path"
34270
34271  windows_path="$new_path"
34272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34273    unix_path=`$CYGPATH -u "$windows_path"`
34274    new_path="$unix_path"
34275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34277    new_path="$unix_path"
34278  fi
34279
34280
34281  # Now try to locate executable using which
34282  new_path=`$WHICH "$new_path" 2> /dev/null`
34283
34284  if test "x$new_path" = x; then
34285    # Oops. Which didn't find the executable.
34286    # The splitting of arguments from the executable at a space might have been incorrect,
34287    # since paths with space are more likely in Windows. Give it another try with the whole
34288    # argument.
34289    path="$complete"
34290    arguments="EOL"
34291    new_path="$path"
34292
34293  windows_path="$new_path"
34294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34295    unix_path=`$CYGPATH -u "$windows_path"`
34296    new_path="$unix_path"
34297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34299    new_path="$unix_path"
34300  fi
34301
34302
34303    new_path=`$WHICH "$new_path" 2> /dev/null`
34304    # bat and cmd files are not always considered executable in MSYS causing which
34305    # to not find them
34306    if test "x$new_path" = x \
34307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34309      new_path="$path"
34310
34311  windows_path="$new_path"
34312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34313    unix_path=`$CYGPATH -u "$windows_path"`
34314    new_path="$unix_path"
34315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34317    new_path="$unix_path"
34318  fi
34319
34320    fi
34321
34322    if test "x$new_path" = x; then
34323      # It's still not found. Now this is an unrecoverable error.
34324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34325$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34326      has_space=`$ECHO "$complete" | $GREP " "`
34327      if test "x$has_space" != x; then
34328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34330      fi
34331      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34332    fi
34333  fi
34334
34335  # Now new_path has a complete unix path to the binary
34336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34337    # Keep paths in /bin as-is, but remove trailing .exe if any
34338    new_path="${new_path/%.exe/}"
34339    # Do not save /bin paths to all_fixpath_prefixes!
34340  else
34341    # Not in mixed or Windows style, start by that.
34342    new_path=`cmd //c echo $new_path`
34343
34344  input_path="$new_path"
34345  # Check if we need to convert this using DOS-style short mode. If the path
34346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34347  # take no chances and rewrite it.
34348  # Note: m4 eats our [], so we need to use [ and ] instead.
34349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34350  if test "x$has_forbidden_chars" != x; then
34351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34353  fi
34354
34355    # Output is in $new_path
34356
34357  windows_path="$new_path"
34358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34359    unix_path=`$CYGPATH -u "$windows_path"`
34360    new_path="$unix_path"
34361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34363    new_path="$unix_path"
34364  fi
34365
34366    # remove trailing .exe if any
34367    new_path="${new_path/%.exe/}"
34368
34369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34371  fi
34372
34373    else
34374      # We're on a unix platform. Hooray! :)
34375      # First separate the path from the arguments. This will split at the first
34376      # space.
34377      complete="$MT"
34378      path="${complete%% *}"
34379      tmp="$complete EOL"
34380      arguments="${tmp#* }"
34381
34382      # Cannot rely on the command "which" here since it doesn't always work.
34383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34384      if test -z "$is_absolute_path"; then
34385        # Path to executable is not absolute. Find it.
34386        IFS_save="$IFS"
34387        IFS=:
34388        for p in $PATH; do
34389          if test -f "$p/$path" && test -x "$p/$path"; then
34390            new_path="$p/$path"
34391            break
34392          fi
34393        done
34394        IFS="$IFS_save"
34395      else
34396        # This is an absolute path, we can use it without further modifications.
34397        new_path="$path"
34398      fi
34399
34400      if test "x$new_path" = x; then
34401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34402$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34403        has_space=`$ECHO "$complete" | $GREP " "`
34404        if test "x$has_space" != x; then
34405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34407        fi
34408        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34409      fi
34410    fi
34411
34412    # Now join together the path and the arguments once again
34413    if test "x$arguments" != xEOL; then
34414      new_complete="$new_path ${arguments% *}"
34415    else
34416      new_complete="$new_path"
34417    fi
34418
34419    if test "x$complete" != "x$new_complete"; then
34420      MT="$new_complete"
34421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34422$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34423    fi
34424  fi
34425
34426    # Setup the resource compiler (RC)
34427    # Extract the first word of "rc", so it can be a program name with args.
34428set dummy rc; ac_word=$2
34429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34430$as_echo_n "checking for $ac_word... " >&6; }
34431if ${ac_cv_prog_RC+:} false; then :
34432  $as_echo_n "(cached) " >&6
34433else
34434  if test -n "$RC"; then
34435  ac_cv_prog_RC="$RC" # Let the user override the test.
34436else
34437  ac_prog_rejected=no
34438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34439for as_dir in $PATH
34440do
34441  IFS=$as_save_IFS
34442  test -z "$as_dir" && as_dir=.
34443    for ac_exec_ext in '' $ac_executable_extensions; do
34444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34445    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34446       ac_prog_rejected=yes
34447       continue
34448     fi
34449    ac_cv_prog_RC="rc"
34450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34451    break 2
34452  fi
34453done
34454  done
34455IFS=$as_save_IFS
34456
34457if test $ac_prog_rejected = yes; then
34458  # We found a bogon in the path, so make sure we never use it.
34459  set dummy $ac_cv_prog_RC
34460  shift
34461  if test $# != 0; then
34462    # We chose a different compiler from the bogus one.
34463    # However, it has the same basename, so the bogon will be chosen
34464    # first if we set RC to just the basename; use the full file name.
34465    shift
34466    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34467  fi
34468fi
34469fi
34470fi
34471RC=$ac_cv_prog_RC
34472if test -n "$RC"; then
34473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34474$as_echo "$RC" >&6; }
34475else
34476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34477$as_echo "no" >&6; }
34478fi
34479
34480
34481
34482  # Only process if variable expands to non-empty
34483
34484  if test "x$RC" != x; then
34485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34486
34487  # First separate the path from the arguments. This will split at the first
34488  # space.
34489  complete="$RC"
34490  path="${complete%% *}"
34491  tmp="$complete EOL"
34492  arguments="${tmp#* }"
34493
34494  # Input might be given as Windows format, start by converting to
34495  # unix format.
34496  new_path=`$CYGPATH -u "$path"`
34497
34498  # Now try to locate executable using which
34499  new_path=`$WHICH "$new_path" 2> /dev/null`
34500  # bat and cmd files are not always considered executable in cygwin causing which
34501  # to not find them
34502  if test "x$new_path" = x \
34503      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34504      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34505    new_path=`$CYGPATH -u "$path"`
34506  fi
34507  if test "x$new_path" = x; then
34508    # Oops. Which didn't find the executable.
34509    # The splitting of arguments from the executable at a space might have been incorrect,
34510    # since paths with space are more likely in Windows. Give it another try with the whole
34511    # argument.
34512    path="$complete"
34513    arguments="EOL"
34514    new_path=`$CYGPATH -u "$path"`
34515    new_path=`$WHICH "$new_path" 2> /dev/null`
34516    # bat and cmd files are not always considered executable in cygwin causing which
34517    # to not find them
34518    if test "x$new_path" = x \
34519        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34520        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34521      new_path=`$CYGPATH -u "$path"`
34522    fi
34523    if test "x$new_path" = x; then
34524      # It's still not found. Now this is an unrecoverable error.
34525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34526$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34527      has_space=`$ECHO "$complete" | $GREP " "`
34528      if test "x$has_space" != x; then
34529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34531      fi
34532      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34533    fi
34534  fi
34535
34536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34539  # "foo.exe" is OK but "foo" is an error.
34540  #
34541  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34542  # It is also a way to make sure we got the proper file name for the real test later on.
34543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34544  if test "x$test_shortpath" = x; then
34545    # Short path failed, file does not exist as specified.
34546    # Try adding .exe or .cmd
34547    if test -f "${new_path}.exe"; then
34548      input_to_shortpath="${new_path}.exe"
34549    elif test -f "${new_path}.cmd"; then
34550      input_to_shortpath="${new_path}.cmd"
34551    else
34552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34553$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34554      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34555$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34556      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34557    fi
34558  else
34559    input_to_shortpath="$new_path"
34560  fi
34561
34562  # Call helper function which possibly converts this using DOS-style short mode.
34563  # If so, the updated path is stored in $new_path.
34564  new_path="$input_to_shortpath"
34565
34566  input_path="$input_to_shortpath"
34567  # Check if we need to convert this using DOS-style short mode. If the path
34568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34569  # take no chances and rewrite it.
34570  # Note: m4 eats our [], so we need to use [ and ] instead.
34571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34572  if test "x$has_forbidden_chars" != x; then
34573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34577      # Going to short mode and back again did indeed matter. Since short mode is
34578      # case insensitive, let's make it lowercase to improve readability.
34579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34580      # Now convert it back to Unix-style (cygpath)
34581      input_path=`$CYGPATH -u "$shortmode_path"`
34582      new_path="$input_path"
34583    fi
34584  fi
34585
34586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34587  if test "x$test_cygdrive_prefix" = x; then
34588    # As a simple fix, exclude /usr/bin since it's not a real path.
34589    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34591      # a path prefixed by /cygdrive for fixpath to work.
34592      new_path="$CYGWIN_ROOT_PATH$input_path"
34593    fi
34594  fi
34595
34596  # remove trailing .exe if any
34597  new_path="${new_path/%.exe/}"
34598
34599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34600
34601  # First separate the path from the arguments. This will split at the first
34602  # space.
34603  complete="$RC"
34604  path="${complete%% *}"
34605  tmp="$complete EOL"
34606  arguments="${tmp#* }"
34607
34608  # Input might be given as Windows format, start by converting to
34609  # unix format.
34610  new_path="$path"
34611
34612  windows_path="$new_path"
34613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34614    unix_path=`$CYGPATH -u "$windows_path"`
34615    new_path="$unix_path"
34616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34618    new_path="$unix_path"
34619  fi
34620
34621
34622  # Now try to locate executable using which
34623  new_path=`$WHICH "$new_path" 2> /dev/null`
34624
34625  if test "x$new_path" = x; then
34626    # Oops. Which didn't find the executable.
34627    # The splitting of arguments from the executable at a space might have been incorrect,
34628    # since paths with space are more likely in Windows. Give it another try with the whole
34629    # argument.
34630    path="$complete"
34631    arguments="EOL"
34632    new_path="$path"
34633
34634  windows_path="$new_path"
34635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34636    unix_path=`$CYGPATH -u "$windows_path"`
34637    new_path="$unix_path"
34638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34640    new_path="$unix_path"
34641  fi
34642
34643
34644    new_path=`$WHICH "$new_path" 2> /dev/null`
34645    # bat and cmd files are not always considered executable in MSYS causing which
34646    # to not find them
34647    if test "x$new_path" = x \
34648        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34649        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34650      new_path="$path"
34651
34652  windows_path="$new_path"
34653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34654    unix_path=`$CYGPATH -u "$windows_path"`
34655    new_path="$unix_path"
34656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34658    new_path="$unix_path"
34659  fi
34660
34661    fi
34662
34663    if test "x$new_path" = x; then
34664      # It's still not found. Now this is an unrecoverable error.
34665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34666$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34667      has_space=`$ECHO "$complete" | $GREP " "`
34668      if test "x$has_space" != x; then
34669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34671      fi
34672      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34673    fi
34674  fi
34675
34676  # Now new_path has a complete unix path to the binary
34677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34678    # Keep paths in /bin as-is, but remove trailing .exe if any
34679    new_path="${new_path/%.exe/}"
34680    # Do not save /bin paths to all_fixpath_prefixes!
34681  else
34682    # Not in mixed or Windows style, start by that.
34683    new_path=`cmd //c echo $new_path`
34684
34685  input_path="$new_path"
34686  # Check if we need to convert this using DOS-style short mode. If the path
34687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34688  # take no chances and rewrite it.
34689  # Note: m4 eats our [], so we need to use [ and ] instead.
34690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34691  if test "x$has_forbidden_chars" != x; then
34692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34694  fi
34695
34696    # Output is in $new_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    # remove trailing .exe if any
34708    new_path="${new_path/%.exe/}"
34709
34710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34712  fi
34713
34714    else
34715      # We're on a unix platform. Hooray! :)
34716      # First separate the path from the arguments. This will split at the first
34717      # space.
34718      complete="$RC"
34719      path="${complete%% *}"
34720      tmp="$complete EOL"
34721      arguments="${tmp#* }"
34722
34723      # Cannot rely on the command "which" here since it doesn't always work.
34724      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34725      if test -z "$is_absolute_path"; then
34726        # Path to executable is not absolute. Find it.
34727        IFS_save="$IFS"
34728        IFS=:
34729        for p in $PATH; do
34730          if test -f "$p/$path" && test -x "$p/$path"; then
34731            new_path="$p/$path"
34732            break
34733          fi
34734        done
34735        IFS="$IFS_save"
34736      else
34737        # This is an absolute path, we can use it without further modifications.
34738        new_path="$path"
34739      fi
34740
34741      if test "x$new_path" = x; then
34742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34743$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34744        has_space=`$ECHO "$complete" | $GREP " "`
34745        if test "x$has_space" != x; then
34746          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34747$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34748        fi
34749        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34750      fi
34751    fi
34752
34753    # Now join together the path and the arguments once again
34754    if test "x$arguments" != xEOL; then
34755      new_complete="$new_path ${arguments% *}"
34756    else
34757      new_complete="$new_path"
34758    fi
34759
34760    if test "x$complete" != "x$new_complete"; then
34761      RC="$new_complete"
34762      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34763$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34764    fi
34765  fi
34766
34767    # Extract the first word of "dumpbin", so it can be a program name with args.
34768set dummy dumpbin; ac_word=$2
34769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34770$as_echo_n "checking for $ac_word... " >&6; }
34771if ${ac_cv_prog_DUMPBIN+:} false; then :
34772  $as_echo_n "(cached) " >&6
34773else
34774  if test -n "$DUMPBIN"; then
34775  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34776else
34777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34778for as_dir in $PATH
34779do
34780  IFS=$as_save_IFS
34781  test -z "$as_dir" && as_dir=.
34782    for ac_exec_ext in '' $ac_executable_extensions; do
34783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34784    ac_cv_prog_DUMPBIN="dumpbin"
34785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34786    break 2
34787  fi
34788done
34789  done
34790IFS=$as_save_IFS
34791
34792fi
34793fi
34794DUMPBIN=$ac_cv_prog_DUMPBIN
34795if test -n "$DUMPBIN"; then
34796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34797$as_echo "$DUMPBIN" >&6; }
34798else
34799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34800$as_echo "no" >&6; }
34801fi
34802
34803
34804
34805  # Only process if variable expands to non-empty
34806
34807  if test "x$DUMPBIN" != x; then
34808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34809
34810  # First separate the path from the arguments. This will split at the first
34811  # space.
34812  complete="$DUMPBIN"
34813  path="${complete%% *}"
34814  tmp="$complete EOL"
34815  arguments="${tmp#* }"
34816
34817  # Input might be given as Windows format, start by converting to
34818  # unix format.
34819  new_path=`$CYGPATH -u "$path"`
34820
34821  # Now try to locate executable using which
34822  new_path=`$WHICH "$new_path" 2> /dev/null`
34823  # bat and cmd files are not always considered executable in cygwin causing which
34824  # to not find them
34825  if test "x$new_path" = x \
34826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34828    new_path=`$CYGPATH -u "$path"`
34829  fi
34830  if test "x$new_path" = x; then
34831    # Oops. Which didn't find the executable.
34832    # The splitting of arguments from the executable at a space might have been incorrect,
34833    # since paths with space are more likely in Windows. Give it another try with the whole
34834    # argument.
34835    path="$complete"
34836    arguments="EOL"
34837    new_path=`$CYGPATH -u "$path"`
34838    new_path=`$WHICH "$new_path" 2> /dev/null`
34839    # bat and cmd files are not always considered executable in cygwin causing which
34840    # to not find them
34841    if test "x$new_path" = x \
34842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34844      new_path=`$CYGPATH -u "$path"`
34845    fi
34846    if test "x$new_path" = x; then
34847      # It's still not found. Now this is an unrecoverable error.
34848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34849$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34850      has_space=`$ECHO "$complete" | $GREP " "`
34851      if test "x$has_space" != x; then
34852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34854      fi
34855      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34856    fi
34857  fi
34858
34859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34862  # "foo.exe" is OK but "foo" is an error.
34863  #
34864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34865  # It is also a way to make sure we got the proper file name for the real test later on.
34866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34867  if test "x$test_shortpath" = x; then
34868    # Short path failed, file does not exist as specified.
34869    # Try adding .exe or .cmd
34870    if test -f "${new_path}.exe"; then
34871      input_to_shortpath="${new_path}.exe"
34872    elif test -f "${new_path}.cmd"; then
34873      input_to_shortpath="${new_path}.cmd"
34874    else
34875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34876$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34879      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34880    fi
34881  else
34882    input_to_shortpath="$new_path"
34883  fi
34884
34885  # Call helper function which possibly converts this using DOS-style short mode.
34886  # If so, the updated path is stored in $new_path.
34887  new_path="$input_to_shortpath"
34888
34889  input_path="$input_to_shortpath"
34890  # Check if we need to convert this using DOS-style short mode. If the path
34891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34892  # take no chances and rewrite it.
34893  # Note: m4 eats our [], so we need to use [ and ] instead.
34894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34895  if test "x$has_forbidden_chars" != x; then
34896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34900      # Going to short mode and back again did indeed matter. Since short mode is
34901      # case insensitive, let's make it lowercase to improve readability.
34902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34903      # Now convert it back to Unix-style (cygpath)
34904      input_path=`$CYGPATH -u "$shortmode_path"`
34905      new_path="$input_path"
34906    fi
34907  fi
34908
34909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34910  if test "x$test_cygdrive_prefix" = x; then
34911    # As a simple fix, exclude /usr/bin since it's not a real path.
34912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34914      # a path prefixed by /cygdrive for fixpath to work.
34915      new_path="$CYGWIN_ROOT_PATH$input_path"
34916    fi
34917  fi
34918
34919  # remove trailing .exe if any
34920  new_path="${new_path/%.exe/}"
34921
34922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34923
34924  # First separate the path from the arguments. This will split at the first
34925  # space.
34926  complete="$DUMPBIN"
34927  path="${complete%% *}"
34928  tmp="$complete EOL"
34929  arguments="${tmp#* }"
34930
34931  # Input might be given as Windows format, start by converting to
34932  # unix format.
34933  new_path="$path"
34934
34935  windows_path="$new_path"
34936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34937    unix_path=`$CYGPATH -u "$windows_path"`
34938    new_path="$unix_path"
34939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34941    new_path="$unix_path"
34942  fi
34943
34944
34945  # Now try to locate executable using which
34946  new_path=`$WHICH "$new_path" 2> /dev/null`
34947
34948  if test "x$new_path" = x; then
34949    # Oops. Which didn't find the executable.
34950    # The splitting of arguments from the executable at a space might have been incorrect,
34951    # since paths with space are more likely in Windows. Give it another try with the whole
34952    # argument.
34953    path="$complete"
34954    arguments="EOL"
34955    new_path="$path"
34956
34957  windows_path="$new_path"
34958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34959    unix_path=`$CYGPATH -u "$windows_path"`
34960    new_path="$unix_path"
34961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34963    new_path="$unix_path"
34964  fi
34965
34966
34967    new_path=`$WHICH "$new_path" 2> /dev/null`
34968    # bat and cmd files are not always considered executable in MSYS causing which
34969    # to not find them
34970    if test "x$new_path" = x \
34971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34973      new_path="$path"
34974
34975  windows_path="$new_path"
34976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34977    unix_path=`$CYGPATH -u "$windows_path"`
34978    new_path="$unix_path"
34979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34981    new_path="$unix_path"
34982  fi
34983
34984    fi
34985
34986    if test "x$new_path" = x; then
34987      # It's still not found. Now this is an unrecoverable error.
34988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34989$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34990      has_space=`$ECHO "$complete" | $GREP " "`
34991      if test "x$has_space" != x; then
34992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34994      fi
34995      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34996    fi
34997  fi
34998
34999  # Now new_path has a complete unix path to the binary
35000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35001    # Keep paths in /bin as-is, but remove trailing .exe if any
35002    new_path="${new_path/%.exe/}"
35003    # Do not save /bin paths to all_fixpath_prefixes!
35004  else
35005    # Not in mixed or Windows style, start by that.
35006    new_path=`cmd //c echo $new_path`
35007
35008  input_path="$new_path"
35009  # Check if we need to convert this using DOS-style short mode. If the path
35010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35011  # take no chances and rewrite it.
35012  # Note: m4 eats our [], so we need to use [ and ] instead.
35013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35014  if test "x$has_forbidden_chars" != x; then
35015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35017  fi
35018
35019    # Output is in $new_path
35020
35021  windows_path="$new_path"
35022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35023    unix_path=`$CYGPATH -u "$windows_path"`
35024    new_path="$unix_path"
35025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35027    new_path="$unix_path"
35028  fi
35029
35030    # remove trailing .exe if any
35031    new_path="${new_path/%.exe/}"
35032
35033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35035  fi
35036
35037    else
35038      # We're on a unix platform. Hooray! :)
35039      # First separate the path from the arguments. This will split at the first
35040      # space.
35041      complete="$DUMPBIN"
35042      path="${complete%% *}"
35043      tmp="$complete EOL"
35044      arguments="${tmp#* }"
35045
35046      # Cannot rely on the command "which" here since it doesn't always work.
35047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35048      if test -z "$is_absolute_path"; then
35049        # Path to executable is not absolute. Find it.
35050        IFS_save="$IFS"
35051        IFS=:
35052        for p in $PATH; do
35053          if test -f "$p/$path" && test -x "$p/$path"; then
35054            new_path="$p/$path"
35055            break
35056          fi
35057        done
35058        IFS="$IFS_save"
35059      else
35060        # This is an absolute path, we can use it without further modifications.
35061        new_path="$path"
35062      fi
35063
35064      if test "x$new_path" = x; then
35065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35066$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35067        has_space=`$ECHO "$complete" | $GREP " "`
35068        if test "x$has_space" != x; then
35069          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35070$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35071        fi
35072        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35073      fi
35074    fi
35075
35076    # Now join together the path and the arguments once again
35077    if test "x$arguments" != xEOL; then
35078      new_complete="$new_path ${arguments% *}"
35079    else
35080      new_complete="$new_path"
35081    fi
35082
35083    if test "x$complete" != "x$new_complete"; then
35084      DUMPBIN="$new_complete"
35085      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35086$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35087    fi
35088  fi
35089
35090    # We need to check for 'msbuild.exe' because at the place where we expect to
35091    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35092    # won't find the 'msbuild.exe' executable in that case (and the
35093    # 'ac_executable_extensions' is unusable due to performance reasons).
35094    # Notice that we intentionally don't fix up the path to MSBUILD because we
35095    # will call it in a DOS shell during freetype detection on Windows (see
35096    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35097    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35098set dummy msbuild.exe; ac_word=$2
35099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35100$as_echo_n "checking for $ac_word... " >&6; }
35101if ${ac_cv_prog_MSBUILD+:} false; then :
35102  $as_echo_n "(cached) " >&6
35103else
35104  if test -n "$MSBUILD"; then
35105  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35106else
35107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35108for as_dir in $PATH
35109do
35110  IFS=$as_save_IFS
35111  test -z "$as_dir" && as_dir=.
35112    for ac_exec_ext in '' $ac_executable_extensions; do
35113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35114    ac_cv_prog_MSBUILD="msbuild.exe"
35115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35116    break 2
35117  fi
35118done
35119  done
35120IFS=$as_save_IFS
35121
35122fi
35123fi
35124MSBUILD=$ac_cv_prog_MSBUILD
35125if test -n "$MSBUILD"; then
35126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35127$as_echo "$MSBUILD" >&6; }
35128else
35129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35130$as_echo "no" >&6; }
35131fi
35132
35133
35134  fi
35135
35136  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35137
35138
35139  # Publish this variable in the help.
35140
35141
35142  if test "x$STRIP" = x; then
35143    # The variable is not set by user, try to locate tool using the code snippet
35144    for ac_prog in strip
35145do
35146  # Extract the first word of "$ac_prog", so it can be a program name with args.
35147set dummy $ac_prog; ac_word=$2
35148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35149$as_echo_n "checking for $ac_word... " >&6; }
35150if ${ac_cv_path_STRIP+:} false; then :
35151  $as_echo_n "(cached) " >&6
35152else
35153  case $STRIP in
35154  [\\/]* | ?:[\\/]*)
35155  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35156  ;;
35157  *)
35158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35159for as_dir in $PATH
35160do
35161  IFS=$as_save_IFS
35162  test -z "$as_dir" && as_dir=.
35163    for ac_exec_ext in '' $ac_executable_extensions; do
35164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35165    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35167    break 2
35168  fi
35169done
35170  done
35171IFS=$as_save_IFS
35172
35173  ;;
35174esac
35175fi
35176STRIP=$ac_cv_path_STRIP
35177if test -n "$STRIP"; then
35178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35179$as_echo "$STRIP" >&6; }
35180else
35181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35182$as_echo "no" >&6; }
35183fi
35184
35185
35186  test -n "$STRIP" && break
35187done
35188
35189  else
35190    # The variable is set, but is it from the command line or the environment?
35191
35192    # Try to remove the string !STRIP! from our list.
35193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35195      # If it failed, the variable was not from the command line. Ignore it,
35196      # but warn the user (except for BASH, which is always set by the calling BASH).
35197      if test "xSTRIP" != xBASH; then
35198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35199$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35200      fi
35201      # Try to locate tool using the code snippet
35202      for ac_prog in strip
35203do
35204  # Extract the first word of "$ac_prog", so it can be a program name with args.
35205set dummy $ac_prog; ac_word=$2
35206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35207$as_echo_n "checking for $ac_word... " >&6; }
35208if ${ac_cv_path_STRIP+:} false; then :
35209  $as_echo_n "(cached) " >&6
35210else
35211  case $STRIP in
35212  [\\/]* | ?:[\\/]*)
35213  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35214  ;;
35215  *)
35216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35217for as_dir in $PATH
35218do
35219  IFS=$as_save_IFS
35220  test -z "$as_dir" && as_dir=.
35221    for ac_exec_ext in '' $ac_executable_extensions; do
35222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35223    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35225    break 2
35226  fi
35227done
35228  done
35229IFS=$as_save_IFS
35230
35231  ;;
35232esac
35233fi
35234STRIP=$ac_cv_path_STRIP
35235if test -n "$STRIP"; then
35236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35237$as_echo "$STRIP" >&6; }
35238else
35239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35240$as_echo "no" >&6; }
35241fi
35242
35243
35244  test -n "$STRIP" && break
35245done
35246
35247    else
35248      # If it succeeded, then it was overridden by the user. We will use it
35249      # for the tool.
35250
35251      # First remove it from the list of overridden variables, so we can test
35252      # for unknown variables in the end.
35253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35254
35255      # Check if the provided tool contains a complete path.
35256      tool_specified="$STRIP"
35257      tool_basename="${tool_specified##*/}"
35258      if test "x$tool_basename" = "x$tool_specified"; then
35259        # A command without a complete path is provided, search $PATH.
35260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35261$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35262        # Extract the first word of "$tool_basename", so it can be a program name with args.
35263set dummy $tool_basename; ac_word=$2
35264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35265$as_echo_n "checking for $ac_word... " >&6; }
35266if ${ac_cv_path_STRIP+:} false; then :
35267  $as_echo_n "(cached) " >&6
35268else
35269  case $STRIP in
35270  [\\/]* | ?:[\\/]*)
35271  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35272  ;;
35273  *)
35274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35275for as_dir in $PATH
35276do
35277  IFS=$as_save_IFS
35278  test -z "$as_dir" && as_dir=.
35279    for ac_exec_ext in '' $ac_executable_extensions; do
35280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35281    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35283    break 2
35284  fi
35285done
35286  done
35287IFS=$as_save_IFS
35288
35289  ;;
35290esac
35291fi
35292STRIP=$ac_cv_path_STRIP
35293if test -n "$STRIP"; then
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35295$as_echo "$STRIP" >&6; }
35296else
35297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35298$as_echo "no" >&6; }
35299fi
35300
35301
35302        if test "x$STRIP" = x; then
35303          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35304        fi
35305      else
35306        # Otherwise we believe it is a complete path. Use it as it is.
35307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35308$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35310$as_echo_n "checking for STRIP... " >&6; }
35311        if test ! -x "$tool_specified"; then
35312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35313$as_echo "not found" >&6; }
35314          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35315        fi
35316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35317$as_echo "$tool_specified" >&6; }
35318      fi
35319    fi
35320  fi
35321
35322
35323
35324  # Only process if variable expands to non-empty
35325
35326  if test "x$STRIP" != x; then
35327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35328
35329  # First separate the path from the arguments. This will split at the first
35330  # space.
35331  complete="$STRIP"
35332  path="${complete%% *}"
35333  tmp="$complete EOL"
35334  arguments="${tmp#* }"
35335
35336  # Input might be given as Windows format, start by converting to
35337  # unix format.
35338  new_path=`$CYGPATH -u "$path"`
35339
35340  # Now try to locate executable using which
35341  new_path=`$WHICH "$new_path" 2> /dev/null`
35342  # bat and cmd files are not always considered executable in cygwin causing which
35343  # to not find them
35344  if test "x$new_path" = x \
35345      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35346      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35347    new_path=`$CYGPATH -u "$path"`
35348  fi
35349  if test "x$new_path" = x; then
35350    # Oops. Which didn't find the executable.
35351    # The splitting of arguments from the executable at a space might have been incorrect,
35352    # since paths with space are more likely in Windows. Give it another try with the whole
35353    # argument.
35354    path="$complete"
35355    arguments="EOL"
35356    new_path=`$CYGPATH -u "$path"`
35357    new_path=`$WHICH "$new_path" 2> /dev/null`
35358    # bat and cmd files are not always considered executable in cygwin causing which
35359    # to not find them
35360    if test "x$new_path" = x \
35361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35363      new_path=`$CYGPATH -u "$path"`
35364    fi
35365    if test "x$new_path" = x; then
35366      # It's still not found. Now this is an unrecoverable error.
35367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35368$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35369      has_space=`$ECHO "$complete" | $GREP " "`
35370      if test "x$has_space" != x; then
35371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35373      fi
35374      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35375    fi
35376  fi
35377
35378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35381  # "foo.exe" is OK but "foo" is an error.
35382  #
35383  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35384  # It is also a way to make sure we got the proper file name for the real test later on.
35385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35386  if test "x$test_shortpath" = x; then
35387    # Short path failed, file does not exist as specified.
35388    # Try adding .exe or .cmd
35389    if test -f "${new_path}.exe"; then
35390      input_to_shortpath="${new_path}.exe"
35391    elif test -f "${new_path}.cmd"; then
35392      input_to_shortpath="${new_path}.cmd"
35393    else
35394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35395$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35398      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35399    fi
35400  else
35401    input_to_shortpath="$new_path"
35402  fi
35403
35404  # Call helper function which possibly converts this using DOS-style short mode.
35405  # If so, the updated path is stored in $new_path.
35406  new_path="$input_to_shortpath"
35407
35408  input_path="$input_to_shortpath"
35409  # Check if we need to convert this using DOS-style short mode. If the path
35410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35411  # take no chances and rewrite it.
35412  # Note: m4 eats our [], so we need to use [ and ] instead.
35413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35414  if test "x$has_forbidden_chars" != x; then
35415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35419      # Going to short mode and back again did indeed matter. Since short mode is
35420      # case insensitive, let's make it lowercase to improve readability.
35421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35422      # Now convert it back to Unix-style (cygpath)
35423      input_path=`$CYGPATH -u "$shortmode_path"`
35424      new_path="$input_path"
35425    fi
35426  fi
35427
35428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35429  if test "x$test_cygdrive_prefix" = x; then
35430    # As a simple fix, exclude /usr/bin since it's not a real path.
35431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35433      # a path prefixed by /cygdrive for fixpath to work.
35434      new_path="$CYGWIN_ROOT_PATH$input_path"
35435    fi
35436  fi
35437
35438  # remove trailing .exe if any
35439  new_path="${new_path/%.exe/}"
35440
35441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35442
35443  # First separate the path from the arguments. This will split at the first
35444  # space.
35445  complete="$STRIP"
35446  path="${complete%% *}"
35447  tmp="$complete EOL"
35448  arguments="${tmp#* }"
35449
35450  # Input might be given as Windows format, start by converting to
35451  # unix format.
35452  new_path="$path"
35453
35454  windows_path="$new_path"
35455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35456    unix_path=`$CYGPATH -u "$windows_path"`
35457    new_path="$unix_path"
35458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35460    new_path="$unix_path"
35461  fi
35462
35463
35464  # Now try to locate executable using which
35465  new_path=`$WHICH "$new_path" 2> /dev/null`
35466
35467  if test "x$new_path" = x; then
35468    # Oops. Which didn't find the executable.
35469    # The splitting of arguments from the executable at a space might have been incorrect,
35470    # since paths with space are more likely in Windows. Give it another try with the whole
35471    # argument.
35472    path="$complete"
35473    arguments="EOL"
35474    new_path="$path"
35475
35476  windows_path="$new_path"
35477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35478    unix_path=`$CYGPATH -u "$windows_path"`
35479    new_path="$unix_path"
35480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35482    new_path="$unix_path"
35483  fi
35484
35485
35486    new_path=`$WHICH "$new_path" 2> /dev/null`
35487    # bat and cmd files are not always considered executable in MSYS causing which
35488    # to not find them
35489    if test "x$new_path" = x \
35490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35492      new_path="$path"
35493
35494  windows_path="$new_path"
35495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35496    unix_path=`$CYGPATH -u "$windows_path"`
35497    new_path="$unix_path"
35498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35500    new_path="$unix_path"
35501  fi
35502
35503    fi
35504
35505    if test "x$new_path" = x; then
35506      # It's still not found. Now this is an unrecoverable error.
35507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35508$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35509      has_space=`$ECHO "$complete" | $GREP " "`
35510      if test "x$has_space" != x; then
35511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35513      fi
35514      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35515    fi
35516  fi
35517
35518  # Now new_path has a complete unix path to the binary
35519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35520    # Keep paths in /bin as-is, but remove trailing .exe if any
35521    new_path="${new_path/%.exe/}"
35522    # Do not save /bin paths to all_fixpath_prefixes!
35523  else
35524    # Not in mixed or Windows style, start by that.
35525    new_path=`cmd //c echo $new_path`
35526
35527  input_path="$new_path"
35528  # Check if we need to convert this using DOS-style short mode. If the path
35529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35530  # take no chances and rewrite it.
35531  # Note: m4 eats our [], so we need to use [ and ] instead.
35532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35533  if test "x$has_forbidden_chars" != x; then
35534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35536  fi
35537
35538    # Output is in $new_path
35539
35540  windows_path="$new_path"
35541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35542    unix_path=`$CYGPATH -u "$windows_path"`
35543    new_path="$unix_path"
35544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35546    new_path="$unix_path"
35547  fi
35548
35549    # remove trailing .exe if any
35550    new_path="${new_path/%.exe/}"
35551
35552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35554  fi
35555
35556    else
35557      # We're on a unix platform. Hooray! :)
35558      # First separate the path from the arguments. This will split at the first
35559      # space.
35560      complete="$STRIP"
35561      path="${complete%% *}"
35562      tmp="$complete EOL"
35563      arguments="${tmp#* }"
35564
35565      # Cannot rely on the command "which" here since it doesn't always work.
35566      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35567      if test -z "$is_absolute_path"; then
35568        # Path to executable is not absolute. Find it.
35569        IFS_save="$IFS"
35570        IFS=:
35571        for p in $PATH; do
35572          if test -f "$p/$path" && test -x "$p/$path"; then
35573            new_path="$p/$path"
35574            break
35575          fi
35576        done
35577        IFS="$IFS_save"
35578      else
35579        # This is an absolute path, we can use it without further modifications.
35580        new_path="$path"
35581      fi
35582
35583      if test "x$new_path" = x; then
35584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35585$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35586        has_space=`$ECHO "$complete" | $GREP " "`
35587        if test "x$has_space" != x; then
35588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35590        fi
35591        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35592      fi
35593    fi
35594
35595    # Now join together the path and the arguments once again
35596    if test "x$arguments" != xEOL; then
35597      new_complete="$new_path ${arguments% *}"
35598    else
35599      new_complete="$new_path"
35600    fi
35601
35602    if test "x$complete" != "x$new_complete"; then
35603      STRIP="$new_complete"
35604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35605$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35606    fi
35607  fi
35608
35609
35610
35611  # Publish this variable in the help.
35612
35613
35614  if test "x$NM" = x; then
35615    # The variable is not set by user, try to locate tool using the code snippet
35616    for ac_prog in nm
35617do
35618  # Extract the first word of "$ac_prog", so it can be a program name with args.
35619set dummy $ac_prog; ac_word=$2
35620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35621$as_echo_n "checking for $ac_word... " >&6; }
35622if ${ac_cv_path_NM+:} false; then :
35623  $as_echo_n "(cached) " >&6
35624else
35625  case $NM in
35626  [\\/]* | ?:[\\/]*)
35627  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35628  ;;
35629  *)
35630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35631for as_dir in $PATH
35632do
35633  IFS=$as_save_IFS
35634  test -z "$as_dir" && as_dir=.
35635    for ac_exec_ext in '' $ac_executable_extensions; do
35636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35637    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35639    break 2
35640  fi
35641done
35642  done
35643IFS=$as_save_IFS
35644
35645  ;;
35646esac
35647fi
35648NM=$ac_cv_path_NM
35649if test -n "$NM"; then
35650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35651$as_echo "$NM" >&6; }
35652else
35653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35654$as_echo "no" >&6; }
35655fi
35656
35657
35658  test -n "$NM" && break
35659done
35660
35661  else
35662    # The variable is set, but is it from the command line or the environment?
35663
35664    # Try to remove the string !NM! from our list.
35665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35667      # If it failed, the variable was not from the command line. Ignore it,
35668      # but warn the user (except for BASH, which is always set by the calling BASH).
35669      if test "xNM" != xBASH; then
35670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35671$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35672      fi
35673      # Try to locate tool using the code snippet
35674      for ac_prog in nm
35675do
35676  # Extract the first word of "$ac_prog", so it can be a program name with args.
35677set dummy $ac_prog; ac_word=$2
35678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35679$as_echo_n "checking for $ac_word... " >&6; }
35680if ${ac_cv_path_NM+:} false; then :
35681  $as_echo_n "(cached) " >&6
35682else
35683  case $NM in
35684  [\\/]* | ?:[\\/]*)
35685  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35686  ;;
35687  *)
35688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35689for as_dir in $PATH
35690do
35691  IFS=$as_save_IFS
35692  test -z "$as_dir" && as_dir=.
35693    for ac_exec_ext in '' $ac_executable_extensions; do
35694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35695    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35697    break 2
35698  fi
35699done
35700  done
35701IFS=$as_save_IFS
35702
35703  ;;
35704esac
35705fi
35706NM=$ac_cv_path_NM
35707if test -n "$NM"; then
35708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35709$as_echo "$NM" >&6; }
35710else
35711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35712$as_echo "no" >&6; }
35713fi
35714
35715
35716  test -n "$NM" && break
35717done
35718
35719    else
35720      # If it succeeded, then it was overridden by the user. We will use it
35721      # for the tool.
35722
35723      # First remove it from the list of overridden variables, so we can test
35724      # for unknown variables in the end.
35725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35726
35727      # Check if the provided tool contains a complete path.
35728      tool_specified="$NM"
35729      tool_basename="${tool_specified##*/}"
35730      if test "x$tool_basename" = "x$tool_specified"; then
35731        # A command without a complete path is provided, search $PATH.
35732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35733$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35734        # Extract the first word of "$tool_basename", so it can be a program name with args.
35735set dummy $tool_basename; ac_word=$2
35736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35737$as_echo_n "checking for $ac_word... " >&6; }
35738if ${ac_cv_path_NM+:} false; then :
35739  $as_echo_n "(cached) " >&6
35740else
35741  case $NM in
35742  [\\/]* | ?:[\\/]*)
35743  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35744  ;;
35745  *)
35746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35747for as_dir in $PATH
35748do
35749  IFS=$as_save_IFS
35750  test -z "$as_dir" && as_dir=.
35751    for ac_exec_ext in '' $ac_executable_extensions; do
35752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35753    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35755    break 2
35756  fi
35757done
35758  done
35759IFS=$as_save_IFS
35760
35761  ;;
35762esac
35763fi
35764NM=$ac_cv_path_NM
35765if test -n "$NM"; then
35766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35767$as_echo "$NM" >&6; }
35768else
35769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35770$as_echo "no" >&6; }
35771fi
35772
35773
35774        if test "x$NM" = x; then
35775          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35776        fi
35777      else
35778        # Otherwise we believe it is a complete path. Use it as it is.
35779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35780$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35782$as_echo_n "checking for NM... " >&6; }
35783        if test ! -x "$tool_specified"; then
35784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35785$as_echo "not found" >&6; }
35786          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35787        fi
35788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35789$as_echo "$tool_specified" >&6; }
35790      fi
35791    fi
35792  fi
35793
35794
35795
35796  # Only process if variable expands to non-empty
35797
35798  if test "x$NM" != x; then
35799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35800
35801  # First separate the path from the arguments. This will split at the first
35802  # space.
35803  complete="$NM"
35804  path="${complete%% *}"
35805  tmp="$complete EOL"
35806  arguments="${tmp#* }"
35807
35808  # Input might be given as Windows format, start by converting to
35809  # unix format.
35810  new_path=`$CYGPATH -u "$path"`
35811
35812  # Now try to locate executable using which
35813  new_path=`$WHICH "$new_path" 2> /dev/null`
35814  # bat and cmd files are not always considered executable in cygwin causing which
35815  # to not find them
35816  if test "x$new_path" = x \
35817      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35818      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35819    new_path=`$CYGPATH -u "$path"`
35820  fi
35821  if test "x$new_path" = x; then
35822    # Oops. Which didn't find the executable.
35823    # The splitting of arguments from the executable at a space might have been incorrect,
35824    # since paths with space are more likely in Windows. Give it another try with the whole
35825    # argument.
35826    path="$complete"
35827    arguments="EOL"
35828    new_path=`$CYGPATH -u "$path"`
35829    new_path=`$WHICH "$new_path" 2> /dev/null`
35830    # bat and cmd files are not always considered executable in cygwin causing which
35831    # to not find them
35832    if test "x$new_path" = x \
35833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35835      new_path=`$CYGPATH -u "$path"`
35836    fi
35837    if test "x$new_path" = x; then
35838      # It's still not found. Now this is an unrecoverable error.
35839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35840$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35841      has_space=`$ECHO "$complete" | $GREP " "`
35842      if test "x$has_space" != x; then
35843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35845      fi
35846      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35847    fi
35848  fi
35849
35850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35853  # "foo.exe" is OK but "foo" is an error.
35854  #
35855  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35856  # It is also a way to make sure we got the proper file name for the real test later on.
35857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35858  if test "x$test_shortpath" = x; then
35859    # Short path failed, file does not exist as specified.
35860    # Try adding .exe or .cmd
35861    if test -f "${new_path}.exe"; then
35862      input_to_shortpath="${new_path}.exe"
35863    elif test -f "${new_path}.cmd"; then
35864      input_to_shortpath="${new_path}.cmd"
35865    else
35866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35867$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35870      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35871    fi
35872  else
35873    input_to_shortpath="$new_path"
35874  fi
35875
35876  # Call helper function which possibly converts this using DOS-style short mode.
35877  # If so, the updated path is stored in $new_path.
35878  new_path="$input_to_shortpath"
35879
35880  input_path="$input_to_shortpath"
35881  # Check if we need to convert this using DOS-style short mode. If the path
35882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35883  # take no chances and rewrite it.
35884  # Note: m4 eats our [], so we need to use [ and ] instead.
35885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35886  if test "x$has_forbidden_chars" != x; then
35887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35891      # Going to short mode and back again did indeed matter. Since short mode is
35892      # case insensitive, let's make it lowercase to improve readability.
35893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35894      # Now convert it back to Unix-style (cygpath)
35895      input_path=`$CYGPATH -u "$shortmode_path"`
35896      new_path="$input_path"
35897    fi
35898  fi
35899
35900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35901  if test "x$test_cygdrive_prefix" = x; then
35902    # As a simple fix, exclude /usr/bin since it's not a real path.
35903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35905      # a path prefixed by /cygdrive for fixpath to work.
35906      new_path="$CYGWIN_ROOT_PATH$input_path"
35907    fi
35908  fi
35909
35910  # remove trailing .exe if any
35911  new_path="${new_path/%.exe/}"
35912
35913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35914
35915  # First separate the path from the arguments. This will split at the first
35916  # space.
35917  complete="$NM"
35918  path="${complete%% *}"
35919  tmp="$complete EOL"
35920  arguments="${tmp#* }"
35921
35922  # Input might be given as Windows format, start by converting to
35923  # unix format.
35924  new_path="$path"
35925
35926  windows_path="$new_path"
35927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35928    unix_path=`$CYGPATH -u "$windows_path"`
35929    new_path="$unix_path"
35930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35932    new_path="$unix_path"
35933  fi
35934
35935
35936  # Now try to locate executable using which
35937  new_path=`$WHICH "$new_path" 2> /dev/null`
35938
35939  if test "x$new_path" = x; then
35940    # Oops. Which didn't find the executable.
35941    # The splitting of arguments from the executable at a space might have been incorrect,
35942    # since paths with space are more likely in Windows. Give it another try with the whole
35943    # argument.
35944    path="$complete"
35945    arguments="EOL"
35946    new_path="$path"
35947
35948  windows_path="$new_path"
35949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35950    unix_path=`$CYGPATH -u "$windows_path"`
35951    new_path="$unix_path"
35952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35954    new_path="$unix_path"
35955  fi
35956
35957
35958    new_path=`$WHICH "$new_path" 2> /dev/null`
35959    # bat and cmd files are not always considered executable in MSYS causing which
35960    # to not find them
35961    if test "x$new_path" = x \
35962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35964      new_path="$path"
35965
35966  windows_path="$new_path"
35967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35968    unix_path=`$CYGPATH -u "$windows_path"`
35969    new_path="$unix_path"
35970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35972    new_path="$unix_path"
35973  fi
35974
35975    fi
35976
35977    if test "x$new_path" = x; then
35978      # It's still not found. Now this is an unrecoverable error.
35979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35980$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35981      has_space=`$ECHO "$complete" | $GREP " "`
35982      if test "x$has_space" != x; then
35983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35985      fi
35986      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35987    fi
35988  fi
35989
35990  # Now new_path has a complete unix path to the binary
35991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35992    # Keep paths in /bin as-is, but remove trailing .exe if any
35993    new_path="${new_path/%.exe/}"
35994    # Do not save /bin paths to all_fixpath_prefixes!
35995  else
35996    # Not in mixed or Windows style, start by that.
35997    new_path=`cmd //c echo $new_path`
35998
35999  input_path="$new_path"
36000  # Check if we need to convert this using DOS-style short mode. If the path
36001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36002  # take no chances and rewrite it.
36003  # Note: m4 eats our [], so we need to use [ and ] instead.
36004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36005  if test "x$has_forbidden_chars" != x; then
36006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36008  fi
36009
36010    # Output is in $new_path
36011
36012  windows_path="$new_path"
36013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36014    unix_path=`$CYGPATH -u "$windows_path"`
36015    new_path="$unix_path"
36016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36018    new_path="$unix_path"
36019  fi
36020
36021    # remove trailing .exe if any
36022    new_path="${new_path/%.exe/}"
36023
36024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36026  fi
36027
36028    else
36029      # We're on a unix platform. Hooray! :)
36030      # First separate the path from the arguments. This will split at the first
36031      # space.
36032      complete="$NM"
36033      path="${complete%% *}"
36034      tmp="$complete EOL"
36035      arguments="${tmp#* }"
36036
36037      # Cannot rely on the command "which" here since it doesn't always work.
36038      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36039      if test -z "$is_absolute_path"; then
36040        # Path to executable is not absolute. Find it.
36041        IFS_save="$IFS"
36042        IFS=:
36043        for p in $PATH; do
36044          if test -f "$p/$path" && test -x "$p/$path"; then
36045            new_path="$p/$path"
36046            break
36047          fi
36048        done
36049        IFS="$IFS_save"
36050      else
36051        # This is an absolute path, we can use it without further modifications.
36052        new_path="$path"
36053      fi
36054
36055      if test "x$new_path" = x; then
36056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36057$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36058        has_space=`$ECHO "$complete" | $GREP " "`
36059        if test "x$has_space" != x; then
36060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36062        fi
36063        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36064      fi
36065    fi
36066
36067    # Now join together the path and the arguments once again
36068    if test "x$arguments" != xEOL; then
36069      new_complete="$new_path ${arguments% *}"
36070    else
36071      new_complete="$new_path"
36072    fi
36073
36074    if test "x$complete" != "x$new_complete"; then
36075      NM="$new_complete"
36076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36077$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36078    fi
36079  fi
36080
36081
36082
36083  # Publish this variable in the help.
36084
36085
36086  if test "x$GNM" = x; then
36087    # The variable is not set by user, try to locate tool using the code snippet
36088    for ac_prog in gnm
36089do
36090  # Extract the first word of "$ac_prog", so it can be a program name with args.
36091set dummy $ac_prog; ac_word=$2
36092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36093$as_echo_n "checking for $ac_word... " >&6; }
36094if ${ac_cv_path_GNM+:} false; then :
36095  $as_echo_n "(cached) " >&6
36096else
36097  case $GNM in
36098  [\\/]* | ?:[\\/]*)
36099  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36100  ;;
36101  *)
36102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36103for as_dir in $PATH
36104do
36105  IFS=$as_save_IFS
36106  test -z "$as_dir" && as_dir=.
36107    for ac_exec_ext in '' $ac_executable_extensions; do
36108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36109    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36111    break 2
36112  fi
36113done
36114  done
36115IFS=$as_save_IFS
36116
36117  ;;
36118esac
36119fi
36120GNM=$ac_cv_path_GNM
36121if test -n "$GNM"; then
36122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36123$as_echo "$GNM" >&6; }
36124else
36125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36126$as_echo "no" >&6; }
36127fi
36128
36129
36130  test -n "$GNM" && break
36131done
36132
36133  else
36134    # The variable is set, but is it from the command line or the environment?
36135
36136    # Try to remove the string !GNM! from our list.
36137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36139      # If it failed, the variable was not from the command line. Ignore it,
36140      # but warn the user (except for BASH, which is always set by the calling BASH).
36141      if test "xGNM" != xBASH; then
36142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36143$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36144      fi
36145      # Try to locate tool using the code snippet
36146      for ac_prog in gnm
36147do
36148  # Extract the first word of "$ac_prog", so it can be a program name with args.
36149set dummy $ac_prog; ac_word=$2
36150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36151$as_echo_n "checking for $ac_word... " >&6; }
36152if ${ac_cv_path_GNM+:} false; then :
36153  $as_echo_n "(cached) " >&6
36154else
36155  case $GNM in
36156  [\\/]* | ?:[\\/]*)
36157  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36158  ;;
36159  *)
36160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36161for as_dir in $PATH
36162do
36163  IFS=$as_save_IFS
36164  test -z "$as_dir" && as_dir=.
36165    for ac_exec_ext in '' $ac_executable_extensions; do
36166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36167    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36169    break 2
36170  fi
36171done
36172  done
36173IFS=$as_save_IFS
36174
36175  ;;
36176esac
36177fi
36178GNM=$ac_cv_path_GNM
36179if test -n "$GNM"; then
36180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36181$as_echo "$GNM" >&6; }
36182else
36183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36184$as_echo "no" >&6; }
36185fi
36186
36187
36188  test -n "$GNM" && break
36189done
36190
36191    else
36192      # If it succeeded, then it was overridden by the user. We will use it
36193      # for the tool.
36194
36195      # First remove it from the list of overridden variables, so we can test
36196      # for unknown variables in the end.
36197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36198
36199      # Check if the provided tool contains a complete path.
36200      tool_specified="$GNM"
36201      tool_basename="${tool_specified##*/}"
36202      if test "x$tool_basename" = "x$tool_specified"; then
36203        # A command without a complete path is provided, search $PATH.
36204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36205$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36206        # Extract the first word of "$tool_basename", so it can be a program name with args.
36207set dummy $tool_basename; ac_word=$2
36208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36209$as_echo_n "checking for $ac_word... " >&6; }
36210if ${ac_cv_path_GNM+:} false; then :
36211  $as_echo_n "(cached) " >&6
36212else
36213  case $GNM in
36214  [\\/]* | ?:[\\/]*)
36215  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36216  ;;
36217  *)
36218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36219for as_dir in $PATH
36220do
36221  IFS=$as_save_IFS
36222  test -z "$as_dir" && as_dir=.
36223    for ac_exec_ext in '' $ac_executable_extensions; do
36224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36225    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36227    break 2
36228  fi
36229done
36230  done
36231IFS=$as_save_IFS
36232
36233  ;;
36234esac
36235fi
36236GNM=$ac_cv_path_GNM
36237if test -n "$GNM"; then
36238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36239$as_echo "$GNM" >&6; }
36240else
36241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36242$as_echo "no" >&6; }
36243fi
36244
36245
36246        if test "x$GNM" = x; then
36247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36248        fi
36249      else
36250        # Otherwise we believe it is a complete path. Use it as it is.
36251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36252$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36254$as_echo_n "checking for GNM... " >&6; }
36255        if test ! -x "$tool_specified"; then
36256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36257$as_echo "not found" >&6; }
36258          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36259        fi
36260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36261$as_echo "$tool_specified" >&6; }
36262      fi
36263    fi
36264  fi
36265
36266
36267
36268  # Only process if variable expands to non-empty
36269
36270  if test "x$GNM" != x; then
36271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36272
36273  # First separate the path from the arguments. This will split at the first
36274  # space.
36275  complete="$GNM"
36276  path="${complete%% *}"
36277  tmp="$complete EOL"
36278  arguments="${tmp#* }"
36279
36280  # Input might be given as Windows format, start by converting to
36281  # unix format.
36282  new_path=`$CYGPATH -u "$path"`
36283
36284  # Now try to locate executable using which
36285  new_path=`$WHICH "$new_path" 2> /dev/null`
36286  # bat and cmd files are not always considered executable in cygwin causing which
36287  # to not find them
36288  if test "x$new_path" = x \
36289      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36290      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36291    new_path=`$CYGPATH -u "$path"`
36292  fi
36293  if test "x$new_path" = x; then
36294    # Oops. Which didn't find the executable.
36295    # The splitting of arguments from the executable at a space might have been incorrect,
36296    # since paths with space are more likely in Windows. Give it another try with the whole
36297    # argument.
36298    path="$complete"
36299    arguments="EOL"
36300    new_path=`$CYGPATH -u "$path"`
36301    new_path=`$WHICH "$new_path" 2> /dev/null`
36302    # bat and cmd files are not always considered executable in cygwin causing which
36303    # to not find them
36304    if test "x$new_path" = x \
36305        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36306        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36307      new_path=`$CYGPATH -u "$path"`
36308    fi
36309    if test "x$new_path" = x; then
36310      # It's still not found. Now this is an unrecoverable error.
36311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36312$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36313      has_space=`$ECHO "$complete" | $GREP " "`
36314      if test "x$has_space" != x; then
36315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36317      fi
36318      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36319    fi
36320  fi
36321
36322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36325  # "foo.exe" is OK but "foo" is an error.
36326  #
36327  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36328  # It is also a way to make sure we got the proper file name for the real test later on.
36329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36330  if test "x$test_shortpath" = x; then
36331    # Short path failed, file does not exist as specified.
36332    # Try adding .exe or .cmd
36333    if test -f "${new_path}.exe"; then
36334      input_to_shortpath="${new_path}.exe"
36335    elif test -f "${new_path}.cmd"; then
36336      input_to_shortpath="${new_path}.cmd"
36337    else
36338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36339$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36342      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36343    fi
36344  else
36345    input_to_shortpath="$new_path"
36346  fi
36347
36348  # Call helper function which possibly converts this using DOS-style short mode.
36349  # If so, the updated path is stored in $new_path.
36350  new_path="$input_to_shortpath"
36351
36352  input_path="$input_to_shortpath"
36353  # Check if we need to convert this using DOS-style short mode. If the path
36354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36355  # take no chances and rewrite it.
36356  # Note: m4 eats our [], so we need to use [ and ] instead.
36357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36358  if test "x$has_forbidden_chars" != x; then
36359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36363      # Going to short mode and back again did indeed matter. Since short mode is
36364      # case insensitive, let's make it lowercase to improve readability.
36365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36366      # Now convert it back to Unix-style (cygpath)
36367      input_path=`$CYGPATH -u "$shortmode_path"`
36368      new_path="$input_path"
36369    fi
36370  fi
36371
36372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36373  if test "x$test_cygdrive_prefix" = x; then
36374    # As a simple fix, exclude /usr/bin since it's not a real path.
36375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36377      # a path prefixed by /cygdrive for fixpath to work.
36378      new_path="$CYGWIN_ROOT_PATH$input_path"
36379    fi
36380  fi
36381
36382  # remove trailing .exe if any
36383  new_path="${new_path/%.exe/}"
36384
36385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36386
36387  # First separate the path from the arguments. This will split at the first
36388  # space.
36389  complete="$GNM"
36390  path="${complete%% *}"
36391  tmp="$complete EOL"
36392  arguments="${tmp#* }"
36393
36394  # Input might be given as Windows format, start by converting to
36395  # unix format.
36396  new_path="$path"
36397
36398  windows_path="$new_path"
36399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36400    unix_path=`$CYGPATH -u "$windows_path"`
36401    new_path="$unix_path"
36402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36404    new_path="$unix_path"
36405  fi
36406
36407
36408  # Now try to locate executable using which
36409  new_path=`$WHICH "$new_path" 2> /dev/null`
36410
36411  if test "x$new_path" = x; then
36412    # Oops. Which didn't find the executable.
36413    # The splitting of arguments from the executable at a space might have been incorrect,
36414    # since paths with space are more likely in Windows. Give it another try with the whole
36415    # argument.
36416    path="$complete"
36417    arguments="EOL"
36418    new_path="$path"
36419
36420  windows_path="$new_path"
36421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36422    unix_path=`$CYGPATH -u "$windows_path"`
36423    new_path="$unix_path"
36424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36426    new_path="$unix_path"
36427  fi
36428
36429
36430    new_path=`$WHICH "$new_path" 2> /dev/null`
36431    # bat and cmd files are not always considered executable in MSYS causing which
36432    # to not find them
36433    if test "x$new_path" = x \
36434        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36435        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36436      new_path="$path"
36437
36438  windows_path="$new_path"
36439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36440    unix_path=`$CYGPATH -u "$windows_path"`
36441    new_path="$unix_path"
36442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36444    new_path="$unix_path"
36445  fi
36446
36447    fi
36448
36449    if test "x$new_path" = x; then
36450      # It's still not found. Now this is an unrecoverable error.
36451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36452$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36453      has_space=`$ECHO "$complete" | $GREP " "`
36454      if test "x$has_space" != x; then
36455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36457      fi
36458      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36459    fi
36460  fi
36461
36462  # Now new_path has a complete unix path to the binary
36463  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36464    # Keep paths in /bin as-is, but remove trailing .exe if any
36465    new_path="${new_path/%.exe/}"
36466    # Do not save /bin paths to all_fixpath_prefixes!
36467  else
36468    # Not in mixed or Windows style, start by that.
36469    new_path=`cmd //c echo $new_path`
36470
36471  input_path="$new_path"
36472  # Check if we need to convert this using DOS-style short mode. If the path
36473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36474  # take no chances and rewrite it.
36475  # Note: m4 eats our [], so we need to use [ and ] instead.
36476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36477  if test "x$has_forbidden_chars" != x; then
36478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36480  fi
36481
36482    # Output is in $new_path
36483
36484  windows_path="$new_path"
36485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36486    unix_path=`$CYGPATH -u "$windows_path"`
36487    new_path="$unix_path"
36488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36490    new_path="$unix_path"
36491  fi
36492
36493    # remove trailing .exe if any
36494    new_path="${new_path/%.exe/}"
36495
36496    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36497    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36498  fi
36499
36500    else
36501      # We're on a unix platform. Hooray! :)
36502      # First separate the path from the arguments. This will split at the first
36503      # space.
36504      complete="$GNM"
36505      path="${complete%% *}"
36506      tmp="$complete EOL"
36507      arguments="${tmp#* }"
36508
36509      # Cannot rely on the command "which" here since it doesn't always work.
36510      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36511      if test -z "$is_absolute_path"; then
36512        # Path to executable is not absolute. Find it.
36513        IFS_save="$IFS"
36514        IFS=:
36515        for p in $PATH; do
36516          if test -f "$p/$path" && test -x "$p/$path"; then
36517            new_path="$p/$path"
36518            break
36519          fi
36520        done
36521        IFS="$IFS_save"
36522      else
36523        # This is an absolute path, we can use it without further modifications.
36524        new_path="$path"
36525      fi
36526
36527      if test "x$new_path" = x; then
36528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36529$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36530        has_space=`$ECHO "$complete" | $GREP " "`
36531        if test "x$has_space" != x; then
36532          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36533$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36534        fi
36535        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36536      fi
36537    fi
36538
36539    # Now join together the path and the arguments once again
36540    if test "x$arguments" != xEOL; then
36541      new_complete="$new_path ${arguments% *}"
36542    else
36543      new_complete="$new_path"
36544    fi
36545
36546    if test "x$complete" != "x$new_complete"; then
36547      GNM="$new_complete"
36548      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36549$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36550    fi
36551  fi
36552
36553  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36554    # FIXME: we should unify this with the solaris case above.
36555
36556
36557  # Publish this variable in the help.
36558
36559
36560  if test "x$STRIP" = x; then
36561    # The variable is not set by user, try to locate tool using the code snippet
36562    if test -n "$ac_tool_prefix"; then
36563  for ac_prog in strip
36564  do
36565    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36566set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36568$as_echo_n "checking for $ac_word... " >&6; }
36569if ${ac_cv_prog_STRIP+:} false; then :
36570  $as_echo_n "(cached) " >&6
36571else
36572  if test -n "$STRIP"; then
36573  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36574else
36575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36576for as_dir in $PATH
36577do
36578  IFS=$as_save_IFS
36579  test -z "$as_dir" && as_dir=.
36580    for ac_exec_ext in '' $ac_executable_extensions; do
36581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36582    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36584    break 2
36585  fi
36586done
36587  done
36588IFS=$as_save_IFS
36589
36590fi
36591fi
36592STRIP=$ac_cv_prog_STRIP
36593if test -n "$STRIP"; then
36594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36595$as_echo "$STRIP" >&6; }
36596else
36597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36598$as_echo "no" >&6; }
36599fi
36600
36601
36602    test -n "$STRIP" && break
36603  done
36604fi
36605if test -z "$STRIP"; then
36606  ac_ct_STRIP=$STRIP
36607  for ac_prog in strip
36608do
36609  # Extract the first word of "$ac_prog", so it can be a program name with args.
36610set dummy $ac_prog; ac_word=$2
36611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36612$as_echo_n "checking for $ac_word... " >&6; }
36613if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36614  $as_echo_n "(cached) " >&6
36615else
36616  if test -n "$ac_ct_STRIP"; then
36617  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36618else
36619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36620for as_dir in $PATH
36621do
36622  IFS=$as_save_IFS
36623  test -z "$as_dir" && as_dir=.
36624    for ac_exec_ext in '' $ac_executable_extensions; do
36625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36626    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36628    break 2
36629  fi
36630done
36631  done
36632IFS=$as_save_IFS
36633
36634fi
36635fi
36636ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36637if test -n "$ac_ct_STRIP"; then
36638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36639$as_echo "$ac_ct_STRIP" >&6; }
36640else
36641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36642$as_echo "no" >&6; }
36643fi
36644
36645
36646  test -n "$ac_ct_STRIP" && break
36647done
36648
36649  if test "x$ac_ct_STRIP" = x; then
36650    STRIP=""
36651  else
36652    case $cross_compiling:$ac_tool_warned in
36653yes:)
36654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36656ac_tool_warned=yes ;;
36657esac
36658    STRIP=$ac_ct_STRIP
36659  fi
36660fi
36661
36662  else
36663    # The variable is set, but is it from the command line or the environment?
36664
36665    # Try to remove the string !STRIP! from our list.
36666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36668      # If it failed, the variable was not from the command line. Ignore it,
36669      # but warn the user (except for BASH, which is always set by the calling BASH).
36670      if test "xSTRIP" != xBASH; then
36671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36672$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36673      fi
36674      # Try to locate tool using the code snippet
36675      if test -n "$ac_tool_prefix"; then
36676  for ac_prog in strip
36677  do
36678    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36679set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36681$as_echo_n "checking for $ac_word... " >&6; }
36682if ${ac_cv_prog_STRIP+:} false; then :
36683  $as_echo_n "(cached) " >&6
36684else
36685  if test -n "$STRIP"; then
36686  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36687else
36688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36689for as_dir in $PATH
36690do
36691  IFS=$as_save_IFS
36692  test -z "$as_dir" && as_dir=.
36693    for ac_exec_ext in '' $ac_executable_extensions; do
36694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36695    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36697    break 2
36698  fi
36699done
36700  done
36701IFS=$as_save_IFS
36702
36703fi
36704fi
36705STRIP=$ac_cv_prog_STRIP
36706if test -n "$STRIP"; then
36707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36708$as_echo "$STRIP" >&6; }
36709else
36710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36711$as_echo "no" >&6; }
36712fi
36713
36714
36715    test -n "$STRIP" && break
36716  done
36717fi
36718if test -z "$STRIP"; then
36719  ac_ct_STRIP=$STRIP
36720  for ac_prog in strip
36721do
36722  # Extract the first word of "$ac_prog", so it can be a program name with args.
36723set dummy $ac_prog; ac_word=$2
36724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36725$as_echo_n "checking for $ac_word... " >&6; }
36726if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36727  $as_echo_n "(cached) " >&6
36728else
36729  if test -n "$ac_ct_STRIP"; then
36730  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36731else
36732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36733for as_dir in $PATH
36734do
36735  IFS=$as_save_IFS
36736  test -z "$as_dir" && as_dir=.
36737    for ac_exec_ext in '' $ac_executable_extensions; do
36738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36739    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36741    break 2
36742  fi
36743done
36744  done
36745IFS=$as_save_IFS
36746
36747fi
36748fi
36749ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36750if test -n "$ac_ct_STRIP"; then
36751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36752$as_echo "$ac_ct_STRIP" >&6; }
36753else
36754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36755$as_echo "no" >&6; }
36756fi
36757
36758
36759  test -n "$ac_ct_STRIP" && break
36760done
36761
36762  if test "x$ac_ct_STRIP" = x; then
36763    STRIP=""
36764  else
36765    case $cross_compiling:$ac_tool_warned in
36766yes:)
36767{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36768$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36769ac_tool_warned=yes ;;
36770esac
36771    STRIP=$ac_ct_STRIP
36772  fi
36773fi
36774
36775    else
36776      # If it succeeded, then it was overridden by the user. We will use it
36777      # for the tool.
36778
36779      # First remove it from the list of overridden variables, so we can test
36780      # for unknown variables in the end.
36781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36782
36783      # Check if the provided tool contains a complete path.
36784      tool_specified="$STRIP"
36785      tool_basename="${tool_specified##*/}"
36786      if test "x$tool_basename" = "x$tool_specified"; then
36787        # A command without a complete path is provided, search $PATH.
36788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36789$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36790        # Extract the first word of "$tool_basename", so it can be a program name with args.
36791set dummy $tool_basename; ac_word=$2
36792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36793$as_echo_n "checking for $ac_word... " >&6; }
36794if ${ac_cv_path_STRIP+:} false; then :
36795  $as_echo_n "(cached) " >&6
36796else
36797  case $STRIP in
36798  [\\/]* | ?:[\\/]*)
36799  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36800  ;;
36801  *)
36802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36803for as_dir in $PATH
36804do
36805  IFS=$as_save_IFS
36806  test -z "$as_dir" && as_dir=.
36807    for ac_exec_ext in '' $ac_executable_extensions; do
36808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36809    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36811    break 2
36812  fi
36813done
36814  done
36815IFS=$as_save_IFS
36816
36817  ;;
36818esac
36819fi
36820STRIP=$ac_cv_path_STRIP
36821if test -n "$STRIP"; then
36822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36823$as_echo "$STRIP" >&6; }
36824else
36825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36826$as_echo "no" >&6; }
36827fi
36828
36829
36830        if test "x$STRIP" = x; then
36831          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36832        fi
36833      else
36834        # Otherwise we believe it is a complete path. Use it as it is.
36835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36836$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36838$as_echo_n "checking for STRIP... " >&6; }
36839        if test ! -x "$tool_specified"; then
36840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36841$as_echo "not found" >&6; }
36842          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36843        fi
36844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36845$as_echo "$tool_specified" >&6; }
36846      fi
36847    fi
36848  fi
36849
36850
36851
36852  # Only process if variable expands to non-empty
36853
36854  if test "x$STRIP" != x; then
36855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36856
36857  # First separate the path from the arguments. This will split at the first
36858  # space.
36859  complete="$STRIP"
36860  path="${complete%% *}"
36861  tmp="$complete EOL"
36862  arguments="${tmp#* }"
36863
36864  # Input might be given as Windows format, start by converting to
36865  # unix format.
36866  new_path=`$CYGPATH -u "$path"`
36867
36868  # Now try to locate executable using which
36869  new_path=`$WHICH "$new_path" 2> /dev/null`
36870  # bat and cmd files are not always considered executable in cygwin causing which
36871  # to not find them
36872  if test "x$new_path" = x \
36873      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36874      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36875    new_path=`$CYGPATH -u "$path"`
36876  fi
36877  if test "x$new_path" = x; then
36878    # Oops. Which didn't find the executable.
36879    # The splitting of arguments from the executable at a space might have been incorrect,
36880    # since paths with space are more likely in Windows. Give it another try with the whole
36881    # argument.
36882    path="$complete"
36883    arguments="EOL"
36884    new_path=`$CYGPATH -u "$path"`
36885    new_path=`$WHICH "$new_path" 2> /dev/null`
36886    # bat and cmd files are not always considered executable in cygwin causing which
36887    # to not find them
36888    if test "x$new_path" = x \
36889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36891      new_path=`$CYGPATH -u "$path"`
36892    fi
36893    if test "x$new_path" = x; then
36894      # It's still not found. Now this is an unrecoverable error.
36895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36896$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36897      has_space=`$ECHO "$complete" | $GREP " "`
36898      if test "x$has_space" != x; then
36899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36901      fi
36902      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36903    fi
36904  fi
36905
36906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36909  # "foo.exe" is OK but "foo" is an error.
36910  #
36911  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36912  # It is also a way to make sure we got the proper file name for the real test later on.
36913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36914  if test "x$test_shortpath" = x; then
36915    # Short path failed, file does not exist as specified.
36916    # Try adding .exe or .cmd
36917    if test -f "${new_path}.exe"; then
36918      input_to_shortpath="${new_path}.exe"
36919    elif test -f "${new_path}.cmd"; then
36920      input_to_shortpath="${new_path}.cmd"
36921    else
36922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36923$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36924      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36925$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36926      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36927    fi
36928  else
36929    input_to_shortpath="$new_path"
36930  fi
36931
36932  # Call helper function which possibly converts this using DOS-style short mode.
36933  # If so, the updated path is stored in $new_path.
36934  new_path="$input_to_shortpath"
36935
36936  input_path="$input_to_shortpath"
36937  # Check if we need to convert this using DOS-style short mode. If the path
36938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36939  # take no chances and rewrite it.
36940  # Note: m4 eats our [], so we need to use [ and ] instead.
36941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36942  if test "x$has_forbidden_chars" != x; then
36943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36947      # Going to short mode and back again did indeed matter. Since short mode is
36948      # case insensitive, let's make it lowercase to improve readability.
36949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36950      # Now convert it back to Unix-style (cygpath)
36951      input_path=`$CYGPATH -u "$shortmode_path"`
36952      new_path="$input_path"
36953    fi
36954  fi
36955
36956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36957  if test "x$test_cygdrive_prefix" = x; then
36958    # As a simple fix, exclude /usr/bin since it's not a real path.
36959    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36961      # a path prefixed by /cygdrive for fixpath to work.
36962      new_path="$CYGWIN_ROOT_PATH$input_path"
36963    fi
36964  fi
36965
36966  # remove trailing .exe if any
36967  new_path="${new_path/%.exe/}"
36968
36969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36970
36971  # First separate the path from the arguments. This will split at the first
36972  # space.
36973  complete="$STRIP"
36974  path="${complete%% *}"
36975  tmp="$complete EOL"
36976  arguments="${tmp#* }"
36977
36978  # Input might be given as Windows format, start by converting to
36979  # unix format.
36980  new_path="$path"
36981
36982  windows_path="$new_path"
36983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36984    unix_path=`$CYGPATH -u "$windows_path"`
36985    new_path="$unix_path"
36986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36988    new_path="$unix_path"
36989  fi
36990
36991
36992  # Now try to locate executable using which
36993  new_path=`$WHICH "$new_path" 2> /dev/null`
36994
36995  if test "x$new_path" = x; then
36996    # Oops. Which didn't find the executable.
36997    # The splitting of arguments from the executable at a space might have been incorrect,
36998    # since paths with space are more likely in Windows. Give it another try with the whole
36999    # argument.
37000    path="$complete"
37001    arguments="EOL"
37002    new_path="$path"
37003
37004  windows_path="$new_path"
37005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37006    unix_path=`$CYGPATH -u "$windows_path"`
37007    new_path="$unix_path"
37008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37010    new_path="$unix_path"
37011  fi
37012
37013
37014    new_path=`$WHICH "$new_path" 2> /dev/null`
37015    # bat and cmd files are not always considered executable in MSYS causing which
37016    # to not find them
37017    if test "x$new_path" = x \
37018        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37019        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37020      new_path="$path"
37021
37022  windows_path="$new_path"
37023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37024    unix_path=`$CYGPATH -u "$windows_path"`
37025    new_path="$unix_path"
37026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37028    new_path="$unix_path"
37029  fi
37030
37031    fi
37032
37033    if test "x$new_path" = x; then
37034      # It's still not found. Now this is an unrecoverable error.
37035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37036$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37037      has_space=`$ECHO "$complete" | $GREP " "`
37038      if test "x$has_space" != x; then
37039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37041      fi
37042      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37043    fi
37044  fi
37045
37046  # Now new_path has a complete unix path to the binary
37047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37048    # Keep paths in /bin as-is, but remove trailing .exe if any
37049    new_path="${new_path/%.exe/}"
37050    # Do not save /bin paths to all_fixpath_prefixes!
37051  else
37052    # Not in mixed or Windows style, start by that.
37053    new_path=`cmd //c echo $new_path`
37054
37055  input_path="$new_path"
37056  # Check if we need to convert this using DOS-style short mode. If the path
37057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37058  # take no chances and rewrite it.
37059  # Note: m4 eats our [], so we need to use [ and ] instead.
37060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37061  if test "x$has_forbidden_chars" != x; then
37062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37064  fi
37065
37066    # Output is in $new_path
37067
37068  windows_path="$new_path"
37069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37070    unix_path=`$CYGPATH -u "$windows_path"`
37071    new_path="$unix_path"
37072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37074    new_path="$unix_path"
37075  fi
37076
37077    # remove trailing .exe if any
37078    new_path="${new_path/%.exe/}"
37079
37080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37082  fi
37083
37084    else
37085      # We're on a unix platform. Hooray! :)
37086      # First separate the path from the arguments. This will split at the first
37087      # space.
37088      complete="$STRIP"
37089      path="${complete%% *}"
37090      tmp="$complete EOL"
37091      arguments="${tmp#* }"
37092
37093      # Cannot rely on the command "which" here since it doesn't always work.
37094      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37095      if test -z "$is_absolute_path"; then
37096        # Path to executable is not absolute. Find it.
37097        IFS_save="$IFS"
37098        IFS=:
37099        for p in $PATH; do
37100          if test -f "$p/$path" && test -x "$p/$path"; then
37101            new_path="$p/$path"
37102            break
37103          fi
37104        done
37105        IFS="$IFS_save"
37106      else
37107        # This is an absolute path, we can use it without further modifications.
37108        new_path="$path"
37109      fi
37110
37111      if test "x$new_path" = x; then
37112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37113$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37114        has_space=`$ECHO "$complete" | $GREP " "`
37115        if test "x$has_space" != x; then
37116          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37118        fi
37119        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37120      fi
37121    fi
37122
37123    # Now join together the path and the arguments once again
37124    if test "x$arguments" != xEOL; then
37125      new_complete="$new_path ${arguments% *}"
37126    else
37127      new_complete="$new_path"
37128    fi
37129
37130    if test "x$complete" != "x$new_complete"; then
37131      STRIP="$new_complete"
37132      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37133$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37134    fi
37135  fi
37136
37137
37138
37139  # Publish this variable in the help.
37140
37141
37142  if test "x$NM" = x; then
37143    # The variable is not set by user, try to locate tool using the code snippet
37144    if test -n "$ac_tool_prefix"; then
37145  for ac_prog in nm
37146  do
37147    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37148set dummy $ac_tool_prefix$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_NM+:} false; then :
37152  $as_echo_n "(cached) " >&6
37153else
37154  if test -n "$NM"; then
37155  ac_cv_prog_NM="$NM" # 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_NM="$ac_tool_prefix$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
37174NM=$ac_cv_prog_NM
37175if test -n "$NM"; then
37176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37177$as_echo "$NM" >&6; }
37178else
37179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37180$as_echo "no" >&6; }
37181fi
37182
37183
37184    test -n "$NM" && break
37185  done
37186fi
37187if test -z "$NM"; then
37188  ac_ct_NM=$NM
37189  for ac_prog in nm
37190do
37191  # Extract the first word of "$ac_prog", so it can be a program name with args.
37192set dummy $ac_prog; ac_word=$2
37193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37194$as_echo_n "checking for $ac_word... " >&6; }
37195if ${ac_cv_prog_ac_ct_NM+:} false; then :
37196  $as_echo_n "(cached) " >&6
37197else
37198  if test -n "$ac_ct_NM"; then
37199  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37200else
37201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37202for as_dir in $PATH
37203do
37204  IFS=$as_save_IFS
37205  test -z "$as_dir" && as_dir=.
37206    for ac_exec_ext in '' $ac_executable_extensions; do
37207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37208    ac_cv_prog_ac_ct_NM="$ac_prog"
37209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37210    break 2
37211  fi
37212done
37213  done
37214IFS=$as_save_IFS
37215
37216fi
37217fi
37218ac_ct_NM=$ac_cv_prog_ac_ct_NM
37219if test -n "$ac_ct_NM"; then
37220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37221$as_echo "$ac_ct_NM" >&6; }
37222else
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37224$as_echo "no" >&6; }
37225fi
37226
37227
37228  test -n "$ac_ct_NM" && break
37229done
37230
37231  if test "x$ac_ct_NM" = x; then
37232    NM=""
37233  else
37234    case $cross_compiling:$ac_tool_warned in
37235yes:)
37236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37238ac_tool_warned=yes ;;
37239esac
37240    NM=$ac_ct_NM
37241  fi
37242fi
37243
37244  else
37245    # The variable is set, but is it from the command line or the environment?
37246
37247    # Try to remove the string !NM! from our list.
37248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37250      # If it failed, the variable was not from the command line. Ignore it,
37251      # but warn the user (except for BASH, which is always set by the calling BASH).
37252      if test "xNM" != xBASH; then
37253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37254$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37255      fi
37256      # Try to locate tool using the code snippet
37257      if test -n "$ac_tool_prefix"; then
37258  for ac_prog in nm
37259  do
37260    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37261set dummy $ac_tool_prefix$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_NM+:} false; then :
37265  $as_echo_n "(cached) " >&6
37266else
37267  if test -n "$NM"; then
37268  ac_cv_prog_NM="$NM" # 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_NM="$ac_tool_prefix$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
37287NM=$ac_cv_prog_NM
37288if test -n "$NM"; then
37289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37290$as_echo "$NM" >&6; }
37291else
37292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37293$as_echo "no" >&6; }
37294fi
37295
37296
37297    test -n "$NM" && break
37298  done
37299fi
37300if test -z "$NM"; then
37301  ac_ct_NM=$NM
37302  for ac_prog in nm
37303do
37304  # Extract the first word of "$ac_prog", so it can be a program name with args.
37305set dummy $ac_prog; ac_word=$2
37306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37307$as_echo_n "checking for $ac_word... " >&6; }
37308if ${ac_cv_prog_ac_ct_NM+:} false; then :
37309  $as_echo_n "(cached) " >&6
37310else
37311  if test -n "$ac_ct_NM"; then
37312  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37313else
37314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37315for as_dir in $PATH
37316do
37317  IFS=$as_save_IFS
37318  test -z "$as_dir" && as_dir=.
37319    for ac_exec_ext in '' $ac_executable_extensions; do
37320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37321    ac_cv_prog_ac_ct_NM="$ac_prog"
37322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37323    break 2
37324  fi
37325done
37326  done
37327IFS=$as_save_IFS
37328
37329fi
37330fi
37331ac_ct_NM=$ac_cv_prog_ac_ct_NM
37332if test -n "$ac_ct_NM"; then
37333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37334$as_echo "$ac_ct_NM" >&6; }
37335else
37336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37337$as_echo "no" >&6; }
37338fi
37339
37340
37341  test -n "$ac_ct_NM" && break
37342done
37343
37344  if test "x$ac_ct_NM" = x; then
37345    NM=""
37346  else
37347    case $cross_compiling:$ac_tool_warned in
37348yes:)
37349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37351ac_tool_warned=yes ;;
37352esac
37353    NM=$ac_ct_NM
37354  fi
37355fi
37356
37357    else
37358      # If it succeeded, then it was overridden by the user. We will use it
37359      # for the tool.
37360
37361      # First remove it from the list of overridden variables, so we can test
37362      # for unknown variables in the end.
37363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37364
37365      # Check if the provided tool contains a complete path.
37366      tool_specified="$NM"
37367      tool_basename="${tool_specified##*/}"
37368      if test "x$tool_basename" = "x$tool_specified"; then
37369        # A command without a complete path is provided, search $PATH.
37370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37371$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37372        # Extract the first word of "$tool_basename", so it can be a program name with args.
37373set dummy $tool_basename; ac_word=$2
37374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37375$as_echo_n "checking for $ac_word... " >&6; }
37376if ${ac_cv_path_NM+:} false; then :
37377  $as_echo_n "(cached) " >&6
37378else
37379  case $NM in
37380  [\\/]* | ?:[\\/]*)
37381  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37382  ;;
37383  *)
37384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37385for as_dir in $PATH
37386do
37387  IFS=$as_save_IFS
37388  test -z "$as_dir" && as_dir=.
37389    for ac_exec_ext in '' $ac_executable_extensions; do
37390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37391    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37393    break 2
37394  fi
37395done
37396  done
37397IFS=$as_save_IFS
37398
37399  ;;
37400esac
37401fi
37402NM=$ac_cv_path_NM
37403if test -n "$NM"; then
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37405$as_echo "$NM" >&6; }
37406else
37407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37408$as_echo "no" >&6; }
37409fi
37410
37411
37412        if test "x$NM" = x; then
37413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37414        fi
37415      else
37416        # Otherwise we believe it is a complete path. Use it as it is.
37417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37418$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37420$as_echo_n "checking for NM... " >&6; }
37421        if test ! -x "$tool_specified"; then
37422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37423$as_echo "not found" >&6; }
37424          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37425        fi
37426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37427$as_echo "$tool_specified" >&6; }
37428      fi
37429    fi
37430  fi
37431
37432
37433
37434  # Only process if variable expands to non-empty
37435
37436  if test "x$NM" != x; then
37437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37438
37439  # First separate the path from the arguments. This will split at the first
37440  # space.
37441  complete="$NM"
37442  path="${complete%% *}"
37443  tmp="$complete EOL"
37444  arguments="${tmp#* }"
37445
37446  # Input might be given as Windows format, start by converting to
37447  # unix format.
37448  new_path=`$CYGPATH -u "$path"`
37449
37450  # Now try to locate executable using which
37451  new_path=`$WHICH "$new_path" 2> /dev/null`
37452  # bat and cmd files are not always considered executable in cygwin causing which
37453  # to not find them
37454  if test "x$new_path" = x \
37455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37457    new_path=`$CYGPATH -u "$path"`
37458  fi
37459  if test "x$new_path" = x; then
37460    # Oops. Which didn't find the executable.
37461    # The splitting of arguments from the executable at a space might have been incorrect,
37462    # since paths with space are more likely in Windows. Give it another try with the whole
37463    # argument.
37464    path="$complete"
37465    arguments="EOL"
37466    new_path=`$CYGPATH -u "$path"`
37467    new_path=`$WHICH "$new_path" 2> /dev/null`
37468    # bat and cmd files are not always considered executable in cygwin causing which
37469    # to not find them
37470    if test "x$new_path" = x \
37471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37473      new_path=`$CYGPATH -u "$path"`
37474    fi
37475    if test "x$new_path" = x; then
37476      # It's still not found. Now this is an unrecoverable error.
37477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37478$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37479      has_space=`$ECHO "$complete" | $GREP " "`
37480      if test "x$has_space" != x; then
37481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37483      fi
37484      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37485    fi
37486  fi
37487
37488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37491  # "foo.exe" is OK but "foo" is an error.
37492  #
37493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37494  # It is also a way to make sure we got the proper file name for the real test later on.
37495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37496  if test "x$test_shortpath" = x; then
37497    # Short path failed, file does not exist as specified.
37498    # Try adding .exe or .cmd
37499    if test -f "${new_path}.exe"; then
37500      input_to_shortpath="${new_path}.exe"
37501    elif test -f "${new_path}.cmd"; then
37502      input_to_shortpath="${new_path}.cmd"
37503    else
37504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37505$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37508      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37509    fi
37510  else
37511    input_to_shortpath="$new_path"
37512  fi
37513
37514  # Call helper function which possibly converts this using DOS-style short mode.
37515  # If so, the updated path is stored in $new_path.
37516  new_path="$input_to_shortpath"
37517
37518  input_path="$input_to_shortpath"
37519  # Check if we need to convert this using DOS-style short mode. If the path
37520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37521  # take no chances and rewrite it.
37522  # Note: m4 eats our [], so we need to use [ and ] instead.
37523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37524  if test "x$has_forbidden_chars" != x; then
37525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37529      # Going to short mode and back again did indeed matter. Since short mode is
37530      # case insensitive, let's make it lowercase to improve readability.
37531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37532      # Now convert it back to Unix-style (cygpath)
37533      input_path=`$CYGPATH -u "$shortmode_path"`
37534      new_path="$input_path"
37535    fi
37536  fi
37537
37538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37539  if test "x$test_cygdrive_prefix" = x; then
37540    # As a simple fix, exclude /usr/bin since it's not a real path.
37541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37543      # a path prefixed by /cygdrive for fixpath to work.
37544      new_path="$CYGWIN_ROOT_PATH$input_path"
37545    fi
37546  fi
37547
37548  # remove trailing .exe if any
37549  new_path="${new_path/%.exe/}"
37550
37551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37552
37553  # First separate the path from the arguments. This will split at the first
37554  # space.
37555  complete="$NM"
37556  path="${complete%% *}"
37557  tmp="$complete EOL"
37558  arguments="${tmp#* }"
37559
37560  # Input might be given as Windows format, start by converting to
37561  # unix format.
37562  new_path="$path"
37563
37564  windows_path="$new_path"
37565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37566    unix_path=`$CYGPATH -u "$windows_path"`
37567    new_path="$unix_path"
37568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37570    new_path="$unix_path"
37571  fi
37572
37573
37574  # Now try to locate executable using which
37575  new_path=`$WHICH "$new_path" 2> /dev/null`
37576
37577  if test "x$new_path" = x; then
37578    # Oops. Which didn't find the executable.
37579    # The splitting of arguments from the executable at a space might have been incorrect,
37580    # since paths with space are more likely in Windows. Give it another try with the whole
37581    # argument.
37582    path="$complete"
37583    arguments="EOL"
37584    new_path="$path"
37585
37586  windows_path="$new_path"
37587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37588    unix_path=`$CYGPATH -u "$windows_path"`
37589    new_path="$unix_path"
37590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37592    new_path="$unix_path"
37593  fi
37594
37595
37596    new_path=`$WHICH "$new_path" 2> /dev/null`
37597    # bat and cmd files are not always considered executable in MSYS causing which
37598    # to not find them
37599    if test "x$new_path" = x \
37600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37602      new_path="$path"
37603
37604  windows_path="$new_path"
37605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37606    unix_path=`$CYGPATH -u "$windows_path"`
37607    new_path="$unix_path"
37608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37610    new_path="$unix_path"
37611  fi
37612
37613    fi
37614
37615    if test "x$new_path" = x; then
37616      # It's still not found. Now this is an unrecoverable error.
37617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37618$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37619      has_space=`$ECHO "$complete" | $GREP " "`
37620      if test "x$has_space" != x; then
37621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37623      fi
37624      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37625    fi
37626  fi
37627
37628  # Now new_path has a complete unix path to the binary
37629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37630    # Keep paths in /bin as-is, but remove trailing .exe if any
37631    new_path="${new_path/%.exe/}"
37632    # Do not save /bin paths to all_fixpath_prefixes!
37633  else
37634    # Not in mixed or Windows style, start by that.
37635    new_path=`cmd //c echo $new_path`
37636
37637  input_path="$new_path"
37638  # Check if we need to convert this using DOS-style short mode. If the path
37639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37640  # take no chances and rewrite it.
37641  # Note: m4 eats our [], so we need to use [ and ] instead.
37642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37643  if test "x$has_forbidden_chars" != x; then
37644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37646  fi
37647
37648    # Output is in $new_path
37649
37650  windows_path="$new_path"
37651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37652    unix_path=`$CYGPATH -u "$windows_path"`
37653    new_path="$unix_path"
37654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37656    new_path="$unix_path"
37657  fi
37658
37659    # remove trailing .exe if any
37660    new_path="${new_path/%.exe/}"
37661
37662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37664  fi
37665
37666    else
37667      # We're on a unix platform. Hooray! :)
37668      # First separate the path from the arguments. This will split at the first
37669      # space.
37670      complete="$NM"
37671      path="${complete%% *}"
37672      tmp="$complete EOL"
37673      arguments="${tmp#* }"
37674
37675      # Cannot rely on the command "which" here since it doesn't always work.
37676      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37677      if test -z "$is_absolute_path"; then
37678        # Path to executable is not absolute. Find it.
37679        IFS_save="$IFS"
37680        IFS=:
37681        for p in $PATH; do
37682          if test -f "$p/$path" && test -x "$p/$path"; then
37683            new_path="$p/$path"
37684            break
37685          fi
37686        done
37687        IFS="$IFS_save"
37688      else
37689        # This is an absolute path, we can use it without further modifications.
37690        new_path="$path"
37691      fi
37692
37693      if test "x$new_path" = x; then
37694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37695$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37696        has_space=`$ECHO "$complete" | $GREP " "`
37697        if test "x$has_space" != x; then
37698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37700        fi
37701        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37702      fi
37703    fi
37704
37705    # Now join together the path and the arguments once again
37706    if test "x$arguments" != xEOL; then
37707      new_complete="$new_path ${arguments% *}"
37708    else
37709      new_complete="$new_path"
37710    fi
37711
37712    if test "x$complete" != "x$new_complete"; then
37713      NM="$new_complete"
37714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37715$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37716    fi
37717  fi
37718
37719    GNM="$NM"
37720
37721  fi
37722
37723  # objcopy is used for moving debug symbols to separate files when
37724  # full debug symbols are enabled.
37725  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37726
37727
37728  # Publish this variable in the help.
37729
37730
37731  if test "x$OBJCOPY" = x; then
37732    # The variable is not set by user, try to locate tool using the code snippet
37733    if test -n "$ac_tool_prefix"; then
37734  for ac_prog in gobjcopy objcopy
37735  do
37736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37739$as_echo_n "checking for $ac_word... " >&6; }
37740if ${ac_cv_prog_OBJCOPY+:} false; then :
37741  $as_echo_n "(cached) " >&6
37742else
37743  if test -n "$OBJCOPY"; then
37744  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37745else
37746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37747for as_dir in $PATH
37748do
37749  IFS=$as_save_IFS
37750  test -z "$as_dir" && as_dir=.
37751    for ac_exec_ext in '' $ac_executable_extensions; do
37752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37753    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37755    break 2
37756  fi
37757done
37758  done
37759IFS=$as_save_IFS
37760
37761fi
37762fi
37763OBJCOPY=$ac_cv_prog_OBJCOPY
37764if test -n "$OBJCOPY"; then
37765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37766$as_echo "$OBJCOPY" >&6; }
37767else
37768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37769$as_echo "no" >&6; }
37770fi
37771
37772
37773    test -n "$OBJCOPY" && break
37774  done
37775fi
37776if test -z "$OBJCOPY"; then
37777  ac_ct_OBJCOPY=$OBJCOPY
37778  for ac_prog in gobjcopy objcopy
37779do
37780  # Extract the first word of "$ac_prog", so it can be a program name with args.
37781set dummy $ac_prog; ac_word=$2
37782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37783$as_echo_n "checking for $ac_word... " >&6; }
37784if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37785  $as_echo_n "(cached) " >&6
37786else
37787  if test -n "$ac_ct_OBJCOPY"; then
37788  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37789else
37790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37791for as_dir in $PATH
37792do
37793  IFS=$as_save_IFS
37794  test -z "$as_dir" && as_dir=.
37795    for ac_exec_ext in '' $ac_executable_extensions; do
37796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37797    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37799    break 2
37800  fi
37801done
37802  done
37803IFS=$as_save_IFS
37804
37805fi
37806fi
37807ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37808if test -n "$ac_ct_OBJCOPY"; then
37809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37810$as_echo "$ac_ct_OBJCOPY" >&6; }
37811else
37812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37813$as_echo "no" >&6; }
37814fi
37815
37816
37817  test -n "$ac_ct_OBJCOPY" && break
37818done
37819
37820  if test "x$ac_ct_OBJCOPY" = x; then
37821    OBJCOPY=""
37822  else
37823    case $cross_compiling:$ac_tool_warned in
37824yes:)
37825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37827ac_tool_warned=yes ;;
37828esac
37829    OBJCOPY=$ac_ct_OBJCOPY
37830  fi
37831fi
37832
37833  else
37834    # The variable is set, but is it from the command line or the environment?
37835
37836    # Try to remove the string !OBJCOPY! from our list.
37837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37839      # If it failed, the variable was not from the command line. Ignore it,
37840      # but warn the user (except for BASH, which is always set by the calling BASH).
37841      if test "xOBJCOPY" != xBASH; then
37842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37843$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37844      fi
37845      # Try to locate tool using the code snippet
37846      if test -n "$ac_tool_prefix"; then
37847  for ac_prog in gobjcopy objcopy
37848  do
37849    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37850set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37852$as_echo_n "checking for $ac_word... " >&6; }
37853if ${ac_cv_prog_OBJCOPY+:} false; then :
37854  $as_echo_n "(cached) " >&6
37855else
37856  if test -n "$OBJCOPY"; then
37857  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37858else
37859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37860for as_dir in $PATH
37861do
37862  IFS=$as_save_IFS
37863  test -z "$as_dir" && as_dir=.
37864    for ac_exec_ext in '' $ac_executable_extensions; do
37865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37866    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37868    break 2
37869  fi
37870done
37871  done
37872IFS=$as_save_IFS
37873
37874fi
37875fi
37876OBJCOPY=$ac_cv_prog_OBJCOPY
37877if test -n "$OBJCOPY"; then
37878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37879$as_echo "$OBJCOPY" >&6; }
37880else
37881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37882$as_echo "no" >&6; }
37883fi
37884
37885
37886    test -n "$OBJCOPY" && break
37887  done
37888fi
37889if test -z "$OBJCOPY"; then
37890  ac_ct_OBJCOPY=$OBJCOPY
37891  for ac_prog in gobjcopy objcopy
37892do
37893  # Extract the first word of "$ac_prog", so it can be a program name with args.
37894set dummy $ac_prog; ac_word=$2
37895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37896$as_echo_n "checking for $ac_word... " >&6; }
37897if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37898  $as_echo_n "(cached) " >&6
37899else
37900  if test -n "$ac_ct_OBJCOPY"; then
37901  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37902else
37903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37904for as_dir in $PATH
37905do
37906  IFS=$as_save_IFS
37907  test -z "$as_dir" && as_dir=.
37908    for ac_exec_ext in '' $ac_executable_extensions; do
37909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37910    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37912    break 2
37913  fi
37914done
37915  done
37916IFS=$as_save_IFS
37917
37918fi
37919fi
37920ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37921if test -n "$ac_ct_OBJCOPY"; then
37922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37923$as_echo "$ac_ct_OBJCOPY" >&6; }
37924else
37925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37926$as_echo "no" >&6; }
37927fi
37928
37929
37930  test -n "$ac_ct_OBJCOPY" && break
37931done
37932
37933  if test "x$ac_ct_OBJCOPY" = x; then
37934    OBJCOPY=""
37935  else
37936    case $cross_compiling:$ac_tool_warned in
37937yes:)
37938{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37940ac_tool_warned=yes ;;
37941esac
37942    OBJCOPY=$ac_ct_OBJCOPY
37943  fi
37944fi
37945
37946    else
37947      # If it succeeded, then it was overridden by the user. We will use it
37948      # for the tool.
37949
37950      # First remove it from the list of overridden variables, so we can test
37951      # for unknown variables in the end.
37952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37953
37954      # Check if the provided tool contains a complete path.
37955      tool_specified="$OBJCOPY"
37956      tool_basename="${tool_specified##*/}"
37957      if test "x$tool_basename" = "x$tool_specified"; then
37958        # A command without a complete path is provided, search $PATH.
37959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37960$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37961        # Extract the first word of "$tool_basename", so it can be a program name with args.
37962set dummy $tool_basename; ac_word=$2
37963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37964$as_echo_n "checking for $ac_word... " >&6; }
37965if ${ac_cv_path_OBJCOPY+:} false; then :
37966  $as_echo_n "(cached) " >&6
37967else
37968  case $OBJCOPY in
37969  [\\/]* | ?:[\\/]*)
37970  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37971  ;;
37972  *)
37973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37974for as_dir in $PATH
37975do
37976  IFS=$as_save_IFS
37977  test -z "$as_dir" && as_dir=.
37978    for ac_exec_ext in '' $ac_executable_extensions; do
37979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37980    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37982    break 2
37983  fi
37984done
37985  done
37986IFS=$as_save_IFS
37987
37988  ;;
37989esac
37990fi
37991OBJCOPY=$ac_cv_path_OBJCOPY
37992if test -n "$OBJCOPY"; then
37993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37994$as_echo "$OBJCOPY" >&6; }
37995else
37996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37997$as_echo "no" >&6; }
37998fi
37999
38000
38001        if test "x$OBJCOPY" = x; then
38002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38003        fi
38004      else
38005        # Otherwise we believe it is a complete path. Use it as it is.
38006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38007$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38009$as_echo_n "checking for OBJCOPY... " >&6; }
38010        if test ! -x "$tool_specified"; then
38011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38012$as_echo "not found" >&6; }
38013          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38014        fi
38015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38016$as_echo "$tool_specified" >&6; }
38017      fi
38018    fi
38019  fi
38020
38021
38022    # Only call fixup if objcopy was found.
38023    if test -n "$OBJCOPY"; then
38024
38025  # Only process if variable expands to non-empty
38026
38027  if test "x$OBJCOPY" != x; then
38028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38029
38030  # First separate the path from the arguments. This will split at the first
38031  # space.
38032  complete="$OBJCOPY"
38033  path="${complete%% *}"
38034  tmp="$complete EOL"
38035  arguments="${tmp#* }"
38036
38037  # Input might be given as Windows format, start by converting to
38038  # unix format.
38039  new_path=`$CYGPATH -u "$path"`
38040
38041  # Now try to locate executable using which
38042  new_path=`$WHICH "$new_path" 2> /dev/null`
38043  # bat and cmd files are not always considered executable in cygwin causing which
38044  # to not find them
38045  if test "x$new_path" = x \
38046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38048    new_path=`$CYGPATH -u "$path"`
38049  fi
38050  if test "x$new_path" = x; then
38051    # Oops. Which didn't find the executable.
38052    # The splitting of arguments from the executable at a space might have been incorrect,
38053    # since paths with space are more likely in Windows. Give it another try with the whole
38054    # argument.
38055    path="$complete"
38056    arguments="EOL"
38057    new_path=`$CYGPATH -u "$path"`
38058    new_path=`$WHICH "$new_path" 2> /dev/null`
38059    # bat and cmd files are not always considered executable in cygwin causing which
38060    # to not find them
38061    if test "x$new_path" = x \
38062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38064      new_path=`$CYGPATH -u "$path"`
38065    fi
38066    if test "x$new_path" = x; then
38067      # It's still not found. Now this is an unrecoverable error.
38068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38069$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38070      has_space=`$ECHO "$complete" | $GREP " "`
38071      if test "x$has_space" != x; then
38072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38074      fi
38075      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38076    fi
38077  fi
38078
38079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38082  # "foo.exe" is OK but "foo" is an error.
38083  #
38084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38085  # It is also a way to make sure we got the proper file name for the real test later on.
38086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38087  if test "x$test_shortpath" = x; then
38088    # Short path failed, file does not exist as specified.
38089    # Try adding .exe or .cmd
38090    if test -f "${new_path}.exe"; then
38091      input_to_shortpath="${new_path}.exe"
38092    elif test -f "${new_path}.cmd"; then
38093      input_to_shortpath="${new_path}.cmd"
38094    else
38095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38096$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38099      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38100    fi
38101  else
38102    input_to_shortpath="$new_path"
38103  fi
38104
38105  # Call helper function which possibly converts this using DOS-style short mode.
38106  # If so, the updated path is stored in $new_path.
38107  new_path="$input_to_shortpath"
38108
38109  input_path="$input_to_shortpath"
38110  # Check if we need to convert this using DOS-style short mode. If the path
38111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38112  # take no chances and rewrite it.
38113  # Note: m4 eats our [], so we need to use [ and ] instead.
38114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38115  if test "x$has_forbidden_chars" != x; then
38116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38120      # Going to short mode and back again did indeed matter. Since short mode is
38121      # case insensitive, let's make it lowercase to improve readability.
38122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38123      # Now convert it back to Unix-style (cygpath)
38124      input_path=`$CYGPATH -u "$shortmode_path"`
38125      new_path="$input_path"
38126    fi
38127  fi
38128
38129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38130  if test "x$test_cygdrive_prefix" = x; then
38131    # As a simple fix, exclude /usr/bin since it's not a real path.
38132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38134      # a path prefixed by /cygdrive for fixpath to work.
38135      new_path="$CYGWIN_ROOT_PATH$input_path"
38136    fi
38137  fi
38138
38139  # remove trailing .exe if any
38140  new_path="${new_path/%.exe/}"
38141
38142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38143
38144  # First separate the path from the arguments. This will split at the first
38145  # space.
38146  complete="$OBJCOPY"
38147  path="${complete%% *}"
38148  tmp="$complete EOL"
38149  arguments="${tmp#* }"
38150
38151  # Input might be given as Windows format, start by converting to
38152  # unix format.
38153  new_path="$path"
38154
38155  windows_path="$new_path"
38156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38157    unix_path=`$CYGPATH -u "$windows_path"`
38158    new_path="$unix_path"
38159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38161    new_path="$unix_path"
38162  fi
38163
38164
38165  # Now try to locate executable using which
38166  new_path=`$WHICH "$new_path" 2> /dev/null`
38167
38168  if test "x$new_path" = x; then
38169    # Oops. Which didn't find the executable.
38170    # The splitting of arguments from the executable at a space might have been incorrect,
38171    # since paths with space are more likely in Windows. Give it another try with the whole
38172    # argument.
38173    path="$complete"
38174    arguments="EOL"
38175    new_path="$path"
38176
38177  windows_path="$new_path"
38178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38179    unix_path=`$CYGPATH -u "$windows_path"`
38180    new_path="$unix_path"
38181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38183    new_path="$unix_path"
38184  fi
38185
38186
38187    new_path=`$WHICH "$new_path" 2> /dev/null`
38188    # bat and cmd files are not always considered executable in MSYS causing which
38189    # to not find them
38190    if test "x$new_path" = x \
38191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38193      new_path="$path"
38194
38195  windows_path="$new_path"
38196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38197    unix_path=`$CYGPATH -u "$windows_path"`
38198    new_path="$unix_path"
38199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38201    new_path="$unix_path"
38202  fi
38203
38204    fi
38205
38206    if test "x$new_path" = x; then
38207      # It's still not found. Now this is an unrecoverable error.
38208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38209$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38210      has_space=`$ECHO "$complete" | $GREP " "`
38211      if test "x$has_space" != x; then
38212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38214      fi
38215      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38216    fi
38217  fi
38218
38219  # Now new_path has a complete unix path to the binary
38220  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38221    # Keep paths in /bin as-is, but remove trailing .exe if any
38222    new_path="${new_path/%.exe/}"
38223    # Do not save /bin paths to all_fixpath_prefixes!
38224  else
38225    # Not in mixed or Windows style, start by that.
38226    new_path=`cmd //c echo $new_path`
38227
38228  input_path="$new_path"
38229  # Check if we need to convert this using DOS-style short mode. If the path
38230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38231  # take no chances and rewrite it.
38232  # Note: m4 eats our [], so we need to use [ and ] instead.
38233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38234  if test "x$has_forbidden_chars" != x; then
38235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38237  fi
38238
38239    # Output is in $new_path
38240
38241  windows_path="$new_path"
38242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38243    unix_path=`$CYGPATH -u "$windows_path"`
38244    new_path="$unix_path"
38245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38247    new_path="$unix_path"
38248  fi
38249
38250    # remove trailing .exe if any
38251    new_path="${new_path/%.exe/}"
38252
38253    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38254    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38255  fi
38256
38257    else
38258      # We're on a unix platform. Hooray! :)
38259      # First separate the path from the arguments. This will split at the first
38260      # space.
38261      complete="$OBJCOPY"
38262      path="${complete%% *}"
38263      tmp="$complete EOL"
38264      arguments="${tmp#* }"
38265
38266      # Cannot rely on the command "which" here since it doesn't always work.
38267      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38268      if test -z "$is_absolute_path"; then
38269        # Path to executable is not absolute. Find it.
38270        IFS_save="$IFS"
38271        IFS=:
38272        for p in $PATH; do
38273          if test -f "$p/$path" && test -x "$p/$path"; then
38274            new_path="$p/$path"
38275            break
38276          fi
38277        done
38278        IFS="$IFS_save"
38279      else
38280        # This is an absolute path, we can use it without further modifications.
38281        new_path="$path"
38282      fi
38283
38284      if test "x$new_path" = x; then
38285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38286$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38287        has_space=`$ECHO "$complete" | $GREP " "`
38288        if test "x$has_space" != x; then
38289          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38291        fi
38292        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38293      fi
38294    fi
38295
38296    # Now join together the path and the arguments once again
38297    if test "x$arguments" != xEOL; then
38298      new_complete="$new_path ${arguments% *}"
38299    else
38300      new_complete="$new_path"
38301    fi
38302
38303    if test "x$complete" != "x$new_complete"; then
38304      OBJCOPY="$new_complete"
38305      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38306$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38307    fi
38308  fi
38309
38310      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38311        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38312        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38313        # - version number is last blank separate word on first line
38314        # - version number formats that have been seen:
38315        #   - <major>.<minor>
38316        #   - <major>.<minor>.<micro>
38317        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38318        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38319         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38320              -e 's/.* //' \
38321              -e '/^[01]\./b bad' \
38322              -e '/^2\./{' \
38323              -e '  s/^2\.//' \
38324              -e '  /^[0-9]$/b bad' \
38325              -e '  /^[0-9]\./b bad' \
38326              -e '  /^1[0-9]$/b bad' \
38327              -e '  /^1[0-9]\./b bad' \
38328              -e '  /^20\./b bad' \
38329              -e '  /^21\.0$/b bad' \
38330              -e '  /^21\.0\./b bad' \
38331              -e '}' \
38332              -e ':good' \
38333              -e 's/.*/VALID_VERSION/p' \
38334              -e 'q' \
38335              -e ':bad' \
38336              -e 's/.*/BAD_VERSION/p' \
38337              -e 'q'`
38338        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38339          OBJCOPY=
38340          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
38341$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38342          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38343$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38344          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38345$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38346          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38347$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38348          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38349$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38350        fi
38351      fi
38352    fi
38353  fi
38354
38355
38356
38357  # Publish this variable in the help.
38358
38359
38360  if test "x$OBJDUMP" = x; then
38361    # The variable is not set by user, try to locate tool using the code snippet
38362    if test -n "$ac_tool_prefix"; then
38363  for ac_prog in gobjdump objdump
38364  do
38365    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38366set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38368$as_echo_n "checking for $ac_word... " >&6; }
38369if ${ac_cv_prog_OBJDUMP+:} false; then :
38370  $as_echo_n "(cached) " >&6
38371else
38372  if test -n "$OBJDUMP"; then
38373  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38374else
38375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38376for as_dir in $PATH
38377do
38378  IFS=$as_save_IFS
38379  test -z "$as_dir" && as_dir=.
38380    for ac_exec_ext in '' $ac_executable_extensions; do
38381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38382    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38384    break 2
38385  fi
38386done
38387  done
38388IFS=$as_save_IFS
38389
38390fi
38391fi
38392OBJDUMP=$ac_cv_prog_OBJDUMP
38393if test -n "$OBJDUMP"; then
38394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38395$as_echo "$OBJDUMP" >&6; }
38396else
38397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38398$as_echo "no" >&6; }
38399fi
38400
38401
38402    test -n "$OBJDUMP" && break
38403  done
38404fi
38405if test -z "$OBJDUMP"; then
38406  ac_ct_OBJDUMP=$OBJDUMP
38407  for ac_prog in gobjdump objdump
38408do
38409  # Extract the first word of "$ac_prog", so it can be a program name with args.
38410set dummy $ac_prog; ac_word=$2
38411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38412$as_echo_n "checking for $ac_word... " >&6; }
38413if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38414  $as_echo_n "(cached) " >&6
38415else
38416  if test -n "$ac_ct_OBJDUMP"; then
38417  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38418else
38419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38420for as_dir in $PATH
38421do
38422  IFS=$as_save_IFS
38423  test -z "$as_dir" && as_dir=.
38424    for ac_exec_ext in '' $ac_executable_extensions; do
38425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38426    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38428    break 2
38429  fi
38430done
38431  done
38432IFS=$as_save_IFS
38433
38434fi
38435fi
38436ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38437if test -n "$ac_ct_OBJDUMP"; then
38438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38439$as_echo "$ac_ct_OBJDUMP" >&6; }
38440else
38441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38442$as_echo "no" >&6; }
38443fi
38444
38445
38446  test -n "$ac_ct_OBJDUMP" && break
38447done
38448
38449  if test "x$ac_ct_OBJDUMP" = x; then
38450    OBJDUMP=""
38451  else
38452    case $cross_compiling:$ac_tool_warned in
38453yes:)
38454{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38455$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38456ac_tool_warned=yes ;;
38457esac
38458    OBJDUMP=$ac_ct_OBJDUMP
38459  fi
38460fi
38461
38462  else
38463    # The variable is set, but is it from the command line or the environment?
38464
38465    # Try to remove the string !OBJDUMP! from our list.
38466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38468      # If it failed, the variable was not from the command line. Ignore it,
38469      # but warn the user (except for BASH, which is always set by the calling BASH).
38470      if test "xOBJDUMP" != xBASH; then
38471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38472$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38473      fi
38474      # Try to locate tool using the code snippet
38475      if test -n "$ac_tool_prefix"; then
38476  for ac_prog in gobjdump objdump
38477  do
38478    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38479set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38481$as_echo_n "checking for $ac_word... " >&6; }
38482if ${ac_cv_prog_OBJDUMP+:} false; then :
38483  $as_echo_n "(cached) " >&6
38484else
38485  if test -n "$OBJDUMP"; then
38486  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38487else
38488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38489for as_dir in $PATH
38490do
38491  IFS=$as_save_IFS
38492  test -z "$as_dir" && as_dir=.
38493    for ac_exec_ext in '' $ac_executable_extensions; do
38494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38495    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38497    break 2
38498  fi
38499done
38500  done
38501IFS=$as_save_IFS
38502
38503fi
38504fi
38505OBJDUMP=$ac_cv_prog_OBJDUMP
38506if test -n "$OBJDUMP"; then
38507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38508$as_echo "$OBJDUMP" >&6; }
38509else
38510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38511$as_echo "no" >&6; }
38512fi
38513
38514
38515    test -n "$OBJDUMP" && break
38516  done
38517fi
38518if test -z "$OBJDUMP"; then
38519  ac_ct_OBJDUMP=$OBJDUMP
38520  for ac_prog in gobjdump objdump
38521do
38522  # Extract the first word of "$ac_prog", so it can be a program name with args.
38523set dummy $ac_prog; ac_word=$2
38524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38525$as_echo_n "checking for $ac_word... " >&6; }
38526if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38527  $as_echo_n "(cached) " >&6
38528else
38529  if test -n "$ac_ct_OBJDUMP"; then
38530  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38531else
38532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38533for as_dir in $PATH
38534do
38535  IFS=$as_save_IFS
38536  test -z "$as_dir" && as_dir=.
38537    for ac_exec_ext in '' $ac_executable_extensions; do
38538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38539    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38541    break 2
38542  fi
38543done
38544  done
38545IFS=$as_save_IFS
38546
38547fi
38548fi
38549ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38550if test -n "$ac_ct_OBJDUMP"; then
38551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38552$as_echo "$ac_ct_OBJDUMP" >&6; }
38553else
38554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38555$as_echo "no" >&6; }
38556fi
38557
38558
38559  test -n "$ac_ct_OBJDUMP" && break
38560done
38561
38562  if test "x$ac_ct_OBJDUMP" = x; then
38563    OBJDUMP=""
38564  else
38565    case $cross_compiling:$ac_tool_warned in
38566yes:)
38567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38569ac_tool_warned=yes ;;
38570esac
38571    OBJDUMP=$ac_ct_OBJDUMP
38572  fi
38573fi
38574
38575    else
38576      # If it succeeded, then it was overridden by the user. We will use it
38577      # for the tool.
38578
38579      # First remove it from the list of overridden variables, so we can test
38580      # for unknown variables in the end.
38581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38582
38583      # Check if the provided tool contains a complete path.
38584      tool_specified="$OBJDUMP"
38585      tool_basename="${tool_specified##*/}"
38586      if test "x$tool_basename" = "x$tool_specified"; then
38587        # A command without a complete path is provided, search $PATH.
38588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38589$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38590        # Extract the first word of "$tool_basename", so it can be a program name with args.
38591set dummy $tool_basename; ac_word=$2
38592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38593$as_echo_n "checking for $ac_word... " >&6; }
38594if ${ac_cv_path_OBJDUMP+:} false; then :
38595  $as_echo_n "(cached) " >&6
38596else
38597  case $OBJDUMP in
38598  [\\/]* | ?:[\\/]*)
38599  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38600  ;;
38601  *)
38602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38603for as_dir in $PATH
38604do
38605  IFS=$as_save_IFS
38606  test -z "$as_dir" && as_dir=.
38607    for ac_exec_ext in '' $ac_executable_extensions; do
38608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38609    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38611    break 2
38612  fi
38613done
38614  done
38615IFS=$as_save_IFS
38616
38617  ;;
38618esac
38619fi
38620OBJDUMP=$ac_cv_path_OBJDUMP
38621if test -n "$OBJDUMP"; then
38622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38623$as_echo "$OBJDUMP" >&6; }
38624else
38625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38626$as_echo "no" >&6; }
38627fi
38628
38629
38630        if test "x$OBJDUMP" = x; then
38631          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38632        fi
38633      else
38634        # Otherwise we believe it is a complete path. Use it as it is.
38635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38636$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38638$as_echo_n "checking for OBJDUMP... " >&6; }
38639        if test ! -x "$tool_specified"; then
38640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38641$as_echo "not found" >&6; }
38642          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38643        fi
38644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38645$as_echo "$tool_specified" >&6; }
38646      fi
38647    fi
38648  fi
38649
38650
38651  if test "x$OBJDUMP" != x; then
38652    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38653    # bails if argument is missing.
38654
38655  # Only process if variable expands to non-empty
38656
38657  if test "x$OBJDUMP" != x; then
38658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38659
38660  # First separate the path from the arguments. This will split at the first
38661  # space.
38662  complete="$OBJDUMP"
38663  path="${complete%% *}"
38664  tmp="$complete EOL"
38665  arguments="${tmp#* }"
38666
38667  # Input might be given as Windows format, start by converting to
38668  # unix format.
38669  new_path=`$CYGPATH -u "$path"`
38670
38671  # Now try to locate executable using which
38672  new_path=`$WHICH "$new_path" 2> /dev/null`
38673  # bat and cmd files are not always considered executable in cygwin causing which
38674  # to not find them
38675  if test "x$new_path" = x \
38676      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38677      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38678    new_path=`$CYGPATH -u "$path"`
38679  fi
38680  if test "x$new_path" = x; then
38681    # Oops. Which didn't find the executable.
38682    # The splitting of arguments from the executable at a space might have been incorrect,
38683    # since paths with space are more likely in Windows. Give it another try with the whole
38684    # argument.
38685    path="$complete"
38686    arguments="EOL"
38687    new_path=`$CYGPATH -u "$path"`
38688    new_path=`$WHICH "$new_path" 2> /dev/null`
38689    # bat and cmd files are not always considered executable in cygwin causing which
38690    # to not find them
38691    if test "x$new_path" = x \
38692        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38693        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38694      new_path=`$CYGPATH -u "$path"`
38695    fi
38696    if test "x$new_path" = x; then
38697      # It's still not found. Now this is an unrecoverable error.
38698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38699$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38700      has_space=`$ECHO "$complete" | $GREP " "`
38701      if test "x$has_space" != x; then
38702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38704      fi
38705      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38706    fi
38707  fi
38708
38709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38712  # "foo.exe" is OK but "foo" is an error.
38713  #
38714  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38715  # It is also a way to make sure we got the proper file name for the real test later on.
38716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38717  if test "x$test_shortpath" = x; then
38718    # Short path failed, file does not exist as specified.
38719    # Try adding .exe or .cmd
38720    if test -f "${new_path}.exe"; then
38721      input_to_shortpath="${new_path}.exe"
38722    elif test -f "${new_path}.cmd"; then
38723      input_to_shortpath="${new_path}.cmd"
38724    else
38725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38726$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38727      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38728$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38729      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38730    fi
38731  else
38732    input_to_shortpath="$new_path"
38733  fi
38734
38735  # Call helper function which possibly converts this using DOS-style short mode.
38736  # If so, the updated path is stored in $new_path.
38737  new_path="$input_to_shortpath"
38738
38739  input_path="$input_to_shortpath"
38740  # Check if we need to convert this using DOS-style short mode. If the path
38741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38742  # take no chances and rewrite it.
38743  # Note: m4 eats our [], so we need to use [ and ] instead.
38744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38745  if test "x$has_forbidden_chars" != x; then
38746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38750      # Going to short mode and back again did indeed matter. Since short mode is
38751      # case insensitive, let's make it lowercase to improve readability.
38752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38753      # Now convert it back to Unix-style (cygpath)
38754      input_path=`$CYGPATH -u "$shortmode_path"`
38755      new_path="$input_path"
38756    fi
38757  fi
38758
38759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38760  if test "x$test_cygdrive_prefix" = x; then
38761    # As a simple fix, exclude /usr/bin since it's not a real path.
38762    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38764      # a path prefixed by /cygdrive for fixpath to work.
38765      new_path="$CYGWIN_ROOT_PATH$input_path"
38766    fi
38767  fi
38768
38769  # remove trailing .exe if any
38770  new_path="${new_path/%.exe/}"
38771
38772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38773
38774  # First separate the path from the arguments. This will split at the first
38775  # space.
38776  complete="$OBJDUMP"
38777  path="${complete%% *}"
38778  tmp="$complete EOL"
38779  arguments="${tmp#* }"
38780
38781  # Input might be given as Windows format, start by converting to
38782  # unix format.
38783  new_path="$path"
38784
38785  windows_path="$new_path"
38786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38787    unix_path=`$CYGPATH -u "$windows_path"`
38788    new_path="$unix_path"
38789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38791    new_path="$unix_path"
38792  fi
38793
38794
38795  # Now try to locate executable using which
38796  new_path=`$WHICH "$new_path" 2> /dev/null`
38797
38798  if test "x$new_path" = x; then
38799    # Oops. Which didn't find the executable.
38800    # The splitting of arguments from the executable at a space might have been incorrect,
38801    # since paths with space are more likely in Windows. Give it another try with the whole
38802    # argument.
38803    path="$complete"
38804    arguments="EOL"
38805    new_path="$path"
38806
38807  windows_path="$new_path"
38808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38809    unix_path=`$CYGPATH -u "$windows_path"`
38810    new_path="$unix_path"
38811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38813    new_path="$unix_path"
38814  fi
38815
38816
38817    new_path=`$WHICH "$new_path" 2> /dev/null`
38818    # bat and cmd files are not always considered executable in MSYS causing which
38819    # to not find them
38820    if test "x$new_path" = x \
38821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38823      new_path="$path"
38824
38825  windows_path="$new_path"
38826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38827    unix_path=`$CYGPATH -u "$windows_path"`
38828    new_path="$unix_path"
38829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38831    new_path="$unix_path"
38832  fi
38833
38834    fi
38835
38836    if test "x$new_path" = x; then
38837      # It's still not found. Now this is an unrecoverable error.
38838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38839$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38840      has_space=`$ECHO "$complete" | $GREP " "`
38841      if test "x$has_space" != x; then
38842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38844      fi
38845      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38846    fi
38847  fi
38848
38849  # Now new_path has a complete unix path to the binary
38850  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38851    # Keep paths in /bin as-is, but remove trailing .exe if any
38852    new_path="${new_path/%.exe/}"
38853    # Do not save /bin paths to all_fixpath_prefixes!
38854  else
38855    # Not in mixed or Windows style, start by that.
38856    new_path=`cmd //c echo $new_path`
38857
38858  input_path="$new_path"
38859  # Check if we need to convert this using DOS-style short mode. If the path
38860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38861  # take no chances and rewrite it.
38862  # Note: m4 eats our [], so we need to use [ and ] instead.
38863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38864  if test "x$has_forbidden_chars" != x; then
38865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38867  fi
38868
38869    # Output is in $new_path
38870
38871  windows_path="$new_path"
38872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38873    unix_path=`$CYGPATH -u "$windows_path"`
38874    new_path="$unix_path"
38875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38877    new_path="$unix_path"
38878  fi
38879
38880    # remove trailing .exe if any
38881    new_path="${new_path/%.exe/}"
38882
38883    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38884    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38885  fi
38886
38887    else
38888      # We're on a unix platform. Hooray! :)
38889      # First separate the path from the arguments. This will split at the first
38890      # space.
38891      complete="$OBJDUMP"
38892      path="${complete%% *}"
38893      tmp="$complete EOL"
38894      arguments="${tmp#* }"
38895
38896      # Cannot rely on the command "which" here since it doesn't always work.
38897      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38898      if test -z "$is_absolute_path"; then
38899        # Path to executable is not absolute. Find it.
38900        IFS_save="$IFS"
38901        IFS=:
38902        for p in $PATH; do
38903          if test -f "$p/$path" && test -x "$p/$path"; then
38904            new_path="$p/$path"
38905            break
38906          fi
38907        done
38908        IFS="$IFS_save"
38909      else
38910        # This is an absolute path, we can use it without further modifications.
38911        new_path="$path"
38912      fi
38913
38914      if test "x$new_path" = x; then
38915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38916$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38917        has_space=`$ECHO "$complete" | $GREP " "`
38918        if test "x$has_space" != x; then
38919          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38920$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38921        fi
38922        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38923      fi
38924    fi
38925
38926    # Now join together the path and the arguments once again
38927    if test "x$arguments" != xEOL; then
38928      new_complete="$new_path ${arguments% *}"
38929    else
38930      new_complete="$new_path"
38931    fi
38932
38933    if test "x$complete" != "x$new_complete"; then
38934      OBJDUMP="$new_complete"
38935      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38936$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38937    fi
38938  fi
38939
38940  fi
38941
38942
38943  # Restore old path.
38944  PATH="$OLD_PATH"
38945
38946  # Restore the flags to the user specified values.
38947  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38948  CFLAGS="$ORG_CFLAGS"
38949  CXXFLAGS="$ORG_CXXFLAGS"
38950
38951
38952# Finally do some processing after the detection phase
38953
38954  if test "x$COMPILE_TYPE" = "xcross"; then
38955    # Now we need to find a C/C++ compiler that can build executables for the
38956    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38957    # used once. Also, we need to do this without adding a tools dir to the
38958    # path, otherwise we might pick up cross-compilers which don't use standard
38959    # naming.
38960
38961    # FIXME: we should list the discovered compilers as an exclude pattern!
38962    # If we do that, we can do this detection before POST_DETECTION, and still
38963    # find the build compilers in the tools dir, if needed.
38964
38965
38966  # Publish this variable in the help.
38967
38968
38969  if test "x$BUILD_CC" = x; then
38970    # The variable is not set by user, try to locate tool using the code snippet
38971    for ac_prog in cl cc gcc
38972do
38973  # Extract the first word of "$ac_prog", so it can be a program name with args.
38974set dummy $ac_prog; ac_word=$2
38975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38976$as_echo_n "checking for $ac_word... " >&6; }
38977if ${ac_cv_path_BUILD_CC+:} false; then :
38978  $as_echo_n "(cached) " >&6
38979else
38980  case $BUILD_CC in
38981  [\\/]* | ?:[\\/]*)
38982  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38983  ;;
38984  *)
38985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38986for as_dir in $PATH
38987do
38988  IFS=$as_save_IFS
38989  test -z "$as_dir" && as_dir=.
38990    for ac_exec_ext in '' $ac_executable_extensions; do
38991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38992    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38994    break 2
38995  fi
38996done
38997  done
38998IFS=$as_save_IFS
38999
39000  ;;
39001esac
39002fi
39003BUILD_CC=$ac_cv_path_BUILD_CC
39004if test -n "$BUILD_CC"; then
39005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39006$as_echo "$BUILD_CC" >&6; }
39007else
39008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39009$as_echo "no" >&6; }
39010fi
39011
39012
39013  test -n "$BUILD_CC" && break
39014done
39015
39016  else
39017    # The variable is set, but is it from the command line or the environment?
39018
39019    # Try to remove the string !BUILD_CC! from our list.
39020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39022      # If it failed, the variable was not from the command line. Ignore it,
39023      # but warn the user (except for BASH, which is always set by the calling BASH).
39024      if test "xBUILD_CC" != xBASH; then
39025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39026$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39027      fi
39028      # Try to locate tool using the code snippet
39029      for ac_prog in cl cc gcc
39030do
39031  # Extract the first word of "$ac_prog", so it can be a program name with args.
39032set dummy $ac_prog; ac_word=$2
39033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39034$as_echo_n "checking for $ac_word... " >&6; }
39035if ${ac_cv_path_BUILD_CC+:} false; then :
39036  $as_echo_n "(cached) " >&6
39037else
39038  case $BUILD_CC in
39039  [\\/]* | ?:[\\/]*)
39040  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39041  ;;
39042  *)
39043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39044for as_dir in $PATH
39045do
39046  IFS=$as_save_IFS
39047  test -z "$as_dir" && as_dir=.
39048    for ac_exec_ext in '' $ac_executable_extensions; do
39049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39050    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39052    break 2
39053  fi
39054done
39055  done
39056IFS=$as_save_IFS
39057
39058  ;;
39059esac
39060fi
39061BUILD_CC=$ac_cv_path_BUILD_CC
39062if test -n "$BUILD_CC"; then
39063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39064$as_echo "$BUILD_CC" >&6; }
39065else
39066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39067$as_echo "no" >&6; }
39068fi
39069
39070
39071  test -n "$BUILD_CC" && break
39072done
39073
39074    else
39075      # If it succeeded, then it was overridden by the user. We will use it
39076      # for the tool.
39077
39078      # First remove it from the list of overridden variables, so we can test
39079      # for unknown variables in the end.
39080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39081
39082      # Check if the provided tool contains a complete path.
39083      tool_specified="$BUILD_CC"
39084      tool_basename="${tool_specified##*/}"
39085      if test "x$tool_basename" = "x$tool_specified"; then
39086        # A command without a complete path is provided, search $PATH.
39087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39088$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39089        # Extract the first word of "$tool_basename", so it can be a program name with args.
39090set dummy $tool_basename; ac_word=$2
39091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39092$as_echo_n "checking for $ac_word... " >&6; }
39093if ${ac_cv_path_BUILD_CC+:} false; then :
39094  $as_echo_n "(cached) " >&6
39095else
39096  case $BUILD_CC in
39097  [\\/]* | ?:[\\/]*)
39098  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39099  ;;
39100  *)
39101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39102for as_dir in $PATH
39103do
39104  IFS=$as_save_IFS
39105  test -z "$as_dir" && as_dir=.
39106    for ac_exec_ext in '' $ac_executable_extensions; do
39107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39108    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39110    break 2
39111  fi
39112done
39113  done
39114IFS=$as_save_IFS
39115
39116  ;;
39117esac
39118fi
39119BUILD_CC=$ac_cv_path_BUILD_CC
39120if test -n "$BUILD_CC"; then
39121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39122$as_echo "$BUILD_CC" >&6; }
39123else
39124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39125$as_echo "no" >&6; }
39126fi
39127
39128
39129        if test "x$BUILD_CC" = x; then
39130          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39131        fi
39132      else
39133        # Otherwise we believe it is a complete path. Use it as it is.
39134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39135$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39137$as_echo_n "checking for BUILD_CC... " >&6; }
39138        if test ! -x "$tool_specified"; then
39139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39140$as_echo "not found" >&6; }
39141          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39142        fi
39143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39144$as_echo "$tool_specified" >&6; }
39145      fi
39146    fi
39147  fi
39148
39149
39150
39151  # Only process if variable expands to non-empty
39152
39153  if test "x$BUILD_CC" != x; then
39154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39155
39156  # First separate the path from the arguments. This will split at the first
39157  # space.
39158  complete="$BUILD_CC"
39159  path="${complete%% *}"
39160  tmp="$complete EOL"
39161  arguments="${tmp#* }"
39162
39163  # Input might be given as Windows format, start by converting to
39164  # unix format.
39165  new_path=`$CYGPATH -u "$path"`
39166
39167  # Now try to locate executable using which
39168  new_path=`$WHICH "$new_path" 2> /dev/null`
39169  # bat and cmd files are not always considered executable in cygwin causing which
39170  # to not find them
39171  if test "x$new_path" = x \
39172      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39173      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39174    new_path=`$CYGPATH -u "$path"`
39175  fi
39176  if test "x$new_path" = x; then
39177    # Oops. Which didn't find the executable.
39178    # The splitting of arguments from the executable at a space might have been incorrect,
39179    # since paths with space are more likely in Windows. Give it another try with the whole
39180    # argument.
39181    path="$complete"
39182    arguments="EOL"
39183    new_path=`$CYGPATH -u "$path"`
39184    new_path=`$WHICH "$new_path" 2> /dev/null`
39185    # bat and cmd files are not always considered executable in cygwin causing which
39186    # to not find them
39187    if test "x$new_path" = x \
39188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39190      new_path=`$CYGPATH -u "$path"`
39191    fi
39192    if test "x$new_path" = x; then
39193      # It's still not found. Now this is an unrecoverable error.
39194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39195$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39196      has_space=`$ECHO "$complete" | $GREP " "`
39197      if test "x$has_space" != x; then
39198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39200      fi
39201      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39202    fi
39203  fi
39204
39205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39208  # "foo.exe" is OK but "foo" is an error.
39209  #
39210  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39211  # It is also a way to make sure we got the proper file name for the real test later on.
39212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39213  if test "x$test_shortpath" = x; then
39214    # Short path failed, file does not exist as specified.
39215    # Try adding .exe or .cmd
39216    if test -f "${new_path}.exe"; then
39217      input_to_shortpath="${new_path}.exe"
39218    elif test -f "${new_path}.cmd"; then
39219      input_to_shortpath="${new_path}.cmd"
39220    else
39221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39222$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39223      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39225      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39226    fi
39227  else
39228    input_to_shortpath="$new_path"
39229  fi
39230
39231  # Call helper function which possibly converts this using DOS-style short mode.
39232  # If so, the updated path is stored in $new_path.
39233  new_path="$input_to_shortpath"
39234
39235  input_path="$input_to_shortpath"
39236  # Check if we need to convert this using DOS-style short mode. If the path
39237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39238  # take no chances and rewrite it.
39239  # Note: m4 eats our [], so we need to use [ and ] instead.
39240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39241  if test "x$has_forbidden_chars" != x; then
39242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39246      # Going to short mode and back again did indeed matter. Since short mode is
39247      # case insensitive, let's make it lowercase to improve readability.
39248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39249      # Now convert it back to Unix-style (cygpath)
39250      input_path=`$CYGPATH -u "$shortmode_path"`
39251      new_path="$input_path"
39252    fi
39253  fi
39254
39255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39256  if test "x$test_cygdrive_prefix" = x; then
39257    # As a simple fix, exclude /usr/bin since it's not a real path.
39258    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39260      # a path prefixed by /cygdrive for fixpath to work.
39261      new_path="$CYGWIN_ROOT_PATH$input_path"
39262    fi
39263  fi
39264
39265  # remove trailing .exe if any
39266  new_path="${new_path/%.exe/}"
39267
39268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39269
39270  # First separate the path from the arguments. This will split at the first
39271  # space.
39272  complete="$BUILD_CC"
39273  path="${complete%% *}"
39274  tmp="$complete EOL"
39275  arguments="${tmp#* }"
39276
39277  # Input might be given as Windows format, start by converting to
39278  # unix format.
39279  new_path="$path"
39280
39281  windows_path="$new_path"
39282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39283    unix_path=`$CYGPATH -u "$windows_path"`
39284    new_path="$unix_path"
39285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39287    new_path="$unix_path"
39288  fi
39289
39290
39291  # Now try to locate executable using which
39292  new_path=`$WHICH "$new_path" 2> /dev/null`
39293
39294  if test "x$new_path" = x; then
39295    # Oops. Which didn't find the executable.
39296    # The splitting of arguments from the executable at a space might have been incorrect,
39297    # since paths with space are more likely in Windows. Give it another try with the whole
39298    # argument.
39299    path="$complete"
39300    arguments="EOL"
39301    new_path="$path"
39302
39303  windows_path="$new_path"
39304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39305    unix_path=`$CYGPATH -u "$windows_path"`
39306    new_path="$unix_path"
39307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39309    new_path="$unix_path"
39310  fi
39311
39312
39313    new_path=`$WHICH "$new_path" 2> /dev/null`
39314    # bat and cmd files are not always considered executable in MSYS causing which
39315    # to not find them
39316    if test "x$new_path" = x \
39317        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39318        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39319      new_path="$path"
39320
39321  windows_path="$new_path"
39322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39323    unix_path=`$CYGPATH -u "$windows_path"`
39324    new_path="$unix_path"
39325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39327    new_path="$unix_path"
39328  fi
39329
39330    fi
39331
39332    if test "x$new_path" = x; then
39333      # It's still not found. Now this is an unrecoverable error.
39334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39335$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39336      has_space=`$ECHO "$complete" | $GREP " "`
39337      if test "x$has_space" != x; then
39338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39340      fi
39341      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39342    fi
39343  fi
39344
39345  # Now new_path has a complete unix path to the binary
39346  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39347    # Keep paths in /bin as-is, but remove trailing .exe if any
39348    new_path="${new_path/%.exe/}"
39349    # Do not save /bin paths to all_fixpath_prefixes!
39350  else
39351    # Not in mixed or Windows style, start by that.
39352    new_path=`cmd //c echo $new_path`
39353
39354  input_path="$new_path"
39355  # Check if we need to convert this using DOS-style short mode. If the path
39356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39357  # take no chances and rewrite it.
39358  # Note: m4 eats our [], so we need to use [ and ] instead.
39359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39360  if test "x$has_forbidden_chars" != x; then
39361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39363  fi
39364
39365    # Output is in $new_path
39366
39367  windows_path="$new_path"
39368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39369    unix_path=`$CYGPATH -u "$windows_path"`
39370    new_path="$unix_path"
39371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39373    new_path="$unix_path"
39374  fi
39375
39376    # remove trailing .exe if any
39377    new_path="${new_path/%.exe/}"
39378
39379    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39380    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39381  fi
39382
39383    else
39384      # We're on a unix platform. Hooray! :)
39385      # First separate the path from the arguments. This will split at the first
39386      # space.
39387      complete="$BUILD_CC"
39388      path="${complete%% *}"
39389      tmp="$complete EOL"
39390      arguments="${tmp#* }"
39391
39392      # Cannot rely on the command "which" here since it doesn't always work.
39393      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39394      if test -z "$is_absolute_path"; then
39395        # Path to executable is not absolute. Find it.
39396        IFS_save="$IFS"
39397        IFS=:
39398        for p in $PATH; do
39399          if test -f "$p/$path" && test -x "$p/$path"; then
39400            new_path="$p/$path"
39401            break
39402          fi
39403        done
39404        IFS="$IFS_save"
39405      else
39406        # This is an absolute path, we can use it without further modifications.
39407        new_path="$path"
39408      fi
39409
39410      if test "x$new_path" = x; then
39411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39412$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39413        has_space=`$ECHO "$complete" | $GREP " "`
39414        if test "x$has_space" != x; then
39415          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39417        fi
39418        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39419      fi
39420    fi
39421
39422    # Now join together the path and the arguments once again
39423    if test "x$arguments" != xEOL; then
39424      new_complete="$new_path ${arguments% *}"
39425    else
39426      new_complete="$new_path"
39427    fi
39428
39429    if test "x$complete" != "x$new_complete"; then
39430      BUILD_CC="$new_complete"
39431      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39432$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39433    fi
39434  fi
39435
39436
39437
39438  # Publish this variable in the help.
39439
39440
39441  if test "x$BUILD_CXX" = x; then
39442    # The variable is not set by user, try to locate tool using the code snippet
39443    for ac_prog in cl CC g++
39444do
39445  # Extract the first word of "$ac_prog", so it can be a program name with args.
39446set dummy $ac_prog; ac_word=$2
39447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39448$as_echo_n "checking for $ac_word... " >&6; }
39449if ${ac_cv_path_BUILD_CXX+:} false; then :
39450  $as_echo_n "(cached) " >&6
39451else
39452  case $BUILD_CXX in
39453  [\\/]* | ?:[\\/]*)
39454  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39455  ;;
39456  *)
39457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39458for as_dir in $PATH
39459do
39460  IFS=$as_save_IFS
39461  test -z "$as_dir" && as_dir=.
39462    for ac_exec_ext in '' $ac_executable_extensions; do
39463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39464    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39466    break 2
39467  fi
39468done
39469  done
39470IFS=$as_save_IFS
39471
39472  ;;
39473esac
39474fi
39475BUILD_CXX=$ac_cv_path_BUILD_CXX
39476if test -n "$BUILD_CXX"; then
39477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39478$as_echo "$BUILD_CXX" >&6; }
39479else
39480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39481$as_echo "no" >&6; }
39482fi
39483
39484
39485  test -n "$BUILD_CXX" && break
39486done
39487
39488  else
39489    # The variable is set, but is it from the command line or the environment?
39490
39491    # Try to remove the string !BUILD_CXX! from our list.
39492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39494      # If it failed, the variable was not from the command line. Ignore it,
39495      # but warn the user (except for BASH, which is always set by the calling BASH).
39496      if test "xBUILD_CXX" != xBASH; then
39497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39498$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39499      fi
39500      # Try to locate tool using the code snippet
39501      for ac_prog in cl CC g++
39502do
39503  # Extract the first word of "$ac_prog", so it can be a program name with args.
39504set dummy $ac_prog; ac_word=$2
39505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39506$as_echo_n "checking for $ac_word... " >&6; }
39507if ${ac_cv_path_BUILD_CXX+:} false; then :
39508  $as_echo_n "(cached) " >&6
39509else
39510  case $BUILD_CXX in
39511  [\\/]* | ?:[\\/]*)
39512  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39513  ;;
39514  *)
39515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39516for as_dir in $PATH
39517do
39518  IFS=$as_save_IFS
39519  test -z "$as_dir" && as_dir=.
39520    for ac_exec_ext in '' $ac_executable_extensions; do
39521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39522    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39524    break 2
39525  fi
39526done
39527  done
39528IFS=$as_save_IFS
39529
39530  ;;
39531esac
39532fi
39533BUILD_CXX=$ac_cv_path_BUILD_CXX
39534if test -n "$BUILD_CXX"; then
39535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39536$as_echo "$BUILD_CXX" >&6; }
39537else
39538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39539$as_echo "no" >&6; }
39540fi
39541
39542
39543  test -n "$BUILD_CXX" && break
39544done
39545
39546    else
39547      # If it succeeded, then it was overridden by the user. We will use it
39548      # for the tool.
39549
39550      # First remove it from the list of overridden variables, so we can test
39551      # for unknown variables in the end.
39552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39553
39554      # Check if the provided tool contains a complete path.
39555      tool_specified="$BUILD_CXX"
39556      tool_basename="${tool_specified##*/}"
39557      if test "x$tool_basename" = "x$tool_specified"; then
39558        # A command without a complete path is provided, search $PATH.
39559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39560$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39561        # Extract the first word of "$tool_basename", so it can be a program name with args.
39562set dummy $tool_basename; ac_word=$2
39563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39564$as_echo_n "checking for $ac_word... " >&6; }
39565if ${ac_cv_path_BUILD_CXX+:} false; then :
39566  $as_echo_n "(cached) " >&6
39567else
39568  case $BUILD_CXX in
39569  [\\/]* | ?:[\\/]*)
39570  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39571  ;;
39572  *)
39573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39574for as_dir in $PATH
39575do
39576  IFS=$as_save_IFS
39577  test -z "$as_dir" && as_dir=.
39578    for ac_exec_ext in '' $ac_executable_extensions; do
39579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39580    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39582    break 2
39583  fi
39584done
39585  done
39586IFS=$as_save_IFS
39587
39588  ;;
39589esac
39590fi
39591BUILD_CXX=$ac_cv_path_BUILD_CXX
39592if test -n "$BUILD_CXX"; then
39593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39594$as_echo "$BUILD_CXX" >&6; }
39595else
39596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39597$as_echo "no" >&6; }
39598fi
39599
39600
39601        if test "x$BUILD_CXX" = x; then
39602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39603        fi
39604      else
39605        # Otherwise we believe it is a complete path. Use it as it is.
39606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39607$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39609$as_echo_n "checking for BUILD_CXX... " >&6; }
39610        if test ! -x "$tool_specified"; then
39611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39612$as_echo "not found" >&6; }
39613          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39614        fi
39615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39616$as_echo "$tool_specified" >&6; }
39617      fi
39618    fi
39619  fi
39620
39621
39622
39623  # Only process if variable expands to non-empty
39624
39625  if test "x$BUILD_CXX" != x; then
39626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39627
39628  # First separate the path from the arguments. This will split at the first
39629  # space.
39630  complete="$BUILD_CXX"
39631  path="${complete%% *}"
39632  tmp="$complete EOL"
39633  arguments="${tmp#* }"
39634
39635  # Input might be given as Windows format, start by converting to
39636  # unix format.
39637  new_path=`$CYGPATH -u "$path"`
39638
39639  # Now try to locate executable using which
39640  new_path=`$WHICH "$new_path" 2> /dev/null`
39641  # bat and cmd files are not always considered executable in cygwin causing which
39642  # to not find them
39643  if test "x$new_path" = x \
39644      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39645      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39646    new_path=`$CYGPATH -u "$path"`
39647  fi
39648  if test "x$new_path" = x; then
39649    # Oops. Which didn't find the executable.
39650    # The splitting of arguments from the executable at a space might have been incorrect,
39651    # since paths with space are more likely in Windows. Give it another try with the whole
39652    # argument.
39653    path="$complete"
39654    arguments="EOL"
39655    new_path=`$CYGPATH -u "$path"`
39656    new_path=`$WHICH "$new_path" 2> /dev/null`
39657    # bat and cmd files are not always considered executable in cygwin causing which
39658    # to not find them
39659    if test "x$new_path" = x \
39660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39662      new_path=`$CYGPATH -u "$path"`
39663    fi
39664    if test "x$new_path" = x; then
39665      # It's still not found. Now this is an unrecoverable error.
39666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39667$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39668      has_space=`$ECHO "$complete" | $GREP " "`
39669      if test "x$has_space" != x; then
39670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39672      fi
39673      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39674    fi
39675  fi
39676
39677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39680  # "foo.exe" is OK but "foo" is an error.
39681  #
39682  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39683  # It is also a way to make sure we got the proper file name for the real test later on.
39684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39685  if test "x$test_shortpath" = x; then
39686    # Short path failed, file does not exist as specified.
39687    # Try adding .exe or .cmd
39688    if test -f "${new_path}.exe"; then
39689      input_to_shortpath="${new_path}.exe"
39690    elif test -f "${new_path}.cmd"; then
39691      input_to_shortpath="${new_path}.cmd"
39692    else
39693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39694$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39697      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39698    fi
39699  else
39700    input_to_shortpath="$new_path"
39701  fi
39702
39703  # Call helper function which possibly converts this using DOS-style short mode.
39704  # If so, the updated path is stored in $new_path.
39705  new_path="$input_to_shortpath"
39706
39707  input_path="$input_to_shortpath"
39708  # Check if we need to convert this using DOS-style short mode. If the path
39709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39710  # take no chances and rewrite it.
39711  # Note: m4 eats our [], so we need to use [ and ] instead.
39712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39713  if test "x$has_forbidden_chars" != x; then
39714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39718      # Going to short mode and back again did indeed matter. Since short mode is
39719      # case insensitive, let's make it lowercase to improve readability.
39720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39721      # Now convert it back to Unix-style (cygpath)
39722      input_path=`$CYGPATH -u "$shortmode_path"`
39723      new_path="$input_path"
39724    fi
39725  fi
39726
39727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39728  if test "x$test_cygdrive_prefix" = x; then
39729    # As a simple fix, exclude /usr/bin since it's not a real path.
39730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39732      # a path prefixed by /cygdrive for fixpath to work.
39733      new_path="$CYGWIN_ROOT_PATH$input_path"
39734    fi
39735  fi
39736
39737  # remove trailing .exe if any
39738  new_path="${new_path/%.exe/}"
39739
39740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39741
39742  # First separate the path from the arguments. This will split at the first
39743  # space.
39744  complete="$BUILD_CXX"
39745  path="${complete%% *}"
39746  tmp="$complete EOL"
39747  arguments="${tmp#* }"
39748
39749  # Input might be given as Windows format, start by converting to
39750  # unix format.
39751  new_path="$path"
39752
39753  windows_path="$new_path"
39754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39755    unix_path=`$CYGPATH -u "$windows_path"`
39756    new_path="$unix_path"
39757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39759    new_path="$unix_path"
39760  fi
39761
39762
39763  # Now try to locate executable using which
39764  new_path=`$WHICH "$new_path" 2> /dev/null`
39765
39766  if test "x$new_path" = x; then
39767    # Oops. Which didn't find the executable.
39768    # The splitting of arguments from the executable at a space might have been incorrect,
39769    # since paths with space are more likely in Windows. Give it another try with the whole
39770    # argument.
39771    path="$complete"
39772    arguments="EOL"
39773    new_path="$path"
39774
39775  windows_path="$new_path"
39776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39777    unix_path=`$CYGPATH -u "$windows_path"`
39778    new_path="$unix_path"
39779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39781    new_path="$unix_path"
39782  fi
39783
39784
39785    new_path=`$WHICH "$new_path" 2> /dev/null`
39786    # bat and cmd files are not always considered executable in MSYS causing which
39787    # to not find them
39788    if test "x$new_path" = x \
39789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39791      new_path="$path"
39792
39793  windows_path="$new_path"
39794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39795    unix_path=`$CYGPATH -u "$windows_path"`
39796    new_path="$unix_path"
39797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39799    new_path="$unix_path"
39800  fi
39801
39802    fi
39803
39804    if test "x$new_path" = x; then
39805      # It's still not found. Now this is an unrecoverable error.
39806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39807$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39808      has_space=`$ECHO "$complete" | $GREP " "`
39809      if test "x$has_space" != x; then
39810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39812      fi
39813      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39814    fi
39815  fi
39816
39817  # Now new_path has a complete unix path to the binary
39818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39819    # Keep paths in /bin as-is, but remove trailing .exe if any
39820    new_path="${new_path/%.exe/}"
39821    # Do not save /bin paths to all_fixpath_prefixes!
39822  else
39823    # Not in mixed or Windows style, start by that.
39824    new_path=`cmd //c echo $new_path`
39825
39826  input_path="$new_path"
39827  # Check if we need to convert this using DOS-style short mode. If the path
39828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39829  # take no chances and rewrite it.
39830  # Note: m4 eats our [], so we need to use [ and ] instead.
39831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39832  if test "x$has_forbidden_chars" != x; then
39833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39835  fi
39836
39837    # Output is in $new_path
39838
39839  windows_path="$new_path"
39840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39841    unix_path=`$CYGPATH -u "$windows_path"`
39842    new_path="$unix_path"
39843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39845    new_path="$unix_path"
39846  fi
39847
39848    # remove trailing .exe if any
39849    new_path="${new_path/%.exe/}"
39850
39851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39853  fi
39854
39855    else
39856      # We're on a unix platform. Hooray! :)
39857      # First separate the path from the arguments. This will split at the first
39858      # space.
39859      complete="$BUILD_CXX"
39860      path="${complete%% *}"
39861      tmp="$complete EOL"
39862      arguments="${tmp#* }"
39863
39864      # Cannot rely on the command "which" here since it doesn't always work.
39865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39866      if test -z "$is_absolute_path"; then
39867        # Path to executable is not absolute. Find it.
39868        IFS_save="$IFS"
39869        IFS=:
39870        for p in $PATH; do
39871          if test -f "$p/$path" && test -x "$p/$path"; then
39872            new_path="$p/$path"
39873            break
39874          fi
39875        done
39876        IFS="$IFS_save"
39877      else
39878        # This is an absolute path, we can use it without further modifications.
39879        new_path="$path"
39880      fi
39881
39882      if test "x$new_path" = x; then
39883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39884$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39885        has_space=`$ECHO "$complete" | $GREP " "`
39886        if test "x$has_space" != x; then
39887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39889        fi
39890        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39891      fi
39892    fi
39893
39894    # Now join together the path and the arguments once again
39895    if test "x$arguments" != xEOL; then
39896      new_complete="$new_path ${arguments% *}"
39897    else
39898      new_complete="$new_path"
39899    fi
39900
39901    if test "x$complete" != "x$new_complete"; then
39902      BUILD_CXX="$new_complete"
39903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39904$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39905    fi
39906  fi
39907
39908
39909
39910  # Publish this variable in the help.
39911
39912
39913  if test "x$BUILD_LD" = x; then
39914    # The variable is not set by user, try to locate tool using the code snippet
39915    for ac_prog in ld
39916do
39917  # Extract the first word of "$ac_prog", so it can be a program name with args.
39918set dummy $ac_prog; ac_word=$2
39919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39920$as_echo_n "checking for $ac_word... " >&6; }
39921if ${ac_cv_path_BUILD_LD+:} false; then :
39922  $as_echo_n "(cached) " >&6
39923else
39924  case $BUILD_LD in
39925  [\\/]* | ?:[\\/]*)
39926  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39927  ;;
39928  *)
39929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39930for as_dir in $PATH
39931do
39932  IFS=$as_save_IFS
39933  test -z "$as_dir" && as_dir=.
39934    for ac_exec_ext in '' $ac_executable_extensions; do
39935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39936    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39938    break 2
39939  fi
39940done
39941  done
39942IFS=$as_save_IFS
39943
39944  ;;
39945esac
39946fi
39947BUILD_LD=$ac_cv_path_BUILD_LD
39948if test -n "$BUILD_LD"; then
39949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39950$as_echo "$BUILD_LD" >&6; }
39951else
39952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39953$as_echo "no" >&6; }
39954fi
39955
39956
39957  test -n "$BUILD_LD" && break
39958done
39959
39960  else
39961    # The variable is set, but is it from the command line or the environment?
39962
39963    # Try to remove the string !BUILD_LD! from our list.
39964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39966      # If it failed, the variable was not from the command line. Ignore it,
39967      # but warn the user (except for BASH, which is always set by the calling BASH).
39968      if test "xBUILD_LD" != xBASH; then
39969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39970$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39971      fi
39972      # Try to locate tool using the code snippet
39973      for ac_prog in ld
39974do
39975  # Extract the first word of "$ac_prog", so it can be a program name with args.
39976set dummy $ac_prog; ac_word=$2
39977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39978$as_echo_n "checking for $ac_word... " >&6; }
39979if ${ac_cv_path_BUILD_LD+:} false; then :
39980  $as_echo_n "(cached) " >&6
39981else
39982  case $BUILD_LD in
39983  [\\/]* | ?:[\\/]*)
39984  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39985  ;;
39986  *)
39987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39988for as_dir in $PATH
39989do
39990  IFS=$as_save_IFS
39991  test -z "$as_dir" && as_dir=.
39992    for ac_exec_ext in '' $ac_executable_extensions; do
39993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39994    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39996    break 2
39997  fi
39998done
39999  done
40000IFS=$as_save_IFS
40001
40002  ;;
40003esac
40004fi
40005BUILD_LD=$ac_cv_path_BUILD_LD
40006if test -n "$BUILD_LD"; then
40007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40008$as_echo "$BUILD_LD" >&6; }
40009else
40010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40011$as_echo "no" >&6; }
40012fi
40013
40014
40015  test -n "$BUILD_LD" && break
40016done
40017
40018    else
40019      # If it succeeded, then it was overridden by the user. We will use it
40020      # for the tool.
40021
40022      # First remove it from the list of overridden variables, so we can test
40023      # for unknown variables in the end.
40024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40025
40026      # Check if the provided tool contains a complete path.
40027      tool_specified="$BUILD_LD"
40028      tool_basename="${tool_specified##*/}"
40029      if test "x$tool_basename" = "x$tool_specified"; then
40030        # A command without a complete path is provided, search $PATH.
40031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40032$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40033        # Extract the first word of "$tool_basename", so it can be a program name with args.
40034set dummy $tool_basename; ac_word=$2
40035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40036$as_echo_n "checking for $ac_word... " >&6; }
40037if ${ac_cv_path_BUILD_LD+:} false; then :
40038  $as_echo_n "(cached) " >&6
40039else
40040  case $BUILD_LD in
40041  [\\/]* | ?:[\\/]*)
40042  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40043  ;;
40044  *)
40045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40046for as_dir in $PATH
40047do
40048  IFS=$as_save_IFS
40049  test -z "$as_dir" && as_dir=.
40050    for ac_exec_ext in '' $ac_executable_extensions; do
40051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40052    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40054    break 2
40055  fi
40056done
40057  done
40058IFS=$as_save_IFS
40059
40060  ;;
40061esac
40062fi
40063BUILD_LD=$ac_cv_path_BUILD_LD
40064if test -n "$BUILD_LD"; then
40065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40066$as_echo "$BUILD_LD" >&6; }
40067else
40068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40069$as_echo "no" >&6; }
40070fi
40071
40072
40073        if test "x$BUILD_LD" = x; then
40074          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40075        fi
40076      else
40077        # Otherwise we believe it is a complete path. Use it as it is.
40078        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40079$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40080        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40081$as_echo_n "checking for BUILD_LD... " >&6; }
40082        if test ! -x "$tool_specified"; then
40083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40084$as_echo "not found" >&6; }
40085          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40086        fi
40087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40088$as_echo "$tool_specified" >&6; }
40089      fi
40090    fi
40091  fi
40092
40093
40094
40095  # Only process if variable expands to non-empty
40096
40097  if test "x$BUILD_LD" != x; then
40098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40099
40100  # First separate the path from the arguments. This will split at the first
40101  # space.
40102  complete="$BUILD_LD"
40103  path="${complete%% *}"
40104  tmp="$complete EOL"
40105  arguments="${tmp#* }"
40106
40107  # Input might be given as Windows format, start by converting to
40108  # unix format.
40109  new_path=`$CYGPATH -u "$path"`
40110
40111  # Now try to locate executable using which
40112  new_path=`$WHICH "$new_path" 2> /dev/null`
40113  # bat and cmd files are not always considered executable in cygwin causing which
40114  # to not find them
40115  if test "x$new_path" = x \
40116      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40117      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40118    new_path=`$CYGPATH -u "$path"`
40119  fi
40120  if test "x$new_path" = x; then
40121    # Oops. Which didn't find the executable.
40122    # The splitting of arguments from the executable at a space might have been incorrect,
40123    # since paths with space are more likely in Windows. Give it another try with the whole
40124    # argument.
40125    path="$complete"
40126    arguments="EOL"
40127    new_path=`$CYGPATH -u "$path"`
40128    new_path=`$WHICH "$new_path" 2> /dev/null`
40129    # bat and cmd files are not always considered executable in cygwin causing which
40130    # to not find them
40131    if test "x$new_path" = x \
40132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40134      new_path=`$CYGPATH -u "$path"`
40135    fi
40136    if test "x$new_path" = x; then
40137      # It's still not found. Now this is an unrecoverable error.
40138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40139$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40140      has_space=`$ECHO "$complete" | $GREP " "`
40141      if test "x$has_space" != x; then
40142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40144      fi
40145      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40146    fi
40147  fi
40148
40149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40152  # "foo.exe" is OK but "foo" is an error.
40153  #
40154  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40155  # It is also a way to make sure we got the proper file name for the real test later on.
40156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40157  if test "x$test_shortpath" = x; then
40158    # Short path failed, file does not exist as specified.
40159    # Try adding .exe or .cmd
40160    if test -f "${new_path}.exe"; then
40161      input_to_shortpath="${new_path}.exe"
40162    elif test -f "${new_path}.cmd"; then
40163      input_to_shortpath="${new_path}.cmd"
40164    else
40165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40166$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40167      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40168$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40169      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40170    fi
40171  else
40172    input_to_shortpath="$new_path"
40173  fi
40174
40175  # Call helper function which possibly converts this using DOS-style short mode.
40176  # If so, the updated path is stored in $new_path.
40177  new_path="$input_to_shortpath"
40178
40179  input_path="$input_to_shortpath"
40180  # Check if we need to convert this using DOS-style short mode. If the path
40181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40182  # take no chances and rewrite it.
40183  # Note: m4 eats our [], so we need to use [ and ] instead.
40184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40185  if test "x$has_forbidden_chars" != x; then
40186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40190      # Going to short mode and back again did indeed matter. Since short mode is
40191      # case insensitive, let's make it lowercase to improve readability.
40192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40193      # Now convert it back to Unix-style (cygpath)
40194      input_path=`$CYGPATH -u "$shortmode_path"`
40195      new_path="$input_path"
40196    fi
40197  fi
40198
40199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40200  if test "x$test_cygdrive_prefix" = x; then
40201    # As a simple fix, exclude /usr/bin since it's not a real path.
40202    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40204      # a path prefixed by /cygdrive for fixpath to work.
40205      new_path="$CYGWIN_ROOT_PATH$input_path"
40206    fi
40207  fi
40208
40209  # remove trailing .exe if any
40210  new_path="${new_path/%.exe/}"
40211
40212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40213
40214  # First separate the path from the arguments. This will split at the first
40215  # space.
40216  complete="$BUILD_LD"
40217  path="${complete%% *}"
40218  tmp="$complete EOL"
40219  arguments="${tmp#* }"
40220
40221  # Input might be given as Windows format, start by converting to
40222  # unix format.
40223  new_path="$path"
40224
40225  windows_path="$new_path"
40226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40227    unix_path=`$CYGPATH -u "$windows_path"`
40228    new_path="$unix_path"
40229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40231    new_path="$unix_path"
40232  fi
40233
40234
40235  # Now try to locate executable using which
40236  new_path=`$WHICH "$new_path" 2> /dev/null`
40237
40238  if test "x$new_path" = x; then
40239    # Oops. Which didn't find the executable.
40240    # The splitting of arguments from the executable at a space might have been incorrect,
40241    # since paths with space are more likely in Windows. Give it another try with the whole
40242    # argument.
40243    path="$complete"
40244    arguments="EOL"
40245    new_path="$path"
40246
40247  windows_path="$new_path"
40248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40249    unix_path=`$CYGPATH -u "$windows_path"`
40250    new_path="$unix_path"
40251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40253    new_path="$unix_path"
40254  fi
40255
40256
40257    new_path=`$WHICH "$new_path" 2> /dev/null`
40258    # bat and cmd files are not always considered executable in MSYS causing which
40259    # to not find them
40260    if test "x$new_path" = x \
40261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40263      new_path="$path"
40264
40265  windows_path="$new_path"
40266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40267    unix_path=`$CYGPATH -u "$windows_path"`
40268    new_path="$unix_path"
40269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40271    new_path="$unix_path"
40272  fi
40273
40274    fi
40275
40276    if test "x$new_path" = x; then
40277      # It's still not found. Now this is an unrecoverable error.
40278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40279$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40280      has_space=`$ECHO "$complete" | $GREP " "`
40281      if test "x$has_space" != x; then
40282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40284      fi
40285      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40286    fi
40287  fi
40288
40289  # Now new_path has a complete unix path to the binary
40290  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40291    # Keep paths in /bin as-is, but remove trailing .exe if any
40292    new_path="${new_path/%.exe/}"
40293    # Do not save /bin paths to all_fixpath_prefixes!
40294  else
40295    # Not in mixed or Windows style, start by that.
40296    new_path=`cmd //c echo $new_path`
40297
40298  input_path="$new_path"
40299  # Check if we need to convert this using DOS-style short mode. If the path
40300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40301  # take no chances and rewrite it.
40302  # Note: m4 eats our [], so we need to use [ and ] instead.
40303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40304  if test "x$has_forbidden_chars" != x; then
40305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40307  fi
40308
40309    # Output is in $new_path
40310
40311  windows_path="$new_path"
40312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40313    unix_path=`$CYGPATH -u "$windows_path"`
40314    new_path="$unix_path"
40315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40317    new_path="$unix_path"
40318  fi
40319
40320    # remove trailing .exe if any
40321    new_path="${new_path/%.exe/}"
40322
40323    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40324    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40325  fi
40326
40327    else
40328      # We're on a unix platform. Hooray! :)
40329      # First separate the path from the arguments. This will split at the first
40330      # space.
40331      complete="$BUILD_LD"
40332      path="${complete%% *}"
40333      tmp="$complete EOL"
40334      arguments="${tmp#* }"
40335
40336      # Cannot rely on the command "which" here since it doesn't always work.
40337      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40338      if test -z "$is_absolute_path"; then
40339        # Path to executable is not absolute. Find it.
40340        IFS_save="$IFS"
40341        IFS=:
40342        for p in $PATH; do
40343          if test -f "$p/$path" && test -x "$p/$path"; then
40344            new_path="$p/$path"
40345            break
40346          fi
40347        done
40348        IFS="$IFS_save"
40349      else
40350        # This is an absolute path, we can use it without further modifications.
40351        new_path="$path"
40352      fi
40353
40354      if test "x$new_path" = x; then
40355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40356$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40357        has_space=`$ECHO "$complete" | $GREP " "`
40358        if test "x$has_space" != x; then
40359          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40361        fi
40362        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40363      fi
40364    fi
40365
40366    # Now join together the path and the arguments once again
40367    if test "x$arguments" != xEOL; then
40368      new_complete="$new_path ${arguments% *}"
40369    else
40370      new_complete="$new_path"
40371    fi
40372
40373    if test "x$complete" != "x$new_complete"; then
40374      BUILD_LD="$new_complete"
40375      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40376$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40377    fi
40378  fi
40379
40380  else
40381    # If we are not cross compiling, use the normal target compilers for
40382    # building the build platform executables.
40383    BUILD_CC="$CC"
40384    BUILD_CXX="$CXX"
40385    BUILD_LD="$LD"
40386  fi
40387
40388
40389
40390
40391
40392
40393  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40394    # For hotspot, we need these in Windows mixed path,
40395    # so rewrite them all. Need added .exe suffix.
40396    HOTSPOT_CXX="$CXX.exe"
40397    HOTSPOT_LD="$LD.exe"
40398    HOTSPOT_MT="$MT.exe"
40399    HOTSPOT_RC="$RC.exe"
40400
40401  unix_path="$HOTSPOT_CXX"
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403    windows_path=`$CYGPATH -m "$unix_path"`
40404    HOTSPOT_CXX="$windows_path"
40405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40406    windows_path=`cmd //c echo $unix_path`
40407    HOTSPOT_CXX="$windows_path"
40408  fi
40409
40410
40411  unix_path="$HOTSPOT_LD"
40412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40413    windows_path=`$CYGPATH -m "$unix_path"`
40414    HOTSPOT_LD="$windows_path"
40415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40416    windows_path=`cmd //c echo $unix_path`
40417    HOTSPOT_LD="$windows_path"
40418  fi
40419
40420
40421  unix_path="$HOTSPOT_MT"
40422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40423    windows_path=`$CYGPATH -m "$unix_path"`
40424    HOTSPOT_MT="$windows_path"
40425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40426    windows_path=`cmd //c echo $unix_path`
40427    HOTSPOT_MT="$windows_path"
40428  fi
40429
40430
40431  unix_path="$HOTSPOT_RC"
40432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40433    windows_path=`$CYGPATH -m "$unix_path"`
40434    HOTSPOT_RC="$windows_path"
40435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40436    windows_path=`cmd //c echo $unix_path`
40437    HOTSPOT_RC="$windows_path"
40438  fi
40439
40440
40441
40442  else
40443    HOTSPOT_CXX="$CXX"
40444    HOTSPOT_LD="$LD"
40445  fi
40446
40447
40448
40449  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40450    USE_CLANG=true
40451  fi
40452
40453
40454
40455
40456
40457  # The package path is used only on macosx?
40458  # FIXME: clean this up, and/or move it elsewhere.
40459  PACKAGE_PATH=/opt/local
40460
40461
40462  # Check for extra potential brokenness.
40463  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40464    # On Windows, double-check that we got the right compiler.
40465    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40466    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40467    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40468      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40469        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40470      fi
40471    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40472      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40473        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40474      fi
40475    fi
40476  fi
40477
40478  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40479    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40480    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40481    # This is later checked when setting flags.
40482
40483    # "-Og" suppported for GCC 4.8 and later
40484    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40485
40486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40487$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40488  supports=yes
40489
40490  saved_cflags="$CFLAGS"
40491  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40492  ac_ext=c
40493ac_cpp='$CPP $CPPFLAGS'
40494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40496ac_compiler_gnu=$ac_cv_c_compiler_gnu
40497
40498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40499/* end confdefs.h.  */
40500int i;
40501_ACEOF
40502if ac_fn_c_try_compile "$LINENO"; then :
40503
40504else
40505  supports=no
40506fi
40507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40508  ac_ext=cpp
40509ac_cpp='$CXXCPP $CPPFLAGS'
40510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40513
40514  CFLAGS="$saved_cflags"
40515
40516  saved_cxxflags="$CXXFLAGS"
40517  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40518  ac_ext=cpp
40519ac_cpp='$CXXCPP $CPPFLAGS'
40520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40523
40524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40525/* end confdefs.h.  */
40526int i;
40527_ACEOF
40528if ac_fn_cxx_try_compile "$LINENO"; then :
40529
40530else
40531  supports=no
40532fi
40533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40534  ac_ext=cpp
40535ac_cpp='$CXXCPP $CPPFLAGS'
40536ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40537ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40538ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40539
40540  CXXFLAGS="$saved_cxxflags"
40541
40542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40543$as_echo "$supports" >&6; }
40544  if test "x$supports" = "xyes" ; then
40545    HAS_CFLAG_OPTIMIZE_DEBUG=true
40546  else
40547    HAS_CFLAG_OPTIMIZE_DEBUG=false
40548  fi
40549
40550
40551    # "-z relro" supported in GNU binutils 2.17 and later
40552    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40553
40554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40555$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40556  supports=yes
40557
40558  saved_ldflags="$LDFLAGS"
40559  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40560  ac_ext=c
40561ac_cpp='$CPP $CPPFLAGS'
40562ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40563ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40564ac_compiler_gnu=$ac_cv_c_compiler_gnu
40565
40566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40567/* end confdefs.h.  */
40568
40569int
40570main ()
40571{
40572
40573  ;
40574  return 0;
40575}
40576_ACEOF
40577if ac_fn_c_try_link "$LINENO"; then :
40578
40579else
40580  supports=no
40581fi
40582rm -f core conftest.err conftest.$ac_objext \
40583    conftest$ac_exeext conftest.$ac_ext
40584  ac_ext=cpp
40585ac_cpp='$CXXCPP $CPPFLAGS'
40586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40589
40590  LDFLAGS="$saved_ldflags"
40591
40592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40593$as_echo "$supports" >&6; }
40594  if test "x$supports" = "xyes" ; then
40595    HAS_LINKER_RELRO=true
40596  else
40597    HAS_LINKER_RELRO=false
40598  fi
40599
40600
40601    # "-z now" supported in GNU binutils 2.11 and later
40602    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40603
40604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40605$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40606  supports=yes
40607
40608  saved_ldflags="$LDFLAGS"
40609  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40610  ac_ext=c
40611ac_cpp='$CPP $CPPFLAGS'
40612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40614ac_compiler_gnu=$ac_cv_c_compiler_gnu
40615
40616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40617/* end confdefs.h.  */
40618
40619int
40620main ()
40621{
40622
40623  ;
40624  return 0;
40625}
40626_ACEOF
40627if ac_fn_c_try_link "$LINENO"; then :
40628
40629else
40630  supports=no
40631fi
40632rm -f core conftest.err conftest.$ac_objext \
40633    conftest$ac_exeext conftest.$ac_ext
40634  ac_ext=cpp
40635ac_cpp='$CXXCPP $CPPFLAGS'
40636ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40637ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40638ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40639
40640  LDFLAGS="$saved_ldflags"
40641
40642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40643$as_echo "$supports" >&6; }
40644  if test "x$supports" = "xyes" ; then
40645    HAS_LINKER_NOW=true
40646  else
40647    HAS_LINKER_NOW=false
40648  fi
40649
40650  fi
40651
40652  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40653  # in executable.'
40654  USING_BROKEN_SUSE_LD=no
40655  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40657$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40658    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40659    $ECHO "int main() { }" > main.c
40660    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40662$as_echo "no" >&6; }
40663      USING_BROKEN_SUSE_LD=no
40664    else
40665      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40666$as_echo "yes" >&6; }
40667      USING_BROKEN_SUSE_LD=yes
40668    fi
40669    rm -rf version-script.map main.c a.out
40670  fi
40671
40672
40673
40674# Setup the JTReg Regression Test Harness.
40675
40676
40677# Check whether --with-jtreg was given.
40678if test "${with_jtreg+set}" = set; then :
40679  withval=$with_jtreg;
40680else
40681  with_jtreg=no
40682fi
40683
40684
40685  if test "x$with_jtreg" = xno; then
40686    # jtreg disabled
40687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40688$as_echo_n "checking for jtreg... " >&6; }
40689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40690$as_echo "no" >&6; }
40691  else
40692    if test "x$with_jtreg" != xyes; then
40693      # with path specified.
40694      JT_HOME="$with_jtreg"
40695    fi
40696
40697    if test "x$JT_HOME" != x; then
40698      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40699$as_echo_n "checking for jtreg... " >&6; }
40700
40701      # use JT_HOME enviroment var.
40702
40703  # Only process if variable expands to non-empty
40704
40705  if test "x$JT_HOME" != x; then
40706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40707
40708  # Input might be given as Windows format, start by converting to
40709  # unix format.
40710  path="$JT_HOME"
40711  new_path=`$CYGPATH -u "$path"`
40712
40713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40716  # "foo.exe" is OK but "foo" is an error.
40717  #
40718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40719  # It is also a way to make sure we got the proper file name for the real test later on.
40720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40721  if test "x$test_shortpath" = x; then
40722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40723$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40724    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40725  fi
40726
40727  # Call helper function which possibly converts this using DOS-style short mode.
40728  # If so, the updated path is stored in $new_path.
40729
40730  input_path="$new_path"
40731  # Check if we need to convert this using DOS-style short mode. If the path
40732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40733  # take no chances and rewrite it.
40734  # Note: m4 eats our [], so we need to use [ and ] instead.
40735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40736  if test "x$has_forbidden_chars" != x; then
40737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40741      # Going to short mode and back again did indeed matter. Since short mode is
40742      # case insensitive, let's make it lowercase to improve readability.
40743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40744      # Now convert it back to Unix-style (cygpath)
40745      input_path=`$CYGPATH -u "$shortmode_path"`
40746      new_path="$input_path"
40747    fi
40748  fi
40749
40750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40751  if test "x$test_cygdrive_prefix" = x; then
40752    # As a simple fix, exclude /usr/bin since it's not a real path.
40753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40755      # a path prefixed by /cygdrive for fixpath to work.
40756      new_path="$CYGWIN_ROOT_PATH$input_path"
40757    fi
40758  fi
40759
40760
40761  if test "x$path" != "x$new_path"; then
40762    JT_HOME="$new_path"
40763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40764$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40765  fi
40766
40767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40768
40769  path="$JT_HOME"
40770  has_colon=`$ECHO $path | $GREP ^.:`
40771  new_path="$path"
40772  if test "x$has_colon" = x; then
40773    # Not in mixed or Windows style, start by that.
40774    new_path=`cmd //c echo $path`
40775  fi
40776
40777
40778  input_path="$new_path"
40779  # Check if we need to convert this using DOS-style short mode. If the path
40780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40781  # take no chances and rewrite it.
40782  # Note: m4 eats our [], so we need to use [ and ] instead.
40783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40784  if test "x$has_forbidden_chars" != x; then
40785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40787  fi
40788
40789
40790  windows_path="$new_path"
40791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40792    unix_path=`$CYGPATH -u "$windows_path"`
40793    new_path="$unix_path"
40794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40796    new_path="$unix_path"
40797  fi
40798
40799  if test "x$path" != "x$new_path"; then
40800    JT_HOME="$new_path"
40801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40802$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40803  fi
40804
40805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40807
40808    else
40809      # We're on a unix platform. Hooray! :)
40810      path="$JT_HOME"
40811      has_space=`$ECHO "$path" | $GREP " "`
40812      if test "x$has_space" != x; then
40813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40814$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40816      fi
40817
40818      # Use eval to expand a potential ~
40819      eval path="$path"
40820      if test ! -f "$path" && test ! -d "$path"; then
40821        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40822      fi
40823
40824      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40825    fi
40826  fi
40827
40828
40829      # jtreg win32 script works for everybody
40830      JTREGEXE="$JT_HOME/bin/jtreg"
40831
40832      if test ! -f "$JTREGEXE"; then
40833        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40834      fi
40835
40836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40837$as_echo "$JTREGEXE" >&6; }
40838    else
40839      # try to find jtreg on path
40840
40841
40842
40843  # Publish this variable in the help.
40844
40845
40846  if test "x$JTREGEXE" = x; then
40847    # The variable is not set by user, try to locate tool using the code snippet
40848    for ac_prog in jtreg
40849do
40850  # Extract the first word of "$ac_prog", so it can be a program name with args.
40851set dummy $ac_prog; ac_word=$2
40852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40853$as_echo_n "checking for $ac_word... " >&6; }
40854if ${ac_cv_path_JTREGEXE+:} false; then :
40855  $as_echo_n "(cached) " >&6
40856else
40857  case $JTREGEXE in
40858  [\\/]* | ?:[\\/]*)
40859  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40860  ;;
40861  *)
40862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40863for as_dir in $PATH
40864do
40865  IFS=$as_save_IFS
40866  test -z "$as_dir" && as_dir=.
40867    for ac_exec_ext in '' $ac_executable_extensions; do
40868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40869    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40871    break 2
40872  fi
40873done
40874  done
40875IFS=$as_save_IFS
40876
40877  ;;
40878esac
40879fi
40880JTREGEXE=$ac_cv_path_JTREGEXE
40881if test -n "$JTREGEXE"; then
40882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40883$as_echo "$JTREGEXE" >&6; }
40884else
40885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40886$as_echo "no" >&6; }
40887fi
40888
40889
40890  test -n "$JTREGEXE" && break
40891done
40892
40893  else
40894    # The variable is set, but is it from the command line or the environment?
40895
40896    # Try to remove the string !JTREGEXE! from our list.
40897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40899      # If it failed, the variable was not from the command line. Ignore it,
40900      # but warn the user (except for BASH, which is always set by the calling BASH).
40901      if test "xJTREGEXE" != xBASH; then
40902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40903$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40904      fi
40905      # Try to locate tool using the code snippet
40906      for ac_prog in jtreg
40907do
40908  # Extract the first word of "$ac_prog", so it can be a program name with args.
40909set dummy $ac_prog; ac_word=$2
40910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40911$as_echo_n "checking for $ac_word... " >&6; }
40912if ${ac_cv_path_JTREGEXE+:} false; then :
40913  $as_echo_n "(cached) " >&6
40914else
40915  case $JTREGEXE in
40916  [\\/]* | ?:[\\/]*)
40917  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40918  ;;
40919  *)
40920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40921for as_dir in $PATH
40922do
40923  IFS=$as_save_IFS
40924  test -z "$as_dir" && as_dir=.
40925    for ac_exec_ext in '' $ac_executable_extensions; do
40926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40927    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40929    break 2
40930  fi
40931done
40932  done
40933IFS=$as_save_IFS
40934
40935  ;;
40936esac
40937fi
40938JTREGEXE=$ac_cv_path_JTREGEXE
40939if test -n "$JTREGEXE"; then
40940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40941$as_echo "$JTREGEXE" >&6; }
40942else
40943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40944$as_echo "no" >&6; }
40945fi
40946
40947
40948  test -n "$JTREGEXE" && break
40949done
40950
40951    else
40952      # If it succeeded, then it was overridden by the user. We will use it
40953      # for the tool.
40954
40955      # First remove it from the list of overridden variables, so we can test
40956      # for unknown variables in the end.
40957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40958
40959      # Check if the provided tool contains a complete path.
40960      tool_specified="$JTREGEXE"
40961      tool_basename="${tool_specified##*/}"
40962      if test "x$tool_basename" = "x$tool_specified"; then
40963        # A command without a complete path is provided, search $PATH.
40964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40965$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40966        # Extract the first word of "$tool_basename", so it can be a program name with args.
40967set dummy $tool_basename; ac_word=$2
40968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40969$as_echo_n "checking for $ac_word... " >&6; }
40970if ${ac_cv_path_JTREGEXE+:} false; then :
40971  $as_echo_n "(cached) " >&6
40972else
40973  case $JTREGEXE in
40974  [\\/]* | ?:[\\/]*)
40975  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40976  ;;
40977  *)
40978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40979for as_dir in $PATH
40980do
40981  IFS=$as_save_IFS
40982  test -z "$as_dir" && as_dir=.
40983    for ac_exec_ext in '' $ac_executable_extensions; do
40984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40985    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40987    break 2
40988  fi
40989done
40990  done
40991IFS=$as_save_IFS
40992
40993  ;;
40994esac
40995fi
40996JTREGEXE=$ac_cv_path_JTREGEXE
40997if test -n "$JTREGEXE"; then
40998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40999$as_echo "$JTREGEXE" >&6; }
41000else
41001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41002$as_echo "no" >&6; }
41003fi
41004
41005
41006        if test "x$JTREGEXE" = x; then
41007          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41008        fi
41009      else
41010        # Otherwise we believe it is a complete path. Use it as it is.
41011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41012$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41014$as_echo_n "checking for JTREGEXE... " >&6; }
41015        if test ! -x "$tool_specified"; then
41016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41017$as_echo "not found" >&6; }
41018          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41019        fi
41020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41021$as_echo "$tool_specified" >&6; }
41022      fi
41023    fi
41024  fi
41025
41026
41027
41028  if test "x$JTREGEXE" = x; then
41029    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41030  fi
41031
41032
41033      JT_HOME="`$DIRNAME $JTREGEXE`"
41034    fi
41035  fi
41036
41037
41038
41039
41040
41041
41042  # Option used to tell the compiler whether to create 32- or 64-bit executables
41043  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41044    COMPILER_TARGET_BITS_FLAG="-q"
41045  else
41046    COMPILER_TARGET_BITS_FLAG="-m"
41047  fi
41048
41049
41050  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41051  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41052    ARFLAGS="-r"
41053  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41054    ARFLAGS="-X64"
41055  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41056    # lib.exe is used as AR to create static libraries.
41057    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41058  else
41059    ARFLAGS=""
41060  fi
41061
41062
41063  ## Setup strip.
41064  # FIXME: should this really be per platform, or should it be per toolchain type?
41065  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41066  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41067  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41068    STRIPFLAGS="-g"
41069  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41070    STRIPFLAGS="-x"
41071  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41072    STRIPFLAGS="-S"
41073  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41074    STRIPFLAGS="-X32_64"
41075  fi
41076
41077  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41078    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41079  fi
41080
41081
41082  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41083    CC_OUT_OPTION=-Fo
41084    EXE_OUT_OPTION=-out:
41085    LD_OUT_OPTION=-out:
41086    AR_OUT_OPTION=-out:
41087  else
41088    # The option used to specify the target .o,.a or .so file.
41089    # When compiling, how to specify the to be created object file.
41090    CC_OUT_OPTION='-o$(SPACE)'
41091    # When linking, how to specify the to be created executable.
41092    EXE_OUT_OPTION='-o$(SPACE)'
41093    # When linking, how to specify the to be created dynamically linkable library.
41094    LD_OUT_OPTION='-o$(SPACE)'
41095    # When archiving, how to specify the to be create static archive for object files.
41096    AR_OUT_OPTION='rcs$(SPACE)'
41097  fi
41098
41099
41100
41101
41102
41103  # On Windows, we need to set RC flags.
41104  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41105    RC_FLAGS="-nologo -l0x409"
41106    if test "x$VARIANT" = xOPT; then
41107      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41108    fi
41109
41110    # The version variables used to create RC_FLAGS may be overridden
41111    # in a custom configure script, or possibly the command line.
41112    # Let those variables be expanded at make time in spec.gmk.
41113    # The \$ are escaped to the shell, and the $(...) variables
41114    # are evaluated by make.
41115    RC_FLAGS="$RC_FLAGS \
41116        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41117        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41118        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41119        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41120        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41121        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41122        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41123  fi
41124
41125
41126  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41127    # silence copyright notice and other headers.
41128    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41129  fi
41130
41131  if test "x$SYSROOT" != "x"; then
41132    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41133      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41134        # Solaris Studio does not have a concept of sysroot. Instead we must
41135        # make sure the default include and lib dirs are appended to each
41136        # compile and link command line.
41137        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41138        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41139            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41140            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41141      fi
41142    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41143      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41144      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41145      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41146    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41147      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41148      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41149    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41150      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41151      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41152    fi
41153    # Propagate the sysroot args to hotspot
41154    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41155    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41156    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41157  fi
41158
41159  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41160  # set this here so it doesn't have to be peppered throughout the forest
41161  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41162    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41163    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41164  fi
41165
41166
41167
41168
41169
41170# FIXME: Currently we must test this after toolchain but before flags. Fix!
41171
41172# Now we can test some aspects on the target using configure macros.
41173
41174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41175$as_echo_n "checking for ANSI C header files... " >&6; }
41176if ${ac_cv_header_stdc+:} false; then :
41177  $as_echo_n "(cached) " >&6
41178else
41179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41180/* end confdefs.h.  */
41181#include <stdlib.h>
41182#include <stdarg.h>
41183#include <string.h>
41184#include <float.h>
41185
41186int
41187main ()
41188{
41189
41190  ;
41191  return 0;
41192}
41193_ACEOF
41194if ac_fn_cxx_try_compile "$LINENO"; then :
41195  ac_cv_header_stdc=yes
41196else
41197  ac_cv_header_stdc=no
41198fi
41199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41200
41201if test $ac_cv_header_stdc = yes; then
41202  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41204/* end confdefs.h.  */
41205#include <string.h>
41206
41207_ACEOF
41208if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41209  $EGREP "memchr" >/dev/null 2>&1; then :
41210
41211else
41212  ac_cv_header_stdc=no
41213fi
41214rm -f conftest*
41215
41216fi
41217
41218if test $ac_cv_header_stdc = yes; then
41219  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41221/* end confdefs.h.  */
41222#include <stdlib.h>
41223
41224_ACEOF
41225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41226  $EGREP "free" >/dev/null 2>&1; then :
41227
41228else
41229  ac_cv_header_stdc=no
41230fi
41231rm -f conftest*
41232
41233fi
41234
41235if test $ac_cv_header_stdc = yes; then
41236  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41237  if test "$cross_compiling" = yes; then :
41238  :
41239else
41240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41241/* end confdefs.h.  */
41242#include <ctype.h>
41243#include <stdlib.h>
41244#if ((' ' & 0x0FF) == 0x020)
41245# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41246# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41247#else
41248# define ISLOWER(c) \
41249		   (('a' <= (c) && (c) <= 'i') \
41250		     || ('j' <= (c) && (c) <= 'r') \
41251		     || ('s' <= (c) && (c) <= 'z'))
41252# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41253#endif
41254
41255#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41256int
41257main ()
41258{
41259  int i;
41260  for (i = 0; i < 256; i++)
41261    if (XOR (islower (i), ISLOWER (i))
41262	|| toupper (i) != TOUPPER (i))
41263      return 2;
41264  return 0;
41265}
41266_ACEOF
41267if ac_fn_cxx_try_run "$LINENO"; then :
41268
41269else
41270  ac_cv_header_stdc=no
41271fi
41272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41273  conftest.$ac_objext conftest.beam conftest.$ac_ext
41274fi
41275
41276fi
41277fi
41278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41279$as_echo "$ac_cv_header_stdc" >&6; }
41280if test $ac_cv_header_stdc = yes; then
41281
41282$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41283
41284fi
41285
41286# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41287for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41288		  inttypes.h stdint.h unistd.h
41289do :
41290  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41291ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41292"
41293if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41294  cat >>confdefs.h <<_ACEOF
41295#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41296_ACEOF
41297
41298fi
41299
41300done
41301
41302
41303
41304  ###############################################################################
41305  #
41306  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41307  # (The JVM can use 32 or 64 bit Java pointers but that decision
41308  # is made at runtime.)
41309  #
41310
41311  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41312    # Always specify -m flag on Solaris
41313    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41314
41315  # When we add flags to the "official" CFLAGS etc, we need to
41316  # keep track of these additions in ADDED_CFLAGS etc. These
41317  # will later be checked to make sure only controlled additions
41318  # have been made to CFLAGS etc.
41319  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41320  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41321  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41322
41323  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41324  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41325  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41326
41327  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41328  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41329  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41330
41331  elif test "x$COMPILE_TYPE" = xreduced; then
41332    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41333      # Specify -m if running reduced on unix platforms
41334
41335  # When we add flags to the "official" CFLAGS etc, we need to
41336  # keep track of these additions in ADDED_CFLAGS etc. These
41337  # will later be checked to make sure only controlled additions
41338  # have been made to CFLAGS etc.
41339  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41340  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41341  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41342
41343  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41344  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41345  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41346
41347  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41348  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41349  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41350
41351    fi
41352  fi
41353
41354  # Make compilation sanity check
41355  for ac_header in stdio.h
41356do :
41357  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41358if test "x$ac_cv_header_stdio_h" = xyes; then :
41359  cat >>confdefs.h <<_ACEOF
41360#define HAVE_STDIO_H 1
41361_ACEOF
41362
41363else
41364
41365    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41366$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41367    if test "x$COMPILE_TYPE" = xreduced; then
41368      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41369$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41370    elif test "x$COMPILE_TYPE" = xcross; then
41371      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41372$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41373    fi
41374    as_fn_error $? "Cannot continue." "$LINENO" 5
41375
41376fi
41377
41378done
41379
41380
41381  # The cast to long int works around a bug in the HP C Compiler
41382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41384# This bug is HP SR number 8606223364.
41385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41386$as_echo_n "checking size of int *... " >&6; }
41387if ${ac_cv_sizeof_int_p+:} false; then :
41388  $as_echo_n "(cached) " >&6
41389else
41390  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41391
41392else
41393  if test "$ac_cv_type_int_p" = yes; then
41394     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41396as_fn_error 77 "cannot compute sizeof (int *)
41397See \`config.log' for more details" "$LINENO" 5; }
41398   else
41399     ac_cv_sizeof_int_p=0
41400   fi
41401fi
41402
41403fi
41404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41405$as_echo "$ac_cv_sizeof_int_p" >&6; }
41406
41407
41408
41409cat >>confdefs.h <<_ACEOF
41410#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41411_ACEOF
41412
41413
41414
41415  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41416  if test "x$ac_cv_sizeof_int_p" = x; then
41417    # The test failed, lets stick to the assumed value.
41418    { $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
41419$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41420  else
41421    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41422
41423    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41424      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41425      # Let's try to implicitely set the compilers target architecture and retry the test
41426      { $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
41427$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;}
41428      { $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
41429$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;}
41430
41431  # When we add flags to the "official" CFLAGS etc, we need to
41432  # keep track of these additions in ADDED_CFLAGS etc. These
41433  # will later be checked to make sure only controlled additions
41434  # have been made to CFLAGS etc.
41435  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41436  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41437  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41438
41439  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41440  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41441  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41442
41443  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41444  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41445  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41446
41447
41448      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41449      unset ac_cv_sizeof_int_p
41450      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41451      cat >>confdefs.h <<_ACEOF
41452#undef SIZEOF_INT_P
41453_ACEOF
41454
41455      # The cast to long int works around a bug in the HP C Compiler
41456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41458# This bug is HP SR number 8606223364.
41459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41460$as_echo_n "checking size of int *... " >&6; }
41461if ${ac_cv_sizeof_int_p+:} false; then :
41462  $as_echo_n "(cached) " >&6
41463else
41464  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41465
41466else
41467  if test "$ac_cv_type_int_p" = yes; then
41468     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41470as_fn_error 77 "cannot compute sizeof (int *)
41471See \`config.log' for more details" "$LINENO" 5; }
41472   else
41473     ac_cv_sizeof_int_p=0
41474   fi
41475fi
41476
41477fi
41478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41479$as_echo "$ac_cv_sizeof_int_p" >&6; }
41480
41481
41482
41483cat >>confdefs.h <<_ACEOF
41484#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41485_ACEOF
41486
41487
41488
41489      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41490
41491      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41492        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
41493      fi
41494    fi
41495  fi
41496
41497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41498$as_echo_n "checking for target address size... " >&6; }
41499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41500$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41501
41502
41503  ###############################################################################
41504  #
41505  # Is the target little of big endian?
41506  #
41507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41508$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41509if ${ac_cv_c_bigendian+:} false; then :
41510  $as_echo_n "(cached) " >&6
41511else
41512  ac_cv_c_bigendian=unknown
41513    # See if we're dealing with a universal compiler.
41514    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41515/* end confdefs.h.  */
41516#ifndef __APPLE_CC__
41517	       not a universal capable compiler
41518	     #endif
41519	     typedef int dummy;
41520
41521_ACEOF
41522if ac_fn_cxx_try_compile "$LINENO"; then :
41523
41524	# Check for potential -arch flags.  It is not universal unless
41525	# there are at least two -arch flags with different values.
41526	ac_arch=
41527	ac_prev=
41528	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41529	 if test -n "$ac_prev"; then
41530	   case $ac_word in
41531	     i?86 | x86_64 | ppc | ppc64)
41532	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41533		 ac_arch=$ac_word
41534	       else
41535		 ac_cv_c_bigendian=universal
41536		 break
41537	       fi
41538	       ;;
41539	   esac
41540	   ac_prev=
41541	 elif test "x$ac_word" = "x-arch"; then
41542	   ac_prev=arch
41543	 fi
41544       done
41545fi
41546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41547    if test $ac_cv_c_bigendian = unknown; then
41548      # See if sys/param.h defines the BYTE_ORDER macro.
41549      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41550/* end confdefs.h.  */
41551#include <sys/types.h>
41552	     #include <sys/param.h>
41553
41554int
41555main ()
41556{
41557#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41558		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41559		     && LITTLE_ENDIAN)
41560	      bogus endian macros
41561	     #endif
41562
41563  ;
41564  return 0;
41565}
41566_ACEOF
41567if ac_fn_cxx_try_compile "$LINENO"; then :
41568  # It does; now see whether it defined to BIG_ENDIAN or not.
41569	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41570/* end confdefs.h.  */
41571#include <sys/types.h>
41572		#include <sys/param.h>
41573
41574int
41575main ()
41576{
41577#if BYTE_ORDER != BIG_ENDIAN
41578		 not big endian
41579		#endif
41580
41581  ;
41582  return 0;
41583}
41584_ACEOF
41585if ac_fn_cxx_try_compile "$LINENO"; then :
41586  ac_cv_c_bigendian=yes
41587else
41588  ac_cv_c_bigendian=no
41589fi
41590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41591fi
41592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41593    fi
41594    if test $ac_cv_c_bigendian = unknown; then
41595      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41596      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41597/* end confdefs.h.  */
41598#include <limits.h>
41599
41600int
41601main ()
41602{
41603#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41604	      bogus endian macros
41605	     #endif
41606
41607  ;
41608  return 0;
41609}
41610_ACEOF
41611if ac_fn_cxx_try_compile "$LINENO"; then :
41612  # It does; now see whether it defined to _BIG_ENDIAN or not.
41613	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41614/* end confdefs.h.  */
41615#include <limits.h>
41616
41617int
41618main ()
41619{
41620#ifndef _BIG_ENDIAN
41621		 not big endian
41622		#endif
41623
41624  ;
41625  return 0;
41626}
41627_ACEOF
41628if ac_fn_cxx_try_compile "$LINENO"; then :
41629  ac_cv_c_bigendian=yes
41630else
41631  ac_cv_c_bigendian=no
41632fi
41633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41634fi
41635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41636    fi
41637    if test $ac_cv_c_bigendian = unknown; then
41638      # Compile a test program.
41639      if test "$cross_compiling" = yes; then :
41640  # Try to guess by grepping values from an object file.
41641	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41642/* end confdefs.h.  */
41643short int ascii_mm[] =
41644		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41645		short int ascii_ii[] =
41646		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41647		int use_ascii (int i) {
41648		  return ascii_mm[i] + ascii_ii[i];
41649		}
41650		short int ebcdic_ii[] =
41651		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41652		short int ebcdic_mm[] =
41653		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41654		int use_ebcdic (int i) {
41655		  return ebcdic_mm[i] + ebcdic_ii[i];
41656		}
41657		extern int foo;
41658
41659int
41660main ()
41661{
41662return use_ascii (foo) == use_ebcdic (foo);
41663  ;
41664  return 0;
41665}
41666_ACEOF
41667if ac_fn_cxx_try_compile "$LINENO"; then :
41668  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41669	      ac_cv_c_bigendian=yes
41670	    fi
41671	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41672	      if test "$ac_cv_c_bigendian" = unknown; then
41673		ac_cv_c_bigendian=no
41674	      else
41675		# finding both strings is unlikely to happen, but who knows?
41676		ac_cv_c_bigendian=unknown
41677	      fi
41678	    fi
41679fi
41680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41681else
41682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41683/* end confdefs.h.  */
41684$ac_includes_default
41685int
41686main ()
41687{
41688
41689	     /* Are we little or big endian?  From Harbison&Steele.  */
41690	     union
41691	     {
41692	       long int l;
41693	       char c[sizeof (long int)];
41694	     } u;
41695	     u.l = 1;
41696	     return u.c[sizeof (long int) - 1] == 1;
41697
41698  ;
41699  return 0;
41700}
41701_ACEOF
41702if ac_fn_cxx_try_run "$LINENO"; then :
41703  ac_cv_c_bigendian=no
41704else
41705  ac_cv_c_bigendian=yes
41706fi
41707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41708  conftest.$ac_objext conftest.beam conftest.$ac_ext
41709fi
41710
41711    fi
41712fi
41713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41714$as_echo "$ac_cv_c_bigendian" >&6; }
41715 case $ac_cv_c_bigendian in #(
41716   yes)
41717     ENDIAN="big";; #(
41718   no)
41719     ENDIAN="little" ;; #(
41720   universal)
41721     ENDIAN="universal_endianness"
41722     ;; #(
41723   *)
41724     ENDIAN="unknown" ;;
41725 esac
41726
41727
41728  if test "x$ENDIAN" = xuniversal_endianness; then
41729    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41730  fi
41731  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41732    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
41733  fi
41734
41735
41736# Configure flags for the tools
41737
41738  ###############################################################################
41739  #
41740  # How to compile shared libraries.
41741  #
41742
41743  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41744    PICFLAG="-fPIC"
41745    C_FLAG_REORDER=''
41746    CXX_FLAG_REORDER=''
41747
41748    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41749      # Linking is different on MacOSX
41750      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41751      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41752      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41753      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41754      SET_SHARED_LIBRARY_MAPFILE=''
41755    else
41756      # Default works for linux, might work on other platforms as well.
41757      SHARED_LIBRARY_FLAGS='-shared'
41758      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41759      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41760      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41761      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41762    fi
41763  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41764    PICFLAG=''
41765    C_FLAG_REORDER=''
41766    CXX_FLAG_REORDER=''
41767
41768    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41769      # Linking is different on MacOSX
41770      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41771      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41772      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41773      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41774      SET_SHARED_LIBRARY_MAPFILE=''
41775    else
41776      # Default works for linux, might work on other platforms as well.
41777      SHARED_LIBRARY_FLAGS='-shared'
41778      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41779      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41780      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41781      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41782    fi
41783  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41784    PICFLAG="-KPIC"
41785    C_FLAG_REORDER='-xF'
41786    CXX_FLAG_REORDER='-xF'
41787    SHARED_LIBRARY_FLAGS="-G"
41788    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41789    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41790    SET_SHARED_LIBRARY_NAME=''
41791    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41792  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41793    PICFLAG="-qpic=large"
41794    C_FLAG_REORDER=''
41795    CXX_FLAG_REORDER=''
41796    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41797    SET_EXECUTABLE_ORIGIN=""
41798    SET_SHARED_LIBRARY_ORIGIN=''
41799    SET_SHARED_LIBRARY_NAME=''
41800    SET_SHARED_LIBRARY_MAPFILE=''
41801  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41802    PICFLAG=""
41803    C_FLAG_REORDER=''
41804    CXX_FLAG_REORDER=''
41805    SHARED_LIBRARY_FLAGS="-LD"
41806    SET_EXECUTABLE_ORIGIN=''
41807    SET_SHARED_LIBRARY_ORIGIN=''
41808    SET_SHARED_LIBRARY_NAME=''
41809    SET_SHARED_LIBRARY_MAPFILE=''
41810  fi
41811
41812
41813
41814
41815
41816
41817
41818
41819  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41820    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41821    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41822    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41823  fi
41824  # The (cross) compiler is now configured, we can now test capabilities
41825  # of the target platform.
41826
41827
41828
41829  ###############################################################################
41830  #
41831  # Setup the opt flags for different compilers
41832  # and different operating systems.
41833  #
41834
41835  # FIXME: this was indirectly the old default, but just inherited.
41836  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41837  #   C_FLAG_DEPS="-MMD -MF"
41838  # fi
41839
41840  # Generate make dependency files
41841  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41842    C_FLAG_DEPS="-MMD -MF"
41843  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41844    C_FLAG_DEPS="-MMD -MF"
41845  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41846    C_FLAG_DEPS="-xMMD -xMF"
41847  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41848    C_FLAG_DEPS="-qmakedep=gcc -MF"
41849  fi
41850  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41851
41852
41853
41854  # Debug symbols
41855  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41856    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41857      # reduce from default "-g2" option to save space
41858      CFLAGS_DEBUG_SYMBOLS="-g1"
41859      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41860    else
41861      CFLAGS_DEBUG_SYMBOLS="-g"
41862      CXXFLAGS_DEBUG_SYMBOLS="-g"
41863    fi
41864  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41865    CFLAGS_DEBUG_SYMBOLS="-g"
41866    CXXFLAGS_DEBUG_SYMBOLS="-g"
41867  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41868    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41869    # FIXME: likely a bug, this disables debug symbols rather than enables them
41870    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41871  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41872    CFLAGS_DEBUG_SYMBOLS="-g"
41873    CXXFLAGS_DEBUG_SYMBOLS="-g"
41874  fi
41875
41876
41877
41878  # bounds, memory and behavior checking options
41879  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41880    case $DEBUG_LEVEL in
41881    release )
41882      # no adjustment
41883      ;;
41884    fastdebug )
41885      # no adjustment
41886      ;;
41887    slowdebug )
41888      # Add runtime stack smashing and undefined behavior checks.
41889      # Not all versions of gcc support -fstack-protector
41890      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
41891
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
41893$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
41894  supports=yes
41895
41896  saved_cflags="$CFLAGS"
41897  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
41898  ac_ext=c
41899ac_cpp='$CPP $CPPFLAGS'
41900ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41901ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41902ac_compiler_gnu=$ac_cv_c_compiler_gnu
41903
41904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41905/* end confdefs.h.  */
41906int i;
41907_ACEOF
41908if ac_fn_c_try_compile "$LINENO"; then :
41909
41910else
41911  supports=no
41912fi
41913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41914  ac_ext=cpp
41915ac_cpp='$CXXCPP $CPPFLAGS'
41916ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41917ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41918ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41919
41920  CFLAGS="$saved_cflags"
41921
41922  saved_cxxflags="$CXXFLAGS"
41923  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
41924  ac_ext=cpp
41925ac_cpp='$CXXCPP $CPPFLAGS'
41926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41929
41930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41931/* end confdefs.h.  */
41932int i;
41933_ACEOF
41934if ac_fn_cxx_try_compile "$LINENO"; then :
41935
41936else
41937  supports=no
41938fi
41939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41940  ac_ext=cpp
41941ac_cpp='$CXXCPP $CPPFLAGS'
41942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41945
41946  CXXFLAGS="$saved_cxxflags"
41947
41948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41949$as_echo "$supports" >&6; }
41950  if test "x$supports" = "xyes" ; then
41951    :
41952  else
41953    STACK_PROTECTOR_CFLAG=""
41954  fi
41955
41956
41957      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41958      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41959      ;;
41960    esac
41961  fi
41962
41963  # Optimization levels
41964  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41965    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41966
41967    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41968      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41969      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41970      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41971      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41972      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41973      C_O_FLAG_NONE="-xregs=no%frameptr"
41974      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41975      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41976      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41977      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41978      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41979      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41980        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41981        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41982      fi
41983    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41984      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41985      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41986      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41987      C_O_FLAG_DEBUG=""
41988      C_O_FLAG_NONE=""
41989      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41990      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41991      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41992      C_O_FLAG_DEBUG=""
41993      CXX_O_FLAG_NONE=""
41994    fi
41995  else
41996    # The remaining toolchains share opt flags between CC and CXX;
41997    # setup for C and duplicate afterwards.
41998    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41999      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42000        # On MacOSX we optimize for size, something
42001        # we should do for all platforms?
42002        C_O_FLAG_HIGHEST="-Os"
42003        C_O_FLAG_HI="-Os"
42004        C_O_FLAG_NORM="-Os"
42005      else
42006        C_O_FLAG_HIGHEST="-O3"
42007        C_O_FLAG_HI="-O3"
42008        C_O_FLAG_NORM="-O2"
42009      fi
42010      C_O_FLAG_DEBUG="-O0"
42011      C_O_FLAG_NONE="-O0"
42012    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42013      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42014        # On MacOSX we optimize for size, something
42015        # we should do for all platforms?
42016        C_O_FLAG_HIGHEST="-Os"
42017        C_O_FLAG_HI="-Os"
42018        C_O_FLAG_NORM="-Os"
42019      else
42020        C_O_FLAG_HIGHEST="-O3"
42021        C_O_FLAG_HI="-O3"
42022        C_O_FLAG_NORM="-O2"
42023      fi
42024      C_O_FLAG_DEBUG="-O0"
42025      C_O_FLAG_NONE="-O0"
42026    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42027      C_O_FLAG_HIGHEST="-O3"
42028      C_O_FLAG_HI="-O3 -qstrict"
42029      C_O_FLAG_NORM="-O2"
42030      C_O_FLAG_DEBUG="-qnoopt"
42031      C_O_FLAG_NONE="-qnoop"
42032    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42033      C_O_FLAG_HIGHEST="-O2"
42034      C_O_FLAG_HI="-O1"
42035      C_O_FLAG_NORM="-O1"
42036      C_O_FLAG_DEBUG="-Od"
42037      C_O_FLAG_NONE="-Od"
42038    fi
42039    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42040    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42041    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42042    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42043    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42044  fi
42045
42046  # Adjust optimization flags according to debug level.
42047  case $DEBUG_LEVEL in
42048    release )
42049      # no adjustment
42050      ;;
42051    fastdebug )
42052      # Not quite so much optimization
42053      C_O_FLAG_HI="$C_O_FLAG_NORM"
42054      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42055      ;;
42056    slowdebug )
42057      # Disable optimization
42058      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42059      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42060      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42061      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42062      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42063      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42064      ;;
42065  esac
42066
42067
42068
42069
42070
42071
42072
42073
42074
42075
42076
42077
42078
42079  # Special extras...
42080  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42081    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42082      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42083      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42084    fi
42085    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42086    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42087  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42088    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42089    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42090  fi
42091
42092  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42093    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42094$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42095  fi
42096
42097  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42098    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42099$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42100  fi
42101
42102  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42103    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42104$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42105  fi
42106
42107
42108# Check whether --with-extra-cflags was given.
42109if test "${with_extra_cflags+set}" = set; then :
42110  withval=$with_extra_cflags;
42111fi
42112
42113
42114
42115# Check whether --with-extra-cxxflags was given.
42116if test "${with_extra_cxxflags+set}" = set; then :
42117  withval=$with_extra_cxxflags;
42118fi
42119
42120
42121
42122# Check whether --with-extra-ldflags was given.
42123if test "${with_extra_ldflags+set}" = set; then :
42124  withval=$with_extra_ldflags;
42125fi
42126
42127
42128  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42129  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42130  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42131
42132  # Hotspot needs these set in their legacy form
42133  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42134  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42135  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42136
42137
42138
42139
42140
42141  ###############################################################################
42142  #
42143  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42144  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42145  #
42146
42147  # Setup compiler/platform specific flags into
42148  #    CFLAGS_JDK    - C Compiler flags
42149  #    CXXFLAGS_JDK  - C++ Compiler flags
42150  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42151  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42152    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42153      # Force compatibility with i586 on 32 bit intel platforms.
42154      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42155    fi
42156    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42157        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42158    case $OPENJDK_TARGET_CPU_ARCH in
42159      arm )
42160        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42161        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42162        ;;
42163      ppc )
42164        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42165        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42166        ;;
42167      * )
42168        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42169        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42170        ;;
42171    esac
42172  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42173    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42174    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42175      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42176    fi
42177
42178    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42179    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42180  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42181    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42182    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42183  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42184    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42185        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42186        -DWIN32_LEAN_AND_MEAN \
42187        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42188        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42189        -DWIN32 -DIAL"
42190    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42191      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42192    else
42193      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42194    fi
42195    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42196    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42197    # studio.
42198    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42199      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42200          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42201    fi
42202  fi
42203
42204  ###############################################################################
42205
42206  # Adjust flags according to debug level.
42207  case $DEBUG_LEVEL in
42208    fastdebug | slowdebug )
42209      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42210      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42211      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42212      ;;
42213    release )
42214      ;;
42215    * )
42216      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42217      ;;
42218  esac
42219
42220  # Setup LP64
42221  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42222
42223  # Set some common defines. These works for all compilers, but assume
42224  # -D is universally accepted.
42225
42226  # Setup endianness
42227  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42228    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42229    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42230    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42231    #   Note: -Dmacro         is the same as    #define macro 1
42232    #         -Dmacro=        is the same as    #define macro
42233    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42234      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42235    else
42236      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42237    fi
42238  else
42239    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42240    # are defined in the system?
42241    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42242      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42243    else
42244      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42245    fi
42246  fi
42247
42248  # Setup target OS define. Use OS target name but in upper case.
42249  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42250  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42251
42252  # Setup target CPU
42253  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42254
42255  # Setup debug/release defines
42256  if test "x$DEBUG_LEVEL" = xrelease; then
42257    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42258    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42259      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42260    fi
42261  else
42262    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42263  fi
42264
42265  # Setup release name
42266  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42267
42268
42269  # Set some additional per-OS defines.
42270  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42271    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42272  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42273    # FIXME: PPC64 should not be here.
42274    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42275  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42276    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42277  fi
42278
42279  # Additional macosx handling
42280  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42281    # Setting these parameters makes it an error to link to macosx APIs that are
42282    # newer than the given OS version and makes the linked binaries compatible
42283    # even if built on a newer version of the OS.
42284    # The expected format is X.Y.Z
42285    MACOSX_VERSION_MIN=10.7.0
42286
42287
42288    # The macro takes the version with no dots, ex: 1070
42289    # Let the flags variables get resolved in make for easier override on make
42290    # command line.
42291    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42292    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42293  fi
42294
42295  # Setup some hard coded includes
42296  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42297      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42298      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42299      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42300
42301  # The shared libraries are compiled using the picflag.
42302  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42303  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42304
42305  # Executable flags
42306  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42307  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42308
42309
42310
42311
42312
42313
42314  # Flags for compiling test libraries
42315  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42316  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42317
42318  # Flags for compiling test executables
42319  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42320  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42321
42322
42323
42324
42325
42326
42327  # Setup LDFLAGS et al.
42328  #
42329
42330  # Now this is odd. The JDK native libraries have to link against libjvm.so
42331  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42332  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42333  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42334  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42335  # libraries will link to whatever is in memory. Yuck.
42336  #
42337  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42338  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42339    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42340    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42341      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42342    fi
42343    # TODO: make -debug optional "--disable-full-debug-symbols"
42344    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42345  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42346    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42347    # We have previously set HAS_GNU_HASH if this is the case
42348    if test -n "$HAS_GNU_HASH"; then
42349      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42350    fi
42351    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42352      # And since we now know that the linker is gnu, then add -z defs, to forbid
42353      # undefined symbols in object files.
42354      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42355      case $DEBUG_LEVEL in
42356        release )
42357          # tell linker to optimize libraries.
42358          # Should this be supplied to the OSS linker as well?
42359          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42360          ;;
42361        slowdebug )
42362          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42363            # do relocations at load
42364            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42365            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42366          fi
42367          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42368            # mark relocations read only
42369            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42370            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42371          fi
42372          ;;
42373        fastdebug )
42374          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42375            # mark relocations read only
42376            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42377            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42378          fi
42379          ;;
42380        * )
42381          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42382          ;;
42383        esac
42384    fi
42385  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42386    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42387    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42388  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42389    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42390  fi
42391
42392  # Customize LDFLAGS for executables
42393
42394  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42395
42396  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42397    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42398      LDFLAGS_STACK_SIZE=1048576
42399    else
42400      LDFLAGS_STACK_SIZE=327680
42401    fi
42402    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42403  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42404    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42405  fi
42406
42407  # Customize LDFLAGS for libs
42408  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42409
42410  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42411    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42412    LDFLAGS_JDKLIB_SUFFIX=""
42413  else
42414    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42415        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42416
42417    # On some platforms (mac) the linker warns about non existing -L dirs.
42418    # Add server first if available. Linking aginst client does not always produce the same results.
42419    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42420    # Default to server for other variants.
42421    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42422      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42423    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42424      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42425    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42426      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42427    else
42428      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42429    fi
42430
42431    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42432    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42433      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42434    fi
42435  fi
42436
42437
42438
42439
42440
42441
42442
42443  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42444  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42445  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42446  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42447
42448
42449
42450
42451
42452
42453
42454  # Some Zero and Shark settings.
42455  # ZERO_ARCHFLAG tells the compiler which mode to build for
42456  case "${OPENJDK_TARGET_CPU}" in
42457    s390)
42458      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42459      ;;
42460    *)
42461      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42462  esac
42463
42464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42465$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42466  supports=yes
42467
42468  saved_cflags="$CFLAGS"
42469  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42470  ac_ext=c
42471ac_cpp='$CPP $CPPFLAGS'
42472ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42473ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42474ac_compiler_gnu=$ac_cv_c_compiler_gnu
42475
42476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42477/* end confdefs.h.  */
42478int i;
42479_ACEOF
42480if ac_fn_c_try_compile "$LINENO"; then :
42481
42482else
42483  supports=no
42484fi
42485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42486  ac_ext=cpp
42487ac_cpp='$CXXCPP $CPPFLAGS'
42488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42491
42492  CFLAGS="$saved_cflags"
42493
42494  saved_cxxflags="$CXXFLAGS"
42495  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42496  ac_ext=cpp
42497ac_cpp='$CXXCPP $CPPFLAGS'
42498ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42499ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42500ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42501
42502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42503/* end confdefs.h.  */
42504int i;
42505_ACEOF
42506if ac_fn_cxx_try_compile "$LINENO"; then :
42507
42508else
42509  supports=no
42510fi
42511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42512  ac_ext=cpp
42513ac_cpp='$CXXCPP $CPPFLAGS'
42514ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42515ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42516ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42517
42518  CXXFLAGS="$saved_cxxflags"
42519
42520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42521$as_echo "$supports" >&6; }
42522  if test "x$supports" = "xyes" ; then
42523    :
42524  else
42525    ZERO_ARCHFLAG=""
42526  fi
42527
42528
42529
42530  # Check that the compiler supports -mX (or -qX on AIX) flags
42531  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42532
42533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42534$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42535  supports=yes
42536
42537  saved_cflags="$CFLAGS"
42538  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42539  ac_ext=c
42540ac_cpp='$CPP $CPPFLAGS'
42541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42543ac_compiler_gnu=$ac_cv_c_compiler_gnu
42544
42545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42546/* end confdefs.h.  */
42547int i;
42548_ACEOF
42549if ac_fn_c_try_compile "$LINENO"; then :
42550
42551else
42552  supports=no
42553fi
42554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42555  ac_ext=cpp
42556ac_cpp='$CXXCPP $CPPFLAGS'
42557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42560
42561  CFLAGS="$saved_cflags"
42562
42563  saved_cxxflags="$CXXFLAGS"
42564  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42565  ac_ext=cpp
42566ac_cpp='$CXXCPP $CPPFLAGS'
42567ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42568ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42569ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42570
42571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42572/* end confdefs.h.  */
42573int i;
42574_ACEOF
42575if ac_fn_cxx_try_compile "$LINENO"; then :
42576
42577else
42578  supports=no
42579fi
42580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42581  ac_ext=cpp
42582ac_cpp='$CXXCPP $CPPFLAGS'
42583ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42584ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42585ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42586
42587  CXXFLAGS="$saved_cxxflags"
42588
42589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42590$as_echo "$supports" >&6; }
42591  if test "x$supports" = "xyes" ; then
42592    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42593  else
42594    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42595  fi
42596
42597
42598
42599  # Check whether --enable-warnings-as-errors was given.
42600if test "${enable_warnings_as_errors+set}" = set; then :
42601  enableval=$enable_warnings_as_errors;
42602fi
42603
42604
42605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42606$as_echo_n "checking if native warnings are errors... " >&6; }
42607  if test "x$enable_warnings_as_errors" = "xyes"; then
42608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42609$as_echo "yes (explicitely set)" >&6; }
42610    WARNINGS_AS_ERRORS=true
42611  elif test "x$enable_warnings_as_errors" = "xno"; then
42612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42613$as_echo "no" >&6; }
42614    WARNINGS_AS_ERRORS=false
42615  elif test "x$enable_warnings_as_errors" = "x"; then
42616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42617$as_echo "yes (default)" >&6; }
42618    WARNINGS_AS_ERRORS=true
42619  else
42620    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42621  fi
42622
42623
42624  case "${TOOLCHAIN_TYPE}" in
42625    microsoft)
42626      DISABLE_WARNING_PREFIX="-wd"
42627      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42628      ;;
42629    solstudio)
42630      DISABLE_WARNING_PREFIX="-erroff="
42631      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42632      ;;
42633    gcc)
42634      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42635
42636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42637$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42638  supports=yes
42639
42640  saved_cflags="$CFLAGS"
42641  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42642  ac_ext=c
42643ac_cpp='$CPP $CPPFLAGS'
42644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42646ac_compiler_gnu=$ac_cv_c_compiler_gnu
42647
42648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42649/* end confdefs.h.  */
42650int i;
42651_ACEOF
42652if ac_fn_c_try_compile "$LINENO"; then :
42653
42654else
42655  supports=no
42656fi
42657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42658  ac_ext=cpp
42659ac_cpp='$CXXCPP $CPPFLAGS'
42660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42663
42664  CFLAGS="$saved_cflags"
42665
42666  saved_cxxflags="$CXXFLAGS"
42667  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42668  ac_ext=cpp
42669ac_cpp='$CXXCPP $CPPFLAGS'
42670ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42671ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42672ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42673
42674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42675/* end confdefs.h.  */
42676int i;
42677_ACEOF
42678if ac_fn_cxx_try_compile "$LINENO"; then :
42679
42680else
42681  supports=no
42682fi
42683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42684  ac_ext=cpp
42685ac_cpp='$CXXCPP $CPPFLAGS'
42686ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42687ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42688ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42689
42690  CXXFLAGS="$saved_cxxflags"
42691
42692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42693$as_echo "$supports" >&6; }
42694  if test "x$supports" = "xyes" ; then
42695    GCC_CAN_DISABLE_WARNINGS=true
42696  else
42697    GCC_CAN_DISABLE_WARNINGS=false
42698
42699  fi
42700
42701      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42702        DISABLE_WARNING_PREFIX="-Wno-"
42703      else
42704        DISABLE_WARNING_PREFIX=
42705      fi
42706      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42707      ;;
42708    clang)
42709      DISABLE_WARNING_PREFIX="-Wno-"
42710      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42711      ;;
42712  esac
42713
42714
42715
42716
42717# Setup debug symbols (need objcopy from the toolchain for that)
42718
42719  #
42720  # ENABLE_DEBUG_SYMBOLS
42721  # This must be done after the toolchain is setup, since we're looking at objcopy.
42722  #
42723  # Check whether --enable-debug-symbols was given.
42724if test "${enable_debug_symbols+set}" = set; then :
42725  enableval=$enable_debug_symbols;
42726fi
42727
42728
42729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42730$as_echo_n "checking if we should generate debug symbols... " >&6; }
42731
42732  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42733    # explicit enabling of enable-debug-symbols and can't find objcopy
42734    #   this is an error
42735    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42736  fi
42737
42738  if test "x$enable_debug_symbols" = "xyes"; then
42739    ENABLE_DEBUG_SYMBOLS=true
42740  elif test "x$enable_debug_symbols" = "xno"; then
42741    ENABLE_DEBUG_SYMBOLS=false
42742  else
42743    # Default is on if objcopy is found
42744    if test "x$OBJCOPY" != x; then
42745      ENABLE_DEBUG_SYMBOLS=true
42746    # MacOS X and Windows don't use objcopy but default is on for those OSes
42747    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42748      ENABLE_DEBUG_SYMBOLS=true
42749    else
42750      ENABLE_DEBUG_SYMBOLS=false
42751    fi
42752  fi
42753
42754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42755$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42756
42757  #
42758  # ZIP_DEBUGINFO_FILES
42759  #
42760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42761$as_echo_n "checking if we should zip debug-info files... " >&6; }
42762  # Check whether --enable-zip-debug-info was given.
42763if test "${enable_zip_debug_info+set}" = set; then :
42764  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42765else
42766  enable_zip_debug_info="yes"
42767fi
42768
42769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42770$as_echo "${enable_zip_debug_info}" >&6; }
42771
42772  if test "x${enable_zip_debug_info}" = "xno"; then
42773    ZIP_DEBUGINFO_FILES=false
42774  else
42775    ZIP_DEBUGINFO_FILES=true
42776  fi
42777
42778
42779
42780
42781
42782  # Check whether --enable-native-coverage was given.
42783if test "${enable_native_coverage+set}" = set; then :
42784  enableval=$enable_native_coverage;
42785fi
42786
42787  GCOV_ENABLED="false"
42788  if test "x$enable_native_coverage" = "xyes"; then
42789    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42791$as_echo_n "checking if native coverage is enabled... " >&6; }
42792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42793$as_echo "yes" >&6; }
42794      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42795      GCOV_LDFLAGS="-fprofile-arcs"
42796      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42797      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42798      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42799      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42800      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42801      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42802      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42803      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42804      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42805      GCOV_ENABLED="true"
42806    else
42807      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42808    fi
42809  elif test "x$enable_native_coverage" = "xno"; then
42810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42811$as_echo_n "checking if native coverage is enabled... " >&6; }
42812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42813$as_echo "no" >&6; }
42814  elif test "x$enable_native_coverage" != "x"; then
42815    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42816  fi
42817
42818
42819
42820
42821###############################################################################
42822#
42823# Check dependencies for external and internal libraries.
42824#
42825###############################################################################
42826
42827# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42828
42829  # When using cygwin or msys, we need a wrapper binary that renames
42830  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42831  # @files and rewrites these too! This wrapper binary is
42832  # called fixpath.
42833  FIXPATH=
42834  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42836$as_echo_n "checking if fixpath can be created... " >&6; }
42837    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42838    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
42839    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
42840    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42841      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42842      FIXPATH="$FIXPATH_BIN -c"
42843    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42844      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42845      # @ was chosen as separator to minimize risk of other tools messing around with it
42846      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
42847          | tr ' ' '\n' | grep '^/./' | sort | uniq`
42848      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42849      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
42850    fi
42851    FIXPATH_SRC_W="$FIXPATH_SRC"
42852    FIXPATH_BIN_W="$FIXPATH_BIN"
42853
42854  unix_path="$FIXPATH_SRC_W"
42855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42856    windows_path=`$CYGPATH -m "$unix_path"`
42857    FIXPATH_SRC_W="$windows_path"
42858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42859    windows_path=`cmd //c echo $unix_path`
42860    FIXPATH_SRC_W="$windows_path"
42861  fi
42862
42863
42864  unix_path="$FIXPATH_BIN_W"
42865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42866    windows_path=`$CYGPATH -m "$unix_path"`
42867    FIXPATH_BIN_W="$windows_path"
42868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42869    windows_path=`cmd //c echo $unix_path`
42870    FIXPATH_BIN_W="$windows_path"
42871  fi
42872
42873    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
42874    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
42875    cd $FIXPATH_DIR
42876    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
42877    cd $CURDIR
42878
42879    if test ! -x $FIXPATH_BIN; then
42880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42881$as_echo "no" >&6; }
42882      cat $FIXPATH_DIR/fixpath1.log
42883      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
42884    fi
42885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42886$as_echo "yes" >&6; }
42887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42888$as_echo_n "checking if fixpath.exe works... " >&6; }
42889    cd $FIXPATH_DIR
42890    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
42891        > $FIXPATH_DIR/fixpath2.log 2>&1
42892    cd $CURDIR
42893    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
42894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42895$as_echo "no" >&6; }
42896      cat $FIXPATH_DIR/fixpath2.log
42897      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42898    fi
42899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42900$as_echo "yes" >&6; }
42901  fi
42902
42903
42904
42905
42906
42907
42908  ###############################################################################
42909  #
42910  # OS specific settings that we never will need to probe.
42911  #
42912  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42914$as_echo_n "checking what is not needed on Linux?... " >&6; }
42915    PULSE_NOT_NEEDED=yes
42916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42917$as_echo "pulse" >&6; }
42918  fi
42919
42920  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42922$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42923    ALSA_NOT_NEEDED=yes
42924    PULSE_NOT_NEEDED=yes
42925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42926$as_echo "alsa pulse" >&6; }
42927  fi
42928
42929  if test "x$OPENJDK_TARGET_OS" = xaix; then
42930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42931$as_echo_n "checking what is not needed on AIX?... " >&6; }
42932    ALSA_NOT_NEEDED=yes
42933    PULSE_NOT_NEEDED=yes
42934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42935$as_echo "alsa pulse" >&6; }
42936  fi
42937
42938
42939  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42941$as_echo_n "checking what is not needed on Windows?... " >&6; }
42942    CUPS_NOT_NEEDED=yes
42943    ALSA_NOT_NEEDED=yes
42944    PULSE_NOT_NEEDED=yes
42945    X11_NOT_NEEDED=yes
42946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42947$as_echo "alsa cups pulse x11" >&6; }
42948  fi
42949
42950  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42952$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42953    ALSA_NOT_NEEDED=yes
42954    PULSE_NOT_NEEDED=yes
42955    X11_NOT_NEEDED=yes
42956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42957$as_echo "alsa pulse x11" >&6; }
42958  fi
42959
42960  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42962$as_echo_n "checking what is not needed on bsd?... " >&6; }
42963    ALSA_NOT_NEEDED=yes
42964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42965$as_echo "alsa" >&6; }
42966  fi
42967
42968  if test "x$OPENJDK" = "xfalse"; then
42969    FREETYPE_NOT_NEEDED=yes
42970  fi
42971
42972  if test "x$SUPPORT_HEADFUL" = xno; then
42973    X11_NOT_NEEDED=yes
42974  fi
42975
42976
42977
42978  ###############################################################################
42979  #
42980  # Check for X Windows
42981  #
42982
42983  if test "x$X11_NOT_NEEDED" = xyes; then
42984    if test "x${with_x}" != x; then
42985      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42986$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42987    fi
42988    X_CFLAGS=
42989    X_LIBS=
42990  else
42991    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42992    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42993    # --x-libraries for the sysroot, if that seems to be correct.
42994    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42995      if test "x$SYSROOT" != "x"; then
42996        if test "x$x_includes" = xNONE; then
42997          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42998            x_includes="$SYSROOT/usr/X11R6/include"
42999          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43000            x_includes="$SYSROOT/usr/include"
43001          fi
43002        fi
43003        if test "x$x_libraries" = xNONE; then
43004          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43005            x_libraries="$SYSROOT/usr/X11R6/lib"
43006          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43007            x_libraries="$SYSROOT/usr/lib64"
43008          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43009            x_libraries="$SYSROOT/usr/lib"
43010          fi
43011        fi
43012      fi
43013    fi
43014
43015    # Now let autoconf do it's magic
43016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43017$as_echo_n "checking for X... " >&6; }
43018
43019
43020# Check whether --with-x was given.
43021if test "${with_x+set}" = set; then :
43022  withval=$with_x;
43023fi
43024
43025# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43026if test "x$with_x" = xno; then
43027  # The user explicitly disabled X.
43028  have_x=disabled
43029else
43030  case $x_includes,$x_libraries in #(
43031    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43032    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43033  $as_echo_n "(cached) " >&6
43034else
43035  # One or both of the vars are not set, and there is no cached value.
43036ac_x_includes=no ac_x_libraries=no
43037rm -f -r conftest.dir
43038if mkdir conftest.dir; then
43039  cd conftest.dir
43040  cat >Imakefile <<'_ACEOF'
43041incroot:
43042	@echo incroot='${INCROOT}'
43043usrlibdir:
43044	@echo usrlibdir='${USRLIBDIR}'
43045libdir:
43046	@echo libdir='${LIBDIR}'
43047_ACEOF
43048  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43049    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43050    for ac_var in incroot usrlibdir libdir; do
43051      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43052    done
43053    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43054    for ac_extension in a so sl dylib la dll; do
43055      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43056	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43057	ac_im_usrlibdir=$ac_im_libdir; break
43058      fi
43059    done
43060    # Screen out bogus values from the imake configuration.  They are
43061    # bogus both because they are the default anyway, and because
43062    # using them would break gcc on systems where it needs fixed includes.
43063    case $ac_im_incroot in
43064	/usr/include) ac_x_includes= ;;
43065	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43066    esac
43067    case $ac_im_usrlibdir in
43068	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43069	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43070    esac
43071  fi
43072  cd ..
43073  rm -f -r conftest.dir
43074fi
43075
43076# Standard set of common directories for X headers.
43077# Check X11 before X11Rn because it is often a symlink to the current release.
43078ac_x_header_dirs='
43079/usr/X11/include
43080/usr/X11R7/include
43081/usr/X11R6/include
43082/usr/X11R5/include
43083/usr/X11R4/include
43084
43085/usr/include/X11
43086/usr/include/X11R7
43087/usr/include/X11R6
43088/usr/include/X11R5
43089/usr/include/X11R4
43090
43091/usr/local/X11/include
43092/usr/local/X11R7/include
43093/usr/local/X11R6/include
43094/usr/local/X11R5/include
43095/usr/local/X11R4/include
43096
43097/usr/local/include/X11
43098/usr/local/include/X11R7
43099/usr/local/include/X11R6
43100/usr/local/include/X11R5
43101/usr/local/include/X11R4
43102
43103/usr/X386/include
43104/usr/x386/include
43105/usr/XFree86/include/X11
43106
43107/usr/include
43108/usr/local/include
43109/usr/unsupported/include
43110/usr/athena/include
43111/usr/local/x11r5/include
43112/usr/lpp/Xamples/include
43113
43114/usr/openwin/include
43115/usr/openwin/share/include'
43116
43117if test "$ac_x_includes" = no; then
43118  # Guess where to find include files, by looking for Xlib.h.
43119  # First, try using that file with no special directory specified.
43120  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43121/* end confdefs.h.  */
43122#include <X11/Xlib.h>
43123_ACEOF
43124if ac_fn_cxx_try_cpp "$LINENO"; then :
43125  # We can compile using X headers with no special include directory.
43126ac_x_includes=
43127else
43128  for ac_dir in $ac_x_header_dirs; do
43129  if test -r "$ac_dir/X11/Xlib.h"; then
43130    ac_x_includes=$ac_dir
43131    break
43132  fi
43133done
43134fi
43135rm -f conftest.err conftest.i conftest.$ac_ext
43136fi # $ac_x_includes = no
43137
43138if test "$ac_x_libraries" = no; then
43139  # Check for the libraries.
43140  # See if we find them without any special options.
43141  # Don't add to $LIBS permanently.
43142  ac_save_LIBS=$LIBS
43143  LIBS="-lX11 $LIBS"
43144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43145/* end confdefs.h.  */
43146#include <X11/Xlib.h>
43147int
43148main ()
43149{
43150XrmInitialize ()
43151  ;
43152  return 0;
43153}
43154_ACEOF
43155if ac_fn_cxx_try_link "$LINENO"; then :
43156  LIBS=$ac_save_LIBS
43157# We can link X programs with no special library path.
43158ac_x_libraries=
43159else
43160  LIBS=$ac_save_LIBS
43161for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43162do
43163  # Don't even attempt the hair of trying to link an X program!
43164  for ac_extension in a so sl dylib la dll; do
43165    if test -r "$ac_dir/libX11.$ac_extension"; then
43166      ac_x_libraries=$ac_dir
43167      break 2
43168    fi
43169  done
43170done
43171fi
43172rm -f core conftest.err conftest.$ac_objext \
43173    conftest$ac_exeext conftest.$ac_ext
43174fi # $ac_x_libraries = no
43175
43176case $ac_x_includes,$ac_x_libraries in #(
43177  no,* | *,no | *\'*)
43178    # Didn't find X, or a directory has "'" in its name.
43179    ac_cv_have_x="have_x=no";; #(
43180  *)
43181    # Record where we found X for the cache.
43182    ac_cv_have_x="have_x=yes\
43183	ac_x_includes='$ac_x_includes'\
43184	ac_x_libraries='$ac_x_libraries'"
43185esac
43186fi
43187;; #(
43188    *) have_x=yes;;
43189  esac
43190  eval "$ac_cv_have_x"
43191fi # $with_x != no
43192
43193if test "$have_x" != yes; then
43194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43195$as_echo "$have_x" >&6; }
43196  no_x=yes
43197else
43198  # If each of the values was on the command line, it overrides each guess.
43199  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43200  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43201  # Update the cache value to reflect the command line values.
43202  ac_cv_have_x="have_x=yes\
43203	ac_x_includes='$x_includes'\
43204	ac_x_libraries='$x_libraries'"
43205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43206$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43207fi
43208
43209    if test "$no_x" = yes; then
43210  # Not all programs may use this symbol, but it does not hurt to define it.
43211
43212$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43213
43214  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43215else
43216  if test -n "$x_includes"; then
43217    X_CFLAGS="$X_CFLAGS -I$x_includes"
43218  fi
43219
43220  # It would also be nice to do this for all -L options, not just this one.
43221  if test -n "$x_libraries"; then
43222    X_LIBS="$X_LIBS -L$x_libraries"
43223    # For Solaris; some versions of Sun CC require a space after -R and
43224    # others require no space.  Words are not sufficient . . . .
43225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43226$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43227    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43228    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43229    ac_cxx_werror_flag=yes
43230    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43231/* end confdefs.h.  */
43232
43233int
43234main ()
43235{
43236
43237  ;
43238  return 0;
43239}
43240_ACEOF
43241if ac_fn_cxx_try_link "$LINENO"; then :
43242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43243$as_echo "no" >&6; }
43244       X_LIBS="$X_LIBS -R$x_libraries"
43245else
43246  LIBS="$ac_xsave_LIBS -R $x_libraries"
43247       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43248/* end confdefs.h.  */
43249
43250int
43251main ()
43252{
43253
43254  ;
43255  return 0;
43256}
43257_ACEOF
43258if ac_fn_cxx_try_link "$LINENO"; then :
43259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43260$as_echo "yes" >&6; }
43261	  X_LIBS="$X_LIBS -R $x_libraries"
43262else
43263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43264$as_echo "neither works" >&6; }
43265fi
43266rm -f core conftest.err conftest.$ac_objext \
43267    conftest$ac_exeext conftest.$ac_ext
43268fi
43269rm -f core conftest.err conftest.$ac_objext \
43270    conftest$ac_exeext conftest.$ac_ext
43271    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43272    LIBS=$ac_xsave_LIBS
43273  fi
43274
43275  # Check for system-dependent libraries X programs must link with.
43276  # Do this before checking for the system-independent R6 libraries
43277  # (-lICE), since we may need -lsocket or whatever for X linking.
43278
43279  if test "$ISC" = yes; then
43280    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43281  else
43282    # Martyn Johnson says this is needed for Ultrix, if the X
43283    # libraries were built with DECnet support.  And Karl Berry says
43284    # the Alpha needs dnet_stub (dnet does not exist).
43285    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43286    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43287/* end confdefs.h.  */
43288
43289/* Override any GCC internal prototype to avoid an error.
43290   Use char because int might match the return type of a GCC
43291   builtin and then its argument prototype would still apply.  */
43292#ifdef __cplusplus
43293extern "C"
43294#endif
43295char XOpenDisplay ();
43296int
43297main ()
43298{
43299return XOpenDisplay ();
43300  ;
43301  return 0;
43302}
43303_ACEOF
43304if ac_fn_cxx_try_link "$LINENO"; then :
43305
43306else
43307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43308$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43309if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43310  $as_echo_n "(cached) " >&6
43311else
43312  ac_check_lib_save_LIBS=$LIBS
43313LIBS="-ldnet  $LIBS"
43314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43315/* end confdefs.h.  */
43316
43317/* Override any GCC internal prototype to avoid an error.
43318   Use char because int might match the return type of a GCC
43319   builtin and then its argument prototype would still apply.  */
43320#ifdef __cplusplus
43321extern "C"
43322#endif
43323char dnet_ntoa ();
43324int
43325main ()
43326{
43327return dnet_ntoa ();
43328  ;
43329  return 0;
43330}
43331_ACEOF
43332if ac_fn_cxx_try_link "$LINENO"; then :
43333  ac_cv_lib_dnet_dnet_ntoa=yes
43334else
43335  ac_cv_lib_dnet_dnet_ntoa=no
43336fi
43337rm -f core conftest.err conftest.$ac_objext \
43338    conftest$ac_exeext conftest.$ac_ext
43339LIBS=$ac_check_lib_save_LIBS
43340fi
43341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43342$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43343if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43344  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43345fi
43346
43347    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43348      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43349$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43350if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43351  $as_echo_n "(cached) " >&6
43352else
43353  ac_check_lib_save_LIBS=$LIBS
43354LIBS="-ldnet_stub  $LIBS"
43355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43356/* end confdefs.h.  */
43357
43358/* Override any GCC internal prototype to avoid an error.
43359   Use char because int might match the return type of a GCC
43360   builtin and then its argument prototype would still apply.  */
43361#ifdef __cplusplus
43362extern "C"
43363#endif
43364char dnet_ntoa ();
43365int
43366main ()
43367{
43368return dnet_ntoa ();
43369  ;
43370  return 0;
43371}
43372_ACEOF
43373if ac_fn_cxx_try_link "$LINENO"; then :
43374  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43375else
43376  ac_cv_lib_dnet_stub_dnet_ntoa=no
43377fi
43378rm -f core conftest.err conftest.$ac_objext \
43379    conftest$ac_exeext conftest.$ac_ext
43380LIBS=$ac_check_lib_save_LIBS
43381fi
43382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43383$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43384if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43385  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43386fi
43387
43388    fi
43389fi
43390rm -f core conftest.err conftest.$ac_objext \
43391    conftest$ac_exeext conftest.$ac_ext
43392    LIBS="$ac_xsave_LIBS"
43393
43394    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43395    # to get the SysV transport functions.
43396    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43397    # needs -lnsl.
43398    # The nsl library prevents programs from opening the X display
43399    # on Irix 5.2, according to T.E. Dickey.
43400    # The functions gethostbyname, getservbyname, and inet_addr are
43401    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43402    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43403if test "x$ac_cv_func_gethostbyname" = xyes; then :
43404
43405fi
43406
43407    if test $ac_cv_func_gethostbyname = no; then
43408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43409$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43410if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43411  $as_echo_n "(cached) " >&6
43412else
43413  ac_check_lib_save_LIBS=$LIBS
43414LIBS="-lnsl  $LIBS"
43415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43416/* end confdefs.h.  */
43417
43418/* Override any GCC internal prototype to avoid an error.
43419   Use char because int might match the return type of a GCC
43420   builtin and then its argument prototype would still apply.  */
43421#ifdef __cplusplus
43422extern "C"
43423#endif
43424char gethostbyname ();
43425int
43426main ()
43427{
43428return gethostbyname ();
43429  ;
43430  return 0;
43431}
43432_ACEOF
43433if ac_fn_cxx_try_link "$LINENO"; then :
43434  ac_cv_lib_nsl_gethostbyname=yes
43435else
43436  ac_cv_lib_nsl_gethostbyname=no
43437fi
43438rm -f core conftest.err conftest.$ac_objext \
43439    conftest$ac_exeext conftest.$ac_ext
43440LIBS=$ac_check_lib_save_LIBS
43441fi
43442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43443$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43444if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43445  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43446fi
43447
43448      if test $ac_cv_lib_nsl_gethostbyname = no; then
43449	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43450$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43451if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43452  $as_echo_n "(cached) " >&6
43453else
43454  ac_check_lib_save_LIBS=$LIBS
43455LIBS="-lbsd  $LIBS"
43456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43457/* end confdefs.h.  */
43458
43459/* Override any GCC internal prototype to avoid an error.
43460   Use char because int might match the return type of a GCC
43461   builtin and then its argument prototype would still apply.  */
43462#ifdef __cplusplus
43463extern "C"
43464#endif
43465char gethostbyname ();
43466int
43467main ()
43468{
43469return gethostbyname ();
43470  ;
43471  return 0;
43472}
43473_ACEOF
43474if ac_fn_cxx_try_link "$LINENO"; then :
43475  ac_cv_lib_bsd_gethostbyname=yes
43476else
43477  ac_cv_lib_bsd_gethostbyname=no
43478fi
43479rm -f core conftest.err conftest.$ac_objext \
43480    conftest$ac_exeext conftest.$ac_ext
43481LIBS=$ac_check_lib_save_LIBS
43482fi
43483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43484$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43485if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43486  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43487fi
43488
43489      fi
43490    fi
43491
43492    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43493    # socket/setsockopt and other routines are undefined under SCO ODT
43494    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43495    # on later versions), says Simon Leinen: it contains gethostby*
43496    # variants that don't use the name server (or something).  -lsocket
43497    # must be given before -lnsl if both are needed.  We assume that
43498    # if connect needs -lnsl, so does gethostbyname.
43499    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43500if test "x$ac_cv_func_connect" = xyes; then :
43501
43502fi
43503
43504    if test $ac_cv_func_connect = no; then
43505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43506$as_echo_n "checking for connect in -lsocket... " >&6; }
43507if ${ac_cv_lib_socket_connect+:} false; then :
43508  $as_echo_n "(cached) " >&6
43509else
43510  ac_check_lib_save_LIBS=$LIBS
43511LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43513/* end confdefs.h.  */
43514
43515/* Override any GCC internal prototype to avoid an error.
43516   Use char because int might match the return type of a GCC
43517   builtin and then its argument prototype would still apply.  */
43518#ifdef __cplusplus
43519extern "C"
43520#endif
43521char connect ();
43522int
43523main ()
43524{
43525return connect ();
43526  ;
43527  return 0;
43528}
43529_ACEOF
43530if ac_fn_cxx_try_link "$LINENO"; then :
43531  ac_cv_lib_socket_connect=yes
43532else
43533  ac_cv_lib_socket_connect=no
43534fi
43535rm -f core conftest.err conftest.$ac_objext \
43536    conftest$ac_exeext conftest.$ac_ext
43537LIBS=$ac_check_lib_save_LIBS
43538fi
43539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43540$as_echo "$ac_cv_lib_socket_connect" >&6; }
43541if test "x$ac_cv_lib_socket_connect" = xyes; then :
43542  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43543fi
43544
43545    fi
43546
43547    # Guillermo Gomez says -lposix is necessary on A/UX.
43548    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43549if test "x$ac_cv_func_remove" = xyes; then :
43550
43551fi
43552
43553    if test $ac_cv_func_remove = no; then
43554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43555$as_echo_n "checking for remove in -lposix... " >&6; }
43556if ${ac_cv_lib_posix_remove+:} false; then :
43557  $as_echo_n "(cached) " >&6
43558else
43559  ac_check_lib_save_LIBS=$LIBS
43560LIBS="-lposix  $LIBS"
43561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43562/* end confdefs.h.  */
43563
43564/* Override any GCC internal prototype to avoid an error.
43565   Use char because int might match the return type of a GCC
43566   builtin and then its argument prototype would still apply.  */
43567#ifdef __cplusplus
43568extern "C"
43569#endif
43570char remove ();
43571int
43572main ()
43573{
43574return remove ();
43575  ;
43576  return 0;
43577}
43578_ACEOF
43579if ac_fn_cxx_try_link "$LINENO"; then :
43580  ac_cv_lib_posix_remove=yes
43581else
43582  ac_cv_lib_posix_remove=no
43583fi
43584rm -f core conftest.err conftest.$ac_objext \
43585    conftest$ac_exeext conftest.$ac_ext
43586LIBS=$ac_check_lib_save_LIBS
43587fi
43588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43589$as_echo "$ac_cv_lib_posix_remove" >&6; }
43590if test "x$ac_cv_lib_posix_remove" = xyes; then :
43591  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43592fi
43593
43594    fi
43595
43596    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43597    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43598if test "x$ac_cv_func_shmat" = xyes; then :
43599
43600fi
43601
43602    if test $ac_cv_func_shmat = no; then
43603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43604$as_echo_n "checking for shmat in -lipc... " >&6; }
43605if ${ac_cv_lib_ipc_shmat+:} false; then :
43606  $as_echo_n "(cached) " >&6
43607else
43608  ac_check_lib_save_LIBS=$LIBS
43609LIBS="-lipc  $LIBS"
43610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43611/* end confdefs.h.  */
43612
43613/* Override any GCC internal prototype to avoid an error.
43614   Use char because int might match the return type of a GCC
43615   builtin and then its argument prototype would still apply.  */
43616#ifdef __cplusplus
43617extern "C"
43618#endif
43619char shmat ();
43620int
43621main ()
43622{
43623return shmat ();
43624  ;
43625  return 0;
43626}
43627_ACEOF
43628if ac_fn_cxx_try_link "$LINENO"; then :
43629  ac_cv_lib_ipc_shmat=yes
43630else
43631  ac_cv_lib_ipc_shmat=no
43632fi
43633rm -f core conftest.err conftest.$ac_objext \
43634    conftest$ac_exeext conftest.$ac_ext
43635LIBS=$ac_check_lib_save_LIBS
43636fi
43637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43638$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43639if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43640  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43641fi
43642
43643    fi
43644  fi
43645
43646  # Check for libraries that X11R6 Xt/Xaw programs need.
43647  ac_save_LDFLAGS=$LDFLAGS
43648  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43649  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43650  # check for ICE first), but we must link in the order -lSM -lICE or
43651  # we get undefined symbols.  So assume we have SM if we have ICE.
43652  # These have to be linked with before -lX11, unlike the other
43653  # libraries we check for below, so use a different variable.
43654  # John Interrante, Karl Berry
43655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43656$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43657if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43658  $as_echo_n "(cached) " >&6
43659else
43660  ac_check_lib_save_LIBS=$LIBS
43661LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43663/* end confdefs.h.  */
43664
43665/* Override any GCC internal prototype to avoid an error.
43666   Use char because int might match the return type of a GCC
43667   builtin and then its argument prototype would still apply.  */
43668#ifdef __cplusplus
43669extern "C"
43670#endif
43671char IceConnectionNumber ();
43672int
43673main ()
43674{
43675return IceConnectionNumber ();
43676  ;
43677  return 0;
43678}
43679_ACEOF
43680if ac_fn_cxx_try_link "$LINENO"; then :
43681  ac_cv_lib_ICE_IceConnectionNumber=yes
43682else
43683  ac_cv_lib_ICE_IceConnectionNumber=no
43684fi
43685rm -f core conftest.err conftest.$ac_objext \
43686    conftest$ac_exeext conftest.$ac_ext
43687LIBS=$ac_check_lib_save_LIBS
43688fi
43689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43690$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43691if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43692  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43693fi
43694
43695  LDFLAGS=$ac_save_LDFLAGS
43696
43697fi
43698
43699
43700    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43701    # this doesn't make sense so we remove it.
43702    if test "x$COMPILE_TYPE" = xcross; then
43703      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43704    fi
43705
43706    if test "x$no_x" = xyes; then
43707
43708  # Print a helpful message on how to acquire the necessary build dependency.
43709  # x11 is the help tag: freetype, cups, pulse, alsa etc
43710  MISSING_DEPENDENCY=x11
43711
43712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43713    cygwin_help $MISSING_DEPENDENCY
43714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43715    msys_help $MISSING_DEPENDENCY
43716  else
43717    PKGHANDLER_COMMAND=
43718
43719    case $PKGHANDLER in
43720      apt-get)
43721        apt_help     $MISSING_DEPENDENCY ;;
43722      yum)
43723        yum_help     $MISSING_DEPENDENCY ;;
43724      port)
43725        port_help    $MISSING_DEPENDENCY ;;
43726      pkgutil)
43727        pkgutil_help $MISSING_DEPENDENCY ;;
43728      pkgadd)
43729        pkgadd_help  $MISSING_DEPENDENCY ;;
43730    esac
43731
43732    if test "x$PKGHANDLER_COMMAND" != x; then
43733      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43734    fi
43735  fi
43736
43737      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43738    fi
43739
43740    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43741      OPENWIN_HOME="/usr/openwin"
43742      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43743      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43744          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43745          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43746          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43747    fi
43748
43749    ac_ext=c
43750ac_cpp='$CPP $CPPFLAGS'
43751ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43752ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43753ac_compiler_gnu=$ac_cv_c_compiler_gnu
43754
43755    OLD_CFLAGS="$CFLAGS"
43756    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43757
43758    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43759    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43760do :
43761  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43762ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43763          # include <X11/Xlib.h>
43764          # include <X11/Xutil.h>
43765
43766
43767"
43768if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43769  cat >>confdefs.h <<_ACEOF
43770#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43771_ACEOF
43772 X11_HEADERS_OK=yes
43773else
43774  X11_HEADERS_OK=no; break
43775fi
43776
43777done
43778
43779
43780    if test "x$X11_HEADERS_OK" = xno; then
43781
43782  # Print a helpful message on how to acquire the necessary build dependency.
43783  # x11 is the help tag: freetype, cups, pulse, alsa etc
43784  MISSING_DEPENDENCY=x11
43785
43786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43787    cygwin_help $MISSING_DEPENDENCY
43788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43789    msys_help $MISSING_DEPENDENCY
43790  else
43791    PKGHANDLER_COMMAND=
43792
43793    case $PKGHANDLER in
43794      apt-get)
43795        apt_help     $MISSING_DEPENDENCY ;;
43796      yum)
43797        yum_help     $MISSING_DEPENDENCY ;;
43798      port)
43799        port_help    $MISSING_DEPENDENCY ;;
43800      pkgutil)
43801        pkgutil_help $MISSING_DEPENDENCY ;;
43802      pkgadd)
43803        pkgadd_help  $MISSING_DEPENDENCY ;;
43804    esac
43805
43806    if test "x$PKGHANDLER_COMMAND" != x; then
43807      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43808    fi
43809  fi
43810
43811      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43812    fi
43813
43814    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43815    # defined in libawt_xawt.
43816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43817$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43819/* end confdefs.h.  */
43820#include <X11/extensions/Xrender.h>
43821int
43822main ()
43823{
43824XLinearGradient x;
43825  ;
43826  return 0;
43827}
43828_ACEOF
43829if ac_fn_c_try_compile "$LINENO"; then :
43830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43831$as_echo "yes" >&6; }
43832else
43833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43834$as_echo "no" >&6; }
43835         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43836fi
43837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43838
43839    CFLAGS="$OLD_CFLAGS"
43840    ac_ext=cpp
43841ac_cpp='$CXXCPP $CPPFLAGS'
43842ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43843ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43844ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43845
43846  fi # X11_NOT_NEEDED
43847
43848
43849
43850
43851
43852
43853  ###############################################################################
43854  #
43855  # The common unix printing system cups is used to print from java.
43856  #
43857
43858# Check whether --with-cups was given.
43859if test "${with_cups+set}" = set; then :
43860  withval=$with_cups;
43861fi
43862
43863
43864# Check whether --with-cups-include was given.
43865if test "${with_cups_include+set}" = set; then :
43866  withval=$with_cups_include;
43867fi
43868
43869
43870  if test "x$CUPS_NOT_NEEDED" = xyes; then
43871    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43872      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43873$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43874    fi
43875    CUPS_CFLAGS=
43876  else
43877    CUPS_FOUND=no
43878
43879    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43880      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43881    fi
43882
43883    if test "x${with_cups}" != x; then
43884      CUPS_CFLAGS="-I${with_cups}/include"
43885      CUPS_FOUND=yes
43886    fi
43887    if test "x${with_cups_include}" != x; then
43888      CUPS_CFLAGS="-I${with_cups_include}"
43889      CUPS_FOUND=yes
43890    fi
43891    if test "x$CUPS_FOUND" = xno; then
43892
43893
43894  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43895    # Source the builddeps file again, to make sure it uses the latest variables!
43896    . $builddepsfile
43897    # Look for a target and build machine specific resource!
43898    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43899    if test "x$resource" = x; then
43900      # Ok, lets instead look for a target specific resource
43901      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43902    fi
43903    if test "x$resource" = x; then
43904      # Ok, lets instead look for a build specific resource
43905      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43906    fi
43907    if test "x$resource" = x; then
43908      # Ok, lets instead look for a generic resource
43909      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43910      resource=${builddep_cups}
43911    fi
43912    if test "x$resource" != x; then
43913      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43914$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43915      # If the resource in the builddeps.conf file is an existing directory,
43916      # for example /java/linux/cups
43917      if test -d ${resource}; then
43918        depdir=${resource}
43919      else
43920
43921  # cups is for example mymodule
43922  # $resource is for example libs/general/libmymod_1_2_3.zip
43923  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43924  # $with_builddeps_dir is for example /localhome/builddeps
43925  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43926  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43927  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43928  filename=`basename $resource`
43929  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43930  filebase=${filename%%.*}
43931  extension=${filename#*.}
43932  installdir=$with_builddeps_dir/$filebase
43933  if test ! -f $installdir/$filename.unpacked; then
43934    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43935$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43936    if test ! -d $installdir; then
43937      mkdir -p $installdir
43938    fi
43939    if test ! -d $installdir; then
43940      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43941    fi
43942    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43943    touch $tmpfile
43944    if test ! -f $tmpfile; then
43945      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43946    fi
43947
43948  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43949  # $tmpfile is the local file name for the downloaded file.
43950  VALID_TOOL=no
43951  if test "x$BDEPS_FTP" = xwget; then
43952    VALID_TOOL=yes
43953    wget -O $tmpfile $with_builddeps_server/$resource
43954  fi
43955  if test "x$BDEPS_FTP" = xlftp; then
43956    VALID_TOOL=yes
43957    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43958  fi
43959  if test "x$BDEPS_FTP" = xftp; then
43960    VALID_TOOL=yes
43961    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43962    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43963    FTPUSERPWD=${FTPSERVER%%@*}
43964    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43965      FTPUSER=${userpwd%%:*}
43966      FTPPWD=${userpwd#*@}
43967      FTPSERVER=${FTPSERVER#*@}
43968    else
43969      FTPUSER=ftp
43970      FTPPWD=ftp
43971    fi
43972    # the "pass" command does not work on some
43973    # ftp clients (read ftp.exe) but if it works,
43974    # passive mode is better!
43975    ( \
43976        echo "user $FTPUSER $FTPPWD"        ; \
43977        echo "pass"                         ; \
43978        echo "bin"                          ; \
43979        echo "get $FTPPATH $tmpfile"              ; \
43980    ) | ftp -in $FTPSERVER
43981  fi
43982  if test "x$VALID_TOOL" != xyes; then
43983    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43984  fi
43985
43986    mv $tmpfile $installdir/$filename
43987    if test ! -s $installdir/$filename; then
43988      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43989    fi
43990    case "$extension" in
43991      zip)  echo "Unzipping $installdir/$filename..."
43992        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43993        ;;
43994      tar.gz) echo "Untaring $installdir/$filename..."
43995        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43996        ;;
43997      tgz) echo "Untaring $installdir/$filename..."
43998        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43999        ;;
44000      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44001        ;;
44002    esac
44003  fi
44004  if test -f $installdir/$filename.unpacked; then
44005    depdir=$installdir
44006  fi
44007
44008      fi
44009      # Source the builddeps file again, because in the previous command, the depdir
44010      # was updated to point at the current build dependency install directory.
44011      . $builddepsfile
44012      # Now extract variables from the builddeps.conf files.
44013      theroot=${builddep_cups_ROOT}
44014      thecflags=${builddep_cups_CFLAGS}
44015      thelibs=${builddep_cups_LIBS}
44016      if test "x$depdir" = x; then
44017        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44018      fi
44019      CUPS=$depdir
44020      if test "x$theroot" != x; then
44021        CUPS="$theroot"
44022      fi
44023      if test "x$thecflags" != x; then
44024        CUPS_CFLAGS="$thecflags"
44025      fi
44026      if test "x$thelibs" != x; then
44027        CUPS_LIBS="$thelibs"
44028      fi
44029      CUPS_FOUND=yes
44030
44031    fi
44032
44033  fi
44034
44035    fi
44036    if test "x$CUPS_FOUND" = xno; then
44037      # Are the cups headers installed in the default /usr/include location?
44038      for ac_header in cups/cups.h cups/ppd.h
44039do :
44040  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44041ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44042if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44043  cat >>confdefs.h <<_ACEOF
44044#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44045_ACEOF
44046
44047            CUPS_FOUND=yes
44048            CUPS_CFLAGS=
44049            DEFAULT_CUPS=yes
44050
44051
44052fi
44053
44054done
44055
44056    fi
44057    if test "x$CUPS_FOUND" = xno; then
44058      # Getting nervous now? Lets poke around for standard Solaris third-party
44059      # package installation locations.
44060      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44061$as_echo_n "checking for cups headers... " >&6; }
44062      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44063        # An SFW package seems to be installed!
44064        CUPS_FOUND=yes
44065        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44066      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44067        # A CSW package seems to be installed!
44068        CUPS_FOUND=yes
44069        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44070      fi
44071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44072$as_echo "$CUPS_FOUND" >&6; }
44073    fi
44074    if test "x$CUPS_FOUND" = xno; then
44075
44076  # Print a helpful message on how to acquire the necessary build dependency.
44077  # cups is the help tag: freetype, cups, pulse, alsa etc
44078  MISSING_DEPENDENCY=cups
44079
44080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44081    cygwin_help $MISSING_DEPENDENCY
44082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44083    msys_help $MISSING_DEPENDENCY
44084  else
44085    PKGHANDLER_COMMAND=
44086
44087    case $PKGHANDLER in
44088      apt-get)
44089        apt_help     $MISSING_DEPENDENCY ;;
44090      yum)
44091        yum_help     $MISSING_DEPENDENCY ;;
44092      port)
44093        port_help    $MISSING_DEPENDENCY ;;
44094      pkgutil)
44095        pkgutil_help $MISSING_DEPENDENCY ;;
44096      pkgadd)
44097        pkgadd_help  $MISSING_DEPENDENCY ;;
44098    esac
44099
44100    if test "x$PKGHANDLER_COMMAND" != x; then
44101      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44102    fi
44103  fi
44104
44105      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44106    fi
44107  fi
44108
44109
44110
44111
44112
44113
44114  ###############################################################################
44115  #
44116  # The ubiquitous freetype library is used to render fonts.
44117  #
44118
44119# Check whether --with-freetype was given.
44120if test "${with_freetype+set}" = set; then :
44121  withval=$with_freetype;
44122fi
44123
44124
44125# Check whether --with-freetype-include was given.
44126if test "${with_freetype_include+set}" = set; then :
44127  withval=$with_freetype_include;
44128fi
44129
44130
44131# Check whether --with-freetype-lib was given.
44132if test "${with_freetype_lib+set}" = set; then :
44133  withval=$with_freetype_lib;
44134fi
44135
44136
44137# Check whether --with-freetype-src was given.
44138if test "${with_freetype_src+set}" = set; then :
44139  withval=$with_freetype_src;
44140fi
44141
44142  # Check whether --enable-freetype-bundling was given.
44143if test "${enable_freetype_bundling+set}" = set; then :
44144  enableval=$enable_freetype_bundling;
44145fi
44146
44147
44148  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44149  FREETYPE_BASE_NAME=freetype
44150  FREETYPE_CFLAGS=
44151  FREETYPE_LIBS=
44152  FREETYPE_BUNDLE_LIB_PATH=
44153
44154  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44155    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
44156      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44157$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44158    fi
44159    if test "x$enable_freetype_bundling" != x; then
44160      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44161$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44162    fi
44163  else
44164    # freetype is needed to build; go get it!
44165
44166    BUNDLE_FREETYPE="$enable_freetype_bundling"
44167
44168    if  test "x$with_freetype_src" != x; then
44169      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44170        # Try to build freetype if --with-freetype-src was given on Windows
44171
44172  FREETYPE_SRC_PATH="$with_freetype_src"
44173  BUILD_FREETYPE=yes
44174
44175  # Check if the freetype sources are acessible..
44176  if ! test -d $FREETYPE_SRC_PATH; then
44177    { $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
44178$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44179    BUILD_FREETYPE=no
44180  fi
44181  # ..and contain a vc2010 project file
44182  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44183  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44184    { $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
44185$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44186    BUILD_FREETYPE=no
44187  fi
44188  # Now check if configure found a version of 'msbuild.exe'
44189  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44190    { $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
44191$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;}
44192    BUILD_FREETYPE=no
44193  fi
44194
44195  # Ready to go..
44196  if test "x$BUILD_FREETYPE" = xyes; then
44197
44198    # msbuild requires trailing slashes for output directories
44199    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44200    freetype_lib_path_unix="$freetype_lib_path"
44201    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44202
44203  unix_path="$vcxproj_path"
44204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44205    windows_path=`$CYGPATH -m "$unix_path"`
44206    vcxproj_path="$windows_path"
44207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44208    windows_path=`cmd //c echo $unix_path`
44209    vcxproj_path="$windows_path"
44210  fi
44211
44212
44213  unix_path="$freetype_lib_path"
44214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44215    windows_path=`$CYGPATH -m "$unix_path"`
44216    freetype_lib_path="$windows_path"
44217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44218    windows_path=`cmd //c echo $unix_path`
44219    freetype_lib_path="$windows_path"
44220  fi
44221
44222
44223  unix_path="$freetype_obj_path"
44224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44225    windows_path=`$CYGPATH -m "$unix_path"`
44226    freetype_obj_path="$windows_path"
44227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44228    windows_path=`cmd //c echo $unix_path`
44229    freetype_obj_path="$windows_path"
44230  fi
44231
44232    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44233      freetype_platform=x64
44234    else
44235      freetype_platform=win32
44236    fi
44237
44238    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44239    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44240    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44241    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44242    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44243$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44244
44245    # First we try to build the freetype.dll
44246    $ECHO -e "@echo off\n"\
44247	     "$MSBUILD $vcxproj_path "\
44248		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44249		       "/p:Configuration=\"Release Multithreaded\" "\
44250		       "/p:Platform=$freetype_platform "\
44251		       "/p:ConfigurationType=DynamicLibrary "\
44252		       "/p:TargetName=freetype "\
44253		       "/p:OutDir=\"$freetype_lib_path\" "\
44254		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44255    cmd /c freetype.bat
44256
44257    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44258      # If that succeeds we also build freetype.lib
44259      $ECHO -e "@echo off\n"\
44260	       "$MSBUILD $vcxproj_path "\
44261			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44262			 "/p:Configuration=\"Release Multithreaded\" "\
44263			 "/p:Platform=$freetype_platform "\
44264			 "/p:ConfigurationType=StaticLibrary "\
44265			 "/p:TargetName=freetype "\
44266			 "/p:OutDir=\"$freetype_lib_path\" "\
44267			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44268      cmd /c freetype.bat
44269
44270      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44271	# Once we build both, lib and dll, set freetype lib and include path appropriately
44272	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44273	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44274	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44275$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44276      else
44277	BUILD_FREETYPE=no
44278      fi
44279    else
44280      BUILD_FREETYPE=no
44281    fi
44282  fi
44283
44284        if test "x$BUILD_FREETYPE" = xyes; then
44285          # Okay, we built it. Check that it works.
44286
44287  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44288  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44289  METHOD="--with-freetype-src"
44290
44291  # Let's start with an optimistic view of the world :-)
44292  FOUND_FREETYPE=yes
44293
44294  # First look for the canonical freetype main include file ft2build.h.
44295  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44296    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44297    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44298    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44299      # Fail.
44300      FOUND_FREETYPE=no
44301    fi
44302  fi
44303
44304  if test "x$FOUND_FREETYPE" = xyes; then
44305    # Include file found, let's continue the sanity check.
44306    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44307$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44308
44309    # Reset to default value
44310    FREETYPE_BASE_NAME=freetype
44311    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44312    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44313      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44314          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44315        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44316        # for the .6 version explicitly.
44317        FREETYPE_BASE_NAME=freetype.6
44318        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44319        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44320$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44321      else
44322        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44323$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44324        FOUND_FREETYPE=no
44325      fi
44326    else
44327      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44328        # On Windows, we will need both .lib and .dll file.
44329        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44330          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44331$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44332          FOUND_FREETYPE=no
44333        fi
44334      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44335          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44336        # Found lib in isa dir, use that instead.
44337        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44338        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44339$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44340      fi
44341    fi
44342  fi
44343
44344  if test "x$FOUND_FREETYPE" = xyes; then
44345
44346  # Only process if variable expands to non-empty
44347
44348  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44350
44351  # Input might be given as Windows format, start by converting to
44352  # unix format.
44353  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44354  new_path=`$CYGPATH -u "$path"`
44355
44356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44359  # "foo.exe" is OK but "foo" is an error.
44360  #
44361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44362  # It is also a way to make sure we got the proper file name for the real test later on.
44363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44364  if test "x$test_shortpath" = x; then
44365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44367    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44368  fi
44369
44370  # Call helper function which possibly converts this using DOS-style short mode.
44371  # If so, the updated path is stored in $new_path.
44372
44373  input_path="$new_path"
44374  # Check if we need to convert this using DOS-style short mode. If the path
44375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44376  # take no chances and rewrite it.
44377  # Note: m4 eats our [], so we need to use [ and ] instead.
44378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44379  if test "x$has_forbidden_chars" != x; then
44380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44384      # Going to short mode and back again did indeed matter. Since short mode is
44385      # case insensitive, let's make it lowercase to improve readability.
44386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44387      # Now convert it back to Unix-style (cygpath)
44388      input_path=`$CYGPATH -u "$shortmode_path"`
44389      new_path="$input_path"
44390    fi
44391  fi
44392
44393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44394  if test "x$test_cygdrive_prefix" = x; then
44395    # As a simple fix, exclude /usr/bin since it's not a real path.
44396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44398      # a path prefixed by /cygdrive for fixpath to work.
44399      new_path="$CYGWIN_ROOT_PATH$input_path"
44400    fi
44401  fi
44402
44403
44404  if test "x$path" != "x$new_path"; then
44405    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44408  fi
44409
44410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411
44412  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44413  has_colon=`$ECHO $path | $GREP ^.:`
44414  new_path="$path"
44415  if test "x$has_colon" = x; then
44416    # Not in mixed or Windows style, start by that.
44417    new_path=`cmd //c echo $path`
44418  fi
44419
44420
44421  input_path="$new_path"
44422  # Check if we need to convert this using DOS-style short mode. If the path
44423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44424  # take no chances and rewrite it.
44425  # Note: m4 eats our [], so we need to use [ and ] instead.
44426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44427  if test "x$has_forbidden_chars" != x; then
44428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44430  fi
44431
44432
44433  windows_path="$new_path"
44434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435    unix_path=`$CYGPATH -u "$windows_path"`
44436    new_path="$unix_path"
44437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44439    new_path="$unix_path"
44440  fi
44441
44442  if test "x$path" != "x$new_path"; then
44443    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44446  fi
44447
44448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44450
44451    else
44452      # We're on a unix platform. Hooray! :)
44453      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44454      has_space=`$ECHO "$path" | $GREP " "`
44455      if test "x$has_space" != x; then
44456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44459      fi
44460
44461      # Use eval to expand a potential ~
44462      eval path="$path"
44463      if test ! -f "$path" && test ! -d "$path"; then
44464        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44465      fi
44466
44467      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44468    fi
44469  fi
44470
44471
44472  # Only process if variable expands to non-empty
44473
44474  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44476
44477  # Input might be given as Windows format, start by converting to
44478  # unix format.
44479  path="$POTENTIAL_FREETYPE_LIB_PATH"
44480  new_path=`$CYGPATH -u "$path"`
44481
44482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44485  # "foo.exe" is OK but "foo" is an error.
44486  #
44487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44488  # It is also a way to make sure we got the proper file name for the real test later on.
44489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44490  if test "x$test_shortpath" = x; then
44491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44493    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44494  fi
44495
44496  # Call helper function which possibly converts this using DOS-style short mode.
44497  # If so, the updated path is stored in $new_path.
44498
44499  input_path="$new_path"
44500  # Check if we need to convert this using DOS-style short mode. If the path
44501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44502  # take no chances and rewrite it.
44503  # Note: m4 eats our [], so we need to use [ and ] instead.
44504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44505  if test "x$has_forbidden_chars" != x; then
44506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44510      # Going to short mode and back again did indeed matter. Since short mode is
44511      # case insensitive, let's make it lowercase to improve readability.
44512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44513      # Now convert it back to Unix-style (cygpath)
44514      input_path=`$CYGPATH -u "$shortmode_path"`
44515      new_path="$input_path"
44516    fi
44517  fi
44518
44519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44520  if test "x$test_cygdrive_prefix" = x; then
44521    # As a simple fix, exclude /usr/bin since it's not a real path.
44522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44524      # a path prefixed by /cygdrive for fixpath to work.
44525      new_path="$CYGWIN_ROOT_PATH$input_path"
44526    fi
44527  fi
44528
44529
44530  if test "x$path" != "x$new_path"; then
44531    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44533$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44534  fi
44535
44536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44537
44538  path="$POTENTIAL_FREETYPE_LIB_PATH"
44539  has_colon=`$ECHO $path | $GREP ^.:`
44540  new_path="$path"
44541  if test "x$has_colon" = x; then
44542    # Not in mixed or Windows style, start by that.
44543    new_path=`cmd //c echo $path`
44544  fi
44545
44546
44547  input_path="$new_path"
44548  # Check if we need to convert this using DOS-style short mode. If the path
44549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44550  # take no chances and rewrite it.
44551  # Note: m4 eats our [], so we need to use [ and ] instead.
44552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44553  if test "x$has_forbidden_chars" != x; then
44554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44556  fi
44557
44558
44559  windows_path="$new_path"
44560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44561    unix_path=`$CYGPATH -u "$windows_path"`
44562    new_path="$unix_path"
44563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44565    new_path="$unix_path"
44566  fi
44567
44568  if test "x$path" != "x$new_path"; then
44569    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44571$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44572  fi
44573
44574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44576
44577    else
44578      # We're on a unix platform. Hooray! :)
44579      path="$POTENTIAL_FREETYPE_LIB_PATH"
44580      has_space=`$ECHO "$path" | $GREP " "`
44581      if test "x$has_space" != x; then
44582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44584        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44585      fi
44586
44587      # Use eval to expand a potential ~
44588      eval path="$path"
44589      if test ! -f "$path" && test ! -d "$path"; then
44590        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44591      fi
44592
44593      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44594    fi
44595  fi
44596
44597
44598    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44600$as_echo_n "checking for freetype includes... " >&6; }
44601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44602$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44603    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44605$as_echo_n "checking for freetype libraries... " >&6; }
44606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44607$as_echo "$FREETYPE_LIB_PATH" >&6; }
44608  fi
44609
44610          if test "x$FOUND_FREETYPE" != xyes; then
44611            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44612          fi
44613        else
44614          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44615$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44616          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44617        fi
44618      else
44619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44620$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44621      fi
44622    fi
44623
44624    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44625      # User has specified settings
44626
44627      if test "x$BUNDLE_FREETYPE" = x; then
44628        # If not specified, default is to bundle freetype
44629        BUNDLE_FREETYPE=yes
44630      fi
44631
44632      if test "x$with_freetype" != x; then
44633        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44634        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44635      fi
44636
44637      # Allow --with-freetype-lib and --with-freetype-include to override
44638      if test "x$with_freetype_include" != x; then
44639        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44640      fi
44641      if test "x$with_freetype_lib" != x; then
44642        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44643      fi
44644
44645      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44646        # Okay, we got it. Check that it works.
44647
44648  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44649  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44650  METHOD="--with-freetype"
44651
44652  # Let's start with an optimistic view of the world :-)
44653  FOUND_FREETYPE=yes
44654
44655  # First look for the canonical freetype main include file ft2build.h.
44656  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44657    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44658    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44659    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44660      # Fail.
44661      FOUND_FREETYPE=no
44662    fi
44663  fi
44664
44665  if test "x$FOUND_FREETYPE" = xyes; then
44666    # Include file found, let's continue the sanity check.
44667    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44668$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44669
44670    # Reset to default value
44671    FREETYPE_BASE_NAME=freetype
44672    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44673    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44674      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44675          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44676        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44677        # for the .6 version explicitly.
44678        FREETYPE_BASE_NAME=freetype.6
44679        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44680        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44681$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44682      else
44683        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44684$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44685        FOUND_FREETYPE=no
44686      fi
44687    else
44688      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44689        # On Windows, we will need both .lib and .dll file.
44690        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44691          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44692$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44693          FOUND_FREETYPE=no
44694        fi
44695      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44696          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44697        # Found lib in isa dir, use that instead.
44698        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44699        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44700$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44701      fi
44702    fi
44703  fi
44704
44705  if test "x$FOUND_FREETYPE" = xyes; then
44706
44707  # Only process if variable expands to non-empty
44708
44709  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44711
44712  # Input might be given as Windows format, start by converting to
44713  # unix format.
44714  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44715  new_path=`$CYGPATH -u "$path"`
44716
44717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44720  # "foo.exe" is OK but "foo" is an error.
44721  #
44722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44723  # It is also a way to make sure we got the proper file name for the real test later on.
44724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44725  if test "x$test_shortpath" = x; then
44726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44727$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44728    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44729  fi
44730
44731  # Call helper function which possibly converts this using DOS-style short mode.
44732  # If so, the updated path is stored in $new_path.
44733
44734  input_path="$new_path"
44735  # Check if we need to convert this using DOS-style short mode. If the path
44736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44737  # take no chances and rewrite it.
44738  # Note: m4 eats our [], so we need to use [ and ] instead.
44739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44740  if test "x$has_forbidden_chars" != x; then
44741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44745      # Going to short mode and back again did indeed matter. Since short mode is
44746      # case insensitive, let's make it lowercase to improve readability.
44747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44748      # Now convert it back to Unix-style (cygpath)
44749      input_path=`$CYGPATH -u "$shortmode_path"`
44750      new_path="$input_path"
44751    fi
44752  fi
44753
44754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44755  if test "x$test_cygdrive_prefix" = x; then
44756    # As a simple fix, exclude /usr/bin since it's not a real path.
44757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44759      # a path prefixed by /cygdrive for fixpath to work.
44760      new_path="$CYGWIN_ROOT_PATH$input_path"
44761    fi
44762  fi
44763
44764
44765  if test "x$path" != "x$new_path"; then
44766    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44768$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44769  fi
44770
44771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44772
44773  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44774  has_colon=`$ECHO $path | $GREP ^.:`
44775  new_path="$path"
44776  if test "x$has_colon" = x; then
44777    # Not in mixed or Windows style, start by that.
44778    new_path=`cmd //c echo $path`
44779  fi
44780
44781
44782  input_path="$new_path"
44783  # Check if we need to convert this using DOS-style short mode. If the path
44784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44785  # take no chances and rewrite it.
44786  # Note: m4 eats our [], so we need to use [ and ] instead.
44787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44788  if test "x$has_forbidden_chars" != x; then
44789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44791  fi
44792
44793
44794  windows_path="$new_path"
44795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44796    unix_path=`$CYGPATH -u "$windows_path"`
44797    new_path="$unix_path"
44798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44800    new_path="$unix_path"
44801  fi
44802
44803  if test "x$path" != "x$new_path"; then
44804    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44806$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44807  fi
44808
44809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44811
44812    else
44813      # We're on a unix platform. Hooray! :)
44814      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44815      has_space=`$ECHO "$path" | $GREP " "`
44816      if test "x$has_space" != x; then
44817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44818$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44820      fi
44821
44822      # Use eval to expand a potential ~
44823      eval path="$path"
44824      if test ! -f "$path" && test ! -d "$path"; then
44825        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44826      fi
44827
44828      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44829    fi
44830  fi
44831
44832
44833  # Only process if variable expands to non-empty
44834
44835  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44837
44838  # Input might be given as Windows format, start by converting to
44839  # unix format.
44840  path="$POTENTIAL_FREETYPE_LIB_PATH"
44841  new_path=`$CYGPATH -u "$path"`
44842
44843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44846  # "foo.exe" is OK but "foo" is an error.
44847  #
44848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44849  # It is also a way to make sure we got the proper file name for the real test later on.
44850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44851  if test "x$test_shortpath" = x; then
44852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44854    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44855  fi
44856
44857  # Call helper function which possibly converts this using DOS-style short mode.
44858  # If so, the updated path is stored in $new_path.
44859
44860  input_path="$new_path"
44861  # Check if we need to convert this using DOS-style short mode. If the path
44862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44863  # take no chances and rewrite it.
44864  # Note: m4 eats our [], so we need to use [ and ] instead.
44865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44866  if test "x$has_forbidden_chars" != x; then
44867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44871      # Going to short mode and back again did indeed matter. Since short mode is
44872      # case insensitive, let's make it lowercase to improve readability.
44873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44874      # Now convert it back to Unix-style (cygpath)
44875      input_path=`$CYGPATH -u "$shortmode_path"`
44876      new_path="$input_path"
44877    fi
44878  fi
44879
44880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44881  if test "x$test_cygdrive_prefix" = x; then
44882    # As a simple fix, exclude /usr/bin since it's not a real path.
44883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44885      # a path prefixed by /cygdrive for fixpath to work.
44886      new_path="$CYGWIN_ROOT_PATH$input_path"
44887    fi
44888  fi
44889
44890
44891  if test "x$path" != "x$new_path"; then
44892    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44894$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44895  fi
44896
44897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44898
44899  path="$POTENTIAL_FREETYPE_LIB_PATH"
44900  has_colon=`$ECHO $path | $GREP ^.:`
44901  new_path="$path"
44902  if test "x$has_colon" = x; then
44903    # Not in mixed or Windows style, start by that.
44904    new_path=`cmd //c echo $path`
44905  fi
44906
44907
44908  input_path="$new_path"
44909  # Check if we need to convert this using DOS-style short mode. If the path
44910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44911  # take no chances and rewrite it.
44912  # Note: m4 eats our [], so we need to use [ and ] instead.
44913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44914  if test "x$has_forbidden_chars" != x; then
44915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44917  fi
44918
44919
44920  windows_path="$new_path"
44921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44922    unix_path=`$CYGPATH -u "$windows_path"`
44923    new_path="$unix_path"
44924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44926    new_path="$unix_path"
44927  fi
44928
44929  if test "x$path" != "x$new_path"; then
44930    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44933  fi
44934
44935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44937
44938    else
44939      # We're on a unix platform. Hooray! :)
44940      path="$POTENTIAL_FREETYPE_LIB_PATH"
44941      has_space=`$ECHO "$path" | $GREP " "`
44942      if test "x$has_space" != x; then
44943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44946      fi
44947
44948      # Use eval to expand a potential ~
44949      eval path="$path"
44950      if test ! -f "$path" && test ! -d "$path"; then
44951        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44952      fi
44953
44954      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44955    fi
44956  fi
44957
44958
44959    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44961$as_echo_n "checking for freetype includes... " >&6; }
44962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44963$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44964    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44966$as_echo_n "checking for freetype libraries... " >&6; }
44967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44968$as_echo "$FREETYPE_LIB_PATH" >&6; }
44969  fi
44970
44971        if test "x$FOUND_FREETYPE" != xyes; then
44972          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44973        fi
44974      else
44975        # User specified only one of lib or include. This is an error.
44976        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44977          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44978$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44979          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44980        else
44981          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44982$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44983          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44984        fi
44985      fi
44986    else
44987      # User did not specify settings, but we need freetype. Try to locate it.
44988
44989      if test "x$BUNDLE_FREETYPE" = x; then
44990        # If not specified, default is to bundle freetype only on windows
44991        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44992          BUNDLE_FREETYPE=yes
44993        else
44994          BUNDLE_FREETYPE=no
44995        fi
44996      fi
44997
44998      if test "x$FOUND_FREETYPE" != xyes; then
44999        # Check builddeps
45000
45001
45002  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45003    # Source the builddeps file again, to make sure it uses the latest variables!
45004    . $builddepsfile
45005    # Look for a target and build machine specific resource!
45006    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45007    if test "x$resource" = x; then
45008      # Ok, lets instead look for a target specific resource
45009      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45010    fi
45011    if test "x$resource" = x; then
45012      # Ok, lets instead look for a build specific resource
45013      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45014    fi
45015    if test "x$resource" = x; then
45016      # Ok, lets instead look for a generic resource
45017      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45018      resource=${builddep_freetype2}
45019    fi
45020    if test "x$resource" != x; then
45021      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45022$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45023      # If the resource in the builddeps.conf file is an existing directory,
45024      # for example /java/linux/cups
45025      if test -d ${resource}; then
45026        depdir=${resource}
45027      else
45028
45029  # freetype2 is for example mymodule
45030  # $resource is for example libs/general/libmymod_1_2_3.zip
45031  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45032  # $with_builddeps_dir is for example /localhome/builddeps
45033  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45034  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45035  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45036  filename=`basename $resource`
45037  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45038  filebase=${filename%%.*}
45039  extension=${filename#*.}
45040  installdir=$with_builddeps_dir/$filebase
45041  if test ! -f $installdir/$filename.unpacked; then
45042    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45043$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45044    if test ! -d $installdir; then
45045      mkdir -p $installdir
45046    fi
45047    if test ! -d $installdir; then
45048      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45049    fi
45050    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45051    touch $tmpfile
45052    if test ! -f $tmpfile; then
45053      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45054    fi
45055
45056  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45057  # $tmpfile is the local file name for the downloaded file.
45058  VALID_TOOL=no
45059  if test "x$BDEPS_FTP" = xwget; then
45060    VALID_TOOL=yes
45061    wget -O $tmpfile $with_builddeps_server/$resource
45062  fi
45063  if test "x$BDEPS_FTP" = xlftp; then
45064    VALID_TOOL=yes
45065    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45066  fi
45067  if test "x$BDEPS_FTP" = xftp; then
45068    VALID_TOOL=yes
45069    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45070    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45071    FTPUSERPWD=${FTPSERVER%%@*}
45072    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45073      FTPUSER=${userpwd%%:*}
45074      FTPPWD=${userpwd#*@}
45075      FTPSERVER=${FTPSERVER#*@}
45076    else
45077      FTPUSER=ftp
45078      FTPPWD=ftp
45079    fi
45080    # the "pass" command does not work on some
45081    # ftp clients (read ftp.exe) but if it works,
45082    # passive mode is better!
45083    ( \
45084        echo "user $FTPUSER $FTPPWD"        ; \
45085        echo "pass"                         ; \
45086        echo "bin"                          ; \
45087        echo "get $FTPPATH $tmpfile"              ; \
45088    ) | ftp -in $FTPSERVER
45089  fi
45090  if test "x$VALID_TOOL" != xyes; then
45091    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45092  fi
45093
45094    mv $tmpfile $installdir/$filename
45095    if test ! -s $installdir/$filename; then
45096      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45097    fi
45098    case "$extension" in
45099      zip)  echo "Unzipping $installdir/$filename..."
45100        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45101        ;;
45102      tar.gz) echo "Untaring $installdir/$filename..."
45103        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45104        ;;
45105      tgz) echo "Untaring $installdir/$filename..."
45106        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45107        ;;
45108      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45109        ;;
45110    esac
45111  fi
45112  if test -f $installdir/$filename.unpacked; then
45113    depdir=$installdir
45114  fi
45115
45116      fi
45117      # Source the builddeps file again, because in the previous command, the depdir
45118      # was updated to point at the current build dependency install directory.
45119      . $builddepsfile
45120      # Now extract variables from the builddeps.conf files.
45121      theroot=${builddep_freetype2_ROOT}
45122      thecflags=${builddep_freetype2_CFLAGS}
45123      thelibs=${builddep_freetype2_LIBS}
45124      if test "x$depdir" = x; then
45125        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45126      fi
45127      FREETYPE=$depdir
45128      if test "x$theroot" != x; then
45129        FREETYPE="$theroot"
45130      fi
45131      if test "x$thecflags" != x; then
45132        FREETYPE_CFLAGS="$thecflags"
45133      fi
45134      if test "x$thelibs" != x; then
45135        FREETYPE_LIBS="$thelibs"
45136      fi
45137      FOUND_FREETYPE=yes
45138      else FOUND_FREETYPE=no
45139
45140    fi
45141    else FOUND_FREETYPE=no
45142
45143  fi
45144
45145        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45146        if test "x$FOUND_FREETYPE" = xyes; then
45147          if test "x$BUNDLE_FREETYPE" = xyes; then
45148            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45149$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45150            FOUND_FREETYPE=no
45151          else
45152            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45153$as_echo_n "checking for freetype... " >&6; }
45154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45155$as_echo "yes (using builddeps)" >&6; }
45156          fi
45157        fi
45158      fi
45159
45160      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45161      if test "x$SYSROOT" = x; then
45162        if test "x$FOUND_FREETYPE" != xyes; then
45163          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45164          if test "x$PKG_CONFIG" != x; then
45165
45166pkg_failed=no
45167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45168$as_echo_n "checking for FREETYPE... " >&6; }
45169
45170if test -n "$FREETYPE_CFLAGS"; then
45171    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45172 elif test -n "$PKG_CONFIG"; then
45173    if test -n "$PKG_CONFIG" && \
45174    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45175  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45176  ac_status=$?
45177  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45178  test $ac_status = 0; }; then
45179  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45180else
45181  pkg_failed=yes
45182fi
45183 else
45184    pkg_failed=untried
45185fi
45186if test -n "$FREETYPE_LIBS"; then
45187    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45188 elif test -n "$PKG_CONFIG"; then
45189    if test -n "$PKG_CONFIG" && \
45190    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45191  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45192  ac_status=$?
45193  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45194  test $ac_status = 0; }; then
45195  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45196else
45197  pkg_failed=yes
45198fi
45199 else
45200    pkg_failed=untried
45201fi
45202
45203
45204
45205if test $pkg_failed = yes; then
45206
45207if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45208        _pkg_short_errors_supported=yes
45209else
45210        _pkg_short_errors_supported=no
45211fi
45212        if test $_pkg_short_errors_supported = yes; then
45213	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45214        else
45215	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45216        fi
45217	# Put the nasty error message in config.log where it belongs
45218	echo "$FREETYPE_PKG_ERRORS" >&5
45219
45220	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45221$as_echo "no" >&6; }
45222                FOUND_FREETYPE=no
45223elif test $pkg_failed = untried; then
45224	FOUND_FREETYPE=no
45225else
45226	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45227	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45229$as_echo "yes" >&6; }
45230	FOUND_FREETYPE=yes
45231fi
45232            if test "x$FOUND_FREETYPE" = xyes; then
45233              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45234              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45235              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45236              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45237                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45238              fi
45239              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45240              if test "x$BUNDLE_FREETYPE" = xyes; then
45241                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45242$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45243                FOUND_FREETYPE=no
45244              else
45245                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45246$as_echo_n "checking for freetype... " >&6; }
45247                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45248$as_echo "yes (using pkg-config)" >&6; }
45249              fi
45250            fi
45251          fi
45252        fi
45253      fi
45254
45255      if test "x$FOUND_FREETYPE" != xyes; then
45256        # Check in well-known locations
45257        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45258          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45259
45260  windows_path="$FREETYPE_BASE_DIR"
45261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45262    unix_path=`$CYGPATH -u "$windows_path"`
45263    FREETYPE_BASE_DIR="$unix_path"
45264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45266    FREETYPE_BASE_DIR="$unix_path"
45267  fi
45268
45269
45270  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45271  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45272  METHOD="well-known location"
45273
45274  # Let's start with an optimistic view of the world :-)
45275  FOUND_FREETYPE=yes
45276
45277  # First look for the canonical freetype main include file ft2build.h.
45278  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45279    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45280    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45281    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45282      # Fail.
45283      FOUND_FREETYPE=no
45284    fi
45285  fi
45286
45287  if test "x$FOUND_FREETYPE" = xyes; then
45288    # Include file found, let's continue the sanity check.
45289    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45290$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45291
45292    # Reset to default value
45293    FREETYPE_BASE_NAME=freetype
45294    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45295    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45296      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45297          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45298        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45299        # for the .6 version explicitly.
45300        FREETYPE_BASE_NAME=freetype.6
45301        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45302        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45303$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45304      else
45305        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45306$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45307        FOUND_FREETYPE=no
45308      fi
45309    else
45310      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45311        # On Windows, we will need both .lib and .dll file.
45312        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45313          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45314$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45315          FOUND_FREETYPE=no
45316        fi
45317      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45318          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45319        # Found lib in isa dir, use that instead.
45320        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45321        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45322$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45323      fi
45324    fi
45325  fi
45326
45327  if test "x$FOUND_FREETYPE" = xyes; then
45328
45329  # Only process if variable expands to non-empty
45330
45331  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45333
45334  # Input might be given as Windows format, start by converting to
45335  # unix format.
45336  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45337  new_path=`$CYGPATH -u "$path"`
45338
45339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45342  # "foo.exe" is OK but "foo" is an error.
45343  #
45344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45345  # It is also a way to make sure we got the proper file name for the real test later on.
45346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45347  if test "x$test_shortpath" = x; then
45348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45349$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45350    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45351  fi
45352
45353  # Call helper function which possibly converts this using DOS-style short mode.
45354  # If so, the updated path is stored in $new_path.
45355
45356  input_path="$new_path"
45357  # Check if we need to convert this using DOS-style short mode. If the path
45358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45359  # take no chances and rewrite it.
45360  # Note: m4 eats our [], so we need to use [ and ] instead.
45361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45362  if test "x$has_forbidden_chars" != x; then
45363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45367      # Going to short mode and back again did indeed matter. Since short mode is
45368      # case insensitive, let's make it lowercase to improve readability.
45369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45370      # Now convert it back to Unix-style (cygpath)
45371      input_path=`$CYGPATH -u "$shortmode_path"`
45372      new_path="$input_path"
45373    fi
45374  fi
45375
45376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45377  if test "x$test_cygdrive_prefix" = x; then
45378    # As a simple fix, exclude /usr/bin since it's not a real path.
45379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45381      # a path prefixed by /cygdrive for fixpath to work.
45382      new_path="$CYGWIN_ROOT_PATH$input_path"
45383    fi
45384  fi
45385
45386
45387  if test "x$path" != "x$new_path"; then
45388    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45390$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45391  fi
45392
45393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45394
45395  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45396  has_colon=`$ECHO $path | $GREP ^.:`
45397  new_path="$path"
45398  if test "x$has_colon" = x; then
45399    # Not in mixed or Windows style, start by that.
45400    new_path=`cmd //c echo $path`
45401  fi
45402
45403
45404  input_path="$new_path"
45405  # Check if we need to convert this using DOS-style short mode. If the path
45406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45407  # take no chances and rewrite it.
45408  # Note: m4 eats our [], so we need to use [ and ] instead.
45409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45410  if test "x$has_forbidden_chars" != x; then
45411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45413  fi
45414
45415
45416  windows_path="$new_path"
45417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45418    unix_path=`$CYGPATH -u "$windows_path"`
45419    new_path="$unix_path"
45420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45422    new_path="$unix_path"
45423  fi
45424
45425  if test "x$path" != "x$new_path"; then
45426    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45428$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45429  fi
45430
45431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45433
45434    else
45435      # We're on a unix platform. Hooray! :)
45436      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45437      has_space=`$ECHO "$path" | $GREP " "`
45438      if test "x$has_space" != x; then
45439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45440$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45442      fi
45443
45444      # Use eval to expand a potential ~
45445      eval path="$path"
45446      if test ! -f "$path" && test ! -d "$path"; then
45447        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45448      fi
45449
45450      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45451    fi
45452  fi
45453
45454
45455  # Only process if variable expands to non-empty
45456
45457  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45459
45460  # Input might be given as Windows format, start by converting to
45461  # unix format.
45462  path="$POTENTIAL_FREETYPE_LIB_PATH"
45463  new_path=`$CYGPATH -u "$path"`
45464
45465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45468  # "foo.exe" is OK but "foo" is an error.
45469  #
45470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45471  # It is also a way to make sure we got the proper file name for the real test later on.
45472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45473  if test "x$test_shortpath" = x; then
45474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45476    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45477  fi
45478
45479  # Call helper function which possibly converts this using DOS-style short mode.
45480  # If so, the updated path is stored in $new_path.
45481
45482  input_path="$new_path"
45483  # Check if we need to convert this using DOS-style short mode. If the path
45484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45485  # take no chances and rewrite it.
45486  # Note: m4 eats our [], so we need to use [ and ] instead.
45487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45488  if test "x$has_forbidden_chars" != x; then
45489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45493      # Going to short mode and back again did indeed matter. Since short mode is
45494      # case insensitive, let's make it lowercase to improve readability.
45495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45496      # Now convert it back to Unix-style (cygpath)
45497      input_path=`$CYGPATH -u "$shortmode_path"`
45498      new_path="$input_path"
45499    fi
45500  fi
45501
45502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45503  if test "x$test_cygdrive_prefix" = x; then
45504    # As a simple fix, exclude /usr/bin since it's not a real path.
45505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45507      # a path prefixed by /cygdrive for fixpath to work.
45508      new_path="$CYGWIN_ROOT_PATH$input_path"
45509    fi
45510  fi
45511
45512
45513  if test "x$path" != "x$new_path"; then
45514    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45516$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45517  fi
45518
45519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45520
45521  path="$POTENTIAL_FREETYPE_LIB_PATH"
45522  has_colon=`$ECHO $path | $GREP ^.:`
45523  new_path="$path"
45524  if test "x$has_colon" = x; then
45525    # Not in mixed or Windows style, start by that.
45526    new_path=`cmd //c echo $path`
45527  fi
45528
45529
45530  input_path="$new_path"
45531  # Check if we need to convert this using DOS-style short mode. If the path
45532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45533  # take no chances and rewrite it.
45534  # Note: m4 eats our [], so we need to use [ and ] instead.
45535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45536  if test "x$has_forbidden_chars" != x; then
45537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45539  fi
45540
45541
45542  windows_path="$new_path"
45543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45544    unix_path=`$CYGPATH -u "$windows_path"`
45545    new_path="$unix_path"
45546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45548    new_path="$unix_path"
45549  fi
45550
45551  if test "x$path" != "x$new_path"; then
45552    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45554$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45555  fi
45556
45557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45559
45560    else
45561      # We're on a unix platform. Hooray! :)
45562      path="$POTENTIAL_FREETYPE_LIB_PATH"
45563      has_space=`$ECHO "$path" | $GREP " "`
45564      if test "x$has_space" != x; then
45565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45566$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45567        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45568      fi
45569
45570      # Use eval to expand a potential ~
45571      eval path="$path"
45572      if test ! -f "$path" && test ! -d "$path"; then
45573        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45574      fi
45575
45576      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45577    fi
45578  fi
45579
45580
45581    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45583$as_echo_n "checking for freetype includes... " >&6; }
45584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45585$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45586    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45588$as_echo_n "checking for freetype libraries... " >&6; }
45589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45590$as_echo "$FREETYPE_LIB_PATH" >&6; }
45591  fi
45592
45593          if test "x$FOUND_FREETYPE" != xyes; then
45594            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45595
45596  windows_path="$FREETYPE_BASE_DIR"
45597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45598    unix_path=`$CYGPATH -u "$windows_path"`
45599    FREETYPE_BASE_DIR="$unix_path"
45600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45602    FREETYPE_BASE_DIR="$unix_path"
45603  fi
45604
45605
45606  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45607  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45608  METHOD="well-known location"
45609
45610  # Let's start with an optimistic view of the world :-)
45611  FOUND_FREETYPE=yes
45612
45613  # First look for the canonical freetype main include file ft2build.h.
45614  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45615    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45616    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45617    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45618      # Fail.
45619      FOUND_FREETYPE=no
45620    fi
45621  fi
45622
45623  if test "x$FOUND_FREETYPE" = xyes; then
45624    # Include file found, let's continue the sanity check.
45625    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45626$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45627
45628    # Reset to default value
45629    FREETYPE_BASE_NAME=freetype
45630    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45631    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45632      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45633          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45634        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45635        # for the .6 version explicitly.
45636        FREETYPE_BASE_NAME=freetype.6
45637        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45638        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45639$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45640      else
45641        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45642$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45643        FOUND_FREETYPE=no
45644      fi
45645    else
45646      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45647        # On Windows, we will need both .lib and .dll file.
45648        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45649          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45650$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45651          FOUND_FREETYPE=no
45652        fi
45653      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45654          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45655        # Found lib in isa dir, use that instead.
45656        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45657        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45658$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45659      fi
45660    fi
45661  fi
45662
45663  if test "x$FOUND_FREETYPE" = xyes; then
45664
45665  # Only process if variable expands to non-empty
45666
45667  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45669
45670  # Input might be given as Windows format, start by converting to
45671  # unix format.
45672  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45673  new_path=`$CYGPATH -u "$path"`
45674
45675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45678  # "foo.exe" is OK but "foo" is an error.
45679  #
45680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45681  # It is also a way to make sure we got the proper file name for the real test later on.
45682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45683  if test "x$test_shortpath" = x; then
45684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45685$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45686    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45687  fi
45688
45689  # Call helper function which possibly converts this using DOS-style short mode.
45690  # If so, the updated path is stored in $new_path.
45691
45692  input_path="$new_path"
45693  # Check if we need to convert this using DOS-style short mode. If the path
45694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45695  # take no chances and rewrite it.
45696  # Note: m4 eats our [], so we need to use [ and ] instead.
45697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45698  if test "x$has_forbidden_chars" != x; then
45699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45703      # Going to short mode and back again did indeed matter. Since short mode is
45704      # case insensitive, let's make it lowercase to improve readability.
45705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45706      # Now convert it back to Unix-style (cygpath)
45707      input_path=`$CYGPATH -u "$shortmode_path"`
45708      new_path="$input_path"
45709    fi
45710  fi
45711
45712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45713  if test "x$test_cygdrive_prefix" = x; then
45714    # As a simple fix, exclude /usr/bin since it's not a real path.
45715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45717      # a path prefixed by /cygdrive for fixpath to work.
45718      new_path="$CYGWIN_ROOT_PATH$input_path"
45719    fi
45720  fi
45721
45722
45723  if test "x$path" != "x$new_path"; then
45724    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45727  fi
45728
45729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45730
45731  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45732  has_colon=`$ECHO $path | $GREP ^.:`
45733  new_path="$path"
45734  if test "x$has_colon" = x; then
45735    # Not in mixed or Windows style, start by that.
45736    new_path=`cmd //c echo $path`
45737  fi
45738
45739
45740  input_path="$new_path"
45741  # Check if we need to convert this using DOS-style short mode. If the path
45742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45743  # take no chances and rewrite it.
45744  # Note: m4 eats our [], so we need to use [ and ] instead.
45745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45746  if test "x$has_forbidden_chars" != x; then
45747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45749  fi
45750
45751
45752  windows_path="$new_path"
45753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45754    unix_path=`$CYGPATH -u "$windows_path"`
45755    new_path="$unix_path"
45756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45758    new_path="$unix_path"
45759  fi
45760
45761  if test "x$path" != "x$new_path"; then
45762    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45765  fi
45766
45767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45769
45770    else
45771      # We're on a unix platform. Hooray! :)
45772      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45773      has_space=`$ECHO "$path" | $GREP " "`
45774      if test "x$has_space" != x; then
45775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45776$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45778      fi
45779
45780      # Use eval to expand a potential ~
45781      eval path="$path"
45782      if test ! -f "$path" && test ! -d "$path"; then
45783        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45784      fi
45785
45786      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45787    fi
45788  fi
45789
45790
45791  # Only process if variable expands to non-empty
45792
45793  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45795
45796  # Input might be given as Windows format, start by converting to
45797  # unix format.
45798  path="$POTENTIAL_FREETYPE_LIB_PATH"
45799  new_path=`$CYGPATH -u "$path"`
45800
45801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45804  # "foo.exe" is OK but "foo" is an error.
45805  #
45806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45807  # It is also a way to make sure we got the proper file name for the real test later on.
45808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45809  if test "x$test_shortpath" = x; then
45810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45812    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45813  fi
45814
45815  # Call helper function which possibly converts this using DOS-style short mode.
45816  # If so, the updated path is stored in $new_path.
45817
45818  input_path="$new_path"
45819  # Check if we need to convert this using DOS-style short mode. If the path
45820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45821  # take no chances and rewrite it.
45822  # Note: m4 eats our [], so we need to use [ and ] instead.
45823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45824  if test "x$has_forbidden_chars" != x; then
45825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45829      # Going to short mode and back again did indeed matter. Since short mode is
45830      # case insensitive, let's make it lowercase to improve readability.
45831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45832      # Now convert it back to Unix-style (cygpath)
45833      input_path=`$CYGPATH -u "$shortmode_path"`
45834      new_path="$input_path"
45835    fi
45836  fi
45837
45838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45839  if test "x$test_cygdrive_prefix" = x; then
45840    # As a simple fix, exclude /usr/bin since it's not a real path.
45841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45843      # a path prefixed by /cygdrive for fixpath to work.
45844      new_path="$CYGWIN_ROOT_PATH$input_path"
45845    fi
45846  fi
45847
45848
45849  if test "x$path" != "x$new_path"; then
45850    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45853  fi
45854
45855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45856
45857  path="$POTENTIAL_FREETYPE_LIB_PATH"
45858  has_colon=`$ECHO $path | $GREP ^.:`
45859  new_path="$path"
45860  if test "x$has_colon" = x; then
45861    # Not in mixed or Windows style, start by that.
45862    new_path=`cmd //c echo $path`
45863  fi
45864
45865
45866  input_path="$new_path"
45867  # Check if we need to convert this using DOS-style short mode. If the path
45868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45869  # take no chances and rewrite it.
45870  # Note: m4 eats our [], so we need to use [ and ] instead.
45871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45872  if test "x$has_forbidden_chars" != x; then
45873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45875  fi
45876
45877
45878  windows_path="$new_path"
45879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45880    unix_path=`$CYGPATH -u "$windows_path"`
45881    new_path="$unix_path"
45882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45884    new_path="$unix_path"
45885  fi
45886
45887  if test "x$path" != "x$new_path"; then
45888    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45891  fi
45892
45893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45895
45896    else
45897      # We're on a unix platform. Hooray! :)
45898      path="$POTENTIAL_FREETYPE_LIB_PATH"
45899      has_space=`$ECHO "$path" | $GREP " "`
45900      if test "x$has_space" != x; then
45901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45904      fi
45905
45906      # Use eval to expand a potential ~
45907      eval path="$path"
45908      if test ! -f "$path" && test ! -d "$path"; then
45909        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45910      fi
45911
45912      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45913    fi
45914  fi
45915
45916
45917    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45919$as_echo_n "checking for freetype includes... " >&6; }
45920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45921$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45922    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45924$as_echo_n "checking for freetype libraries... " >&6; }
45925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45926$as_echo "$FREETYPE_LIB_PATH" >&6; }
45927  fi
45928
45929          fi
45930        else
45931          FREETYPE_BASE_DIR="$SYSROOT/usr"
45932
45933  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45934  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45935  METHOD="well-known location"
45936
45937  # Let's start with an optimistic view of the world :-)
45938  FOUND_FREETYPE=yes
45939
45940  # First look for the canonical freetype main include file ft2build.h.
45941  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45942    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45943    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45944    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45945      # Fail.
45946      FOUND_FREETYPE=no
45947    fi
45948  fi
45949
45950  if test "x$FOUND_FREETYPE" = xyes; then
45951    # Include file found, let's continue the sanity check.
45952    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45953$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45954
45955    # Reset to default value
45956    FREETYPE_BASE_NAME=freetype
45957    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45958    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45959      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45960          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45961        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45962        # for the .6 version explicitly.
45963        FREETYPE_BASE_NAME=freetype.6
45964        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45965        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45966$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45967      else
45968        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45969$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45970        FOUND_FREETYPE=no
45971      fi
45972    else
45973      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45974        # On Windows, we will need both .lib and .dll file.
45975        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45976          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45977$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45978          FOUND_FREETYPE=no
45979        fi
45980      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45981          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45982        # Found lib in isa dir, use that instead.
45983        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45984        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45985$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45986      fi
45987    fi
45988  fi
45989
45990  if test "x$FOUND_FREETYPE" = xyes; then
45991
45992  # Only process if variable expands to non-empty
45993
45994  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45995    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45996
45997  # Input might be given as Windows format, start by converting to
45998  # unix format.
45999  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46000  new_path=`$CYGPATH -u "$path"`
46001
46002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46005  # "foo.exe" is OK but "foo" is an error.
46006  #
46007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46008  # It is also a way to make sure we got the proper file name for the real test later on.
46009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46010  if test "x$test_shortpath" = x; then
46011    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46012$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46013    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46014  fi
46015
46016  # Call helper function which possibly converts this using DOS-style short mode.
46017  # If so, the updated path is stored in $new_path.
46018
46019  input_path="$new_path"
46020  # Check if we need to convert this using DOS-style short mode. If the path
46021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46022  # take no chances and rewrite it.
46023  # Note: m4 eats our [], so we need to use [ and ] instead.
46024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46025  if test "x$has_forbidden_chars" != x; then
46026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46030      # Going to short mode and back again did indeed matter. Since short mode is
46031      # case insensitive, let's make it lowercase to improve readability.
46032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46033      # Now convert it back to Unix-style (cygpath)
46034      input_path=`$CYGPATH -u "$shortmode_path"`
46035      new_path="$input_path"
46036    fi
46037  fi
46038
46039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46040  if test "x$test_cygdrive_prefix" = x; then
46041    # As a simple fix, exclude /usr/bin since it's not a real path.
46042    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46044      # a path prefixed by /cygdrive for fixpath to work.
46045      new_path="$CYGWIN_ROOT_PATH$input_path"
46046    fi
46047  fi
46048
46049
46050  if test "x$path" != "x$new_path"; then
46051    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46053$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46054  fi
46055
46056    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46057
46058  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46059  has_colon=`$ECHO $path | $GREP ^.:`
46060  new_path="$path"
46061  if test "x$has_colon" = x; then
46062    # Not in mixed or Windows style, start by that.
46063    new_path=`cmd //c echo $path`
46064  fi
46065
46066
46067  input_path="$new_path"
46068  # Check if we need to convert this using DOS-style short mode. If the path
46069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46070  # take no chances and rewrite it.
46071  # Note: m4 eats our [], so we need to use [ and ] instead.
46072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46073  if test "x$has_forbidden_chars" != x; then
46074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46076  fi
46077
46078
46079  windows_path="$new_path"
46080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46081    unix_path=`$CYGPATH -u "$windows_path"`
46082    new_path="$unix_path"
46083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46085    new_path="$unix_path"
46086  fi
46087
46088  if test "x$path" != "x$new_path"; then
46089    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46091$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46092  fi
46093
46094  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46095  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46096
46097    else
46098      # We're on a unix platform. Hooray! :)
46099      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46100      has_space=`$ECHO "$path" | $GREP " "`
46101      if test "x$has_space" != x; then
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46103$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46104        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46105      fi
46106
46107      # Use eval to expand a potential ~
46108      eval path="$path"
46109      if test ! -f "$path" && test ! -d "$path"; then
46110        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46111      fi
46112
46113      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46114    fi
46115  fi
46116
46117
46118  # Only process if variable expands to non-empty
46119
46120  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46122
46123  # Input might be given as Windows format, start by converting to
46124  # unix format.
46125  path="$POTENTIAL_FREETYPE_LIB_PATH"
46126  new_path=`$CYGPATH -u "$path"`
46127
46128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46131  # "foo.exe" is OK but "foo" is an error.
46132  #
46133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46134  # It is also a way to make sure we got the proper file name for the real test later on.
46135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46136  if test "x$test_shortpath" = x; then
46137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46139    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46140  fi
46141
46142  # Call helper function which possibly converts this using DOS-style short mode.
46143  # If so, the updated path is stored in $new_path.
46144
46145  input_path="$new_path"
46146  # Check if we need to convert this using DOS-style short mode. If the path
46147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46148  # take no chances and rewrite it.
46149  # Note: m4 eats our [], so we need to use [ and ] instead.
46150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46151  if test "x$has_forbidden_chars" != x; then
46152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46156      # Going to short mode and back again did indeed matter. Since short mode is
46157      # case insensitive, let's make it lowercase to improve readability.
46158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46159      # Now convert it back to Unix-style (cygpath)
46160      input_path=`$CYGPATH -u "$shortmode_path"`
46161      new_path="$input_path"
46162    fi
46163  fi
46164
46165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46166  if test "x$test_cygdrive_prefix" = x; then
46167    # As a simple fix, exclude /usr/bin since it's not a real path.
46168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46170      # a path prefixed by /cygdrive for fixpath to work.
46171      new_path="$CYGWIN_ROOT_PATH$input_path"
46172    fi
46173  fi
46174
46175
46176  if test "x$path" != "x$new_path"; then
46177    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46180  fi
46181
46182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46183
46184  path="$POTENTIAL_FREETYPE_LIB_PATH"
46185  has_colon=`$ECHO $path | $GREP ^.:`
46186  new_path="$path"
46187  if test "x$has_colon" = x; then
46188    # Not in mixed or Windows style, start by that.
46189    new_path=`cmd //c echo $path`
46190  fi
46191
46192
46193  input_path="$new_path"
46194  # Check if we need to convert this using DOS-style short mode. If the path
46195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46196  # take no chances and rewrite it.
46197  # Note: m4 eats our [], so we need to use [ and ] instead.
46198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46199  if test "x$has_forbidden_chars" != x; then
46200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46202  fi
46203
46204
46205  windows_path="$new_path"
46206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46207    unix_path=`$CYGPATH -u "$windows_path"`
46208    new_path="$unix_path"
46209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46211    new_path="$unix_path"
46212  fi
46213
46214  if test "x$path" != "x$new_path"; then
46215    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46217$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46218  fi
46219
46220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46222
46223    else
46224      # We're on a unix platform. Hooray! :)
46225      path="$POTENTIAL_FREETYPE_LIB_PATH"
46226      has_space=`$ECHO "$path" | $GREP " "`
46227      if test "x$has_space" != x; then
46228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46229$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46231      fi
46232
46233      # Use eval to expand a potential ~
46234      eval path="$path"
46235      if test ! -f "$path" && test ! -d "$path"; then
46236        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46237      fi
46238
46239      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46240    fi
46241  fi
46242
46243
46244    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46246$as_echo_n "checking for freetype includes... " >&6; }
46247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46248$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46249    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46251$as_echo_n "checking for freetype libraries... " >&6; }
46252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46253$as_echo "$FREETYPE_LIB_PATH" >&6; }
46254  fi
46255
46256
46257          if test "x$FOUND_FREETYPE" != xyes; then
46258            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46259
46260  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46261  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46262  METHOD="well-known location"
46263
46264  # Let's start with an optimistic view of the world :-)
46265  FOUND_FREETYPE=yes
46266
46267  # First look for the canonical freetype main include file ft2build.h.
46268  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46269    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46270    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46271    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46272      # Fail.
46273      FOUND_FREETYPE=no
46274    fi
46275  fi
46276
46277  if test "x$FOUND_FREETYPE" = xyes; then
46278    # Include file found, let's continue the sanity check.
46279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46280$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46281
46282    # Reset to default value
46283    FREETYPE_BASE_NAME=freetype
46284    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46285    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46286      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46287          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46288        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46289        # for the .6 version explicitly.
46290        FREETYPE_BASE_NAME=freetype.6
46291        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46292        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46293$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46294      else
46295        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46296$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46297        FOUND_FREETYPE=no
46298      fi
46299    else
46300      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46301        # On Windows, we will need both .lib and .dll file.
46302        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46303          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46304$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46305          FOUND_FREETYPE=no
46306        fi
46307      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46308          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46309        # Found lib in isa dir, use that instead.
46310        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46311        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46312$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46313      fi
46314    fi
46315  fi
46316
46317  if test "x$FOUND_FREETYPE" = xyes; then
46318
46319  # Only process if variable expands to non-empty
46320
46321  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46323
46324  # Input might be given as Windows format, start by converting to
46325  # unix format.
46326  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46327  new_path=`$CYGPATH -u "$path"`
46328
46329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46332  # "foo.exe" is OK but "foo" is an error.
46333  #
46334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46335  # It is also a way to make sure we got the proper file name for the real test later on.
46336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46337  if test "x$test_shortpath" = x; then
46338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46339$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46340    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46341  fi
46342
46343  # Call helper function which possibly converts this using DOS-style short mode.
46344  # If so, the updated path is stored in $new_path.
46345
46346  input_path="$new_path"
46347  # Check if we need to convert this using DOS-style short mode. If the path
46348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46349  # take no chances and rewrite it.
46350  # Note: m4 eats our [], so we need to use [ and ] instead.
46351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46352  if test "x$has_forbidden_chars" != x; then
46353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46357      # Going to short mode and back again did indeed matter. Since short mode is
46358      # case insensitive, let's make it lowercase to improve readability.
46359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46360      # Now convert it back to Unix-style (cygpath)
46361      input_path=`$CYGPATH -u "$shortmode_path"`
46362      new_path="$input_path"
46363    fi
46364  fi
46365
46366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46367  if test "x$test_cygdrive_prefix" = x; then
46368    # As a simple fix, exclude /usr/bin since it's not a real path.
46369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46371      # a path prefixed by /cygdrive for fixpath to work.
46372      new_path="$CYGWIN_ROOT_PATH$input_path"
46373    fi
46374  fi
46375
46376
46377  if test "x$path" != "x$new_path"; then
46378    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46380$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46381  fi
46382
46383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46384
46385  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46386  has_colon=`$ECHO $path | $GREP ^.:`
46387  new_path="$path"
46388  if test "x$has_colon" = x; then
46389    # Not in mixed or Windows style, start by that.
46390    new_path=`cmd //c echo $path`
46391  fi
46392
46393
46394  input_path="$new_path"
46395  # Check if we need to convert this using DOS-style short mode. If the path
46396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46397  # take no chances and rewrite it.
46398  # Note: m4 eats our [], so we need to use [ and ] instead.
46399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46400  if test "x$has_forbidden_chars" != x; then
46401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46403  fi
46404
46405
46406  windows_path="$new_path"
46407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46408    unix_path=`$CYGPATH -u "$windows_path"`
46409    new_path="$unix_path"
46410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46412    new_path="$unix_path"
46413  fi
46414
46415  if test "x$path" != "x$new_path"; then
46416    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46418$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46419  fi
46420
46421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46423
46424    else
46425      # We're on a unix platform. Hooray! :)
46426      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46427      has_space=`$ECHO "$path" | $GREP " "`
46428      if test "x$has_space" != x; then
46429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46430$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46432      fi
46433
46434      # Use eval to expand a potential ~
46435      eval path="$path"
46436      if test ! -f "$path" && test ! -d "$path"; then
46437        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46438      fi
46439
46440      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46441    fi
46442  fi
46443
46444
46445  # Only process if variable expands to non-empty
46446
46447  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46449
46450  # Input might be given as Windows format, start by converting to
46451  # unix format.
46452  path="$POTENTIAL_FREETYPE_LIB_PATH"
46453  new_path=`$CYGPATH -u "$path"`
46454
46455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46458  # "foo.exe" is OK but "foo" is an error.
46459  #
46460  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46461  # It is also a way to make sure we got the proper file name for the real test later on.
46462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46463  if test "x$test_shortpath" = x; then
46464    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46466    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46467  fi
46468
46469  # Call helper function which possibly converts this using DOS-style short mode.
46470  # If so, the updated path is stored in $new_path.
46471
46472  input_path="$new_path"
46473  # Check if we need to convert this using DOS-style short mode. If the path
46474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46475  # take no chances and rewrite it.
46476  # Note: m4 eats our [], so we need to use [ and ] instead.
46477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46478  if test "x$has_forbidden_chars" != x; then
46479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46483      # Going to short mode and back again did indeed matter. Since short mode is
46484      # case insensitive, let's make it lowercase to improve readability.
46485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46486      # Now convert it back to Unix-style (cygpath)
46487      input_path=`$CYGPATH -u "$shortmode_path"`
46488      new_path="$input_path"
46489    fi
46490  fi
46491
46492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46493  if test "x$test_cygdrive_prefix" = x; then
46494    # As a simple fix, exclude /usr/bin since it's not a real path.
46495    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46497      # a path prefixed by /cygdrive for fixpath to work.
46498      new_path="$CYGWIN_ROOT_PATH$input_path"
46499    fi
46500  fi
46501
46502
46503  if test "x$path" != "x$new_path"; then
46504    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46506$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46507  fi
46508
46509    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46510
46511  path="$POTENTIAL_FREETYPE_LIB_PATH"
46512  has_colon=`$ECHO $path | $GREP ^.:`
46513  new_path="$path"
46514  if test "x$has_colon" = x; then
46515    # Not in mixed or Windows style, start by that.
46516    new_path=`cmd //c echo $path`
46517  fi
46518
46519
46520  input_path="$new_path"
46521  # Check if we need to convert this using DOS-style short mode. If the path
46522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46523  # take no chances and rewrite it.
46524  # Note: m4 eats our [], so we need to use [ and ] instead.
46525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46526  if test "x$has_forbidden_chars" != x; then
46527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46529  fi
46530
46531
46532  windows_path="$new_path"
46533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46534    unix_path=`$CYGPATH -u "$windows_path"`
46535    new_path="$unix_path"
46536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46538    new_path="$unix_path"
46539  fi
46540
46541  if test "x$path" != "x$new_path"; then
46542    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46544$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46545  fi
46546
46547  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46548  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46549
46550    else
46551      # We're on a unix platform. Hooray! :)
46552      path="$POTENTIAL_FREETYPE_LIB_PATH"
46553      has_space=`$ECHO "$path" | $GREP " "`
46554      if test "x$has_space" != x; then
46555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46557        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46558      fi
46559
46560      # Use eval to expand a potential ~
46561      eval path="$path"
46562      if test ! -f "$path" && test ! -d "$path"; then
46563        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46564      fi
46565
46566      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46567    fi
46568  fi
46569
46570
46571    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46573$as_echo_n "checking for freetype includes... " >&6; }
46574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46575$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46576    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46578$as_echo_n "checking for freetype libraries... " >&6; }
46579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46580$as_echo "$FREETYPE_LIB_PATH" >&6; }
46581  fi
46582
46583          fi
46584
46585          if test "x$FOUND_FREETYPE" != xyes; then
46586            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46587
46588  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46589  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46590  METHOD="well-known location"
46591
46592  # Let's start with an optimistic view of the world :-)
46593  FOUND_FREETYPE=yes
46594
46595  # First look for the canonical freetype main include file ft2build.h.
46596  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46597    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46598    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46599    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46600      # Fail.
46601      FOUND_FREETYPE=no
46602    fi
46603  fi
46604
46605  if test "x$FOUND_FREETYPE" = xyes; then
46606    # Include file found, let's continue the sanity check.
46607    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46608$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46609
46610    # Reset to default value
46611    FREETYPE_BASE_NAME=freetype
46612    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46613    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46614      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46615          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46616        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46617        # for the .6 version explicitly.
46618        FREETYPE_BASE_NAME=freetype.6
46619        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46620        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46621$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46622      else
46623        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46624$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46625        FOUND_FREETYPE=no
46626      fi
46627    else
46628      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46629        # On Windows, we will need both .lib and .dll file.
46630        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46631          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46632$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46633          FOUND_FREETYPE=no
46634        fi
46635      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46636          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46637        # Found lib in isa dir, use that instead.
46638        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46639        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46640$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46641      fi
46642    fi
46643  fi
46644
46645  if test "x$FOUND_FREETYPE" = xyes; then
46646
46647  # Only process if variable expands to non-empty
46648
46649  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46651
46652  # Input might be given as Windows format, start by converting to
46653  # unix format.
46654  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46655  new_path=`$CYGPATH -u "$path"`
46656
46657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46660  # "foo.exe" is OK but "foo" is an error.
46661  #
46662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46663  # It is also a way to make sure we got the proper file name for the real test later on.
46664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46665  if test "x$test_shortpath" = x; then
46666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46667$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46668    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46669  fi
46670
46671  # Call helper function which possibly converts this using DOS-style short mode.
46672  # If so, the updated path is stored in $new_path.
46673
46674  input_path="$new_path"
46675  # Check if we need to convert this using DOS-style short mode. If the path
46676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46677  # take no chances and rewrite it.
46678  # Note: m4 eats our [], so we need to use [ and ] instead.
46679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46680  if test "x$has_forbidden_chars" != x; then
46681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46685      # Going to short mode and back again did indeed matter. Since short mode is
46686      # case insensitive, let's make it lowercase to improve readability.
46687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46688      # Now convert it back to Unix-style (cygpath)
46689      input_path=`$CYGPATH -u "$shortmode_path"`
46690      new_path="$input_path"
46691    fi
46692  fi
46693
46694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46695  if test "x$test_cygdrive_prefix" = x; then
46696    # As a simple fix, exclude /usr/bin since it's not a real path.
46697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46699      # a path prefixed by /cygdrive for fixpath to work.
46700      new_path="$CYGWIN_ROOT_PATH$input_path"
46701    fi
46702  fi
46703
46704
46705  if test "x$path" != "x$new_path"; then
46706    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46708$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46709  fi
46710
46711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46712
46713  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46714  has_colon=`$ECHO $path | $GREP ^.:`
46715  new_path="$path"
46716  if test "x$has_colon" = x; then
46717    # Not in mixed or Windows style, start by that.
46718    new_path=`cmd //c echo $path`
46719  fi
46720
46721
46722  input_path="$new_path"
46723  # Check if we need to convert this using DOS-style short mode. If the path
46724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46725  # take no chances and rewrite it.
46726  # Note: m4 eats our [], so we need to use [ and ] instead.
46727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46728  if test "x$has_forbidden_chars" != x; then
46729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46731  fi
46732
46733
46734  windows_path="$new_path"
46735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46736    unix_path=`$CYGPATH -u "$windows_path"`
46737    new_path="$unix_path"
46738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46740    new_path="$unix_path"
46741  fi
46742
46743  if test "x$path" != "x$new_path"; then
46744    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46747  fi
46748
46749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46751
46752    else
46753      # We're on a unix platform. Hooray! :)
46754      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46755      has_space=`$ECHO "$path" | $GREP " "`
46756      if test "x$has_space" != x; then
46757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46760      fi
46761
46762      # Use eval to expand a potential ~
46763      eval path="$path"
46764      if test ! -f "$path" && test ! -d "$path"; then
46765        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46766      fi
46767
46768      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46769    fi
46770  fi
46771
46772
46773  # Only process if variable expands to non-empty
46774
46775  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46777
46778  # Input might be given as Windows format, start by converting to
46779  # unix format.
46780  path="$POTENTIAL_FREETYPE_LIB_PATH"
46781  new_path=`$CYGPATH -u "$path"`
46782
46783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46786  # "foo.exe" is OK but "foo" is an error.
46787  #
46788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46789  # It is also a way to make sure we got the proper file name for the real test later on.
46790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46791  if test "x$test_shortpath" = x; then
46792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46794    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46795  fi
46796
46797  # Call helper function which possibly converts this using DOS-style short mode.
46798  # If so, the updated path is stored in $new_path.
46799
46800  input_path="$new_path"
46801  # Check if we need to convert this using DOS-style short mode. If the path
46802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46803  # take no chances and rewrite it.
46804  # Note: m4 eats our [], so we need to use [ and ] instead.
46805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46806  if test "x$has_forbidden_chars" != x; then
46807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46811      # Going to short mode and back again did indeed matter. Since short mode is
46812      # case insensitive, let's make it lowercase to improve readability.
46813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46814      # Now convert it back to Unix-style (cygpath)
46815      input_path=`$CYGPATH -u "$shortmode_path"`
46816      new_path="$input_path"
46817    fi
46818  fi
46819
46820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46821  if test "x$test_cygdrive_prefix" = x; then
46822    # As a simple fix, exclude /usr/bin since it's not a real path.
46823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46825      # a path prefixed by /cygdrive for fixpath to work.
46826      new_path="$CYGWIN_ROOT_PATH$input_path"
46827    fi
46828  fi
46829
46830
46831  if test "x$path" != "x$new_path"; then
46832    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46834$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46835  fi
46836
46837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46838
46839  path="$POTENTIAL_FREETYPE_LIB_PATH"
46840  has_colon=`$ECHO $path | $GREP ^.:`
46841  new_path="$path"
46842  if test "x$has_colon" = x; then
46843    # Not in mixed or Windows style, start by that.
46844    new_path=`cmd //c echo $path`
46845  fi
46846
46847
46848  input_path="$new_path"
46849  # Check if we need to convert this using DOS-style short mode. If the path
46850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46851  # take no chances and rewrite it.
46852  # Note: m4 eats our [], so we need to use [ and ] instead.
46853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46854  if test "x$has_forbidden_chars" != x; then
46855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46857  fi
46858
46859
46860  windows_path="$new_path"
46861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46862    unix_path=`$CYGPATH -u "$windows_path"`
46863    new_path="$unix_path"
46864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46866    new_path="$unix_path"
46867  fi
46868
46869  if test "x$path" != "x$new_path"; then
46870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46873  fi
46874
46875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46877
46878    else
46879      # We're on a unix platform. Hooray! :)
46880      path="$POTENTIAL_FREETYPE_LIB_PATH"
46881      has_space=`$ECHO "$path" | $GREP " "`
46882      if test "x$has_space" != x; then
46883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46886      fi
46887
46888      # Use eval to expand a potential ~
46889      eval path="$path"
46890      if test ! -f "$path" && test ! -d "$path"; then
46891        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46892      fi
46893
46894      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46895    fi
46896  fi
46897
46898
46899    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46901$as_echo_n "checking for freetype includes... " >&6; }
46902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46903$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46904    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46906$as_echo_n "checking for freetype libraries... " >&6; }
46907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46908$as_echo "$FREETYPE_LIB_PATH" >&6; }
46909  fi
46910
46911          fi
46912
46913          if test "x$FOUND_FREETYPE" != xyes; then
46914            FREETYPE_BASE_DIR="$SYSROOT/usr"
46915            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46916
46917  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46918  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46919  METHOD="well-known location"
46920
46921  # Let's start with an optimistic view of the world :-)
46922  FOUND_FREETYPE=yes
46923
46924  # First look for the canonical freetype main include file ft2build.h.
46925  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46926    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46927    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46928    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46929      # Fail.
46930      FOUND_FREETYPE=no
46931    fi
46932  fi
46933
46934  if test "x$FOUND_FREETYPE" = xyes; then
46935    # Include file found, let's continue the sanity check.
46936    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46937$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46938
46939    # Reset to default value
46940    FREETYPE_BASE_NAME=freetype
46941    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46942    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46943      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46944          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46945        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46946        # for the .6 version explicitly.
46947        FREETYPE_BASE_NAME=freetype.6
46948        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46949        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46950$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46951      else
46952        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46953$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46954        FOUND_FREETYPE=no
46955      fi
46956    else
46957      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46958        # On Windows, we will need both .lib and .dll file.
46959        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46960          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46961$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46962          FOUND_FREETYPE=no
46963        fi
46964      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46965          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46966        # Found lib in isa dir, use that instead.
46967        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46968        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46969$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46970      fi
46971    fi
46972  fi
46973
46974  if test "x$FOUND_FREETYPE" = xyes; then
46975
46976  # Only process if variable expands to non-empty
46977
46978  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46980
46981  # Input might be given as Windows format, start by converting to
46982  # unix format.
46983  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46984  new_path=`$CYGPATH -u "$path"`
46985
46986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46989  # "foo.exe" is OK but "foo" is an error.
46990  #
46991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46992  # It is also a way to make sure we got the proper file name for the real test later on.
46993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46994  if test "x$test_shortpath" = x; then
46995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46997    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46998  fi
46999
47000  # Call helper function which possibly converts this using DOS-style short mode.
47001  # If so, the updated path is stored in $new_path.
47002
47003  input_path="$new_path"
47004  # Check if we need to convert this using DOS-style short mode. If the path
47005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47006  # take no chances and rewrite it.
47007  # Note: m4 eats our [], so we need to use [ and ] instead.
47008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47009  if test "x$has_forbidden_chars" != x; then
47010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47014      # Going to short mode and back again did indeed matter. Since short mode is
47015      # case insensitive, let's make it lowercase to improve readability.
47016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47017      # Now convert it back to Unix-style (cygpath)
47018      input_path=`$CYGPATH -u "$shortmode_path"`
47019      new_path="$input_path"
47020    fi
47021  fi
47022
47023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47024  if test "x$test_cygdrive_prefix" = x; then
47025    # As a simple fix, exclude /usr/bin since it's not a real path.
47026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47028      # a path prefixed by /cygdrive for fixpath to work.
47029      new_path="$CYGWIN_ROOT_PATH$input_path"
47030    fi
47031  fi
47032
47033
47034  if test "x$path" != "x$new_path"; then
47035    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47037$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47038  fi
47039
47040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47041
47042  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47043  has_colon=`$ECHO $path | $GREP ^.:`
47044  new_path="$path"
47045  if test "x$has_colon" = x; then
47046    # Not in mixed or Windows style, start by that.
47047    new_path=`cmd //c echo $path`
47048  fi
47049
47050
47051  input_path="$new_path"
47052  # Check if we need to convert this using DOS-style short mode. If the path
47053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47054  # take no chances and rewrite it.
47055  # Note: m4 eats our [], so we need to use [ and ] instead.
47056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47057  if test "x$has_forbidden_chars" != x; then
47058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47060  fi
47061
47062
47063  windows_path="$new_path"
47064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47065    unix_path=`$CYGPATH -u "$windows_path"`
47066    new_path="$unix_path"
47067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47069    new_path="$unix_path"
47070  fi
47071
47072  if test "x$path" != "x$new_path"; then
47073    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47076  fi
47077
47078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47080
47081    else
47082      # We're on a unix platform. Hooray! :)
47083      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47084      has_space=`$ECHO "$path" | $GREP " "`
47085      if test "x$has_space" != x; then
47086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47087$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47089      fi
47090
47091      # Use eval to expand a potential ~
47092      eval path="$path"
47093      if test ! -f "$path" && test ! -d "$path"; then
47094        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47095      fi
47096
47097      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47098    fi
47099  fi
47100
47101
47102  # Only process if variable expands to non-empty
47103
47104  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47106
47107  # Input might be given as Windows format, start by converting to
47108  # unix format.
47109  path="$POTENTIAL_FREETYPE_LIB_PATH"
47110  new_path=`$CYGPATH -u "$path"`
47111
47112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47115  # "foo.exe" is OK but "foo" is an error.
47116  #
47117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47118  # It is also a way to make sure we got the proper file name for the real test later on.
47119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47120  if test "x$test_shortpath" = x; then
47121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47123    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47124  fi
47125
47126  # Call helper function which possibly converts this using DOS-style short mode.
47127  # If so, the updated path is stored in $new_path.
47128
47129  input_path="$new_path"
47130  # Check if we need to convert this using DOS-style short mode. If the path
47131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47132  # take no chances and rewrite it.
47133  # Note: m4 eats our [], so we need to use [ and ] instead.
47134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47135  if test "x$has_forbidden_chars" != x; then
47136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47140      # Going to short mode and back again did indeed matter. Since short mode is
47141      # case insensitive, let's make it lowercase to improve readability.
47142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47143      # Now convert it back to Unix-style (cygpath)
47144      input_path=`$CYGPATH -u "$shortmode_path"`
47145      new_path="$input_path"
47146    fi
47147  fi
47148
47149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47150  if test "x$test_cygdrive_prefix" = x; then
47151    # As a simple fix, exclude /usr/bin since it's not a real path.
47152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47154      # a path prefixed by /cygdrive for fixpath to work.
47155      new_path="$CYGWIN_ROOT_PATH$input_path"
47156    fi
47157  fi
47158
47159
47160  if test "x$path" != "x$new_path"; then
47161    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47164  fi
47165
47166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47167
47168  path="$POTENTIAL_FREETYPE_LIB_PATH"
47169  has_colon=`$ECHO $path | $GREP ^.:`
47170  new_path="$path"
47171  if test "x$has_colon" = x; then
47172    # Not in mixed or Windows style, start by that.
47173    new_path=`cmd //c echo $path`
47174  fi
47175
47176
47177  input_path="$new_path"
47178  # Check if we need to convert this using DOS-style short mode. If the path
47179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47180  # take no chances and rewrite it.
47181  # Note: m4 eats our [], so we need to use [ and ] instead.
47182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47183  if test "x$has_forbidden_chars" != x; then
47184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47186  fi
47187
47188
47189  windows_path="$new_path"
47190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47191    unix_path=`$CYGPATH -u "$windows_path"`
47192    new_path="$unix_path"
47193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47195    new_path="$unix_path"
47196  fi
47197
47198  if test "x$path" != "x$new_path"; then
47199    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47202  fi
47203
47204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47206
47207    else
47208      # We're on a unix platform. Hooray! :)
47209      path="$POTENTIAL_FREETYPE_LIB_PATH"
47210      has_space=`$ECHO "$path" | $GREP " "`
47211      if test "x$has_space" != x; then
47212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47215      fi
47216
47217      # Use eval to expand a potential ~
47218      eval path="$path"
47219      if test ! -f "$path" && test ! -d "$path"; then
47220        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47221      fi
47222
47223      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47224    fi
47225  fi
47226
47227
47228    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47230$as_echo_n "checking for freetype includes... " >&6; }
47231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47232$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47233    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47235$as_echo_n "checking for freetype libraries... " >&6; }
47236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47237$as_echo "$FREETYPE_LIB_PATH" >&6; }
47238  fi
47239
47240            else
47241
47242  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47243  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47244  METHOD="well-known location"
47245
47246  # Let's start with an optimistic view of the world :-)
47247  FOUND_FREETYPE=yes
47248
47249  # First look for the canonical freetype main include file ft2build.h.
47250  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47251    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47252    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47253    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47254      # Fail.
47255      FOUND_FREETYPE=no
47256    fi
47257  fi
47258
47259  if test "x$FOUND_FREETYPE" = xyes; then
47260    # Include file found, let's continue the sanity check.
47261    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47262$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47263
47264    # Reset to default value
47265    FREETYPE_BASE_NAME=freetype
47266    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47267    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47268      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47269          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47270        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47271        # for the .6 version explicitly.
47272        FREETYPE_BASE_NAME=freetype.6
47273        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47274        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47275$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47276      else
47277        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47278$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47279        FOUND_FREETYPE=no
47280      fi
47281    else
47282      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47283        # On Windows, we will need both .lib and .dll file.
47284        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47285          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47286$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47287          FOUND_FREETYPE=no
47288        fi
47289      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47290          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47291        # Found lib in isa dir, use that instead.
47292        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47293        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47294$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47295      fi
47296    fi
47297  fi
47298
47299  if test "x$FOUND_FREETYPE" = xyes; then
47300
47301  # Only process if variable expands to non-empty
47302
47303  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47305
47306  # Input might be given as Windows format, start by converting to
47307  # unix format.
47308  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47309  new_path=`$CYGPATH -u "$path"`
47310
47311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47314  # "foo.exe" is OK but "foo" is an error.
47315  #
47316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47317  # It is also a way to make sure we got the proper file name for the real test later on.
47318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47319  if test "x$test_shortpath" = x; then
47320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47321$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47322    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47323  fi
47324
47325  # Call helper function which possibly converts this using DOS-style short mode.
47326  # If so, the updated path is stored in $new_path.
47327
47328  input_path="$new_path"
47329  # Check if we need to convert this using DOS-style short mode. If the path
47330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47331  # take no chances and rewrite it.
47332  # Note: m4 eats our [], so we need to use [ and ] instead.
47333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47334  if test "x$has_forbidden_chars" != x; then
47335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47339      # Going to short mode and back again did indeed matter. Since short mode is
47340      # case insensitive, let's make it lowercase to improve readability.
47341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47342      # Now convert it back to Unix-style (cygpath)
47343      input_path=`$CYGPATH -u "$shortmode_path"`
47344      new_path="$input_path"
47345    fi
47346  fi
47347
47348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47349  if test "x$test_cygdrive_prefix" = x; then
47350    # As a simple fix, exclude /usr/bin since it's not a real path.
47351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47353      # a path prefixed by /cygdrive for fixpath to work.
47354      new_path="$CYGWIN_ROOT_PATH$input_path"
47355    fi
47356  fi
47357
47358
47359  if test "x$path" != "x$new_path"; then
47360    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47362$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47363  fi
47364
47365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47366
47367  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47368  has_colon=`$ECHO $path | $GREP ^.:`
47369  new_path="$path"
47370  if test "x$has_colon" = x; then
47371    # Not in mixed or Windows style, start by that.
47372    new_path=`cmd //c echo $path`
47373  fi
47374
47375
47376  input_path="$new_path"
47377  # Check if we need to convert this using DOS-style short mode. If the path
47378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47379  # take no chances and rewrite it.
47380  # Note: m4 eats our [], so we need to use [ and ] instead.
47381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47382  if test "x$has_forbidden_chars" != x; then
47383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47385  fi
47386
47387
47388  windows_path="$new_path"
47389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47390    unix_path=`$CYGPATH -u "$windows_path"`
47391    new_path="$unix_path"
47392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47394    new_path="$unix_path"
47395  fi
47396
47397  if test "x$path" != "x$new_path"; then
47398    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47400$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47401  fi
47402
47403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47405
47406    else
47407      # We're on a unix platform. Hooray! :)
47408      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47409      has_space=`$ECHO "$path" | $GREP " "`
47410      if test "x$has_space" != x; then
47411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47412$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47413        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47414      fi
47415
47416      # Use eval to expand a potential ~
47417      eval path="$path"
47418      if test ! -f "$path" && test ! -d "$path"; then
47419        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47420      fi
47421
47422      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47423    fi
47424  fi
47425
47426
47427  # Only process if variable expands to non-empty
47428
47429  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47431
47432  # Input might be given as Windows format, start by converting to
47433  # unix format.
47434  path="$POTENTIAL_FREETYPE_LIB_PATH"
47435  new_path=`$CYGPATH -u "$path"`
47436
47437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47440  # "foo.exe" is OK but "foo" is an error.
47441  #
47442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47443  # It is also a way to make sure we got the proper file name for the real test later on.
47444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47445  if test "x$test_shortpath" = x; then
47446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47448    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47449  fi
47450
47451  # Call helper function which possibly converts this using DOS-style short mode.
47452  # If so, the updated path is stored in $new_path.
47453
47454  input_path="$new_path"
47455  # Check if we need to convert this using DOS-style short mode. If the path
47456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47457  # take no chances and rewrite it.
47458  # Note: m4 eats our [], so we need to use [ and ] instead.
47459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47460  if test "x$has_forbidden_chars" != x; then
47461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47465      # Going to short mode and back again did indeed matter. Since short mode is
47466      # case insensitive, let's make it lowercase to improve readability.
47467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47468      # Now convert it back to Unix-style (cygpath)
47469      input_path=`$CYGPATH -u "$shortmode_path"`
47470      new_path="$input_path"
47471    fi
47472  fi
47473
47474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47475  if test "x$test_cygdrive_prefix" = x; then
47476    # As a simple fix, exclude /usr/bin since it's not a real path.
47477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47479      # a path prefixed by /cygdrive for fixpath to work.
47480      new_path="$CYGWIN_ROOT_PATH$input_path"
47481    fi
47482  fi
47483
47484
47485  if test "x$path" != "x$new_path"; then
47486    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47489  fi
47490
47491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47492
47493  path="$POTENTIAL_FREETYPE_LIB_PATH"
47494  has_colon=`$ECHO $path | $GREP ^.:`
47495  new_path="$path"
47496  if test "x$has_colon" = x; then
47497    # Not in mixed or Windows style, start by that.
47498    new_path=`cmd //c echo $path`
47499  fi
47500
47501
47502  input_path="$new_path"
47503  # Check if we need to convert this using DOS-style short mode. If the path
47504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47505  # take no chances and rewrite it.
47506  # Note: m4 eats our [], so we need to use [ and ] instead.
47507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47508  if test "x$has_forbidden_chars" != x; then
47509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47511  fi
47512
47513
47514  windows_path="$new_path"
47515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47516    unix_path=`$CYGPATH -u "$windows_path"`
47517    new_path="$unix_path"
47518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47520    new_path="$unix_path"
47521  fi
47522
47523  if test "x$path" != "x$new_path"; then
47524    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47527  fi
47528
47529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47531
47532    else
47533      # We're on a unix platform. Hooray! :)
47534      path="$POTENTIAL_FREETYPE_LIB_PATH"
47535      has_space=`$ECHO "$path" | $GREP " "`
47536      if test "x$has_space" != x; then
47537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47540      fi
47541
47542      # Use eval to expand a potential ~
47543      eval path="$path"
47544      if test ! -f "$path" && test ! -d "$path"; then
47545        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47546      fi
47547
47548      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47549    fi
47550  fi
47551
47552
47553    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47555$as_echo_n "checking for freetype includes... " >&6; }
47556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47557$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47558    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47560$as_echo_n "checking for freetype libraries... " >&6; }
47561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47562$as_echo "$FREETYPE_LIB_PATH" >&6; }
47563  fi
47564
47565              if test "x$FOUND_FREETYPE" != xyes; then
47566
47567  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47568  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47569  METHOD="well-known location"
47570
47571  # Let's start with an optimistic view of the world :-)
47572  FOUND_FREETYPE=yes
47573
47574  # First look for the canonical freetype main include file ft2build.h.
47575  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47576    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47577    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47578    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47579      # Fail.
47580      FOUND_FREETYPE=no
47581    fi
47582  fi
47583
47584  if test "x$FOUND_FREETYPE" = xyes; then
47585    # Include file found, let's continue the sanity check.
47586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47587$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47588
47589    # Reset to default value
47590    FREETYPE_BASE_NAME=freetype
47591    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47592    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47593      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47594          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47595        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47596        # for the .6 version explicitly.
47597        FREETYPE_BASE_NAME=freetype.6
47598        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47599        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47600$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47601      else
47602        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47603$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47604        FOUND_FREETYPE=no
47605      fi
47606    else
47607      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47608        # On Windows, we will need both .lib and .dll file.
47609        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47610          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47611$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47612          FOUND_FREETYPE=no
47613        fi
47614      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47615          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47616        # Found lib in isa dir, use that instead.
47617        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47618        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47619$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47620      fi
47621    fi
47622  fi
47623
47624  if test "x$FOUND_FREETYPE" = xyes; then
47625
47626  # Only process if variable expands to non-empty
47627
47628  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47630
47631  # Input might be given as Windows format, start by converting to
47632  # unix format.
47633  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47634  new_path=`$CYGPATH -u "$path"`
47635
47636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47639  # "foo.exe" is OK but "foo" is an error.
47640  #
47641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47642  # It is also a way to make sure we got the proper file name for the real test later on.
47643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47644  if test "x$test_shortpath" = x; then
47645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47647    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47648  fi
47649
47650  # Call helper function which possibly converts this using DOS-style short mode.
47651  # If so, the updated path is stored in $new_path.
47652
47653  input_path="$new_path"
47654  # Check if we need to convert this using DOS-style short mode. If the path
47655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47656  # take no chances and rewrite it.
47657  # Note: m4 eats our [], so we need to use [ and ] instead.
47658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47659  if test "x$has_forbidden_chars" != x; then
47660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47664      # Going to short mode and back again did indeed matter. Since short mode is
47665      # case insensitive, let's make it lowercase to improve readability.
47666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47667      # Now convert it back to Unix-style (cygpath)
47668      input_path=`$CYGPATH -u "$shortmode_path"`
47669      new_path="$input_path"
47670    fi
47671  fi
47672
47673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47674  if test "x$test_cygdrive_prefix" = x; then
47675    # As a simple fix, exclude /usr/bin since it's not a real path.
47676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47678      # a path prefixed by /cygdrive for fixpath to work.
47679      new_path="$CYGWIN_ROOT_PATH$input_path"
47680    fi
47681  fi
47682
47683
47684  if test "x$path" != "x$new_path"; then
47685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47688  fi
47689
47690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47691
47692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47693  has_colon=`$ECHO $path | $GREP ^.:`
47694  new_path="$path"
47695  if test "x$has_colon" = x; then
47696    # Not in mixed or Windows style, start by that.
47697    new_path=`cmd //c echo $path`
47698  fi
47699
47700
47701  input_path="$new_path"
47702  # Check if we need to convert this using DOS-style short mode. If the path
47703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47704  # take no chances and rewrite it.
47705  # Note: m4 eats our [], so we need to use [ and ] instead.
47706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47707  if test "x$has_forbidden_chars" != x; then
47708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47710  fi
47711
47712
47713  windows_path="$new_path"
47714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47715    unix_path=`$CYGPATH -u "$windows_path"`
47716    new_path="$unix_path"
47717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47719    new_path="$unix_path"
47720  fi
47721
47722  if test "x$path" != "x$new_path"; then
47723    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47726  fi
47727
47728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47730
47731    else
47732      # We're on a unix platform. Hooray! :)
47733      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47734      has_space=`$ECHO "$path" | $GREP " "`
47735      if test "x$has_space" != x; then
47736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47739      fi
47740
47741      # Use eval to expand a potential ~
47742      eval path="$path"
47743      if test ! -f "$path" && test ! -d "$path"; then
47744        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47745      fi
47746
47747      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47748    fi
47749  fi
47750
47751
47752  # Only process if variable expands to non-empty
47753
47754  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47756
47757  # Input might be given as Windows format, start by converting to
47758  # unix format.
47759  path="$POTENTIAL_FREETYPE_LIB_PATH"
47760  new_path=`$CYGPATH -u "$path"`
47761
47762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47765  # "foo.exe" is OK but "foo" is an error.
47766  #
47767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47768  # It is also a way to make sure we got the proper file name for the real test later on.
47769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47770  if test "x$test_shortpath" = x; then
47771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47773    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47774  fi
47775
47776  # Call helper function which possibly converts this using DOS-style short mode.
47777  # If so, the updated path is stored in $new_path.
47778
47779  input_path="$new_path"
47780  # Check if we need to convert this using DOS-style short mode. If the path
47781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47782  # take no chances and rewrite it.
47783  # Note: m4 eats our [], so we need to use [ and ] instead.
47784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47785  if test "x$has_forbidden_chars" != x; then
47786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47790      # Going to short mode and back again did indeed matter. Since short mode is
47791      # case insensitive, let's make it lowercase to improve readability.
47792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47793      # Now convert it back to Unix-style (cygpath)
47794      input_path=`$CYGPATH -u "$shortmode_path"`
47795      new_path="$input_path"
47796    fi
47797  fi
47798
47799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47800  if test "x$test_cygdrive_prefix" = x; then
47801    # As a simple fix, exclude /usr/bin since it's not a real path.
47802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47804      # a path prefixed by /cygdrive for fixpath to work.
47805      new_path="$CYGWIN_ROOT_PATH$input_path"
47806    fi
47807  fi
47808
47809
47810  if test "x$path" != "x$new_path"; then
47811    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47813$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47814  fi
47815
47816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47817
47818  path="$POTENTIAL_FREETYPE_LIB_PATH"
47819  has_colon=`$ECHO $path | $GREP ^.:`
47820  new_path="$path"
47821  if test "x$has_colon" = x; then
47822    # Not in mixed or Windows style, start by that.
47823    new_path=`cmd //c echo $path`
47824  fi
47825
47826
47827  input_path="$new_path"
47828  # Check if we need to convert this using DOS-style short mode. If the path
47829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47830  # take no chances and rewrite it.
47831  # Note: m4 eats our [], so we need to use [ and ] instead.
47832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47833  if test "x$has_forbidden_chars" != x; then
47834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47836  fi
47837
47838
47839  windows_path="$new_path"
47840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47841    unix_path=`$CYGPATH -u "$windows_path"`
47842    new_path="$unix_path"
47843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47845    new_path="$unix_path"
47846  fi
47847
47848  if test "x$path" != "x$new_path"; then
47849    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47852  fi
47853
47854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47856
47857    else
47858      # We're on a unix platform. Hooray! :)
47859      path="$POTENTIAL_FREETYPE_LIB_PATH"
47860      has_space=`$ECHO "$path" | $GREP " "`
47861      if test "x$has_space" != x; then
47862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47864        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47865      fi
47866
47867      # Use eval to expand a potential ~
47868      eval path="$path"
47869      if test ! -f "$path" && test ! -d "$path"; then
47870        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47871      fi
47872
47873      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47874    fi
47875  fi
47876
47877
47878    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47880$as_echo_n "checking for freetype includes... " >&6; }
47881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47882$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47883    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47885$as_echo_n "checking for freetype libraries... " >&6; }
47886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47887$as_echo "$FREETYPE_LIB_PATH" >&6; }
47888  fi
47889
47890              fi
47891            fi
47892          fi
47893        fi
47894      fi # end check in well-known locations
47895
47896      if test "x$FOUND_FREETYPE" != xyes; then
47897
47898  # Print a helpful message on how to acquire the necessary build dependency.
47899  # freetype is the help tag: freetype, cups, pulse, alsa etc
47900  MISSING_DEPENDENCY=freetype
47901
47902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47903    cygwin_help $MISSING_DEPENDENCY
47904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47905    msys_help $MISSING_DEPENDENCY
47906  else
47907    PKGHANDLER_COMMAND=
47908
47909    case $PKGHANDLER in
47910      apt-get)
47911        apt_help     $MISSING_DEPENDENCY ;;
47912      yum)
47913        yum_help     $MISSING_DEPENDENCY ;;
47914      port)
47915        port_help    $MISSING_DEPENDENCY ;;
47916      pkgutil)
47917        pkgutil_help $MISSING_DEPENDENCY ;;
47918      pkgadd)
47919        pkgadd_help  $MISSING_DEPENDENCY ;;
47920    esac
47921
47922    if test "x$PKGHANDLER_COMMAND" != x; then
47923      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47924    fi
47925  fi
47926
47927        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47928      fi
47929    fi # end user specified settings
47930
47931    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47932    if test "x$FREETYPE_CFLAGS" = x; then
47933
47934  # Only process if variable expands to non-empty
47935
47936  if test "x$FREETYPE_INCLUDE_PATH" != x; then
47937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47938
47939  # Input might be given as Windows format, start by converting to
47940  # unix format.
47941  path="$FREETYPE_INCLUDE_PATH"
47942  new_path=`$CYGPATH -u "$path"`
47943
47944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47947  # "foo.exe" is OK but "foo" is an error.
47948  #
47949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47950  # It is also a way to make sure we got the proper file name for the real test later on.
47951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47952  if test "x$test_shortpath" = x; then
47953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47954$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47955    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47956  fi
47957
47958  # Call helper function which possibly converts this using DOS-style short mode.
47959  # If so, the updated path is stored in $new_path.
47960
47961  input_path="$new_path"
47962  # Check if we need to convert this using DOS-style short mode. If the path
47963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47964  # take no chances and rewrite it.
47965  # Note: m4 eats our [], so we need to use [ and ] instead.
47966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47967  if test "x$has_forbidden_chars" != x; then
47968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47972      # Going to short mode and back again did indeed matter. Since short mode is
47973      # case insensitive, let's make it lowercase to improve readability.
47974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47975      # Now convert it back to Unix-style (cygpath)
47976      input_path=`$CYGPATH -u "$shortmode_path"`
47977      new_path="$input_path"
47978    fi
47979  fi
47980
47981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47982  if test "x$test_cygdrive_prefix" = x; then
47983    # As a simple fix, exclude /usr/bin since it's not a real path.
47984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47986      # a path prefixed by /cygdrive for fixpath to work.
47987      new_path="$CYGWIN_ROOT_PATH$input_path"
47988    fi
47989  fi
47990
47991
47992  if test "x$path" != "x$new_path"; then
47993    FREETYPE_INCLUDE_PATH="$new_path"
47994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47995$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47996  fi
47997
47998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47999
48000  path="$FREETYPE_INCLUDE_PATH"
48001  has_colon=`$ECHO $path | $GREP ^.:`
48002  new_path="$path"
48003  if test "x$has_colon" = x; then
48004    # Not in mixed or Windows style, start by that.
48005    new_path=`cmd //c echo $path`
48006  fi
48007
48008
48009  input_path="$new_path"
48010  # Check if we need to convert this using DOS-style short mode. If the path
48011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48012  # take no chances and rewrite it.
48013  # Note: m4 eats our [], so we need to use [ and ] instead.
48014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48015  if test "x$has_forbidden_chars" != x; then
48016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48018  fi
48019
48020
48021  windows_path="$new_path"
48022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48023    unix_path=`$CYGPATH -u "$windows_path"`
48024    new_path="$unix_path"
48025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48027    new_path="$unix_path"
48028  fi
48029
48030  if test "x$path" != "x$new_path"; then
48031    FREETYPE_INCLUDE_PATH="$new_path"
48032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48033$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48034  fi
48035
48036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48038
48039    else
48040      # We're on a unix platform. Hooray! :)
48041      path="$FREETYPE_INCLUDE_PATH"
48042      has_space=`$ECHO "$path" | $GREP " "`
48043      if test "x$has_space" != x; then
48044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48045$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48047      fi
48048
48049      # Use eval to expand a potential ~
48050      eval path="$path"
48051      if test ! -f "$path" && test ! -d "$path"; then
48052        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48053      fi
48054
48055      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48056    fi
48057  fi
48058
48059      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48060        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48061      else
48062        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48063      fi
48064    fi
48065
48066    if test "x$FREETYPE_LIBS" = x; then
48067
48068  # Only process if variable expands to non-empty
48069
48070  if test "x$FREETYPE_LIB_PATH" != x; then
48071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48072
48073  # Input might be given as Windows format, start by converting to
48074  # unix format.
48075  path="$FREETYPE_LIB_PATH"
48076  new_path=`$CYGPATH -u "$path"`
48077
48078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48081  # "foo.exe" is OK but "foo" is an error.
48082  #
48083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48084  # It is also a way to make sure we got the proper file name for the real test later on.
48085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48086  if test "x$test_shortpath" = x; then
48087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48088$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48089    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48090  fi
48091
48092  # Call helper function which possibly converts this using DOS-style short mode.
48093  # If so, the updated path is stored in $new_path.
48094
48095  input_path="$new_path"
48096  # Check if we need to convert this using DOS-style short mode. If the path
48097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48098  # take no chances and rewrite it.
48099  # Note: m4 eats our [], so we need to use [ and ] instead.
48100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48101  if test "x$has_forbidden_chars" != x; then
48102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48106      # Going to short mode and back again did indeed matter. Since short mode is
48107      # case insensitive, let's make it lowercase to improve readability.
48108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48109      # Now convert it back to Unix-style (cygpath)
48110      input_path=`$CYGPATH -u "$shortmode_path"`
48111      new_path="$input_path"
48112    fi
48113  fi
48114
48115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48116  if test "x$test_cygdrive_prefix" = x; then
48117    # As a simple fix, exclude /usr/bin since it's not a real path.
48118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48120      # a path prefixed by /cygdrive for fixpath to work.
48121      new_path="$CYGWIN_ROOT_PATH$input_path"
48122    fi
48123  fi
48124
48125
48126  if test "x$path" != "x$new_path"; then
48127    FREETYPE_LIB_PATH="$new_path"
48128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48129$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48130  fi
48131
48132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48133
48134  path="$FREETYPE_LIB_PATH"
48135  has_colon=`$ECHO $path | $GREP ^.:`
48136  new_path="$path"
48137  if test "x$has_colon" = x; then
48138    # Not in mixed or Windows style, start by that.
48139    new_path=`cmd //c echo $path`
48140  fi
48141
48142
48143  input_path="$new_path"
48144  # Check if we need to convert this using DOS-style short mode. If the path
48145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48146  # take no chances and rewrite it.
48147  # Note: m4 eats our [], so we need to use [ and ] instead.
48148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48149  if test "x$has_forbidden_chars" != x; then
48150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48152  fi
48153
48154
48155  windows_path="$new_path"
48156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48157    unix_path=`$CYGPATH -u "$windows_path"`
48158    new_path="$unix_path"
48159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48161    new_path="$unix_path"
48162  fi
48163
48164  if test "x$path" != "x$new_path"; then
48165    FREETYPE_LIB_PATH="$new_path"
48166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48167$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48168  fi
48169
48170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48172
48173    else
48174      # We're on a unix platform. Hooray! :)
48175      path="$FREETYPE_LIB_PATH"
48176      has_space=`$ECHO "$path" | $GREP " "`
48177      if test "x$has_space" != x; then
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48179$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48180        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48181      fi
48182
48183      # Use eval to expand a potential ~
48184      eval path="$path"
48185      if test ! -f "$path" && test ! -d "$path"; then
48186        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48187      fi
48188
48189      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48190    fi
48191  fi
48192
48193      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48194        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48195      else
48196        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48197      fi
48198    fi
48199
48200    # Try to compile it
48201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48202$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48203    ac_ext=cpp
48204ac_cpp='$CXXCPP $CPPFLAGS'
48205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48208
48209    PREV_CXXCFLAGS="$CXXFLAGS"
48210    PREV_LIBS="$LIBS"
48211    PREV_CXX="$CXX"
48212    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48213    LIBS="$LIBS $FREETYPE_LIBS"
48214    CXX="$FIXPATH $CXX"
48215    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48216/* end confdefs.h.  */
48217
48218          #include<ft2build.h>
48219          #include FT_FREETYPE_H
48220          int main () {
48221            FT_Init_FreeType(NULL);
48222            return 0;
48223          }
48224
48225_ACEOF
48226if ac_fn_cxx_try_link "$LINENO"; then :
48227
48228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48229$as_echo "yes" >&6; }
48230
48231else
48232
48233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48234$as_echo "no" >&6; }
48235          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48236$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48237          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48238$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48239
48240
48241  # Print a helpful message on how to acquire the necessary build dependency.
48242  # freetype is the help tag: freetype, cups, pulse, alsa etc
48243  MISSING_DEPENDENCY=freetype
48244
48245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48246    cygwin_help $MISSING_DEPENDENCY
48247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48248    msys_help $MISSING_DEPENDENCY
48249  else
48250    PKGHANDLER_COMMAND=
48251
48252    case $PKGHANDLER in
48253      apt-get)
48254        apt_help     $MISSING_DEPENDENCY ;;
48255      yum)
48256        yum_help     $MISSING_DEPENDENCY ;;
48257      port)
48258        port_help    $MISSING_DEPENDENCY ;;
48259      pkgutil)
48260        pkgutil_help $MISSING_DEPENDENCY ;;
48261      pkgadd)
48262        pkgadd_help  $MISSING_DEPENDENCY ;;
48263    esac
48264
48265    if test "x$PKGHANDLER_COMMAND" != x; then
48266      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48267    fi
48268  fi
48269
48270
48271          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48272
48273
48274fi
48275rm -f core conftest.err conftest.$ac_objext \
48276    conftest$ac_exeext conftest.$ac_ext
48277    CXXCFLAGS="$PREV_CXXFLAGS"
48278    LIBS="$PREV_LIBS"
48279    CXX="$PREV_CXX"
48280    ac_ext=cpp
48281ac_cpp='$CXXCPP $CPPFLAGS'
48282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48285
48286
48287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48288$as_echo_n "checking if we should bundle freetype... " >&6; }
48289    if test "x$BUNDLE_FREETYPE" = xyes; then
48290      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48291    fi
48292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48293$as_echo "$BUNDLE_FREETYPE" >&6; }
48294
48295  fi # end freetype needed
48296
48297
48298
48299
48300
48301
48302
48303  ###############################################################################
48304  #
48305  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48306  #
48307
48308# Check whether --with-alsa was given.
48309if test "${with_alsa+set}" = set; then :
48310  withval=$with_alsa;
48311fi
48312
48313
48314# Check whether --with-alsa-include was given.
48315if test "${with_alsa_include+set}" = set; then :
48316  withval=$with_alsa_include;
48317fi
48318
48319
48320# Check whether --with-alsa-lib was given.
48321if test "${with_alsa_lib+set}" = set; then :
48322  withval=$with_alsa_lib;
48323fi
48324
48325
48326  if test "x$ALSA_NOT_NEEDED" = xyes; then
48327    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48328      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48329$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48330    fi
48331    ALSA_CFLAGS=
48332    ALSA_LIBS=
48333  else
48334    ALSA_FOUND=no
48335
48336    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48337      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48338    fi
48339
48340    if test "x${with_alsa}" != x; then
48341      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48342      ALSA_CFLAGS="-I${with_alsa}/include"
48343      ALSA_FOUND=yes
48344    fi
48345    if test "x${with_alsa_include}" != x; then
48346      ALSA_CFLAGS="-I${with_alsa_include}"
48347      ALSA_FOUND=yes
48348    fi
48349    if test "x${with_alsa_lib}" != x; then
48350      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48351      ALSA_FOUND=yes
48352    fi
48353    if test "x$ALSA_FOUND" = xno; then
48354
48355
48356  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48357    # Source the builddeps file again, to make sure it uses the latest variables!
48358    . $builddepsfile
48359    # Look for a target and build machine specific resource!
48360    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48361    if test "x$resource" = x; then
48362      # Ok, lets instead look for a target specific resource
48363      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48364    fi
48365    if test "x$resource" = x; then
48366      # Ok, lets instead look for a build specific resource
48367      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48368    fi
48369    if test "x$resource" = x; then
48370      # Ok, lets instead look for a generic resource
48371      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48372      resource=${builddep_alsa}
48373    fi
48374    if test "x$resource" != x; then
48375      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48376$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48377      # If the resource in the builddeps.conf file is an existing directory,
48378      # for example /java/linux/cups
48379      if test -d ${resource}; then
48380        depdir=${resource}
48381      else
48382
48383  # alsa is for example mymodule
48384  # $resource is for example libs/general/libmymod_1_2_3.zip
48385  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48386  # $with_builddeps_dir is for example /localhome/builddeps
48387  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48388  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48389  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48390  filename=`basename $resource`
48391  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48392  filebase=${filename%%.*}
48393  extension=${filename#*.}
48394  installdir=$with_builddeps_dir/$filebase
48395  if test ! -f $installdir/$filename.unpacked; then
48396    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48397$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48398    if test ! -d $installdir; then
48399      mkdir -p $installdir
48400    fi
48401    if test ! -d $installdir; then
48402      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48403    fi
48404    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48405    touch $tmpfile
48406    if test ! -f $tmpfile; then
48407      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48408    fi
48409
48410  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48411  # $tmpfile is the local file name for the downloaded file.
48412  VALID_TOOL=no
48413  if test "x$BDEPS_FTP" = xwget; then
48414    VALID_TOOL=yes
48415    wget -O $tmpfile $with_builddeps_server/$resource
48416  fi
48417  if test "x$BDEPS_FTP" = xlftp; then
48418    VALID_TOOL=yes
48419    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48420  fi
48421  if test "x$BDEPS_FTP" = xftp; then
48422    VALID_TOOL=yes
48423    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48424    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48425    FTPUSERPWD=${FTPSERVER%%@*}
48426    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48427      FTPUSER=${userpwd%%:*}
48428      FTPPWD=${userpwd#*@}
48429      FTPSERVER=${FTPSERVER#*@}
48430    else
48431      FTPUSER=ftp
48432      FTPPWD=ftp
48433    fi
48434    # the "pass" command does not work on some
48435    # ftp clients (read ftp.exe) but if it works,
48436    # passive mode is better!
48437    ( \
48438        echo "user $FTPUSER $FTPPWD"        ; \
48439        echo "pass"                         ; \
48440        echo "bin"                          ; \
48441        echo "get $FTPPATH $tmpfile"              ; \
48442    ) | ftp -in $FTPSERVER
48443  fi
48444  if test "x$VALID_TOOL" != xyes; then
48445    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48446  fi
48447
48448    mv $tmpfile $installdir/$filename
48449    if test ! -s $installdir/$filename; then
48450      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48451    fi
48452    case "$extension" in
48453      zip)  echo "Unzipping $installdir/$filename..."
48454        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48455        ;;
48456      tar.gz) echo "Untaring $installdir/$filename..."
48457        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48458        ;;
48459      tgz) echo "Untaring $installdir/$filename..."
48460        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48461        ;;
48462      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48463        ;;
48464    esac
48465  fi
48466  if test -f $installdir/$filename.unpacked; then
48467    depdir=$installdir
48468  fi
48469
48470      fi
48471      # Source the builddeps file again, because in the previous command, the depdir
48472      # was updated to point at the current build dependency install directory.
48473      . $builddepsfile
48474      # Now extract variables from the builddeps.conf files.
48475      theroot=${builddep_alsa_ROOT}
48476      thecflags=${builddep_alsa_CFLAGS}
48477      thelibs=${builddep_alsa_LIBS}
48478      if test "x$depdir" = x; then
48479        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48480      fi
48481      ALSA=$depdir
48482      if test "x$theroot" != x; then
48483        ALSA="$theroot"
48484      fi
48485      if test "x$thecflags" != x; then
48486        ALSA_CFLAGS="$thecflags"
48487      fi
48488      if test "x$thelibs" != x; then
48489        ALSA_LIBS="$thelibs"
48490      fi
48491      ALSA_FOUND=yes
48492      else ALSA_FOUND=no
48493
48494    fi
48495    else ALSA_FOUND=no
48496
48497  fi
48498
48499    fi
48500    # Do not try pkg-config if we have a sysroot set.
48501    if test "x$SYSROOT" = x; then
48502      if test "x$ALSA_FOUND" = xno; then
48503
48504pkg_failed=no
48505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48506$as_echo_n "checking for ALSA... " >&6; }
48507
48508if test -n "$ALSA_CFLAGS"; then
48509    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48510 elif test -n "$PKG_CONFIG"; then
48511    if test -n "$PKG_CONFIG" && \
48512    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48513  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48514  ac_status=$?
48515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48516  test $ac_status = 0; }; then
48517  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48518else
48519  pkg_failed=yes
48520fi
48521 else
48522    pkg_failed=untried
48523fi
48524if test -n "$ALSA_LIBS"; then
48525    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48526 elif test -n "$PKG_CONFIG"; then
48527    if test -n "$PKG_CONFIG" && \
48528    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48529  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48530  ac_status=$?
48531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48532  test $ac_status = 0; }; then
48533  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48534else
48535  pkg_failed=yes
48536fi
48537 else
48538    pkg_failed=untried
48539fi
48540
48541
48542
48543if test $pkg_failed = yes; then
48544
48545if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48546        _pkg_short_errors_supported=yes
48547else
48548        _pkg_short_errors_supported=no
48549fi
48550        if test $_pkg_short_errors_supported = yes; then
48551	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48552        else
48553	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48554        fi
48555	# Put the nasty error message in config.log where it belongs
48556	echo "$ALSA_PKG_ERRORS" >&5
48557
48558	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48559$as_echo "no" >&6; }
48560                ALSA_FOUND=no
48561elif test $pkg_failed = untried; then
48562	ALSA_FOUND=no
48563else
48564	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48565	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48567$as_echo "yes" >&6; }
48568	ALSA_FOUND=yes
48569fi
48570      fi
48571    fi
48572    if test "x$ALSA_FOUND" = xno; then
48573      for ac_header in alsa/asoundlib.h
48574do :
48575  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48576if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48577  cat >>confdefs.h <<_ACEOF
48578#define HAVE_ALSA_ASOUNDLIB_H 1
48579_ACEOF
48580
48581            ALSA_FOUND=yes
48582            ALSA_CFLAGS=-Iignoreme
48583            ALSA_LIBS=-lasound
48584            DEFAULT_ALSA=yes
48585
48586else
48587  ALSA_FOUND=no
48588fi
48589
48590done
48591
48592    fi
48593    if test "x$ALSA_FOUND" = xno; then
48594
48595  # Print a helpful message on how to acquire the necessary build dependency.
48596  # alsa is the help tag: freetype, cups, pulse, alsa etc
48597  MISSING_DEPENDENCY=alsa
48598
48599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48600    cygwin_help $MISSING_DEPENDENCY
48601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48602    msys_help $MISSING_DEPENDENCY
48603  else
48604    PKGHANDLER_COMMAND=
48605
48606    case $PKGHANDLER in
48607      apt-get)
48608        apt_help     $MISSING_DEPENDENCY ;;
48609      yum)
48610        yum_help     $MISSING_DEPENDENCY ;;
48611      port)
48612        port_help    $MISSING_DEPENDENCY ;;
48613      pkgutil)
48614        pkgutil_help $MISSING_DEPENDENCY ;;
48615      pkgadd)
48616        pkgadd_help  $MISSING_DEPENDENCY ;;
48617    esac
48618
48619    if test "x$PKGHANDLER_COMMAND" != x; then
48620      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48621    fi
48622  fi
48623
48624      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48625    fi
48626  fi
48627
48628
48629
48630
48631
48632
48633  ###############################################################################
48634  #
48635  # Check for the jpeg library
48636  #
48637
48638
48639# Check whether --with-libjpeg was given.
48640if test "${with_libjpeg+set}" = set; then :
48641  withval=$with_libjpeg;
48642fi
48643
48644
48645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48646$as_echo_n "checking for which libjpeg to use... " >&6; }
48647
48648  # default is bundled
48649  DEFAULT_LIBJPEG=bundled
48650
48651  #
48652  # if user didn't specify, use DEFAULT_LIBJPEG
48653  #
48654  if test "x${with_libjpeg}" = "x"; then
48655    with_libjpeg=${DEFAULT_LIBJPEG}
48656  fi
48657
48658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48659$as_echo "${with_libjpeg}" >&6; }
48660
48661  if test "x${with_libjpeg}" = "xbundled"; then
48662    USE_EXTERNAL_LIBJPEG=false
48663  elif test "x${with_libjpeg}" = "xsystem"; then
48664    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48665if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48666
48667else
48668   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48669fi
48670
48671
48672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48673$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48674if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48675  $as_echo_n "(cached) " >&6
48676else
48677  ac_check_lib_save_LIBS=$LIBS
48678LIBS="-ljpeg  $LIBS"
48679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48680/* end confdefs.h.  */
48681
48682/* Override any GCC internal prototype to avoid an error.
48683   Use char because int might match the return type of a GCC
48684   builtin and then its argument prototype would still apply.  */
48685#ifdef __cplusplus
48686extern "C"
48687#endif
48688char jpeg_CreateDecompress ();
48689int
48690main ()
48691{
48692return jpeg_CreateDecompress ();
48693  ;
48694  return 0;
48695}
48696_ACEOF
48697if ac_fn_cxx_try_link "$LINENO"; then :
48698  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48699else
48700  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48701fi
48702rm -f core conftest.err conftest.$ac_objext \
48703    conftest$ac_exeext conftest.$ac_ext
48704LIBS=$ac_check_lib_save_LIBS
48705fi
48706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48707$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48708if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48709  cat >>confdefs.h <<_ACEOF
48710#define HAVE_LIBJPEG 1
48711_ACEOF
48712
48713  LIBS="-ljpeg $LIBS"
48714
48715else
48716   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48717fi
48718
48719
48720    USE_EXTERNAL_LIBJPEG=true
48721  else
48722    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48723  fi
48724
48725
48726
48727  ###############################################################################
48728  #
48729  # Check for the gif library
48730  #
48731
48732
48733# Check whether --with-giflib was given.
48734if test "${with_giflib+set}" = set; then :
48735  withval=$with_giflib;
48736fi
48737
48738
48739
48740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48741$as_echo_n "checking for which giflib to use... " >&6; }
48742
48743  # default is bundled
48744  DEFAULT_GIFLIB=bundled
48745
48746  #
48747  # if user didn't specify, use DEFAULT_GIFLIB
48748  #
48749  if test "x${with_giflib}" = "x"; then
48750    with_giflib=${DEFAULT_GIFLIB}
48751  fi
48752
48753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48754$as_echo "${with_giflib}" >&6; }
48755
48756  if test "x${with_giflib}" = "xbundled"; then
48757    USE_EXTERNAL_LIBGIF=false
48758  elif test "x${with_giflib}" = "xsystem"; then
48759    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48760if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48761
48762else
48763   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48764fi
48765
48766
48767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48768$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48769if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48770  $as_echo_n "(cached) " >&6
48771else
48772  ac_check_lib_save_LIBS=$LIBS
48773LIBS="-lgif  $LIBS"
48774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48775/* end confdefs.h.  */
48776
48777/* Override any GCC internal prototype to avoid an error.
48778   Use char because int might match the return type of a GCC
48779   builtin and then its argument prototype would still apply.  */
48780#ifdef __cplusplus
48781extern "C"
48782#endif
48783char DGifGetCode ();
48784int
48785main ()
48786{
48787return DGifGetCode ();
48788  ;
48789  return 0;
48790}
48791_ACEOF
48792if ac_fn_cxx_try_link "$LINENO"; then :
48793  ac_cv_lib_gif_DGifGetCode=yes
48794else
48795  ac_cv_lib_gif_DGifGetCode=no
48796fi
48797rm -f core conftest.err conftest.$ac_objext \
48798    conftest$ac_exeext conftest.$ac_ext
48799LIBS=$ac_check_lib_save_LIBS
48800fi
48801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48802$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48803if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48804  cat >>confdefs.h <<_ACEOF
48805#define HAVE_LIBGIF 1
48806_ACEOF
48807
48808  LIBS="-lgif $LIBS"
48809
48810else
48811   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48812fi
48813
48814
48815    USE_EXTERNAL_LIBGIF=true
48816  else
48817    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48818  fi
48819
48820
48821  ###############################################################################
48822  #
48823  # Check for the lcms2 library
48824  #
48825
48826
48827# Check whether --with-lcms was given.
48828if test "${with_lcms+set}" = set; then :
48829  withval=$with_lcms;
48830fi
48831
48832
48833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48834$as_echo_n "checking for which lcms to use... " >&6; }
48835
48836  DEFAULT_LCMS=bundled
48837
48838  #
48839  # If user didn't specify, use DEFAULT_LCMS
48840  #
48841  if test "x${with_lcms}" = "x"; then
48842      with_lcms=${DEFAULT_LCMS}
48843  fi
48844
48845  if test "x${with_lcms}" = "xbundled"; then
48846    USE_EXTERNAL_LCMS=false
48847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48848$as_echo "bundled" >&6; }
48849  elif test "x${with_lcms}" = "xsystem"; then
48850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48851$as_echo "system" >&6; }
48852
48853pkg_failed=no
48854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48855$as_echo_n "checking for LCMS... " >&6; }
48856
48857if test -n "$LCMS_CFLAGS"; then
48858    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48859 elif test -n "$PKG_CONFIG"; then
48860    if test -n "$PKG_CONFIG" && \
48861    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48862  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48863  ac_status=$?
48864  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48865  test $ac_status = 0; }; then
48866  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48867else
48868  pkg_failed=yes
48869fi
48870 else
48871    pkg_failed=untried
48872fi
48873if test -n "$LCMS_LIBS"; then
48874    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48875 elif test -n "$PKG_CONFIG"; then
48876    if test -n "$PKG_CONFIG" && \
48877    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48878  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48879  ac_status=$?
48880  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48881  test $ac_status = 0; }; then
48882  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48883else
48884  pkg_failed=yes
48885fi
48886 else
48887    pkg_failed=untried
48888fi
48889
48890
48891
48892if test $pkg_failed = yes; then
48893
48894if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48895        _pkg_short_errors_supported=yes
48896else
48897        _pkg_short_errors_supported=no
48898fi
48899        if test $_pkg_short_errors_supported = yes; then
48900	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48901        else
48902	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48903        fi
48904	# Put the nasty error message in config.log where it belongs
48905	echo "$LCMS_PKG_ERRORS" >&5
48906
48907	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48908$as_echo "no" >&6; }
48909                LCMS_FOUND=no
48910elif test $pkg_failed = untried; then
48911	LCMS_FOUND=no
48912else
48913	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48914	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48916$as_echo "yes" >&6; }
48917	LCMS_FOUND=yes
48918fi
48919    if test "x${LCMS_FOUND}" = "xyes"; then
48920      USE_EXTERNAL_LCMS=true
48921    else
48922      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48923    fi
48924  else
48925    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48926  fi
48927
48928
48929
48930  ###############################################################################
48931  #
48932  # Check for the png library
48933  #
48934
48935
48936# Check whether --with-libpng was given.
48937if test "${with_libpng+set}" = set; then :
48938  withval=$with_libpng;
48939fi
48940
48941
48942
48943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48944$as_echo_n "checking for which libpng to use... " >&6; }
48945
48946  # default is bundled
48947  DEFAULT_LIBPNG=bundled
48948
48949  #
48950  # if user didn't specify, use DEFAULT_LIBPNG
48951  #
48952  if test "x${with_libpng}" = "x"; then
48953      with_libpng=${DEFAULT_LIBPNG}
48954  fi
48955
48956  if test "x${with_libpng}" = "xbundled"; then
48957      USE_EXTERNAL_LIBPNG=false
48958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48959$as_echo "bundled" >&6; }
48960  elif test "x${with_libpng}" = "xsystem"; then
48961
48962pkg_failed=no
48963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48964$as_echo_n "checking for PNG... " >&6; }
48965
48966if test -n "$PNG_CFLAGS"; then
48967    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48968 elif test -n "$PKG_CONFIG"; then
48969    if test -n "$PKG_CONFIG" && \
48970    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48971  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48972  ac_status=$?
48973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48974  test $ac_status = 0; }; then
48975  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48976else
48977  pkg_failed=yes
48978fi
48979 else
48980    pkg_failed=untried
48981fi
48982if test -n "$PNG_LIBS"; then
48983    pkg_cv_PNG_LIBS="$PNG_LIBS"
48984 elif test -n "$PKG_CONFIG"; then
48985    if test -n "$PKG_CONFIG" && \
48986    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48987  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48988  ac_status=$?
48989  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48990  test $ac_status = 0; }; then
48991  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48992else
48993  pkg_failed=yes
48994fi
48995 else
48996    pkg_failed=untried
48997fi
48998
48999
49000
49001if test $pkg_failed = yes; then
49002
49003if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49004        _pkg_short_errors_supported=yes
49005else
49006        _pkg_short_errors_supported=no
49007fi
49008        if test $_pkg_short_errors_supported = yes; then
49009	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49010        else
49011	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49012        fi
49013	# Put the nasty error message in config.log where it belongs
49014	echo "$PNG_PKG_ERRORS" >&5
49015
49016	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49017$as_echo "no" >&6; }
49018                 LIBPNG_FOUND=no
49019elif test $pkg_failed = untried; then
49020	 LIBPNG_FOUND=no
49021else
49022	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49023	PNG_LIBS=$pkg_cv_PNG_LIBS
49024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49025$as_echo "yes" >&6; }
49026	 LIBPNG_FOUND=yes
49027fi
49028      if test "x${LIBPNG_FOUND}" = "xyes"; then
49029          USE_EXTERNAL_LIBPNG=true
49030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49031$as_echo "system" >&6; }
49032      else
49033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49034$as_echo "system not found" >&6; }
49035          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49036      fi
49037  else
49038      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49039  fi
49040
49041
49042  ###############################################################################
49043  #
49044  # Check for the zlib library
49045  #
49046
49047
49048# Check whether --with-zlib was given.
49049if test "${with_zlib+set}" = set; then :
49050  withval=$with_zlib;
49051fi
49052
49053
49054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49055$as_echo_n "checking for compress in -lz... " >&6; }
49056if ${ac_cv_lib_z_compress+:} false; then :
49057  $as_echo_n "(cached) " >&6
49058else
49059  ac_check_lib_save_LIBS=$LIBS
49060LIBS="-lz  $LIBS"
49061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49062/* end confdefs.h.  */
49063
49064/* Override any GCC internal prototype to avoid an error.
49065   Use char because int might match the return type of a GCC
49066   builtin and then its argument prototype would still apply.  */
49067#ifdef __cplusplus
49068extern "C"
49069#endif
49070char compress ();
49071int
49072main ()
49073{
49074return compress ();
49075  ;
49076  return 0;
49077}
49078_ACEOF
49079if ac_fn_cxx_try_link "$LINENO"; then :
49080  ac_cv_lib_z_compress=yes
49081else
49082  ac_cv_lib_z_compress=no
49083fi
49084rm -f core conftest.err conftest.$ac_objext \
49085    conftest$ac_exeext conftest.$ac_ext
49086LIBS=$ac_check_lib_save_LIBS
49087fi
49088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49089$as_echo "$ac_cv_lib_z_compress" >&6; }
49090if test "x$ac_cv_lib_z_compress" = xyes; then :
49091   ZLIB_FOUND=yes
49092else
49093   ZLIB_FOUND=no
49094fi
49095
49096
49097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49098$as_echo_n "checking for which zlib to use... " >&6; }
49099
49100  DEFAULT_ZLIB=bundled
49101  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49102    #
49103    # On macosx default is system...on others default is
49104    #
49105    DEFAULT_ZLIB=system
49106  fi
49107
49108  if test "x${ZLIB_FOUND}" != "xyes"; then
49109    #
49110    # If we don't find any system...set default to bundled
49111    #
49112    DEFAULT_ZLIB=bundled
49113  fi
49114
49115  #
49116  # If user didn't specify, use DEFAULT_ZLIB
49117  #
49118  if test "x${with_zlib}" = "x"; then
49119    with_zlib=${DEFAULT_ZLIB}
49120  fi
49121
49122  if test "x${with_zlib}" = "xbundled"; then
49123    USE_EXTERNAL_LIBZ=false
49124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49125$as_echo "bundled" >&6; }
49126  elif test "x${with_zlib}" = "xsystem"; then
49127    if test "x${ZLIB_FOUND}" = "xyes"; then
49128      USE_EXTERNAL_LIBZ=true
49129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49130$as_echo "system" >&6; }
49131    else
49132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49133$as_echo "system not found" >&6; }
49134      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49135    fi
49136  else
49137    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49138  fi
49139
49140
49141
49142  ###############################################################################
49143  LIBZIP_CAN_USE_MMAP=true
49144
49145
49146
49147  ###############################################################################
49148  #
49149  # Check if altzone exists in time.h
49150  #
49151
49152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49153/* end confdefs.h.  */
49154#include <time.h>
49155int
49156main ()
49157{
49158return (int)altzone;
49159  ;
49160  return 0;
49161}
49162_ACEOF
49163if ac_fn_cxx_try_link "$LINENO"; then :
49164  has_altzone=yes
49165else
49166  has_altzone=no
49167fi
49168rm -f core conftest.err conftest.$ac_objext \
49169    conftest$ac_exeext conftest.$ac_ext
49170  if test "x$has_altzone" = xyes; then
49171
49172$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49173
49174  fi
49175
49176  ###############################################################################
49177  #
49178  # Check the maths library
49179  #
49180
49181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49182$as_echo_n "checking for cos in -lm... " >&6; }
49183if ${ac_cv_lib_m_cos+:} false; then :
49184  $as_echo_n "(cached) " >&6
49185else
49186  ac_check_lib_save_LIBS=$LIBS
49187LIBS="-lm  $LIBS"
49188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49189/* end confdefs.h.  */
49190
49191/* Override any GCC internal prototype to avoid an error.
49192   Use char because int might match the return type of a GCC
49193   builtin and then its argument prototype would still apply.  */
49194#ifdef __cplusplus
49195extern "C"
49196#endif
49197char cos ();
49198int
49199main ()
49200{
49201return cos ();
49202  ;
49203  return 0;
49204}
49205_ACEOF
49206if ac_fn_cxx_try_link "$LINENO"; then :
49207  ac_cv_lib_m_cos=yes
49208else
49209  ac_cv_lib_m_cos=no
49210fi
49211rm -f core conftest.err conftest.$ac_objext \
49212    conftest$ac_exeext conftest.$ac_ext
49213LIBS=$ac_check_lib_save_LIBS
49214fi
49215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49216$as_echo "$ac_cv_lib_m_cos" >&6; }
49217if test "x$ac_cv_lib_m_cos" = xyes; then :
49218  cat >>confdefs.h <<_ACEOF
49219#define HAVE_LIBM 1
49220_ACEOF
49221
49222  LIBS="-lm $LIBS"
49223
49224else
49225
49226        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49227$as_echo "$as_me: Maths library was not found" >&6;}
49228
49229
49230fi
49231
49232
49233
49234  ###############################################################################
49235  #
49236  # Check for libdl.so
49237
49238  save_LIBS="$LIBS"
49239  LIBS=""
49240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49241$as_echo_n "checking for dlopen in -ldl... " >&6; }
49242if ${ac_cv_lib_dl_dlopen+:} false; then :
49243  $as_echo_n "(cached) " >&6
49244else
49245  ac_check_lib_save_LIBS=$LIBS
49246LIBS="-ldl  $LIBS"
49247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49248/* end confdefs.h.  */
49249
49250/* Override any GCC internal prototype to avoid an error.
49251   Use char because int might match the return type of a GCC
49252   builtin and then its argument prototype would still apply.  */
49253#ifdef __cplusplus
49254extern "C"
49255#endif
49256char dlopen ();
49257int
49258main ()
49259{
49260return dlopen ();
49261  ;
49262  return 0;
49263}
49264_ACEOF
49265if ac_fn_cxx_try_link "$LINENO"; then :
49266  ac_cv_lib_dl_dlopen=yes
49267else
49268  ac_cv_lib_dl_dlopen=no
49269fi
49270rm -f core conftest.err conftest.$ac_objext \
49271    conftest$ac_exeext conftest.$ac_ext
49272LIBS=$ac_check_lib_save_LIBS
49273fi
49274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49275$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49276if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49277  cat >>confdefs.h <<_ACEOF
49278#define HAVE_LIBDL 1
49279_ACEOF
49280
49281  LIBS="-ldl $LIBS"
49282
49283fi
49284
49285  LIBDL="$LIBS"
49286
49287  LIBS="$save_LIBS"
49288
49289
49290  ###############################################################################
49291  #
49292  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49293  # dynamic build is configured on command line.
49294  #
49295
49296# Check whether --with-stdc++lib was given.
49297if test "${with_stdc__lib+set}" = set; then :
49298  withval=$with_stdc__lib;
49299        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49300                && test "x$with_stdc__lib" != xdefault; then
49301          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49302        fi
49303
49304else
49305  with_stdc__lib=default
49306
49307fi
49308
49309
49310  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49311    # Test if -lstdc++ works.
49312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49313$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49314    ac_ext=cpp
49315ac_cpp='$CXXCPP $CPPFLAGS'
49316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49319
49320    OLD_CXXFLAGS="$CXXFLAGS"
49321    CXXFLAGS="$CXXFLAGS -lstdc++"
49322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49323/* end confdefs.h.  */
49324
49325int
49326main ()
49327{
49328return 0;
49329  ;
49330  return 0;
49331}
49332_ACEOF
49333if ac_fn_cxx_try_link "$LINENO"; then :
49334  has_dynamic_libstdcxx=yes
49335else
49336  has_dynamic_libstdcxx=no
49337fi
49338rm -f core conftest.err conftest.$ac_objext \
49339    conftest$ac_exeext conftest.$ac_ext
49340    CXXFLAGS="$OLD_CXXFLAGS"
49341    ac_ext=cpp
49342ac_cpp='$CXXCPP $CPPFLAGS'
49343ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49344ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49345ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49346
49347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49348$as_echo "$has_dynamic_libstdcxx" >&6; }
49349
49350    # Test if stdc++ can be linked statically.
49351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49352$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49353    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49354    ac_ext=cpp
49355ac_cpp='$CXXCPP $CPPFLAGS'
49356ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49357ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49358ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49359
49360    OLD_LIBS="$LIBS"
49361    OLD_CXX="$CXX"
49362    LIBS="$STATIC_STDCXX_FLAGS"
49363    CXX="$CC"
49364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49365/* end confdefs.h.  */
49366
49367int
49368main ()
49369{
49370return 0;
49371  ;
49372  return 0;
49373}
49374_ACEOF
49375if ac_fn_cxx_try_link "$LINENO"; then :
49376  has_static_libstdcxx=yes
49377else
49378  has_static_libstdcxx=no
49379fi
49380rm -f core conftest.err conftest.$ac_objext \
49381    conftest$ac_exeext conftest.$ac_ext
49382    LIBS="$OLD_LIBS"
49383    CXX="$OLD_CXX"
49384    ac_ext=cpp
49385ac_cpp='$CXXCPP $CPPFLAGS'
49386ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49387ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49388ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49389
49390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49391$as_echo "$has_static_libstdcxx" >&6; }
49392
49393    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49394      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49395    fi
49396
49397    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49398      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49399    fi
49400
49401    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49402      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49403    fi
49404
49405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49406$as_echo_n "checking how to link with libstdc++... " >&6; }
49407    # If dynamic was requested, it's available since it would fail above otherwise.
49408    # If dynamic wasn't requested, go with static unless it isn't available.
49409    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49410      LIBCXX="$LIBCXX -lstdc++"
49411      LDCXX="$CXX"
49412      STATIC_CXX_SETTING="STATIC_CXX=false"
49413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49414$as_echo "dynamic" >&6; }
49415    else
49416      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49417      LDCXX="$CC"
49418      STATIC_CXX_SETTING="STATIC_CXX=true"
49419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49420$as_echo "static" >&6; }
49421    fi
49422  fi
49423
49424
49425  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49426    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49427
49428pkg_failed=no
49429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49430$as_echo_n "checking for LIBFFI... " >&6; }
49431
49432if test -n "$LIBFFI_CFLAGS"; then
49433    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49434 elif test -n "$PKG_CONFIG"; then
49435    if test -n "$PKG_CONFIG" && \
49436    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49437  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49438  ac_status=$?
49439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49440  test $ac_status = 0; }; then
49441  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49442else
49443  pkg_failed=yes
49444fi
49445 else
49446    pkg_failed=untried
49447fi
49448if test -n "$LIBFFI_LIBS"; then
49449    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49450 elif test -n "$PKG_CONFIG"; then
49451    if test -n "$PKG_CONFIG" && \
49452    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49453  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49454  ac_status=$?
49455  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49456  test $ac_status = 0; }; then
49457  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49458else
49459  pkg_failed=yes
49460fi
49461 else
49462    pkg_failed=untried
49463fi
49464
49465
49466
49467if test $pkg_failed = yes; then
49468
49469if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49470        _pkg_short_errors_supported=yes
49471else
49472        _pkg_short_errors_supported=no
49473fi
49474        if test $_pkg_short_errors_supported = yes; then
49475	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49476        else
49477	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49478        fi
49479	# Put the nasty error message in config.log where it belongs
49480	echo "$LIBFFI_PKG_ERRORS" >&5
49481
49482	as_fn_error $? "Package requirements (libffi) were not met:
49483
49484$LIBFFI_PKG_ERRORS
49485
49486Consider adjusting the PKG_CONFIG_PATH environment variable if you
49487installed software in a non-standard prefix.
49488
49489Alternatively, you may set the environment variables LIBFFI_CFLAGS
49490and LIBFFI_LIBS to avoid the need to call pkg-config.
49491See the pkg-config man page for more details.
49492" "$LINENO" 5
49493elif test $pkg_failed = untried; then
49494	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49496as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49497is in your PATH or set the PKG_CONFIG environment variable to the full
49498path to pkg-config.
49499
49500Alternatively, you may set the environment variables LIBFFI_CFLAGS
49501and LIBFFI_LIBS to avoid the need to call pkg-config.
49502See the pkg-config man page for more details.
49503
49504To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49505See \`config.log' for more details" "$LINENO" 5; }
49506else
49507	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49508	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49510$as_echo "yes" >&6; }
49511	:
49512fi
49513
49514  fi
49515
49516  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49517    # Extract the first word of "llvm-config", so it can be a program name with args.
49518set dummy llvm-config; ac_word=$2
49519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49520$as_echo_n "checking for $ac_word... " >&6; }
49521if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49522  $as_echo_n "(cached) " >&6
49523else
49524  if test -n "$LLVM_CONFIG"; then
49525  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49526else
49527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49528for as_dir in $PATH
49529do
49530  IFS=$as_save_IFS
49531  test -z "$as_dir" && as_dir=.
49532    for ac_exec_ext in '' $ac_executable_extensions; do
49533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49534    ac_cv_prog_LLVM_CONFIG="llvm-config"
49535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49536    break 2
49537  fi
49538done
49539  done
49540IFS=$as_save_IFS
49541
49542fi
49543fi
49544LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49545if test -n "$LLVM_CONFIG"; then
49546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49547$as_echo "$LLVM_CONFIG" >&6; }
49548else
49549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49550$as_echo "no" >&6; }
49551fi
49552
49553
49554
49555    if test "x$LLVM_CONFIG" != xllvm-config; then
49556      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49557    fi
49558
49559    llvm_components="jit mcjit engine nativecodegen native"
49560    unset LLVM_CFLAGS
49561    for flag in $("$LLVM_CONFIG" --cxxflags); do
49562      if echo "${flag}" | grep -q '^-[ID]'; then
49563        if test "${flag}" != "-D_DEBUG" ; then
49564          if test "${LLVM_CFLAGS}" != "" ; then
49565            LLVM_CFLAGS="${LLVM_CFLAGS} "
49566          fi
49567          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49568        fi
49569      fi
49570    done
49571    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49572    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49573
49574    unset LLVM_LDFLAGS
49575    for flag in $("${LLVM_CONFIG}" --ldflags); do
49576      if echo "${flag}" | grep -q '^-L'; then
49577        if test "${LLVM_LDFLAGS}" != ""; then
49578          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49579        fi
49580        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49581      fi
49582    done
49583
49584    unset LLVM_LIBS
49585    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49586      if echo "${flag}" | grep -q '^-l'; then
49587        if test "${LLVM_LIBS}" != ""; then
49588          LLVM_LIBS="${LLVM_LIBS} "
49589        fi
49590        LLVM_LIBS="${LLVM_LIBS}${flag}"
49591      fi
49592    done
49593
49594
49595
49596
49597  fi
49598
49599  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49600  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49601    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49602  fi
49603
49604  # TODO better (platform agnostic) test
49605  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49606    LIBCXX="-lstdc++"
49607  fi
49608
49609
49610
49611
49612  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49613
49614
49615# Check whether --with-msvcr-dll was given.
49616if test "${with_msvcr_dll+set}" = set; then :
49617  withval=$with_msvcr_dll;
49618fi
49619
49620
49621  if test "x$with_msvcr_dll" != x; then
49622    # If given explicitely by user, do not probe. If not present, fail directly.
49623
49624  DLL_NAME="$MSVCR_NAME"
49625  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49626  METHOD="--with-msvcr-dll"
49627  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49628    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49629$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49630
49631    # Need to check if the found msvcr is correct architecture
49632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49633$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49634    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49636      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49637      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49638      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49639        CORRECT_MSVCR_ARCH="PE32 executable"
49640      else
49641        CORRECT_MSVCR_ARCH="PE32+ executable"
49642      fi
49643    else
49644      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49645        CORRECT_MSVCR_ARCH=386
49646      else
49647        CORRECT_MSVCR_ARCH=x86-64
49648      fi
49649    fi
49650    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49652$as_echo "ok" >&6; }
49653      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49654
49655  # Only process if variable expands to non-empty
49656
49657  if test "x$MSVC_DLL" != x; then
49658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49659
49660  # Input might be given as Windows format, start by converting to
49661  # unix format.
49662  path="$MSVC_DLL"
49663  new_path=`$CYGPATH -u "$path"`
49664
49665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49668  # "foo.exe" is OK but "foo" is an error.
49669  #
49670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49671  # It is also a way to make sure we got the proper file name for the real test later on.
49672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49673  if test "x$test_shortpath" = x; then
49674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49675$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49676    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49677  fi
49678
49679  # Call helper function which possibly converts this using DOS-style short mode.
49680  # If so, the updated path is stored in $new_path.
49681
49682  input_path="$new_path"
49683  # Check if we need to convert this using DOS-style short mode. If the path
49684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49685  # take no chances and rewrite it.
49686  # Note: m4 eats our [], so we need to use [ and ] instead.
49687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49688  if test "x$has_forbidden_chars" != x; then
49689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49693      # Going to short mode and back again did indeed matter. Since short mode is
49694      # case insensitive, let's make it lowercase to improve readability.
49695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49696      # Now convert it back to Unix-style (cygpath)
49697      input_path=`$CYGPATH -u "$shortmode_path"`
49698      new_path="$input_path"
49699    fi
49700  fi
49701
49702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49703  if test "x$test_cygdrive_prefix" = x; then
49704    # As a simple fix, exclude /usr/bin since it's not a real path.
49705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49707      # a path prefixed by /cygdrive for fixpath to work.
49708      new_path="$CYGWIN_ROOT_PATH$input_path"
49709    fi
49710  fi
49711
49712
49713  if test "x$path" != "x$new_path"; then
49714    MSVC_DLL="$new_path"
49715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49716$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49717  fi
49718
49719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49720
49721  path="$MSVC_DLL"
49722  has_colon=`$ECHO $path | $GREP ^.:`
49723  new_path="$path"
49724  if test "x$has_colon" = x; then
49725    # Not in mixed or Windows style, start by that.
49726    new_path=`cmd //c echo $path`
49727  fi
49728
49729
49730  input_path="$new_path"
49731  # Check if we need to convert this using DOS-style short mode. If the path
49732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49733  # take no chances and rewrite it.
49734  # Note: m4 eats our [], so we need to use [ and ] instead.
49735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49736  if test "x$has_forbidden_chars" != x; then
49737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49739  fi
49740
49741
49742  windows_path="$new_path"
49743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49744    unix_path=`$CYGPATH -u "$windows_path"`
49745    new_path="$unix_path"
49746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49748    new_path="$unix_path"
49749  fi
49750
49751  if test "x$path" != "x$new_path"; then
49752    MSVC_DLL="$new_path"
49753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49754$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49755  fi
49756
49757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49759
49760    else
49761      # We're on a unix platform. Hooray! :)
49762      path="$MSVC_DLL"
49763      has_space=`$ECHO "$path" | $GREP " "`
49764      if test "x$has_space" != x; then
49765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49766$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49768      fi
49769
49770      # Use eval to expand a potential ~
49771      eval path="$path"
49772      if test ! -f "$path" && test ! -d "$path"; then
49773        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49774      fi
49775
49776      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49777    fi
49778  fi
49779
49780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49781$as_echo_n "checking for $DLL_NAME... " >&6; }
49782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49783$as_echo "$MSVC_DLL" >&6; }
49784    else
49785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49786$as_echo "incorrect, ignoring" >&6; }
49787      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49788$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49789    fi
49790  fi
49791
49792    if test "x$MSVC_DLL" = x; then
49793      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49794    fi
49795    MSVCR_DLL="$MSVC_DLL"
49796  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49797
49798  DLL_NAME="$MSVCR_NAME"
49799  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49800  METHOD="devkit"
49801  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49802    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49803$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49804
49805    # Need to check if the found msvcr is correct architecture
49806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49807$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49808    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49810      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49811      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49812      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49813        CORRECT_MSVCR_ARCH="PE32 executable"
49814      else
49815        CORRECT_MSVCR_ARCH="PE32+ executable"
49816      fi
49817    else
49818      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49819        CORRECT_MSVCR_ARCH=386
49820      else
49821        CORRECT_MSVCR_ARCH=x86-64
49822      fi
49823    fi
49824    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49826$as_echo "ok" >&6; }
49827      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49828
49829  # Only process if variable expands to non-empty
49830
49831  if test "x$MSVC_DLL" != x; then
49832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49833
49834  # Input might be given as Windows format, start by converting to
49835  # unix format.
49836  path="$MSVC_DLL"
49837  new_path=`$CYGPATH -u "$path"`
49838
49839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49842  # "foo.exe" is OK but "foo" is an error.
49843  #
49844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49845  # It is also a way to make sure we got the proper file name for the real test later on.
49846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49847  if test "x$test_shortpath" = x; then
49848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49849$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49850    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49851  fi
49852
49853  # Call helper function which possibly converts this using DOS-style short mode.
49854  # If so, the updated path is stored in $new_path.
49855
49856  input_path="$new_path"
49857  # Check if we need to convert this using DOS-style short mode. If the path
49858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49859  # take no chances and rewrite it.
49860  # Note: m4 eats our [], so we need to use [ and ] instead.
49861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49862  if test "x$has_forbidden_chars" != x; then
49863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49867      # Going to short mode and back again did indeed matter. Since short mode is
49868      # case insensitive, let's make it lowercase to improve readability.
49869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49870      # Now convert it back to Unix-style (cygpath)
49871      input_path=`$CYGPATH -u "$shortmode_path"`
49872      new_path="$input_path"
49873    fi
49874  fi
49875
49876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49877  if test "x$test_cygdrive_prefix" = x; then
49878    # As a simple fix, exclude /usr/bin since it's not a real path.
49879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49881      # a path prefixed by /cygdrive for fixpath to work.
49882      new_path="$CYGWIN_ROOT_PATH$input_path"
49883    fi
49884  fi
49885
49886
49887  if test "x$path" != "x$new_path"; then
49888    MSVC_DLL="$new_path"
49889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49890$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49891  fi
49892
49893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49894
49895  path="$MSVC_DLL"
49896  has_colon=`$ECHO $path | $GREP ^.:`
49897  new_path="$path"
49898  if test "x$has_colon" = x; then
49899    # Not in mixed or Windows style, start by that.
49900    new_path=`cmd //c echo $path`
49901  fi
49902
49903
49904  input_path="$new_path"
49905  # Check if we need to convert this using DOS-style short mode. If the path
49906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49907  # take no chances and rewrite it.
49908  # Note: m4 eats our [], so we need to use [ and ] instead.
49909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49910  if test "x$has_forbidden_chars" != x; then
49911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49913  fi
49914
49915
49916  windows_path="$new_path"
49917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49918    unix_path=`$CYGPATH -u "$windows_path"`
49919    new_path="$unix_path"
49920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49922    new_path="$unix_path"
49923  fi
49924
49925  if test "x$path" != "x$new_path"; then
49926    MSVC_DLL="$new_path"
49927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49928$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49929  fi
49930
49931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49933
49934    else
49935      # We're on a unix platform. Hooray! :)
49936      path="$MSVC_DLL"
49937      has_space=`$ECHO "$path" | $GREP " "`
49938      if test "x$has_space" != x; then
49939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49940$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49942      fi
49943
49944      # Use eval to expand a potential ~
49945      eval path="$path"
49946      if test ! -f "$path" && test ! -d "$path"; then
49947        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49948      fi
49949
49950      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49951    fi
49952  fi
49953
49954      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49955$as_echo_n "checking for $DLL_NAME... " >&6; }
49956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49957$as_echo "$MSVC_DLL" >&6; }
49958    else
49959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49960$as_echo "incorrect, ignoring" >&6; }
49961      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49962$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49963    fi
49964  fi
49965
49966    if test "x$MSVC_DLL" = x; then
49967      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49968    fi
49969    MSVCR_DLL="$MSVC_DLL"
49970  else
49971
49972  DLL_NAME="${MSVCR_NAME}"
49973  MSVC_DLL=
49974
49975  if test "x$MSVC_DLL" = x; then
49976    # Probe: Using well-known location from Visual Studio 10.0
49977    if test "x$VCINSTALLDIR" != x; then
49978      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49979
49980  windows_path="$CYGWIN_VC_INSTALL_DIR"
49981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49982    unix_path=`$CYGPATH -u "$windows_path"`
49983    CYGWIN_VC_INSTALL_DIR="$unix_path"
49984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49986    CYGWIN_VC_INSTALL_DIR="$unix_path"
49987  fi
49988
49989      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49990        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49991      else
49992        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49993      fi
49994      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49995
49996  DLL_NAME="$DLL_NAME"
49997  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49998  METHOD="well-known location in VCINSTALLDIR"
49999  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50001$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50002
50003    # Need to check if the found msvcr is correct architecture
50004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50005$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50006    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50008      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50009      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50010      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50011        CORRECT_MSVCR_ARCH="PE32 executable"
50012      else
50013        CORRECT_MSVCR_ARCH="PE32+ executable"
50014      fi
50015    else
50016      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50017        CORRECT_MSVCR_ARCH=386
50018      else
50019        CORRECT_MSVCR_ARCH=x86-64
50020      fi
50021    fi
50022    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50024$as_echo "ok" >&6; }
50025      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50026
50027  # Only process if variable expands to non-empty
50028
50029  if test "x$MSVC_DLL" != x; then
50030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50031
50032  # Input might be given as Windows format, start by converting to
50033  # unix format.
50034  path="$MSVC_DLL"
50035  new_path=`$CYGPATH -u "$path"`
50036
50037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50040  # "foo.exe" is OK but "foo" is an error.
50041  #
50042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50043  # It is also a way to make sure we got the proper file name for the real test later on.
50044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50045  if test "x$test_shortpath" = x; then
50046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50047$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50048    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50049  fi
50050
50051  # Call helper function which possibly converts this using DOS-style short mode.
50052  # If so, the updated path is stored in $new_path.
50053
50054  input_path="$new_path"
50055  # Check if we need to convert this using DOS-style short mode. If the path
50056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50057  # take no chances and rewrite it.
50058  # Note: m4 eats our [], so we need to use [ and ] instead.
50059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50060  if test "x$has_forbidden_chars" != x; then
50061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50065      # Going to short mode and back again did indeed matter. Since short mode is
50066      # case insensitive, let's make it lowercase to improve readability.
50067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50068      # Now convert it back to Unix-style (cygpath)
50069      input_path=`$CYGPATH -u "$shortmode_path"`
50070      new_path="$input_path"
50071    fi
50072  fi
50073
50074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50075  if test "x$test_cygdrive_prefix" = x; then
50076    # As a simple fix, exclude /usr/bin since it's not a real path.
50077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50079      # a path prefixed by /cygdrive for fixpath to work.
50080      new_path="$CYGWIN_ROOT_PATH$input_path"
50081    fi
50082  fi
50083
50084
50085  if test "x$path" != "x$new_path"; then
50086    MSVC_DLL="$new_path"
50087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50088$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50089  fi
50090
50091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50092
50093  path="$MSVC_DLL"
50094  has_colon=`$ECHO $path | $GREP ^.:`
50095  new_path="$path"
50096  if test "x$has_colon" = x; then
50097    # Not in mixed or Windows style, start by that.
50098    new_path=`cmd //c echo $path`
50099  fi
50100
50101
50102  input_path="$new_path"
50103  # Check if we need to convert this using DOS-style short mode. If the path
50104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50105  # take no chances and rewrite it.
50106  # Note: m4 eats our [], so we need to use [ and ] instead.
50107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50108  if test "x$has_forbidden_chars" != x; then
50109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50111  fi
50112
50113
50114  windows_path="$new_path"
50115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50116    unix_path=`$CYGPATH -u "$windows_path"`
50117    new_path="$unix_path"
50118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50120    new_path="$unix_path"
50121  fi
50122
50123  if test "x$path" != "x$new_path"; then
50124    MSVC_DLL="$new_path"
50125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50126$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50127  fi
50128
50129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50131
50132    else
50133      # We're on a unix platform. Hooray! :)
50134      path="$MSVC_DLL"
50135      has_space=`$ECHO "$path" | $GREP " "`
50136      if test "x$has_space" != x; then
50137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50138$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50140      fi
50141
50142      # Use eval to expand a potential ~
50143      eval path="$path"
50144      if test ! -f "$path" && test ! -d "$path"; then
50145        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50146      fi
50147
50148      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50149    fi
50150  fi
50151
50152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50153$as_echo_n "checking for $DLL_NAME... " >&6; }
50154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50155$as_echo "$MSVC_DLL" >&6; }
50156    else
50157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50158$as_echo "incorrect, ignoring" >&6; }
50159      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50160$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50161    fi
50162  fi
50163
50164    fi
50165  fi
50166
50167  if test "x$MSVC_DLL" = x; then
50168    # Probe: Check in the Boot JDK directory.
50169    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50170
50171  DLL_NAME="$DLL_NAME"
50172  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50173  METHOD="well-known location in Boot JDK"
50174  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50176$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50177
50178    # Need to check if the found msvcr is correct architecture
50179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50180$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50181    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50183      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50184      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50185      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50186        CORRECT_MSVCR_ARCH="PE32 executable"
50187      else
50188        CORRECT_MSVCR_ARCH="PE32+ executable"
50189      fi
50190    else
50191      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50192        CORRECT_MSVCR_ARCH=386
50193      else
50194        CORRECT_MSVCR_ARCH=x86-64
50195      fi
50196    fi
50197    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50199$as_echo "ok" >&6; }
50200      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50201
50202  # Only process if variable expands to non-empty
50203
50204  if test "x$MSVC_DLL" != x; then
50205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50206
50207  # Input might be given as Windows format, start by converting to
50208  # unix format.
50209  path="$MSVC_DLL"
50210  new_path=`$CYGPATH -u "$path"`
50211
50212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50215  # "foo.exe" is OK but "foo" is an error.
50216  #
50217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50218  # It is also a way to make sure we got the proper file name for the real test later on.
50219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50220  if test "x$test_shortpath" = x; then
50221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50222$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50223    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50224  fi
50225
50226  # Call helper function which possibly converts this using DOS-style short mode.
50227  # If so, the updated path is stored in $new_path.
50228
50229  input_path="$new_path"
50230  # Check if we need to convert this using DOS-style short mode. If the path
50231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50232  # take no chances and rewrite it.
50233  # Note: m4 eats our [], so we need to use [ and ] instead.
50234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50235  if test "x$has_forbidden_chars" != x; then
50236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50240      # Going to short mode and back again did indeed matter. Since short mode is
50241      # case insensitive, let's make it lowercase to improve readability.
50242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50243      # Now convert it back to Unix-style (cygpath)
50244      input_path=`$CYGPATH -u "$shortmode_path"`
50245      new_path="$input_path"
50246    fi
50247  fi
50248
50249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50250  if test "x$test_cygdrive_prefix" = x; then
50251    # As a simple fix, exclude /usr/bin since it's not a real path.
50252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50254      # a path prefixed by /cygdrive for fixpath to work.
50255      new_path="$CYGWIN_ROOT_PATH$input_path"
50256    fi
50257  fi
50258
50259
50260  if test "x$path" != "x$new_path"; then
50261    MSVC_DLL="$new_path"
50262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50263$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50264  fi
50265
50266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50267
50268  path="$MSVC_DLL"
50269  has_colon=`$ECHO $path | $GREP ^.:`
50270  new_path="$path"
50271  if test "x$has_colon" = x; then
50272    # Not in mixed or Windows style, start by that.
50273    new_path=`cmd //c echo $path`
50274  fi
50275
50276
50277  input_path="$new_path"
50278  # Check if we need to convert this using DOS-style short mode. If the path
50279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50280  # take no chances and rewrite it.
50281  # Note: m4 eats our [], so we need to use [ and ] instead.
50282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50283  if test "x$has_forbidden_chars" != x; then
50284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50286  fi
50287
50288
50289  windows_path="$new_path"
50290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50291    unix_path=`$CYGPATH -u "$windows_path"`
50292    new_path="$unix_path"
50293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50295    new_path="$unix_path"
50296  fi
50297
50298  if test "x$path" != "x$new_path"; then
50299    MSVC_DLL="$new_path"
50300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50301$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50302  fi
50303
50304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50306
50307    else
50308      # We're on a unix platform. Hooray! :)
50309      path="$MSVC_DLL"
50310      has_space=`$ECHO "$path" | $GREP " "`
50311      if test "x$has_space" != x; then
50312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50313$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50315      fi
50316
50317      # Use eval to expand a potential ~
50318      eval path="$path"
50319      if test ! -f "$path" && test ! -d "$path"; then
50320        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50321      fi
50322
50323      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50324    fi
50325  fi
50326
50327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50328$as_echo_n "checking for $DLL_NAME... " >&6; }
50329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50330$as_echo "$MSVC_DLL" >&6; }
50331    else
50332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50333$as_echo "incorrect, ignoring" >&6; }
50334      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50335$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50336    fi
50337  fi
50338
50339  fi
50340
50341  if test "x$MSVC_DLL" = x; then
50342    # Probe: Look in the Windows system32 directory
50343    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50344
50345  windows_path="$CYGWIN_SYSTEMROOT"
50346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50347    unix_path=`$CYGPATH -u "$windows_path"`
50348    CYGWIN_SYSTEMROOT="$unix_path"
50349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50351    CYGWIN_SYSTEMROOT="$unix_path"
50352  fi
50353
50354    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50355
50356  DLL_NAME="$DLL_NAME"
50357  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50358  METHOD="well-known location in SYSTEMROOT"
50359  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50360    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50361$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50362
50363    # Need to check if the found msvcr is correct architecture
50364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50365$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50366    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50368      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50369      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50370      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50371        CORRECT_MSVCR_ARCH="PE32 executable"
50372      else
50373        CORRECT_MSVCR_ARCH="PE32+ executable"
50374      fi
50375    else
50376      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50377        CORRECT_MSVCR_ARCH=386
50378      else
50379        CORRECT_MSVCR_ARCH=x86-64
50380      fi
50381    fi
50382    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50384$as_echo "ok" >&6; }
50385      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50386
50387  # Only process if variable expands to non-empty
50388
50389  if test "x$MSVC_DLL" != x; then
50390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50391
50392  # Input might be given as Windows format, start by converting to
50393  # unix format.
50394  path="$MSVC_DLL"
50395  new_path=`$CYGPATH -u "$path"`
50396
50397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50400  # "foo.exe" is OK but "foo" is an error.
50401  #
50402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50403  # It is also a way to make sure we got the proper file name for the real test later on.
50404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50405  if test "x$test_shortpath" = x; then
50406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50407$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50408    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50409  fi
50410
50411  # Call helper function which possibly converts this using DOS-style short mode.
50412  # If so, the updated path is stored in $new_path.
50413
50414  input_path="$new_path"
50415  # Check if we need to convert this using DOS-style short mode. If the path
50416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50417  # take no chances and rewrite it.
50418  # Note: m4 eats our [], so we need to use [ and ] instead.
50419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50420  if test "x$has_forbidden_chars" != x; then
50421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50425      # Going to short mode and back again did indeed matter. Since short mode is
50426      # case insensitive, let's make it lowercase to improve readability.
50427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50428      # Now convert it back to Unix-style (cygpath)
50429      input_path=`$CYGPATH -u "$shortmode_path"`
50430      new_path="$input_path"
50431    fi
50432  fi
50433
50434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50435  if test "x$test_cygdrive_prefix" = x; then
50436    # As a simple fix, exclude /usr/bin since it's not a real path.
50437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50439      # a path prefixed by /cygdrive for fixpath to work.
50440      new_path="$CYGWIN_ROOT_PATH$input_path"
50441    fi
50442  fi
50443
50444
50445  if test "x$path" != "x$new_path"; then
50446    MSVC_DLL="$new_path"
50447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50448$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50449  fi
50450
50451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50452
50453  path="$MSVC_DLL"
50454  has_colon=`$ECHO $path | $GREP ^.:`
50455  new_path="$path"
50456  if test "x$has_colon" = x; then
50457    # Not in mixed or Windows style, start by that.
50458    new_path=`cmd //c echo $path`
50459  fi
50460
50461
50462  input_path="$new_path"
50463  # Check if we need to convert this using DOS-style short mode. If the path
50464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50465  # take no chances and rewrite it.
50466  # Note: m4 eats our [], so we need to use [ and ] instead.
50467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50468  if test "x$has_forbidden_chars" != x; then
50469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50471  fi
50472
50473
50474  windows_path="$new_path"
50475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50476    unix_path=`$CYGPATH -u "$windows_path"`
50477    new_path="$unix_path"
50478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50480    new_path="$unix_path"
50481  fi
50482
50483  if test "x$path" != "x$new_path"; then
50484    MSVC_DLL="$new_path"
50485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50486$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50487  fi
50488
50489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50491
50492    else
50493      # We're on a unix platform. Hooray! :)
50494      path="$MSVC_DLL"
50495      has_space=`$ECHO "$path" | $GREP " "`
50496      if test "x$has_space" != x; then
50497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50498$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50500      fi
50501
50502      # Use eval to expand a potential ~
50503      eval path="$path"
50504      if test ! -f "$path" && test ! -d "$path"; then
50505        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50506      fi
50507
50508      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50509    fi
50510  fi
50511
50512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50513$as_echo_n "checking for $DLL_NAME... " >&6; }
50514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50515$as_echo "$MSVC_DLL" >&6; }
50516    else
50517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50518$as_echo "incorrect, ignoring" >&6; }
50519      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50520$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50521    fi
50522  fi
50523
50524  fi
50525
50526  if test "x$MSVC_DLL" = x; then
50527    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50528    if test "x$VS100COMNTOOLS" != x; then
50529      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50530
50531  windows_path="$CYGWIN_VS_TOOLS_DIR"
50532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50533    unix_path=`$CYGPATH -u "$windows_path"`
50534    CYGWIN_VS_TOOLS_DIR="$unix_path"
50535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50537    CYGWIN_VS_TOOLS_DIR="$unix_path"
50538  fi
50539
50540      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50541        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50542	    | $GREP -i /x64/ | $HEAD --lines 1`
50543      else
50544        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50545	    | $GREP -i /x86/ | $HEAD --lines 1`
50546      fi
50547
50548  DLL_NAME="$DLL_NAME"
50549  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50550  METHOD="search of VS100COMNTOOLS"
50551  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50553$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50554
50555    # Need to check if the found msvcr is correct architecture
50556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50557$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50558    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50560      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50561      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50562      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50563        CORRECT_MSVCR_ARCH="PE32 executable"
50564      else
50565        CORRECT_MSVCR_ARCH="PE32+ executable"
50566      fi
50567    else
50568      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50569        CORRECT_MSVCR_ARCH=386
50570      else
50571        CORRECT_MSVCR_ARCH=x86-64
50572      fi
50573    fi
50574    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50576$as_echo "ok" >&6; }
50577      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50578
50579  # Only process if variable expands to non-empty
50580
50581  if test "x$MSVC_DLL" != x; then
50582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50583
50584  # Input might be given as Windows format, start by converting to
50585  # unix format.
50586  path="$MSVC_DLL"
50587  new_path=`$CYGPATH -u "$path"`
50588
50589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50592  # "foo.exe" is OK but "foo" is an error.
50593  #
50594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50595  # It is also a way to make sure we got the proper file name for the real test later on.
50596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50597  if test "x$test_shortpath" = x; then
50598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50599$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50600    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50601  fi
50602
50603  # Call helper function which possibly converts this using DOS-style short mode.
50604  # If so, the updated path is stored in $new_path.
50605
50606  input_path="$new_path"
50607  # Check if we need to convert this using DOS-style short mode. If the path
50608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50609  # take no chances and rewrite it.
50610  # Note: m4 eats our [], so we need to use [ and ] instead.
50611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50612  if test "x$has_forbidden_chars" != x; then
50613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50617      # Going to short mode and back again did indeed matter. Since short mode is
50618      # case insensitive, let's make it lowercase to improve readability.
50619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50620      # Now convert it back to Unix-style (cygpath)
50621      input_path=`$CYGPATH -u "$shortmode_path"`
50622      new_path="$input_path"
50623    fi
50624  fi
50625
50626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50627  if test "x$test_cygdrive_prefix" = x; then
50628    # As a simple fix, exclude /usr/bin since it's not a real path.
50629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50631      # a path prefixed by /cygdrive for fixpath to work.
50632      new_path="$CYGWIN_ROOT_PATH$input_path"
50633    fi
50634  fi
50635
50636
50637  if test "x$path" != "x$new_path"; then
50638    MSVC_DLL="$new_path"
50639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50640$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50641  fi
50642
50643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50644
50645  path="$MSVC_DLL"
50646  has_colon=`$ECHO $path | $GREP ^.:`
50647  new_path="$path"
50648  if test "x$has_colon" = x; then
50649    # Not in mixed or Windows style, start by that.
50650    new_path=`cmd //c echo $path`
50651  fi
50652
50653
50654  input_path="$new_path"
50655  # Check if we need to convert this using DOS-style short mode. If the path
50656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50657  # take no chances and rewrite it.
50658  # Note: m4 eats our [], so we need to use [ and ] instead.
50659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50660  if test "x$has_forbidden_chars" != x; then
50661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50663  fi
50664
50665
50666  windows_path="$new_path"
50667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50668    unix_path=`$CYGPATH -u "$windows_path"`
50669    new_path="$unix_path"
50670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50672    new_path="$unix_path"
50673  fi
50674
50675  if test "x$path" != "x$new_path"; then
50676    MSVC_DLL="$new_path"
50677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50678$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50679  fi
50680
50681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50683
50684    else
50685      # We're on a unix platform. Hooray! :)
50686      path="$MSVC_DLL"
50687      has_space=`$ECHO "$path" | $GREP " "`
50688      if test "x$has_space" != x; then
50689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50690$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50691        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50692      fi
50693
50694      # Use eval to expand a potential ~
50695      eval path="$path"
50696      if test ! -f "$path" && test ! -d "$path"; then
50697        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50698      fi
50699
50700      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50701    fi
50702  fi
50703
50704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50705$as_echo_n "checking for $DLL_NAME... " >&6; }
50706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50707$as_echo "$MSVC_DLL" >&6; }
50708    else
50709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50710$as_echo "incorrect, ignoring" >&6; }
50711      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50712$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50713    fi
50714  fi
50715
50716    fi
50717  fi
50718
50719  if test "x$MSVC_DLL" = x; then
50720    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50721    # (This was the original behaviour; kept since it might turn something up)
50722    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50723      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50724        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50725	    | $GREP x64 | $HEAD --lines 1`
50726      else
50727        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50728	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50729        if test "x$POSSIBLE_MSVC_DLL" = x; then
50730          # We're grasping at straws now...
50731          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50732	      | $HEAD --lines 1`
50733        fi
50734      fi
50735
50736
50737  DLL_NAME="$DLL_NAME"
50738  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50739  METHOD="search of VCINSTALLDIR"
50740  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50742$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50743
50744    # Need to check if the found msvcr is correct architecture
50745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50746$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50747    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50749      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50750      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50751      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50752        CORRECT_MSVCR_ARCH="PE32 executable"
50753      else
50754        CORRECT_MSVCR_ARCH="PE32+ executable"
50755      fi
50756    else
50757      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50758        CORRECT_MSVCR_ARCH=386
50759      else
50760        CORRECT_MSVCR_ARCH=x86-64
50761      fi
50762    fi
50763    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50765$as_echo "ok" >&6; }
50766      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50767
50768  # Only process if variable expands to non-empty
50769
50770  if test "x$MSVC_DLL" != x; then
50771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50772
50773  # Input might be given as Windows format, start by converting to
50774  # unix format.
50775  path="$MSVC_DLL"
50776  new_path=`$CYGPATH -u "$path"`
50777
50778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50781  # "foo.exe" is OK but "foo" is an error.
50782  #
50783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50784  # It is also a way to make sure we got the proper file name for the real test later on.
50785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50786  if test "x$test_shortpath" = x; then
50787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50788$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50789    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50790  fi
50791
50792  # Call helper function which possibly converts this using DOS-style short mode.
50793  # If so, the updated path is stored in $new_path.
50794
50795  input_path="$new_path"
50796  # Check if we need to convert this using DOS-style short mode. If the path
50797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50798  # take no chances and rewrite it.
50799  # Note: m4 eats our [], so we need to use [ and ] instead.
50800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50801  if test "x$has_forbidden_chars" != x; then
50802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50806      # Going to short mode and back again did indeed matter. Since short mode is
50807      # case insensitive, let's make it lowercase to improve readability.
50808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50809      # Now convert it back to Unix-style (cygpath)
50810      input_path=`$CYGPATH -u "$shortmode_path"`
50811      new_path="$input_path"
50812    fi
50813  fi
50814
50815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50816  if test "x$test_cygdrive_prefix" = x; then
50817    # As a simple fix, exclude /usr/bin since it's not a real path.
50818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50820      # a path prefixed by /cygdrive for fixpath to work.
50821      new_path="$CYGWIN_ROOT_PATH$input_path"
50822    fi
50823  fi
50824
50825
50826  if test "x$path" != "x$new_path"; then
50827    MSVC_DLL="$new_path"
50828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50829$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50830  fi
50831
50832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50833
50834  path="$MSVC_DLL"
50835  has_colon=`$ECHO $path | $GREP ^.:`
50836  new_path="$path"
50837  if test "x$has_colon" = x; then
50838    # Not in mixed or Windows style, start by that.
50839    new_path=`cmd //c echo $path`
50840  fi
50841
50842
50843  input_path="$new_path"
50844  # Check if we need to convert this using DOS-style short mode. If the path
50845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50846  # take no chances and rewrite it.
50847  # Note: m4 eats our [], so we need to use [ and ] instead.
50848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50849  if test "x$has_forbidden_chars" != x; then
50850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50852  fi
50853
50854
50855  windows_path="$new_path"
50856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50857    unix_path=`$CYGPATH -u "$windows_path"`
50858    new_path="$unix_path"
50859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50861    new_path="$unix_path"
50862  fi
50863
50864  if test "x$path" != "x$new_path"; then
50865    MSVC_DLL="$new_path"
50866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50867$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50868  fi
50869
50870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50872
50873    else
50874      # We're on a unix platform. Hooray! :)
50875      path="$MSVC_DLL"
50876      has_space=`$ECHO "$path" | $GREP " "`
50877      if test "x$has_space" != x; then
50878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50879$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50881      fi
50882
50883      # Use eval to expand a potential ~
50884      eval path="$path"
50885      if test ! -f "$path" && test ! -d "$path"; then
50886        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50887      fi
50888
50889      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50890    fi
50891  fi
50892
50893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50894$as_echo_n "checking for $DLL_NAME... " >&6; }
50895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50896$as_echo "$MSVC_DLL" >&6; }
50897    else
50898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50899$as_echo "incorrect, ignoring" >&6; }
50900      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50901$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50902    fi
50903  fi
50904
50905    fi
50906  fi
50907
50908  if test "x$MSVC_DLL" = x; then
50909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50910$as_echo_n "checking for $DLL_NAME... " >&6; }
50911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50912$as_echo "no" >&6; }
50913    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50914  fi
50915
50916    MSVCR_DLL="$MSVC_DLL"
50917  fi
50918
50919
50920
50921# Check whether --with-msvcp-dll was given.
50922if test "${with_msvcp_dll+set}" = set; then :
50923  withval=$with_msvcp_dll;
50924fi
50925
50926
50927  if test "x$MSVCP_NAME" != "x"; then
50928    if test "x$with_msvcp_dll" != x; then
50929      # If given explicitely by user, do not probe. If not present, fail directly.
50930
50931  DLL_NAME="$MSVCP_NAME"
50932  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50933  METHOD="--with-msvcp-dll"
50934  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50935    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50936$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50937
50938    # Need to check if the found msvcr is correct architecture
50939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50940$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50941    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50942    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50943      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50944      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50945      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50946        CORRECT_MSVCR_ARCH="PE32 executable"
50947      else
50948        CORRECT_MSVCR_ARCH="PE32+ executable"
50949      fi
50950    else
50951      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50952        CORRECT_MSVCR_ARCH=386
50953      else
50954        CORRECT_MSVCR_ARCH=x86-64
50955      fi
50956    fi
50957    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50959$as_echo "ok" >&6; }
50960      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50961
50962  # Only process if variable expands to non-empty
50963
50964  if test "x$MSVC_DLL" != x; then
50965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50966
50967  # Input might be given as Windows format, start by converting to
50968  # unix format.
50969  path="$MSVC_DLL"
50970  new_path=`$CYGPATH -u "$path"`
50971
50972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50975  # "foo.exe" is OK but "foo" is an error.
50976  #
50977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50978  # It is also a way to make sure we got the proper file name for the real test later on.
50979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50980  if test "x$test_shortpath" = x; then
50981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50982$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50983    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50984  fi
50985
50986  # Call helper function which possibly converts this using DOS-style short mode.
50987  # If so, the updated path is stored in $new_path.
50988
50989  input_path="$new_path"
50990  # Check if we need to convert this using DOS-style short mode. If the path
50991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50992  # take no chances and rewrite it.
50993  # Note: m4 eats our [], so we need to use [ and ] instead.
50994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50995  if test "x$has_forbidden_chars" != x; then
50996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51000      # Going to short mode and back again did indeed matter. Since short mode is
51001      # case insensitive, let's make it lowercase to improve readability.
51002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51003      # Now convert it back to Unix-style (cygpath)
51004      input_path=`$CYGPATH -u "$shortmode_path"`
51005      new_path="$input_path"
51006    fi
51007  fi
51008
51009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51010  if test "x$test_cygdrive_prefix" = x; then
51011    # As a simple fix, exclude /usr/bin since it's not a real path.
51012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51014      # a path prefixed by /cygdrive for fixpath to work.
51015      new_path="$CYGWIN_ROOT_PATH$input_path"
51016    fi
51017  fi
51018
51019
51020  if test "x$path" != "x$new_path"; then
51021    MSVC_DLL="$new_path"
51022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51023$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51024  fi
51025
51026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51027
51028  path="$MSVC_DLL"
51029  has_colon=`$ECHO $path | $GREP ^.:`
51030  new_path="$path"
51031  if test "x$has_colon" = x; then
51032    # Not in mixed or Windows style, start by that.
51033    new_path=`cmd //c echo $path`
51034  fi
51035
51036
51037  input_path="$new_path"
51038  # Check if we need to convert this using DOS-style short mode. If the path
51039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51040  # take no chances and rewrite it.
51041  # Note: m4 eats our [], so we need to use [ and ] instead.
51042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51043  if test "x$has_forbidden_chars" != x; then
51044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51046  fi
51047
51048
51049  windows_path="$new_path"
51050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51051    unix_path=`$CYGPATH -u "$windows_path"`
51052    new_path="$unix_path"
51053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51055    new_path="$unix_path"
51056  fi
51057
51058  if test "x$path" != "x$new_path"; then
51059    MSVC_DLL="$new_path"
51060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51061$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51062  fi
51063
51064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51066
51067    else
51068      # We're on a unix platform. Hooray! :)
51069      path="$MSVC_DLL"
51070      has_space=`$ECHO "$path" | $GREP " "`
51071      if test "x$has_space" != x; then
51072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51073$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51074        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51075      fi
51076
51077      # Use eval to expand a potential ~
51078      eval path="$path"
51079      if test ! -f "$path" && test ! -d "$path"; then
51080        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51081      fi
51082
51083      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51084    fi
51085  fi
51086
51087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51088$as_echo_n "checking for $DLL_NAME... " >&6; }
51089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51090$as_echo "$MSVC_DLL" >&6; }
51091    else
51092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51093$as_echo "incorrect, ignoring" >&6; }
51094      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51095$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51096    fi
51097  fi
51098
51099      if test "x$MSVC_DLL" = x; then
51100        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51101      fi
51102      MSVCP_DLL="$MSVC_DLL"
51103    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51104
51105  DLL_NAME="$MSVCP_NAME"
51106  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51107  METHOD="devkit"
51108  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51109    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51110$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51111
51112    # Need to check if the found msvcr is correct architecture
51113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51114$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51115    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51117      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51118      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51119      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51120        CORRECT_MSVCR_ARCH="PE32 executable"
51121      else
51122        CORRECT_MSVCR_ARCH="PE32+ executable"
51123      fi
51124    else
51125      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51126        CORRECT_MSVCR_ARCH=386
51127      else
51128        CORRECT_MSVCR_ARCH=x86-64
51129      fi
51130    fi
51131    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51133$as_echo "ok" >&6; }
51134      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51135
51136  # Only process if variable expands to non-empty
51137
51138  if test "x$MSVC_DLL" != x; then
51139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51140
51141  # Input might be given as Windows format, start by converting to
51142  # unix format.
51143  path="$MSVC_DLL"
51144  new_path=`$CYGPATH -u "$path"`
51145
51146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51149  # "foo.exe" is OK but "foo" is an error.
51150  #
51151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51152  # It is also a way to make sure we got the proper file name for the real test later on.
51153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51154  if test "x$test_shortpath" = x; then
51155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51156$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51157    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51158  fi
51159
51160  # Call helper function which possibly converts this using DOS-style short mode.
51161  # If so, the updated path is stored in $new_path.
51162
51163  input_path="$new_path"
51164  # Check if we need to convert this using DOS-style short mode. If the path
51165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51166  # take no chances and rewrite it.
51167  # Note: m4 eats our [], so we need to use [ and ] instead.
51168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51169  if test "x$has_forbidden_chars" != x; then
51170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51174      # Going to short mode and back again did indeed matter. Since short mode is
51175      # case insensitive, let's make it lowercase to improve readability.
51176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51177      # Now convert it back to Unix-style (cygpath)
51178      input_path=`$CYGPATH -u "$shortmode_path"`
51179      new_path="$input_path"
51180    fi
51181  fi
51182
51183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51184  if test "x$test_cygdrive_prefix" = x; then
51185    # As a simple fix, exclude /usr/bin since it's not a real path.
51186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51188      # a path prefixed by /cygdrive for fixpath to work.
51189      new_path="$CYGWIN_ROOT_PATH$input_path"
51190    fi
51191  fi
51192
51193
51194  if test "x$path" != "x$new_path"; then
51195    MSVC_DLL="$new_path"
51196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51197$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51198  fi
51199
51200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51201
51202  path="$MSVC_DLL"
51203  has_colon=`$ECHO $path | $GREP ^.:`
51204  new_path="$path"
51205  if test "x$has_colon" = x; then
51206    # Not in mixed or Windows style, start by that.
51207    new_path=`cmd //c echo $path`
51208  fi
51209
51210
51211  input_path="$new_path"
51212  # Check if we need to convert this using DOS-style short mode. If the path
51213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51214  # take no chances and rewrite it.
51215  # Note: m4 eats our [], so we need to use [ and ] instead.
51216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51217  if test "x$has_forbidden_chars" != x; then
51218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51220  fi
51221
51222
51223  windows_path="$new_path"
51224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51225    unix_path=`$CYGPATH -u "$windows_path"`
51226    new_path="$unix_path"
51227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51229    new_path="$unix_path"
51230  fi
51231
51232  if test "x$path" != "x$new_path"; then
51233    MSVC_DLL="$new_path"
51234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51235$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51236  fi
51237
51238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51240
51241    else
51242      # We're on a unix platform. Hooray! :)
51243      path="$MSVC_DLL"
51244      has_space=`$ECHO "$path" | $GREP " "`
51245      if test "x$has_space" != x; then
51246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51247$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51249      fi
51250
51251      # Use eval to expand a potential ~
51252      eval path="$path"
51253      if test ! -f "$path" && test ! -d "$path"; then
51254        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51255      fi
51256
51257      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51258    fi
51259  fi
51260
51261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51262$as_echo_n "checking for $DLL_NAME... " >&6; }
51263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51264$as_echo "$MSVC_DLL" >&6; }
51265    else
51266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51267$as_echo "incorrect, ignoring" >&6; }
51268      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51269$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51270    fi
51271  fi
51272
51273      if test "x$MSVC_DLL" = x; then
51274        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51275      fi
51276      MSVCP_DLL="$MSVC_DLL"
51277    else
51278
51279  DLL_NAME="${MSVCP_NAME}"
51280  MSVC_DLL=
51281
51282  if test "x$MSVC_DLL" = x; then
51283    # Probe: Using well-known location from Visual Studio 10.0
51284    if test "x$VCINSTALLDIR" != x; then
51285      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51286
51287  windows_path="$CYGWIN_VC_INSTALL_DIR"
51288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51289    unix_path=`$CYGPATH -u "$windows_path"`
51290    CYGWIN_VC_INSTALL_DIR="$unix_path"
51291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51293    CYGWIN_VC_INSTALL_DIR="$unix_path"
51294  fi
51295
51296      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51297        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51298      else
51299        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51300      fi
51301      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51302
51303  DLL_NAME="$DLL_NAME"
51304  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51305  METHOD="well-known location in VCINSTALLDIR"
51306  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51307    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51308$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51309
51310    # Need to check if the found msvcr is correct architecture
51311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51312$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51313    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51315      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51316      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51317      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51318        CORRECT_MSVCR_ARCH="PE32 executable"
51319      else
51320        CORRECT_MSVCR_ARCH="PE32+ executable"
51321      fi
51322    else
51323      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51324        CORRECT_MSVCR_ARCH=386
51325      else
51326        CORRECT_MSVCR_ARCH=x86-64
51327      fi
51328    fi
51329    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51331$as_echo "ok" >&6; }
51332      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51333
51334  # Only process if variable expands to non-empty
51335
51336  if test "x$MSVC_DLL" != x; then
51337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51338
51339  # Input might be given as Windows format, start by converting to
51340  # unix format.
51341  path="$MSVC_DLL"
51342  new_path=`$CYGPATH -u "$path"`
51343
51344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51347  # "foo.exe" is OK but "foo" is an error.
51348  #
51349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51350  # It is also a way to make sure we got the proper file name for the real test later on.
51351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51352  if test "x$test_shortpath" = x; then
51353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51354$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51355    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51356  fi
51357
51358  # Call helper function which possibly converts this using DOS-style short mode.
51359  # If so, the updated path is stored in $new_path.
51360
51361  input_path="$new_path"
51362  # Check if we need to convert this using DOS-style short mode. If the path
51363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51364  # take no chances and rewrite it.
51365  # Note: m4 eats our [], so we need to use [ and ] instead.
51366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51367  if test "x$has_forbidden_chars" != x; then
51368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51372      # Going to short mode and back again did indeed matter. Since short mode is
51373      # case insensitive, let's make it lowercase to improve readability.
51374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51375      # Now convert it back to Unix-style (cygpath)
51376      input_path=`$CYGPATH -u "$shortmode_path"`
51377      new_path="$input_path"
51378    fi
51379  fi
51380
51381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51382  if test "x$test_cygdrive_prefix" = x; then
51383    # As a simple fix, exclude /usr/bin since it's not a real path.
51384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51386      # a path prefixed by /cygdrive for fixpath to work.
51387      new_path="$CYGWIN_ROOT_PATH$input_path"
51388    fi
51389  fi
51390
51391
51392  if test "x$path" != "x$new_path"; then
51393    MSVC_DLL="$new_path"
51394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51395$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51396  fi
51397
51398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51399
51400  path="$MSVC_DLL"
51401  has_colon=`$ECHO $path | $GREP ^.:`
51402  new_path="$path"
51403  if test "x$has_colon" = x; then
51404    # Not in mixed or Windows style, start by that.
51405    new_path=`cmd //c echo $path`
51406  fi
51407
51408
51409  input_path="$new_path"
51410  # Check if we need to convert this using DOS-style short mode. If the path
51411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51412  # take no chances and rewrite it.
51413  # Note: m4 eats our [], so we need to use [ and ] instead.
51414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51415  if test "x$has_forbidden_chars" != x; then
51416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51418  fi
51419
51420
51421  windows_path="$new_path"
51422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51423    unix_path=`$CYGPATH -u "$windows_path"`
51424    new_path="$unix_path"
51425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51427    new_path="$unix_path"
51428  fi
51429
51430  if test "x$path" != "x$new_path"; then
51431    MSVC_DLL="$new_path"
51432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51433$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51434  fi
51435
51436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51438
51439    else
51440      # We're on a unix platform. Hooray! :)
51441      path="$MSVC_DLL"
51442      has_space=`$ECHO "$path" | $GREP " "`
51443      if test "x$has_space" != x; then
51444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51445$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51447      fi
51448
51449      # Use eval to expand a potential ~
51450      eval path="$path"
51451      if test ! -f "$path" && test ! -d "$path"; then
51452        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51453      fi
51454
51455      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51456    fi
51457  fi
51458
51459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51460$as_echo_n "checking for $DLL_NAME... " >&6; }
51461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51462$as_echo "$MSVC_DLL" >&6; }
51463    else
51464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51465$as_echo "incorrect, ignoring" >&6; }
51466      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51467$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51468    fi
51469  fi
51470
51471    fi
51472  fi
51473
51474  if test "x$MSVC_DLL" = x; then
51475    # Probe: Check in the Boot JDK directory.
51476    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51477
51478  DLL_NAME="$DLL_NAME"
51479  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51480  METHOD="well-known location in Boot JDK"
51481  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51483$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51484
51485    # Need to check if the found msvcr is correct architecture
51486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51487$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51488    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51490      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51491      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51492      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51493        CORRECT_MSVCR_ARCH="PE32 executable"
51494      else
51495        CORRECT_MSVCR_ARCH="PE32+ executable"
51496      fi
51497    else
51498      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51499        CORRECT_MSVCR_ARCH=386
51500      else
51501        CORRECT_MSVCR_ARCH=x86-64
51502      fi
51503    fi
51504    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51506$as_echo "ok" >&6; }
51507      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51508
51509  # Only process if variable expands to non-empty
51510
51511  if test "x$MSVC_DLL" != x; then
51512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51513
51514  # Input might be given as Windows format, start by converting to
51515  # unix format.
51516  path="$MSVC_DLL"
51517  new_path=`$CYGPATH -u "$path"`
51518
51519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51522  # "foo.exe" is OK but "foo" is an error.
51523  #
51524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51525  # It is also a way to make sure we got the proper file name for the real test later on.
51526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51527  if test "x$test_shortpath" = x; then
51528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51529$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51530    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51531  fi
51532
51533  # Call helper function which possibly converts this using DOS-style short mode.
51534  # If so, the updated path is stored in $new_path.
51535
51536  input_path="$new_path"
51537  # Check if we need to convert this using DOS-style short mode. If the path
51538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51539  # take no chances and rewrite it.
51540  # Note: m4 eats our [], so we need to use [ and ] instead.
51541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51542  if test "x$has_forbidden_chars" != x; then
51543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51547      # Going to short mode and back again did indeed matter. Since short mode is
51548      # case insensitive, let's make it lowercase to improve readability.
51549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51550      # Now convert it back to Unix-style (cygpath)
51551      input_path=`$CYGPATH -u "$shortmode_path"`
51552      new_path="$input_path"
51553    fi
51554  fi
51555
51556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51557  if test "x$test_cygdrive_prefix" = x; then
51558    # As a simple fix, exclude /usr/bin since it's not a real path.
51559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51561      # a path prefixed by /cygdrive for fixpath to work.
51562      new_path="$CYGWIN_ROOT_PATH$input_path"
51563    fi
51564  fi
51565
51566
51567  if test "x$path" != "x$new_path"; then
51568    MSVC_DLL="$new_path"
51569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51570$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51571  fi
51572
51573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51574
51575  path="$MSVC_DLL"
51576  has_colon=`$ECHO $path | $GREP ^.:`
51577  new_path="$path"
51578  if test "x$has_colon" = x; then
51579    # Not in mixed or Windows style, start by that.
51580    new_path=`cmd //c echo $path`
51581  fi
51582
51583
51584  input_path="$new_path"
51585  # Check if we need to convert this using DOS-style short mode. If the path
51586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51587  # take no chances and rewrite it.
51588  # Note: m4 eats our [], so we need to use [ and ] instead.
51589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51590  if test "x$has_forbidden_chars" != x; then
51591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51593  fi
51594
51595
51596  windows_path="$new_path"
51597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51598    unix_path=`$CYGPATH -u "$windows_path"`
51599    new_path="$unix_path"
51600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51602    new_path="$unix_path"
51603  fi
51604
51605  if test "x$path" != "x$new_path"; then
51606    MSVC_DLL="$new_path"
51607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51608$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51609  fi
51610
51611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51613
51614    else
51615      # We're on a unix platform. Hooray! :)
51616      path="$MSVC_DLL"
51617      has_space=`$ECHO "$path" | $GREP " "`
51618      if test "x$has_space" != x; then
51619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51620$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51622      fi
51623
51624      # Use eval to expand a potential ~
51625      eval path="$path"
51626      if test ! -f "$path" && test ! -d "$path"; then
51627        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51628      fi
51629
51630      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51631    fi
51632  fi
51633
51634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51635$as_echo_n "checking for $DLL_NAME... " >&6; }
51636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51637$as_echo "$MSVC_DLL" >&6; }
51638    else
51639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51640$as_echo "incorrect, ignoring" >&6; }
51641      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51642$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51643    fi
51644  fi
51645
51646  fi
51647
51648  if test "x$MSVC_DLL" = x; then
51649    # Probe: Look in the Windows system32 directory
51650    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51651
51652  windows_path="$CYGWIN_SYSTEMROOT"
51653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51654    unix_path=`$CYGPATH -u "$windows_path"`
51655    CYGWIN_SYSTEMROOT="$unix_path"
51656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51658    CYGWIN_SYSTEMROOT="$unix_path"
51659  fi
51660
51661    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51662
51663  DLL_NAME="$DLL_NAME"
51664  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51665  METHOD="well-known location in SYSTEMROOT"
51666  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51667    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51668$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51669
51670    # Need to check if the found msvcr is correct architecture
51671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51672$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51673    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51675      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51676      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51677      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51678        CORRECT_MSVCR_ARCH="PE32 executable"
51679      else
51680        CORRECT_MSVCR_ARCH="PE32+ executable"
51681      fi
51682    else
51683      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51684        CORRECT_MSVCR_ARCH=386
51685      else
51686        CORRECT_MSVCR_ARCH=x86-64
51687      fi
51688    fi
51689    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51691$as_echo "ok" >&6; }
51692      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51693
51694  # Only process if variable expands to non-empty
51695
51696  if test "x$MSVC_DLL" != x; then
51697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51698
51699  # Input might be given as Windows format, start by converting to
51700  # unix format.
51701  path="$MSVC_DLL"
51702  new_path=`$CYGPATH -u "$path"`
51703
51704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51707  # "foo.exe" is OK but "foo" is an error.
51708  #
51709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51710  # It is also a way to make sure we got the proper file name for the real test later on.
51711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51712  if test "x$test_shortpath" = x; then
51713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51714$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51715    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51716  fi
51717
51718  # Call helper function which possibly converts this using DOS-style short mode.
51719  # If so, the updated path is stored in $new_path.
51720
51721  input_path="$new_path"
51722  # Check if we need to convert this using DOS-style short mode. If the path
51723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51724  # take no chances and rewrite it.
51725  # Note: m4 eats our [], so we need to use [ and ] instead.
51726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51727  if test "x$has_forbidden_chars" != x; then
51728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51732      # Going to short mode and back again did indeed matter. Since short mode is
51733      # case insensitive, let's make it lowercase to improve readability.
51734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51735      # Now convert it back to Unix-style (cygpath)
51736      input_path=`$CYGPATH -u "$shortmode_path"`
51737      new_path="$input_path"
51738    fi
51739  fi
51740
51741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51742  if test "x$test_cygdrive_prefix" = x; then
51743    # As a simple fix, exclude /usr/bin since it's not a real path.
51744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51746      # a path prefixed by /cygdrive for fixpath to work.
51747      new_path="$CYGWIN_ROOT_PATH$input_path"
51748    fi
51749  fi
51750
51751
51752  if test "x$path" != "x$new_path"; then
51753    MSVC_DLL="$new_path"
51754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51755$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51756  fi
51757
51758    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51759
51760  path="$MSVC_DLL"
51761  has_colon=`$ECHO $path | $GREP ^.:`
51762  new_path="$path"
51763  if test "x$has_colon" = x; then
51764    # Not in mixed or Windows style, start by that.
51765    new_path=`cmd //c echo $path`
51766  fi
51767
51768
51769  input_path="$new_path"
51770  # Check if we need to convert this using DOS-style short mode. If the path
51771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51772  # take no chances and rewrite it.
51773  # Note: m4 eats our [], so we need to use [ and ] instead.
51774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51775  if test "x$has_forbidden_chars" != x; then
51776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51778  fi
51779
51780
51781  windows_path="$new_path"
51782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51783    unix_path=`$CYGPATH -u "$windows_path"`
51784    new_path="$unix_path"
51785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51787    new_path="$unix_path"
51788  fi
51789
51790  if test "x$path" != "x$new_path"; then
51791    MSVC_DLL="$new_path"
51792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51793$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51794  fi
51795
51796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51798
51799    else
51800      # We're on a unix platform. Hooray! :)
51801      path="$MSVC_DLL"
51802      has_space=`$ECHO "$path" | $GREP " "`
51803      if test "x$has_space" != x; then
51804        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51805$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51806        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51807      fi
51808
51809      # Use eval to expand a potential ~
51810      eval path="$path"
51811      if test ! -f "$path" && test ! -d "$path"; then
51812        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51813      fi
51814
51815      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51816    fi
51817  fi
51818
51819      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51820$as_echo_n "checking for $DLL_NAME... " >&6; }
51821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51822$as_echo "$MSVC_DLL" >&6; }
51823    else
51824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51825$as_echo "incorrect, ignoring" >&6; }
51826      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51827$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51828    fi
51829  fi
51830
51831  fi
51832
51833  if test "x$MSVC_DLL" = x; then
51834    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51835    if test "x$VS100COMNTOOLS" != x; then
51836      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51837
51838  windows_path="$CYGWIN_VS_TOOLS_DIR"
51839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51840    unix_path=`$CYGPATH -u "$windows_path"`
51841    CYGWIN_VS_TOOLS_DIR="$unix_path"
51842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51844    CYGWIN_VS_TOOLS_DIR="$unix_path"
51845  fi
51846
51847      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51848        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51849	    | $GREP -i /x64/ | $HEAD --lines 1`
51850      else
51851        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51852	    | $GREP -i /x86/ | $HEAD --lines 1`
51853      fi
51854
51855  DLL_NAME="$DLL_NAME"
51856  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51857  METHOD="search of VS100COMNTOOLS"
51858  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51859    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51860$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51861
51862    # Need to check if the found msvcr is correct architecture
51863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51864$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51865    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51867      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51868      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51869      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51870        CORRECT_MSVCR_ARCH="PE32 executable"
51871      else
51872        CORRECT_MSVCR_ARCH="PE32+ executable"
51873      fi
51874    else
51875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51876        CORRECT_MSVCR_ARCH=386
51877      else
51878        CORRECT_MSVCR_ARCH=x86-64
51879      fi
51880    fi
51881    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51883$as_echo "ok" >&6; }
51884      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51885
51886  # Only process if variable expands to non-empty
51887
51888  if test "x$MSVC_DLL" != x; then
51889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51890
51891  # Input might be given as Windows format, start by converting to
51892  # unix format.
51893  path="$MSVC_DLL"
51894  new_path=`$CYGPATH -u "$path"`
51895
51896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51899  # "foo.exe" is OK but "foo" is an error.
51900  #
51901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51902  # It is also a way to make sure we got the proper file name for the real test later on.
51903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51904  if test "x$test_shortpath" = x; then
51905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51906$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51907    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51908  fi
51909
51910  # Call helper function which possibly converts this using DOS-style short mode.
51911  # If so, the updated path is stored in $new_path.
51912
51913  input_path="$new_path"
51914  # Check if we need to convert this using DOS-style short mode. If the path
51915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51916  # take no chances and rewrite it.
51917  # Note: m4 eats our [], so we need to use [ and ] instead.
51918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51919  if test "x$has_forbidden_chars" != x; then
51920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51924      # Going to short mode and back again did indeed matter. Since short mode is
51925      # case insensitive, let's make it lowercase to improve readability.
51926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51927      # Now convert it back to Unix-style (cygpath)
51928      input_path=`$CYGPATH -u "$shortmode_path"`
51929      new_path="$input_path"
51930    fi
51931  fi
51932
51933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51934  if test "x$test_cygdrive_prefix" = x; then
51935    # As a simple fix, exclude /usr/bin since it's not a real path.
51936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51938      # a path prefixed by /cygdrive for fixpath to work.
51939      new_path="$CYGWIN_ROOT_PATH$input_path"
51940    fi
51941  fi
51942
51943
51944  if test "x$path" != "x$new_path"; then
51945    MSVC_DLL="$new_path"
51946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51947$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51948  fi
51949
51950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51951
51952  path="$MSVC_DLL"
51953  has_colon=`$ECHO $path | $GREP ^.:`
51954  new_path="$path"
51955  if test "x$has_colon" = x; then
51956    # Not in mixed or Windows style, start by that.
51957    new_path=`cmd //c echo $path`
51958  fi
51959
51960
51961  input_path="$new_path"
51962  # Check if we need to convert this using DOS-style short mode. If the path
51963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51964  # take no chances and rewrite it.
51965  # Note: m4 eats our [], so we need to use [ and ] instead.
51966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51967  if test "x$has_forbidden_chars" != x; then
51968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51970  fi
51971
51972
51973  windows_path="$new_path"
51974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51975    unix_path=`$CYGPATH -u "$windows_path"`
51976    new_path="$unix_path"
51977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51979    new_path="$unix_path"
51980  fi
51981
51982  if test "x$path" != "x$new_path"; then
51983    MSVC_DLL="$new_path"
51984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51985$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51986  fi
51987
51988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51990
51991    else
51992      # We're on a unix platform. Hooray! :)
51993      path="$MSVC_DLL"
51994      has_space=`$ECHO "$path" | $GREP " "`
51995      if test "x$has_space" != x; then
51996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51997$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51999      fi
52000
52001      # Use eval to expand a potential ~
52002      eval path="$path"
52003      if test ! -f "$path" && test ! -d "$path"; then
52004        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52005      fi
52006
52007      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52008    fi
52009  fi
52010
52011      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52012$as_echo_n "checking for $DLL_NAME... " >&6; }
52013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52014$as_echo "$MSVC_DLL" >&6; }
52015    else
52016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52017$as_echo "incorrect, ignoring" >&6; }
52018      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52019$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52020    fi
52021  fi
52022
52023    fi
52024  fi
52025
52026  if test "x$MSVC_DLL" = x; then
52027    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52028    # (This was the original behaviour; kept since it might turn something up)
52029    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52030      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52031        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52032	    | $GREP x64 | $HEAD --lines 1`
52033      else
52034        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52035	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52036        if test "x$POSSIBLE_MSVC_DLL" = x; then
52037          # We're grasping at straws now...
52038          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52039	      | $HEAD --lines 1`
52040        fi
52041      fi
52042
52043
52044  DLL_NAME="$DLL_NAME"
52045  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52046  METHOD="search of VCINSTALLDIR"
52047  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52048    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52049$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52050
52051    # Need to check if the found msvcr is correct architecture
52052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52053$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52054    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52056      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52057      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52058      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52059        CORRECT_MSVCR_ARCH="PE32 executable"
52060      else
52061        CORRECT_MSVCR_ARCH="PE32+ executable"
52062      fi
52063    else
52064      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52065        CORRECT_MSVCR_ARCH=386
52066      else
52067        CORRECT_MSVCR_ARCH=x86-64
52068      fi
52069    fi
52070    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52072$as_echo "ok" >&6; }
52073      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52074
52075  # Only process if variable expands to non-empty
52076
52077  if test "x$MSVC_DLL" != x; then
52078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52079
52080  # Input might be given as Windows format, start by converting to
52081  # unix format.
52082  path="$MSVC_DLL"
52083  new_path=`$CYGPATH -u "$path"`
52084
52085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52088  # "foo.exe" is OK but "foo" is an error.
52089  #
52090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52091  # It is also a way to make sure we got the proper file name for the real test later on.
52092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52093  if test "x$test_shortpath" = x; then
52094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52095$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52096    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52097  fi
52098
52099  # Call helper function which possibly converts this using DOS-style short mode.
52100  # If so, the updated path is stored in $new_path.
52101
52102  input_path="$new_path"
52103  # Check if we need to convert this using DOS-style short mode. If the path
52104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52105  # take no chances and rewrite it.
52106  # Note: m4 eats our [], so we need to use [ and ] instead.
52107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52108  if test "x$has_forbidden_chars" != x; then
52109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52113      # Going to short mode and back again did indeed matter. Since short mode is
52114      # case insensitive, let's make it lowercase to improve readability.
52115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52116      # Now convert it back to Unix-style (cygpath)
52117      input_path=`$CYGPATH -u "$shortmode_path"`
52118      new_path="$input_path"
52119    fi
52120  fi
52121
52122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52123  if test "x$test_cygdrive_prefix" = x; then
52124    # As a simple fix, exclude /usr/bin since it's not a real path.
52125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52127      # a path prefixed by /cygdrive for fixpath to work.
52128      new_path="$CYGWIN_ROOT_PATH$input_path"
52129    fi
52130  fi
52131
52132
52133  if test "x$path" != "x$new_path"; then
52134    MSVC_DLL="$new_path"
52135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52136$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52137  fi
52138
52139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52140
52141  path="$MSVC_DLL"
52142  has_colon=`$ECHO $path | $GREP ^.:`
52143  new_path="$path"
52144  if test "x$has_colon" = x; then
52145    # Not in mixed or Windows style, start by that.
52146    new_path=`cmd //c echo $path`
52147  fi
52148
52149
52150  input_path="$new_path"
52151  # Check if we need to convert this using DOS-style short mode. If the path
52152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52153  # take no chances and rewrite it.
52154  # Note: m4 eats our [], so we need to use [ and ] instead.
52155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52156  if test "x$has_forbidden_chars" != x; then
52157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52159  fi
52160
52161
52162  windows_path="$new_path"
52163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52164    unix_path=`$CYGPATH -u "$windows_path"`
52165    new_path="$unix_path"
52166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52168    new_path="$unix_path"
52169  fi
52170
52171  if test "x$path" != "x$new_path"; then
52172    MSVC_DLL="$new_path"
52173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52174$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52175  fi
52176
52177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52179
52180    else
52181      # We're on a unix platform. Hooray! :)
52182      path="$MSVC_DLL"
52183      has_space=`$ECHO "$path" | $GREP " "`
52184      if test "x$has_space" != x; then
52185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52186$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52187        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52188      fi
52189
52190      # Use eval to expand a potential ~
52191      eval path="$path"
52192      if test ! -f "$path" && test ! -d "$path"; then
52193        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52194      fi
52195
52196      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52197    fi
52198  fi
52199
52200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52201$as_echo_n "checking for $DLL_NAME... " >&6; }
52202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52203$as_echo "$MSVC_DLL" >&6; }
52204    else
52205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52206$as_echo "incorrect, ignoring" >&6; }
52207      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52208$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52209    fi
52210  fi
52211
52212    fi
52213  fi
52214
52215  if test "x$MSVC_DLL" = x; then
52216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52217$as_echo_n "checking for $DLL_NAME... " >&6; }
52218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52219$as_echo "no" >&6; }
52220    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52221  fi
52222
52223      MSVCP_DLL="$MSVC_DLL"
52224    fi
52225
52226  fi
52227
52228
52229
52230# Check whether --with-dxsdk was given.
52231if test "${with_dxsdk+set}" = set; then :
52232  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52233$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52234fi
52235
52236
52237
52238
52239# Check whether --with-dxsdk-lib was given.
52240if test "${with_dxsdk_lib+set}" = set; then :
52241  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52242$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52243fi
52244
52245
52246
52247
52248# Check whether --with-dxsdk-include was given.
52249if test "${with_dxsdk_include+set}" = set; then :
52250  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52251$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52252fi
52253
52254
52255  fi
52256
52257
52258###############################################################################
52259#
52260# We need to do some final tweaking, when everything else is done.
52261#
52262###############################################################################
52263
52264
52265  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52266
52267
52268  # The name of the Service Agent jar.
52269  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52270  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52271    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52272  fi
52273
52274
52275
52276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52277$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52278
52279    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52280      ENABLE_INTREE_EC=yes
52281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52282$as_echo "yes" >&6; }
52283    else
52284      ENABLE_INTREE_EC=no
52285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52286$as_echo "no" >&6; }
52287    fi
52288
52289
52290
52291
52292###############################################################################
52293#
52294# Configure parts of the build that only affect the build performance,
52295# not the result.
52296#
52297###############################################################################
52298
52299
52300  # How many cores do we have on this build system?
52301
52302# Check whether --with-num-cores was given.
52303if test "${with_num_cores+set}" = set; then :
52304  withval=$with_num_cores;
52305fi
52306
52307  if test "x$with_num_cores" = x; then
52308    # The number of cores were not specified, try to probe them.
52309
52310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52311$as_echo_n "checking for number of cores... " >&6; }
52312  NUM_CORES=1
52313  FOUND_CORES=no
52314
52315  if test -f /proc/cpuinfo; then
52316    # Looks like a Linux (or cygwin) system
52317    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52318    FOUND_CORES=yes
52319  elif test -x /usr/sbin/psrinfo; then
52320    # Looks like a Solaris system
52321    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52322    FOUND_CORES=yes
52323  elif test -x /usr/sbin/system_profiler; then
52324    # Looks like a MacOSX system
52325    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52326    FOUND_CORES=yes
52327  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52328    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52329    FOUND_CORES=yes
52330  elif test -n "$NUMBER_OF_PROCESSORS"; then
52331    # On windows, look in the env
52332    NUM_CORES=$NUMBER_OF_PROCESSORS
52333    FOUND_CORES=yes
52334  fi
52335
52336  if test "x$FOUND_CORES" = xyes; then
52337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52338$as_echo "$NUM_CORES" >&6; }
52339  else
52340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52341$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52342    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52343$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52344  fi
52345
52346  else
52347    NUM_CORES=$with_num_cores
52348  fi
52349
52350
52351
52352  # How much memory do we have on this build system?
52353
52354# Check whether --with-memory-size was given.
52355if test "${with_memory_size+set}" = set; then :
52356  withval=$with_memory_size;
52357fi
52358
52359  if test "x$with_memory_size" = x; then
52360    # The memory size was not specified, try to probe it.
52361
52362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52363$as_echo_n "checking for memory size... " >&6; }
52364  # Default to 1024 MB
52365  MEMORY_SIZE=1024
52366  FOUND_MEM=no
52367
52368  if test -f /proc/meminfo; then
52369    # Looks like a Linux (or cygwin) system
52370    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52371    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52372    FOUND_MEM=yes
52373  elif test -x /usr/sbin/prtconf; then
52374    # Looks like a Solaris or AIX system
52375    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52376    FOUND_MEM=yes
52377  elif test -x /usr/sbin/system_profiler; then
52378    # Looks like a MacOSX system
52379    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52380    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52381    FOUND_MEM=yes
52382  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52383    # Windows, but without cygwin
52384    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52385    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52386    FOUND_MEM=yes
52387  fi
52388
52389  if test "x$FOUND_MEM" = xyes; then
52390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52391$as_echo "$MEMORY_SIZE MB" >&6; }
52392  else
52393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52394$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52395    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52396$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52397  fi
52398
52399  else
52400    MEMORY_SIZE=$with_memory_size
52401  fi
52402
52403
52404
52405  # Provide a decent default number of parallel jobs for make depending on
52406  # number of cores, amount of memory and machine architecture.
52407
52408# Check whether --with-jobs was given.
52409if test "${with_jobs+set}" = set; then :
52410  withval=$with_jobs;
52411fi
52412
52413  if test "x$with_jobs" = x; then
52414    # Number of jobs was not specified, calculate.
52415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52416$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52417    # Approximate memory in GB.
52418    memory_gb=`expr $MEMORY_SIZE / 1024`
52419    # Pick the lowest of memory in gb and number of cores.
52420    if test "$memory_gb" -lt "$NUM_CORES"; then
52421      JOBS="$memory_gb"
52422    else
52423      JOBS="$NUM_CORES"
52424      # On bigger machines, leave some room for other processes to run
52425      if test "$JOBS" -gt "4"; then
52426        JOBS=`expr $JOBS '*' 90 / 100`
52427      fi
52428    fi
52429    # Cap number of jobs to 16
52430    if test "$JOBS" -gt "16"; then
52431      JOBS=16
52432    fi
52433    if test "$JOBS" -eq "0"; then
52434      JOBS=1
52435    fi
52436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52437$as_echo "$JOBS" >&6; }
52438  else
52439    JOBS=$with_jobs
52440  fi
52441
52442
52443
52444# Setup arguments for the boot jdk (after cores and memory have been setup)
52445
52446  ##############################################################################
52447  #
52448  # Specify jvm options for anything that is run with the Boot JDK.
52449  # Not all JVM:s accept the same arguments on the command line.
52450  #
52451
52452# Check whether --with-boot-jdk-jvmargs was given.
52453if test "${with_boot_jdk_jvmargs+set}" = set; then :
52454  withval=$with_boot_jdk_jvmargs;
52455fi
52456
52457
52458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52459$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52460
52461  # Disable special log output when a debug build is used as Boot JDK...
52462
52463  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52464  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52465  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52466  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52467  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52468  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52469    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52470    JVM_ARG_OK=true
52471  else
52472    $ECHO "Arg failed:" >&5
52473    $ECHO "$OUTPUT" >&5
52474    JVM_ARG_OK=false
52475  fi
52476
52477
52478  # Apply user provided options.
52479
52480  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52481  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52482  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52483  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52484  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52485  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52486    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52487    JVM_ARG_OK=true
52488  else
52489    $ECHO "Arg failed:" >&5
52490    $ECHO "$OUTPUT" >&5
52491    JVM_ARG_OK=false
52492  fi
52493
52494
52495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52496$as_echo "$boot_jdk_jvmargs" >&6; }
52497
52498  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52499  JAVA_FLAGS=$boot_jdk_jvmargs
52500
52501
52502
52503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52504$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52505
52506  # Starting amount of heap memory.
52507
52508  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52509  $ECHO "Command: $JAVA -Xms64M -version" >&5
52510  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52511  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52512  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52513  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52514    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52515    JVM_ARG_OK=true
52516  else
52517    $ECHO "Arg failed:" >&5
52518    $ECHO "$OUTPUT" >&5
52519    JVM_ARG_OK=false
52520  fi
52521
52522
52523  # Maximum amount of heap memory.
52524  # Maximum stack size.
52525  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52526  if test "x$BUILD_NUM_BITS" = x32; then
52527    if test "$JVM_MAX_HEAP" -gt "1100"; then
52528      JVM_MAX_HEAP=1100
52529    elif test "$JVM_MAX_HEAP" -lt "512"; then
52530      JVM_MAX_HEAP=512
52531    fi
52532    STACK_SIZE=768
52533  else
52534    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52535    # pointers are used. Apparently, we need to increase the heap and stack
52536    # space for the jvm. More specifically, when running javac to build huge
52537    # jdk batch
52538    if test "$JVM_MAX_HEAP" -gt "1600"; then
52539      JVM_MAX_HEAP=1600
52540    elif test "$JVM_MAX_HEAP" -lt "512"; then
52541      JVM_MAX_HEAP=512
52542    fi
52543    STACK_SIZE=1536
52544  fi
52545
52546  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52547  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52548  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52549  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52550  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52551  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52552    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52553    JVM_ARG_OK=true
52554  else
52555    $ECHO "Arg failed:" >&5
52556    $ECHO "$OUTPUT" >&5
52557    JVM_ARG_OK=false
52558  fi
52559
52560
52561  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52562  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52563  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52564  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52565  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52566  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52567    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52568    JVM_ARG_OK=true
52569  else
52570    $ECHO "Arg failed:" >&5
52571    $ECHO "$OUTPUT" >&5
52572    JVM_ARG_OK=false
52573  fi
52574
52575
52576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52577$as_echo "$boot_jdk_jvmargs_big" >&6; }
52578
52579  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52580
52581
52582
52583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52584$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52585
52586  # Use serial gc for small short lived tools if possible
52587
52588  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52589  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52590  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52591  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52592  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52593  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52594    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52595    JVM_ARG_OK=true
52596  else
52597    $ECHO "Arg failed:" >&5
52598    $ECHO "$OUTPUT" >&5
52599    JVM_ARG_OK=false
52600  fi
52601
52602
52603  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52604  $ECHO "Command: $JAVA -Xms32M -version" >&5
52605  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52606  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52607  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52608  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52609    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52610    JVM_ARG_OK=true
52611  else
52612    $ECHO "Arg failed:" >&5
52613    $ECHO "$OUTPUT" >&5
52614    JVM_ARG_OK=false
52615  fi
52616
52617
52618  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52619  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52620  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52621  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52622  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52623  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52624    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52625    JVM_ARG_OK=true
52626  else
52627    $ECHO "Arg failed:" >&5
52628    $ECHO "$OUTPUT" >&5
52629    JVM_ARG_OK=false
52630  fi
52631
52632
52633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52634$as_echo "$boot_jdk_jvmargs_small" >&6; }
52635
52636  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52637
52638
52639  JAVA_TOOL_FLAGS_SMALL=""
52640  for f in $JAVA_FLAGS_SMALL; do
52641    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52642  done
52643
52644
52645
52646# Setup smart javac (after cores and memory have been setup)
52647
52648
52649# Check whether --with-sjavac-server-java was given.
52650if test "${with_sjavac_server_java+set}" = set; then :
52651  withval=$with_sjavac_server_java;
52652fi
52653
52654
52655  if test "x$with_sjavac_server_java" != x; then
52656    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52657    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52658    if test "x$FOUND_VERSION" = x; then
52659      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52660    fi
52661  else
52662    SJAVAC_SERVER_JAVA="$JAVA"
52663  fi
52664
52665
52666  if test "$MEMORY_SIZE" -gt "3000"; then
52667
52668  $ECHO "Check if jvm arg is ok: -d64" >&5
52669  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52670  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52671  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52672  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52673  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52674    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52675    JVM_ARG_OK=true
52676  else
52677    $ECHO "Arg failed:" >&5
52678    $ECHO "$OUTPUT" >&5
52679    JVM_ARG_OK=false
52680  fi
52681
52682    if test "$JVM_ARG_OK" = true; then
52683      JVM_64BIT=true
52684      JVM_ARG_OK=false
52685    fi
52686  fi
52687
52688  MX_VALUE=`expr $MEMORY_SIZE / 2`
52689  if test "$JVM_64BIT" = true; then
52690    # Set ms lower than mx since more than one instance of the server might
52691    # get launched at the same time before they figure out which instance won.
52692    MS_VALUE=512
52693    if test "$MX_VALUE" -gt "2048"; then
52694      MX_VALUE=2048
52695    fi
52696  else
52697    MS_VALUE=256
52698    if test "$MX_VALUE" -gt "1500"; then
52699      MX_VALUE=1500
52700    fi
52701  fi
52702  if test "$MX_VALUE" -lt "512"; then
52703    MX_VALUE=512
52704  fi
52705
52706  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52707  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52708  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52709  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52710  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52711  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52712    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52713    JVM_ARG_OK=true
52714  else
52715    $ECHO "Arg failed:" >&5
52716    $ECHO "$OUTPUT" >&5
52717    JVM_ARG_OK=false
52718  fi
52719
52720
52721
52722  # Check whether --enable-sjavac was given.
52723if test "${enable_sjavac+set}" = set; then :
52724  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52725else
52726  ENABLE_SJAVAC='no'
52727fi
52728
52729  if test "x$JVM_ARG_OK" = "xfalse"; then
52730    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52731$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52732    ENABLE_SJAVAC=no;
52733  fi
52734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52735$as_echo_n "checking whether to use sjavac... " >&6; }
52736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52737$as_echo "$ENABLE_SJAVAC" >&6; }
52738
52739
52740
52741# Can the C/C++ compiler use precompiled headers?
52742
52743
52744  ###############################################################################
52745  #
52746  # Can the C/C++ compiler use precompiled headers?
52747  #
52748  # Check whether --enable-precompiled-headers was given.
52749if test "${enable_precompiled_headers+set}" = set; then :
52750  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52751else
52752  ENABLE_PRECOMPH=yes
52753fi
52754
52755
52756  USE_PRECOMPILED_HEADER=1
52757  if test "x$ENABLE_PRECOMPH" = xno; then
52758    USE_PRECOMPILED_HEADER=0
52759  fi
52760
52761  if test "x$ENABLE_PRECOMPH" = xyes; then
52762    # Check that the compiler actually supports precomp headers.
52763    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52764      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52765$as_echo_n "checking that precompiled headers work... " >&6; }
52766      echo "int alfa();" > conftest.h
52767      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52768      if test ! -f conftest.hpp.gch; then
52769        USE_PRECOMPILED_HEADER=0
52770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52771$as_echo "no" >&6; }
52772      else
52773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52774$as_echo "yes" >&6; }
52775      fi
52776      rm -f conftest.h conftest.hpp.gch
52777    fi
52778  fi
52779
52780
52781
52782
52783# Setup use of ccache, if available
52784
52785  # Check whether --enable-ccache was given.
52786if test "${enable_ccache+set}" = set; then :
52787  enableval=$enable_ccache;
52788fi
52789
52790
52791  CCACHE=
52792  CCACHE_STATUS=
52793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52794$as_echo_n "checking is ccache enabled... " >&6; }
52795  if test "x$enable_ccache" = xyes; then
52796    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52798$as_echo "yes" >&6; }
52799      OLD_PATH="$PATH"
52800      if test "x$TOOLCHAIN_PATH" != x; then
52801        PATH=$TOOLCHAIN_PATH:$PATH
52802      fi
52803
52804
52805
52806  # Publish this variable in the help.
52807
52808
52809  if test "x$CCACHE" = x; then
52810    # The variable is not set by user, try to locate tool using the code snippet
52811    for ac_prog in ccache
52812do
52813  # Extract the first word of "$ac_prog", so it can be a program name with args.
52814set dummy $ac_prog; ac_word=$2
52815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52816$as_echo_n "checking for $ac_word... " >&6; }
52817if ${ac_cv_path_CCACHE+:} false; then :
52818  $as_echo_n "(cached) " >&6
52819else
52820  case $CCACHE in
52821  [\\/]* | ?:[\\/]*)
52822  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52823  ;;
52824  *)
52825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52826for as_dir in $PATH
52827do
52828  IFS=$as_save_IFS
52829  test -z "$as_dir" && as_dir=.
52830    for ac_exec_ext in '' $ac_executable_extensions; do
52831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52832    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52834    break 2
52835  fi
52836done
52837  done
52838IFS=$as_save_IFS
52839
52840  ;;
52841esac
52842fi
52843CCACHE=$ac_cv_path_CCACHE
52844if test -n "$CCACHE"; then
52845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52846$as_echo "$CCACHE" >&6; }
52847else
52848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52849$as_echo "no" >&6; }
52850fi
52851
52852
52853  test -n "$CCACHE" && break
52854done
52855
52856  else
52857    # The variable is set, but is it from the command line or the environment?
52858
52859    # Try to remove the string !CCACHE! from our list.
52860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52862      # If it failed, the variable was not from the command line. Ignore it,
52863      # but warn the user (except for BASH, which is always set by the calling BASH).
52864      if test "xCCACHE" != xBASH; then
52865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52866$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52867      fi
52868      # Try to locate tool using the code snippet
52869      for ac_prog in ccache
52870do
52871  # Extract the first word of "$ac_prog", so it can be a program name with args.
52872set dummy $ac_prog; ac_word=$2
52873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52874$as_echo_n "checking for $ac_word... " >&6; }
52875if ${ac_cv_path_CCACHE+:} false; then :
52876  $as_echo_n "(cached) " >&6
52877else
52878  case $CCACHE in
52879  [\\/]* | ?:[\\/]*)
52880  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52881  ;;
52882  *)
52883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52884for as_dir in $PATH
52885do
52886  IFS=$as_save_IFS
52887  test -z "$as_dir" && as_dir=.
52888    for ac_exec_ext in '' $ac_executable_extensions; do
52889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52890    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52892    break 2
52893  fi
52894done
52895  done
52896IFS=$as_save_IFS
52897
52898  ;;
52899esac
52900fi
52901CCACHE=$ac_cv_path_CCACHE
52902if test -n "$CCACHE"; then
52903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52904$as_echo "$CCACHE" >&6; }
52905else
52906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52907$as_echo "no" >&6; }
52908fi
52909
52910
52911  test -n "$CCACHE" && break
52912done
52913
52914    else
52915      # If it succeeded, then it was overridden by the user. We will use it
52916      # for the tool.
52917
52918      # First remove it from the list of overridden variables, so we can test
52919      # for unknown variables in the end.
52920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52921
52922      # Check if the provided tool contains a complete path.
52923      tool_specified="$CCACHE"
52924      tool_basename="${tool_specified##*/}"
52925      if test "x$tool_basename" = "x$tool_specified"; then
52926        # A command without a complete path is provided, search $PATH.
52927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52928$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52929        # Extract the first word of "$tool_basename", so it can be a program name with args.
52930set dummy $tool_basename; ac_word=$2
52931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52932$as_echo_n "checking for $ac_word... " >&6; }
52933if ${ac_cv_path_CCACHE+:} false; then :
52934  $as_echo_n "(cached) " >&6
52935else
52936  case $CCACHE in
52937  [\\/]* | ?:[\\/]*)
52938  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52939  ;;
52940  *)
52941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52942for as_dir in $PATH
52943do
52944  IFS=$as_save_IFS
52945  test -z "$as_dir" && as_dir=.
52946    for ac_exec_ext in '' $ac_executable_extensions; do
52947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52948    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52950    break 2
52951  fi
52952done
52953  done
52954IFS=$as_save_IFS
52955
52956  ;;
52957esac
52958fi
52959CCACHE=$ac_cv_path_CCACHE
52960if test -n "$CCACHE"; then
52961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52962$as_echo "$CCACHE" >&6; }
52963else
52964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52965$as_echo "no" >&6; }
52966fi
52967
52968
52969        if test "x$CCACHE" = x; then
52970          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52971        fi
52972      else
52973        # Otherwise we believe it is a complete path. Use it as it is.
52974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52975$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52977$as_echo_n "checking for CCACHE... " >&6; }
52978        if test ! -x "$tool_specified"; then
52979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52980$as_echo "not found" >&6; }
52981          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52982        fi
52983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52984$as_echo "$tool_specified" >&6; }
52985      fi
52986    fi
52987  fi
52988
52989
52990
52991  if test "x$CCACHE" = x; then
52992    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52993  fi
52994
52995
52996      PATH="$OLD_PATH"
52997      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52998      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52999    else
53000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53001$as_echo "no" >&6; }
53002      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53003$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53004    fi
53005  elif test "x$enable_ccache" = xno; then
53006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53007$as_echo "no, explicitly disabled" >&6; }
53008    CCACHE_STATUS="Disabled"
53009  elif test "x$enable_ccache" = x; then
53010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53011$as_echo "no" >&6; }
53012  else
53013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53014$as_echo "unknown" >&6; }
53015    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53016  fi
53017
53018
53019
53020# Check whether --with-ccache-dir was given.
53021if test "${with_ccache_dir+set}" = set; then :
53022  withval=$with_ccache_dir;
53023fi
53024
53025
53026  if test "x$with_ccache_dir" != x; then
53027    # When using a non home ccache directory, assume the use is to share ccache files
53028    # with other users. Thus change the umask.
53029    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53030    if test "x$CCACHE" = x; then
53031      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53032$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53033    fi
53034  fi
53035
53036  if test "x$CCACHE" != x; then
53037
53038  if test "x$CCACHE" != x; then
53039    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53040      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53041          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53042      if test "x$HAS_BAD_CCACHE" != "x"; then
53043        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53044      fi
53045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53046$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53047      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53048      PUSHED_FLAGS="$CXXFLAGS"
53049      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53050      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53051/* end confdefs.h.  */
53052
53053int
53054main ()
53055{
53056
53057  ;
53058  return 0;
53059}
53060_ACEOF
53061if ac_fn_cxx_try_compile "$LINENO"; then :
53062  CC_KNOWS_CCACHE_TRICK=yes
53063else
53064  CC_KNOWS_CCACHE_TRICK=no
53065fi
53066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53067      CXXFLAGS="$PUSHED_FLAGS"
53068      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53070$as_echo "yes" >&6; }
53071        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53072
53073        CCACHE_SLOPPINESS=pch_defines,time_macros
53074      else
53075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53076$as_echo "no" >&6; }
53077        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53078      fi
53079    fi
53080
53081    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53082        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53083
53084    if test "x$SET_CCACHE_DIR" != x; then
53085      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53086      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53087    fi
53088  fi
53089
53090  fi
53091
53092
53093###############################################################################
53094#
53095# And now the finish...
53096#
53097###############################################################################
53098
53099# Check for some common pitfalls
53100
53101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53102    file_to_test="$SRC_ROOT/LICENSE"
53103    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53104      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
53105    fi
53106  fi
53107
53108
53109  # Did user specify any unknown variables?
53110
53111  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53112    # Replace the separating ! with spaces before presenting for end user.
53113    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53115$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53116  fi
53117
53118
53119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53120$as_echo_n "checking if build directory is on local disk... " >&6; }
53121
53122  # df -l lists only local disks; if the given directory is not found then
53123  # a non-zero exit code is given
53124  if test "x$DF" = x; then
53125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53126      # msys does not have df; use Windows "net use" instead.
53127      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53128      if test "x$IS_NETWORK_DISK" = x; then
53129        OUTPUT_DIR_IS_LOCAL="yes"
53130      else
53131        OUTPUT_DIR_IS_LOCAL="no"
53132      fi
53133    else
53134      # No df here, say it's local
53135      OUTPUT_DIR_IS_LOCAL="yes"
53136    fi
53137  else
53138    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53139      OUTPUT_DIR_IS_LOCAL="yes"
53140    else
53141      OUTPUT_DIR_IS_LOCAL="no"
53142    fi
53143  fi
53144
53145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53146$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53147
53148
53149
53150  # Check if the user has any old-style ALT_ variables set.
53151  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53152
53153  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53154  # Since we can't properly handle the dependencies for this, warn the user about the situation
53155  if test -e $OUTPUT_ROOT/spec.gmk; then
53156    IS_RECONFIGURE=yes
53157  else
53158    IS_RECONFIGURE=no
53159  fi
53160
53161
53162# At the end, call the custom hook. (Dummy macro if no custom sources available)
53163
53164
53165# We're messing a bit with internal autoconf variables to put the config.status
53166# in the output directory instead of the current directory.
53167CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53168
53169# Create the actual output files. Now the main work of configure is done.
53170cat >confcache <<\_ACEOF
53171# This file is a shell script that caches the results of configure
53172# tests run on this system so they can be shared between configure
53173# scripts and configure runs, see configure's option --config-cache.
53174# It is not useful on other systems.  If it contains results you don't
53175# want to keep, you may remove or edit it.
53176#
53177# config.status only pays attention to the cache file if you give it
53178# the --recheck option to rerun configure.
53179#
53180# `ac_cv_env_foo' variables (set or unset) will be overridden when
53181# loading this file, other *unset* `ac_cv_foo' will be assigned the
53182# following values.
53183
53184_ACEOF
53185
53186# The following way of writing the cache mishandles newlines in values,
53187# but we know of no workaround that is simple, portable, and efficient.
53188# So, we kill variables containing newlines.
53189# Ultrix sh set writes to stderr and can't be redirected directly,
53190# and sets the high bit in the cache file unless we assign to the vars.
53191(
53192  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53193    eval ac_val=\$$ac_var
53194    case $ac_val in #(
53195    *${as_nl}*)
53196      case $ac_var in #(
53197      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53198$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53199      esac
53200      case $ac_var in #(
53201      _ | IFS | as_nl) ;; #(
53202      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53203      *) { eval $ac_var=; unset $ac_var;} ;;
53204      esac ;;
53205    esac
53206  done
53207
53208  (set) 2>&1 |
53209    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53210    *${as_nl}ac_space=\ *)
53211      # `set' does not quote correctly, so add quotes: double-quote
53212      # substitution turns \\\\ into \\, and sed turns \\ into \.
53213      sed -n \
53214	"s/'/'\\\\''/g;
53215	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53216      ;; #(
53217    *)
53218      # `set' quotes correctly as required by POSIX, so do not add quotes.
53219      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53220      ;;
53221    esac |
53222    sort
53223) |
53224  sed '
53225     /^ac_cv_env_/b end
53226     t clear
53227     :clear
53228     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53229     t end
53230     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53231     :end' >>confcache
53232if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53233  if test -w "$cache_file"; then
53234    if test "x$cache_file" != "x/dev/null"; then
53235      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53236$as_echo "$as_me: updating cache $cache_file" >&6;}
53237      if test ! -f "$cache_file" || test -h "$cache_file"; then
53238	cat confcache >"$cache_file"
53239      else
53240        case $cache_file in #(
53241        */* | ?:*)
53242	  mv -f confcache "$cache_file"$$ &&
53243	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53244        *)
53245	  mv -f confcache "$cache_file" ;;
53246	esac
53247      fi
53248    fi
53249  else
53250    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53251$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53252  fi
53253fi
53254rm -f confcache
53255
53256test "x$prefix" = xNONE && prefix=$ac_default_prefix
53257# Let make expand exec_prefix.
53258test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53259
53260# Transform confdefs.h into DEFS.
53261# Protect against shell expansion while executing Makefile rules.
53262# Protect against Makefile macro expansion.
53263#
53264# If the first sed substitution is executed (which looks for macros that
53265# take arguments), then branch to the quote section.  Otherwise,
53266# look for a macro that doesn't take arguments.
53267ac_script='
53268:mline
53269/\\$/{
53270 N
53271 s,\\\n,,
53272 b mline
53273}
53274t clear
53275:clear
53276s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53277t quote
53278s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53279t quote
53280b any
53281:quote
53282s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53283s/\[/\\&/g
53284s/\]/\\&/g
53285s/\$/$$/g
53286H
53287:any
53288${
53289	g
53290	s/^\n//
53291	s/\n/ /g
53292	p
53293}
53294'
53295DEFS=`sed -n "$ac_script" confdefs.h`
53296
53297
53298ac_libobjs=
53299ac_ltlibobjs=
53300U=
53301for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53302  # 1. Remove the extension, and $U if already installed.
53303  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53304  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53305  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53306  #    will be set to the directory where LIBOBJS objects are built.
53307  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53308  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53309done
53310LIBOBJS=$ac_libobjs
53311
53312LTLIBOBJS=$ac_ltlibobjs
53313
53314
53315
53316: "${CONFIG_STATUS=./config.status}"
53317ac_write_fail=0
53318ac_clean_files_save=$ac_clean_files
53319ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53320{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53321$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53322as_write_fail=0
53323cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53324#! $SHELL
53325# Generated by $as_me.
53326# Run this file to recreate the current configuration.
53327# Compiler output produced by configure, useful for debugging
53328# configure, is in config.log if it exists.
53329
53330debug=false
53331ac_cs_recheck=false
53332ac_cs_silent=false
53333
53334SHELL=\${CONFIG_SHELL-$SHELL}
53335export SHELL
53336_ASEOF
53337cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53338## -------------------- ##
53339## M4sh Initialization. ##
53340## -------------------- ##
53341
53342# Be more Bourne compatible
53343DUALCASE=1; export DUALCASE # for MKS sh
53344if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53345  emulate sh
53346  NULLCMD=:
53347  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53348  # is contrary to our usage.  Disable this feature.
53349  alias -g '${1+"$@"}'='"$@"'
53350  setopt NO_GLOB_SUBST
53351else
53352  case `(set -o) 2>/dev/null` in #(
53353  *posix*) :
53354    set -o posix ;; #(
53355  *) :
53356     ;;
53357esac
53358fi
53359
53360
53361as_nl='
53362'
53363export as_nl
53364# Printing a long string crashes Solaris 7 /usr/bin/printf.
53365as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53366as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53367as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53368# Prefer a ksh shell builtin over an external printf program on Solaris,
53369# but without wasting forks for bash or zsh.
53370if test -z "$BASH_VERSION$ZSH_VERSION" \
53371    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53372  as_echo='print -r --'
53373  as_echo_n='print -rn --'
53374elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53375  as_echo='printf %s\n'
53376  as_echo_n='printf %s'
53377else
53378  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53379    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53380    as_echo_n='/usr/ucb/echo -n'
53381  else
53382    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53383    as_echo_n_body='eval
53384      arg=$1;
53385      case $arg in #(
53386      *"$as_nl"*)
53387	expr "X$arg" : "X\\(.*\\)$as_nl";
53388	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53389      esac;
53390      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53391    '
53392    export as_echo_n_body
53393    as_echo_n='sh -c $as_echo_n_body as_echo'
53394  fi
53395  export as_echo_body
53396  as_echo='sh -c $as_echo_body as_echo'
53397fi
53398
53399# The user is always right.
53400if test "${PATH_SEPARATOR+set}" != set; then
53401  PATH_SEPARATOR=:
53402  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53403    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53404      PATH_SEPARATOR=';'
53405  }
53406fi
53407
53408
53409# IFS
53410# We need space, tab and new line, in precisely that order.  Quoting is
53411# there to prevent editors from complaining about space-tab.
53412# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53413# splitting by setting IFS to empty value.)
53414IFS=" ""	$as_nl"
53415
53416# Find who we are.  Look in the path if we contain no directory separator.
53417as_myself=
53418case $0 in #((
53419  *[\\/]* ) as_myself=$0 ;;
53420  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53421for as_dir in $PATH
53422do
53423  IFS=$as_save_IFS
53424  test -z "$as_dir" && as_dir=.
53425    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53426  done
53427IFS=$as_save_IFS
53428
53429     ;;
53430esac
53431# We did not find ourselves, most probably we were run as `sh COMMAND'
53432# in which case we are not to be found in the path.
53433if test "x$as_myself" = x; then
53434  as_myself=$0
53435fi
53436if test ! -f "$as_myself"; then
53437  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53438  exit 1
53439fi
53440
53441# Unset variables that we do not need and which cause bugs (e.g. in
53442# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53443# suppresses any "Segmentation fault" message there.  '((' could
53444# trigger a bug in pdksh 5.2.14.
53445for as_var in BASH_ENV ENV MAIL MAILPATH
53446do eval test x\${$as_var+set} = xset \
53447  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53448done
53449PS1='$ '
53450PS2='> '
53451PS4='+ '
53452
53453# NLS nuisances.
53454LC_ALL=C
53455export LC_ALL
53456LANGUAGE=C
53457export LANGUAGE
53458
53459# CDPATH.
53460(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53461
53462
53463# as_fn_error STATUS ERROR [LINENO LOG_FD]
53464# ----------------------------------------
53465# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53466# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53467# script with STATUS, using 1 if that was 0.
53468as_fn_error ()
53469{
53470  as_status=$1; test $as_status -eq 0 && as_status=1
53471  if test "$4"; then
53472    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53473    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53474  fi
53475  $as_echo "$as_me: error: $2" >&2
53476  as_fn_exit $as_status
53477} # as_fn_error
53478
53479
53480# as_fn_set_status STATUS
53481# -----------------------
53482# Set $? to STATUS, without forking.
53483as_fn_set_status ()
53484{
53485  return $1
53486} # as_fn_set_status
53487
53488# as_fn_exit STATUS
53489# -----------------
53490# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53491as_fn_exit ()
53492{
53493  set +e
53494  as_fn_set_status $1
53495  exit $1
53496} # as_fn_exit
53497
53498# as_fn_unset VAR
53499# ---------------
53500# Portably unset VAR.
53501as_fn_unset ()
53502{
53503  { eval $1=; unset $1;}
53504}
53505as_unset=as_fn_unset
53506# as_fn_append VAR VALUE
53507# ----------------------
53508# Append the text in VALUE to the end of the definition contained in VAR. Take
53509# advantage of any shell optimizations that allow amortized linear growth over
53510# repeated appends, instead of the typical quadratic growth present in naive
53511# implementations.
53512if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53513  eval 'as_fn_append ()
53514  {
53515    eval $1+=\$2
53516  }'
53517else
53518  as_fn_append ()
53519  {
53520    eval $1=\$$1\$2
53521  }
53522fi # as_fn_append
53523
53524# as_fn_arith ARG...
53525# ------------------
53526# Perform arithmetic evaluation on the ARGs, and store the result in the
53527# global $as_val. Take advantage of shells that can avoid forks. The arguments
53528# must be portable across $(()) and expr.
53529if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53530  eval 'as_fn_arith ()
53531  {
53532    as_val=$(( $* ))
53533  }'
53534else
53535  as_fn_arith ()
53536  {
53537    as_val=`expr "$@" || test $? -eq 1`
53538  }
53539fi # as_fn_arith
53540
53541
53542if expr a : '\(a\)' >/dev/null 2>&1 &&
53543   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53544  as_expr=expr
53545else
53546  as_expr=false
53547fi
53548
53549if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53550  as_basename=basename
53551else
53552  as_basename=false
53553fi
53554
53555if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53556  as_dirname=dirname
53557else
53558  as_dirname=false
53559fi
53560
53561as_me=`$as_basename -- "$0" ||
53562$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53563	 X"$0" : 'X\(//\)$' \| \
53564	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53565$as_echo X/"$0" |
53566    sed '/^.*\/\([^/][^/]*\)\/*$/{
53567	    s//\1/
53568	    q
53569	  }
53570	  /^X\/\(\/\/\)$/{
53571	    s//\1/
53572	    q
53573	  }
53574	  /^X\/\(\/\).*/{
53575	    s//\1/
53576	    q
53577	  }
53578	  s/.*/./; q'`
53579
53580# Avoid depending upon Character Ranges.
53581as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53582as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53583as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53584as_cr_digits='0123456789'
53585as_cr_alnum=$as_cr_Letters$as_cr_digits
53586
53587ECHO_C= ECHO_N= ECHO_T=
53588case `echo -n x` in #(((((
53589-n*)
53590  case `echo 'xy\c'` in
53591  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53592  xy)  ECHO_C='\c';;
53593  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53594       ECHO_T='	';;
53595  esac;;
53596*)
53597  ECHO_N='-n';;
53598esac
53599
53600rm -f conf$$ conf$$.exe conf$$.file
53601if test -d conf$$.dir; then
53602  rm -f conf$$.dir/conf$$.file
53603else
53604  rm -f conf$$.dir
53605  mkdir conf$$.dir 2>/dev/null
53606fi
53607if (echo >conf$$.file) 2>/dev/null; then
53608  if ln -s conf$$.file conf$$ 2>/dev/null; then
53609    as_ln_s='ln -s'
53610    # ... but there are two gotchas:
53611    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53612    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53613    # In both cases, we have to default to `cp -pR'.
53614    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53615      as_ln_s='cp -pR'
53616  elif ln conf$$.file conf$$ 2>/dev/null; then
53617    as_ln_s=ln
53618  else
53619    as_ln_s='cp -pR'
53620  fi
53621else
53622  as_ln_s='cp -pR'
53623fi
53624rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53625rmdir conf$$.dir 2>/dev/null
53626
53627
53628# as_fn_mkdir_p
53629# -------------
53630# Create "$as_dir" as a directory, including parents if necessary.
53631as_fn_mkdir_p ()
53632{
53633
53634  case $as_dir in #(
53635  -*) as_dir=./$as_dir;;
53636  esac
53637  test -d "$as_dir" || eval $as_mkdir_p || {
53638    as_dirs=
53639    while :; do
53640      case $as_dir in #(
53641      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53642      *) as_qdir=$as_dir;;
53643      esac
53644      as_dirs="'$as_qdir' $as_dirs"
53645      as_dir=`$as_dirname -- "$as_dir" ||
53646$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53647	 X"$as_dir" : 'X\(//\)[^/]' \| \
53648	 X"$as_dir" : 'X\(//\)$' \| \
53649	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53650$as_echo X"$as_dir" |
53651    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53652	    s//\1/
53653	    q
53654	  }
53655	  /^X\(\/\/\)[^/].*/{
53656	    s//\1/
53657	    q
53658	  }
53659	  /^X\(\/\/\)$/{
53660	    s//\1/
53661	    q
53662	  }
53663	  /^X\(\/\).*/{
53664	    s//\1/
53665	    q
53666	  }
53667	  s/.*/./; q'`
53668      test -d "$as_dir" && break
53669    done
53670    test -z "$as_dirs" || eval "mkdir $as_dirs"
53671  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53672
53673
53674} # as_fn_mkdir_p
53675if mkdir -p . 2>/dev/null; then
53676  as_mkdir_p='mkdir -p "$as_dir"'
53677else
53678  test -d ./-p && rmdir ./-p
53679  as_mkdir_p=false
53680fi
53681
53682
53683# as_fn_executable_p FILE
53684# -----------------------
53685# Test if FILE is an executable regular file.
53686as_fn_executable_p ()
53687{
53688  test -f "$1" && test -x "$1"
53689} # as_fn_executable_p
53690as_test_x='test -x'
53691as_executable_p=as_fn_executable_p
53692
53693# Sed expression to map a string onto a valid CPP name.
53694as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53695
53696# Sed expression to map a string onto a valid variable name.
53697as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53698
53699
53700exec 6>&1
53701## ----------------------------------- ##
53702## Main body of $CONFIG_STATUS script. ##
53703## ----------------------------------- ##
53704_ASEOF
53705test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53706
53707cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53708# Save the log message, to keep $0 and so on meaningful, and to
53709# report actual input values of CONFIG_FILES etc. instead of their
53710# values after options handling.
53711ac_log="
53712This file was extended by OpenJDK $as_me jdk9, which was
53713generated by GNU Autoconf 2.69.  Invocation command line was
53714
53715  CONFIG_FILES    = $CONFIG_FILES
53716  CONFIG_HEADERS  = $CONFIG_HEADERS
53717  CONFIG_LINKS    = $CONFIG_LINKS
53718  CONFIG_COMMANDS = $CONFIG_COMMANDS
53719  $ $0 $@
53720
53721on `(hostname || uname -n) 2>/dev/null | sed 1q`
53722"
53723
53724_ACEOF
53725
53726case $ac_config_files in *"
53727"*) set x $ac_config_files; shift; ac_config_files=$*;;
53728esac
53729
53730
53731
53732cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53733# Files that config.status was made for.
53734config_files="$ac_config_files"
53735
53736_ACEOF
53737
53738cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53739ac_cs_usage="\
53740\`$as_me' instantiates files and other configuration actions
53741from templates according to the current configuration.  Unless the files
53742and actions are specified as TAGs, all are instantiated by default.
53743
53744Usage: $0 [OPTION]... [TAG]...
53745
53746  -h, --help       print this help, then exit
53747  -V, --version    print version number and configuration settings, then exit
53748      --config     print configuration, then exit
53749  -q, --quiet, --silent
53750                   do not print progress messages
53751  -d, --debug      don't remove temporary files
53752      --recheck    update $as_me by reconfiguring in the same conditions
53753      --file=FILE[:TEMPLATE]
53754                   instantiate the configuration file FILE
53755
53756Configuration files:
53757$config_files
53758
53759Report bugs to <build-dev@openjdk.java.net>.
53760OpenJDK home page: <http://openjdk.java.net>."
53761
53762_ACEOF
53763cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53764ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53765ac_cs_version="\\
53766OpenJDK config.status jdk9
53767configured by $0, generated by GNU Autoconf 2.69,
53768  with options \\"\$ac_cs_config\\"
53769
53770Copyright (C) 2012 Free Software Foundation, Inc.
53771This config.status script is free software; the Free Software Foundation
53772gives unlimited permission to copy, distribute and modify it."
53773
53774ac_pwd='$ac_pwd'
53775srcdir='$srcdir'
53776AWK='$AWK'
53777test -n "\$AWK" || AWK=awk
53778_ACEOF
53779
53780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53781# The default lists apply if the user does not specify any file.
53782ac_need_defaults=:
53783while test $# != 0
53784do
53785  case $1 in
53786  --*=?*)
53787    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53788    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53789    ac_shift=:
53790    ;;
53791  --*=)
53792    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53793    ac_optarg=
53794    ac_shift=:
53795    ;;
53796  *)
53797    ac_option=$1
53798    ac_optarg=$2
53799    ac_shift=shift
53800    ;;
53801  esac
53802
53803  case $ac_option in
53804  # Handling of the options.
53805  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53806    ac_cs_recheck=: ;;
53807  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53808    $as_echo "$ac_cs_version"; exit ;;
53809  --config | --confi | --conf | --con | --co | --c )
53810    $as_echo "$ac_cs_config"; exit ;;
53811  --debug | --debu | --deb | --de | --d | -d )
53812    debug=: ;;
53813  --file | --fil | --fi | --f )
53814    $ac_shift
53815    case $ac_optarg in
53816    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53817    '') as_fn_error $? "missing file argument" ;;
53818    esac
53819    as_fn_append CONFIG_FILES " '$ac_optarg'"
53820    ac_need_defaults=false;;
53821  --he | --h |  --help | --hel | -h )
53822    $as_echo "$ac_cs_usage"; exit ;;
53823  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53824  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53825    ac_cs_silent=: ;;
53826
53827  # This is an error.
53828  -*) as_fn_error $? "unrecognized option: \`$1'
53829Try \`$0 --help' for more information." ;;
53830
53831  *) as_fn_append ac_config_targets " $1"
53832     ac_need_defaults=false ;;
53833
53834  esac
53835  shift
53836done
53837
53838ac_configure_extra_args=
53839
53840if $ac_cs_silent; then
53841  exec 6>/dev/null
53842  ac_configure_extra_args="$ac_configure_extra_args --silent"
53843fi
53844
53845_ACEOF
53846cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53847if \$ac_cs_recheck; then
53848  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53849  shift
53850  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53851  CONFIG_SHELL='$SHELL'
53852  export CONFIG_SHELL
53853  exec "\$@"
53854fi
53855
53856_ACEOF
53857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53858exec 5>>config.log
53859{
53860  echo
53861  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53862## Running $as_me. ##
53863_ASBOX
53864  $as_echo "$ac_log"
53865} >&5
53866
53867_ACEOF
53868cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53869_ACEOF
53870
53871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53872
53873# Handling of arguments.
53874for ac_config_target in $ac_config_targets
53875do
53876  case $ac_config_target in
53877    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53878    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53879    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53880    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53881    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53882
53883  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53884  esac
53885done
53886
53887
53888# If the user did not use the arguments to specify the items to instantiate,
53889# then the envvar interface is used.  Set only those that are not.
53890# We use the long form for the default assignment because of an extremely
53891# bizarre bug on SunOS 4.1.3.
53892if $ac_need_defaults; then
53893  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53894fi
53895
53896# Have a temporary directory for convenience.  Make it in the build tree
53897# simply because there is no reason against having it here, and in addition,
53898# creating and moving files from /tmp can sometimes cause problems.
53899# Hook for its removal unless debugging.
53900# Note that there is a small window in which the directory will not be cleaned:
53901# after its creation but before its name has been assigned to `$tmp'.
53902$debug ||
53903{
53904  tmp= ac_tmp=
53905  trap 'exit_status=$?
53906  : "${ac_tmp:=$tmp}"
53907  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53908' 0
53909  trap 'as_fn_exit 1' 1 2 13 15
53910}
53911# Create a (secure) tmp directory for tmp files.
53912
53913{
53914  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53915  test -d "$tmp"
53916}  ||
53917{
53918  tmp=./conf$$-$RANDOM
53919  (umask 077 && mkdir "$tmp")
53920} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53921ac_tmp=$tmp
53922
53923# Set up the scripts for CONFIG_FILES section.
53924# No need to generate them if there are no CONFIG_FILES.
53925# This happens for instance with `./config.status config.h'.
53926if test -n "$CONFIG_FILES"; then
53927
53928
53929ac_cr=`echo X | tr X '\015'`
53930# On cygwin, bash can eat \r inside `` if the user requested igncr.
53931# But we know of no other shell where ac_cr would be empty at this
53932# point, so we can use a bashism as a fallback.
53933if test "x$ac_cr" = x; then
53934  eval ac_cr=\$\'\\r\'
53935fi
53936ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53937if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53938  ac_cs_awk_cr='\\r'
53939else
53940  ac_cs_awk_cr=$ac_cr
53941fi
53942
53943echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53944_ACEOF
53945
53946
53947{
53948  echo "cat >conf$$subs.awk <<_ACEOF" &&
53949  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53950  echo "_ACEOF"
53951} >conf$$subs.sh ||
53952  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53953ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53954ac_delim='%!_!# '
53955for ac_last_try in false false false false false :; do
53956  . ./conf$$subs.sh ||
53957    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53958
53959  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53960  if test $ac_delim_n = $ac_delim_num; then
53961    break
53962  elif $ac_last_try; then
53963    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53964  else
53965    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53966  fi
53967done
53968rm -f conf$$subs.sh
53969
53970cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53971cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53972_ACEOF
53973sed -n '
53974h
53975s/^/S["/; s/!.*/"]=/
53976p
53977g
53978s/^[^!]*!//
53979:repl
53980t repl
53981s/'"$ac_delim"'$//
53982t delim
53983:nl
53984h
53985s/\(.\{148\}\)..*/\1/
53986t more1
53987s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53988p
53989n
53990b repl
53991:more1
53992s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53993p
53994g
53995s/.\{148\}//
53996t nl
53997:delim
53998h
53999s/\(.\{148\}\)..*/\1/
54000t more2
54001s/["\\]/\\&/g; s/^/"/; s/$/"/
54002p
54003b
54004:more2
54005s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54006p
54007g
54008s/.\{148\}//
54009t delim
54010' <conf$$subs.awk | sed '
54011/^[^""]/{
54012  N
54013  s/\n//
54014}
54015' >>$CONFIG_STATUS || ac_write_fail=1
54016rm -f conf$$subs.awk
54017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54018_ACAWK
54019cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54020  for (key in S) S_is_set[key] = 1
54021  FS = ""
54022
54023}
54024{
54025  line = $ 0
54026  nfields = split(line, field, "@")
54027  substed = 0
54028  len = length(field[1])
54029  for (i = 2; i < nfields; i++) {
54030    key = field[i]
54031    keylen = length(key)
54032    if (S_is_set[key]) {
54033      value = S[key]
54034      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54035      len += length(value) + length(field[++i])
54036      substed = 1
54037    } else
54038      len += 1 + keylen
54039  }
54040
54041  print line
54042}
54043
54044_ACAWK
54045_ACEOF
54046cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54047if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54048  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54049else
54050  cat
54051fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54052  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54053_ACEOF
54054
54055# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54056# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54057# trailing colons and then remove the whole line if VPATH becomes empty
54058# (actually we leave an empty line to preserve line numbers).
54059if test "x$srcdir" = x.; then
54060  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54061h
54062s///
54063s/^/:/
54064s/[	 ]*$/:/
54065s/:\$(srcdir):/:/g
54066s/:\${srcdir}:/:/g
54067s/:@srcdir@:/:/g
54068s/^:*//
54069s/:*$//
54070x
54071s/\(=[	 ]*\).*/\1/
54072G
54073s/\n//
54074s/^[^=]*=[	 ]*$//
54075}'
54076fi
54077
54078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54079fi # test -n "$CONFIG_FILES"
54080
54081
54082eval set X "  :F $CONFIG_FILES      "
54083shift
54084for ac_tag
54085do
54086  case $ac_tag in
54087  :[FHLC]) ac_mode=$ac_tag; continue;;
54088  esac
54089  case $ac_mode$ac_tag in
54090  :[FHL]*:*);;
54091  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54092  :[FH]-) ac_tag=-:-;;
54093  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54094  esac
54095  ac_save_IFS=$IFS
54096  IFS=:
54097  set x $ac_tag
54098  IFS=$ac_save_IFS
54099  shift
54100  ac_file=$1
54101  shift
54102
54103  case $ac_mode in
54104  :L) ac_source=$1;;
54105  :[FH])
54106    ac_file_inputs=
54107    for ac_f
54108    do
54109      case $ac_f in
54110      -) ac_f="$ac_tmp/stdin";;
54111      *) # Look for the file first in the build tree, then in the source tree
54112	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54113	 # because $ac_f cannot contain `:'.
54114	 test -f "$ac_f" ||
54115	   case $ac_f in
54116	   [\\/$]*) false;;
54117	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54118	   esac ||
54119	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54120      esac
54121      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54122      as_fn_append ac_file_inputs " '$ac_f'"
54123    done
54124
54125    # Let's still pretend it is `configure' which instantiates (i.e., don't
54126    # use $as_me), people would be surprised to read:
54127    #    /* config.h.  Generated by config.status.  */
54128    configure_input='Generated from '`
54129	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54130	`' by configure.'
54131    if test x"$ac_file" != x-; then
54132      configure_input="$ac_file.  $configure_input"
54133      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54134$as_echo "$as_me: creating $ac_file" >&6;}
54135    fi
54136    # Neutralize special characters interpreted by sed in replacement strings.
54137    case $configure_input in #(
54138    *\&* | *\|* | *\\* )
54139       ac_sed_conf_input=`$as_echo "$configure_input" |
54140       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54141    *) ac_sed_conf_input=$configure_input;;
54142    esac
54143
54144    case $ac_tag in
54145    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54146      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54147    esac
54148    ;;
54149  esac
54150
54151  ac_dir=`$as_dirname -- "$ac_file" ||
54152$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54153	 X"$ac_file" : 'X\(//\)[^/]' \| \
54154	 X"$ac_file" : 'X\(//\)$' \| \
54155	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54156$as_echo X"$ac_file" |
54157    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54158	    s//\1/
54159	    q
54160	  }
54161	  /^X\(\/\/\)[^/].*/{
54162	    s//\1/
54163	    q
54164	  }
54165	  /^X\(\/\/\)$/{
54166	    s//\1/
54167	    q
54168	  }
54169	  /^X\(\/\).*/{
54170	    s//\1/
54171	    q
54172	  }
54173	  s/.*/./; q'`
54174  as_dir="$ac_dir"; as_fn_mkdir_p
54175  ac_builddir=.
54176
54177case "$ac_dir" in
54178.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54179*)
54180  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54181  # A ".." for each directory in $ac_dir_suffix.
54182  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54183  case $ac_top_builddir_sub in
54184  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54185  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54186  esac ;;
54187esac
54188ac_abs_top_builddir=$ac_pwd
54189ac_abs_builddir=$ac_pwd$ac_dir_suffix
54190# for backward compatibility:
54191ac_top_builddir=$ac_top_build_prefix
54192
54193case $srcdir in
54194  .)  # We are building in place.
54195    ac_srcdir=.
54196    ac_top_srcdir=$ac_top_builddir_sub
54197    ac_abs_top_srcdir=$ac_pwd ;;
54198  [\\/]* | ?:[\\/]* )  # Absolute name.
54199    ac_srcdir=$srcdir$ac_dir_suffix;
54200    ac_top_srcdir=$srcdir
54201    ac_abs_top_srcdir=$srcdir ;;
54202  *) # Relative name.
54203    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54204    ac_top_srcdir=$ac_top_build_prefix$srcdir
54205    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54206esac
54207ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54208
54209
54210  case $ac_mode in
54211  :F)
54212  #
54213  # CONFIG_FILE
54214  #
54215
54216_ACEOF
54217
54218cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54219# If the template does not know about datarootdir, expand it.
54220# FIXME: This hack should be removed a few years after 2.60.
54221ac_datarootdir_hack=; ac_datarootdir_seen=
54222ac_sed_dataroot='
54223/datarootdir/ {
54224  p
54225  q
54226}
54227/@datadir@/p
54228/@docdir@/p
54229/@infodir@/p
54230/@localedir@/p
54231/@mandir@/p'
54232case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54233*datarootdir*) ac_datarootdir_seen=yes;;
54234*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54235  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54236$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54237_ACEOF
54238cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54239  ac_datarootdir_hack='
54240  s&@datadir@&$datadir&g
54241  s&@docdir@&$docdir&g
54242  s&@infodir@&$infodir&g
54243  s&@localedir@&$localedir&g
54244  s&@mandir@&$mandir&g
54245  s&\\\${datarootdir}&$datarootdir&g' ;;
54246esac
54247_ACEOF
54248
54249# Neutralize VPATH when `$srcdir' = `.'.
54250# Shell code in configure.ac might set extrasub.
54251# FIXME: do we really want to maintain this feature?
54252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54253ac_sed_extra="$ac_vpsub
54254$extrasub
54255_ACEOF
54256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54257:t
54258/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54259s|@configure_input@|$ac_sed_conf_input|;t t
54260s&@top_builddir@&$ac_top_builddir_sub&;t t
54261s&@top_build_prefix@&$ac_top_build_prefix&;t t
54262s&@srcdir@&$ac_srcdir&;t t
54263s&@abs_srcdir@&$ac_abs_srcdir&;t t
54264s&@top_srcdir@&$ac_top_srcdir&;t t
54265s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54266s&@builddir@&$ac_builddir&;t t
54267s&@abs_builddir@&$ac_abs_builddir&;t t
54268s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54269$ac_datarootdir_hack
54270"
54271eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54272  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54273
54274test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54275  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54276  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54277      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54278  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54279which seems to be undefined.  Please make sure it is defined" >&5
54280$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54281which seems to be undefined.  Please make sure it is defined" >&2;}
54282
54283  rm -f "$ac_tmp/stdin"
54284  case $ac_file in
54285  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54286  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54287  esac \
54288  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54289 ;;
54290
54291
54292
54293  esac
54294
54295done # for ac_tag
54296
54297
54298as_fn_exit 0
54299_ACEOF
54300ac_clean_files=$ac_clean_files_save
54301
54302test $ac_write_fail = 0 ||
54303  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54304
54305
54306# configure is writing to config.log, and then calls config.status.
54307# config.status does its own redirection, appending to config.log.
54308# Unfortunately, on DOS this fails, as config.log is still kept open
54309# by configure, so config.status won't be able to write to it; its
54310# output is simply discarded.  So we exec the FD to /dev/null,
54311# effectively closing config.log, so it can be properly (re)opened and
54312# appended to by config.status.  When coming back to configure, we
54313# need to make the FD available again.
54314if test "$no_create" != yes; then
54315  ac_cs_success=:
54316  ac_config_status_args=
54317  test "$silent" = yes &&
54318    ac_config_status_args="$ac_config_status_args --quiet"
54319  exec 5>/dev/null
54320  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54321  exec 5>>config.log
54322  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54323  # would make configure fail if this is the last instruction.
54324  $ac_cs_success || as_fn_exit 1
54325fi
54326if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54327  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54328$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54329fi
54330
54331
54332# After AC_OUTPUT, we need to do final work
54333
54334
54335  # Try to move config.log (generated by autoconf) to the configure-support directory.
54336  if test -e ./config.log; then
54337    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54338  fi
54339
54340  # Rotate our log file (configure.log)
54341  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54342    $RM -f "$OUTPUT_ROOT/configure.log.old"
54343  fi
54344  if test -e "$OUTPUT_ROOT/configure.log"; then
54345    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54346  fi
54347
54348  # Move configure.log from current directory to the build output root
54349  if test -e ./configure.log; then
54350    echo found it
54351    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54352  fi
54353
54354  # Make the compare script executable
54355  $CHMOD +x $OUTPUT_ROOT/compare.sh
54356
54357
54358# Finally output some useful information to the user
54359
54360  # Finally output some useful information to the user
54361
54362  printf "\n"
54363  printf "====================================================\n"
54364  if test "x$no_create" != "xyes"; then
54365    if test "x$IS_RECONFIGURE" != "xyes"; then
54366      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54367    else
54368      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54369    fi
54370  else
54371    if test "x$IS_RECONFIGURE" != "xyes"; then
54372      printf "A configuration has been successfully checked but not created\n"
54373    else
54374      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54375    fi
54376  fi
54377  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54378    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54379  else
54380    printf "using default settings.\n"
54381  fi
54382
54383  printf "\n"
54384  printf "Configuration summary:\n"
54385  printf "* Debug level:    $DEBUG_LEVEL\n"
54386  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54387  printf "* JDK variant:    $JDK_VARIANT\n"
54388  printf "* JVM variants:   $with_jvm_variants\n"
54389  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54390
54391  printf "\n"
54392  printf "Tools summary:\n"
54393  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54394    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54395  fi
54396  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54397  if test "x$TOOLCHAIN_VERSION" != "x"; then
54398    print_version=" $TOOLCHAIN_VERSION"
54399  fi
54400  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54401  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54402  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54403
54404  printf "\n"
54405  printf "Build performance summary:\n"
54406  printf "* Cores to use:   $JOBS\n"
54407  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54408  if test "x$CCACHE_STATUS" != "x"; then
54409    printf "* ccache status:  $CCACHE_STATUS\n"
54410  fi
54411  printf "\n"
54412
54413  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54414    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54415    printf "will result in longer build times.\n"
54416    printf "\n"
54417  fi
54418
54419  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54420    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54421    printf "These are not respected, and will be ignored. It is recommended\n"
54422    printf "that you clean your environment. The following variables are set:\n"
54423    printf "$FOUND_ALT_VARIABLES\n"
54424    printf "\n"
54425  fi
54426
54427  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54428    printf "WARNING: Your build output directory is not on a local disk.\n"
54429    printf "This will severely degrade build performance!\n"
54430    printf "It is recommended that you create an output directory on a local disk,\n"
54431    printf "and run the configure script again from that directory.\n"
54432    printf "\n"
54433  fi
54434
54435  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54436    printf "WARNING: The result of this configuration has overridden an older\n"
54437    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54438    printf "proper build. Failure to do so might result in strange build problems.\n"
54439    printf "\n"
54440  fi
54441
54442  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54443    printf "WARNING: The result of this configuration was not saved.\n"
54444    printf "You should run without '--no-create | -n' to create the configuration.\n"
54445    printf "\n"
54446  fi
54447
54448
54449
54450  # Locate config.log.
54451  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54452    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54453  elif test -e "./config.log"; then
54454    CONFIG_LOG_PATH="."
54455  fi
54456
54457  if test -e "$CONFIG_LOG_PATH/config.log"; then
54458    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54459    if test $? -eq 0; then
54460      printf "The following warnings were produced. Repeated here for convenience:\n"
54461      # We must quote sed expression (using []) to stop m4 from eating the [].
54462      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54463      printf "\n"
54464    fi
54465  fi
54466
54467